C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$R24B99I\web\config.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?
require("inc/menu.php");
require(
"inc/html.php");
require(
"inc/common.php");

$output="";
$rows="";

if (
$admin==FALSE) {
    
header("Location: index.php");
    die();
}

if (isset(
$_POST["action"])) {
    
$newconfig=$_POST["newconfig"];
    foreach (
$newconfig as $item => $value) {
            
doquery("update config set value=\"".greatescape($value)."\" where item=\"".greatescape($item)."\" and visible=1");
    }
    
$output.="Settings saved\n<BR /><BR />";
}

$config=getconfig();

$result=doquery("select item, value, comments from config where visible=1 order by item");

$output.=form_begin("config.php","POST");
$output.=input_hidden("action""save");

$rows.=tr(td("Config item","","tablehead").td("Value","","tablehead").td("Comments","","tablehead"));
$c=0;

while (
$row=mysql_fetch_assoc($result)) {
    if (
$c++%2==0$class="tablecell0"; else $class="tablecell1";
    
$cells=td($row["item"],"",$class);
    
$cells.=td(input_text("newconfig[".$row["item"]."]"50255htmlspecialchars($row["value"])),"",$class);
    
$cells.=td($row["comments"],"",$class);

    
$rows.=tr($cells);
}

$output.=table($rows,0,1,0,"","datatable");
$output.="<P>";
$output.=submit("Save settings");
$output.=form_end();

$content["body"] =& $output;
dopage($content);

?>