| 2 |
if (!isset($_SERVER["argc"])) |
if (!isset($_SERVER["argc"])) |
| 3 |
$_SERVER["argc"] = 0; |
$_SERVER["argc"] = 0; |
| 4 |
|
|
|
switch($_SERVER["argc"]) |
|
|
{ |
|
|
case 1: |
|
|
$do_pack = false; |
|
|
break; |
|
|
case 2: |
|
|
$do_pack = true; |
|
|
break; |
|
|
default: |
|
|
if (isset($_HTTP["pack"])) |
|
|
$do_pack = ($_HTTP["pack"]=="on"?1:0); |
|
|
else |
|
|
$do_pack = false; |
|
|
} |
|
|
|
|
| 5 |
if (isset($_SERVER["argv"][0])) |
if (isset($_SERVER["argv"][0])) |
| 6 |
chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/"))); |
chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/"))); |
| 7 |
|
|
| 16 |
$db_conn_shell=include "./db_open.inc.php"; |
$db_conn_shell=include "./db_open.inc.php"; |
| 17 |
|
|
| 18 |
$rs_shell=mysql_query("select section_config.SID,section_config.title as s_title,". |
$rs_shell=mysql_query("select section_config.SID,section_config.title as s_title,". |
| 19 |
"section_config.ex_gen_tm,section_config.ex_pack_tm,section_config.ex_update,". |
"section_config.ex_gen_tm,section_config.ex_update,". |
| 20 |
"section_class.title as c_title from section_config inner join section_class on". |
"section_class.title as c_title from section_config inner join section_class on". |
| 21 |
" section_config.CID=section_class.CID where section_config.enable". |
" section_config.CID=section_class.CID where section_config.enable". |
| 22 |
" and section_class.enable and ex_update=1 order by". |
" and section_class.enable and ex_update=1 order by". |
| 39 |
include "./gen_ex_context.php"; |
include "./gen_ex_context.php"; |
| 40 |
} |
} |
| 41 |
|
|
|
if ($do_pack) |
|
|
{ |
|
|
$db_conn_shell=include "./db_open.inc.php"; |
|
|
|
|
|
$rs_shell=mysql_query("select section_config.SID,section_config.title as s_title,". |
|
|
"section_config.ex_gen_tm,section_config.ex_pack_tm,section_config.ex_update,". |
|
|
"section_class.title as c_title from section_config inner join section_class on". |
|
|
" section_config.CID=section_class.CID where section_config.enable". |
|
|
" and section_class.enable and ex_gen_tm>ex_pack_tm order by". |
|
|
" section_class.sort_order,section_config.sort_order") |
|
|
or die("Query section error!"); |
|
|
|
|
|
while($row_shell=mysql_fetch_array($rs_shell)) |
|
|
{ |
|
|
echo ("打包 [".$row_shell["s_title"]."] 中...\n"); |
|
|
$_GET["sid"] = $row_shell["SID"]; |
|
|
include "./gen_ex_pack.php"; |
|
|
} |
|
|
|
|
|
mysql_free_result($rs_shell); |
|
|
} |
|
|
|
|
| 42 |
session_unset(); |
session_unset(); |
| 43 |
session_destroy(); |
session_destroy(); |
| 44 |
?> |
?> |