|
From: <txm...@us...> - 2013-04-07 19:09:46
|
Revision: 11358
http://sourceforge.net/p/xoops/svn/11358
Author: txmodxoops
Date: 2013-04-07 19:09:40 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
Test Beta 4
Added permissions and notifications file and code
Toggle effect in admin/tables.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.39/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/constArch.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/constArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_notification.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/css/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/css/admin.css
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/css/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/install.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/lang_diff.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/license.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/docs/readme.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/addmodule.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/addtable.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/builder.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/dashboard.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/32/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/off.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/on.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/16/toggle.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/addmodule.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/addtable.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/builder.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/dashboard.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/32/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/arrow.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/blank.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/loading.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/off.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/icons/on.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/loading.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/logos/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/logos/VeraBd.ttf
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/logos/green.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/logos/red.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/logos/xoops2.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/module_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/tdmcreate_slogo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/txmodxoops_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/Hotel_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/My Module_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/MyShop_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/Real Estate_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/Shopper_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/Shopping_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/Test1Logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/album_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/ams_slogo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/empty.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/module1_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/moduleimport_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/realestate_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/travel_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/txmLinks_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/txmrestaurant_logo.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/modules/xcvLogo.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/tables/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/tables/blank.gif
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/tables/cat.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/uploads/tables/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/images/xoops2.png
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/jq.init.js
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/js/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/js/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/help/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/help/help.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/help/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.0 to 1.1.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.1 to 1.15.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.1 to 1.37.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.15 to 1.37.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.37 to 1.38.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/modules/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/modules/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/templates/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/templates/admin/
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/templates/admin/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/templates/index.html
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/xoops_version.php
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/about.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/about.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,24 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include 'admin_header.php';
+echo $adminMenu->addNavigation('about.php');
+echo $adminMenu->renderabout('6KJ7RW5DR3VTJ', false);
+include 'admin_footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_footer.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,26 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: admin_footer.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+xoops_cp_footer();
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/admin_header.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,56 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: admin_header.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+include_once("../include/functions.php");
+include_once 'includes.php';
+//
+$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
+//
+
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+//load class
+$modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate');
+$tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate');
+//
+$myts =& MyTextSanitizer::getInstance();
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+//
+$xoopsTpl->assign('pathIcon16', $pathIcon16);
+$xoopsTpl->assign('pathIcon32', $pathIcon32);
+//Load languages
+xoops_loadLanguage('admin', $thisDirname);
+xoops_loadLanguage('modinfo', $thisDirname);
+xoops_loadLanguage('main', $thisDirname);
+// Locad admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,233 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include 'admin_header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+
+if (isset($_REQUEST['mod_name'])) {
+ $modules =& $modulesHandler->get($_REQUEST['mod_name']);
+} else {
+ $modules =& $modulesHandler;
+}
+
+$mod_name = strtolower($modules->getVar('mod_name'));
+$mod_desc = $modules->getVar('mod_description');
+$mod_author_website_name = $modules->getVar('mod_author_website_name');
+$mod_author_website_url = $modules->getVar('mod_author_website_url');
+$mod_image = $modules->getVar('mod_image');
+$mod_active_search = $modules->getVar('mod_search');
+$mod_active_comments = $modules->getVar('mod_comments');
+$mod_active_notifications = $modules->getVar('mod_notifications');
+$mod_paypal_button = $modules->getVar('mod_donations');
+$mod_subversion = $modules->getVar('mod_subversion');
+
+if (isset($_REQUEST['table_name'])) {
+ $tables =& $tablesHandler->get(isset($_REQUEST['table_name']));
+} else {
+ $tables =& $tablesHandler;
+}
+
+//Name of tables
+$criteria = new CriteriaCompo();
+if (isset($_REQUEST['mod_name'])) {
+ $criteria->add(new Criteria('table_mid', $_REQUEST['mod_name']));
+} else {
+ $criteria->add(new Criteria('table_mid'));
+}
+
+$nb_tables = $tablesHandler->getCount($criteria);
+$tables_arr = $tablesHandler->getAll($criteria);
+
+echo $adminMenu->addNavigation('building.php');
+switch ($op) {
+ case 'build':
+ // Effacer repertoire of nouveau module s'il existe
+ TDMCreate_clearDir($modPath.'/modules/'.$mod_name);
+ // Debut
+ OpenTable();
+ /************************************************/
+ /*Structure*/
+ /************************************************/
+ //Creation of architecture
+ const_architecture($mod_name, $mod_image);
+ //Creation of changelog.txt
+ const_changelog($modules, $mod_name);
+
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
+ list( $category ) = $xoopsDB->fetchRow($result);
+
+ foreach (array_keys($tables_arr) as $i)
+ {
+ // Variables
+ $table_name = $tables_arr[$i]->getVar('table_name');
+ $table_fieldname = $tables_arr[$i]->getVar('table_fieldname');
+ $table_category = $tables_arr[$i]->getVar('table_category');
+ $table_fields = $tables_arr[$i]->getVar('table_fields');
+ $table_parameters = $tables_arr[$i]->getVar('table_parameters');
+ $table_image = $tables_arr[$i]->getVar('table_image');
+ $table_blocks = $tables_arr[$i]->getVar('table_blocks');
+ $table_admin = $tables_arr[$i]->getVar('table_admin');
+ $table_user = $tables_arr[$i]->getVar('table_user');
+ if ($mod_active_search != 0) {
+ $table_search = $tables_arr[$i]->getVar('table_search');
+ }
+ if ($mod_active_comments != 0) {
+ $table_comments = $tables_arr[$i]->getVar('table_comments');
+ }
+ if ($mod_active_notifications != 0) {
+ $table_notifications = $tables_arr[$i]->getVar('table_notifications');
+ }
+ $table_waiting = $tables_arr[$i]->getVar('table_waiting');
+
+ // Fabrication
+ // Copy of images tables
+ $table_image1 = $modPath . '/images/uploads/tables/' . $table_image;
+ if (file_exists($table_image1)) {
+ copy($table_image1, $modPath . '/modules/' . $mod_name . '/images/icons/32/' . $table_image);
+ }
+ // Creation of classes
+ if ( $table_admin == 1 || $table_user == 1) {
+ const_class($modules, $mod_name, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
+ }
+ // Creation of permissions
+ if ( $table_category == 1) {
+ const_admin_permissions($modules, $mod_name, $table_name, $table_fieldname);
+ }
+ // Creation of pages admin
+ if ( $table_admin == 1 ) {
+ const_admin_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ }
+ // Creation of pages and templates user
+ if ( $table_user == 1 && $table_name != null ) {
+ const_user_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ const_templates_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields);
+ }
+ // Creation of search
+ if ( isset($table_search) ) {
+ const_include_search($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
+ }
+ // Creation of comments
+ if ( isset($table_comments) ) {
+ const_include_comments($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ // Creation of notifications
+ if ( isset($table_notifications) ) {
+ const_include_notifications($modules, $modules_name, $table_name, $table_fieldname);
+ }
+ // Creation of the file mysql.sql
+ const_sql($mod_name, $table_name, $table_fieldname, $category, $table_fields);
+
+ // Creation of blocks
+ if ( $table_blocks == 1 ) {
+ const_blocks($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ //Creation of template per blocks
+ const_blocks_templates($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ }
+ //Creation of architecture of more fields and data
+ //const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
+
+ if ( $table_waiting == 1 ) {
+ // Creation of Waiting Plugin
+ const_waiting($modules, $mod_name, $tables_arr);
+ }
+ // Creation of xoopsversion.php
+ const_xoopsversion($modules, $mod_name, $table_name, $table_fields, $table_parameters, $tables_arr);
+ if ( $table_user == 1 && $table_name != null ) {
+ // Creation of template index
+ const_templates_index($modules, $mod_name);
+ // Creation of template header
+ const_templates_header($modules, $mod_name, $tables_arr);
+ // Creation of template footer
+ const_templates_footer($modules, $mod_name, $table_comments, $table_notifications);
+ }
+ if ( $table_admin == 1 ) {
+ // Creation of template admin about
+ const_templates_admin_about($modules, $mod_name);
+ // Creation of template admin help
+ const_templates_admin_help($modules, $mod_name);
+ }
+ // Include
+ ///////////////////////////////////////////////////////////////////////
+ // Configs
+ const_include_common($modules, $mod_name, $mod_author_website_name, $mod_author_website_url);
+ // Functions
+ const_include_functions($modules, $mod_name);
+ //Creation of file install per l'uploads
+ const_include_install($modules, $mod_name, $tables_arr);
+ // Language
+ ///////////////////////////////////////////////////////////////////////
+ if ( $table_user == 1 ) {
+ //Creation of language main.php
+ const_main_language($modules, $mod_name, $mod_desc, $tables_arr);
+ }
+ // Creation of language modinfo.php
+ const_modinfo_language($modules, $mod_name, $mod_desc, $table_name, $table_image, $tables_arr, $category);
+ // Creation of language admin.php
+ const_admin_language($modules, $mod_name, $tables_arr, $category);
+ if ( $table_blocks == 1 ) {
+ // Creation of language blocks.php
+ const_blocks_language($modules, $mod_name, $tables_arr);
+ }
+ // Creation of language help/help.html
+ const_help_language($modules, $mod_name, $mod_desc);
+ ///////////////////////////////////////////////////////////////////////
+ //Creation of style.css
+ const_css_style($modules, $mod_name);
+ /************************************************/
+ /*Admin*/
+ /************************************************/
+ // Creation of admin header.php
+ const_admin_header($modules, $mod_name, $tables_arr);
+ // Creation of admin index.php
+ const_admin_index($modules, $mod_name, $table_name, $tables_arr);
+ // Creation of admin footer.php
+ const_admin_footer($modules, $mod_name, $tables_arr);
+ // Creation of admin menu.php
+ const_admin_menu($modules, $mod_name, $tables_arr, $category);
+ // Creation of admin about.php
+ const_admin_about($modules, $mod_name, $mod_paypal_button);
+ /************************************************/
+ /*User*/
+ /************************************************/
+ if ( $table_user == 1 ) {
+ const_user_header($modules, $mod_name);
+ const_user_index($modules, $mod_name);
+ }
+ CloseTable();
+ break;
+
+ case 'default':
+ default:
+ include_once(XOOPS_ROOT_PATH . '/class/xoopsformloader.php');
+ $action = $_SERVER['REQUEST_URI'];
+
+ $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'buildform', $action, 'post', true);
+
+ $mod_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'mod_name', 'mod_name');
+ $mod_select->addOptionArray($modulesHandler->getList());
+ $form->addElement($mod_select, true);
+
+ $form->addElement(new XoopsFormHidden('op', 'build'));
+ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->display();
+ break;
+}
+include 'admin_footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/includes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/includes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/includes.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,62 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: includes.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include '../../../include/cp_header.php';
+include_once("../include/functions.php");
+
+$modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate';
+$cPath = $modPath.'/const';
+
+include_once $cPath.'/const_architecture.php';
+include_once $cPath.'/const_xoopsversion.php';
+include_once $cPath.'/const_changelog.php';
+include_once $cPath.'/const_include_search.php';
+include_once $cPath.'/const_include_comments.php';
+include_once $cPath.'/const_include_notifications.php';
+include_once $cPath.'/const_include_common.php';
+include_once $cPath.'/const_include_functions.php';
+include_once $cPath.'/const_include_install.php';
+include_once $cPath.'/const_waiting.php';
+include_once $cPath.'/const_css_style.php';
+include_once $cPath.'/const_sql.php';
+include_once $cPath.'/const_blocks.php';
+include_once $cPath.'/const_blocks_templates.php';
+include_once $cPath.'/const_class.php';
+include_once $cPath.'/const_admin_header.php';
+include_once $cPath.'/const_admin_footer.php';
+include_once $cPath.'/const_admin_menu.php';
+include_once $cPath.'/const_admin_index.php';
+include_once $cPath.'/const_admin_pages.php';
+include_once $cPath.'/const_admin_about.php';
+include_once $cPath.'/const_admin_permissions.php';
+include_once $cPath.'/const_admin_language.php';
+include_once $cPath.'/const_modinfo_language.php';
+include_once $cPath.'/const_help_language.php';
+include_once $cPath.'/const_blocks_language.php';
+include_once $cPath.'/const_main_language.php';
+include_once $cPath.'/const_user_header.php';
+include_once $cPath.'/const_user_index.php';
+include_once $cPath.'/const_user_pages.php';
+include_once $cPath.'/const_templates_header.php';
+include_once $cPath.'/const_templates_index.php';
+include_once $cPath.'/const_templates_pages.php';
+include_once $cPath.'/const_templates_footer.php';
+include_once $cPath.'/const_templates_admin_about.php';
+include_once $cPath.'/const_templates_admin_help.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.html 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/index.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,33 @@
+<?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
+ *
+ * ****************************************************************************
+ */
+include 'admin_header.php';
+ $criteria = new CriteriaCompo();
+ $count_modules = $modulesHandler->getCount($criteria);
+ $count_tables = $tablesHandler->getCount($criteria);
+
+$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMMODULES. "</label>", $count_modules, 'Green') ;
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMTABLES. "</label>", $count_tables, 'Orange');
+
+ echo $adminMenu->addNavigation('index.php');
+ echo $adminMenu->renderIndex();
+
+include "admin_footer.php";
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/menu.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/menu.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,46 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: menu.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+$module_handler =& xoops_gethandler('module');
+$xoopsModule =& XoopsModule::getByDirname('TDMCreate');
+$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
+$pathIcon32 = $moduleInfo->getInfo('icons32');
+$adminmenu = array();
+$i = 1;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_INDEX;
+$adminmenu[$i]["link"] = 'admin/index.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_MODULES;
+$adminmenu[$i]["link"] = 'admin/modules.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/addmodule.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_TABLES;
+$adminmenu[$i]["link"] = 'admin/tables.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/addtable.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_CONST;
+$adminmenu[$i]["link"] = 'admin/building.php';
+$adminmenu[$i]["icon"] = 'images/icons/32/builder.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_ABOUT;
+$adminmenu[$i]["link"] = 'admin/about.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
+unset($i);
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/modules.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,178 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: modules.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include_once 'admin_header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'list', 'string' );
+echo $adminMenu->addNavigation('modules.php');
+switch ($op)
+{
+ case "save":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+
+ if (isset($_REQUEST['mod_id'])) {
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ } else {
+ $obj =& $modulesHandler->create();
+ }
+ //Image
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/modules/";
+ $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
+ $name_img = $_REQUEST['mod_name'].'_slogo.'.$extension;
+ $uploader->setTargetFileName($name_img);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $obj->setVar('mod_image', $uploader->getSavedFileName());
+ }
+ } else {
+ $obj->setVar('mod_image', $_POST['mod_image']);
+ }
+ //remove all spaces from the new name
+ $obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name']));
+ $obj->setVar('mod_version', $_POST['mod_version']);
+ $obj->setVar('mod_description', $_POST['mod_description']);
+ $obj->setVar('mod_author', $_POST['mod_author']);
+ $obj->setVar('mod_author_mail', $_POST['mod_author_mail']);
+ $obj->setVar('mod_author_website_url', $_POST['mod_author_website_url']);
+ $obj->setVar('mod_author_website_name', $_POST['mod_author_website_name']);
+ $obj->setVar('mod_credits', $_POST['mod_credits']);
+ $obj->setVar('mod_license', $_POST['mod_license']);
+ $obj->setVar('mod_release_info', $_POST['mod_release_info']);
+ $obj->setVar('mod_release_file', $_POST['mod_release_file']);
+ $obj->setVar('mod_manual', $_POST['mod_manual']);
+ $obj->setVar('mod_manual_file', $_POST['mod_manual_file']);
+ $obj->setVar('mod_demo_site_url', $_POST['mod_demo_site_url']);
+ $obj->setVar('mod_demo_site_name', $_POST['mod_demo_site_name']);
+ $obj->setVar('mod_support_url', $_POST['mod_support_url']);
+ $obj->setVar('mod_support_name', $_POST['mod_support_name']);
+ $obj->setVar('mod_website_url', $_POST['mod_website_url']);
+ $obj->setVar('mod_website_name', $_POST['mod_website_name']);
+ $obj->setVar('mod_release', $_POST['mod_release']);
+ $obj->setVar('mod_status', $_POST['mod_status']);
+ $obj->setVar('mod_admin', $_REQUEST['mod_admin']);
+ $obj->setVar('mod_user', $_REQUEST['mod_user']);
+ $obj->setVar('mod_search', $_REQUEST['mod_search']);
+ $obj->setVar('mod_comments', $_REQUEST['mod_comments']);
+ $obj->setVar('mod_notifications', $_REQUEST['mod_notifications']);
+ $obj->setVar('mod_donations', $_POST['mod_donations']);
+ $obj->setVar('mod_subversion', $_POST['mod_subversion']);
+
+ if ($modulesHandler->insert($obj)) {
+ redirect_header('modules.php?op=list', 2, _AM_TDMCREATE_FORMOK);
+ }
+ break;
+
+ case "new":
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $modulesHandler->create();
+ $form = $obj->getForm();
+ break;
+ case "edit":
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ $form = $obj->getForm();
+ break;
+ case "delete":
+ $obj =& $modulesHandler->get($_REQUEST['mod_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
+ {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($modulesHandler->delete($obj)) {
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE mod_id = ".$_REQUEST['mod_id']);
+ redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
+ }
+ break;
+ case "list":
+ default:
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('mod_id');
+ $criteria->setOrder('ASC');
+ $mod_arr = $modulesHandler->getall($criteria);
+ $numrows_modules = $modulesHandler->getCount();
+
+ if ( $numrows_modules > 0 )
+ {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '</tr>';
+ $class = 'odd';
+ foreach (array_keys($mod_arr) as $i)
+ {
+ $mod_id = $mod_arr[$i]->getVar('mod_id');
+ $mod_name = $mod_arr[$i]->getVar('mod_name');
+ $mod_image = $mod_arr[$i]->getVar('mod_image');
+ //$mod_blocks = $mod_arr[$i]->getVar('mod_blocks');
+ $mod_admin = $mod_arr[$i]->getVar('mod_admin');
+ $mod_user = $mod_arr[$i]->getVar('mod_user');
+ $admin = ($mod_admin == 1) ? _YES : _NO;
+ $user = ($mod_user == 1) ? _YES : _NO;
+ echo '<tr class="odd center">';
+ echo '<td><b>'.$i.'</b></td>';
+ $nbsps = ' ';
+ echo '<td class="left">'.$nbsps.'<img src="../images/icons/16/arrow.gif" alt="Arrow" />'.$nbsps.'<b>'.$mod_name.'</b></td>';
+ echo '<td><img src="../images/uploads/modules/'.$mod_image.'" height="30px" /></td>';
+ echo '<td>'.$admin.'</td>';
+ echo '<td>'.$user.'</td>';
+ echo '<td>';
+ echo '<a href="modules.php?op=edit&mod_id='.$mod_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._EDIT.'" title="'._EDIT.'" /></a> <a href="modules.php?op=delete&mod_id='.$mod_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._DELETE.'" title="'._DELETE.'" /></a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table><br><br>';
+ } else {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '</tr></table><br><br>';
+ }
+ break;
+}
+include_once "admin_footer.php";
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php 2013-04-07 19:09:40 UTC (rev 11358)
@@ -0,0 +1,470 @@
+<?php
+/*
+ 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.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: tables.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+include_once 'admin_header.php';
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+echo $adminMenu->addNavigation('tables.php');
+$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
+switch ($op) {
+ case 'save_table':
+ if (isset($_REQUEST['table_id'])) {
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ } else {
+ $obj =& $tablesHandler->create();
+ }
+
+ //Module Name
+ $modules =& $modulesHandler->get($_REQUEST['table_mid']);
+ $mod_name = $modules->getVar('mod_name');
+
+ $obj->setVar('table_mid', $_REQUEST['table_mid']);
+
+ if ( $_REQUEST['select'] == 1 )
+ {
+ $obj->setVar('table_name', 'categories');
+ $obj->setVar('table_category', 1);
+ $obj->setVar('table_fieldname', 'cat');
+ $obj->setVar('table_blocks', 0);
+ $obj->setVar('table_admin', 1);
+ $obj->setVar('table_user', 1);
+ $obj->setVar('table_status', 0);
+ $obj->setVar('table_waiting', 0);
+ $obj->setVar('table_online', 0);
+ $obj->setVar('table_search', 0);
+ $obj->setVar('table_comments', 0);
+ $obj->setVar('table_notifications', 0);
+ $obj->setVar('table_nbfields', 7);
+
+ $table_fields = 'cat_id:int:8:unsigned:NOT NULL: :primary|cat_pid:int:5:unsigned:NOT NULL:0:unique|cat_title:varchar:255: :NOT NULL: :unique|cat_desc:text: : :NOT NULL: :|cat_image:varchar:255: :NOT NULL: :|cat_weight:int:5:unsigned:NOT NULL:0:|cat_color:varchar:10: :NULL: :';
+
+ $table_parameters = 'XoopsFormCategory:0:0:0:0:0:1|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
+
+ //Image
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+
+ if(is_dir($pathIcon32)){
+ $uploaddir = $pathIcon32;
+ }else{
+ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/";
+ }
+
+ $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ;
+ $name_img = 'category.'.$extension;
+ $uploader->setTargetFileName($name_img);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $obj->setVar('table_image', $uploader->getSavedFileName());
+ }
+ } else {
+ $obj->setVar('table_image', $_REQUEST['table_image1']);
+ }
+ } else {
+
+ $obj->setVar('table_name', strtolower($_REQUEST['table_name']));
+ $obj->setVar('table_fieldname', strtolower($_REQUEST['table_fieldname']));
+ $obj->setVar('table_nbfields', $_REQUEST['table_nbfields']);
+ $obj->setVar('table_blocks', $_REQUEST['table_blocks']);
+ $obj->setVar('table_admin', $_REQUEST['table_admin']);
+ $obj->setVar('table_user', $_REQUEST['table_user']);
+ $obj->setVar('table_status', $_REQUEST['table_status']);
+ $obj->setVar('table_waiting', $_REQUEST['table_waiting']);
+ $obj->setVar('table_online', $_REQUEST['table_online']);
+ $obj->setVar('table_search', $_REQUEST['table_search']);
+ $obj->setVar('table_comments', $_REQUEST['table_comments']);
+ $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+
+ $table_fields = '';
+ $table_parameters = '';
+ for($i=0; $i<$_REQUEST['table_nbfields']; $i++)
+ {
+ //Additions of parameters: text: on: off: ...
+ if ( $i != 0 ) {
+ $table_parameters .= ( !empty($_REQUEST['fields_param_elements'][$i]) ) ? "".$_REQUEST['fields_param_elements'][$i].":" : " :";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_admin'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_user'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_blocks'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( $i == $_REQUEST['fields_param_main_field']) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_search_field'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_required_field'][$i]) ) ? "1" : "0";
+ }
+
+ //Additions of fields: test: int: 4: ...
+ $table_fields .= (!empty($_REQUEST['fields_name'][$i])) ? $_REQUEST['fields_name'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_type'][$i])) ? $_REQUEST['fields_type'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_value'][$i])) ? $_REQUEST['fields_value'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_attributes'][$i])) ? $_REQUEST['fields_attributes'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_null'][$i])) ? strtoupper($_REQUEST['fields_null'][$i]).":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_default'][$i])) ? $_REQUEST['fields_default'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_index'][$i])) ? $_REQUEST['fields_index'][$i]."" : " ";
+
+ // Break between fields and between the parameters
+ if ( $i != $_REQUEST['table_nbfields'] - 1) {
+ $table_fields .= '|';
+ if ( $i != 0 )
+ $table_parameters .= '|';
+ } else {
+ if ( isset($_REQUEST['table_status']) ) {
+ if ( $_REQUEST['table_status'] == 1 ) {
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_status:int:10:unsigned:NOT NULL:0:';
+ $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ }
+ } else {
+ $table_fields .= '';
+ $table_parameters .= '';
+ }
+ if ( isset($_REQUEST['table_waiting']) ) {
+ if ( $_REQUEST['table_waiting'] == 1 ) {
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_waiting:int:10:unsigned:NOT NULL:0:';
+ $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ }
+ } else {
+ $table_fields .= '';
+ $table_parameters .= '';
+ }
+ if ( isset($_REQUEST['table_online']) ) {
+ if ( $_REQUEST['table_online'] == 1 ) {
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1: unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ }
+ } else {
+ $table_fields .= '';
+ $table_parameters .= '';
+ }
+ }
+ }
+ }
+ $obj->setVar('table_fields', $table_fields);
+ $obj->setVar('table_parameters', $table_parameters);
+
+ if ($tablesHandler->insert($obj))
+ {
+ redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
+ }
+
+ break;
+
+ case 'table_save_fields':
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+
+ if (isset($_REQUEST['table_id'])) {
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ } else {
+ $obj =& $tablesHandler->create();
+ }
+ //Module Name
+ $modules =& $modulesHandler->get($_REQUEST['table_mid']);
+ $mod_name = $modules->getVar('mod_name');
+
+ //Image
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ if(is_dir($pathIcon32)){
+ $uploaddir = $pathIcon32;
+ }else{
+ $uploaddir = XOOPS_ROOT_PATH . '/modules/'.$xoopsModule->dirname().'/images/uploads/tables/';
+ }
+ $uploader = new XoopsMediaUploader($uploaddir, 'gif|jpeg|pjpeg|png', 104857600, null, null);
+
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']) ;
+ $name_img = $_REQUEST['table_name'].'.'.$extension;
+ $uploader->setTargetFileName($name_img);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header('javascript:history.go(-1)', 3, $errors);
+ } else {
+ $obj->setVar('table_image', $uploader->getSavedFileName());
+ }
+ } else {
+ $obj->setVar('table_image', $_REQUEST['table_image']);
+ }
+
+
+ $oldname = $obj->getVar('table_fieldname');
+
+ $obj->setVar('table_mid', strtolower($_POST['table_mid']));
+ $obj->setVar('table_name', strtolower($_POST['table_name']));
+ $obj->setVar('table_fieldname', strtolower($_POST['table_fieldname']));
+ $obj->setVar('table_nbfields', $_POST['table_nbfields']);
+ $obj->setVar('table_blocks', $_REQUEST['table_blocks']);
+ $obj->setVar('table_admin', $_REQUEST['table_admin']);
+ $obj->setVar('table_user', $_REQUEST['table_user']);
+ $obj->setVar('table_status', $_REQUEST['table_status']);
+ $obj->setVar('table_waiting', $_REQUEST['table_waiting']);
+ $obj->setVar('table_online', $_REQUEST['table_online']);
+ $obj->setVar('table_search', $_REQUEST['table_search']);
+ $obj->setVar('table_comments', $_REQUEST['table_comments']);
+ $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+
+ $table_fields = $obj->getVar('table_fields');
+ $table_nbfields=$_REQUEST['table_nbfields'];
+
+ $fields_total = explode('|', $table_fields);
+ $count_fields = count($fields_total);
+
+ $newname = strtolower($_REQUEST['table_fieldname']);
+ //echo $count_parameters;
+ //fields
+ for($i=0; $i<$count_fields; $i++)
+ {
+ $fields = explode(":", $fields_total[$i]);
+ $fields[0] = $newname . substr($fields[0], stripos($fields[0], '_'));
+ $newfields[$i] = implode(":", $fields);
+ }
+
+ $newTableFields=implode("|",$newfields);
+ $obj->setVar('table_fields', $newTableFields);
+
+ if ($tablesHandler->insert($obj)) {
+ redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
+ }
+ break;
+
+ case "edit_table":
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ $form = $obj->getFormTable();
+ break;
+
+ case "edit_fields":
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ $form = $obj->getFormEditFields(false, $_REQUEST['table_id']);
+ break;
+
+ case "delete_table":
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($tablesHandler->delete($obj)) {
+ redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'table_id' => $_REQUEST['table_id'], 'op' => 'delete_table'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('table_name')));
+ }
+ break;
+
+ case "table_fields":
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=table_fields', 'add');
+ echo $adminMenu->renderButton();
+
+ //fields existe deja ?
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('table_mid', $_REQUEST['table_mid']));
+ $criteria->add(new Criteria('table_name', $_REQUEST['table_name']));
+ $nb_tables1 = $tablesHandler->getCount($criteria);
+
+ if ( $nb_tables1 < 1 )
+ {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['table_id'])) {
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ } else {
+ $obj =& $tablesHandler->create();
+ }
+ $table_blocks = (isset($_REQUEST['table_blocks'])) ? $_REQUEST['table_blocks'] : '0';
+ $table_display_admin = (isset($_REQUEST['table_admin'])) ? $_REQUEST['table_admin'] : '0';
+ $table_display_user = (isset($_REQUEST['table_user']...
[truncated message content] |