function databaseToweekview($database) { // addcolumn($database); $video_ids = extractid($database); $check = ""; for ($i = 0; $i < sizeof($video_ids); $i++) { $video_id = $video_ids[$i]; //var_dump($video_id); if ($video_id === $check) { //echo($check.":".$video_id."continue\n"); continue; } else { echo "done\n"; $check = $video_ids[$i]; $str = fileget($video_id); //echo($str); $weekview = main($database, $str); } if ($weekview == null) { continue; } else { updateinfo($database, $weekview, $video_id); } } }
unset($data[$i]["id"]); if (count($data[$i]["sub_button"]) == 0 && $data[$i]["type"] == "") { unset($data[$i]); } } $postdata["button"] = $data; $result = $Obj->curl_http_request($url, $Obj->JSON($postdata)); $result = json_decode($result["json"], true); if ($result["errcode"] > 0) { exit($result["errmsg"]); } } wechatmenu(); if ($_GET["mod"] == "update") { $data = json_decode($_POST["data"], true); updateinfo($data); exit("success"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script src="wechat_js/jquery-1.11.0.min.js"></script> <link type="text/css" rel="stylesheet" href="wechat_css/layout_head.css" /> <link type="text/css" rel="stylesheet" href="wechat_css/base.css" /> <link type="text/css" rel="stylesheet" href="wechat_css/lib.css" /> <link type="text/css" rel="stylesheet" href="wechat_css/advanced_menu_setting.css" /> <title>软件可靠性评价系统</title> </head> <body>
die("Cannot be used in web server mode\n\n"); } $GLOBALS["AS_ROOT"] = true; include_once dirname(__FILE__) . '/ressources/class.templates.inc'; include_once dirname(__FILE__) . '/ressources/class.samba.inc'; include_once dirname(__FILE__) . '/framework/class.unix.inc'; include_once dirname(__FILE__) . "/framework/frame.class.inc"; if (preg_match("#--verbose#", implode(" ", $argv))) { $GLOBALS["VERBOSE"] = true; } if (preg_match("#--force#", implode(" ", $argv))) { $GLOBALS["FORCE"] = true; } while (list($num, $ligne) = each($argv)) { $f[] = "{$num}:{$ligne}"; updateinfo(@implode(" ", $f), "MAIN", __FILE__, __LINE__); } function updateinfo($text, $function, $file, $line) { writelogs($text, $function, $file, $line); $file = "/var/log/artica-postfix/wins.update.log"; @mkdir(dirname($file)); $logFile = $file; if (!is_dir(dirname($logFile))) { mkdir(dirname($logFile)); } if (is_file($logFile)) { $size = filesize($logFile); if ($size > 1000000) { unlink($logFile); }