From: <lor...@us...> - 2012-07-12 18:06:41
|
Revision: 9857 http://xoops.svn.sourceforge.net/xoops/?rev=9857&view=rev Author: lord_venom Date: 2012-07-12 18:06:34 +0000 (Thu, 12 Jul 2012) Log Message: ----------- news version. Modified Paths: -------------- XoopsModules/TDMStats/trunk/TDMStats/include/summary.php XoopsModules/TDMStats/trunk/TDMStats/index.php XoopsModules/TDMStats/trunk/TDMStats/language/english/modinfo.php XoopsModules/TDMStats/trunk/TDMStats/language/french/main.php XoopsModules/TDMStats/trunk/TDMStats/language/french/modinfo.php XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_index.html XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_summary.html XoopsModules/TDMStats/trunk/TDMStats/xoops_version.php Added Paths: ----------- XoopsModules/TDMStats/trunk/TDMStats/css/styles.css XoopsModules/TDMStats/trunk/TDMStats/images/calender.png XoopsModules/TDMStats/trunk/TDMStats/images/resume.png XoopsModules/TDMStats/trunk/TDMStats/images/tip.png Added: XoopsModules/TDMStats/trunk/TDMStats/css/styles.css =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/css/styles.css (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/css/styles.css 2012-07-12 18:06:34 UTC (rev 9857) @@ -0,0 +1,105 @@ +.ui-tabs .ui-tabs-nav li.ui-state-active { + cursor: text; + color: #666; + border-bottom: 1px solid #fff; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a { + + background: #fff; +} +.ui-tabs .ui-tabs-nav li a, +.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { + float:right; + cursor: pointer; + padding:10px; +} + + +.ui-tabs .ui-tabs-panel { + display: block; + border-top: none; + overflow: hidden; + clear: both; + background: #fff; + margin: 0; + padding: 10px 10px 0; + font-family: "Trebuchet MS"; + font-size: 14px; +} + +.ui-tabs .ui-tabs-hide { + display: none !important; +} + + ul#tree_menu { + margin: 0 auto; + padding:0 auto; + text-align: center; + width:100%; + + } + ul#tree_menu li { + list-style: none; + float:left; + width:97%; + height: 130px; + overflow:hidden; + margin: 10px; padding: 0px; + -webkit-border-radius: 4px; + border-radius: 4px; + border: 2px solid white; + /* background: whiteSmoke url(../images/decos/downloads-bg.gif) repeat-x left top; */ + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); + overflow: auto; + } + ul#tree_menu img { + float:left; + padding-left:20px; + padding-right:20px; + padding-top:10px; + width:80px; + height:80px; + } + + ul#tree_menu h2{ + left:0; + text-align:left; +padding-top:10px; +padding-bottom:5px; + } + + ul#tree_menu div{ + float:left; + + } + #tdmstats_text, ul#tree_menu #tree_text { + font-size: 13px; + font-weight: normal; +color: #728DA9; +text-shadow: 0 1px 0 white; +line-height: 20px; +} + + #tdmstats_num, #tdmstats_num a, ul#tree_menu #tree_num{ + text-align: center; + font-weight: normal; +font-size: 11px; +color: #25587C; +text-shadow: 0 1px 0 white; + + } + #tdmstats_num a{ + font-weight: bold; + } + + ul#tree_menu #tree_form{ + float:right; + padding-top:100px; + padding-right:20px; + text-align: center; +font-size: 11px; +color: #25587C; +font-weight: bold; +text-shadow: 0 1px 0 white; + + } \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/images/calender.png =================================================================== (Binary files differ) Property changes on: XoopsModules/TDMStats/trunk/TDMStats/images/calender.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/TDMStats/trunk/TDMStats/images/resume.png =================================================================== (Binary files differ) Property changes on: XoopsModules/TDMStats/trunk/TDMStats/images/resume.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: XoopsModules/TDMStats/trunk/TDMStats/images/tip.png =================================================================== (Binary files differ) Property changes on: XoopsModules/TDMStats/trunk/TDMStats/images/tip.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: XoopsModules/TDMStats/trunk/TDMStats/include/summary.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/include/summary.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/include/summary.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -131,14 +131,30 @@ } $xoopsTpl->assign('cur_percent', sprintf ("%.0f", $cur_percent)); $curvisits = $cur_visits[0]['daycount']; +//heure item + $hour_info = getResult("select * from ".$xoopsDB->prefix("TDMStats_today_hour")." order by count DESC LIMIT 3"); + //$total_hour = getResult("select SUM(count) AS sum from ".$xoopsDB->prefix("TDMStats_today_hour").""); + if($hour_info){ + for($i=0; $i<sizeof($hour_info); $i++){ + if($hour_info[$i]['count'] > 0) { + $hour['info'][] = $hour_info[$i]['count']; + $hour['hour'][] = $hour_info[$i]['hour']; + //$hour['percent'][] = round($hour_percent, '2'); + + $xoopsTpl->append('item_hours', array('id' => 'hour'.$i, 'hour' => $hour_info[$i]['hour'], 'info' => $hour_info[$i]['count'])); +} + } + + } + // $hour_info = getResult("select * from ".$xoopsDB->prefix("TDMStats_today_hour")." order by hour"); $total_hour = getResult("select SUM(count) AS sum from ".$xoopsDB->prefix("TDMStats_today_hour").""); - if($hour_info){ + if($hour_info){ for($i=0; $i<sizeof($hour_info); $i++){ if($total_hour[0]['sum'] > 0){ - $hour_percent = $hour_info[$i]['count'] * 100 / $total_hour[0]['sum'] ; + $hour_percent = $hour_info[$i]['count'] * 100 / $total_hour[0]['sum'] ; // 4*100/62,5 =6,4% }else{ $hour_percent = 0; @@ -151,8 +167,10 @@ if ($hour_percent > 0) { $xoopsTpl->append('hours', array('id' => 'hour'.$i, 'hour' => $hour_info[$i]['hour'], 'info' => $hour_info[$i]['count'], 'percent' => round($hour_percent, '2'))); $xoopsTpl->append('hours_map', array('id' => 'hour'.$i, 'hour' => $hour_info[$i]['hour'], 'info' => $hour_info[$i]['count'], 'percent' => round($hour_percent, '2'))); + } } + } Modified: XoopsModules/TDMStats/trunk/TDMStats/index.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/index.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/index.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -20,8 +20,10 @@ */ include_once "../../mainfile.php"; +require(XOOPS_ROOT_PATH.'/header.php'); + include_once('include/function.php'); -include_once('include/GphpChart.class.php'); +//include_once('include/GphpChart.class.php'); $gperm_handler =& xoops_gethandler('groupperm'); //permission if (is_object($xoopsUser)) { @@ -30,8 +32,13 @@ $groups = XOOPS_GROUP_ANONYMOUS; } +define("TDMSTATS_DIRNAME", $xoopsModule->getVar("dirname")); +define("TDMSTATS_URL", XOOPS_URL . '/modules/' . TDMSTATS_DIRNAME); +define("TDMSTATS_IMAGES_URL", TDMSTATS_URL . '/images'); -$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "list"; + +$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 1; + switch($action) { case "3": @@ -54,6 +61,7 @@ include_once XOOPS_ROOT_PATH."/header.php"; +// pour les permissions $perm_4 = ($gperm_handler->checkRight('istats_view', 4, $groups, $xoopsModule->getVar('mid'))) ? true : false ; $perm_8 = ($gperm_handler->checkRight('istats_view', 8, $groups, $xoopsModule->getVar('mid'))) ? true : false ; $perm_16 = ($gperm_handler->checkRight('istats_view', 16, $groups, $xoopsModule->getVar('mid'))) ? true : false ; @@ -81,7 +89,7 @@ //include script $xoTheme->addScript(XOOPS_URL."/modules/".$xoopsModule->dirname()."/js/jquery.js"); $xoTheme->addScript(XOOPS_URL."/modules/".$xoopsModule->dirname()."/js/jquery-ui-1.7.2.custom.min.js"); -$xoTheme->addStylesheet(XOOPS_URL."/modules/".$xoopsModule->dirname()."/css/".$tdmstats_style."/jquery-ui-1.7.2.custom.css"); -// +//$xoTheme->addStylesheet(XOOPS_URL."/modules/".$xoopsModule->dirname()."/css/".$tdmstats_style."/jquery-ui-1.7.2.custom.css"); +$xoTheme->addStylesheet( XOOPS_URL."/modules/".$xoopsModule->dirname()."/css/styles.css"); include_once XOOPS_ROOT_PATH."/footer.php"; ?> \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/language/english/modinfo.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/language/english/modinfo.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/language/english/modinfo.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -57,4 +57,8 @@ // define("_MI_ISTATS_MAXLABEL","View chart label:"); define("_MI_ISTATS_MAXTITLE","Show chart title:"); +// +define('_MI_ISTATS_SUMMARY', 'Sum'); +define('_MI_ISTATS_SYSTEM', 'System'); +define('_MI_ISTATS_TRAFFIC', 'Traffic stats'); ?> \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/language/french/main.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/language/french/main.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/language/french/main.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -98,9 +98,10 @@ define('_AM_WD_7', 'Dimanche'); // text of "Visits by pages" section -define('_AM_P_VISITS', 'Visite'); +define('_AM_P_VISITS', 'Visite(s)'); define('_AM_P_PERCENT', 'Pourcentage'); define('_AM_P_PAGE', 'Pages Totales'); +define('_AM_P_A', 'A'); // text of "Browser" section define('_AM_BRO_BRO', 'Navigateur'); @@ -122,7 +123,8 @@ define('AM_AVE', 'En moyenne'); define('AM_DAILY_VISIT', 'des visites ont lieu avant'); define('AM_BAS_NBR', 'Basé sur un nombre de'); -define('AM_SO_FAR', 'visiteurs pour le moment, votre site devrait atteindre'); +define('AM_SO_FAR', 'visiteurs pour le moment.'); +define('AM_SO_FARE', 'Votre site devrait atteindre'); define('AM_PAGE_VIEW', 'page(s) consultée(s).'); //perm Modified: XoopsModules/TDMStats/trunk/TDMStats/language/french/modinfo.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/language/french/modinfo.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/language/french/modinfo.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -58,4 +58,8 @@ define("_MI_ISTATS_MAXTITLE","Afficher le titre des fromages :"); //version 1.6 define("_MI_ISTATS_BAR","Style de la barre:"); +// +define('_MI_ISTATS_SUMMARY', 'Résumé'); +define('_MI_ISTATS_SYSTEM', 'Système'); +define('_MI_ISTATS_TRAFFIC', 'Stats du Trafic '); ?> Modified: XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_index.html =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_index.html 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_index.html 2012-07-12 18:06:34 UTC (rev 9857) @@ -64,23 +64,21 @@ } </script> <br /> -<div align="right"> -<select onchange="if(this.options[this.selectedIndex].value.length >0 ) { window.document.location=this.options[this.selectedIndex].value;}"> - <option value=""><{$lang_traffic_report}></option> - <option value="">--------</option> - <option value="index.php?action=1"><{$lang_summary}></option> - <option value="index.php?action=2"><{$lang_traffic}></option> - <option value="">--------</option> - <option value="index.php?action=3"><{$lang_visitor_info}></option> - <option value="">--------</option> - </select> -</div> <{if $show_index}> <br /> <h2><{$smarty.const._AM_TRAFFIC_REPORT}></h2> <hr> <br /> +<table cellpadding="0" id="masque_1" cellspacing="0" style="margin:5px;"><tr><td><ul id="tree_menu"> + +<li style="width:47%;" class="even"><div><img src="<{$smarty.const.TDMSTATS_IMAGES_URL}>/resum.png" title="<{$smarty.const._AM_SUMMARY}>"><br/></div><div><h2><a href ="index.php?action=1" title="<{$smarty.const._AM_SUMMARY}>"><{$smarty.const._AM_SUMMARY}></h2></a> +<div style="text-align:left"><span id="tree_num"><{$lang_total_visits}> <b><{$total}></b></span><br /> +<span id="tree_num"><{$lang_today}> <b><{$today}></b></span><br /> +<span id="tree_num"><{$lang_ave_day}> <b><{$ava_day}></b></span></div></div><div id="tree_form">go win</div></li> + +<br style="clear: both;" /></ul></td></tr></table><br /> + <div align="center"> <{if $perm_4}> <div style="float:left; text-align:center; width:30%; padding:10px;" class="outer"><a href="index.php?action=1"><img src="./images/resum.png" title="<{$smarty.const._AM_SUMMARY}>"></a><br /><a href="index.php?action=1"><{$smarty.const._AM_SUMMARY}></a></div> Modified: XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_summary.html =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_summary.html 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/templates/tdmstats_summary.html 2012-07-12 18:06:34 UTC (rev 9857) @@ -5,7 +5,30 @@ }); </script> +<table cellpadding="0" id="masque_1" cellspacing="0" style="margin:5px;"><tr><td><ul id="tree_menu"> + +<li style="width:47%;" class="even"><div><img src="<{$smarty.const.TDMSTATS_IMAGES_URL}>/resume.png" title="<{$smarty.const._AM_STATS_INFO}>"><br/></div><div><h2><a href ="'.$cat_link.'" title="<{$smarty.const._AM_STATS_INFO}>"><{$smarty.const._AM_STATS_INFO}></h2></a> +<div style="text-align:left"><span id="tree_num"><{$lang_total_visits}> <b><{$total}></b></span><br /> +<span id="tree_num"><{$lang_today}> <b><{$today}></b></span><br /> +<span id="tree_num"><{$lang_ave_day}> <b><{$ava_day}></b></span></div></div><div id="tree_form">go win</div></li> +<li style="width:47%;" class="even"><div><img src="<{$smarty.const.TDMSTATS_IMAGES_URL}>/tip.png" title="<{$lang_forecast}>"><br/></div><div><h2><a href ="'.$cat_link.'" title="<{$lang_forecast}>"><{$smarty.const._AM_FORECAST}></h2></a> +<div style="text-align:left"><span id="tree_num"><{$smarty.const.AM_AVE}> <b><{$cur_percent}>%</b> <{$smarty.const.AM_DAILY_VISIT}> <b><{$date_daily}></b>. +<br /><{$smarty.const.AM_BAS_NBR}> <b><{$daycount}></b> <{$smarty.const.AM_SO_FAR}> +<br/><{$smarty.const.AM_SO_FARE}> <b><{$today_hits}></b> <{$smarty.const.AM_PAGE_VIEW}> +</span></div></div></li> + +<li style="width:47%;" class="even"><div><img src="<{$smarty.const.TDMSTATS_IMAGES_URL}>/calender.png" title="<{$lang_forecast}>"><br/></div><div><h2><a href ="'.$cat_link.'" title="<{$lang_forecast}>"><{$smarty.const._AM_TODAY}></h2></a> +<div style="text-align:left"> + <{foreach from=$item_hours item=item}> + <span id="tree_num"><{$smarty.const._AM_P_A}> <{$item.hour}>h, <{$item.info}> <{$smarty.const._AM_P_VISITS}></span><br /> + <{/foreach}> + +</div></div><div id="tree_form">go win</div></li> + +<br style="clear: both;" /></ul></td></tr></table><br /> + + <div id="tabs"> <ul> <li style="list-style-type: none;"><a href="#stats"><{$smarty.const._AM_STATS_INFO}></a></li> @@ -13,7 +36,7 @@ <li style="list-style-type: none;"><a href="#hour"><{$smarty.const._AM_BY_TODAY_HOUR}></a></li> <li style="list-style-type: none;"><a href="#ref"><{$smarty.const._AM_BY_REF}></a></li> <li style="list-style-type: none;"><a href="#pays"><{$smarty.const._AM_BY_PAYS}></a></li> - </ul> + </ul><br style="clear: both;" /> <div id="stats"> Modified: XoopsModules/TDMStats/trunk/TDMStats/xoops_version.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/xoops_version.php 2012-07-12 14:50:26 UTC (rev 9856) +++ XoopsModules/TDMStats/trunk/TDMStats/xoops_version.php 2012-07-12 18:06:34 UTC (rev 9857) @@ -108,6 +108,12 @@ // Menu $modversion['hasMain'] = 1; +$modversion['sub'][1]['name'] = _MI_ISTATS_SUMMARY; +$modversion['sub'][1]['url'] = "index.php?action=1"; +$modversion['sub'][2]['name'] = _MI_ISTATS_SYSTEM; +$modversion['sub'][2]['url'] = "index.php?action=2"; +$modversion['sub'][3]['name'] = _MI_ISTATS_TRAFFIC; +$modversion['sub'][3]['url'] = "index.php?action=3"; // Search $modversion['hasSearch'] = 0; @@ -164,14 +170,14 @@ //$modversion['config'][5]['options'] = array('cupertino' => 'cupertino', 'lightness' => 'lightness', 'darkness' => 'darkness', 'smoothness' => 'smoothness', 'start' => 'start', 'redmond' => 'redmond', 'sunny' => 'sunny', 'pepper' => 'pepper', 'eggplant' => 'eggplant' , // 'dark-hive' => 'dark-hive', 'excite' => 'excite', 'vader' => 'vader', 'trontastic' => 'trontastic' ); // -//include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; -//$modversion["config"][6]["name"] = "tdmstats_bar"; -//$modversion["config"][6]["title"] = "_MI_ISTATS_BAR"; -//$modversion["config"][6]["description"] = ""; -//$modversion["config"][6]["formtype"] = "select"; -//$modversion["config"][6]["valuetype"] = "text"; -//$modversion["config"][6]["default"] = "bar0.png"; -//$modversion["config"][6]["options"] = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . "/modules/".basename( dirname( __FILE__ ) )."/images/bar"); -//$modversion["config"][6]["category"] = "global"; +include_once XOOPS_ROOT_PATH . "/class/xoopslists.php"; +$modversion["config"][6]["name"] = "tdmstats_bar"; +$modversion["config"][6]["title"] = "_MI_ISTATS_BAR"; +$modversion["config"][6]["description"] = ""; +$modversion["config"][6]["formtype"] = "select"; +$modversion["config"][6]["valuetype"] = "text"; +$modversion["config"][6]["default"] = "bar0.png"; +$modversion["config"][6]["options"] = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . "/modules/".basename( dirname( __FILE__ ) )."/images/bar"); +$modversion["config"][6]["category"] = "global"; ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |