Beispiel #1
0
function check_msg($temp)
{
    if ($temp) {
        $s = '<font color="green"> 通过 √ </font>';
    } else {
        $s = '<font color="red"> 不通过 × </font>';
        remark_setup(1, 0);
    }
    return $s;
}
Beispiel #2
0
function dosvn()
{
    global $app_tmppath;
    $svntemppath = $app_tmppath . "svn/";
    $sv = $_SESSION['setup_conf']['svn'];
    $root = $_SESSION['setup_conf']['conf']['app_root'];
    if (count($sv) > 0) {
        //deldir($svntemppath);
        foreach ($sv as $v => $s) {
            $temppath = $svntemppath . "{$v}/";
            msg('正在从' . $s['SVN_URL'] . '上下载文件,请耐心等待……<br>');
            $svn = new phpsvnclient($s['SVN_URL'], $s['SVN_USER'], $s['SVN_PWD']);
            $files = $svn->getDirectoryTree($s['SVN_DIR']);
            foreach ($files as $k => $f) {
                if ($f['type'] == 'file') {
                    $content = $svn->getFile($f['path']);
                    $file = str_replace($s['SVN_DIR'], $temppath, $f['path']);
                    write_file($file, $content);
                }
            }
        }
        foreach ($sv as $v => $s) {
            $temppath = $svntemppath . "{$v}/";
            copydir($temppath, $root . $s['DIR_PATH']);
        }
    }
    remark_setup(1);
    echo "<script language='JavaScript'>top.godourl(4);</script>";
}