From: <txm...@us...> - 2015-05-19 18:10:50
|
Revision: 13064 http://sourceforge.net/p/xoops/svn/13064 Author: txmodxoops Date: 2015-05-19 18:10:46 +0000 (Tue, 19 May 2015) Log Message: ----------- Added settings.php for customized module informazions Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/fields.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/menu.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/css/admin/style.css XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldattributes.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldelements.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldkey.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldnull.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldtype.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateTableFields.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminFooter.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminIndex.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminObjects.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPermissions.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFiles.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFormElements.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageAdmin.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/user/UserXoopsVersion.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/modules.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/tables.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/docs/changelog.txt XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/docs/credits.txt XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/language/english/modinfo.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/sql/mysql.sql XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_building.tpl XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_fields.tpl XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_fields_item.tpl XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_tables.tpl XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_tables_item.tpl XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/settings.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/cache/classpaths.cache XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/classpaths.cache XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/index.html XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/settings.php XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/templates/admin/tdmcreate_settings.tpl Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/fields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/fields.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/fields.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -60,7 +60,7 @@ if ($countTables == 0) { redirect_header('tables.php?op=new', 2, _AM_TDMCREATE_NOTTABLES ); } - unset($countTables); + unset($countTables); // Get the list of tables $criteria = new CriteriaCompo(); $criteria->add(new Criteria('table_mid', $handlerTables->getVar('table_mid'))); @@ -160,9 +160,10 @@ if ( !$GLOBALS['xoopsSecurity']->check() ) { redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } - $fieldId = XoopsRequest::getInt('field_id'); + $fieldId = XoopsRequest::getInt('field_id'); // Fields Handler - $fields = $tdmcreate->getHandler('fields'); + $fields = $tdmcreate->getHandler('fields'); + $fieldOrder = 1; // Set Variables foreach($_POST['field_id'] as $key => $value) { @@ -171,8 +172,7 @@ } else { $fieldsObj =& $fields->create(); } - $fieldOrder = XoopsRequest::getInt('field_order'); - $order = $fieldsObj->isNew() ? $fieldOrder++ : $fieldOrder; + $order = $fieldsObj->isNew() ? $fieldOrder : XoopsRequest::getInt('field_order'); // Set Data $fieldsObj->setVar( 'field_mid', $fieldMid ); $fieldsObj->setVar( 'field_tid', $fieldTid ); @@ -196,7 +196,9 @@ $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'); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/menu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/menu.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/menu.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -29,22 +29,26 @@ $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]['title'] = _MI_TDMCREATE_ADMENU3; $adminmenu[$i]['link'] = 'admin/modules.php'; $adminmenu[$i]['icon'] = 'assets/icons/32/addmodule.png'; $i++; -$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU3; +$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU4; $adminmenu[$i]['link'] = 'admin/tables.php'; $adminmenu[$i]['icon'] = 'assets/icons/32/addtable.png'; $i++; -$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU4; +$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU5; $adminmenu[$i]['link'] = 'admin/fields.php'; $adminmenu[$i]['icon'] = 'assets/icons/32/fields.png'; $i++; -$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU5; +$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6; $adminmenu[$i]['link'] = 'admin/building.php'; $adminmenu[$i]['icon'] = 'assets/icons/32/builder.png'; $i++; -$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU6; +$adminmenu[$i]['title'] = _MI_TDMCREATE_ADMENU7; $adminmenu[$i]['link'] = 'admin/about.php'; $adminmenu[$i]['icon'] = $sysPathIcon32 . '/about.png'; unset($i); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/modules.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/modules.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -22,7 +22,7 @@ // Recovered value of argument op in the URL $ $op = XoopsRequest::getString('op', 'list'); // -$mod_id = XoopsRequest::getInt('mod_id'); +$modId = XoopsRequest::getInt('mod_id'); // switch ($op) { case 'list': @@ -98,8 +98,8 @@ if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); } - if (isset($mod_id)) { - $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id); + if (isset($modId)) { + $modulesObj =& $tdmcreate->getHandler('modules')->get($modId); } else { $modulesObj =& $tdmcreate->getHandler('modules')->create(); } @@ -184,13 +184,13 @@ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php', 'list'); $GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton()); - $modulesObj = $tdmcreate->getHandler('modules')->get($mod_id); + $modulesObj = $tdmcreate->getHandler('modules')->get($modId); $form = $modulesObj->getForm(); $GLOBALS['xoopsTpl']->assign('form', $form->render()); break; case 'delete': - $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id); + $modulesObj =& $tdmcreate->getHandler('modules')->get($modId); if (isset($_REQUEST['ok']) && 1 == $_REQUEST['ok']) { if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); @@ -201,12 +201,12 @@ $GLOBALS['xoopsTpl']->assign('error', $modulesObj->getHtmlErrors()); } } else { - xoops_confirm(array('ok' => 1, 'mod_id' => $mod_id, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $modulesObj->getVar('mod_name'))); + xoops_confirm(array('ok' => 1, 'mod_id' => $modId, 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $modulesObj->getVar('mod_name'))); } break; case 'display': - //if ( $mod_id > 0 ) { + //if ( $modId > 0 ) { $mod_admin = XoopsRequest::getInt('mod_admin'); $mod_user = XoopsRequest::getInt('mod_user'); $mod_blocks = XoopsRequest::getInt('mod_blocks'); @@ -225,7 +225,7 @@ $mod_notifications = tdmcreate_CleanVars($_REQUEST, 'mod_notifications'); $mod_permissions = tdmcreate_CleanVars($_REQUEST, 'mod_permissions'); */ - $modulesObj =& $tdmcreate->getHandler('modules')->get($mod_id); + $modulesObj =& $tdmcreate->getHandler('modules')->get($modId); if (isset($mod_admin)) { $modulesObj->setVar('mod_admin', $mod_admin); } elseif (isset($mod_user)) { Added: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/settings.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/settings.php (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/admin/settings.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -0,0 +1,100 @@ +<?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.5 + * @author Txmod Xoops <su...@tx...> + * @version $Id: 1.59 settings.php 11297 2013-03-24 10:58:10Z timgno $ + */ +include __DIR__ . '/header.php'; +// Recovered value of argument op in the URL $ +$op = XoopsRequest::getString('op', 'edit'); +// +$modId = XoopsRequest::getInt('set_id'); +// +switch ($op) { + case 'edit': + default: + // Define main template + $template_main = 'tdmcreate_settings.tpl'; + $GLOBALS['xoopsTpl']->assign('navigation', $adminMenu->addNavigation('settings.php')); + $settingsObj = $tdmcreate->getHandler('settings')->get($modId); + $form = $settingsObj->getForm(); + $GLOBALS['xoopsTpl']->assign('form', $form->render()); + break; + + case 'save': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('settings.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (isset($modId)) { + $settingsObj =& $tdmcreate->getHandler('settings')->get($modId); + } + $moduleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['set_dirname'])); + //Form module save + $settingsObj->setVars(array( + 'set_name' => $_POST['set_name'], + 'set_dirname' => $moduleDirname, + 'set_version' => $_POST['set_version'], + 'set_since' => $_POST['set_since'], + 'set_min_php' => $_POST['set_min_php'], + 'set_min_xoops' => $_POST['set_min_xoops'], + 'set_min_admin' => $_POST['set_min_admin'], + 'set_min_mysql' => $_POST['set_min_mysql'], + 'set_description' => $_POST['set_description'], + 'set_author' => $_POST['set_author'], + 'set_author_mail' => $_POST['set_author_mail'], + 'set_author_website_url' => $_POST['set_author_website_url'], + 'set_author_website_name' => $_POST['set_author_website_name'], + 'set_credits' => $_POST['set_credits'], + 'set_license' => $_POST['set_license'], + 'set_release_info' => $_POST['set_release_info'], + 'set_release_file' => $_POST['set_release_file'], + 'set_manual' => $_POST['set_manual'], + 'set_manual_file' => $_POST['set_manual_file'])); + //Form mod_image + $settingsObj->setVar('set_image', $_POST['set_image']); + //Form module save + $settingsObj->setVars(array( + 'set_demo_site_url' => $_POST['set_demo_site_url'], + 'set_demo_site_name' => $_POST['set_demo_site_name'], + 'set_support_url' => $_POST['set_support_url'], + 'set_support_name' => $_POST['set_support_name'], + 'set_website_url' => $_POST['set_website_url'], + 'set_website_name' => $_POST['set_website_name'], + 'set_release' => $_POST['set_release'], + 'set_status' => $_POST['set_status'], + 'set_admin' => ((1 == $_REQUEST['set_admin']) ? 1 : 0), + 'set_user' => ((1 == $_REQUEST['set_user']) ? 1 : 0), + 'set_blocks' => ((1 == $_REQUEST['set_blocks']) ? 1 : 0), + 'set_search' => ((1 == $_REQUEST['set_search']) ? 1 : 0), + 'set_comments' => ((1 == $_REQUEST['set_comments']) ? 1 : 0), + 'set_notifications' => ((1 == $_REQUEST['set_notifications']) ? 1 : 0), + 'set_permissions' => ((1 == $_REQUEST['set_permissions']) ? 1 : 0), + 'set_inroot_copy' => ((1 == $_REQUEST['set_inroot_copy']) ? 1 : 0), + 'set_donations' => $_POST['set_donations'], + 'set_subversion' => $_POST['set_subversion']) + ); + + if ($tdmcreate->getHandler('settings')->insert($settingsObj)) { + redirect_header('settings.php', 5, sprintf(_AM_TDMCREATE_MODULE_FORM_UPDATED_OK, $_POST['set_name'])); + } + + $GLOBALS['xoopsTpl']->assign('error', $settingsObj->getHtmlErrors()); + $form =& $settingsObj->getForm(); + $GLOBALS['xoopsTpl']->assign('form', $form->render()); + break; +} +include __DIR__ . '/footer.php'; Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/css/admin/style.css =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/css/admin/style.css 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/css/admin/style.css 2015-05-19 18:10:46 UTC (rev 13064) @@ -50,6 +50,10 @@ vertical-align: middle; } +tr.modules td.name { + min-width: 70px; +} + tr.tables td { /* display: block; Problems in FireFox and Opera */ margin: 0; @@ -59,15 +63,36 @@ vertical-align: middle; } +tr.tables td.name { + min-width: 70px; +} + +tr.tables-fields td { + /* display: block; Problems in FireFox and Opera */ + margin: 0; + padding: 5px; + border-bottom: 1px solid #ccc; + background-color:rgba(230,130,100,0.3); + vertical-align: middle; +} + +tr.tables-fields td.name { + min-width: 70px; +} + tr.fields td { /* display: block; Problems in FireFox and Opera */ margin: 0; padding: 5px; border-bottom: 1px solid #ccc; - background-color:rgba(0,255,0,0.3); + background-color:rgba(10,215,10,0.3); vertical-align: middle; } +tr.fields td.name { + min-width: 80px; +} + /*#show_rows { margin: 0; padding: 0; width: 60%; } #sortable tr { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.1em; height: 16px; }*/ @@ -170,7 +195,7 @@ } .cell.cell-width3 { - width: 8%; + width: 9%; } .cell.cell-width4 { @@ -217,13 +242,8 @@ .field-list tr td { padding: 5px 2px; - margin-bottom: 3px; - /* background-color: #efefef; - background-image: -moz-linear-gradient(top, #efefef, #e1e1e1); - background-image: -webkit-gradient(linear, left top,left bottom, from(#efefef), to(#e1e1e1)); - background-image: linear-gradient(top, #efefef, #e1e1e1); - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr=#efefef, EndColorStr=#e1e1e1); vale solo per IE */ - text-shadow:1px 1px 0 #fff; + margin-bottom: 3px; + text-shadow: 1px 1px 1px #fff; color:#ff8400; } Added: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png =================================================================== (Binary files differ) Index: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png 2015-05-19 18:10:46 UTC (rev 13064) Property changes on: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/assets/icons/32/settings.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/cache/classpaths.cache =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/cache/classpaths.cache (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/cache/classpaths.cache 2015-05-19 18:10:46 UTC (rev 13064) @@ -0,0 +1 @@ +a:5:{s:18:"TDMCreateStructure";s:101:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\TDMCreateStructure.php";s:10:"AdminPages";s:99:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminPages.php";s:18:"TDMCreateThemeForm";s:100:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\form\TDMCreateThemeForm.php";s:18:"TDMCreateFormLabel";s:100:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\html\TDMCreateFormLabel.php";s:18:"TDMCreateFormRadio";s:100:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\form\TDMCreateFormRadio.php";} \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldattributes.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldattributes.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldattributes.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -39,7 +39,6 @@ */ public function __construct() { - $this->XoopsObject(); $this->initVar('fieldattribute_id', XOBJ_DTYPE_INT); $this->initVar('fieldattribute_name', XOBJ_DTYPE_TXTBOX); $this->initVar('fieldattribute_value', XOBJ_DTYPE_TXTBOX); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldelements.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldelements.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldelements.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -39,7 +39,6 @@ */ public function __construct() { - $this->XoopsObject(); $this->initVar('fieldelement_id', XOBJ_DTYPE_INT); $this->initVar('fieldelement_mid', XOBJ_DTYPE_INT); $this->initVar('fieldelement_tid', XOBJ_DTYPE_INT); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldkey.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldkey.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldkey.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -39,7 +39,6 @@ */ public function __construct() { - $this->XoopsObject(); $this->initVar('fieldkey_id', XOBJ_DTYPE_INT); $this->initVar('fieldkey_name', XOBJ_DTYPE_TXTBOX); $this->initVar('fieldkey_value', XOBJ_DTYPE_TXTBOX); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldnull.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldnull.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldnull.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -39,7 +39,6 @@ */ public function __construct() { - $this->XoopsObject(); $this->initVar('fieldnull_id', XOBJ_DTYPE_INT); $this->initVar('fieldnull_name', XOBJ_DTYPE_TXTBOX); $this->initVar('fieldnull_value', XOBJ_DTYPE_TXTBOX); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldtype.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldtype.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/fieldtype.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -39,7 +39,6 @@ */ public function __construct() { - $this->XoopsObject(); $this->initVar('fieldtype_id', XOBJ_DTYPE_INT); $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX); $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateArchitecture.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -80,10 +80,10 @@ $modId = $module->getVar('mod_id'); $language = $GLOBALS['xoopsConfig']['language']; // Id of tables - $criteriaTables = new CriteriaCompo(); - $criteriaTables->add(new Criteria('table_mid', $modId)); - $tables = $this->tdmcreate->getHandler('tables')->getObjects($criteriaTables); - unset($criteriaTables); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('table_mid', $modId)); + $tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria); + unset($criteria); // $table = null; foreach (array_keys($tables) as $t) { @@ -214,10 +214,11 @@ $moduleDirname = $module->getVar('mod_dirname'); $icon32 = 'assets/icons/32'; // Id of tables - $criteriaTables = new CriteriaCompo(); - $criteriaTables->add(new Criteria('table_mid', $modId)); - $tables = $this->tdmcreate->getHandler('tables')->getObjects($criteriaTables); - unset($criteriaTables); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('table_mid', $modId)); + $criteria->setSort('table_order'); + $tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria); + unset($criteria); $ret = array(); // $table = array(); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateTableFields.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateTableFields.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/TDMCreateTableFields.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -42,6 +42,7 @@ { $criteria = new CriteriaCompo(); $criteria->add(new Criteria('field_tid', $tableId)); + $criteria->setSort('field_order'); $fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria); unset($criteria); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminFooter.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminFooter.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminFooter.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -85,7 +85,7 @@ $content = $this->getHeaderFilesComments($module, $filename); $content .= <<<EOT if ( isset(\$template_main) ) { - \$GLOBALS['xoopsTpl']->display("db:{\$template_main}"); + \$GLOBALS['xoopsTpl']->display("db:{\$templateMain}"); } xoops_cp_footer(); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminIndex.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminIndex.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminIndex.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -86,7 +86,7 @@ $filename = $this->getFileName(); $moduleDirname = $module->getVar('mod_dirname'); $language = $this->getLanguage($moduleDirname, 'AM'); - $language_thereare = $this->getLanguage($moduleDirname, 'AM', 'THEREARE_'); + $languageThereAre = $this->getLanguage($moduleDirname, 'AM', 'THEREARE_'); $content = $this->getHeaderFilesComments($module, $filename); $content .= <<<EOT include __DIR__ . '/header.php'; @@ -96,15 +96,16 @@ if (is_array($tables)) { foreach (array_keys($tables) as $i) { $tableName = $tables[$i]->getVar('table_name'); + $ucfTableName = ucfirst($tableName); $content .= <<<EOT //\${$tableName}Handler =& \${$moduleDirname}->getHandler('{$tableName}'); -\$count_{$tableName} = \${$tableName}Handler->getCount();\n +\$count{$ucfTableName} = \${$tableName}Handler->getCount();\n EOT; } } $content .= <<<EOT // Template Index -\$template_main = '{$moduleDirname}_admin_index.tpl';\n +\$templateMain = '{$moduleDirname}_admin_index.tpl';\n EOT; if (is_array($tables)) { $content .= <<<EOT @@ -114,9 +115,9 @@ EOT; foreach (array_keys($tables) as $i) { $tableName = $tables[$i]->getVar('table_name'); - $stuTableName = $language_thereare . strtoupper($tableName); + $stuTableName = $languageThereAre . strtoupper($tableName); $content .= <<<EOT -\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$stuTableName}.'</label>', \$count_{$tableName});\n +\$adminMenu->addInfoBoxLine({$language}STATISTICS, '<label>'.{$stuTableName}.'</label>', \$count{$ucfTableName});\n EOT; } } Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminObjects.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminObjects.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminObjects.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -156,7 +156,7 @@ * @param string $fieldName * @return string */ - public function getUploadImageSetVar($moduleDirname, $tableName, $fieldName) + public function getUploadImageSetVar($moduleDirname, $tableName, $fieldName, $fpmf) { $stuModuleDirname = strtoupper($moduleDirname); $ret = <<<EOT @@ -165,9 +165,11 @@ \$uploaddir = {$stuModuleDirname}_UPLOAD_PATH.'/images/{$tableName}'; \$uploader = new XoopsMediaUploader(\$uploaddir, \${$moduleDirname}->getConfig('mimetypes'), \${$moduleDirname}->getConfig('maxsize'), null, null); - if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][])) { - //\$uploader->setPrefix('{$fieldName}_'); - //\$uploader->fetchMedia(\$_POST['xoops_upload_file'][]); + if (\$uploader->fetchMedia(\$_POST['xoops_upload_file'][0])) { + \$extension = preg_replace( '/^.+\.([^.]+)$/sU' , '' , \$_FILES['attachedfile']['name']); + \$imgName = str_replace(' ', '', \$_POST['{$fpmf}']).'.'.\$extension; + \$uploader->setPrefix(\$imgName); + \$uploader->fetchMedia(\$_POST['xoops_upload_file'][0]); if (!\$uploader->upload()) { \$errors = \$uploader->getErrors(); redirect_header('javascript:history.go(-1)', 3, \$errors); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPages.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPages.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -77,10 +77,10 @@ * @public function getAdminPagesHeader * @param string $moduleDirname * @param string $tableName - * @param $fpif + * @param $fieldId * @return string */ - public function getAdminPagesHeader($moduleDirname, $tableName, $fpif) + public function getAdminPagesHeader($moduleDirname, $tableName, $fieldId) { $ucfModuleDirname = ucfirst($moduleDirname); $ucfTableName = ucfirst($tableName); @@ -88,8 +88,8 @@ include __DIR__ . '/header.php'; //It recovered the value of argument op in URL$ \$op = XoopsRequest::getString('op', 'list'); -// Request {$fpif} -\${$fpif} = XoopsRequest::getInt('{$fpif}'); +// Request {$fieldId} +\${$fieldId} = XoopsRequest::getInt('{$fieldId}'); // Switch options switch (\$op) {\n @@ -105,12 +105,12 @@ * @param $tableFieldname * @param $language * @param $fields - * @param $fpif + * @param $fieldId * @param $fieldInForm - * @param $fpmf + * @param $fieldMain * @return string */ - public function getAdminPagesList($moduleDirname, $table, $language, $fields, $fpif, $fieldInForm, $fpmf) + public function getAdminPagesList($moduleDirname, $table, $language, $fields, $fieldId, $fieldInForm, $fieldMain) { $stuModuleDirname = strtoupper($moduleDirname); $tableName = $table->getVar('table_name'); @@ -125,7 +125,7 @@ default: \$start = XoopsRequest::getInt('start', 0); \$limit = XoopsRequest::getInt('limit', \${$moduleDirname}->getConfig('adminpager')); - \$template_main = '{$moduleDirname}_admin_{$tableName}.tpl'; + \$templateMain = '{$moduleDirname}_admin_{$tableName}.tpl'; \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php'));\n EOT; if (1 == $fieldInForm) { @@ -138,11 +138,12 @@ \$criteria = new CriteriaCompo(); \$criteria->setStart(\$start); \$criteria->setLimit(\$limit); - \$criteria->setSort('{$fpif} ASC, {$fpmf}'); + \$criteria->setSort('{$fieldId} ASC, {$fieldMain}'); \$criteria->setOrder('ASC'); \${$tableName}Count = \${$tableName}Handler->getCount(\$criteria); \${$tableName}All = \${$tableName}Handler->getAll(\$criteria); unset(\$criteria); + \$GLOBALS['xoopsTpl']->assign('{$moduleDirname}_count', \${$tableName}Count); \$GLOBALS['xoopsTpl']->assign('{$moduleDirname}_url', {$stuModuleDirname}_URL); \$GLOBALS['xoopsTpl']->assign('{$moduleDirname}_upload_url', {$stuModuleDirname}_UPLOAD_URL); // Table view @@ -267,26 +268,26 @@ * @param string $tableName * @param string $language * @param string $fields - * @param string $fpif - * @param string $fpmf + * @param string $fieldId + * @param string $fieldMain * @return string */ - public function getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fpif, $fpmf) + public function getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fieldId, $fieldMain) { $ret = <<<EOT case 'save': if ( !\$GLOBALS['xoopsSecurity']->check() ) { redirect_header('{$tableName}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors())); } - if (isset(\${$fpif})) { - \${$tableName}Obj =& \${$tableName}Handler->get(\${$fpif}); + if (isset(\${$fieldId})) { + \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId}); } else { \${$tableName}Obj =& \${$tableName}Handler->create(); } // Set Vars\n EOT; foreach (array_keys($fields) as $f) { - $fieldName = $fields[$f]->getVar('field_name'); + $fieldName = $fields[$f]->getVar('field_name'); $fieldElement = $fields[$f]->getVar('field_element'); if ($f > 0) { // If we want to hide field id switch ($fieldElement) { @@ -301,7 +302,10 @@ $ret .= $this->adminobjects->getUrlFileSetVar($moduleDirname, $tableName, $fieldName); break; case 13: - $ret .= $this->adminobjects->getUploadImageSetVar($moduleDirname, $tableName, $fieldName); + if(1 == $fields[$f]->getVar('field_main')) { + $fieldMain = $fieldName; + } + $ret .= $this->adminobjects->getUploadImageSetVar($moduleDirname, $tableName, $fieldName, $fieldMain); break; case 14: $ret .= $this->adminobjects->getUploadFileSetVar($moduleDirname, $tableName, $fieldName); @@ -336,10 +340,10 @@ * @param string $tableName * @param string $tableFieldname * @param string $language - * @param string $fpif + * @param string $fieldId * @return string */ - public function getAdminPagesEdit($moduleDirname, $table, $language, $fpif) + public function getAdminPagesEdit($moduleDirname, $table, $language, $fieldId) { $tableName = $table->getVar('table_name'); $tableSoleName = $table->getVar('table_solename'); @@ -355,7 +359,7 @@ \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php')); \$GLOBALS['xoopsTpl']->assign('buttons', \$adminMenu->renderButton()); // Get Form - \${$tableName}Obj = \${$tableName}Handler->get(\${$fpif}); + \${$tableName}Obj = \${$tableName}Handler->get(\${$fieldId}); \$form = \${$tableName}Obj->getForm(); \$GLOBALS['xoopsTpl']->assign('form', \$form->render()); break;\n @@ -368,15 +372,15 @@ * @public function getAdminPagesDelete * @param string $tableName * @param string $language - * @param string $fpif - * @param string $fpmf + * @param string $fieldId + * @param string $fieldMain * @return string */ - public function getAdminPagesDelete($tableName, $language, $fpif, $fpmf) + public function getAdminPagesDelete($tableName, $language, $fieldId, $fieldMain) { $ret = <<<EOT case 'delete': - \${$tableName}Obj =& \${$tableName}Handler->get(\${$fpif}); + \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId}); if (isset(\$_REQUEST['ok']) && 1 == \$_REQUEST['ok']) { if ( !\$GLOBALS['xoopsSecurity']->check() ) { redirect_header('{$tableName}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors())); @@ -387,7 +391,7 @@ echo \${$tableName}Obj->getHtmlErrors(); } } else { - xoops_confirm(array('ok' => 1, '{$fpif}' => \${$fpif}, 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORMSUREDEL, \${$tableName}Obj->getVar('{$fpmf}'))); + xoops_confirm(array('ok' => 1, '{$fieldId}' => \${$fieldId}, 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORMSUREDEL, \${$tableName}Obj->getVar('{$fieldMain}'))); } break;\n EOT; @@ -400,17 +404,17 @@ * @param string $moduleDirname * @param string $tableName * @param string $language - * @param string $fpif - * @param string $fpmf + * @param string $fieldId + * @param string $fieldMain * @return string */ - public function getAdminPagesUpdate($moduleDirname, $tableName, $language, $fpif, $fpmf) + public function getAdminPagesUpdate($moduleDirname, $tableName, $language, $fieldId, $fieldMain) { $upModuleName = strtoupper($moduleDirname); $ret = <<<EOT case 'update': - if (isset(\${$fpif})) { - \${$tableName}Obj =& \${$tableName}Handler->get(\${$fpif}); + if (isset(\${$fieldId})) { + \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId}); } \${$tableName}Obj->setVar("\${$tableName}_display", \$_POST["\${$tableName}_display"]); @@ -461,21 +465,21 @@ $fieldName = $fields[$f]->getVar('field_name'); $fieldInForm = $fields[$f]->getVar('field_inform'); if (0 == $f) { - $fpif = $fieldName; + $fieldId = $fieldName; } if (1 == $fields[$f]->getVar('field_main')) { - $fpmf = $fieldName; + $fieldMain = $fieldName; } } $content = $this->getHeaderFilesComments($module, $filename); - $content .= $this->getAdminPagesHeader($moduleDirname, $tableName, $fpif); - $content .= $this->getAdminPagesList($moduleDirname, $table, $language, $fields, $fpif, $fieldInForm, $fpmf); + $content .= $this->getAdminPagesHeader($moduleDirname, $tableName, $fieldId); + $content .= $this->getAdminPagesList($moduleDirname, $table, $language, $fields, $fieldId, $fieldInForm, $fieldMain); if (1 == $fieldInForm) { $content .= $this->getAdminPagesNew($moduleDirname, $tableName, $language); - $content .= $this->getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fpif, $fpmf); - $content .= $this->getAdminPagesEdit($moduleDirname, $table, $language, $fpif); + $content .= $this->getAdminPagesSave($moduleDirname, $tableName, $language, $fields, $fieldId, $fieldMain); + $content .= $this->getAdminPagesEdit($moduleDirname, $table, $language, $fieldId); } - $content .= $this->getAdminPagesDelete($tableName, $language, $fpif, $fpmf); + $content .= $this->getAdminPagesDelete($tableName, $language, $fieldId, $fieldMain); $content .= $this->getAdminPagesFooter(); // $this->tdmcfile->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPermissions.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPermissions.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/admin/AdminPermissions.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -99,7 +99,7 @@ if (count ( array_intersect ( \$group, \$groups ) ) <= 0) { redirect_header ( 'index.php', 3, _NOPERM ); }*/ -\$template_main = '{$moduleDirname}_admin_permissions.tpl'; +\$templateMain = '{$moduleDirname}_admin_permissions.tpl'; echo \$adminMenu->addNavigation('permissions.php'); \$permission = {$moduleDirname}_CleanVars(\$_REQUEST, 'permission', 1, 'int'); Added: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/classpaths.cache =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/classpaths.cache (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/classpaths.cache 2015-05-19 18:10:46 UTC (rev 13064) @@ -0,0 +1 @@ +a:50:{s:18:"TDMCreateStructure";s:101:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\TDMCreateStructure.php";s:10:"AdminPages";s:99:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminPages.php";s:19:"TemplatesAdminPages";s:118:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminPages.php";s:11:"BlocksFiles";s:101:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\blocks\BlocksFiles.php";s:15:"TemplatesBlocks";s:115:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\blocks\TemplatesBlocks.php";s:10:"ClassFiles";s:101:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\classes\ClassFiles.php";s:9:"UserPages";s:97:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserPages.php";s:18:"TemplatesUserPages";s:116:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\user\TemplatesUserPages.php";s:15:"LanguageModinfo";s:107:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageModinfo.php";s:11:"AdminHeader";s:100:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminHeader.php";s:10:"AdminIndex";s:99:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminIndex.php";s:9:"AdminMenu";s:98:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminMenu.php";s:10:"AdminAbout";s:99:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminAbout.php";s:11:"AdminFooter";s:100:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminFooter.php";s:19:"TemplatesAdminAbout";s:118:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminAbout.php";s:19:"TemplatesAdminIndex";s:118:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminIndex.php";s:20:"TemplatesAdminFooter";s:119:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminFooter.php";s:20:"TemplatesAdminHeader";s:119:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminHeader.php";s:13:"LanguageAdmin";s:105:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageAdmin.php";s:11:"ClassHelper";s:102:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\classes\ClassHelper.php";s:16:"IncludeFunctions";s:107:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeFunctions.php";s:14:"IncludeInstall";s:105:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeInstall.php";s:7:"SqlFile";s:94:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\sql\SqlFile.php";s:13:"IncludeUpdate";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeUpdate.php";s:18:"TemplatesUserIndex";s:116:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\user\TemplatesUserIndex.php";s:19:"TemplatesUserFooter";s:117:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\user\TemplatesUserFooter.php";s:19:"TemplatesUserHeader";s:117:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\user\TemplatesUserHeader.php";s:10:"UserFooter";s:98:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserFooter.php";s:10:"UserHeader";s:98:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserHeader.php";s:22:"UserNotificationUpdate";s:110:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserNotificationUpdate.php";s:9:"UserIndex";s:97:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserIndex.php";s:12:"LanguageMain";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageMain.php";s:9:"CssStyles";s:96:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\css\CssStyles.php";s:13:"IncludeCommon";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeCommon.php";s:13:"DocsChangelog";s:101:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\docs\DocsChangelog.php";s:12:"LanguageHelp";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageHelp.php";s:13:"IncludeJquery";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeJquery.php";s:16:"UserXoopsVersion";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserXoopsVersion.php";s:16:"AdminPermissions";s:105:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\admin\AdminPermissions.php";s:25:"TemplatesAdminPermissions";s:124:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\templates\admin\TemplatesAdminPermissions.php";s:14:"LanguageBlocks";s:106:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageBlocks.php";s:20:"IncludeNotifications";s:111:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeNotifications.php";s:15:"LanguageMailTpl";s:107:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\language\LanguageMailTpl.php";s:13:"IncludeSearch";s:104:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeSearch.php";s:15:"IncludeComments";s:106:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeComments.php";s:23:"IncludeCommentFunctions";s:114:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\include\IncludeCommentFunctions.php";s:9:"UserPrint";s:97:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserPrint.php";s:13:"TDMCreateFile";s:96:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\TDMCreateFile.php";s:20:"TDMCreateTableFields";s:103:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\TDMCreateTableFields.php";s:7:"UserRss";s:95:"D:\UwAmp\www\xoops-2.5.7testTDMCreate1.91\htdocs\modules\tdmcreate\class\files\user\UserRss.php";} \ No newline at end of file Added: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/index.html =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/index.html (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/cache/index.html 2015-05-19 18:10:46 UTC (rev 13064) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFiles.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFiles.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFiles.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -286,14 +286,14 @@ /* * @private function getPermissionsInForm * @param string $moduleDirname - * @param string $fpif + * @param string $fieldId */ /** * @param $moduleDirname - * @param $fpif + * @param $fieldId * @return string */ - private function getPermissionsInForm($moduleDirname, $fpif) + private function getPermissionsInForm($moduleDirname, $fieldId) { $permissionApprove = $this->getLanguage($moduleDirname, 'AM', 'PERMISSIONS_APPROVE'); $permissionSubmit = $this->getLanguage($moduleDirname, 'AM', 'PERMISSIONS_SUBMIT'); @@ -306,9 +306,9 @@ \$full_list = array_keys ( \$group_list ); global \$xoopsModule; if ( !\$this->isNew() ) { - \$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$moduleDirname}_approve', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) ); - \$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$moduleDirname}_submit', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) ); - \$groups_ids_view = \$gperm_handler->getGroupIds ( '{$moduleDirname}_view', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) ); + \$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$moduleDirname}_approve', \$this->getVar ( '{$fieldId}' ), \$xoopsModule->getVar ( 'mid' ) ); + \$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$moduleDirname}_submit', \$this->getVar ( '{$fieldId}' ), \$xoopsModule->getVar ( 'mid' ) ); + \$groups_ids_view = \$gperm_handler->getGroupIds ( '{$moduleDirname}_view', \$this->getVar ( '{$fieldId}' ), \$xoopsModule->getVar ( 'mid' ) ); \$groups_ids_approve = array_values ( \$groups_ids_approve ); \$groups_can_approve_checkbox = new XoopsFormCheckBox ( {$permissionApprove}, 'groups_approve[]', \$groups_ids_approve ); \$groups_ids_submit = array_values ( \$groups_ids_submit ); @@ -388,19 +388,19 @@ * @public function getClassHandler * @param string $moduleDirname * @param string $tableName - * @param string $fpif - * @param string $fpmf + * @param string $fieldId + * @param string $fieldMain */ /** * @param $moduleDirname * @param $tableName * @param $tableCategory * @param $tableFieldname - * @param $fpif - * @param $fpmf + * @param $fieldId + * @param $fieldMain * @return string */ - private function getClassHandler($moduleDirname, $table, $fpif, $fpmf) + private function getClassHandler($moduleDirname, $table, $fieldId, $fieldMain) { $tableName = $table->getVar('table_name'); $tableCategory = $table->getVar('table_category'); @@ -408,7 +408,7 @@ $tableFieldname = $table->getVar('table_fieldname'); $ucfModuleDirname = ucfirst($moduleDirname); $ucfTableName = ucfirst($tableName); - $ucfTableSoleName = ucfirst($tableSoleName); + $ucfTableSoleName = ucfirst($tableSoleName); $ucfModuleTable = $ucfModuleDirname . $ucfTableName; $ret = <<<EOT /* @@ -427,7 +427,7 @@ */ public function __construct(&\$db) { - parent::__construct(\$db, '{$moduleDirname}_{$tableName}', '{$moduleDirname}{$tableName}', '{$fpif}', '{$fpmf}'); + parent::__construct(\$db, '{$moduleDirname}_{$tableName}', '{$moduleDirname}{$tableName}', '{$fieldId}', '{$fieldMain}'); \$this->{$moduleDirname} = {$ucfModuleDirname}Helper::getInstance(); } @@ -505,7 +505,7 @@ \${$tableName}Handler = \$this->{$moduleDirname}->getHandler( '{$tableName}' ); \${$tableSoleName}Obj = & \${$tableName}Handler->get( \${$tableSoleName}Id ); if (is_object( \${$tableSoleName}Obj )) { - \${$tableSoleName} = \${$tableSoleName}Obj->getVar( '{$fpmf}' ); + \${$tableSoleName} = \${$tableSoleName}Obj->getVar( '{$fieldMain}' ); } } return \${$tableSoleName}; @@ -538,10 +538,10 @@ $fieldName = $fields[$f]->getVar('field_name'); $fieldInForm = $fields[$f]->getVar('field_inform'); if ((0 == $f) && (1 == $table->getVar('table_autoincrement'))) { - $fpif = $fieldName; // $fpif = fields parameter index field + $fieldId = $fieldName; // $fieldId = fields parameter index field } if (1 == $fields[$f]->getVar('field_main')) { - $fpmf = $fieldName; // $fpmf = fields parameter main field + $fieldMain = $fieldName; // $fieldMain = fields parameter main field } } $content = $this->getHeaderFilesComments($module, $filename); @@ -549,12 +549,12 @@ if (1 == $fieldInForm) { $content .= $this->getHeadInForm($module, $table); if (1 == $table->getVar('table_permissions')) { - $content .= $this->getPermissionsInForm($moduleDirname, $fpif); + $content .= $this->getPermissionsInForm($moduleDirname, $fieldId); } $content .= $this->getFootInForm(); } $content .= $this->getToArray(); - $content .= $this->getClassHandler($moduleDirname, $table, $fpif, $fpmf); + $content .= $this->getClassHandler($moduleDirname, $table, $fieldId, $fieldMain); $this->tdmcfile->create($moduleDirname, 'class', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFormElements.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFormElements.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/classes/ClassFormElements.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -78,17 +78,25 @@ * @param string $required */ /** - * @param $language - * @param $fieldName - * @param string $required + * @param $language + * @param $fieldName + * @param $required * @return string */ - private function getXoopsFormText($language, $fieldName, $required = 'false') + private function getXoopsFormText($language, $fieldName, $fieldDefault, $required = 'false') { - $ret = <<<EOT + if($fieldDefault != '') { + $ret = <<<EOT // Form Text {$fieldName} + \${$fieldName} = \$this->isNew() ? '{$fieldDefault}' : \$this->getVar('{$fieldName}'); + \$form->addElement( new XoopsFormText({$language}, '{$fieldName}', 20, 150, \${$fieldName}){$required} );\n +EOT; + } else { + $ret = <<<EOT + // Form Text {$fieldName} \$form->addElement( new XoopsFormText({$language}, '{$fieldName}', 50, 255, \$this->getVar('{$fieldName}')){$required} );\n EOT; + } return $ret; } @@ -621,7 +629,7 @@ case 1: break; case 2: - $ret .= $this->getXoopsFormText($language, $fieldName, $required); + $ret .= $this->getXoopsFormText($language, $fieldName, $fieldDefault, $required); break; case 3: $ret .= $this->getXoopsFormTextArea($language, $fieldName, $required); Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageAdmin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageAdmin.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/language/LanguageAdmin.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -185,6 +185,7 @@ } // $ret .= $this->defines->getDefine($language, $tableSoleName .'_'. $rpFieldName, $fieldNameDesc); + $stuTableName = strtoupper($tableName); // switch ($fieldElement) { case 10: Modified: XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-05-16 05:58:18 UTC (rev 13063) +++ XoopsModules/TDMCreate/branches/timgno/1.91a2/tdmcreate/class/files/templates/admin/TemplatesAdminPages.php 2015-05-19 18:10:46 UTC (rev 13064) @@ -81,7 +81,7 @@ $tableSoleName = $table->getVar('table_solename'); $ret = <<<EOT <{include file="db:{$moduleDirname}_admin_header.tpl"}> -<{if {$tableName}_list}> +<{if {$tableName}_count}> <table class="outer {$tableName} width100"> <thead> <tr class="head">\n @@ -250,15 +250,15 @@ <div class="xo-pagenav floatright"><{\$pagenav}></div><div class="clear spacer"></div> <{/if}> <{/if}> +<{if \$... [truncated message content] |