/[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.1 - (hide annotations)
Tue Jun 15 18:15:58 2004 UTC (21 years, 9 months ago) by sysadm
Branch: MAIN
Add shell for article_daily_stat

1 sysadm 1.1 <?
2     switch($_SERVER["argc"])
3     {
4     case 2:
5     $begin_date = strtotime($_SERVER["argv"][1])-60*60*24*7;
6     $end_date = strtotime($_SERVER["argv"][1]);
7     break;
8     case 3:
9     $begin_date = strtotime($_SERVER["argv"][1]);
10     $end_date = strtotime($_SERVER["argv"][2]);
11     break;
12     default:
13     echo ("Usage: article_daily_stat_gen.php <begin_date> [end_date]\n");
14     exit();
15     }
16    
17     chdir(substr($_SERVER["argv"][0],0,strrpos($_SERVER["argv"][0],"/")));
18    
19     require_once "./session_init.inc.php";
20    
21     //Set data for session
22     $_SESSION["MNG_uid"]=-1;
23     $_SESSION["MNG_priv"]["article_audit"]=1;
24    
25     //Set $date for article_daily_stat.php
26     for($date=$begin_date;$date<=$end_date;$date+=(60*60*24))
27     {
28     echo ("Generating <".strftime("%Y-%m-%d",$date).".xml> ...\n");
29     include "./article_daily_stat.php";
30     }
31    
32     session_unset();
33     session_destroy();
34     ?>

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