/[LeafOK_CVS]/fenglin/manage/gen_ex_daily.php
ViewVC logotype

Annotation of /fenglin/manage/gen_ex_daily.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Sat Mar 1 09:05:03 2025 UTC (12 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.4: +3 -3 lines
Convert GB2312 to UTF-8

1 sysadm 1.1 <?
2 sysadm 1.4 if (!isset($_SERVER["argc"]))
3     $_SERVER["argc"] = 0;
4    
5 sysadm 1.1 switch($_SERVER["argc"])
6     {
7     case 1:
8 sysadm 1.2 $do_pack = false;
9 sysadm 1.1 break;
10 sysadm 1.2 case 2:
11     $do_pack = true;
12 sysadm 1.3 break;
13 sysadm 1.1 default:
14 sysadm 1.2 if (isset($_HTTP["pack"]))
15     $do_pack = ($_HTTP["pack"]=="on"?1:0);
16     else
17     $do_pack = false;
18 sysadm 1.1 }
19    
20 sysadm 1.2 if (isset($_SERVER["argv"][0]))
21     chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/")));
22 sysadm 1.1
23     require_once "./session_init.inc.php";
24    
25     //Set data for session
26     $_SESSION["MNG_uid"]=-1;
27     $_SESSION["MNG_priv"]["gen_ex"]=1;
28    
29     $new = false;
30    
31     $db_conn_shell=include "./db_open.inc.php";
32    
33     $rs_shell=mysql_query("select section_config.SID,section_config.title as s_title,".
34     "section_config.ex_gen_tm,section_config.ex_pack_tm,section_config.ex_update,".
35     "section_class.title as c_title from section_config inner join section_class on".
36     " section_config.CID=section_class.CID where section_config.enable".
37     " and section_class.enable and ex_update=1 order by".
38     " section_class.sort_order,section_config.sort_order")
39     or die("Query section error!");
40    
41     while($row_shell=mysql_fetch_array($rs_shell))
42     {
43 sysadm 1.5 echo ("更新 [".$row_shell["s_title"]."] 中...\n");
44 sysadm 1.1 $_GET["sid"] = $row_shell["SID"];
45     include "./gen_ex_section.php";
46     $new = true;
47     }
48    
49     mysql_free_result($rs_shell);
50    
51 sysadm 1.2 if ($new)
52     {
53 sysadm 1.5 echo ("生成目录中...\n");
54 sysadm 1.2 include "./gen_ex_context.php";
55     }
56 sysadm 1.1
57 sysadm 1.2 if ($do_pack)
58 sysadm 1.1 {
59 sysadm 1.2 $db_conn_shell=include "./db_open.inc.php";
60 sysadm 1.1
61 sysadm 1.2 $rs_shell=mysql_query("select section_config.SID,section_config.title as s_title,".
62     "section_config.ex_gen_tm,section_config.ex_pack_tm,section_config.ex_update,".
63     "section_class.title as c_title from section_config inner join section_class on".
64     " section_config.CID=section_class.CID where section_config.enable".
65     " and section_class.enable and ex_gen_tm>ex_pack_tm order by".
66     " section_class.sort_order,section_config.sort_order")
67     or die("Query section error!");
68    
69     while($row_shell=mysql_fetch_array($rs_shell))
70     {
71 sysadm 1.5 echo ("打包 [".$row_shell["s_title"]."] 中...\n");
72 sysadm 1.2 $_GET["sid"] = $row_shell["SID"];
73     include "./gen_ex_pack.php";
74     }
75 sysadm 1.1
76 sysadm 1.2 mysql_free_result($rs_shell);
77 sysadm 1.1 }
78    
79     session_unset();
80     session_destroy();
81     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1