Пример #1
0
} else {
    $DB = new DB($host, $user, $pwd, $dbname, $port);
}
if ($DB->query("select * from wjob_config where id='1'") == FALSE) {
    header('Content-type:text/html;charset=utf-8');
    echo '<div class="row">你还没安装!<a href="install/">点此安装</a></div>';
    exit;
}
$conf = $DB->get_row("SELECT * FROM wjob_config WHERE 1 limit 1");
//获取系统配置
include_once ROOT . "includes/set.php";
include_once ROOT . "includes/signapi.php";
include_once ROOT . "includes/function.php";
include_once ROOT . "includes/qq.func.php";
if (!file_exists(ROOT . 'install/job.lock') && file_exists(ROOT . 'install/index.php')) {
    sysmsg('<h2>检测到无 job.lock 文件</h2><ul><li><font size="4">如果您尚未安装本程序,请<a href="./install/">前往安装</a></font></li><li><font size="4">如果您已经安装本程序,请手动放置一个空的 job.lock 文件到 /install 文件夹下,<b>为了您站点安全,在您完成它之前我们不会工作。</b></font></li></ul><br/><h4>为什么必须建立 job.lock 文件?</h4>它是彩虹云任务的保护文件,如果检测不到它,就会认为站点还没安装,此时任何人都可以安装/重装彩虹云任务。<br/><br/>', true);
}
//界面样式
if ((!checkpc() || !file_exists(ROOT . 'template/index.html')) && $mod == 'home') {
    $mod = 'index';
}
if (checkmobile() == true) {
    $theme = isset($_COOKIE["uachar"]) ? $_COOKIE["uachar"] : 'mobile';
}
if (!isset($theme)) {
    $theme = isset($_COOKIE["uachar"]) ? $_COOKIE["uachar"] : 'default';
}
if ($mod == 'head') {
    $theme = 'mobile';
}
if ($conf['css2'] == 0) {
Пример #2
0
                     fputs($f2, $id . ':' . $sid . ': <font color=violet>Приват к</font> <b>' . $m[1] . '</b> <font color=#c0c0c0>(' . date('H:i:s d/m/Y') . ')</font>: ' . str_replace(array("\n", "\r"), array('', ''), $m[2]) . "\n");
                 } else {
                     $nocmd = 1;
                     fputs($f2, $id . ':x:<b>' . $nick_found . '</b> <font color=#c0c0c0>(' . date('H:i:s d/m/Y') . ')</font>: ' . str_replace(array("\n", "\r"), array('', ''), $MSG1) . "\n");
                 }
             }
         }
     }
     fclose($f2);
     fseek($f, 0, SEEK_START);
     fputs($f, $id);
     flock($f, LOCK_UN);
     fclose($f);
     if ($nocmd && preg_match('/^\\/([a-z]+)(\\s+(.+))?$/isU', $_POST['msg'], $m)) {
         if (isset($modules[$m[1]])) {
             sysmsg("<i>{$modules[$m[1]]}: </i> " . run_module($m[1], str_replace(array("\n", "\r"), array('', ''), $m[2])), 'blue');
         }
     }
     $_SESSION['lastact'] = time();
 } else {
     if (isset($_POST['getnick'])) {
         $nick_found = '';
         foreach ($fx_n as $n) {
             $n2 = explode(':', $n, 4);
             if ($sid == $n2[1]) {
                 $nick_found = $n2[2];
                 break;
             }
         }
         if (!isset($nick_found[0])) {
             die;
Пример #3
0
/**
 * @desc Build project
 * @deps runtests
 */
function task_build()
{
    sysmsg("Building project '" . prop('PROJECT_DIR') . "'...\n");
}