| 1 |
<? |
<? |
| 2 |
switch($_SERVER["argc"]) |
if (isset($_SERVER["argv"]) && strrpos($_SERVER["argv"][0], "/") !== false) |
| 3 |
{ |
{ |
| 4 |
case 1: |
chdir(substr($_SERVER["argv"][0], 0, strrpos($_SERVER["argv"][0], "/"))); |
|
break; |
|
|
default: |
|
|
echo ("Usage: db_daily_process.php\n"); |
|
|
exit(); |
|
| 5 |
} |
} |
| 6 |
|
|
|
chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/"))); |
|
|
|
|
|
require_once "./session_init.inc.php"; |
|
|
|
|
|
//Set data for session |
|
|
$_SESSION["MNG_uid"]=-1; |
|
|
$_SESSION["MNG_priv"]["db_cleanup"]=1; |
|
|
$_SESSION["MNG_priv"]["score_cacl"]=1; |
|
|
|
|
| 7 |
include "./db_cleanup.php"; |
include "./db_cleanup.php"; |
| 8 |
include "./db_repair.php"; |
include "./db_repair.php"; |
|
|
|
| 9 |
include "./bbs_score_calculate.php"; |
include "./bbs_score_calculate.php"; |
|
|
|
|
session_unset(); |
|
|
session_destroy(); |
|
| 10 |
?> |
?> |