PHP Classes

File: dialogtest.php

Recommend this page to a friend!
  Classes of Harish Chauhan   DialogBox   dialogtest.php   Download  
File: dialogtest.php
Role: Example script
Content type: text/plain
Description: example
Class: DialogBox
Browse and manage server side files
Author: By
Last change:
Date: 18 years ago
Size: 870 bytes
 

Contents

Class file image Download
<?php
require("dialogs/dialog.inc.php");

$dialog=new DIALOG(dirname(dirname(__FILE__))); //Path initial to directory i.e /path/to/your/directory
$dialog->setBaseDir("dialogs"); // path/to/dialog folder
$dialog->setFileType("html,htm,php,txt,doc,pdf");
?>
<html>
<head>
<title>Open dialog test</title>
<script language="javascript">
    function openFile(value)
    {
        alert("You have selected :"+value);
    }
    function newFile(value)
    {
        alert("You have selected :"+value);
    }
    function saveFileAs(value)
    {
        alert("You have selected :"+value);
    }
</script>
</head>
<body>
<input id='openfile' >&nbsp;<?php $dialog->showDialog();?> Open File<br>
<input id='openfile' >
<?php $dialog->setDialogType(DIALOG_SAVE);
$dialog->showDialog();?> Save File
<br>
<input id='openfile' >
<?php $dialog->setDialogType(DIALOG_SAVEAS);
$dialog->showDialog();?> SaveAs File
</body>
</html>