|
From: <txm...@us...> - 2012-02-15 13:17:15
|
Revision: 8993
http://xoops.svn.sourceforge.net/xoops/?rev=8993&view=rev
Author: txmodxoops
Date: 2012-02-15 13:17:00 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
Module testadsl v1.00, v1.01
Added Paths:
-----------
XoopsModules/testadsl/
XoopsModules/testadsl/branches/
XoopsModules/testadsl/releases/
XoopsModules/testadsl/releases/1.00/
XoopsModules/testadsl/releases/1.00/testadsl/
XoopsModules/testadsl/releases/1.00/testadsl/admin/
XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php
XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php
XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php
XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html
XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php
XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php
XoopsModules/testadsl/releases/1.00/testadsl/blocks/
XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html
XoopsModules/testadsl/releases/1.00/testadsl/class/
XoopsModules/testadsl/releases/1.00/testadsl/class/index.html
XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php
XoopsModules/testadsl/releases/1.00/testadsl/class/object.php
XoopsModules/testadsl/releases/1.00/testadsl/images/
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png
XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png
XoopsModules/testadsl/releases/1.00/testadsl/images/index.html
XoopsModules/testadsl/releases/1.00/testadsl/images/menu/
XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png
XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html
XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png
XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png
XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png
XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png
XoopsModules/testadsl/releases/1.00/testadsl/include/
XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php
XoopsModules/testadsl/releases/1.00/testadsl/include/index.html
XoopsModules/testadsl/releases/1.00/testadsl/include/install.php
XoopsModules/testadsl/releases/1.00/testadsl/index.php
XoopsModules/testadsl/releases/1.00/testadsl/language/
XoopsModules/testadsl/releases/1.00/testadsl/language/english/
XoopsModules/testadsl/releases/1.00/testadsl/language/english/admin.php
XoopsModules/testadsl/releases/1.00/testadsl/language/english/blocks.php
XoopsModules/testadsl/releases/1.00/testadsl/language/english/index.html
XoopsModules/testadsl/releases/1.00/testadsl/language/english/main.php
XoopsModules/testadsl/releases/1.00/testadsl/language/english/modinfo.php
XoopsModules/testadsl/releases/1.00/testadsl/language/french/
XoopsModules/testadsl/releases/1.00/testadsl/language/french/admin.php
XoopsModules/testadsl/releases/1.00/testadsl/language/french/blocks.php
XoopsModules/testadsl/releases/1.00/testadsl/language/french/index.html
XoopsModules/testadsl/releases/1.00/testadsl/language/french/main.php
XoopsModules/testadsl/releases/1.00/testadsl/language/french/modinfo.php
XoopsModules/testadsl/releases/1.00/testadsl/language/index.html
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/admin.php
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/blocks.php
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/index.html
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/main.php
XoopsModules/testadsl/releases/1.00/testadsl/language/italian/modinfo.php
XoopsModules/testadsl/releases/1.00/testadsl/sql/
XoopsModules/testadsl/releases/1.00/testadsl/sql/index.html
XoopsModules/testadsl/releases/1.00/testadsl/templates/
XoopsModules/testadsl/releases/1.00/testadsl/templates/blocks/
XoopsModules/testadsl/releases/1.00/testadsl/templates/blocks/index.html
XoopsModules/testadsl/releases/1.00/testadsl/templates/index.html
XoopsModules/testadsl/releases/1.00/testadsl/xoops_version.php
XoopsModules/testadsl/releases/1.01/
XoopsModules/testadsl/releases/1.01/testadsl/
XoopsModules/testadsl/releases/1.01/testadsl/admin/
XoopsModules/testadsl/releases/1.01/testadsl/admin/about.php
XoopsModules/testadsl/releases/1.01/testadsl/admin/admin_footer.php
XoopsModules/testadsl/releases/1.01/testadsl/admin/admin_header.php
XoopsModules/testadsl/releases/1.01/testadsl/admin/index.html
XoopsModules/testadsl/releases/1.01/testadsl/admin/index.php
XoopsModules/testadsl/releases/1.01/testadsl/admin/menu.php
XoopsModules/testadsl/releases/1.01/testadsl/blocks/
XoopsModules/testadsl/releases/1.01/testadsl/blocks/index.html
XoopsModules/testadsl/releases/1.01/testadsl/class/
XoopsModules/testadsl/releases/1.01/testadsl/class/index.html
XoopsModules/testadsl/releases/1.01/testadsl/class/menu.php
XoopsModules/testadsl/releases/1.01/testadsl/class/object.php
XoopsModules/testadsl/releases/1.01/testadsl/images/
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/about.png
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/arrow.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/delete.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/edit.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/index.html
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/index.png
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/off.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/on.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/permissions.png
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/pref.png
XoopsModules/testadsl/releases/1.01/testadsl/images/deco/update.png
XoopsModules/testadsl/releases/1.01/testadsl/images/index.html
XoopsModules/testadsl/releases/1.01/testadsl/images/menu/
XoopsModules/testadsl/releases/1.01/testadsl/images/menu/bg.png
XoopsModules/testadsl/releases/1.01/testadsl/images/menu/index.html
XoopsModules/testadsl/releases/1.01/testadsl/images/menu/left_both.png
XoopsModules/testadsl/releases/1.01/testadsl/images/menu/right_both.png
XoopsModules/testadsl/releases/1.01/testadsl/images/testadsl_logo.gif
XoopsModules/testadsl/releases/1.01/testadsl/images/testadsl_slogo.png
XoopsModules/testadsl/releases/1.01/testadsl/images/txmod_logo.png
XoopsModules/testadsl/releases/1.01/testadsl/include/
XoopsModules/testadsl/releases/1.01/testadsl/include/functions.php
XoopsModules/testadsl/releases/1.01/testadsl/include/index.html
XoopsModules/testadsl/releases/1.01/testadsl/include/install.php
XoopsModules/testadsl/releases/1.01/testadsl/index.php
XoopsModules/testadsl/releases/1.01/testadsl/language/
XoopsModules/testadsl/releases/1.01/testadsl/language/english/
XoopsModules/testadsl/releases/1.01/testadsl/language/english/admin.php
XoopsModules/testadsl/releases/1.01/testadsl/language/english/blocks.php
XoopsModules/testadsl/releases/1.01/testadsl/language/english/index.html
XoopsModules/testadsl/releases/1.01/testadsl/language/english/main.php
XoopsModules/testadsl/releases/1.01/testadsl/language/english/modinfo.php
XoopsModules/testadsl/releases/1.01/testadsl/language/french/
XoopsModules/testadsl/releases/1.01/testadsl/language/french/admin.php
XoopsModules/testadsl/releases/1.01/testadsl/language/french/blocks.php
XoopsModules/testadsl/releases/1.01/testadsl/language/french/index.html
XoopsModules/testadsl/releases/1.01/testadsl/language/french/main.php
XoopsModules/testadsl/releases/1.01/testadsl/language/french/modinfo.php
XoopsModules/testadsl/releases/1.01/testadsl/language/index.html
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/admin.php
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/blocks.php
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/index.html
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/main.php
XoopsModules/testadsl/releases/1.01/testadsl/language/italian/modinfo.php
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/index.html
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/latency.txt
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.asp
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.aspx
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.jsp
XoopsModules/testadsl/releases/1.01/testadsl/speedtest/upload.php
XoopsModules/testadsl/releases/1.01/testadsl/sql/
XoopsModules/testadsl/releases/1.01/testadsl/sql/index.html
XoopsModules/testadsl/releases/1.01/testadsl/templates/
XoopsModules/testadsl/releases/1.01/testadsl/templates/blocks/
XoopsModules/testadsl/releases/1.01/testadsl/templates/blocks/index.html
XoopsModules/testadsl/releases/1.01/testadsl/templates/index.html
XoopsModules/testadsl/releases/1.01/testadsl/templates/testadsl_index.html
XoopsModules/testadsl/releases/1.01/testadsl/xoops_version.php
XoopsModules/testadsl/trunk/
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/about.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,116 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+include_once("admin_header.php");
+
+xoops_cp_header();
+
+if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) {
+testadsl_adminmenu(1, _AM_TESTADSL_MANAGER_ABOUT);
+
+echo "<style>
+.CPbigTitle{
+ font-size: 20px;
+ color: #1E90FF;
+ background: no-repeat left top;
+ font-weight: bold;
+ height: 40px;
+ vertical-align: middle;
+ padding: 10px 0 0 50px;
+ border-bottom: 3px solid #1E90FF;
+}
+</style>";
+} else {
+include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php";
+loadModuleAdminMenu (1, _AM_TESTADSL_MANAGER_ABOUT);
+}
+
+//menu
+echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/about.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"><strong>"._AM_TESTADSL_MANAGER_ABOUT."</strong>
+</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>
+
+ <fieldset>
+ <legend style=\"font-weight: bold; color: #900;\">".$xoopsModule->getVar("name")."</legend>
+ <div style=\"padding: 8px;\">
+ <img src=\"".XOOPS_URL."/modules/".$xoopsModule->getVar("dirname")."/".$versioninfo->getInfo("image")."\" alt=\"\" hspace=\"10\" vspace=\"0\" /></a>\n
+ <div style=\"padding: 5px;\"><strong>".$versioninfo->getInfo("name")." version ".$versioninfo->getInfo("version")."</strong></div>\n
+ <label>"._AM_TESTADSL_ABOUT_RELEASEDATE.":</label><text>".$versioninfo->getInfo("release")."</text><br />
+ <label>"._AM_TESTADSL_ABOUT_AUTHOR.":</label><text>".$versioninfo->getInfo("author")."</text><br />
+ <label>"._AM_TESTADSL_ABOUT_CREDITS.":</label><text>".$versioninfo->getInfo("credits")."</text><br />
+ <label>"._AM_TESTADSL_ABOUT_LICENSE.":</label><text><a href=\"".$versioninfo->getInfo("license_file")."\" target=\"_blank\" >".$versioninfo->getInfo("license")."</a></text>\n
+ </div>
+ </fieldset>
+<br clear=\"all\"/>
+
+ <fieldset>
+ <legend style=\"font-weight: bold; color: #900;\">"._AM_TESTADSL_ABOUT_MODULE_INFO."</legend>
+ <div style=\"padding: 8px;\">
+ <label>"._AM_TESTADSL_ABOUT_MODULE_STATUS.":</label><text>".$versioninfo->getInfo("module_status")."</text><br />
+ <label>"._AM_TESTADSL_ABOUT_WEBSITE.":</label><text><a href=\"".$versioninfo->getInfo("module_website_url")."\" target=\"_blank\">".$versioninfo->getInfo("module_website_name")."</a></text><br />
+ </div>
+ </fieldset>
+<br clear=\"all\" />
+
+ <fieldset>
+ <legend style=\"font-weight: bold; color: #900;\">"._AM_TESTADSL_ABOUT_AUTHOR_INFO."</legend>
+ <div style=\"padding: 8px;\">
+ <label>"._AM_TESTADSL_ABOUT_AUTHOR_NAME.":</label><text>".$versioninfo->getInfo("author")."</text><br />
+ <label>"._AM_TESTADSL_ABOUT_WEBSITE.":</label><text><a href=\"".$versioninfo->getInfo("author_website_url")."\" target=\"_blank\">".$versioninfo->getInfo("author_website_name")."</a></text><br />
+ </div>
+ </fieldset>
+<br clear=\"all\" />";
+
+$file = XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/changelog.txt";
+
+if ( is_readable( $file ) ){
+echo "<fieldset>
+ <legend style=\"font-weight: bold; color: #900;\">"._AM_TESTADSL_ABOUT_CHANGELOG."</legend>
+ <div style=\"padding: 8px;\">
+ <div>".implode("<br />", file( $file ))."</div>
+ </div>
+ </fieldset>
+ <br clear=\"all\" />";
+
+}
+include_once("admin_footer.php");
+xoops_cp_footer();
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_footer.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,29 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+echo "<br /><br />\n
+ <div align=\"center\"><a href=\"http://www.tdmxoops.net\" target=\"_blank\">\n
+ <img src=\"http://www.tdmxoops.net/images/logo_modules.gif\" alt=\"TDM\" title=\"TDM\"></a></div>
+";
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/admin_header.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,107 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+include "../../../include/cp_header.php";
+
+include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php");
+include_once XOOPS_ROOT_PATH."/class/xoopstree.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+include_once XOOPS_ROOT_PATH."/class/tree.php";
+include_once XOOPS_ROOT_PATH."/class/xoopslists.php";
+include_once XOOPS_ROOT_PATH."/class/pagenav.php";
+include_once XOOPS_ROOT_PATH."/class/xoopstopic.php";
+include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php";
+include_once("../include/functions.php");
+
+$myts =& MyTextSanitizer::getInstance();
+
+if ( $xoopsUser ) {
+ $xoopsModule = XoopsModule::getByDirname("testadsl");
+ if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ redirect_header(XOOPS_URL."/",3,_NOPERM);
+ exit();
+ }
+} else {
+ redirect_header(XOOPS_URL."/",3,_NOPERM);
+ exit();
+}
+
+// Include language file
+xoops_loadLanguage("admin", "system");
+xoops_loadLanguage("admin", $xoopsModule->getVar("dirname", "e"));
+xoops_loadLanguage("modinfo", $xoopsModule->getVar("dirname", "e"));
+
+function testadsl_adminmenu ($currentoption = 0, $breadcrumb = "")
+{
+ global $xoopsModule, $xoopsConfig;
+
+ echo "
+ <style type=\"text/css\">
+ #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
+ #buttonbar { float:left; width:100%; background: #e7e7e7 url(".XOOPS_URL."/modules/testadsl/images/menu/bg.png) repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
+ #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
+ #buttonbar li { display:inline; margin:0; padding:0; }
+ #buttonbar a { float:left; background:url(".XOOPS_URL."/modules/testadsl/images/deco/left_both.png) no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
+ #buttonbar a span { float:left; display:block; background:url(".XOOPS_URL."/modules/testadsl/images/deco/right_both.png) no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
+ #buttonbar a span {float:none;}
+ #buttonbar a:hover span { color:#333; }
+ #buttonbar #current a { background-position:0 -150px; border-width:0; }
+ #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
+ #buttonbar a:hover { background-position:0% -150px; }
+ #buttonbar a:hover span { background-position:100% -150px; }
+ </style>
+ ";
+
+ $tblColors = Array();
+ $tblColors[0] = $tblColors[1] = $tblColors[2] = $tblColors[3] = $tblColors[4] = $tblColors[5] = $tblColors[6] = $tblColors[7] = $tblColors[8] = "";
+ $tblColors[$currentoption] = "current";
+ if (file_exists("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php")) {
+ include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/language/".$xoopsConfig["language"]."/modinfo.php");
+ } else {
+ include_once("".XOOPS_ROOT_PATH."/modules/".$xoopsModule->getVar("dirname")."/english/modinfo.php");
+ }
+
+ echo "<div id=\"buttontop\">
+ <table style=\"width: 100%; padding: 0;\" cellspacing=\"0\">
+ <tr>
+ <td style=\"font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\">
+ <a class=\"nobutton\" href=\"".XOOPS_URL."/modules/system/admin.php?fct=preferences&op=showmod&mod=".$myts->displayTarea($xoopsModule->getVar("mid"))."\">_AM_TESTADSL_GENERALSET</a>
+ | <a href=\"".XOOPS_URL."/modules/testadsl/index.php\">_AM_TESTADSL_GOINDEX</a>
+ | <a href=\"".XOOPS_URL."/modules/testadsl/admin/upgrade.php\">_AM_TESTADSL_UPGRADE</a>
+ </td>
+ <td style=\"font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>".$myts->displayTarea($xoopsModule->name())."</b></td>
+ </tr>
+ </table>
+ </div>
+
+ <div id=\"buttonbar\">
+ <ul><li id=\"$tblColors[0]\"><a href=\"".XOOPS_URL."/modules/testadsl/admin/index.php\"><span>_MI_TESTADSL_MANAGER_INDEX</span></a></li>
+
+ <li id=\"$tblColors[1]\"><a href=\"".XOOPS_URL."/modules/testadsl/admin/permissions.php\"><span>_MI_TESTADSL_MANAGER_PERMISSIONS</span></a></li>
+ <li id=\"$tblColors[2]\"><a href=\"".XOOPS_URL."/modules/testadsl/admin/about.php\"><span>_MI_TESTADSL_MANAGER_ABOUT</span></a></li>
+ </ul></div>";
+}
+
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/index.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,64 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+include_once("admin_header.php");
+
+xoops_cp_header();
+
+global $xoopsModule;
+
+//Apelle du menu admin
+if ( !is_readable(XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php")) {
+testadsl_adminmenu(0, _AM_TESTADSL_MANAGER_INDEX);
+} else {
+include_once XOOPS_ROOT_PATH."/Frameworks/art/functions.admin.php";
+loadModuleAdminMenu (0, _AM_TESTADSL_MANAGER_INDEX);
+}
+
+include_once XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/menu.php";
+
+ $menu = new testadslMenu();
+
+ $menu->addItem("update", "../../system/admin.php?fct=modulesadmin&op=update&module=testadsl", "../images/deco/update.png", _AM_TESTADSL_MANAGER_UPDATE);
+ $menu->addItem("permissions", "permissions.php", "../images/deco/permissions.png", _AM_TESTADSL_MANAGER_PERMISSIONS);
+ $menu->addItem("preference", "../../system/admin.php?fct=preferences&op=showmod&mod=".$xoopsModule->getVar("mid").
+ "&&confcat_id=1", "../images/deco/pref.png", _AM_TESTADSL_MANAGER_PREFERENCES);
+ $menu->addItem("about", "about.php", "../images/deco/about.png", _AM_TESTADSL_MANAGER_ABOUT);
+
+ echo $menu->getCSS();
+
+
+echo "<div class=\"CPbigTitle\" style=\"background-image: url(../images/deco/index.png); background-repeat: no-repeat; background-position: left; padding-left: 50px;\"><strong>"._AM_TESTADSL_MANAGER_INDEX."</strong></div><br />
+ <table width=\"100%\" border=\"0\" cellspacing=\"10\" cellpadding=\"4\">
+ <tr>
+ <td valign=\"top\">".$menu->render()."</td>
+ <td valign=\"top\" width=\"60%\">";
+
+ echo "</td>
+ </tr>
+ </table>";
+include_once("admin_footer.php");
+xoops_cp_footer();
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/admin/menu.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,34 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+$adminmenu = array();
+$adminmenu[0]["title"] = _MI_TESTADSL_MANAGER_INDEX;
+$adminmenu[0]["link"] = "admin/index.php";
+$adminmenu[1]["title"] = _MI_TESTADSL_MANAGER_PERMISSIONS;
+$adminmenu[1]["link"] = "admin/permissions.php";
+
+$adminmenu[2]["title"] = _MI_TESTADSL_MANAGER_ABOUT;
+$adminmenu[2]["link"] = "admin/about.php";
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/blocks/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/class/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/class/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/class/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/class/menu.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,176 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+class testadslMenu
+{
+ public $Width = 100;
+ public $Height = 100;
+ public $BgColor = "transparent";
+ public $OverBgColor = "#FFF6C1";
+ public $BorderWidth = 1;
+ public $BorderColor = "#CCCCCC";
+ public $OverBorderColor = "#FF9900";
+ public $BorderStyle = "solid";
+ public $OverBorderStyle = "solid";
+ public $Font = "Tahoma, Arial, Helvetica";
+ public $FontColor = "#666666";
+ public $OverFontColor = "#1E90FF";
+ public $FontDeco = "none";
+ public $OverFontDeco = "none";
+ public $FontSize = 11;
+ public $FontWeight = "bold";
+ public $FontExtra = "Tahoma, Arial, Helvetica";
+ public $FontExtraColor = "#A98952";
+ public $OverFontExtraColor = "#0033FF";
+ public $FontExtraDeco = "underline";
+ public $OverFontExtraDeco = "underline";
+ public $FontExtraSize = 9;
+ public $FontExtraWeight = "normal";
+ public $TextAlign = "center";
+ private $_items = array();
+
+ public function addItem($id, $link="", $icon="", $name="", $extra="", $alt=""){
+ if (isset($this->_items[$id])) return false;
+ $rtn["link"] = $link;
+ $rtn["icon"] = $icon;
+ $rtn["name"] = $name;
+ $rtn["extra"] = $extra;
+ $rtn["alt"] = $alt;
+ $this->_items[$id] = $rtn;
+ return true;
+ }
+
+ public function setLink($id, $link){
+ if (isset($this->_items[$id])){
+ $this->_items[$id]["link"] = $link;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function setIcon($id, $icon){
+ if (isset($this->_items[$id])){
+ $this->_items[$id]["icon"] = $icon;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function setName($id, $name){
+ if (isset($this->_items[$id])){
+ $this->_items[$id]["name"] = $name;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function setExtra($id, $extra){
+ if (isset($this->_items[$id])){
+ $this->_items[$id]["extra"] = $extra;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function setAlt($id, $alt){
+ if (isset($this->_items[$id])){
+ $this->_items[$id]["alt"] = $alt;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function getCSS($ws = true){
+ if ($ws) $csscode = "<style type=\"text/css\">\n<!--";
+ $csscode .= "div.rmmenuicon{
+ margin: 3px;
+ font-family: $this->Font;
+ text-align: ".$this->TextAlign.";
+ }
+ div.rmmenuicon a {
+ display: block; float: left;
+ height: ".$this->Height."px !important;
+ height: ".$this->Height."px;
+ width: ".$this->Width."px !important;
+ width: ".$this->Width."px;
+ vertical-align: middle;
+ text-decoration : none;
+ border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor;
+ padding: 2px 5px 1px 5px;
+ margin: 3px;
+ color: $this->FontColor;
+ }
+ div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; }
+ div.rmmenuicon a span {
+ font-size: ".$this->FontSize."px;
+ font-weight: $this->FontWeight;
+ display: block;
+ }
+ div.rmmenuicon a span.uno{
+ font-size: ".$this->FontExtraSize."px;
+ font-weight: $this->FontExtraWeight;
+ text-decoration: $this->FontExtraDeco;
+ color: $this->FontExtraColor;
+ }
+ div.rmmenuicon a:hover{
+ background-color: $this->OverBgColor;
+ border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor;
+ color: $this->OverFontColor;
+ }
+ div.rmmenuicon a:hover span{
+ text-decoration: $this->OverFontDeco;
+ }
+ div.rmmenuicon a:hover span.uno{
+ text-decoration: $this->OverFontExtraDeco;
+ color: $this->OverFontExtraColor;
+ }";
+ if ($ws) $csscode .= "\n-->\n</style>";
+ return $csscode;
+ }
+
+ public function render(){
+
+ $ret = "<div class=\"rmmenuicon\">";
+ foreach ($this->_items as $k => $v){
+ $ret .= "<a href=\"".$v["link"]."\" title=\"".($v["alt"]!="" ? $v["alt"] : $v["name"])."\">".($v["icon"]!="" ? "<img src=\"".$v["icon"]."\" alt=\"".$v["name"]."\" /> " : "");
+ if ($v["name"] != "") $ret .= "<span>".$v["name"]."</span>";
+ if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>";
+ if ($v["extra"] != "") $ret .= "<span class=\"uno\">".$v["extra"]."</span>";
+ $ret .= "</a>";
+ }
+ $ret .= "</div><div style=\"clear: both;\"></div>";
+ return $ret;
+ }
+
+ public function display(){
+ echo $this->render();
+ }
+}
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/class/object.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/class/object.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/class/object.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,412 @@
+<?php
+/**
+ * ****************************************************************************
+ * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
+ * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ *
+ * Cette licence, contient des limitations!!!
+ *
+ * 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.
+ *
+ * @license TDM GPL license
+ * @author TDM TEAM DEV MODULE
+ *
+ * ****************************************************************************
+ */
+
+class XoopsPersistableObjectHandler extends XoopsObjectHandler{
+
+ /**
+ * Information about the class, the handler is managing
+ *
+ * @var string
+ */
+ var $table;
+ var $keyName;
+ var $className;
+ var $identifierName;
+
+
+ /**
+ * Constructor - called from child classes
+ * @param object $db {@link XoopsDatabase} object
+ * @param string $tablename Name of database table
+ * @param string $classname Name of Class, this handler is managing
+ * @param string $keyname Name of the property, holding the key
+ *
+ * @return void
+ */
+ function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) {
+ $this->XoopsObjectHandler($db);
+ $this->table = $db->prefix($tablename);
+ $this->keyName = $keyname;
+ $this->className = $classname;
+ if ($idenfierName != false) {
+ $this->identifierName = $idenfierName;
+ }
+ }
+
+ /**
+ * create a new user
+ *
+ * @param bool $isNew Flag the new objects as "new"?
+ *
+ * @return object
+ */
+ function &create($isNew = true) {
+ $obj =& new $this->className();
+ if ($isNew === true) {
+ $obj->setNew();
+ }
+ return $obj;
+ }
+
+ /**
+ * retrieve an object
+ *
+ * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
+ * @param bool $as_object whether to return an object or an array
+ * @return mixed reference to the object, FALSE if failed
+ */
+ function &get($id, $as_object=true) {
+ if (is_array($this->keyName)) {
+ $criteria = new CriteriaCompo();
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ $criteria->add(new Criteria($this->keyName[$i], intval($id[$i])));
+ }
+ } else {
+ $criteria = new Criteria($this->keyName, intval($id));
+ }
+ $criteria->setLimit(1);
+ $obj_array = $this->getObjects($criteria, false, $as_object);
+ if (count($obj_array) != 1) {
+ $obj = $this->create();
+ return $obj;
+ }
+ return $obj_array[0];
+ }
+
+ /**
+ * retrieve objects from the database
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param bool $id_as_key use the ID as key for the array?
+ * @param bool $as_object return an array of objects?
+ *
+ * @return array
+ */
+ function getObjects($criteria=null, $id_as_key=false, $as_object=true){
+ $ret = array();
+ $limit = $start = 0;
+ $sql = 'SELECT * FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ return $this->convertResultSet($result, $id_as_key, $as_object);
+ }
+
+ /**
+ * Convert a database resultset to a returnable array
+ *
+ * @param object $result database resultset
+ * @param bool $id_as_key - should NOT be used with joint keys
+ * @param bool $as_object
+ *
+ * @return array
+ */
+ function convertResultSet($result, $id_as_key = false, $as_object = true) {
+ $ret = array();
+ while ($myrow = $this->db->fetchArray($result)) {
+ $obj =& $this->create(false);
+ $obj->assignVars($myrow);
+ if (!$id_as_key) {
+ if ($as_object) {
+ $ret[] =& $obj;
+ } else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[] = $row;
+ }
+ } else {
+ if ($as_object) {
+ $ret[$myrow[$this->keyName]] =& $obj;
+ } else {
+ $row = array();
+ $vars = $obj->getVars();
+ foreach (array_keys($vars) as $i) {
+ $row[$i] = $obj->getVar($i);
+ }
+ $ret[$myrow[$this->keyName]] = $row;
+ }
+ }
+ unset($obj);
+ }
+ return $ret;
+ }
+
+ /**
+ * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS
+ *
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param int $limit Max number of objects to fetch
+ * @param int $start Which record to start at
+ *
+ * @return array
+ */
+ function getList($criteria = null, $limit = 0, $start = 0) {
+ $ret = array();
+ if ($criteria == null) {
+ $criteria = new CriteriaCompo();
+ }
+
+ if ($criteria->getSort() == '') {
+ $criteria->setSort($this->identifierName);
+ }
+
+ $sql = 'SELECT '.$this->keyName;
+ if(!empty($this->identifierName)){
+ $sql .= ', '.$this->identifierName;
+ }
+ $sql .= ' FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->getSort() != '') {
+ $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
+ }
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $this->db->query($sql, $limit, $start);
+ if (!$result) {
+ return $ret;
+ }
+ $myts =& MyTextSanitizer::getInstance();
+ while ($myrow = $this->db->fetchArray($result)) {
+ //identifiers should be textboxes, so sanitize them like that
+ $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]);
+ }
+ return $ret;
+ }
+
+ /**
+ * count objects matching a condition
+ *
+ * @param object $criteria {@link CriteriaElement} to match
+ * @return int count of objects
+ */
+ function getCount($criteria=null){
+ $field = "";
+ $groupby = false;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ if ($criteria->groupby != "") {
+ $groupby = true;
+ $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used
+ }
+ }
+ $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ if ($criteria->groupby != "") {
+ $sql .= $criteria->getGroupby();
+ }
+ }
+ $result = $this->db->query($sql);
+ if (!$result) {
+ return 0;
+ }
+ if ($groupby == false) {
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ } else {
+ $ret = array();
+ while (list($id, $count) = $this->db->fetchRow($result)) {
+ $ret[$id] = $count;
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * delete an object from the database
+ *
+ * @param object $obj reference to the object to delete
+ * @param bool $force
+ * @return bool FALSE if failed.
+ */
+ function delete(&$obj, $force = false){
+ if (is_array($this->keyName)) {
+ $clause = array();
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]);
+ }
+ $whereclause = implode(" AND ", $clause);
+ } else {
+ $whereclause = $this->keyName." = ".$obj->getVar($this->keyName);
+ }
+ $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause;
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * insert a new object in the database
+ *
+ * @param object $obj reference to the object
+ * @param bool $force whether to force the query execution despite security settings
+ * @param bool $checkObject check if the object is dirty and clean the attributes
+ * @return bool FALSE if failed, TRUE if already present and unchanged or successful
+ */
+
+ function insert(&$obj, $force=false, $checkObject=true){
+ if ($checkObject != false) {
+ if (!is_object($obj)) {
+ var_dump($obj);
+ return false;
+ }
+ /**
+ * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
+ */
+ if (!is_a($obj, $this->className)) {
+ $obj->setErrors(get_class($obj)." Differs from ".$this->className);
+ return false;
+ }
+ if (!$obj->isDirty()) {
+ $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith
+ return true;
+ }
+ }
+ if (!$obj->cleanVars()) {
+ return false;
+ }
+
+ foreach ($obj->cleanVars as $k => $v) {
+ if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) {
+ $cleanvars[$k] = intval($v);
+ } elseif ( is_array( $v ) ) {
+ $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) );
+ } else {
+ $cleanvars[$k] = $this->db->quoteString($v);
+ }
+ }
+ if ($obj->isNew()) {
+ if (!is_array($this->keyName)) {
+ if ($cleanvars[$this->keyName] < 1) {
+ $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq');
+ }
+ }
+ $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")";
+ } else {
+ $sql = "UPDATE ".$this->table." SET";
+ foreach ($cleanvars as $key => $value) {
+ if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) {
+ continue;
+ }
+ if (isset($notfirst) ) {
+ $sql .= ",";
+ }
+ $sql .= " ".$key." = ".$value;
+ $notfirst = true;
+ }
+ if (is_array($this->keyName)) {
+ $whereclause = "";
+ for ($i = 0; $i < count($this->keyName); $i++) {
+ if ($i > 0) {
+ $whereclause .= " AND ";
+ }
+ $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]);
+ }
+ } else {
+ $whereclause = $this->keyName." = ".$obj->getVar($this->keyName);
+ }
+ $sql .= " WHERE ".$whereclause;
+ }
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ if ($obj->isNew() && !is_array($this->keyName)) {
+ $obj->assignVar($this->keyName, $this->db->getInsertId());
+ }
+ return true;
+ }
+
+ /**
+ * Change a value for objects with a certain criteria
+ *
+ * @param string $fieldname Name of the field
+ * @param string $fieldvalue Value to write
+ * @param object $criteria {@link CriteriaElement}
+ * @return bool
+ */
+ function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){
+ $set_clause = $fieldname . ' = ';
+ if ( is_numeric( $fieldvalue ) ) {
+ $set_clause .= $fieldvalue;
+ } elseif ( is_array( $fieldvalue ) ) {
+ $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) );
+ } else {
+ $set_clause .= $this->db->quoteString( $fieldvalue );
+ }
+ $sql = 'UPDATE '.$this->table.' SET '.$set_clause;
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' '.$criteria->renderWhere();
+ }
+ if (false != $force) {
+ $result = $this->db->queryF($sql);
+ } else {
+ $result = $this->db->query($sql);
+ }
+ if (!$result) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * delete all objects meeting the conditions
+ *
+ * @param object $criteria {@link CriteriaElement} with conditions to meet
+ * @return bool
+ */
+ function deleteAll($criteria = null){
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql = 'DELETE FROM '.$this->table;
+ $sql .= ' '.$criteria->renderWhere();
+ if (!$this->db->queryF($sql)) {
+ return false;
+ }
+ $rows = $this->db->getAffectedRows();
+ return $rows > 0 ? $rows : true;
+ }
+ return false;
+ }
+}
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/arrow.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/delete.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/edit.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/index.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/off.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/on.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/permissions.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/pref.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/deco/update.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/images/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/images/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/images/menu/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/left_both.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/menu/right_both.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/testadsl_slogo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png
===================================================================
(Binary files differ)
Property changes on: XoopsModules/testadsl/releases/1.00/testadsl/images/txmod_logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/include/functions.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,44 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+
+/***************Blocks***************/
+function block_addCatSelect($cats) {
+ if(is_array($cats))
+ {
+ $cat_sql = "(".current($cats);
+ array_shift($cats);
+ foreach($cats as $cat)
+ {
+ $cat_sql .= ",".$cat;
+ }
+ $cat_sql .= ")";
+ }
+ return $cat_sql;
+}
+
+
+
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/include/index.html
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/include/index.html (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/include/index.html 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/include/install.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/include/install.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/include/install.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,35 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @license GNU GPL
+ * @package testadsl
+ * @author timgno ()
+ *
+ * Version : 1.00:
+ * ****************************************************************************
+ */
+
+$indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/include/index.html";
+$blankFile = XOOPS_ROOT_PATH."/modules/TDMCreate/images/deco/blank.gif";
+
+//Creation du dossier "uploads" pour le module \xE0 la racine du site
+$module_uploads = XOOPS_ROOT_PATH."/uploads/testadsl";
+if(!is_dir($module_uploads))
+ mkdir($module_uploads, 0777);
+ chmod($module_uploads, 0777);
+copy($indexFile, XOOPS_ROOT_PATH."/uploads/testadsl/index.html");
+
+?>
\ No newline at end of file
Added: XoopsModules/testadsl/releases/1.00/testadsl/index.php
===================================================================
--- XoopsModules/testadsl/releases/1.00/testadsl/index.php (rev 0)
+++ XoopsModules/testadsl/releases/1.00/testadsl/index.php 2012-02-15 13:17:00 UTC (rev 8993)
@@ -0,0 +1,57 @@
+<?php
+/**
+ * ****************************************************************************
+ * Module g\xE9n\xE9r\xE9 par TDMCreate de la TDM "http://www.tdmxoops.net"
+ * ****************************************************************************
+ * testadsl - MODULE FOR XOOPS AND IMPRESS CMS
+ * Copyright (c) timgno (http://www.txmod.netsons.org)
+ *
+ * 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 timgno (http://www.txmod.netsons.org)
+ * @l...
[truncated message content] |