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

Annotation of /fenglin/manage/article_daily_stat_gen.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations)
Thu Mar 20 03:34:21 2025 UTC (11 months, 4 weeks ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
FILE REMOVED
Remove legacy feature

1 sysadm 1.1 <?
2 sysadm 1.3 if (!isset($_SERVER["argc"]))
3     $_SERVER["argc"] = 0;
4    
5 sysadm 1.1 switch($_SERVER["argc"])
6     {
7     case 2:
8     $begin_date = strtotime($_SERVER["argv"][1])-60*60*24*7;
9     $end_date = strtotime($_SERVER["argv"][1]);
10     break;
11     case 3:
12     $begin_date = strtotime($_SERVER["argv"][1]);
13     $end_date = strtotime($_SERVER["argv"][2]);
14     break;
15     default:
16 sysadm 1.2 if (isset($_POST["begin_date"]))
17     {
18     $begin_date = strtotime($_POST["begin_date"]);
19     }
20     else
21     {
22     $begin_date = time();
23     }
24     if (isset($_POST["end_date"]))
25     {
26     $end_date = strtotime($_POST["end_date"]);
27     }
28     else
29     {
30     $end_date = $begin_date;
31     $begin_date -= 60*60*24*7;
32     }
33 sysadm 1.1 }
34    
35 sysadm 1.2 if (isset($_SERVER["argv"][0]))
36     chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/")));
37 sysadm 1.1
38     require_once "./session_init.inc.php";
39    
40     //Set data for session
41     $_SESSION["MNG_uid"]=-1;
42     $_SESSION["MNG_priv"]["article_audit"]=1;
43    
44     //Set $date for article_daily_stat.php
45     for($date=$begin_date;$date<=$end_date;$date+=(60*60*24))
46     {
47 sysadm 1.4 echo ("Generating <".date("Y-m-d",$date).".xml> ...\n");
48 sysadm 1.1 include "./article_daily_stat.php";
49     }
50    
51     session_unset();
52     session_destroy();
53     ?>

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