From: <be...@us...> - 2012-05-13 09:13:33
|
Revision: 9501 http://xoops.svn.sourceforge.net/xoops/?rev=9501&view=rev Author: beckmi Date: 2012-05-13 09:13:24 +0000 (Sun, 13 May 2012) Log Message: ----------- Converting to XOOPS 2.5.x Admin GUI Modified Paths: -------------- XoopsModules/TDMStats/trunk/TDMStats/admin/about.php XoopsModules/TDMStats/trunk/TDMStats/admin/index.php XoopsModules/TDMStats/trunk/TDMStats/admin/menu.php XoopsModules/TDMStats/trunk/TDMStats/admin/permissions.php XoopsModules/TDMStats/trunk/TDMStats/admin/plug.php XoopsModules/TDMStats/trunk/TDMStats/include/function.php XoopsModules/TDMStats/trunk/TDMStats/language/english/admin.php XoopsModules/TDMStats/trunk/TDMStats/language/english/modinfo.php XoopsModules/TDMStats/trunk/TDMStats/xoops_version.php Added Paths: ----------- XoopsModules/TDMStats/trunk/TDMStats/admin/admin_footer.php XoopsModules/TDMStats/trunk/TDMStats/admin/admin_header.php XoopsModules/TDMStats/trunk/TDMStats/admin/main.php XoopsModules/TDMStats/trunk/TDMStats/docs/ XoopsModules/TDMStats/trunk/TDMStats/docs/changelog.txt XoopsModules/TDMStats/trunk/TDMStats/docs/credits.txt XoopsModules/TDMStats/trunk/TDMStats/docs/index.html XoopsModules/TDMStats/trunk/TDMStats/docs/install.txt XoopsModules/TDMStats/trunk/TDMStats/docs/lang_diff.txt XoopsModules/TDMStats/trunk/TDMStats/docs/licence.txt XoopsModules/TDMStats/trunk/TDMStats/docs/readme.txt XoopsModules/TDMStats/trunk/TDMStats/docs/readme_fr.txt XoopsModules/TDMStats/trunk/TDMStats/language/english/help/ XoopsModules/TDMStats/trunk/TDMStats/language/english/help/help.html XoopsModules/TDMStats/trunk/TDMStats/language/english/help/index.html Removed Paths: ------------- XoopsModules/TDMStats/trunk/TDMStats/changelog.txt XoopsModules/TDMStats/trunk/TDMStats/license_gpl.txt XoopsModules/TDMStats/trunk/TDMStats/readme_fr.txt Modified: XoopsModules/TDMStats/trunk/TDMStats/admin/about.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/about.php 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/about.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -1,100 +1,29 @@ -<?php -/** - * **************************************************************************** - * - TDMStats By TDM - TEAM DEV MODULE FOR XOOPS - * - GNU Licence Copyright (c) (http://www.) - * - * La licence GNU GPL, garanti \xE0 l'utilisateur les droits suivants - * - * 1. La libert\xE9 d'ex\xE9cuter le logiciel, pour n'importe quel usage, - * 2. La libert\xE9 de l' \xE9tudier et de l'adapter \xE0 ses besoins, - * 3. La libert\xE9 de redistribuer des copies, - * 4. La libert\xE9 d'am\xE9liorer et de rendre publiques les modifications afin - * que l'ensemble de la communaut\xE9 en b\xE9n\xE9ficie. - * - * @copyright (http://www.tdmxoops.net) - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author TDM ; TEAM DEV MODULE - * - * **************************************************************************** - */ - -include '../../../include/cp_header.php'; -include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); -include_once(XOOPS_ROOT_PATH."/class/tree.php"); -include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; -include_once("../include/function.php"); - -xoops_cp_header(); -if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php")) { -Adminmenu(2, _AM_ISTATS_ABOUT); -} else { -include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php'; -loadModuleAdminMenu (2, _AM_ISTATS_ABOUT); -} - -//menu -echo '<div class="CPbigTitle" style="background-image: url(../images/decos/about.png); background-repeat: no-repeat; background-position: left; padding-left: 60px; padding-top:20px; padding-bottom:15px;"> -<h3><strong>'._AM_ISTATS_ABOUT.'</strong></h3>'; -echo '</div><br />'; - -$versioninfo =& $module_handler->get( $xoopsModule->getVar( 'mid' ) ); -echo " - <style type=\"text/css\"> - label,text { - display: block; - float: left; - margin-bottom: 2px; - } - label { - text-align: right; - width: 150px; - padding-right: 20px; - } - br { - clear: left; - } - </style> -"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . $xoopsModule->getVar("name"). "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<img src='" . XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname") . "/" . $versioninfo->getInfo( 'image' ) . "' alt='' hspace='10' vspace='0' /></a>\n"; -echo "<div style='padding: 5px;'><strong>" . $versioninfo->getInfo( 'name' ) . " version " . $versioninfo->getInfo( 'version' ) . "</strong></div>\n"; -echo "<label>" ._AM_ABOUT_RELEASEDATE. ":</label><text>" . $versioninfo->getInfo( 'release' ) . "</text><br />"; -echo "<label>" ._AM_ABOUT_AUTHOR. ":</label><text>" . $versioninfo->getInfo( 'author' ) . "</text><br />"; -echo "<label>" ._AM_ABOUT_CREDITS. ":</label><text>" . $versioninfo->getInfo( 'credits' ) . "</text><br />"; -echo "<label>" ._AM_ABOUT_LICENSE. ":</label><text><a href=\"".$versioninfo->getInfo( 'license_file' )."\" target=\"_blank\" >" . $versioninfo->getInfo( 'license' ) . "</a></text>\n"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" ._AM_ABOUT_MODULE_INFO. "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" ._AM_ABOUT_MODULE_STATUS. ":</label><text>" . $versioninfo->getInfo( 'module_status' ) . "</text><br />"; -echo "<label>" ._AM_ABOUT_WEBSITE. ":</label><text>" . "<a href='" . $versioninfo->getInfo( 'module_website_url' ) . "' target='_blank'>" . $versioninfo->getInfo( 'module_website_name' ) . "</a>" . "</text><br />"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - -echo "<fieldset><legend style='font-weight: bold; color: #900;'>" ._AM_ABOUT_AUTHOR_INFO. "</legend>"; -echo "<div style='padding: 8px;'>"; -echo "<label>" ._AM_ABOUT_AUTHOR_NAME. ":</label><text>" . $versioninfo->getInfo( 'author' ) . "</text><br />"; -echo "<label>" ._AM_ABOUT_WEBSITE. ":</label><text>" . "<a href='" . $versioninfo->getInfo( 'author_website_url' ) . "' target='_blank'>" . $versioninfo->getInfo( 'author_website_name' ) . "</a>" . "</text><br />"; -echo "</div>"; -echo "</fieldset>"; -echo "<br clear=\"all\" />"; - - -$file = XOOPS_ROOT_PATH. "/modules/TDMStats/changelog.txt"; -if ( is_readable( $file ) ){ - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" ._AM_ABOUT_CHANGELOG. "</legend>"; - echo "<div style='padding: 8px;'>"; - echo "<div>". implode("<br />", file( $file )) . "</div>"; - echo "</div>"; - echo "</fieldset>"; - echo "<br clear=\"all\" />"; -} - -xoops_cp_footer(); -?> \ No newline at end of file +<?php +/** + * Mastop Go2 module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package MastopGo2 + * @since 2.5.0 + * @author Mage, Mamba + * @version $Id $ + **/ + +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', FALSE); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/admin/admin_footer.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/admin_footer.php (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/admin_footer.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,6 @@ +<?php +echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" + . " <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>"; + +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/admin/admin_header.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/admin_header.php (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/admin_header.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,25 @@ +<?php + +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_TDMSTATS_MODULEADMIN_MISSING, false); + } \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/admin/index.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/index.php 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/index.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -1,282 +1,10 @@ -<?php -/** - * **************************************************************************** - * - TDMStats By TDM - TEAM DEV MODULE FOR XOOPS - * - GNU Licence Copyright (c) (http://www.) - * - * La licence GNU GPL, garanti \xE0 l'utilisateur les droits suivants - * - * 1. La libert\xE9 d'ex\xE9cuter le logiciel, pour n'importe quel usage, - * 2. La libert\xE9 de l' \xE9tudier et de l'adapter \xE0 ses besoins, - * 3. La libert\xE9 de redistribuer des copies, - * 4. La libert\xE9 d'am\xE9liorer et de rendre publiques les modifications afin - * que l'ensemble de la communaut\xE9 en b\xE9n\xE9ficie. - * - * @copyright (http://www.tdmxoops.net) - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author TDM ; TEAM DEV MODULE - * - * **************************************************************************** - */ - -include '../../../include/cp_header.php'; -include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); -include_once(XOOPS_ROOT_PATH."/class/tree.php"); -include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - -xoops_cp_header(); -//apelle du menu admin -if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php")) { -Adminmenu(0, _AM_ISTATS_INDEXDESC); -} else { -include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php'; -loadModuleAdminMenu (0, _AM_ISTATS_INDEXDESC); -} - - -//TDMStats_count -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_count")."'"; -$result1=$xoopsDB->queryF($sq1); -$count=$xoopsDB->fetchArray($result1); -//TDMStats_daycount -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_daycount")."'"; -$result1=$xoopsDB->queryF($sq1); -$daycount=$xoopsDB->fetchArray($result1); -//TDMStats_referer -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_referer")."'"; -$result1=$xoopsDB->queryF($sq1); -$referer=$xoopsDB->fetchArray($result1); -//TDMStats_hour -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_hour")."'"; -$result1=$xoopsDB->queryF($sq1); -$hour=$xoopsDB->fetchArray($result1); -//TDMStats_today_hour -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_today_hour")."'"; -$result1=$xoopsDB->queryF($sq1); -$today_hour=$xoopsDB->fetchArray($result1); -//TDMStats_browser -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_browser")."'"; -$result1=$xoopsDB->queryF($sq1); -$browser=$xoopsDB->fetchArray($result1); -//TDMStats_os -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_os")."'"; -$result1=$xoopsDB->queryF($sq1); -$os=$xoopsDB->fetchArray($result1); -//TDMStats_hostname -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_hostname")."'"; -$result1=$xoopsDB->queryF($sq1); -$hostname=$xoopsDB->fetchArray($result1); -//TDMStats_week -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_week")."'"; -$result1=$xoopsDB->queryF($sq1); -$week=$xoopsDB->fetchArray($result1); -//TDMStats_week_count -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_week_count")."'"; -$result1=$xoopsDB->queryF($sq1); -$week_count=$xoopsDB->fetchArray($result1); -//TDMStats_mth -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_mth")."'"; -$result1=$xoopsDB->queryF($sq1); -$mth=$xoopsDB->fetchArray($result1); -//TDMStats_mth_days -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_mth_days")."'"; -$result1=$xoopsDB->queryF($sq1); -$mth_days=$xoopsDB->fetchArray($result1); -//TDMStats_screen -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_screen")."'"; -$result1=$xoopsDB->queryF($sq1); -$screen=$xoopsDB->fetchArray($result1); -//TDMStats_color -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_color")."'"; -$result1=$xoopsDB->queryF($sq1); -$color=$xoopsDB->fetchArray($result1); -//TDMStats_page -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_page")."'"; -$result1=$xoopsDB->queryF($sq1); -$page=$xoopsDB->fetchArray($result1); -//TDMStats_modules -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_modules")."'"; -$result1=$xoopsDB->queryF($sq1); -$modules=$xoopsDB->fetchArray($result1); -//TDMStats_pays -$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_pays")."'"; -$result1=$xoopsDB->queryF($sq1); -$pays=$xoopsDB->fetchArray($result1); -//////////////// - -include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/class/menu.php'; -include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/function.php'; - -//// - if (isset($_REQUEST['table']) && $_REQUEST['op'] == 'optimise') - { - $sq1 = "OPTIMIZE TABLE ".$xoopsDB->prefix("".$_REQUEST['table'].""); - $result1 = $xoopsDB->queryF($sq1); - if($result1){ - redirect_header( 'index.php', 1, _AM_ISTATS_BASE); - }else{ - redirect_header( 'index.php', 1, _AM_ISTATS_BASEERROR); - } -} -// - - - //showIndex(); - $menu = new Menu(); - $menu->addItem('plug', 'plug.php', '../images/decos/plug.png', _AM_ISTATS_PLUG); - $menu->addItem('about', 'about.php', '../images/decos/about.png', _AM_ISTATS_ABOUT); - $menu->addItem('update', '../../system/admin.php?fct=modulesadmin&op=update&module='.$xoopsModule ->getVar('dirname') - , '../images/decos/update.png', _AM_ISTATS_UPDATE); - $menu->addItem('permissions', 'permissions.php', '../images/decos/permissions.png', _AM_ISTATS_NAVPERMISSIONS); - $menu->addItem('Preference', '../../system/admin.php?fct=preferences&op=showmod&mod='.$xoopsModule ->getVar('mid'). - '&&confcat_id=1', '../images/decos/pref.png', _AM_ISTATS_NAVPREFERENCES); - - echo $menu->getCSS(); - -echo '<div class="CPbigTitle" style="background-image: url(../images/decos/index.png); background-repeat: no-repeat; background-position: left; padding-left: 60px; padding-top:20px; padding-bottom:15px;"> - <h3><strong>'._AM_ISTATS_INDEXDESC.'</strong></h3> - </div><br /><table width="100%" border="0" cellspacing="10" cellpadding="4"> - <tr> - <td valign="top"> - '.$menu->render().'</td> - <td valign="top" width="60%"> - <fieldset><legend class="CPmediumTitle">'.$count['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($count['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_count">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($count['Data_length'] + $count['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$daycount['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($daycount['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_daycount">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($daycount['Data_length'] + $daycount['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$referer['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($referer['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_referer">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($referer['Data_length'] + $referer['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$hour['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($hour['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_hour">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($hour['Data_length'] + $hour['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$today_hour['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($today_hour['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_today_hour">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($today_hour['Data_length'] + $today_hour['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$browser['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($browser['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_browser">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($browser['Data_length'] + $browser['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$os['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($os['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_os">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($os['Data_length'] + $os['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$hostname['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($hostname['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_hostname">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($hostname['Data_length'] + $hostname['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$week['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($week['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_week">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($week['Data_length'] + $week['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$week_count['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($week_count['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_week_count">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($week_count['Data_length'] + $week_count['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$mth['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($mth['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_mth">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($mth['Data_length'] + $mth['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$mth_days['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($mth_days['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_mth_days">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($mth_days['Data_length'] + $mth_days['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$screen['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($screen['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_screen">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($screen['Data_length'] + $screen['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$color['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($color['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_color">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($color['Data_length'] + $color['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$page['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($page['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_page">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($page['Data_length'] + $page['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$modules['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($modules['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_modules">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($modules['Data_length'] + $modules['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /> - - <fieldset><legend class="CPmediumTitle">'.$pays['Name'].'</legend> - <br/>'; - echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($pays['Data_free']).' <a href="index.php?op=optimise&table=TDMStats_pays">'._AM_ISTATS_OPT.'</a></b>'; - echo '<br/><br/>'; - echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($pays['Data_length'] + $pays['Index_length']) . '</b>'; - echo '<br /><br /> - </fieldset><br /><br />'; - - - echo '</td></tr></table>'; -xoops_cp_footer(); -?> \ No newline at end of file +<?php + +include_once 'admin_header.php'; +xoops_cp_header(); + +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/admin/main.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/main.php (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/main.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,266 @@ +<?php +/** + * **************************************************************************** + * - TDMStats By TDM - TEAM DEV MODULE FOR XOOPS + * - GNU Licence Copyright (c) (http://www.) + * + * La licence GNU GPL, garanti \xE0 l'utilisateur les droits suivants + * + * 1. La libert\xE9 d'ex\xE9cuter le logiciel, pour n'importe quel usage, + * 2. La libert\xE9 de l' \xE9tudier et de l'adapter \xE0 ses besoins, + * 3. La libert\xE9 de redistribuer des copies, + * 4. La libert\xE9 d'am\xE9liorer et de rendre publiques les modifications afin + * que l'ensemble de la communaut\xE9 en b\xE9n\xE9ficie. + * + * @copyright (http://www.tdmxoops.net) + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author TDM ; TEAM DEV MODULE + * + * **************************************************************************** + */ + +include '../../../include/cp_header.php'; +include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); +include_once(XOOPS_ROOT_PATH."/class/tree.php"); +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; + +xoops_cp_header(); +include_once 'admin_header.php'; + +//apelle du menu admin + +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('main.php'); +//echo $indexAdmin->renderIndex(); + + +//TDMStats_count +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_count")."'"; +$result1=$xoopsDB->queryF($sq1); +$count=$xoopsDB->fetchArray($result1); +//TDMStats_daycount +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_daycount")."'"; +$result1=$xoopsDB->queryF($sq1); +$daycount=$xoopsDB->fetchArray($result1); +//TDMStats_referer +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_referer")."'"; +$result1=$xoopsDB->queryF($sq1); +$referer=$xoopsDB->fetchArray($result1); +//TDMStats_hour +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_hour")."'"; +$result1=$xoopsDB->queryF($sq1); +$hour=$xoopsDB->fetchArray($result1); +//TDMStats_today_hour +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_today_hour")."'"; +$result1=$xoopsDB->queryF($sq1); +$today_hour=$xoopsDB->fetchArray($result1); +//TDMStats_browser +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_browser")."'"; +$result1=$xoopsDB->queryF($sq1); +$browser=$xoopsDB->fetchArray($result1); +//TDMStats_os +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_os")."'"; +$result1=$xoopsDB->queryF($sq1); +$os=$xoopsDB->fetchArray($result1); +//TDMStats_hostname +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_hostname")."'"; +$result1=$xoopsDB->queryF($sq1); +$hostname=$xoopsDB->fetchArray($result1); +//TDMStats_week +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_week")."'"; +$result1=$xoopsDB->queryF($sq1); +$week=$xoopsDB->fetchArray($result1); +//TDMStats_week_count +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_week_count")."'"; +$result1=$xoopsDB->queryF($sq1); +$week_count=$xoopsDB->fetchArray($result1); +//TDMStats_mth +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_mth")."'"; +$result1=$xoopsDB->queryF($sq1); +$mth=$xoopsDB->fetchArray($result1); +//TDMStats_mth_days +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_mth_days")."'"; +$result1=$xoopsDB->queryF($sq1); +$mth_days=$xoopsDB->fetchArray($result1); +//TDMStats_screen +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_screen")."'"; +$result1=$xoopsDB->queryF($sq1); +$screen=$xoopsDB->fetchArray($result1); +//TDMStats_color +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_color")."'"; +$result1=$xoopsDB->queryF($sq1); +$color=$xoopsDB->fetchArray($result1); +//TDMStats_page +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_page")."'"; +$result1=$xoopsDB->queryF($sq1); +$page=$xoopsDB->fetchArray($result1); +//TDMStats_modules +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_modules")."'"; +$result1=$xoopsDB->queryF($sq1); +$modules=$xoopsDB->fetchArray($result1); +//TDMStats_pays +$sq1 = "SHOW TABLE STATUS FROM `".XOOPS_DB_NAME."` LIKE '".$xoopsDB->prefix("TDMStats_pays")."'"; +$result1=$xoopsDB->queryF($sq1); +$pays=$xoopsDB->fetchArray($result1); +//////////////// + +include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/class/menu.php'; +include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->dirname().'/include/function.php'; + +//// + if (isset($_REQUEST['table']) && $_REQUEST['op'] == 'optimise') + { + $sq1 = "OPTIMIZE TABLE ".$xoopsDB->prefix("".$_REQUEST['table'].""); + $result1 = $xoopsDB->queryF($sq1); + if($result1){ + redirect_header( 'main.php', 1, _AM_ISTATS_BASE); + }else{ + redirect_header( 'index.php', 1, _AM_ISTATS_BASEERROR); + } +} + + +echo ' + <tr> + <td valign="top"> + </td> + <td valign="top" width="60%"> + <fieldset><legend class="CPmediumTitle">'.$count['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($count['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_count">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($count['Data_length'] + $count['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$daycount['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($daycount['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_daycount">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($daycount['Data_length'] + $daycount['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$referer['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($referer['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_referer">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($referer['Data_length'] + $referer['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$hour['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($hour['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_hour">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($hour['Data_length'] + $hour['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$today_hour['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($today_hour['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_today_hour">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($today_hour['Data_length'] + $today_hour['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$browser['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($browser['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_browser">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($browser['Data_length'] + $browser['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$os['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($os['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_os">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($os['Data_length'] + $os['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$hostname['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($hostname['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_hostname">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($hostname['Data_length'] + $hostname['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$week['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($week['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_week">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($week['Data_length'] + $week['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$week_count['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($week_count['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_week_count">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($week_count['Data_length'] + $week_count['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$mth['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($mth['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_mth">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($mth['Data_length'] + $mth['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$mth_days['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($mth_days['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_mth_days">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($mth_days['Data_length'] + $mth_days['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$screen['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($screen['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_screen">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($screen['Data_length'] + $screen['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$color['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($color['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_color">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($color['Data_length'] + $color['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$page['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($page['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_page">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($page['Data_length'] + $page['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$modules['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($modules['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_modules">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($modules['Data_length'] + $modules['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /> + + <fieldset><legend class="CPmediumTitle">'.$pays['Name'].'</legend> + <br/>'; + echo _AM_ISTATS_FREE.':<b> ' . istats_PrettySize($pays['Data_free']).' <a href="main.php?op=optimise&table=TDMStats_pays">'._AM_ISTATS_OPT.'</a></b>'; + echo '<br/><br/>'; + echo _AM_ISTATS_TOTAL.':<b> ' . istats_PrettySize($pays['Data_length'] + $pays['Index_length']) . '</b>'; + echo '<br /><br /> + </fieldset><br /><br />'; + + + echo '</td></tr></table>'; +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/admin/menu.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/menu.php 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/menu.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -18,14 +18,51 @@ * * **************************************************************************** */ - -$adminmenu[0]['title'] = _MI_ISTATS_INDEX; -$adminmenu[0]['link'] = "admin/index.php"; -$adminmenu[1]['title'] = _MI_ISTATS_PLUG; -$adminmenu[1]['link'] = "admin/plug.php"; -$adminmenu[2]['title'] = _MI_ISTATS_ABOUT; -$adminmenu[2]['link'] = "admin/about.php"; -$adminmenu[3]['title'] = _MI_ISTATS_PERMISSIONS; -$adminmenu[3]['link'] = "admin/permissions.php"; -?> + + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; + +$dirname = basename(dirname(dirname(__FILE__))); +$module_handler = xoops_gethandler('module'); +$module = $module_handler->getByDirname($dirname); +$pathIcon32 = $module->getInfo('icons32'); +$pathModuleAdmin = $module->getInfo('dirmoduleadmin'); +$pathLanguage = $path . $pathModuleAdmin; + + +if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { + $fileinc = $pathLanguage . '/language/english/main.php'; +} + +include_once $fileinc; + +$adminmenu = array(); + +$i = 1; +$adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME; +$adminmenu[$i]["link"] = "admin/index.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; + +$i++; +$adminmenu[$i]["title"] = _MI_ISTATS_INDEX; +$adminmenu[$i]["link"] = "admin/main.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/manage.png'; + +$i++; +$adminmenu[$i]["title"] = _MI_ISTATS_PLUG; +$adminmenu[$i]["link"] = "admin/plug.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/addlink.png'; + +$i++; +$adminmenu[$i]["title"] = _MI_ISTATS_PERMISSIONS; +$adminmenu[$i]["link"] = "admin/permissions.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/permissions.png'; + +$i++; +$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/admin/permissions.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/permissions.php 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/permissions.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -34,20 +34,14 @@ if( ! empty( $_POST['submit'] ) ) { redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/permissions.php" , 1 , _AM_XD_GPERMUPDATED); } - xoops_cp_header(); -if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php")) { -Adminmenu(3, _AM_ISTATS_PERM); -} else { -include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php'; -loadModuleAdminMenu (3, _AM_ISTATS_PERM); -} +include_once 'admin_header.php'; -//menu -echo '<div class="CPbigTitle" style="background-image: url(../images/decos/permissions.png); background-repeat: no-repeat; background-position: left; padding-left: 60px; padding-top:20px; padding-bottom:15px;"> -<h3><strong>'._AM_ISTATS_PERM.'</strong></h3>'; -echo '</div><br />'; +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('permissions.php'); + + $module_id = $xoopsModule->getVar('mid'); @@ -69,6 +63,4 @@ echo $permform->render(); -xoops_cp_footer() ; - -?> \ No newline at end of file +include_once 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/TDMStats/trunk/TDMStats/admin/plug.php =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/admin/plug.php 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/admin/plug.php 2012-05-13 09:13:24 UTC (rev 9501) @@ -26,24 +26,15 @@ include_once("../include/function.php"); xoops_cp_header(); - -//apelle du menu admin -if ( !is_readable(XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php")) { -Adminmenu(1, _AM_ISTATS_PLUG); -} else { -include_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.admin.php'; -loadModuleAdminMenu (1, _AM_ISTATS_PLUG); -} +include_once 'admin_header.php'; +$indexAdmin = new ModuleAdmin(); +echo $indexAdmin->addNavigation('plug.php'); + $myts =& MyTextSanitizer::getInstance(); $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list'; -//menu -echo '<div class="CPbigTitle" style="background-image: url(../images/decos/plug.png); background-repeat: no-repeat; background-position: left; padding-left: 60px; padding-top:20px; padding-bottom:15px;"> -<h3><strong>'._AM_ISTATS_PLUG.'</strong></h3>'; -echo '</div><br />'; - switch($op) { //sauv @@ -79,5 +70,4 @@ break; } -xoops_cp_footer(); -?> \ No newline at end of file +include_once 'admin_footer.php'; \ No newline at end of file Deleted: XoopsModules/TDMStats/trunk/TDMStats/changelog.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/changelog.txt 2012-05-13 08:50:29 UTC (rev 9500) +++ XoopsModules/TDMStats/trunk/TDMStats/changelog.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -1,69 +0,0 @@ -************************************************************ -TDM : TDMStats -Version 1.06 | 27-01-2010 -Dev: 2.2.4 -************************************************************ -- Correction des fichiers admin refonte du design et option. -- Correction d'un bug avec la taille de base de donn\xE9e. -- Modifier tous les fichiers pour inclure les nouveaux graphique. -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.05 | 17-12-2009 -Dev: 2.2.3 -************************************************************ -- correction des fichiers de langue FR en utf8 -- correction d'un bug avec l'hrs du serveur -- le module ne marchait pas sur les serveur linux (probl\xE8me majuscule) -- supression bug avec les blocs. -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.04 | 15-12-2009 -Dev: 2.2.3 -************************************************************ -- supression bug avec les blocs (les blocs ne marchait pas) -- ajout du bloc compteur -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.03 | 05-10-2009 -Dev: 2.2.3 -************************************************************ -- modifi\xE9 summary.php vs summary.html modification du system pays. -- modifi\xE9 summary.html r\xE9organisation du template. -- modifi\xE9 summary.php vs stats.php limitation du texte. -- modifi\xE9 xoops_version.php vs index.php ajout de choix du theme. -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.02 | 25-09-2009 -Dev: 2.2.3 -************************************************************ -- modifi\xE9 sql/mysql.sql pour bug. -- modifi\xE9 sql/mysql1.1.sql pour bug. -- ajout du fichier readme_fr.txt -- ajout du fichier license_gpl.txt -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.01 | 21-07-2009 -Dev: 2.2.3 -************************************************************ -- ajoute firefox et 1920 about.php. -- modifi\xE9 counter.php pour linux. -- modifi\xE9 counter.php pour le pays. -************************************************************ -************************************************************ -TDM : TDMStats -Version 1.00 | 21-07-2009 -Dev: 2.2.3 -************************************************************ -- ajoute changelog et modifie about.php. -- modifi\xE9 function.xoStats.php pour la fonction page. -- modifi\xE9 counter.php pour le pays. -- modifi\xE9 mysql.sql bug windows vista. - -************************************************************ - - Added: XoopsModules/TDMStats/trunk/TDMStats/docs/changelog.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/changelog.txt (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/changelog.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,76 @@ +************************************************************ +TDM : TDMStats +Version 1.07 | 12-05-2012 +Dev: 2.2.4 +************************************************************ +- conversion to XOOPS 2.5.x Admin GUI +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.06 | 27-01-2010 +Dev: 2.2.4 +************************************************************ +- Correction des fichiers admin refonte du design et option. +- Correction d'un bug avec la taille de base de donn\xE9e. +- Modifier tous les fichiers pour inclure les nouveaux graphique. +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.05 | 17-12-2009 +Dev: 2.2.3 +************************************************************ +- correction des fichiers de langue FR en utf8 +- correction d'un bug avec l'hrs du serveur +- le module ne marchait pas sur les serveur linux (probl\xE8me majuscule) +- supression bug avec les blocs. +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.04 | 15-12-2009 +Dev: 2.2.3 +************************************************************ +- supression bug avec les blocs (les blocs ne marchait pas) +- ajout du bloc compteur +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.03 | 05-10-2009 +Dev: 2.2.3 +************************************************************ +- modifi\xE9 summary.php vs summary.html modification du system pays. +- modifi\xE9 summary.html r\xE9organisation du template. +- modifi\xE9 summary.php vs stats.php limitation du texte. +- modifi\xE9 xoops_version.php vs index.php ajout de choix du theme. +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.02 | 25-09-2009 +Dev: 2.2.3 +************************************************************ +- modifi\xE9 sql/mysql.sql pour bug. +- modifi\xE9 sql/mysql1.1.sql pour bug. +- ajout du fichier readme_fr.txt +- ajout du fichier license_gpl.txt +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.01 | 21-07-2009 +Dev: 2.2.3 +************************************************************ +- ajoute firefox et 1920 about.php. +- modifi\xE9 counter.php pour linux. +- modifi\xE9 counter.php pour le pays. +************************************************************ +************************************************************ +TDM : TDMStats +Version 1.00 | 21-07-2009 +Dev: 2.2.3 +************************************************************ +- ajoute changelog et modifie about.php. +- modifi\xE9 function.xoStats.php pour la fonction page. +- modifi\xE9 counter.php pour le pays. +- modifi\xE9 mysql.sql bug windows vista. + +************************************************************ + + Added: XoopsModules/TDMStats/trunk/TDMStats/docs/credits.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/credits.txt (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/credits.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,9 @@ +Credits +=============== +Author:Original module: Paul Cooke (alias Scripter) +Adaptation/rewrite: TDM +Credits:Sam Tang for the original i_Stats script. +Traduction Spanish thanks Don Curioso +Traduction Persian thanks Voltan + +Updated to XOOPS 2.5.x Admin GUI by Michael Beck (Mamba) Added: XoopsModules/TDMStats/trunk/TDMStats/docs/index.html =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/index.html (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/index.html 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/docs/install.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/install.txt (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/install.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,6 @@ +INSTALL/UNISTALL +================= + +No special measures necessary, follow the standard installation process \x96 extract the /TDMStats folder into the ../modules directory. Install the module through Admin -> System Module -> Modules. + +Detailed instructions on installing modules are available in the XOOPS Operations Manual (http://goo.gl/adT2i) \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/docs/lang_diff.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/lang_diff.txt (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/lang_diff.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,12 @@ +LANGUAGE DIFFERENCES +===================== + +Below are language differences from a version to next version. + +Version 1.07 +---------------- + +admin.php +---------- +define ( "_AM_ISTATS_KB", "KB"); +define ( "_AM_ISTATS_MB", "MB"); \ No newline at end of file Added: XoopsModules/TDMStats/trunk/TDMStats/docs/licence.txt =================================================================== --- XoopsModules/TDMStats/trunk/TDMStats/docs/licence.txt (rev 0) +++ XoopsModules/TDMStats/trunk/TDMStats/docs/licence.txt 2012-05-13 09:13:24 UTC (rev 9501) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the sou... [truncated message content] |