Changeset 766
- Timestamp:
- Apr 25, 2005, 5:41:56 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/stats.php
r724 r766 31 31 include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); 32 32 33 $url_img_global_report = PHPWG_ROOT_PATH.'admin/images/global_stats.img.php'; 33 $url_img = PHPWG_ROOT_PATH.'admin/images/'; 34 $nls_value_title = $lang['w_month']; 35 $group_clause = "DATE_FORMAT(date,'%Y-%m') DESC"; 36 $where_clause = "1"; 37 38 if (isset($_GET['month']) && isset($_GET['year']) ) 39 { 40 $url_img .= 'monthly_stats.img.php?year='.$_GET['year'].'&month='.$_GET['month']; 41 $nls_value_title = $lang['w_day']; 42 $group_clause = "DATE_FORMAT(date,'%Y-%m-%d') ASC"; 43 $where_clause = "(YEAR(date) = ".$_GET['year']." AND MONTH(date) = ".$_GET['month']." )"; 44 } 45 else 46 { 47 $url_img .= 'global_stats.img.php'; 48 } 49 34 50 //----------------------------------------------------- template initialization 35 51 $template->set_filenames( array('stats'=>'admin/stats.tpl') ); 36 52 37 53 $template->assign_vars(array( 38 'L_ MONTH'=>$lang['w_month'],54 'L_VALUE'=>$nls_value_title, 39 55 'L_PAGES_SEEN'=>$lang['stats_pages_seen'], 40 56 'L_VISITORS'=>$lang['visitors'], … … 44 60 'L_STAT_MONTHLY_ALT'=>$lang['stats_global_graph_title'], 45 61 46 'IMG_ MONTHLY_REPORT'=>add_session_id($url_img_global_report)62 'IMG_REPORT'=>add_session_id($url_img) 47 63 )); 48 64 … … 50 66 $query = ' 51 67 SELECT DISTINCT COUNT(*) as p, 68 DATE(date) as d, 52 69 MONTH(date) as m, 53 70 YEAR(date) as y 54 71 FROM '.HISTORY_TABLE.' 55 GROUP BY DATE_FORMAT(date,\'%Y-%m\') DESC 56 ;'; 72 WHERE '.$where_clause.' 73 GROUP BY '.$group_clause.';'; 74 57 75 $result = pwg_query( $query ); 58 76 $i=0; 59 77 while ( $row = mysql_fetch_array( $result ) ) 60 78 { 61 $current_month = $row['y']."-"; 62 if ($row['m'] <10) {$current_month.='0';} 63 $current_month .= $row['m']; 79 $where_clause=""; 80 $value = ''; 81 if (isset($_GET['month']) && isset($_GET['year']) ) 82 { 83 $where_clause = "DATE_FORMAT(date,'%Y-%m-%d') = '".$row['d']."'"; 84 $value = substr($row['d'],8,2); 85 } 86 else 87 { 88 $current_month = $row['y']."-"; 89 if ($row['m'] <10) {$current_month.='0';} 90 $current_month .= $row['m']; 91 $where_clause = "DATE_FORMAT(date,'%Y-%m') = '".$current_month."'"; 92 $value = "<a href='".PHPWG_ROOT_PATH."admin.php?page=stats"; 93 $value.= "&year=".$row['y']."&month=".$row['m']."'>"; 94 $value.= $lang['month'][$row['m']].' '.$row['y']; 95 $value.= "</a>"; 96 } 97 64 98 // Number of pictures seen 65 99 $query = ' 66 100 SELECT COUNT(*) as p, 67 68 FROM '.HISTORY_TABLE.'69 WHERE DATE_FORMAT(date,\'%Y-%m\') = \''.$current_month.'\'101 FILE as f 102 FROM '.HISTORY_TABLE.' 103 WHERE '.$where_clause.' 70 104 AND FILE = \'picture\' 71 GROUP BY FILE105 GROUP BY FILE 72 106 ;'; 73 107 $pictures = mysql_fetch_array(pwg_query( $query )); … … 77 111 SELECT COUNT(*) as p, login 78 112 FROM '.HISTORY_TABLE.' 79 WHERE DATE_FORMAT(date,\'%Y-%m\') = \''.$current_month.'\'113 WHERE '.$where_clause.' 80 114 GROUP BY login, IP 81 115 ;'; … … 93 127 $class = ($i % 2)? 'row1':'row2'; $i++; 94 128 95 $template->assign_block_vars(' month',array(96 'MONTH'=>$lang['month'][$row['m']].' '.$row['y'],129 $template->assign_block_vars('statrow',array( 130 'VALUE'=>$value, 97 131 'PAGES'=>$row['p'], 98 132 'VISITORS'=>$nb_visitors, -
trunk/include/common.inc.php
r681 r766 114 114 115 115 116 include(PHPWG_ROOT_PATH .'include/mysql.inc.php');116 @include(PHPWG_ROOT_PATH .'include/mysql.inc.php'); 117 117 if (!defined('PHPWG_INSTALLED')) 118 118 { -
trunk/include/constants.php
r758 r766 27 27 28 28 // Default settings 29 define('PHPWG_VERSION', ' %PWGVERSION%');29 define('PHPWG_VERSION', 'BSF'); 30 30 define('PHPWG_URL', 'http://www.phpwebgallery.net'); 31 31 define('PHPWG_FORUM_URL', 'http://forum.phpwebgallery.net'); -
trunk/language/en_UK.iso-8859-1/install.lang.php
r675 r766 28 28 $lang['install_message'] = 'Message'; 29 29 $lang['Initial_config'] = 'Basic configuration'; 30 $lang['Default_lang'] = 'Default gal erielanguage';30 $lang['Default_lang'] = 'Default gallery language'; 31 31 $lang['step1_title'] = 'Database configuration'; 32 32 $lang['step2_title'] = 'Admin configuration'; … … 37 37 $lang['reg_err_mail_address'] = 'e-mail address refused, it must be like name@server.com'; 38 38 39 $lang['install_webmaster'] = ' webmaster login';39 $lang['install_webmaster'] = 'Webmaster login'; 40 40 $lang['install_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration'; 41 41 … … 49 49 $lang['step1_host'] = 'MySQL host'; 50 50 $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr'; 51 $lang['step1_user'] = ' user';51 $lang['step1_user'] = 'User'; 52 52 $lang['step1_user_info'] = 'user login given by your host provider'; 53 53 $lang['step1_pass'] = 'Password'; … … 61 61 $lang['step2_err_pass'] = 'please enter your password again'; 62 62 $lang['install_end_title'] = 'Installation finished'; 63 $lang['step2_pwd'] = ' webmaster password';63 $lang['step2_pwd'] = 'Webmaster password'; 64 64 $lang['step2_pwd_info'] = 'Keep it confidential, it enables you to access administration panel'; 65 $lang['step2_pwd_conf'] = ' confirm password';65 $lang['step2_pwd_conf'] = 'Password [confirm]'; 66 66 $lang['step2_pwd_conf_info'] = 'verification'; 67 67 $lang['install_help'] = 'Need help ? Ask your question on <a href="http://forum.phpwebgallery.net">PhpWebGallery message board</a>.'; -
trunk/template/default/admin/stats.tpl
r566 r766 1 1 <div class="admin">{L_STAT_TITLE}</div> 2 <img class="image" src="{IMG_ MONTHLY_REPORT}" alt="{L_STAT_MONTHLY_ALT}" />2 <img class="image" src="{IMG_REPORT}" alt="{L_STAT_MONTHLY_ALT}" /> 3 3 <div class="admin">{L_STAT_MONTH_TITLE}</div> 4 4 <table class="table2" width="60%"> 5 5 <tr class="throw"> 6 <th>{L_ MONTH}</th>6 <th>{L_VALUE}</th> 7 7 <th>{L_PAGES_SEEN}</th> 8 8 <th>{L_VISITORS}</th> 9 9 <th>{L_PICTURES}</th> 10 10 </tr> 11 <!-- BEGIN month-->12 <tr class="{ month.T_CLASS}">13 <td>{ month.MONTH}</td>14 <td>{ month.PAGES}</td>15 <td>{ month.VISITORS}</td>16 <td>{ month.IMAGES}</td>11 <!-- BEGIN statrow --> 12 <tr class="{statrow.T_CLASS}"> 13 <td>{statrow.VALUE}</td> 14 <td>{statrow.PAGES}</td> 15 <td>{statrow.VISITORS}</td> 16 <td>{statrow.IMAGES}</td> 17 17 </tr> 18 <!-- END month-->18 <!-- END statrow --> 19 19 </table> 20 20 <br />
Note: See TracChangeset
for help on using the changeset viewer.