Changeset 537
- Timestamp:
- Sep 26, 2004, 11:24:49 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/isadmin.inc.php
r393 r537 32 32 { 33 33 echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />'; 34 echo '<a href=" ./identification.php">'.$lang['ident_title'].'</a></div>';34 echo '<a href="'.PHPWG_ROOT_PATH.'identification.php">'.$lang['ident_title'].'</a></div>'; 35 35 exit(); 36 36 } -
trunk/admin/stats.php
r527 r537 30 30 } 31 31 include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' ); 32 $max_pixels = 500;33 //------------------------------------------------------------ comment deletion34 if ( isset( $_GET['del'] ) and is_numeric( $_GET['del'] ) )35 {36 $query = 'DELETE FROM '.COMMENTS_TABLE;37 $query.= ' WHERE id = '.$_GET['del'];38 $query.= ';';39 mysql_query( $query );40 }41 //--------------------------------------------------------- history table empty42 if ( isset( $_GET['act'] ) and $_GET['act'] == 'empty' )43 {44 $query = 'DELETE FROM '.HISTORY_TABLE.';';45 mysql_query( $query );46 }47 32 48 // empty link 49 $url_empty = PHPWG_ROOT_PATH.'admin.php?page=stats'; 50 if (isset($_GET['last_days'])) 51 $url_empty .='&last_days='.$_GET['last_days']; 52 $url_empty.= '&act=empty'; 33 $url_img_monthly_report = PHPWG_ROOT_PATH.'/admin/images/monthly_visits.img.php'; 53 34 //----------------------------------------------------- template initialization 54 35 $template->set_filenames( array('stats'=>'admin/stats.tpl') ); 55 36 56 if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );57 else define( 'MAX_DAYS', 0 );58 59 foreach ( $conf['last_days'] as $option ) {60 $url = $_SERVER['PHP_SELF'].'?last_days='.($option - 1);61 $url.= '&page=stats';62 $template->assign_block_vars(63 'last_day_option',64 array(65 'OPTION'=>$option,66 'T_STYLE'=>(( $option == MAX_DAYS + 1 )?'text-decoration:underline;':''),67 'U_OPTION'=>add_session_id( $url )68 )69 );70 }71 72 37 $template->assign_vars(array( 73 'L_STAT_LASTDAYS'=>$lang['stats_last_days'], 74 'L_STAT_DATE'=>$lang['date'], 75 'L_STAT_LOGIN'=>$lang['login'], 76 'L_STAT_IP'=>$lang['IP'], 77 'L_STAT_FILE'=>$lang['file'], 78 'L_STAT_CATEGORY'=>$lang['category'], 79 'L_STAT_PICTURE'=>$lang['picture'], 80 'L_STAT_EMPTY'=>$lang['stats_empty'], 81 'L_STAT_SEEN'=>$lang['stats_pages_seen'], 82 'L_STAT_VISITOR'=>$lang['stats_visitors'], 83 84 'STAT_EMPTY_URL'=>$url_empty 38 'L_STAT_TITLE'=>$lang['stats_last_days'], 39 'L_STAT_MONTHLY_ALT'=>$lang['stats_pages_seen_graph_title'], 40 'IMG_MONTHLY_REPORT'=>add_session_id($url_img_monthly_report) 85 41 )); 86 87 $tpl = array( 'stats_pages_seen_graph_title', 'stats_visitors_graph_title');88 42 89 43 //---------------------------------------------------------------- log history … … 94 48 $starttime = mktime( 0, 0, 0,date('n'),date('j'),date('Y') ); 95 49 $endtime = mktime( 23,59,59,date('n'),date('j'),date('Y') ); 96 for ( $i = 0; $i <= MAX_DAYS; $i++ )50 //for ( $i = 0; $i <= MAX_DAYS; $i++ ) 97 51 { 98 $day = array();52 /*$day = array(); 99 53 $template->assign_block_vars('day',array( 100 54 )); -
trunk/include/functions.inc.php
r528 r537 346 346 if ( $conf['log'] ) 347 347 { 348 $query = 'insert into '. PREFIX_TABLE.'history';348 $query = 'insert into '.HISTORY_TABLE; 349 349 $query.= ' (date,login,IP,file,category,picture) values'; 350 $query.= " ( ".time().", '".$user['username']."'";350 $query.= " (NOW(), '".$user['username']."'"; 351 351 $query.= ",'".$_SERVER['REMOTE_ADDR']."'"; 352 352 $query.= ",'".$file."','".$category."','".$picture."');"; -
trunk/install/phpwebgallery_structure.sql
r507 r537 95 95 DROP TABLE IF EXISTS phpwebgallery_history; 96 96 CREATE TABLE phpwebgallery_history ( 97 date int(11) NOT NULL default '0',97 date datetime NOT NULL default '0000-00-00 00:00:00', 98 98 login varchar(15) default NULL, 99 99 IP varchar(50) NOT NULL default '', 100 100 category varchar(150) default NULL, 101 101 file varchar(50) default NULL, 102 picture varchar(150) default NULL 102 picture varchar(150) default NULL, 103 PRIMARY KEY `date` (`date`) 103 104 ) TYPE=MyISAM; 104 105
Note: See TracChangeset
for help on using the changeset viewer.