From: <lor...@us...> - 2012-07-21 17:14:19
|
Revision: 9906 http://xoops.svn.sourceforge.net/xoops/?rev=9906&view=rev Author: lord_venom Date: 2012-07-21 17:14:11 +0000 (Sat, 21 Jul 2012) Log Message: ----------- news setlocal Modified Paths: -------------- XoopsModules/TDMStats/trunk/TDMStats/include/stats.php XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_stats.html Modified: XoopsModules/TDMStats/trunk/TDMStats/include/stats.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/include/stats.php 2012-07-21 11:44:24 UTC (rev 9905) +++ XoopsModules/TDMStats/trunk/TDMStats/include/stats.php 2012-07-21 17:14:11 UTC (rev 9906) @@ -26,7 +26,11 @@ redirect_header( XOOPS_URL , 1 , _AM_QUERYNOPERM); } -setlocale(LC_ALL, $xoopsModuleConfig['setlocal'], $xoopsModuleConfig['setlocal2']); +setlocale(LC_ALL, $xoopsModuleConfig['setlocal'], $xoopsModuleConfig['setlocal2']); +$thisday = date("d"); +$thismonth = date("m"); +$thisyear = date("Y"); +$thisnumday = date("w"); $xoopsTpl->assign('lang_by_weekday', _AM_BY_WEEKDAY); $xoopsTpl->assign('lang_by_week', _AM_BY_WEEK); @@ -101,13 +105,16 @@ if($week_info){ for($i=0; $i<sizeof($week_info); $i++){ - $week_day = $week[$week_info[$i]['day']]; + //$week_day = $week[$week_info[$i]['day']]; + $day = strftime("%A", mktime(0, 0, 0,1 ,$week_info[$i]['day'] , 1973)); - $xoopsTpl->append('item_weeks', array('id' => 'week_day'.$i, 'week_day' => $week_day, 'info' => $week_info[$i]['count'])); + $xoopsTpl->append('item_weeks', array('id' => 'week_day'.$i, 'week_day' => $day, 'info' => $week_info[$i]['count'])); } } + ///////////WEEK//////////// +echo $is_week = formatTimeStamp(time(), 'w'); $week= array(0 => _AM_WD_7, 1=> _AM_WD_1, 2 => _AM_WD_2, 3 => _AM_WD_3, 4 => _AM_WD_4, 5 => _AM_WD_5, 6 => _AM_WD_6); $week_day= array(); global $xoopsDB; @@ -124,14 +131,14 @@ $week_day_percent = 0; } - - $week_day['info'][] = $week_info[$i]['count']; + $day = strftime("%A", mktime(0, 0, 0,1 ,$week_info[$i]['day'] , 1973)); + //$week_day['info'][] = $week_info[$i]['count']; //$week_day['week_day'][] = $week_day[$i]['day']; - $week_day['percent'][] = round($week_day_percent, '2'); + //$week_day['percent'][] = round($week_day_percent, '2'); if ($week_day_percent > 0) { //$xoopsTpl->append('week_days', array('id' => 'week_day'.$i, 'week_day' => $week[$i], 'info' => $week_info[$i]['count'], 'percent' => round($week_day_percent, '2'))); - $xoopsTpl->append('week_days_map', array('id' => 'week_day'.$i, 'week_day' => $week[$i], 'info' => $week_info[$i]['count'], 'percent' => round($week_day_percent, '2'))); + $xoopsTpl->append('week_days_map', array('id' => 'week_day'.$i, 'week_day' => $day, 'info' => $week_info[$i]['count'], 'percent' => round($week_day_percent, '2'))); } } } @@ -177,14 +184,15 @@ } //echo "nous sommes le". strftime ("%A %d %B %Y et il est %Hh%M", 1207742661); - $week = strftime("%B %Y", mktime(0, 0, 0,$mth_info[$i]['mth'] ,01 ,$mth_info[$i]['year'])); - $mth['info'][] = $mth_info[$i]['count']; + //$week = strftime("%B %Y", mktime(0, 0, 0,$mth_info[$i]['mth'] ,01 ,$mth_info[$i]['year'])); + $mth = strftime("%B %Y", mktime(0, 0, 0,$mth_info[$i]['mth'] ,01 ,$mth_info[$i]['year'])); + //$mth['info'][] = $mth_info[$i]['count']; //$mth['week'][] = $mth_info[$i]['week']; - $mth['percent'][] = round($mth_percent, '2'); + //$mth['percent'][] = round($mth_percent, '2'); if ($mth_percent > 0) { $xoopsTpl->append('mths', array('id' => 'mth'.$i, 'mth' => $mth_info[$i]['mth'], 'year' => $mth_info[$i]['year'], 'info' => $mth_info[$i]['count'], 'percent' => round($mth_percent, '2'))); - $xoopsTpl->append('mths_map', array('id' => 'mth'.$i, 'mth' => $mth_info[$i]['mth'], 'year' => $mth_info[$i]['year'], 'info' => $mth_info[$i]['count'], 'percent' => round($mth_percent, '2'))); + $xoopsTpl->append('mths_map', array('id' => 'mth'.$i, 'mth' => $mth, 'year' => $mth_info[$i]['year'], 'info' => $mth_info[$i]['count'], 'percent' => round($mth_percent, '2'))); } } } Modified: XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_stats.html =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_stats.html 2012-07-21 11:44:24 UTC (rev 9905) +++ XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_stats.html 2012-07-21 17:14:11 UTC (rev 9906) @@ -64,7 +64,7 @@ <li style="width:47%;" class="even"><div><img src="<{$smarty.const.TDMSTATS_IMAGES_URL}>/module.png" title="<{$lang_forecast}>"><br/></div><div><h2><a href="javascript:;" onclick="javascript:masque('mth')"><{$smarty.const._AM_BY_MODULE}></h2></a> <div style="text-align:left"> <{foreach from=$item_modules item=item}> - <span id="tree_num"><{$item.module}> <{$item.info}> <{$smarty.const._AM_P_VISITS}></span><br /> + <span id="tree_num"><{$item.module}>, <{$item.info}> <{$smarty.const._AM_P_VISITS}></span><br /> <{/foreach}> </div></div> @@ -100,14 +100,18 @@ <h2><{$smarty.const._AM_BY_WEEKDAY}></h2> <table class="map" cellspacing="0" cellpadding="0"> <tr> - <th scope="col"><{$smarty.const._AM_BY_WEEKDAY}></th> - <th scope="col"><{$smarty.const._AM_DATE_VISITS}></th> + <th style="text-align:center;"><{$smarty.const._AM_BY_WEEKDAY}></th> + <th></th> + <th style="text-align:center;"><{$smarty.const._AM_DATE_VISITS}></th> + <th style="text-align:center;"><{$smarty.const._AM_DATE_PERCENT}></th> </tr> <{foreach item=week_days_map from=$week_days_map}> <tr> - <td width="20%" class="option"><div style="margin:5px;"><{$week_days_map.week_day}></div></td> - <td width="80%" class="value"><img src="./images/bar/<{$img_bar}>" title="<{$week_days_map.percent}>%" alt="<{$week_days_map.percent}>%" width="<{$week_days_map.percent}>%" height="16" /><{$week_days_map.info}></td> - </tr> + <td class="odd" width="20%" style="text-align:center; vertical-align:middle;"><div style="margin:5px;"><{$week_days_map.week_day}></div></td> + <td class="even value" width="60%" style="vertical-align:middle;"><img src="./images/bar/<{$img_bar}>" title="<{$week_days_map.percent}>%" alt="<{$week_days_map.percent}>%" width="<{$week_days_map.percent}>%" height="16" /></td> + <td class="odd" width="10%" style="text-align:center; vertical-align:middle;"><div style="margin:5px;"><{$week_days_map.info}></div></td> + <td class="even" width="10%" style="text-align:center; vertical-align:middle;"><div style="margin:5px;"><{$week_days_map.percent}>%</div></td> + </tr> <{/foreach}> </table> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |