|
From: <txm...@us...> - 2015-07-03 12:44:49
|
Revision: 13095
http://sourceforge.net/p/xoops/svn/13095
Author: txmodxoops
Date: 2015-07-03 12:44:44 +0000 (Fri, 03 Jul 2015)
Log Message:
-----------
Fixed small bugs
Refactoring
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/css/admin/style.css
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/assets/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/SplClassLoader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/autoload.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/building.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateAbstract.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateArchitecture.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateHtmlSmartyCodes.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateMoreFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateStructure.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreateTableFields.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminAbout.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminMenu.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPermissions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/admin/AdminPhpCode.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/blocks/BlocksFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassFormElements.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/classes/ClassHelper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/css/CssStyles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/docs/DocsChangelog.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/docs/DocsFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommentFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeCommon.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeFunctions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeInstall.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeJquery.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeNotifications.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/include/IncludeUpdate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageAdmin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageBlocks.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageDefines.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageHelp.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageMailTpl.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageMain.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/language/LanguageModinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/sql/SqlFile.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminAbout.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/admin/TemplatesAdminPermissions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/blocks/TemplatesBlocks.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserBreadcrumbs.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserBroken.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserDisqusComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFacebookComments.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPagesList.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPdf.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserPrint.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserRate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserRss.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSingle.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserSubmit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserBroken.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserFooter.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserHeader.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserIndex.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserListTag.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserNotificationUpdate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserObjects.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPages.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPdf.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserPrint.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserRate.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserRss.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSearch.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSingle.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserSubmit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserViewTag.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserVisit.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/user/UserXoopsVersion.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRadio.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormRaw.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTab.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateFormTabTray.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/form/TDMCreateThemeForm.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/helper.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/html/TDMCreateFormLabel.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/morefiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/session.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/settings.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/common.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/install.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/include/update.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_settings.tpl
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/templates/admin/tdmcreate_tables.tpl
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/TDMCreatePhpCode.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserCategories.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserCategoriesList.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/class/files/templates/user/TemplatesUserMoreFiles.php
XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/language/lang.diff
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/about.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,19 +10,21 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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 __DIR__ . '/header.php';
+include __DIR__.'/header.php';
$templateMain = 'tdmcreate_about.tpl';
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('about.php'));
-$about = $adminMenu->renderAbout('7LFE862PGJN88', false);
+$about = $adminMenu->renderAbout('7LFE862PGJN88', false);
$aboutRes = TDMCreate_MakeDonationForm($about);
$GLOBALS['xoopsTpl']->assign('about', $aboutRes);
-include __DIR__ . '/footer.php';
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/building.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,26 +10,29 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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 12258 2014-01-02 09:33:29Z timgno $
*/
-include __DIR__ . '/header.php';
-$op = XoopsRequest::getString('op', 'default');
-$mid = XoopsRequest::getInt('mod_id');
+include __DIR__.'/header.php';
+$op = XoopsRequest::getString('op', 'default');
+$mid = XoopsRequest::getInt('mod_id');
$moduleObj = $tdmcreate->getHandler('modules')->get($mid);
+$cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache';
// Clear cache
-if (file_exists($cacheFile1 = TDMC_CLASSES_PATH . '/cache/classpaths.cache') &&
- file_exists($cacheFile2 = TDMC_CLASSES_PATH . '/files/cache/classpaths.cache')) {
- if (unlink($cacheFile1) && unlink($cacheFile2)) {
- redirect_header('building.php?op=build', 5, _AM_TDMCREATE_BUILDING_DELETED_CACHE_FILES);
- }
+if (file_exists($cache = $cachePath.'/classpaths.cache')) {
+ unlink($cache);
}
+if (!file_exists($indexFile = $cachePath.'/index.html')) {
+ copy('index.html', $indexFile);
+}
// Switch option
switch ($op) {
case 'build':
@@ -37,8 +41,8 @@
// Get var module dirname
$moduleDirname = $moduleObj->getVar('mod_dirname');
// Directories for copy from to
- $fromDir = TDMC_UPLOAD_REPOSITORY_PATH . '/' . strtolower($moduleDirname);
- $toDir = XOOPS_ROOT_PATH . '/modules/' . strtolower($moduleDirname);
+ $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.strtolower($moduleDirname);
+ $toDir = XOOPS_ROOT_PATH.'/modules/'.strtolower($moduleDirname);
if (isset($moduleDirname)) {
// Clear this module if it's in repository
if (is_dir($fromDir)) {
@@ -50,11 +54,11 @@
}
}
// Structure
- include_once TDMC_CLASSES_PATH . '/files/TDMCreateArchitecture.php';
+ include_once TDMC_CLASSES_PATH.'/files/TDMCreateArchitecture.php';
$handler = TDMCreateArchitecture::getInstance();
// Creation of the structure of folders and files
- $base_architecture = $handler->createBaseFoldersFiles($moduleObj);
- if (false !== $base_architecture) {
+ $baseArchitecture = $handler->createBaseFoldersFiles($moduleObj);
+ if (false !== $baseArchitecture) {
$GLOBALS['xoopsTpl']->assign('base_architecture', true);
} else {
$GLOBALS['xoopsTpl']->assign('base_architecture', false);
@@ -65,8 +69,8 @@
foreach ($files as $file) {
if ($file) {
$build['list'] = $file;
- }
- $GLOBALS['xoopsTpl']->append('builds', $build);
+ $GLOBALS['xoopsTpl']->append('builds', $build);
+ }
}
unset($build);
// Directory to saved all files
@@ -87,10 +91,10 @@
redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES);
}
unset($nbModules);
- include_once TDMC_PATH . '/class/building.php';
+ include_once TDMC_PATH.'/class/building.php';
$handler = TDMCreateBuilding::getInstance();
- $form = $handler->getForm();
+ $form = $handler->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
}
-include __DIR__ . '/footer.php';
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/fields.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
-<?php
+<?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
@@ -9,16 +10,18 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: 1.91 fields.php 12258 2014-01-02 09:33:29Z timgno $
*/
-include __DIR__ . '/header.php';
+include __DIR__.'/header.php';
// Recovered value of arguments op in the URL $
$op = XoopsRequest::getString('op', 'list');
// Get fields Variables
@@ -27,187 +30,167 @@
$fieldNumb = XoopsRequest::getInt('field_numb');
$fieldName = XoopsRequest::getString('field_name', '');
// switch op
-switch ($op)
-{
- case 'list':
+switch ($op) {
+ case 'list':
default:
$start = XoopsRequest::getInt('start', 0);
- $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
- // Define main template
- $templateMain = 'tdmcreate_fields.tpl';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' );
- $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
- $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
- $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.js');
- $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
- $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
- $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
- $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
- $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
- // Redirect if there aren't modules
- $modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
- if ( $modulesCount == 0 ) {
- redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES );
- }
- unset($modulesCount);
- // Redirect if there aren't tables
- $tablesCount = $tdmcreate->getHandler('tables')->getCountTables();
- if ($tablesCount == 0) {
- redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES );
- }
- // Get the list of tables
- $tablesAll = $tdmcreate->getHandler('tables')->getAllTables($start, $limit);
- if ($tablesCount > 0)
- {
- $tlid = 1;
- foreach (array_keys($tablesAll) as $tid)
- {
- // Display tables list
- $table = $tablesAll[$tid]->getValues();
- $talid = array('lid' => $tlid);
- $table = array_merge($table, $talid);
+ $limit = XoopsRequest::getInt('limit', $tdmcreate->getConfig('tables_adminpager'));
+ // Define main template
+ $templateMain = 'tdmcreate_fields.tpl';
+ $GLOBALS['xoTheme']->addStylesheet('modules/tdmcreate/assets/css/admin/style.css');
+ $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/functions.js');
+ $GLOBALS['xoTheme']->addScript('modules/tdmcreate/assets/js/sortable.js');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16);
+ // Redirect if there aren't modules
+ $modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
+ if ($modulesCount == 0) {
+ redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES);
+ }
+ unset($modulesCount);
+ // Redirect if there aren't tables
+ $tablesCount = $tdmcreate->getHandler('tables')->getCountTables();
+ if ($tablesCount == 0) {
+ redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES);
+ }
+ // Get the list of tables
+ $tablesAll = $tdmcreate->getHandler('tables')->getAllTables($start, $limit);
+ if ($tablesCount > 0) {
+ $tlid = 1;
+ foreach (array_keys($tablesAll) as $tid) {
+ // Display tables list
+ $table = $tablesAll[$tid]->getValues();
+ $talid = array('lid' => $tlid);
+ $table = array_merge($table, $talid);
// Get the list of fields
- $fieldsCount = $tdmcreate->getHandler('fields')->getCountFields();
- $fieldsAll = $tdmcreate->getHandler('fields')->getAllFieldsByModuleAndTableId($table['mid'], $tid);
- // Display fields list
- $fields = array();
- $lid = 1;
- if ( $fieldsCount > 0 )
- {
- foreach (array_keys($fieldsAll) as $fid)
- {
- $field = $fieldsAll[$fid]->getValues();
- $falid = array('lid' => $lid);
- $fields[] = array_merge($field, $falid);
- unset($field);
- ++$lid;
- }
- }
- ++$tlid;
- unset($lid);
- $table['fields'] = $fields;
- $GLOBALS['xoopsTpl']->append('tables_list', $table);
- unset($table);
- }
- unset($tlid);
- unset($fields);
- if ( $tablesCount > $limit ) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($tablesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
- $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
- }
- } else {
- $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS);
- }
- break;
-
- case 'new':
- // Define main template
- $templateMain = 'tdmcreate_fields.tpl';
- $GLOBALS['xoTheme']->addStylesheet( 'modules/tdmcreate/assets/css/admin/style.css' );
- $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
- $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
- $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
- $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- // Form Add
- $fieldsObj =& $tdmcreate->getHandler('fields')->create();
- $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
- break;
-
- case 'save':
- //
- if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ $fieldsCount = $tdmcreate->getHandler('fields')->getCountFields();
+ $fieldsAll = $tdmcreate->getHandler('fields')->getAllFieldsByModuleAndTableId($table['mid'], $tid);
+ // Display fields list
+ $fields = array();
+ $lid = 1;
+ if ($fieldsCount > 0) {
+ foreach (array_keys($fieldsAll) as $fid) {
+ $field = $fieldsAll[$fid]->getValues();
+ $falid = array('lid' => $lid);
+ $fields[] = array_merge($field, $falid);
+ unset($field);
+ ++$lid;
+ }
+ }
+ ++$tlid;
+ unset($lid);
+ $table['fields'] = $fields;
+ $GLOBALS['xoopsTpl']->append('tables_list', $table);
+ unset($table);
+ }
+ unset($tlid);
+ unset($fields);
+ if ($tablesCount > $limit) {
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $pagenav = new XoopsPageNav($tablesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
+ $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
+ }
+ } else {
+ $GLOBALS['xoopsTpl']->assign('error', _AM_TDMCREATE_THEREARENT_FIELDS);
+ }
+ break;
+
+ case 'new':
+ // Define main template
+ $templateMain = 'tdmcreate_fields.tpl';
+ $GLOBALS['xoTheme']->addStylesheet('modules/tdmcreate/assets/css/admin/style.css');
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
+ $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ // Form Add
+ $fieldsObj = &$tdmcreate->getHandler('fields')->create();
+ $form = $fieldsObj->getFormNew($fieldMid, $fieldTid, $fieldNumb, $fieldName);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'save':
+ //
+ if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- $fieldId = XoopsRequest::getInt('field_id');
- // Fields Handler
- $fields = $tdmcreate->getHandler('fields');
- $fieldOrder = 1;
- // Set Variables
- foreach($_POST['field_id'] as $key => $value)
- {
- if(isset($value)){
- $fieldsObj =& $fields->get($value);
- } else {
- $fieldsObj =& $fields->create();
- }
- $order = $fieldsObj->isNew() ? $fieldOrder : $_GET['field_order'][$key];
- // Set Data
- $fieldsObj->setVar( 'field_mid', $fieldMid );
- $fieldsObj->setVar( 'field_tid', $fieldTid );
- $fieldsObj->setVar( 'field_order', $order );
- $fieldsObj->setVar( 'field_name', $_POST['field_name'][$key]);
- $fieldsObj->setVar( 'field_type', $_POST['field_type'][$key]);
- $fieldsObj->setVar( 'field_value', $_POST['field_value'][$key]);
- $fieldsObj->setVar( 'field_attribute', $_POST['field_attribute'][$key]);
- $fieldsObj->setVar( 'field_null', $_POST['field_null'][$key]);
- $fieldsObj->setVar( 'field_default', $_POST['field_default'][$key]);
- $fieldsObj->setVar( 'field_key', $_POST['field_key'][$key]);
- $fieldsObj->setVar( 'field_element', $_POST['field_element'][$key]);
- $fieldsObj->setVar( 'field_parent', (1 == $_REQUEST['field_parent'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_admin', (1 == $_REQUEST['field_admin'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_inlist', (1 == $_REQUEST['field_inlist'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_inform', (1 == $_REQUEST['field_inform'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_user', (1 == $_REQUEST['field_user'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_thead', (1 == $_REQUEST['field_thead'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_tbody', (1 == $_REQUEST['field_tbody'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_tfoot', (1 == $_REQUEST['field_tfoot'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_block', (1 == $_REQUEST['field_block'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_main', ($key == $_REQUEST['field_main'] ? 1 : 0));
- $fieldsObj->setVar( 'field_search', (1 == $_REQUEST['field_search'][$key]) ? 1 : 0);
- $fieldsObj->setVar( 'field_required', (1 == $_REQUEST['field_required'][$key]) ? 1 : 0);
- // Insert Data
- $tdmcreate->getHandler('fields')->insert($fieldsObj);
- ++$fieldOrder;
- }
- unset($fieldOrder);
- // Get table name from field table id
- $tables =& $tdmcreate->getHandler('tables')->get($fieldTid);
- $tableName = $tables->getVar('table_name');
- // Set field elements
- if ($fieldsObj->isNew()) {
- // Fields Elements Handler
- /*$fieldelementObj =& $tdmcreate->getHandler('fieldelements')->create();
- $fieldelementObj->setVar( 'fieldelement_mid', $fieldMid );
- $fieldelementObj->setVar( 'fieldelement_tid', $fieldTid );
- $fieldelementObj->setVar( 'fieldelement_name', 'Table : '.ucfirst($tableName) );
- $fieldelementObj->setVar( 'fieldelement_value', 'XoopsFormTables-'.ucfirst($tableName) );
- // Insert new field element id for table name
- if (!$tdmcreate->getHandler('fieldelements')->insert($fieldelementObj) ) {
- $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element');
- }*/
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_SAVED_OK, $tableName));
- } else {
- // Needed code from table name by field_tid
- redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_UPDATED_OK, $tableName));
- }
+ }
+ $fieldId = XoopsRequest::getInt('field_id');
+ // Fields Handler
+ $fields = $tdmcreate->getHandler('fields');
+ $fieldOrder = 1;
+ // Set Variables
+ foreach ($_POST['field_id'] as $key => $value) {
+ if (isset($value)) {
+ $fieldsObj = &$fields->get($value);
+ } else {
+ $fieldsObj = &$fields->create();
+ }
+ $order = $fieldsObj->isNew() ? $fieldOrder : $_GET['field_order'][$key];
+ // Set Data
+ $fieldsObj->setVar('field_mid', $fieldMid);
+ $fieldsObj->setVar('field_tid', $fieldTid);
+ $fieldsObj->setVar('field_order', $order);
+ $fieldsObj->setVar('field_name', $_POST['field_name'][$key]);
+ $fieldsObj->setVar('field_type', $_POST['field_type'][$key]);
+ $fieldsObj->setVar('field_value', $_POST['field_value'][$key]);
+ $fieldsObj->setVar('field_attribute', $_POST['field_attribute'][$key]);
+ $fieldsObj->setVar('field_null', $_POST['field_null'][$key]);
+ $fieldsObj->setVar('field_default', $_POST['field_default'][$key]);
+ $fieldsObj->setVar('field_key', $_POST['field_key'][$key]);
+ $fieldsObj->setVar('field_element', $_POST['field_element'][$key]);
+ $fieldsObj->setVar('field_parent', (1 == $_REQUEST['field_parent'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_admin', (1 == $_REQUEST['field_admin'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_inlist', (1 == $_REQUEST['field_inlist'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_inform', (1 == $_REQUEST['field_inform'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_user', (1 == $_REQUEST['field_user'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_thead', (1 == $_REQUEST['field_thead'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_tbody', (1 == $_REQUEST['field_tbody'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_tfoot', (1 == $_REQUEST['field_tfoot'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_block', (1 == $_REQUEST['field_block'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_main', ($key == $_REQUEST['field_main'] ? 1 : 0));
+ $fieldsObj->setVar('field_search', (1 == $_REQUEST['field_search'][$key]) ? 1 : 0);
+ $fieldsObj->setVar('field_required', (1 == $_REQUEST['field_required'][$key]) ? 1 : 0);
+ // Insert Data
+ $tdmcreate->getHandler('fields')->insert($fieldsObj);
+ ++$fieldOrder;
+ }
+ unset($fieldOrder);
+ // Get table name from field table id
+ $tables = &$tdmcreate->getHandler('tables')->get($fieldTid);
+ $tableName = $tables->getVar('table_name');
+ // Set field elements
+ if ($fieldsObj->isNew()) {
+ // Fields Elements Handler
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_SAVED_OK, $tableName));
+ } else {
+ // Needed code from table name by field_tid
+ redirect_header('fields.php', 2, sprintf(_AM_TDMCREATE_FIELDS_FORM_UPDATED_OK, $tableName));
+ }
//
- $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
- $form = $fieldsObj->getForm(null, $fieldTid);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
- break;
-
- case 'edit':
- // Define main template
- $templateMain = 'tdmcreate_fields.tpl';
- $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
- $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
- $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
- $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
- $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- // Form Edit
- $fieldId = XoopsRequest::getInt('field_id');
- $fieldsObj = $tdmcreate->getHandler('fields')->get( $fieldId );
- $form = $fieldsObj->getFormEdit($fieldMid, $fieldTid);
- $GLOBALS['xoopsTpl']->assign('form', $form->render());
- break;
-
- case 'order':
+ $GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
+ $form = $fieldsObj->getForm(null, $fieldTid);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'edit':
+ // Define main template
+ $templateMain = 'tdmcreate_fields.tpl';
+ $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
+ $adminMenu->addItemButton(_AM_TDMCREATE_FIELDS_LIST, 'fields.php', 'list');
+ $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
+ // Form Edit
+ $fieldId = XoopsRequest::getInt('field_id');
+ $fieldsObj = $tdmcreate->getHandler('fields')->get($fieldId);
+ $form = $fieldsObj->getFormEdit($fieldMid, $fieldTid);
+ $GLOBALS['xoopsTpl']->assign('form', $form->render());
+ break;
+
+ case 'order':
// Initialize fields handler
$fieldsObj = $tdmcreate->getHandler('fields');
if (isset($_POST['forder'])) {
@@ -228,67 +211,67 @@
exit;
break;
- case 'delete':
- $tablesObj =& $tdmcreate->getHandler('tables')->get($fieldTid);
- if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
- if ( !$GLOBALS['xoopsSecurity']->check() ) {
- redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- if ($tdmcreate->getHandler('tables')->delete($tablesObj)) {
- redirect_header('fields.php', 3, _AM_TDMCREATE_FORMDELOK);
- } else {
- echo $tablesObj->getHtmlErrors();
- }
- } else {
- xoops_confirm(array('ok' => 1, 'field_tid' => $fieldTid, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $tablesObj->getVar('table_name')));
- }
- break;
-
- case 'display':
+ case 'delete':
+ $tablesObj = &$tdmcreate->getHandler('tables')->get($fieldTid);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($tdmcreate->getHandler('tables')->delete($tablesObj)) {
+ redirect_header('fields.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $tablesObj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'field_tid' => $fieldTid, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $tablesObj->getVar('table_name')));
+ }
+ break;
+
+ case 'display':
$fieldId = tdmcreate_CleanVars($_POST, 'field_id', 0, 'int');
if ($fieldId > 0) {
$fieldsObj = $tdmcreate->getHandler('fields')->get($fieldId);
- if (isset($_POST['field_parent'])) {
- $field_parent = $fieldsObj->getVar('field_parent');
- $fieldsObj->setVar('field_parent', !$field_parent);
- }
- if (isset($_POST['field_inlist'])) {
- $field_inlist = $fieldsObj->getVar('field_inlist');
- $fieldsObj->setVar('field_inlist', !$field_inlist);
- }
- if (isset($_POST['field_inform'])) {
- $field_inform = $fieldsObj->getVar('field_inform');
- $fieldsObj->setVar('field_inform', !$field_inform);
- }
- if (isset($_POST['field_admin'])) {
- $field_admin = $fieldsObj->getVar('field_admin');
- $fieldsObj->setVar('field_admin', !$field_admin);
- }
- if (isset($_POST['field_user'])) {
- $field_user = $fieldsObj->getVar('field_user');
- $fieldsObj->setVar('field_user', !$field_user);
- }
- if (isset($_POST['field_block'])) {
- $field_block = $fieldsObj->getVar('field_block');
- $fieldsObj->setVar('field_block', !$field_block);
- }
- if (isset($_POST['field_main'])) {
- $field_main = $fieldsObj->getVar('field_main');
- $fieldsObj->setVar('field_main', !$field_main);
- }
- if (isset($_POST['field_search'])) {
- $field_search = $fieldsObj->getVar('field_search');
- $fieldsObj->setVar('field_search', !$field_search);
- }
- if (isset($_POST['field_required'])) {
- $field_required = $fieldsObj->getVar('field_required');
- $fieldsObj->setVar('field_required', !$field_required);
- }
+ if (isset($_POST['field_parent'])) {
+ $field_parent = $fieldsObj->getVar('field_parent');
+ $fieldsObj->setVar('field_parent', !$field_parent);
+ }
+ if (isset($_POST['field_inlist'])) {
+ $field_inlist = $fieldsObj->getVar('field_inlist');
+ $fieldsObj->setVar('field_inlist', !$field_inlist);
+ }
+ if (isset($_POST['field_inform'])) {
+ $field_inform = $fieldsObj->getVar('field_inform');
+ $fieldsObj->setVar('field_inform', !$field_inform);
+ }
+ if (isset($_POST['field_admin'])) {
+ $field_admin = $fieldsObj->getVar('field_admin');
+ $fieldsObj->setVar('field_admin', !$field_admin);
+ }
+ if (isset($_POST['field_user'])) {
+ $field_user = $fieldsObj->getVar('field_user');
+ $fieldsObj->setVar('field_user', !$field_user);
+ }
+ if (isset($_POST['field_block'])) {
+ $field_block = $fieldsObj->getVar('field_block');
+ $fieldsObj->setVar('field_block', !$field_block);
+ }
+ if (isset($_POST['field_main'])) {
+ $field_main = $fieldsObj->getVar('field_main');
+ $fieldsObj->setVar('field_main', !$field_main);
+ }
+ if (isset($_POST['field_search'])) {
+ $field_search = $fieldsObj->getVar('field_search');
+ $fieldsObj->setVar('field_search', !$field_search);
+ }
+ if (isset($_POST['field_required'])) {
+ $field_required = $fieldsObj->getVar('field_required');
+ $fieldsObj->setVar('field_required', !$field_required);
+ }
if ($tdmcreate->getHandler('fields')->insert($fieldsObj)) {
redirect_header('fields.php', 3, _AM_TDMCREATE_TOGGLE_SUCCESS);
}
$GLOBALS['xoopsTpl']->assign('error', $fieldsObj->getHtmlErrors());
- }
- break;
+ }
+ break;
}
-include __DIR__ . '/footer.php';
\ No newline at end of file
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/footer.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/footer.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,13 +10,15 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: footer.php 12207 2013-10-23 02:46:52Z beckmi $
*/
$GLOBALS['xoopsTpl']->assign('module_name', $GLOBALS['xoopsModule']->getVar('name'));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/header.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/header.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,32 +10,34 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: header.php 12258 2014-01-02 09:33:29Z timgno $
*/
-include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
-include_once dirname(__DIR__) . '/include/common.php';
+include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
+include_once dirname(__DIR__).'/include/common.php';
//
$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
// Link System Icons
$sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16');
$sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32');
// Link Local Icons
-$modPathIcon16 = $GLOBALS['xoopsModule']->getInfo('modicons16');
-$modPathIcon32 = $GLOBALS['xoopsModule']->getInfo('modicons32');
+$modPathIcon16 = $GLOBALS['xoopsModule']->getInfo('modicons16');
+$modPathIcon32 = $GLOBALS['xoopsModule']->getInfo('modicons32');
$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
// TDMCreate Instance
$tdmcreate = TDMCreateHelper::getInstance();
// MyTextSanitizer
-$myts =& MyTextSanitizer::getInstance();
+$myts = &MyTextSanitizer::getInstance();
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH . "/class/template.php");
+ include_once XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();
}
// System Icons
@@ -48,10 +51,10 @@
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');
+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);
+ redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING, false);
}
xoops_cp_header();
$adminMenu = new ModuleAdmin();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/index.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,42 +10,46 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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: index.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include __DIR__ . '/header.php';
+include __DIR__.'/header.php';
+$countSettings = $tdmcreate->getHandler('settings')->getCount();
$countModules = $tdmcreate->getHandler('modules')->getCount();
-$countTables = $tdmcreate->getHandler('tables')->getCount();
-$countFields = $tdmcreate->getHandler('fields')->getCount();
-$countFiles = $tdmcreate->getHandler('morefiles')->getCount();
+$countTables = $tdmcreate->getHandler('tables')->getCount();
+$countFields = $tdmcreate->getHandler('fields')->getCount();
+$countFiles = $tdmcreate->getHandler('morefiles')->getCount();
unset($criteria);
$templateMain = 'tdmcreate_index.tpl';
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES);
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMMODULES . '</label>', $countModules, 'Green');
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMTABLES . '</label>', $countTables, 'Orange');
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMFIELDS . '</label>', $countFields, 'Gray');
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' . _AM_TDMCREATE_THEREARE_NUMFILES . '</label>', $countFiles, 'Red');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>'._AM_TDMCREATE_THEREARE_NUMSETTINGS.'</label>', $countSettings, 'Blue');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>'._AM_TDMCREATE_THEREARE_NUMMODULES.'</label>', $countModules, 'Green');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>'._AM_TDMCREATE_THEREARE_NUMTABLES.'</label>', $countTables, 'Orange');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>'._AM_TDMCREATE_THEREARE_NUMFIELDS.'</label>', $countFields, 'Gray');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>'._AM_TDMCREATE_THEREARE_NUMFILES.'</label>', $countFiles, 'Red');
// Upload Folders
$folder = array(
- TDMC_UPLOAD_PATH,
- TDMC_UPLOAD_REPOSITORY_PATH,
- TDMC_UPLOAD_IMGMOD_PATH,
- TDMC_UPLOAD_IMGTAB_PATH
+ TDMC_UPLOAD_PATH,
+ TDMC_UPLOAD_REPOSITORY_PATH,
+ TDMC_UPLOAD_IMGMOD_PATH,
+ TDMC_UPLOAD_IMGTAB_PATH,
);
// Uploads Folders Created
-foreach (array_keys( $folder) as $i) {
+foreach (array_keys($folder) as $i) {
$adminMenu->addConfigBoxLine($folder[$i], 'folder');
$adminMenu->addConfigBoxLine(array($folder[$i], '777'), 'chmod');
}
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('index.php'));
$GLOBALS['xoopsTpl']->assign('index', $adminMenu->renderIndex());
-include __DIR__ . '/footer.php';
+include __DIR__.'/footer.php';
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/menu.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,50 +10,53 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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'));
-$sysPathIcon32 = $moduleInfo->getInfo('sysicons32');
-$adminmenu = array();
-$i = 1;
+$module_handler = &xoops_gethandler('module');
+$xoopsModule = &XoopsModule::getByDirname('TDMCreate');
+$moduleInfo = &$module_handler->get($xoopsModule->getVar('mid'));
+$sysPathIcon32 = $moduleInfo->getInfo('sysicons32');
+$modPathIcon32 = $moduleInfo->getInfo('modicons32');
+$adminmenu = array();
+$i = 1;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU1;
-$adminmenu[$i]['link'] = 'admin/index.php';
-$adminmenu[$i]['icon'] = $sysPathIcon32 . '/dashboard.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/index.php';
+$adminmenu[$i]['icon'] = $sysPathIcon32.'/dashboard.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU2;
-$adminmenu[$i]['link'] = 'admin/settings.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/settings.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/settings.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/settings.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU3;
-$adminmenu[$i]['link'] = 'admin/modules.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/addmodule.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/modules.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/addmodule.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU4;
-$adminmenu[$i]['link'] = 'admin/tables.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/addtable.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/tables.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/addtable.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU5;
-$adminmenu[$i]['link'] = 'admin/fields.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/fields.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/fields.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/fields.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6;
-$adminmenu[$i]['link'] = 'admin/morefiles.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/files.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/morefiles.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/files.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU7;
-$adminmenu[$i]['link'] = 'admin/building.php';
-$adminmenu[$i]['icon'] = 'assets/icons/32/builder.png';
-$i++;
+$adminmenu[$i]['link'] = 'admin/building.php';
+$adminmenu[$i]['icon'] = $modPathIcon32.'/builder.png';
+++$i;
$adminmenu[$i]['title'] = _MI_TDMCREATE_ABOUT;
-$adminmenu[$i]['link'] = 'admin/about.php';
-$adminmenu[$i]['icon'] = $sysPathIcon32 . '/about.png';
+$adminmenu[$i]['link'] = 'admin/about.php';
+$adminmenu[$i]['icon'] = $sysPathIcon32.'/about.png';
unset($i);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php 2015-07-01 10:38:11 UTC (rev 13094)
+++ XoopsModules/TDMCreate/branches/timgno/1.91a3/tdmcreate/admin/modules.php 2015-07-03 12:44:44 UTC (rev 13095)
@@ -1,4 +1,5 @@
<?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
@@ -9,16 +10,18 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
- * tdmcreate module
+ * 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.5
+ *
* @author Txmod Xoops <su...@tx...>
+ *
* @version $Id: 1.59 modules.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include __DIR__ . '/header.php';
+include __DIR__.'/header.php';
// Recovered value of argument op in the URL $
$op = XoopsRequest::getString('op', 'list');
//
@@ -36,12 +39,10 @@
$GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'modules.php?op=new', 'add');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
- $GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
- $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
+ $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16);
$modulesCount = $tdmcreate->getHandler('modules')->getCountModules();
- $modulesAll = $tdmcreate->getHandler('modules')->getAllModules($start, $limit);
+ $modulesAll = $tdmcreate->getHandler('modules')->getAllModules($start, $limit);
// Redirect if there aren't modules
if (0 == $modulesCount) {
redirect_header('modules.php?op=new', 2, _AM_TDMCREATE_NOTMODULES);
@@ -54,8 +55,8 @@
unset($module);
}
if ($modulesCount > $limit) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
+ include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
+ $pagenav = new XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
}
} else {
@@ -71,8 +72,8 @@
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php', 'list');
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
- $modulesObj =& $tdmcreate->getHandler('modules')->create();
- $form = $modulesObj->getForm();
+ $modulesObj = &$tdmcreate->getHandler('modules')->create();
+ $form = $modulesObj->getForm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
break;
@@ -81,37 +82,37 @@
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
if (isset($modId)) {
- $modulesObj =& $tdmcreate->getHandler('modules')->get($modId);
+ $modulesObj = &$tdmcreate->getHandler('modules')->get($modId);
} else {
- $modulesObj =& $tdmcreate->getHandler('modules')->create();
+ $modulesObj = &$tdmcreate->getHandler('modules')->create();
}
$moduleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname']));
//Form module save
$modulesObj->setVars(array(
- 'mod_name' => $_POST['mod_name'],
- 'mod_dirname' => $moduleDirname,
- 'mod_version' => $_POST['mod_version'],
- 'mod_since' => $_POST['mod_since'],
- 'mod_min_php' => $_POST['mod_min_php'],
- 'mod_min_xoops' => $_POST['mod_min_xoops'],
- 'mod_min_admin' => $_POST['mod_min_admin'],
- 'mod_min_mysql' => $_POST['mod_min_mysql'],
- 'mod_description' => $_POST['mod_description'],
- 'mod_author' => $_POST['mod_author'],
- 'mod_author_mail' => $_POST['mod_author_mail'],
- 'mod_author_website_url' => $_POST['mod_author_website_url'],
+ 'mod_name' => $_POST['mod_name'],
+ 'mod_dirname' => $moduleDirname,
+ 'mod_version' => $_POST['mod_version'],
+ 'mod_since' => $_POST['mod_since'],
+ 'mod_min_php' => $_POST['mod_min_php'],
+ 'mod_min_xoops' => $_POST['mod_min_xoops'],
+ 'mod_min_admin' => $_POST['mod_min_admin'],
+ 'mod_min_mysql' => $_POST['mod_min_mysql'],
+ 'mod_description' => $_POST['mod_description'],
+ 'mod_author' => $_POST['mod_author'],
+ 'mod_author_mail' => $_POST['mod_author_mail'],
+ 'mod_author_website_url' => $_POST['mod_author_website_url'],
'mod_author_website_name' => $_POST['mod_author_website_name'],
- 'mod_credits' => $_POST['mod_credits'],
- 'mod_license' => $_POST['mod_license'],
- 'mod_release_info' => $_POST['mod_release_info'],
- 'mod_release_file' => $_POST['mod_release_file'],
- 'mod_manual' => $_POST['mod_...
[truncated message content] |