Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
filechange
:
configurator.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php session_start(); ?> <!--PHTP 2.0 Beta 1 version, by Antoine_935, for PHP This file may be distributed under the terms of the Genreal Public License This software comes with absolutely no warranty Join the community at www.phtp.be --> <?php require("config.php"); require("language/$lang/lang-config.php"); $msg=""; if(isset($action)) { $file = fopen("config.php", "r"); $content = fread($file, filesize("config.php")); fclose($file); switch($action) { case "queuetime" : if($content = preg_replace("`queuedelay = \".*?\"`", "queuedelay = \"$timeset\"", $content)) $msg=$success; break; case "actiontime" : if($content = preg_replace("`actiondelay = \".*?\"`", "actiondelay = \"$timeset\"", $content)) $msg=$success; break; case "rootdir" : if($content = preg_replace("`rootdir = \".*?\"`", "rootdir = \"$dir\"", $content)) $msg=$success; break; case "directdir" : if($content = preg_replace("`directdir = \".*?\"`", "directdir = \"$ddir\"", $content)) $msg = $success; break; } $file = fopen("config.php", "w"); fwrite($file, $content); fclose($file); require("config.php"); } ?> <html> <head> <title>PHTP => Config Manager</title> </head> <body> <h3>Config Manager</h3> <?php if($msg!="") echo "<font color=\"#CC0000\">$msg</font><br>\n"; ?> <form action="configurator.php" method="post"> <?php echo $queueconfig[0]; ?> <input type="text" name="timeset" size="2" value="<?php echo $queuedelay; ?>"> <?php echo $seconds; ?> <input type="hidden" name="action" value="queuetime"> <input type="submit" value="Ok"><br> </form> <form action="configurator.php" method="post"> <?php echo $actionconfig[0]; ?> <input type="text" name="timeset" size="2" value="<?php echo $actiondelay; ?>"> <?php echo $seconds; ?> <input type="hidden" name="action" value="actiontime"> <input type="submit" value="Ok"><br> </form> <form action="configurator.php" method="post"> <?php echo $rootdirconfig; ?> <input type="text" name="dir" value="<?php echo $rootdir; ?>"> <input type="hidden" name="action" value="rootdir"> <input type="submit" value="Ok"><br> </form> <form action="configurator.php" method="post"> <?php echo $text_ddir; ?> <select name="ddir"> <option value="off" <?php if($directdir=="off") echo "selected"; ?>><?php echo $no; ?></option> <option value="on" <?php if($directdir=="on") echo "selected"; ?>><?php echo $yes; ?></option> </select> <input type="hidden" name="action" value="directdir"> <input type="submit" value="Ok"><br> </form> </body> </html>