|
From: <be...@us...> - 2013-10-23 01:22:48
|
Revision: 12194
http://sourceforge.net/p/xoops/svn/12194
Author: beckmi
Date: 2013-10-23 01:22:43 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk: to version 1.38.1 Beta 1
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.TXT
XoopsModules/TDMCreate/trunk/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/install.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.0 to 1.1.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.1 to 1.15.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.1 to 1.37.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.15 to 1.37.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.37 to 1.38.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/blank.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/VeraBd.ttf
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/green.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/red.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/xoops2.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/empty.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/test3_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/test4_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/test5_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/test6_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/test7_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/xoops2.png
XoopsModules/TDMCreate/trunk/TDMCreate/js/
XoopsModules/TDMCreate/trunk/TDMCreate/js/functions.js
XoopsModules/TDMCreate/trunk/TDMCreate/js/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/templates/
Removed Paths:
-------------
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_coms.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/licence.txt
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/blank.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/default_slogo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/naked.png
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -16,6 +16,7 @@
* @author Mamba (www.xoops.org)
* @version $Id $
**/
+
echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src=" . $pathIcon32.'/xoopsmicrobutton.gif'.' '." alt='XOOPS' title='XOOPS'></a></div>";
echo "<div class='center smallsmall italic pad5'><strong>" . $xoopsModule->getVar("name") . "</strong> is maintained by the <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>";
xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -23,9 +23,11 @@
//
$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
//
-$pathIcon16 = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons16');
-$pathIcon32 = XOOPS_URL .'/'. $GLOBALS['xoopsModule']->getInfo('icons32');
-$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
//load class
$modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate');
$tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate');
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -21,19 +21,29 @@
include 'admin_header.php';
echo $adminMenu->addNavigation('const.php');
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
-//Name of module
-$modules =& $modulesHandler->get($_REQUEST['modules_name']);
-$modules_name = $modules->getVar('modules_name');
-$modules_desc = $modules->getVar('modules_description');
+
+if (isset($_REQUEST['modules_name'])) {
+ $modules =& $modulesHandler->get($_REQUEST['modules_name']);
+} else {
+ $modules = & $modulesHandler;
+}
+
+$modules_name = $modules->getVar('modules_name');
+$modules_desc = $modules->getVar('modules_description');
$modules_author_website_name = $modules->getVar('modules_author_website_name');
-$modules_author_website_url = $modules->getVar('modules_author_website_url');
-$modules_image = $modules->getVar('modules_image');
-$modules_active_search = $modules->getVar('modules_active_search');
-$modules_active_comments = $modules->getVar('modules_active_comments');
-
+$modules_author_website_url = $modules->getVar('modules_author_website_url');
+$modules_image = $modules->getVar('modules_image');
+$modules_active_search = $modules->getVar('modules_active_search');
+$modules_active_comments = $modules->getVar('modules_active_comments');
+
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
-$criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name']));
+if (isset($_REQUEST['modules_name'])) {
+ $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name']));
+} else {
+ $criteria->add(new Criteria('tables_modules'));
+}
+
$nb_tables = $tablesHandler->getCount($criteria);
$tables_arr = $tablesHandler->getall($criteria);
@@ -61,60 +71,71 @@
//Variables
$tables_id = $tables_arr[$i]->getVar('tables_id');
$tables_name = $tables_arr[$i]->getVar('tables_name');
+ $tables_category = $tables_arr[$i]->getVar('tables_category');
$tables_module_table = $tables_arr[$i]->getVar('tables_module_table');
$tables_img = $tables_arr[$i]->getVar('tables_img');
- $tables_champs = $tables_arr[$i]->getVar('tables_champs');
- $tables_parametres = $tables_arr[$i]->getVar('tables_parametres');
- $tables_blocks = $tables_arr[$i]->getVar('tables_blocs');
+ $tables_fields = $tables_arr[$i]->getVar('tables_fields');
+ $tables_parameters = $tables_arr[$i]->getVar('tables_parameters');
+ $tables_blocks = $tables_arr[$i]->getVar('tables_blocks');
$tables_display_admin = $tables_arr[$i]->getVar('tables_display_admin');
$tables_display_user = $tables_arr[$i]->getVar('tables_display_user');
$tables_search = $tables_arr[$i]->getVar('tables_search');
- $tables_coms = $tables_arr[$i]->getVar('tables_coms');
+ $tables_comments = $tables_arr[$i]->getVar('tables_comments');
+ $tables_waiting = $tables_arr[$i]->getVar('tables_waiting');
//Fabrication
//Copie of images tables
$tables_img1 = $modPath."/images/uploads/tables/".$tables_img;
if (file_exists($tables_img1)) {
- copy($tables_img1, $modPath."/modules/".$modules_name."/images/deco/".$tables_img);
+ copy($tables_img1, $modPath."/modules/".$modules_name."/images/icons/".$tables_img);
}
//Creation des classes
- const_class($modules, $modules_name, $tables_module_table, $tables_name, $tables_champs, $tables_parametres);
-
+ const_class($modules, $modules_name, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
+
+ if ( $tables_category == 1) { //|| $tables_module_table != null
+ const_admin_permissions($modules, $modules_name, $tables_name, $tables_category);
+ }
+
//Creation of pages admin
if ( $tables_display_admin == 1 ) {
- const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres);
+ const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_category, $tables_name, $tables_img, $tables_fields, $tables_parameters);
}
//Creation of pages and templates user
- if ( $tables_display_user == 1 && $tables_module_table != null ) {
- const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_champs, $tables_parametres);
- const_templates_pages($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres);
+ if ( $tables_display_user == 1 && $tables_module_table != NULL ) {
+ const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_fields, $tables_parameters);
+ const_templates_pages($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
//Creation de search
if ( $modules_active_search == 1 && $tables_search == 1 ) {
- const_include_search($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres, $tables_img);
+ const_include_search($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters, $tables_img);
}
- //Creation des coms
- if ( $modules_active_comments == 1 && $tables_coms == 1 ) {
- const_include_coms($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres, $tables_img);
+ //Creation of comments
+ if ( $modules_active_comments == 1 && $tables_comments == 1 ) {
+ const_include_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters, $tables_img);
}
-
+
//Creation of the file mysql.sql
- const_sql($modules_name, $tables_module_table, $tables_name, $tables_champs);
+ const_sql($modules_name, $tables_module_table, $tables_name, $tables_fields);
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = 'topic'");
- list( $topic ) = $xoopsDB->fetchRow($result);
- //Creation des blocs
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = 'category'");
+ list( $category ) = $xoopsDB->fetchRow($result);
+ //Creation des blocks
if ( $tables_blocks == 1 ) {
- const_blocks($modules, $modules_name, $tables_module_table, $tables_name, $tables_champs, $tables_parametres, $topic);
+ const_blocks($modules, $modules_name, $tables_module_table, $tables_name, $tables_fields, $tables_parameters, $category);
//Creation du template des blocks
- const_blocks_templates($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres);
+ const_blocks_templates($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
- }
+ }
+
+ //Creation of Waiting Plugin
+ const_waiting($modules, $modules_name, $tables_arr);
+
+
//Creation de xoopsversion.php
/*Mettre xoops version vers la fin pour integrer les bloc, etc*/
const_xoopsversion($modules, $modules_name, $tables_arr, $tables_module_table);
// Creation of template index
- const_templates_index($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres);
+ const_templates_index($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
// Creation of template header
const_templates_header($modules, $modules_name);
// Creation of template footer
@@ -124,9 +145,7 @@
// Creation of template admin help
const_templates_admin_help($modules, $modules_name);
//Creation du fichier permissions
- if ( $topic == 1) { //|| $tables_module_table != null
- const_admin_permissions($modules, $modules_name, $tables_arr, $topic);
- }
+
//Include
//Configs
@@ -143,7 +162,7 @@
//Creation du language main.php
const_main_language($modules, $modules_name, $modules_desc, $tables_arr);
//Creation du language modinfo.php
- const_modinfo_language($modules, $modules_name, $modules_desc, $tables_arr, $topic);
+ const_modinfo_language($modules, $modules_name, $modules_desc, $tables_arr, $category);
//Creation du language admin.php
const_admin_language($modules, $modules_name, $tables_arr, $tables_name);
//Creation du language blocks.php
@@ -162,7 +181,7 @@
//Creation de admin footer.php
const_admin_footer($modules, $modules_name, $tables_arr);
//Creation de admin menu.php
- const_admin_menu($modules, $modules_name, $tables_arr, $topic);
+ const_admin_menu($modules, $modules_name, $tables_arr, $category);
//Creation de admin about.php
//$menu++;
const_admin_about($modules, $modules_name);
@@ -170,7 +189,7 @@
/*Admin*/
/************************************************/
const_user_header($modules, $modules_name, $tables_id, $tables_module_table, $tables_name);
- const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_champs, $tables_parametres);
+ const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
CloseTable();
break;
@@ -181,11 +200,11 @@
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
$action = $_SERVER['REQUEST_URI'];
- $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'form_creation', $action, 'post', true);
+ $form = new XoopsThemeForm(_AM_TDMCREATE_ADMIN_CONST, 'form_creation', $action, 'post', TRUE);
$modules_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name');
$modules_select->addOptionArray($modulesHandler->getList());
- $form->addElement($modules_select, true);
+ $form->addElement($modules_select, TRUE);
foreach (array_keys($tables_arr) as $i)
{
@@ -195,7 +214,7 @@
$tables_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', $tables_name, 4);
$tables_select->addOptionArray($tablesHandler->getList());
- $form->addElement($tables_select, false);
+ $form->addElement($tables_select, FALSE);
$form->addElement(new XoopsFormHidden('op', 'creation'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -28,10 +28,11 @@
include_once $cPath.'/const_xoopsversion.php';
include_once $cPath.'/const_changelog.php';
include_once $cPath.'/const_include_search.php';
-include_once $cPath.'/const_include_coms.php';
+include_once $cPath.'/const_include_comments.php';
include_once $cPath.'/const_include_configs.php';
include_once $cPath.'/const_include_functions.php';
include_once $cPath.'/const_include_install.php';
+include_once $cPath.'/const_waiting.php';
//include_once $cPath.'/const_include_style.php';
include_once $cPath.'/const_sql.php';
include_once $cPath.'/const_blocks.php';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -21,12 +21,12 @@
$module_handler =& xoops_gethandler('module');
$xoopsModule =& XoopsModule::getByDirname('TDMCreate');
$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
-$pathImageAdmin = $moduleInfo->getInfo('icons32');
+$pathIcon32 = $moduleInfo->getInfo('icons32');
$adminmenu = array();
$i = 1;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_INDEX;
$adminmenu[$i]["link"] = 'admin/index.php';
-$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/dashboard.png';
+$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_MODULES;
$adminmenu[$i]["link"] = 'admin/modules.php';
@@ -42,5 +42,5 @@
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMIN_ABOUT;
$adminmenu[$i]["link"] = 'admin/about.php';
-$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/about.png';
+$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
unset($i);
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -50,8 +50,10 @@
} else {
$obj->setVar('modules_image', $_REQUEST['modules_image']);
}
+ //remove all spaces from the new name
+ $spacesRemoved = str_replace(' ', '', $_REQUEST['modules_name']);
- $obj->setVar('modules_name', $_REQUEST['modules_name']);
+ $obj->setVar('modules_name', $spacesRemoved );
$obj->setVar('modules_version', $_REQUEST['modules_version']);
$obj->setVar('modules_description', $_REQUEST['modules_description']);
$obj->setVar('modules_author', $_REQUEST['modules_author']);
@@ -131,8 +133,8 @@
echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_BLOCS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
@@ -140,8 +142,8 @@
{
$modules_id = $modules_arr[$i]->getVar('modules_id');
$modules_name = $modules_arr[$i]->getVar('modules_name');
- $modules_image = $modules_arr[$i]->getVar('modules_image');
- //$modules_blocks = $modules_arr[$i]->getVar('modules_blocs');
+ $modules_image = $modules_arr[$i]->getVar('modules_image');
+ //$modules_blocks = $modules_arr[$i]->getVar('modules_blocks');
$modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin');
$modules_display_user = $modules_arr[$i]->getVar('modules_display_user');
$display_admin = ($modules_display_admin == 1) ? _YES : _NO;
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-22 21:51:58 UTC (rev 12193)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:22:43 UTC (rev 12194)
@@ -28,7 +28,7 @@
$obj =& $tablesHandler->create();
}
- //Nom du module
+ //Module Name
$modules =& $modulesHandler->get($_REQUEST['tables_modules']);
$modules_name = $modules->getVar('modules_name');
@@ -36,21 +36,22 @@
if ( $_REQUEST['select'] == 1 )
{
- $obj->setVar('tables_module_table', strtolower($modules_name.'_topic'));
- $obj->setVar('tables_name', 'topic');
- $obj->setVar('tables_blocs', 0);
+ $obj->setVar('tables_module_table', strtolower($modules_name.'_category'));
+ $obj->setVar('tables_category', 1);
+ $obj->setVar('tables_name', 'category');
+ $obj->setVar('tables_blocks', 0);
$obj->setVar('tables_display_admin', 1);
$obj->setVar('tables_display_user', 1);
$obj->setVar('tables_status', 0);
$obj->setVar('tables_waiting', 0);
$obj->setVar('tables_online', 0);
$obj->setVar('tables_search', 0);
- $obj->setVar('tables_coms', 0);
- $obj->setVar('tables_nb_champs', 7);
+ $obj->setVar('tables_comments', 0);
+ $obj->setVar('tables_nb_fields', 7);
- $tables_champs = 'topic_id:int:11:unsigned:NOT NULL: :|topic_pid:int:5:unsigned:NOT NULL:0:|topic_title:varchar:255: :NOT NULL: :|topic_desc:text: : :NOT NULL: :|topic_img:varchar:255: :NOT NULL: :|topic_weight:int:5: :NOT NULL:0:|topic_color:varchar:10: :NULL: :';
+ $tables_fields = 'category_id:int:11:unsigned:NOT NULL: :|category_pid:int:5:unsigned:NOT NULL:0:|category_title:varchar:255: :NOT NULL: :|category_desc:text: : :NOT NULL: :|category_img:varchar:255: :NOT NULL: :|category_weight:int:5: :NOT NULL:0:|category_color:varchar:10: :NULL: :';
- $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
+ $tables_parameters = 'XoopsFormCategory:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
@@ -65,7 +66,7 @@
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ;
- $name_img = 'topic.'.$extension;
+ $name_img = 'category.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
@@ -81,53 +82,54 @@
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
- $obj->setVar('tables_blocs', $_REQUEST['tables_blocs']);
+ $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
$obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
$obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
$obj->setVar('tables_status', $_REQUEST['tables_status']);
$obj->setVar('tables_waiting', $_REQUEST['tables_waiting']);
$obj->setVar('tables_online', $_REQUEST['tables_online']);
$obj->setVar('tables_search', $_REQUEST['tables_search']);
- $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
+ $obj->setVar('tables_comments', $_REQUEST['tables_comments']);
- $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
+ $obj->setVar('tables_nb_fields', $_REQUEST['tables_nb_fields']);
- $tables_champs = '';
- $tables_parametres = '';
- for($i=0; $i<$_REQUEST['tables_nb_champs']; $i++)
+ $tables_fields = '';
+ $tables_parameters = '';
+ for($i=0; $i<$_REQUEST['tables_nb_fields']; $i++)
{
- //Rajouts des parametres: text:on:off: ...
+ //Additions of parameters: text: on: off: ...
if ( $i != 0 ) {
- $tables_parametres .= ( !empty($_REQUEST['champs_param_elements'][$i]) ) ? "".$_REQUEST['champs_param_elements'][$i].":" : " :";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_admin'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_user'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_blocs'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( $i == $_REQUEST['champs_param_main_field']) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_search_field'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_required_field'][$i]) ) ? "1" : "0";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_elements'][$i]) ) ? "".$_REQUEST['fields_param_elements'][$i].":" : " :";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_display_admin'][$i]) ) ? "1:" : "0:";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_display_user'][$i]) ) ? "1:" : "0:";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_display_blocks'][$i]) ) ? "1:" : "0:";
+ $tables_parameters .= ( $i == $_REQUEST['fields_param_main_field']) ? "1:" : "0:";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_search_field'][$i]) ) ? "1:" : "0:";
+ $tables_parameters .= ( !empty($_REQUEST['fields_param_required_field'][$i]) ) ? "1" : "0";
}
- //Rajouts des champs: test:int:4: ...
- $tables_champs .= (!empty($_REQUEST['champs_name'][$i])) ? "".$_REQUEST['champs_name'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_type'][$i])) ? "".$_REQUEST['champs_type'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_valeur'][$i])) ? "".$_REQUEST['champs_valeur'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_attributs'][$i])) ? "".$_REQUEST['champs_attributs'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_null'][$i])) ? "".strtoupper($_REQUEST['champs_null'][$i]).":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_default'][$i])) ? "".$_REQUEST['champs_default'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_clef'][$i])) ? "".$_REQUEST['champs_clef'][$i]."" : " ";
+ //Additions of fields: test: int: 4: ...
+ $tables_fields .= (!empty($_REQUEST['fields_name'][$i])) ? "".$_REQUEST['fields_name'][$i].":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_type'][$i])) ? "".$_REQUEST['fields_type'][$i].":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_value'][$i])) ? "".$_REQUEST['fields_value'][$i].":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_attributes'][$i])) ? "".$_REQUEST['fields_attributes'][$i].":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_null'][$i])) ? "".strtoupper($_REQUEST['fields_null'][$i]).":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_default'][$i])) ? "".$_REQUEST['fields_default'][$i].":" : " :";
+ $tables_fields .= (!empty($_REQUEST['fields_index'][$i])) ? "".$_REQUEST['fields_index'][$i]."" : " ";
- //Coupure entre les champs et coupre entre les parametres
- if ( $i != $_REQUEST...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 01:25:05
|
Revision: 12195
http://sourceforge.net/p/xoops/svn/12195
Author: beckmi
Date: 2013-10-23 01:24:56 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk: to version 1.38.6 Beta 1 (timgno)
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_about_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_entete.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notification.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.TXT
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,57 +1,61 @@
<?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 By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'admin_header.php';
-echo $adminMenu->addNavigation('const.php');
+
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
if (isset($_REQUEST['modules_name'])) {
$modules =& $modulesHandler->get($_REQUEST['modules_name']);
} else {
- $modules = & $modulesHandler;
+ $modules =& $modulesHandler;
}
-$modules_name = $modules->getVar('modules_name');
-$modules_desc = $modules->getVar('modules_description');
+$modules_name = $modules->getVar('modules_name');
+$modules_desc = $modules->getVar('modules_description');
$modules_author_website_name = $modules->getVar('modules_author_website_name');
-$modules_author_website_url = $modules->getVar('modules_author_website_url');
-$modules_image = $modules->getVar('modules_image');
-$modules_active_search = $modules->getVar('modules_active_search');
-$modules_active_comments = $modules->getVar('modules_active_comments');
+$modules_author_website_url = $modules->getVar('modules_author_website_url');
+$modules_image = $modules->getVar('modules_image');
+$modules_active_search = $modules->getVar('modules_active_search');
+$modules_active_comments = $modules->getVar('modules_active_comments');
+$modules_active_notifications = $modules->getVar('modules_active_notifications');
+$modules_paypal_button = $modules->getVar('modules_paypal_button');
+$modules_subversion = $modules->getVar('modules_subversion');
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
if (isset($_REQUEST['modules_name'])) {
- $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name']));
+ $criteria->add(new Criteria('tables_mid', $_REQUEST['modules_name']));
} else {
- $criteria->add(new Criteria('tables_modules'));
+ $criteria->add(new Criteria('tables_mid'));
}
$nb_tables = $tablesHandler->getCount($criteria);
$tables_arr = $tablesHandler->getall($criteria);
+echo $adminMenu->addNavigation('building.php');
switch ($op) {
- case "creation":
+ case "build":
//Effacer repertoire du nouveau module s'il existe
- clearDir($modPath.'/modules/'.$modules_name);
+ TDMCreate_clearDir($modPath.'/modules/'.$modules_name);
//Debut
OpenTable();
@@ -98,11 +102,11 @@
//Creation of pages admin
if ( $tables_display_admin == 1 ) {
- const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_category, $tables_name, $tables_img, $tables_fields, $tables_parameters);
+ const_admin_pages($modules, $modules_name, $tables_module_table, $tables_category, $tables_name, $tables_fields, $tables_parameters);
}
//Creation of pages and templates user
if ( $tables_display_user == 1 && $tables_module_table != NULL ) {
- const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_fields, $tables_parameters);
+ const_user_pages($modules, $modules_name, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
const_templates_pages($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
//Creation de search
@@ -111,7 +115,7 @@
}
//Creation of comments
if ( $modules_active_comments == 1 && $tables_comments == 1 ) {
- const_include_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters, $tables_img);
+ const_include_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
//Creation of the file mysql.sql
@@ -128,7 +132,7 @@
}
//Creation of Waiting Plugin
- const_waiting($modules, $modules_name, $tables_arr);
+ const_waiting($modules, $modules_name, $tables_arr);
//Creation de xoopsversion.php
@@ -184,12 +188,12 @@
const_admin_menu($modules, $modules_name, $tables_arr, $category);
//Creation de admin about.php
//$menu++;
- const_admin_about($modules, $modules_name);
+ const_admin_about($modules, $modules_name, $modules_paypal_button);
/************************************************/
/*Admin*/
/************************************************/
- const_user_header($modules, $modules_name, $tables_id, $tables_module_table, $tables_name);
- const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
+ const_user_header($modules, $modules_name, $tables_module_table, $tables_name);
+ const_user_index($modules, $modules_name, $tables_module_table, $tables_name);
CloseTable();
break;
@@ -216,7 +220,7 @@
$tables_select->addOptionArray($tablesHandler->getList());
$form->addElement($tables_select, FALSE);
- $form->addElement(new XoopsFormHidden('op', 'creation'));
+ $form->addElement(new XoopsFormHidden('op', 'build'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$form->display();
break;
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,27 +1,29 @@
<?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 By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @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$
*/
include_once 'admin_header.php';
-$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
-switch ($op) {
- case "modules_save":
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'list', 'string' );
+echo $adminMenu->addNavigation('modules.php');
+switch ($op)
+{
+ case "save":
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
@@ -48,75 +50,74 @@
$obj->setVar('modules_image', $uploader->getSavedFileName());
}
} else {
- $obj->setVar('modules_image', $_REQUEST['modules_image']);
+ $obj->setVar('modules_image', $_POST['modules_image']);
}
- //remove all spaces from the new name
- $spacesRemoved = str_replace(' ', '', $_REQUEST['modules_name']);
-
- $obj->setVar('modules_name', $spacesRemoved );
- $obj->setVar('modules_version', $_REQUEST['modules_version']);
- $obj->setVar('modules_description', $_REQUEST['modules_description']);
- $obj->setVar('modules_author', $_REQUEST['modules_author']);
- $obj->setVar('modules_author_mail', $_REQUEST['modules_author_mail']);
- $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']);
- $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']);
- $obj->setVar('modules_credits', $_REQUEST['modules_credits']);
- $obj->setVar('modules_license', $_REQUEST['modules_license']);
- $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']);
- $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']);
- $obj->setVar('modules_manual', $_REQUEST['modules_manual']);
- $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']);
- $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']);
- $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']);
- $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']);
- $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']);
- $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']);
- $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']);
- $obj->setVar('modules_release', $_REQUEST['modules_release']);
- $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']);
+ //remove all spaces from the new name
+ $obj->setVar('modules_name', preg_replace('/\s+/', '', $_POST['modules_name']));
+ $obj->setVar('modules_version', $_POST['modules_version']);
+ $obj->setVar('modules_description', $_POST['modules_description']);
+ $obj->setVar('modules_author', $_POST['modules_author']);
+ $obj->setVar('modules_author_mail', $_POST['modules_author_mail']);
+ $obj->setVar('modules_author_website_url', $_POST['modules_author_website_url']);
+ $obj->setVar('modules_author_website_name', $_POST['modules_author_website_name']);
+ $obj->setVar('modules_credits', $_POST['modules_credits']);
+ $obj->setVar('modules_license', $_POST['modules_license']);
+ $obj->setVar('modules_release_info', $_POST['modules_release_info']);
+ $obj->setVar('modules_release_file', $_POST['modules_release_file']);
+ $obj->setVar('modules_manual', $_POST['modules_manual']);
+ $obj->setVar('modules_manual_file', $_POST['modules_manual_file']);
+ $obj->setVar('modules_demo_site_url', $_POST['modules_demo_site_url']);
+ $obj->setVar('modules_demo_site_name', $_POST['modules_demo_site_name']);
+ $obj->setVar('modules_forum_site_url', $_POST['modules_forum_site_url']);
+ $obj->setVar('modules_forum_site_name', $_POST['modules_forum_site_name']);
+ $obj->setVar('modules_module_website_url', $_POST['modules_module_website_url']);
+ $obj->setVar('modules_module_website_name', $_POST['modules_module_website_name']);
+ $obj->setVar('modules_release', $_POST['modules_release']);
+ $obj->setVar('modules_module_status', $_POST['modules_module_status']);
$obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']);
$obj->setVar('modules_display_user', $_REQUEST['modules_display_user']);
$obj->setVar('modules_active_search', $_REQUEST['modules_active_search']);
$obj->setVar('modules_active_comments', $_REQUEST['modules_active_comments']);
+ $obj->setVar('modules_active_notifications', $_REQUEST['modules_active_notifications']);
+ $obj->setVar('modules_paypal_button', $_POST['modules_paypal_button']);
+ $obj->setVar('modules_subversion', $_POST['modules_subversion']);
if ($modulesHandler->insert($obj)) {
- redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_FORMOK);
+ redirect_header('modules.php?op=list', 2, _AM_TDMCREATE_FORMOK);
}
- break;
+ break;
- case "modules_create":
- echo $adminMenu->addNavigation('modules.php');
- $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list');
+ case "new":
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
echo $adminMenu->renderButton();
$obj =& $modulesHandler->create();
$form = $obj->getForm();
- break;
- case "modules_edit":
- $obj =& $modulesHandler->get($_REQUEST['modules_id']);
- $form = $obj->getForm();
- break;
- case "modules_delete":
- $obj =& $modulesHandler->get($_REQUEST['modules_id']);
- if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
- {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- if ($modulesHandler->delete($obj)) {
- $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']);
- redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
- } else {
- echo $obj->getHtmlErrors();
- }
- } else {
- xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'modules_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name')));
- }
- break;
- case "modules_list":
- default:
- echo $adminMenu->addNavigation('modules.php');
- $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=modules_create', 'add');
+ break;
+ case "edit":
+ $obj =& $modulesHandler->get($_REQUEST['modules_id']);
+ $form = $obj->getForm();
+ break;
+ case "delete":
+ $obj =& $modulesHandler->get($_REQUEST['modules_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
+ {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($modulesHandler->delete($obj)) {
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']);
+ redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name')));
+ }
+ break;
+ case "list":
+ default:
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
echo $adminMenu->renderButton();
$criteria = new CriteriaCompo();
@@ -126,42 +127,51 @@
$numrows_modules = $modulesHandler->getCount();
if ( $numrows_modules > 0 )
- {
- echo '<table width="100%" cellspacing="1" class="outer">';
- echo '<tr class="center">';
- echo '<th width="20%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>';
- echo '</tr>';
- $class = 'odd';
- foreach (array_keys($modules_arr) as $i)
- {
- $modules_id = $modules_arr[$i]->getVar('modules_id');
- $modules_name = $modules_arr[$i]->getVar('modules_name');
- $modules_image = $modules_arr[$i]->getVar('modules_image');
- //$modules_blocks = $modules_arr[$i]->getVar('modules_blocks');
- $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin');
- $modules_display_user = $modules_arr[$i]->getVar('modules_display_user');
- $display_admin = ($modules_display_admin == 1) ? _YES : _NO;
- $display_user = ($modules_display_user == 1) ? _YES : _NO;
- echo '<tr class="odd center">';
- echo '<td><b>'.$modules_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>';
- echo '<td>'.$display_admin.'</td>';
- echo '<td>'.$display_user.'</td>';
- echo '<td> </td>';
- echo '<td> </td>';
- echo '<td>';
- echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
- echo '</td>';
- echo '</tr>';
- }
- echo '</table><br><br>';
- }
- break;
+ {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '</tr>';
+ $class = 'odd';
+ foreach (array_keys($modules_arr) as $i)
+ {
+ $modules_id = $modules_arr[$i]->getVar('modules_id');
+ $modules_name = $modules_arr[$i]->getVar('modules_name');
+ $modules_image = $modules_arr[$i]->getVar('modules_image');
+ //$modules_blocks = $modules_arr[$i]->getVar('modules_blocks');
+ $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin');
+ $modules_display_user = $modules_arr[$i]->getVar('modules_display_user');
+ $display_admin = ($modules_display_admin == 1) ? _YES : _NO;
+ $display_user = ($modules_display_user == 1) ? _YES : _NO;
+ echo '<tr class="odd center">';
+ echo '<td><b>'.$i.'</b></td>';
+ echo '<td><b>'.$modules_name.'</b></td>';
+ echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>';
+ echo '<td>'.$display_admin.'</td>';
+ echo '<td>'.$display_user.'</td>';
+ echo '<td>';
+ echo '<a href="modules.php?op=edit&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._EDIT.'" title="'._EDIT.'"></a> <a href="modules.php?op=delete&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._DELETE.'" title="'._DELETE.'"></a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table><br><br>';
+ } else {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '</tr></table><br><br>';
+ }
+ break;
}
include_once "admin_footer.php";
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,25 +1,26 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @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$
*/
include_once 'admin_header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+echo $adminMenu->addNavigation('tables.php');
switch ($op) {
case "tables_save":
if (isset($_REQUEST['tables_id'])) {
@@ -29,10 +30,10 @@
}
//Module Name
- $modules =& $modulesHandler->get($_REQUEST['tables_modules']);
+ $modules =& $modulesHandler->get($_REQUEST['tables_mid']);
$modules_name = $modules->getVar('modules_name');
- $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
+ $obj->setVar('tables_mid', $_REQUEST['tables_mid']);
if ( $_REQUEST['select'] == 1 )
{
@@ -149,7 +150,7 @@
$obj =& $tablesHandler->create();
}
//Module Name
- $modules =& $modulesHandler->get($_REQUEST['tables_modules']);
+ $modules =& $modulesHandler->get($_REQUEST['tables_mid']);
$modules_name = $modules->getVar('modules_name');
$tables_blocks = (isset($_REQUEST['tables_blocks'])) ? $_REQUEST['tables_blocks'] : '0';
@@ -190,7 +191,7 @@
$oldname=$obj->getVar('tables_name');
- $obj->setVar('tables_modules', strtolower($_REQUEST['tables_modules']));
+ $obj->setVar('tables_mid', strtolower($_REQUEST['tables_mid']));
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
$obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
@@ -239,7 +240,7 @@
//}
}
-$newTableFields=implode("|",$newfields);
+ $newTableFields=implode("|",$newfields);
$obj->setVar('tables_fields', $newTableFields);
@@ -302,48 +303,50 @@
$obj->setVar('modules_image', $uploader->getSavedFileName());
}
} else {
- $obj->setVar('modules_image', $_REQUEST['modules_image']);
+ $obj->setVar('modules_image', $_POST['modules_image']);
}
- $spacesRemoved = str_replace(' ', '', $_REQUEST['modules_name']);
+ $spacesRemoved = preg_rep...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 01:53:41
|
Revision: 12196
http://sourceforge.net/p/xoops/svn/12196
Author: beckmi
Date: 2013-10-23 01:53:35 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 9009 (timgno): Added new releases 1.39 alpha 1, added new files
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/9009
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/arabic/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/arabic/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/bulgarian/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/bulgarian/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/help.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/french/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/french/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/help.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/
XoopsModules/TDMCreate/trunk/TDMCreate/class/
XoopsModules/TDMCreate/trunk/TDMCreate/const/
XoopsModules/TDMCreate/trunk/TDMCreate/css/
XoopsModules/TDMCreate/trunk/TDMCreate/docs/
XoopsModules/TDMCreate/trunk/TDMCreate/images/
XoopsModules/TDMCreate/trunk/TDMCreate/include/
XoopsModules/TDMCreate/trunk/TDMCreate/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/js/
XoopsModules/TDMCreate/trunk/TDMCreate/language/
XoopsModules/TDMCreate/trunk/TDMCreate/modules/
XoopsModules/TDMCreate/trunk/TDMCreate/sql/
XoopsModules/TDMCreate/trunk/TDMCreate/templates/
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Removed Paths:
-------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/
XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/css/
XoopsModules/TDMCreate/trunk/TDMCreate/docs/
XoopsModules/TDMCreate/trunk/TDMCreate/images/
XoopsModules/TDMCreate/trunk/TDMCreate/include/
XoopsModules/TDMCreate/trunk/TDMCreate/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/js/
XoopsModules/TDMCreate/trunk/TDMCreate/language/
XoopsModules/TDMCreate/trunk/TDMCreate/modules/
XoopsModules/TDMCreate/trunk/TDMCreate/sql/
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql137.sql
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql139a.sql
XoopsModules/TDMCreate/trunk/TDMCreate/templates/
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_footer.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -22,7 +22,6 @@
* ****************************************************************************
*/
global $pathImageAdmin;
- echo "<div align='center'><a href='http://www.xoops.org' target='_blank'>
- <img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
+ echo "<div align='center'><a href='http://www.xoops.org' target='_blank'><img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
echo "<div class='center pad5'>" . sprintf(_AM_TDMCREATE_MAINTAINEDBY, $xoopsModule->getVar('name')) . "</div>";
xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_header.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -22,21 +22,28 @@
* ****************************************************************************
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
include_once '../include/functions.php';
include_once 'includes.php';
//echo TDMCreate_adminMenu(_AM_ERROR_NOFRAMEWORKS);
$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin');
+$globlang = $GLOBALS['xoopsConfig']['language'];
+if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){
+ include_once $pathDir.'/language/'.$globlang.'/main.php';
+ }else{
+ include_once $pathDir.'/language/english/main.php';
+ }
+
if ( file_exists($pathDir.'/moduleadmin.php')){
- include_once $pathDir.'/moduleadmin.php';
- //return true;
-}else{
- xoops_cp_header();
- echo xoops_error(_AM_MODULEADMIN_MISSING);
- xoops_cp_footer();
- //return false;
-}
+ include_once $pathDir.'/moduleadmin.php';
+ //return true;
+ }else{
+ xoops_cp_header();
+ echo xoops_error(_AM_MODULEADMIN_MISSING);
+ xoops_cp_footer();
+ //return false;
+ }
$dirname = basename(dirname(dirname( __FILE__ ) ));
$module_handler =& xoops_gethandler('module');
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -21,6 +21,7 @@
* Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
* ****************************************************************************
*/
+
include 'admin_header.php';
xoops_cp_header();
@@ -33,16 +34,14 @@
case "creation":
$mods =& $modsHandler->get($_REQUEST['modules_name']);
$mods_name = $mods->getVar('modules_name');
- $mods_fname = $mods->getVar('modules_fname');
$mods_desc = $mods->getVar('modules_description');
$mods_author_website_name = $mods->getVar('modules_author_website_name');
$mods_author_website_url = $mods->getVar('modules_author_website_url');
$mods_image = $mods->getVar('modules_image');
$mods_display_admin = $mods->getVar('modules_display_admin');
$mods_display_user = $mods->getVar('modules_display_user');
- $mods_donations = $mods->getVar('modules_donations');
//Remove the new module directory if it exists
- //clearDir($modPath.'/modules/'.$modules_fname);
+ clearDir($modPath.'/modules/'.$mods_name);
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
@@ -58,9 +57,9 @@
/*Structure*/
/************************************************/
//Creation de l'architecture
- const_architecture($mods_fname, $mods_image);
+ const_architecture($mods_name, $mods_image);
//Creation du changelog.txt
- const_changelog($mods, $mods_fname);
+ const_changelog($mods, $mods_name);
// Files cicles
foreach (array_keys($tbls_arr) as $i)
@@ -87,41 +86,43 @@
copy($tbls_img1, $modPath."/modules/".$mods_name."/images/deco/".$tbls_img);
}
//Creation des classes
- const_class($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres);
+ const_class($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres);
//Creation of pages admin
if ( $mods_display_admin == 1 ) {
- const_admin_pages($mods, $mods_fname, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending);
+ const_admin_pages($mods, $mods_name, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending);
}
//Creation of pages and templates user
if ( $mods_display_user == 1 ) {
- const_user_pages($mods, $mods_fname, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres);
+ const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres);
// Creation of templates pages
- const_templates_pages($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
//Creation of search
if ( $tbls_search == 1 ) {
- const_include_search($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img);
+ const_include_search($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img);
}
//Creation of the comments
if ( $tbls_coms == 1 ) {
- const_include_coms($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_include_coms($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
//Creation of the file mysql.sql
- const_sql($mods_fname, $tbls_module_table, $tbls_name, $tbls_champs);
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables').
- " WHERE tables_name = 'cat' OR tables_name = 'category'
- OR tables_name = 'categories'
- OR tables_name = '".$tbls_name."_cat'
- OR tables_name = '".$tbls_name."_category'
- OR tables_name = '".$tbls_name."_categories' ");
+ const_sql($mods_name, $tbls_module_table, $tbls_name, $tbls_champs);
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables").
+ " WHERE tables_name = 'topic' OR tables_name = '".$tbls_name."_topic'
+ OR tables_name = 'cat'
+ OR tables_name = 'category'
+ OR tables_name = 'categories'
+ OR tables_name = '".$tbls_name."_cat'
+ OR tables_name = '".$tbls_name."_category'
+ OR tables_name = '".$tbls_name."_categories' ");
list( $topic ) = $xoopsDB->fetchRow($result);
//Creation of the blocks
if ( $tbls_blocks != 1 ) {
- const_blocks($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic);
+ const_blocks($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic);
//Creation of template blocks
- const_blocks_templates($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_blocks_templates($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
}
//Variables
@@ -140,44 +141,43 @@
$tbls_coms = $tblsHandler->getVar('tables_coms');
//Creation of xoopsversion.php file
//Xoops version set to integrate the end of the block, etc.
- const_xoopsversion($mods, $mods_fname, $tbls_arr, $tbls_module_table, $tbls_blocks);
+ const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks);
if($mods_display_user == 1){
// Creation of template index
- const_templates_index($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
// Creation of template header
- const_templates_header($mods, $mods_fname);
+ const_templates_header($mods, $mods_name);
// Creation of template footer
- const_templates_footer($mods, $mods_fname, $tbls_module_table);
+ const_templates_footer($mods, $mods_name, $tbls_module_table);
}
//Creation of the file permissions
$topic = 0;
if ( $topic == 1 || $tbls_module_table != null) { //
- const_admin_permissions($mods, $mods_fname, $tbls_name, $topic);
+ const_admin_permissions($mods, $mods_name, $tbls_name, $topic);
}
- // JQuery
- const_js_jquery($mods, $mods_name);
- //Include
+
+ //Include
//Configs
- const_include_configs($mods, $mods_fname, $mods_author_website_name, $mods_author_website_url);
+ const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url);
//Style
- const_css_admin($mods, $mods_fname);
- const_css_style($mods, $mods_fname);
+ const_css_admin($mods, $mods_name);
+ const_css_style($mods, $mods_name);
//Functions
- const_include_functions($mods, $mods_fname);
+ const_include_functions($mods, $mods_name);
//Creation of the install file for uploads
- const_include_install($mods, $mods_fname, $tbls_arr);
+ const_include_install($mods, $mods_name, $tbls_arr);
//Language
///////////////////////////////////////////////////////////////////////
//Creation of language main.php
- const_main_language($mods, $mods_fname, $mods_desc);
+ const_main_language($mods, $mods_name, $mods_desc);
//Creation of language modinfo.php
- const_modinfo_language($mods, $mods_fname, $tbls_arr, $mods_desc);
+ const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc);
//Creation of language admin.php
- const_admin_language($mods, $mods_fname, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending);
+ const_admin_language($mods, $mods_name, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending);
//Creation of language blocks.php
- const_blocks_language($mods, $mods_fname);
+ const_blocks_language($mods, $mods_name);
//Creation of language help.php
- const_help_language($mods, $mods_fname, $mods_desc);
+ const_help_language($mods, $mods_name, $mods_desc);
//Creation of language
//const_language($mods, $mods_name);
///////////////////////////////////////////////////////////////////////
@@ -186,22 +186,22 @@
/************************************************/
if ( $mods_display_admin == 1 ) {
//Creation of admin file admin_header.php
- const_admin_header($mods, $mods_fname, $tbls_arr);
+ const_admin_header($mods, $mods_name, $tbls_arr);
//Creation of admin file admin_footer.php
- const_admin_footer($mods, $mods_fname, $tbls_arr);
+ const_admin_footer($mods, $mods_name, $tbls_arr);
//Creation of admin file menu.php
- const_admin_menu($mods, $mods_fname, $tbls_arr, $topic);
+ const_admin_menu($mods, $mods_name, $tbls_arr, $topic);
//Creation of admin file about.php
- const_admin_about($mods, $mods_fname, $mods_donations);
+ const_admin_about($mods, $mods_name);
//Creation of admin file index.php
- const_admin_index($mods, $mods_fname, $tbls_arr, $tbls_online, $tbls_pending);
+ const_admin_index($mods, $mods_name, $tbls_arr, $tbls_online, $tbls_pending);
}
/************************************************/
/*User*/
/************************************************/
if ( $mods_display_user == 1 ) {
- const_user_header($mods, $mods_fname, $tbls_arr, $tbls_module_table);
- const_user_index($mods, $mods_fname);
+ const_user_header($mods, $mods_name, $tbls_arr, $tbls_module_table);
+ const_user_index($mods, $mods_name);
}
echo '</td></tr></table>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/languages.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -127,10 +127,7 @@
$langAdmin->addItemButton(_AM_TDMCREATE_LANGUAGES_NEWFOLDER, 'languages.php?op=add_folder', 'add');
$langAdmin->addItemButton(_AM_TDMCREATE_LANGUAGES_NEWFILE, 'languages.php?op=add_file', 'add');
echo $langAdmin->renderButton();
- $numrows_modules = $modsHandler->getCount();
- if($numrows_modules == 0){
- redirect_header('modules.php', 3, _AM_TDMCREATE_NOMODULES);
- }
+
$criteria = new CriteriaCompo();
$criteria->setSort("languages_id");
$criteria->setOrder("ASC");
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/menu.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -22,50 +22,58 @@
* ****************************************************************************
*/
$dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
$module_handler =& xoops_gethandler("module");
$xoopsModule =& XoopsModule::getByDirname($dirname);
$moduleInfo =& $module_handler->get($xoopsModule->getVar("mid"));
$pathImageAdmin = $moduleInfo->getInfo("icons32");
-$adminmenu = array(); $i = 1;
+$adminmenu = array();
+
+$i = 1;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU1;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU1_DESC;
$adminmenu[$i]["link"] = "admin/index.php";
-$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/dashboard.png";
+$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU2;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU2_DESC
$adminmenu[$i]["link"] = "admin/modules.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addmodule.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU3;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU3_DESC
$adminmenu[$i]["link"] = "admin/tables.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addtable.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU4;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU4_DESC
$adminmenu[$i]["link"] = "admin/languages.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/languages.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU5;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU5_DESC
$adminmenu[$i]["link"] = "admin/css.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/stylesheet.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU6;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU6_DESC
$adminmenu[$i]["link"] = "admin/changelog.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/changelog.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU7;
-$adminmenu[$i]["link"] = "admin/building.php";
-$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/builder.png";
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU7_DESC
+$adminmenu[$i]["link"] = 'admin/building.php';
+$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/builder.png';
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU8;
-$adminmenu[$i]["link"] = "admin/filesmanager.php";
-$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/file-manager.png";
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU8_DESC
+$adminmenu[$i]["link"] = 'admin/filesmanager.php';
+$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/file-manager.png';
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU9;
+//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU9_DESC;
$adminmenu[$i]["link"] = "admin/about.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png";
-$i++;
-$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU10;
-$adminmenu[$i]["link"] = "admin/readme.php";
-$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/document.png";
unset( $i );
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/modules.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:53:35 UTC (rev 12196)
@@ -40,11 +40,10 @@
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/modules/";
- $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'],
- $GLOBALS['xoopsModuleConfig']['maxsize'], null, null);
+ $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']);
- $name_img = $_GET['modules_fname'].'_slogo.'.$extension;
+ $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
@@ -58,7 +57,6 @@
}
$obj->setVar('modules_name', $_REQUEST['modules_name']);
- $obj->setVar('modules_fname', $_REQUEST['modules_fname']);
$obj->setVar('modules_version', $_REQUEST['modules_version']);
$obj->setVar('modules_description', $_REQUEST['modules_description']);
$obj->setVar('modules_author', $_REQUEST['modules_author']);
@@ -75,11 +73,10 @@
$obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']);
$obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']);
$obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']);
- $obj->setVar('modules_website_url', $_REQUEST['modules_website_url']);
- $obj->setVar('modules_website_name', $_REQUEST['modules_website_name']);
+ $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']);
+ $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']);
$obj->setVar('modules_release', $_REQUEST['modules_release']);
- $obj->setVar('modules_status', $_REQUEST['modules_status']);
- $obj->setVar('modules_donations', $_REQUEST['modules_donations']);
+ $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']);
$obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']);
$obj->setVar('modules_display_user', $_REQUEST['modules_display_user']);
$obj->setVar('modules_active_search', $_REQUEST['modules_active_search']);
@@ -128,16 +125,15 @@
echo $modAdmin->renderButton();
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('modules_id', 0, '>'));
- $criteria->setSort('modules_id ASC, modules_fname');
+ $criteria->setSort('modules_name');
$criteria->setOrder('ASC');
- $numrows = $modsHandler->getCount();
+ $numrows_modules = $modsHandler->getCount();
if (isset($_REQUEST['limit'])) {
$criteria->setLimit($_REQUEST['limit']);
$limit = $_REQUEST['limit'];
} else {
- $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']);
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']);
+ $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage'];
}
if (isset($_REQUEST['start'])) {
$criteria->setStart($_REQUEST['start']);
@@ -146,62 +142,74 @@
$criteria->setStart(0);
$start = 0;
}
- $tri = 1;
- $order = 1;
- if (isset($_REQUEST['order'])) {
- if ($_REQUEST['order'] ==1 ) {
+ $document_tri = 1;
+ $document_order = 1;
+ if (isset($_REQUEST['document_order'])) {
+ if ($_REQUEST['document_order'] ==1 ) {
$criteria->setOrder('ASC');
- $order=1;
+ $document_order=1;
}
- if ($_REQUEST['order'] == 2) {
+ if ($_REQUEST['document_order'] == 2) {
$criteria->setOrder('DESC');
- $order=2;
+ $document_order=2;
}
} else {
$criteria->setOrder('DESC');
}
- $mods_arr = $modsHandler->getall($criteria);
- if ( $numrows > $limit ) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&tri='.$tri.'&order='.$order);
+ $mods_arr = $modsHandler->getall($criteria);
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ if ( $numrows_modules > $limit ) {
+ $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&document_tri='.$document_tri.'&document_order='.$document_order);
$pagenav = $pagenav->renderNav(4);
} else {
$pagenav = '';
}
//echo "<div class='center'>".$pagenav."</div>";
- if ( $numrows > 0 )
+ if ( $numrows_modules > 0 )
{
- echo '<table width="100%" cellspacing="1" class="outer"><tr class="center">';
- echo '<th width="5%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_FOLDER.'</th>';
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="10%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="5%">'._AM_TDMCREATE_VERSION.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_VERSION.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_RELEASE.'</th>';
- echo '<th width="8%">'._AM_TDMCREATE_STATUS.'</th>';
- echo '<th width="8%">'._AM_TDMCREATE_SEARCH.'</th>';
- echo '<th width="8%">'._AM_TDMCREATE_COMMENTS.'</th>';
- echo '<th width="8%">'._AM_TDMCREATE_FORMACTION.' </th></tr>';
- $class = 'odd';
+ echo '<th width="10%">'._AM_TDMCREATE_STATUS.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_SEARCH.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.' </th>';
+ echo '</tr>';
+ $class = 'odd';
+
foreach (array_keys($mods_arr) as $i)
{
$mods_id = $mods_arr[$i]->getVar('modules_id');
- $display_admin = ($mods_arr[$i]->getVar('modules_display_admin') == 1) ? _YES : _NO;
- $display_user = ($mods_arr[$i]->getVar('modules_display_user') == 1) ? _YES : _NO;
- $active_search = ($mods_arr[$i]->getVar('modules_active_search') == 1) ? _YES : _NO;
- $active_comms = ($mods_arr[$i]->getVar('modules_active_comments') == 1) ? _YES : _NO;
- echo '<tr class="odd center"><td><b>'.$mods_id.'</b></td>';
- echo '<td><b>'.$mods_arr[$i]->getVar('modules_name').'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="30px"></td>';
- echo '<td><b>'.$mods_arr[$i]->getVar('modules_version').'</b></td>';
- echo '<td>'.$display_admin.'</td><td>'.$display_user.'</td>';
- echo '<td>'.$mods_arr[$i]->getVar('modules_release').'</td>';
- echo '<td>'.$mods_arr[$i]->getVar('modules_status').'</td>';
- echo '<td>'.$active_search.'</td><td>'.$active_comms.'</td>';
+ $mods_name = $mods_arr[$i]->getVar('modules_name');
+ $mods_image = $mods_arr[$i]->getVar('modules_image');
+ $mods_version = $mods_arr[$i...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 01:55:22
|
Revision: 12197
http://sourceforge.net/p/xoops/svn/12197
Author: beckmi
Date: 2013-10-23 01:55:18 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 9042 (timgno): Deleted unnecessary code
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/9042
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:53:35 UTC (rev 12196)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:55:18 UTC (rev 12197)
@@ -43,154 +43,55 @@
$modules =& $modsHandler->get($_REQUEST['tables_modules']);
$modules_name = $modsHandler->getVar('modules_name');
- $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
+ $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
+ $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
+ $obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
+ $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']);
+ $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
+ $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
+ $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
+ $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
+ $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
+ $obj->setVar('tables_created', $_REQUEST['tables_created']);
+ $obj->setVar('tables_published', $_REQUEST['tables_published']);
+ $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
+ $obj->setVar('tables_status', $_REQUEST['tables_status']);
+ $obj->setVar('tables_online', $_REQUEST['tables_online']);
+ $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
+ $obj->setVar('tables_search', $_REQUEST['tables_search']);
+ $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
+ $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
- if ( $_REQUEST['select'] == 1 )
- {
- $obj->setVar('tables_module_table', strtolower($modules_name.'_topic'));
- $obj->setVar('tables_name', 'topic');
- $obj->setVar('tables_blocks', 0);
- $obj->setVar('tables_display_admin', 0);
- $obj->setVar('tables_display_user', 0);
- $obj->setVar('tables_submitter', 0);
- $obj->setVar('tables_publisher', 0);
- $obj->setVar('tables_created', 0);
- $obj->setVar('tables_published', 0);
- $obj->setVar('tables_expired', 0);
- $obj->setVar('tables_status', 0);
- $obj->setVar('tables_online', 0);
- $obj->setVar('tables_pending', 0);
- $obj->setVar('tables_search', 0);
- $obj->setVar('tables_coms', 0);
- $obj->setVar('tables_nb_champs', 15);
-
- $tables_champs = 'topic_id:int:11:unsigned:NOT NULL: :|topic_pid:int:5:unsigned:NOT NULL:0:|topic_title:varchar:255: :NOT NULL: :|topic_desc:text: : :NOT NULL: :|topic_img:varchar:255: :NOT NULL: :|topic_weight:int:5: :NOT NULL:0:|topic_color:varchar:10: :NULL: :';
-
- // Options Extra Champs
- if ( isset($_REQUEST['tables_submitter']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_submitter:int:11: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_publisher']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_publisher:text: :NOT NULL: :';
- if ( isset($_REQUEST['tables_created']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_created:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_published']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_published:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_expired']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_expired:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_status']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_status:tinyint:2: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_online']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_pending']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_pending:tinyint:1: :NOT NULL:0:';
-
- $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelect:0:0:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
-
- //Image
- include_once XOOPS_ROOT_PATH.'/class/uploader.php';
-
- if(is_dir($pathImageAdmin)){
- $uploaddir = $pathImageAdmin;
- }else{
- $uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/tables/";
- }
-
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
-
- if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ;
- $name_img = $_GET['tables_name'].'.'.$extension;
- $uploader->setTargetFileName($name_img);
- $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
- if (!$uploader->upload()) {
- $errors = $uploader->getErrors();
- redirect_header("javascript:history.go(-1)",3, $errors);
- } else {
- $obj->setVar('tables_img', $uploader->getSavedFileName());
- }
+ $tables_champs = '';
+ $tables_parametres = '';
+ for($i=0; $i<$_REQUEST['tables_nb_champs']; $i++)
+ {
+ //Coupure entre les champs et coupre entre les parametres
+ if ( $i != $_REQUEST['tables_nb_champs'] - 1) {
+ $tables_champs .= '|';
+ if ( $i != 0 )
+ $tables_parametres .= '|';
} else {
- $obj->setVar('tables_img', $_REQUEST['tables_img1']);
+ // Options Extra Champs
+ if ( isset($_REQUEST['tables_submitter']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_submitter:int:11: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_publisher']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_publisher:text: :NOT NULL: :';
+ if ( isset($_REQUEST['tables_created']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_created:int:10: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_published']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_published:int:10: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_expired']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_expired:int:10: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_status']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_status:tinyint:2: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_online']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:';
+ if ( isset($_REQUEST['tables_pending']) == 1 )
+ $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_pending:tinyint:1: :NOT NULL:0:';
+ // Parameters
+ $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1';
}
- } else {
-
- $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
- $obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
- $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
- $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
- $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
- if ( isset($_REQUEST['tables_submitter']) )
- $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
- if ( isset($_REQUEST['tables_publisher']) )
- $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
- if ( isset($_REQUEST['tables_created']) )
- $obj->setVar('tables_created', $_REQUEST['tables_created']);
- if ( isset($_REQUEST['tables_published']) )
- $obj->setVar('tables_published', $_REQUEST['tables_published']);
- if ( isset($_REQUEST['tables_expired']) )
- $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
- if ( isset($_REQUEST['tables_status']) )
- $obj->setVar('tables_status', $_REQUEST['tables_status']);
- if ( isset($_REQUEST['tables_online']) )
- $obj->setVar('tables_online', $_REQUEST['tables_online']);
- if ( isset($_REQUEST['tables_pending']) )
- $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
- if ( isset($_REQUEST['tables_search']) )
- $obj->setVar('tables_search', $_REQUEST['tables_search']);
- if ( isset($_REQUEST['tables_coms']) )
- $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
- $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
-
- $tables_champs = '';
- $tables_parametres = '';
- for($i=0; $i<$_REQUEST['tables_nb_champs']; $i++)
- {
- //Repare of parameters: text:on:off: ...
- if ( $i != 0 ) {
- $tables_parametres .= ( !empty($_REQUEST['champs_param_elements'][$i]) ) ? $_REQUEST['champs_param_elements'][$i].":" : " :";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_admin'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_user'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_display_blocks'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( $i == $_REQUEST['champs_param_main_field']) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_search_field'][$i]) ) ? "1:" : "0:";
- $tables_parametres .= ( !empty($_REQUEST['champs_param_required_field'][$i]) ) ? "1" : "0";
- }
-
- //Repare of champs: test:int:4: ...
- $tables_champs .= (!empty($_REQUEST['champs_name'][$i])) ? $_REQUEST['champs_name'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_type'][$i])) ? $_REQUEST['champs_type'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_valeur'][$i])) ? $_REQUEST['champs_valeur'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_attributs'][$i])) ? $_REQUEST['champs_attributs'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_null'][$i])) ? strtoupper($_REQUEST['champs_null'][$i]).":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_default'][$i])) ? $_REQUEST['champs_default'][$i].":" : " :";
- $tables_champs .= (!empty($_REQUEST['champs_clef'][$i])) ? $_REQUEST['champs_clef'][$i]."" : " ";
-
- //Coupure entre les champs et coupre entre les parametres
- if ( $i != $_REQUEST['tables_nb_champs'] - 1) {
- $tables_champs .= '|';
- if ( $i != 0 )
- $tables_parametres .= '|';
- } else {
- // Options Extra Champs
- if ( isset($_REQUEST['tables_submitter']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_submitter:int:11: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_publisher']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_publisher:text: :NOT NULL: :';
- if ( isset($_REQUEST['tables_created']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_created:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_published']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_published:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_expired']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_expired:int:10: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_status']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_status:tinyint:2: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_online']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:';
- if ( isset($_REQUEST['tables_pending']) == 1 )
- $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_pending:tinyint:1: :NOT NULL:0:';
- // Parameters
- $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1';
- }
- }
}
$obj->setVar('tables_champs', $tables_champs);
$obj->setVar('tables_parametres', $tables_parametres);
@@ -215,32 +116,17 @@
}
//Name of the module
$modules =& $modulesHandler->get($_REQUEST['tables_modules']);
- $modules_name = $modules->getVar('modules_name');
-
- $tables_blocks = (isset($_REQUEST['tables_blocks'])) ? $_REQUEST['tables_blocks'] : '0';
- $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0';
- $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0';
- $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0';
- $tables_publisher = (isset($_REQUEST['tables_publisher'])) ? $_REQUEST['tables_publisher'] : '0';
- $tables_created = (isset($_REQUEST['tables_created'])) ? $_REQUEST['tables_created'] : '0';
- $tables_published = (isset($_REQUEST['tables_published'])) ? $_REQUEST['tables_published'] : '0';
- $tables_expired = (isset($_REQUEST['tables_expired'])) ? $_REQUEST['tables_expired'] : '0';
- $tables_status = (isset($_REQUEST['tables_status'])) ? $_REQUEST['tables_status'] : '0';
- $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0';
- $tables_pending = (isset($_REQUEST['tables_pending'])) ? $_REQUEST['tables_pending'] : '0';
- $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0';
- $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0';
- $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0';
+ $modules_name = $modules->getVar('modules_name');
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- if(is_dir($pathImageAdmin)){
+ if(is_dir($pathImageAdmin)){
$uploaddir = $pathImageAdmin;
}else{
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/tables/";
}
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
-
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"],
+ $GLOBALS['xoopsModuleConfig']["img_size"], null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
$name_img = $_GET['tables_name'].'.'.$extension;
@@ -259,33 +145,24 @@
$obj->setVar('tables_modules', strtolower($_REQUEST['tables_modules']));
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
+ $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']);
$obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
$obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
$obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
- if ( isset($_REQUEST['tables_submitter']) )
- $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
- if ( isset($_REQUEST['tables_publisher']) )
- $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
- if ( isset($_REQUEST['tables_created']) )
- $obj->setVar('tables_created', $_REQUEST['tables_created']);
- if ( isset($_REQUEST['tables_published']) )
- $obj->setVar('tables_published', $_REQUEST['tables_published']);
- if ( isset($_REQUEST['tables_expired']) )
- $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
- if ( isset($_REQUEST['tables_status']) )
- $obj->setVar('tables_status', $_REQUEST['tables_status']);
- if ( isset($_REQUEST['tables_online']) )
- $obj->setVar('tables_online', $_REQUEST['tables_online']);
- if ( isset($_REQUEST['tables_pending']) )
- $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
- if ( isset($_REQUEST['tables_search']) )
- $obj->setVar('tables_search', $_REQUEST['tables_search']);
- if ( isset($_REQUEST['tables_coms']) )
- $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
+ $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
+ $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
+ $obj->setVar('tables_created', $_REQUEST['tables_created']);
+ $obj->setVar('tables_published', $_REQUEST['tables_published']);
+ $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
+ $obj->setVar('tables_status', $_REQUEST['tables_status']);
+ $obj->setVar('tables_online', $_REQUEST['tables_online']);
+ $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
+ $obj->setVar('tables_search', $_REQUEST['tables_search']);
+ $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
$obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
if ($tblsHandler->insert($obj)) {
- redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK);
+ redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK);
}
break;
@@ -324,8 +201,9 @@
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
+ $modules_id = TDMCreate_CleanVars( $_REQUEST, 'modules_id', 0, 'int' );
if (isset($_REQUEST['modules_id'])) {
- $obj =& $modsHandler->get($_REQUEST['modules_id']);
+ $obj =& $modsHandler->get($modules_id);
} else {
$obj =& $modsHandler->create();
}
@@ -333,11 +211,11 @@
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/modules/";
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
-
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"],
+ $GLOBALS['xoopsModuleConfig']["img_size"], null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']);
- $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension;
+ $name_img = $_GET['modules_name'].'_slogo.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
@@ -404,103 +282,86 @@
}
break;
- case "tables_champs":
- //Champs existe deja ?
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('tables_name', $_REQUEST['tables_name']));
- $nb_tables1 = $tblsHandler->getCount($criteria);
-
- if ( $nb_tables1 < 1 )
- {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- if (isset($_REQUEST['tables_id'])) {
- $obj =& $tblsHandler->get($_REQUEST['tables_id']);
+ case "tables_champs":
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ $tables_id = TDMCreate_CleanVars( $_REQUEST, 'tables_id', 0, 'int' );
+ if (isset($_REQUEST['tables_id'])) {
+ $obj =& $tblsHandler->get($tables_id);
+ } else {
+ $obj =& $tblsHandler->create();
+ }
+
+ for($i=0; $i<$_GET['tables_nb_champs']; $i++)
+ {
+ $obj->setVar('champ_id', $_POST['champ_id'][$i]);
+ $obj->setVar('champ_name', $_POST['champ_name'][$i]);
+ $obj->setVar('champ_tables_nb_champs', $_POST['champ_tables_nb_champs'][$i]);
+ $obj->setVar('champ_tables_champs', $_POST['champ_tables_champs'][$i]);
+ $obj->setVar('champ_type', $_POST['champ_type'][$i]);
+ $obj->setVar('champ_value', $_POST['champ_value'][$i]);
+ $obj->setVar('champ_attribute', $_POST['champ_attribute'][$i]);
+ $obj->setVar('champ_null', $_POST['champ_null'][$i]);
+ $obj->setVar('champ_default', $_POST['champ_default'][$i]);
+ $obj->setVar('champ_key', $_POST['champ_key'][$i]);
+ $obj->setVar('champ_parameters', $_POST['champ_parameters'][$i]);
+ $obj->setVar('champ_elements_id', $_POST['champ_elements_id'][$i]);
+ $obj->setVar('champ_elements_value', $_POST['champ_elements_value'][$i]);
+ $obj->setVar('champ_elements_name', $_POST['champ_elements_name'][$i]);
+ $obj->setVar('champ_elements_admin', $_POST['champ_elements_admin'][$i]);
+ $obj->setVar('champ_elements_user', $_POST['champ_elements_block'][$i]);
+ $obj->setVar('champ_elements_mfield', $_POST['champ_elements_mfield'][$i]);
+ $obj->setVar('champ_elements_search', $_POST['champ_elements_search'][$i]);
+ $obj->setVar('champ_elements_required', $_POST['champ_elements_required'][$i]);
+ }
+
+ //Image
+ /*include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ if(!is_dir($pathImageAdmin)){
+ $uploaddir = $pathImageAdmin;
+ }else{
+ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/tables/";
+ }
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"],
+ $GLOBALS['xoopsModuleConfig']["img_size"], null, null);
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
+ $name_img = $_GET['tables_name'].'.'.$extension;
+ $uploader->setTargetFileName($name_img);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
} else {
- $obj =& $tblsHandler->create();
+ $obj->setVar('tables_img', $uploader->getSavedFileName());
}
- $tables_blocks = (isset($_REQUEST['tables_blocks'])) ? $_REQUEST['tables_blocks'] : '0';
- $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0';
- $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0';
- $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0';
- $tables_publisher = (isset($_REQUEST['tables_publisher'])) ? $_REQUEST['tables_publisher'] : '0';
- $tables_created = (isset($_REQUEST['tables_created'])) ? $_REQUEST['tables_created'] : '0';
- $tables_published = (isset($_REQUEST['tables_published'])) ? $_REQUEST['tables_published'] : '0';
- $tables_expired = (isset($_REQUEST['tables_expired'])) ? $_REQUEST['tables_expired'] : '0';
- $tables_status = (isset($_REQUEST['tables_status'])) ? $_REQUEST['tables_status'] : '0';
- $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0';
- $tables_pending = (isset($_REQUEST['tables_waiting'])) ? $_REQUEST['tables_waiting'] : '0';
- $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0';
- $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0';
- $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0';
-
- //Image
- include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- if(!is_dir($pathImageAdmin)){
- $uploaddir = $pathImageAdmin;
- }else{
- $uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/tables/";
- }
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+ } else {
+ $obj->setVar('tables_img', $_REQUEST['tables_img']);
+ }*/
- if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
- $name_img = $_REQUEST['tables_name'].'.'.$extension;
- $uploader->setTargetFileName($name_img);
- $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
- if (!$uploader->upload()) {
- $errors = $uploader->getErrors();
- redirect_header("javascript:history.go(-1)",3, $errors);
- } else {
- $obj->setVar('tables_img', $uploader->getSavedFileName());
- }
- } else {
- $obj->setVar('tables_img', $_REQUEST['tables_img']);
- }
-
- if ($tblsHandler->insert($obj)) {
- $tables_id = $GLOBALS['xoopsDB']->getInsertId();
- $obj = $tblsHandler->get($tables_id);
- $form = $obj->_getFormChamps();
- $form->display();
- }
- } else {
- redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_TABLES_EXIST);
- }
+ if ($tblsHandler->insert($obj)) {
+ $tables_id = $GLOBALS['xoopsDB']->getInsertId();
+ $obj = $tblsHandler->get($tables_id);
+ $form = $obj->getFormChamps();
+ $form->display();
+ }
break;
case "tables_create":
- echo $tablesAdmin->addNavigation('tables.php');
- $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add');
+ echo $tablesAdmin->addNavigation('tables.php');
$tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list');
echo $tablesAdmin->renderButton();
$obj =& $tblsHandler->create();
$form = $obj->getFormTable();
$form->display();
- break;
+ break;
- case "topics_create":
- echo $tablesAdmin->addNavigation('tables.php');
- $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add');
- $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list');
- echo $tablesAdmin->renderButton();
-
- $result = $GLOBALS['xoopsDB']->queryF("SELECT COUNT(*) FROM " . $GLOBALS['xoopsDB']->prefix("tdmcreate_tables")." WHERE tables_name = 'topic'");
- list( $topic ) = $GLOBALS['xoopsDB']->fetchRow($result);
- $obj =& $tblsHandler->get($_REQUEST['tables_id']);
- if ( $topic >= 0 ) {
- $form = $obj->getFormTopic();
- $form->display();
- }
- break;
-
case "tables_list":
default:
echo $tablesAdmin->addNavigation('tables.php');
- $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add');
- $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add');
+ $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add');
echo $tablesAdmin->renderButton();
//Retirer les tables inutiles
@@ -513,8 +374,8 @@
}
$criteria = new CriteriaCompo();
- $criteria->setSort('modules_name');
- $criteria->setOrder('ASC');
+ $criteria->setSort('modules_id');
+ $criteria->setOrder('DESC');
$numrows_modules = $modsHandler->getCount();
if (isset($_REQUEST['limit'])) {
$criteria->setLimit($_REQUEST['limit']);
@@ -558,78 +419,86 @@
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th align="center" width="20%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th align="center" width="12%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th align="center" width="8%">'._AM_TDMCREATE_IMAGE.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_SEARCH.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_COM.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>';
- echo '<th align="center" width="20%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th align="center" width="7%">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($mods_arr) as $i)
{
- $mods_id = $mods_arr[$i]->getVar('modules_id');
- $mods_name = $mods_arr[$i]->getVar('modules_name');
- $mods_image = $mods_arr[$i]->getVar('modules_image');
- $mods_display_admin = $mods_arr[$i]->getVar('modules_display_admin');
- $mods_display_user = $mods_arr[$i]->getVar('modules_display_user');
- $mods_display_admin = ($mods_display_admin == 1) ? _YES : _NO;
- $mods_display_user = ($mods_display_user == 1) ? _YES : _NO;
- echo '<tr class="odd center">';
- echo '<td class="center"><b>'.$mods_id.'</b></td>';
- echo '<td class="left"><b>'.$mods_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mods_image.'" height="30px"></td>';
- echo '<td>'.$mods_display_admin.'</td>';
- echo '<td>'.$mods_display_user.'</td>';
- echo '<td> </td>';
- echo '<td> </td>';
- echo '<td class="center width5">';
- echo '<a href="tables.php?op=edit_modules&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=delete_modules&modules_id='.$mods_id.'"><img ...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 01:57:04
|
Revision: 12198
http://sourceforge.net/p/xoops/svn/12198
Author: beckmi
Date: 2013-10-23 01:56:55 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 9117 (timgno): Restructuring, Updated, Files Revision, Added New files
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/9117
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql137.sql
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql139a.sql
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:55:18 UTC (rev 12197)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:56:55 UTC (rev 12198)
@@ -28,22 +28,15 @@
//echo TDMCreate_adminMenu(_AM_ERROR_NOFRAMEWORKS);
$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin');
-$globlang = $GLOBALS['xoopsConfig']['language'];
-if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){
- include_once $pathDir.'/language/'.$globlang.'/main.php';
- }else{
- include_once $pathDir.'/language/english/main.php';
- }
-
if ( file_exists($pathDir.'/moduleadmin.php')){
- include_once $pathDir.'/moduleadmin.php';
- //return true;
- }else{
- xoops_cp_header();
- echo xoops_error(_AM_MODULEADMIN_MISSING);
- xoops_cp_footer();
- //return false;
- }
+ include_once $pathDir.'/moduleadmin.php';
+ //return true;
+}else{
+ xoops_cp_header();
+ echo xoops_error(_AM_MODULEADMIN_MISSING);
+ xoops_cp_footer();
+ //return false;
+}
$dirname = basename(dirname(dirname( __FILE__ ) ));
$module_handler =& xoops_gethandler('module');
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:55:18 UTC (rev 12197)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:56:55 UTC (rev 12198)
@@ -34,6 +34,7 @@
case "creation":
$mods =& $modsHandler->get($_REQUEST['modules_name']);
$mods_name = $mods->getVar('modules_name');
+ $mods_fname = $mods->getVar('modules_fname');
$mods_desc = $mods->getVar('modules_description');
$mods_author_website_name = $mods->getVar('modules_author_website_name');
$mods_author_website_url = $mods->getVar('modules_author_website_url');
@@ -41,7 +42,7 @@
$mods_display_admin = $mods->getVar('modules_display_admin');
$mods_display_user = $mods->getVar('modules_display_user');
//Remove the new module directory if it exists
- clearDir($modPath.'/modules/'.$mods_name);
+ TDMCreate_clearDir($modPath.'/modules/'.$mods_name);
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
@@ -86,29 +87,29 @@
copy($tbls_img1, $modPath."/modules/".$mods_name."/images/deco/".$tbls_img);
}
//Creation des classes
- const_class($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres);
+ const_class($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres);
//Creation of pages admin
if ( $mods_display_admin == 1 ) {
- const_admin_pages($mods, $mods_name, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending);
+ const_admin_pages($mods, $mods_fname, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending);
}
//Creation of pages and templates user
if ( $mods_display_user == 1 ) {
- const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres);
+ const_user_pages($mods, $mods_fname, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres);
// Creation of templates pages
- const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_templates_pages($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
//Creation of search
if ( $tbls_search == 1 ) {
- const_include_search($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img);
+ const_include_search($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img);
}
//Creation of the comments
if ( $tbls_coms == 1 ) {
- const_include_coms($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_include_coms($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
//Creation of the file mysql.sql
- const_sql($mods_name, $tbls_module_table, $tbls_name, $tbls_champs);
+ const_sql($mods_fname, $tbls_module_table, $tbls_name, $tbls_champs);
$result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables").
" WHERE tables_name = 'topic' OR tables_name = '".$tbls_name."_topic'
OR tables_name = 'cat'
@@ -120,9 +121,9 @@
list( $topic ) = $xoopsDB->fetchRow($result);
//Creation of the blocks
if ( $tbls_blocks != 1 ) {
- const_blocks($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic);
+ const_blocks($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic);
//Creation of template blocks
- const_blocks_templates($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_blocks_templates($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
}
}
//Variables
@@ -141,43 +142,43 @@
$tbls_coms = $tblsHandler->getVar('tables_coms');
//Creation of xoopsversion.php file
//Xoops version set to integrate the end of the block, etc.
- const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks);
+ const_xoopsversion($mods, $mods_fname, $tbls_arr, $tbls_module_table, $tbls_blocks);
if($mods_display_user == 1){
// Creation of template index
- const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
+ const_templates_index($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres);
// Creation of template header
- const_templates_header($mods, $mods_name);
+ const_templates_header($mods, $mods_fname);
// Creation of template footer
- const_templates_footer($mods, $mods_name, $tbls_module_table);
+ const_templates_footer($mods, $mods_fname, $tbls_module_table);
}
//Creation of the file permissions
$topic = 0;
if ( $topic == 1 || $tbls_module_table != null) { //
- const_admin_permissions($mods, $mods_name, $tbls_name, $topic);
+ const_admin_permissions($mods, $mods_fname, $tbls_name, $topic);
}
//Include
//Configs
- const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url);
+ const_include_configs($mods, $mods_fname, $mods_author_website_name, $mods_author_website_url);
//Style
- const_css_admin($mods, $mods_name);
- const_css_style($mods, $mods_name);
+ const_css_admin($mods, $mods_fname);
+ const_css_style($mods, $mods_fname);
//Functions
- const_include_functions($mods, $mods_name);
+ const_include_functions($mods, $mods_fname);
//Creation of the install file for uploads
- const_include_install($mods, $mods_name, $tbls_arr);
+ const_include_install($mods, $mods_fname, $tbls_arr);
//Language
///////////////////////////////////////////////////////////////////////
//Creation of language main.php
- const_main_language($mods, $mods_name, $mods_desc);
+ const_main_language($mods, $mods_fname, $mods_desc);
//Creation of language modinfo.php
- const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc);
+ const_modinfo_language($mods, $mods_fname, $tbls_arr, $mods_desc);
//Creation of language admin.php
- const_admin_language($mods, $mods_name, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending);
+ const_admin_language($mods, $mods_fname, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending);
//Creation of language blocks.php
- const_blocks_language($mods, $mods_name);
+ const_blocks_language($mods, $mods_fname);
//Creation of language help.php
- const_help_language($mods, $mods_name, $mods_desc);
+ const_help_language($mods, $mods_fname, $mods_desc);
//Creation of language
//const_language($mods, $mods_name);
///////////////////////////////////////////////////////////////////////
@@ -186,22 +187,22 @@
/************************************************/
if ( $mods_display_admin == 1 ) {
//Creation of admin file admin_header.php
- const_admin_header($mods, $mods_name, $tbls_arr);
+ const_admin_header($mods, $mods_fname, $tbls_arr);
//Creation of admin file admin_footer.php
- const_admin_footer($mods, $mods_name, $tbls_arr);
+ const_admin_footer($mods, $mods_fname, $tbls_arr);
//Creation of admin file menu.php
- const_admin_menu($mods, $mods_name, $tbls_arr, $topic);
+ const_admin_menu($mods, $mods_fname, $tbls_arr, $topic);
//Creation of admin file about.php
- const_admin_about($mods, $mods_name);
+ const_admin_about($mods, $mods_fname);
//Creation of admin file index.php
- const_admin_index($mods, $mods_name, $tbls_arr, $tbls_online, $tbls_pending);
+ const_admin_index($mods, $mods_fname, $tbls_arr, $tbls_online, $tbls_pending);
}
/************************************************/
/*User*/
/************************************************/
if ( $mods_display_user == 1 ) {
- const_user_header($mods, $mods_name, $tbls_arr, $tbls_module_table);
- const_user_index($mods, $mods_name);
+ const_user_header($mods, $mods_fname, $tbls_arr, $tbls_module_table);
+ const_user_index($mods, $mods_fname);
}
echo '</td></tr></table>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:55:18 UTC (rev 12197)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:56:55 UTC (rev 12198)
@@ -22,58 +22,50 @@
* ****************************************************************************
*/
$dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
-
$module_handler =& xoops_gethandler("module");
$xoopsModule =& XoopsModule::getByDirname($dirname);
$moduleInfo =& $module_handler->get($xoopsModule->getVar("mid"));
$pathImageAdmin = $moduleInfo->getInfo("icons32");
-$adminmenu = array();
-
-$i = 1;
+$adminmenu = array(); $i = 1;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU1;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU1_DESC;
$adminmenu[$i]["link"] = "admin/index.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU2;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU2_DESC
$adminmenu[$i]["link"] = "admin/modules.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addmodule.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU3;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU3_DESC
$adminmenu[$i]["link"] = "admin/tables.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addtable.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU4;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU4_DESC
$adminmenu[$i]["link"] = "admin/languages.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/languages.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU5;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU5_DESC
$adminmenu[$i]["link"] = "admin/css.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/stylesheet.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU6;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU6_DESC
$adminmenu[$i]["link"] = "admin/changelog.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/changelog.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU7;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU7_DESC
-$adminmenu[$i]["link"] = 'admin/building.php';
-$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/builder.png';
+$adminmenu[$i]["link"] = "admin/building.php";
+$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/builder.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU8;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU8_DESC
-$adminmenu[$i]["link"] = 'admin/filesmanager.php';
-$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/file-manager.png';
+$adminmenu[$i]["link"] = "admin/filesmanager.php";
+$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/file-manager.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU9;
-//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU9_DESC;
$adminmenu[$i]["link"] = "admin/about.php";
$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png";
+$i++;
+$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU10;
+$adminmenu[$i]["link"] = "admin/readme.php";
+$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/document.png";
unset( $i );
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:55:18 UTC (rev 12197)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:56:55 UTC (rev 12198)
@@ -43,7 +43,7 @@
$uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']);
- $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension;
+ $name_img = $_GET['modules_fname'].'_slogo.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
@@ -57,6 +57,7 @@
}
$obj->setVar('modules_name', $_REQUEST['modules_name']);
+ $obj->setVar('modules_fname', $_REQUEST['modules_fname']);
$obj->setVar('modules_version', $_REQUEST['modules_version']);
$obj->setVar('modules_description', $_REQUEST['modules_description']);
$obj->setVar('modules_author', $_REQUEST['modules_author']);
@@ -73,10 +74,11 @@
$obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']);
$obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']);
$obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']);
- $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']);
- $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']);
+ $obj->setVar('modules_website_url', $_REQUEST['modules_website_url']);
+ $obj->setVar('modules_website_name', $_REQUEST['modules_website_name']);
$obj->setVar('modules_release', $_REQUEST['modules_release']);
- $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']);
+ $obj->setVar('modules_status', $_REQUEST['modules_status']);
+ $obj->setVar('modules_donations', $_REQUEST['modules_donations']);
$obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']);
$obj->setVar('modules_display_user', $_REQUEST['modules_display_user']);
$obj->setVar('modules_active_search', $_REQUEST['modules_active_search']);
@@ -125,15 +127,16 @@
echo $modAdmin->renderButton();
$criteria = new CriteriaCompo();
- $criteria->setSort('modules_name');
+ $criteria->add(new Criteria('modules_id', 0, '>'));
+ $criteria->setSort('modules_id ASC, modules_fname');
$criteria->setOrder('ASC');
- $numrows_modules = $modsHandler->getCount();
+ $numrows = $modsHandler->getCount();
if (isset($_REQUEST['limit'])) {
$criteria->setLimit($_REQUEST['limit']);
$limit = $_REQUEST['limit'];
} else {
- $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']);
- $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage'];
+ $criteria->setLimit($GLOBALS['xoopsModuleConfig']['perpageadmin']);
+ $limit = $GLOBALS['xoopsModuleConfig']['perpageadmin'];
}
if (isset($_REQUEST['start'])) {
$criteria->setStart($_REQUEST['start']);
@@ -142,74 +145,62 @@
$criteria->setStart(0);
$start = 0;
}
- $document_tri = 1;
- $document_order = 1;
- if (isset($_REQUEST['document_order'])) {
- if ($_REQUEST['document_order'] ==1 ) {
+ $tri = 1;
+ $order = 1;
+ if (isset($_REQUEST['order'])) {
+ if ($_REQUEST['order'] ==1 ) {
$criteria->setOrder('ASC');
- $document_order=1;
+ $order=1;
}
- if ($_REQUEST['document_order'] == 2) {
+ if ($_REQUEST['order'] == 2) {
$criteria->setOrder('DESC');
- $document_order=2;
+ $order=2;
}
} else {
$criteria->setOrder('DESC');
}
- $mods_arr = $modsHandler->getall($criteria);
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- if ( $numrows_modules > $limit ) {
- $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&document_tri='.$document_tri.'&document_order='.$document_order);
+ $mods_arr = $modsHandler->getall($criteria);
+ if ( $numrows > $limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&tri='.$tri.'&order='.$order);
$pagenav = $pagenav->renderNav(4);
} else {
$pagenav = '';
}
//echo "<div class='center'>".$pagenav."</div>";
- if ( $numrows_modules > 0 )
+ if ( $numrows > 0 )
{
- echo '<table width="100%" cellspacing="1" class="outer">';
- echo '<tr class="center">';
- echo '<th width="10%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<table width="100%" cellspacing="1" class="outer"><tr class="center">';
+ echo '<th width="5%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_FOLDER.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_VERSION.'</th>';
+ echo '<th width="5%">'._AM_TDMCREATE_VERSION.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_RELEASE.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_STATUS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_SEARCH.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.' </th>';
- echo '</tr>';
- $class = 'odd';
-
+ echo '<th width="8%">'._AM_TDMCREATE_STATUS.'</th>';
+ echo '<th width="8%">'._AM_TDMCREATE_SEARCH.'</th>';
+ echo '<th width="8%">'._AM_TDMCREATE_COMMENTS.'</th>';
+ echo '<th width="8%">'._AM_TDMCREATE_FORMACTION.' </th></tr>';
+ $class = 'odd';
foreach (array_keys($mods_arr) as $i)
{
$mods_id = $mods_arr[$i]->getVar('modules_id');
- $mods_name = $mods_arr[$i]->getVar('modules_name');
- $mods_image = $mods_arr[$i]->getVar('modules_image');
- $mods_version = $mods_arr[$i]->getVar('modules_version');
- $mods_release = $mods_arr[$i]->getVar('modules_release');
- $mods_module_status = $mods_arr[$i]->getVar('modules_module_status');
- $mods_display_admin = $mods_arr[$i]->getVar('modules_display_admin');
- $mods_display_user = $mods_arr[$i]->getVar('modules_display_user');
- $mods_active_search = $mods_arr[$i]->getVar('modules_active_search');
- $display_admin = ($mods_display_admin == 1) ? _YES : _NO;
- $display_user = ($mods_display_user == 1) ? _YES : _NO;
- $active_search = ($mods_active_search == 1) ? _YES : _NO;
- echo '<tr class="odd center">';
- echo '<td><b>'.$mods_id.'</b></td>';
- echo '<td><b>'.$mods_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mods_image.'" height="30px"></td>';
- echo '<td><b>'.$mods_version.'</b></td>';
- echo '<td>'.$display_admin.'</td>';
- echo '<td>'.$display_user.'</td>';
- echo '<td>'.$mods_release.'</td>';
- echo '<td>'.$mods_module_status.'</td>';
- echo '<td>'.$active_search.'</td>';
+ $display_admin = ($mods_arr[$i]->getVar('modules_display_admin') == 1) ? _YES : _NO;
+ $display_user = ($mods_arr[$i]->getVar('modules_display_user') == 1) ? _YES : _NO;
+ $active_search = ($mods_arr[$i]->getVar('modules_active_search') == 1) ? _YES : _NO;
+ $active_comms = ($mods_arr[$i]->getVar('modules_active_comments') == 1) ? _YES : _NO;
+ echo '<tr class="odd center"><td><b>'.$mods_id.'</b></td>';
+ echo '<td><b>'.$mods_arr[$i]->getVar('modules_name').'</b></td>';
+ echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="30px"></td>';
+ echo '<td><b>'.$mods_arr[$i]->getVar('modules_version').'</b></td>';
+ echo '<td>'.$display_admin.'</td><td>'.$display_user.'</td>';
+ echo '<td>'.$mods_arr[$i]->getVar('modules_release').'</td>';
+ echo '<td>'.$mods_arr[$i]->getVar('modules_status').'</td>';
+ echo '<td>'.$active_search.'</td><td>'.$active_comms.'</td>';
echo '<td>';
echo '<a href="modules.php?op=modules_edit&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
- echo '</td>';
- echo '</tr>';
+ echo '</td></tr>';
}
echo '</table><br />';
echo "<div class='center'>".$pagenav."</div><br />";
Added: XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php (rev 0)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php 2013-10-23 01:56:55 UTC (rev 12198)
@@ -0,0 +1,97 @@
+<?php
+/**
+ * ****************************************************************************
+ * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
+ * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * - Revision Copyright (c) (http://www.txmodxoops.org)
+ *
+ * This license contains restrictions!!!
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @license TDM GPL license
+ * @author TDM TEAM DEV MODULE
+ * @author TXMod Xoops (in...@tx...)
+ *
+ * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
+ * ****************************************************************************
+ */
+include "admin_header.php";
+xoops_cp_header();
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+$readAdmin = new ModuleAdmin();
+switch ($op) {
+ case 'default':
+ case 'readme':
+ default:
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('readme.txt', _AM_TDMCREATE_README);
+ break;
+
+ case 'changelog':
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('changelog.txt', _AM_TDMCREATE_CHANGELOG);
+ break;
+
+ case 'credits':
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('credits.txt', _AM_TDMCREATE_CREDITS);
+ break;
+
+ case 'install':
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('install.txt', _AM_TDMCREATE_INSTALL);
+ break;
+
+ case 'licence':
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('licence.txt', _AM_TDMCREATE_LICENCE);
+ break;
+
+ case 'lang_diff':
+ echo $readAdmin->addNavigation('readme.php');
+ $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list');
+ $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list');
+ echo $readAdmin->renderButton();
+ echo TDMCreate_readData('lang_diff.txt', _AM_TDMCREATE_LANGDIFF);
+ break;
+}
+include "admin_footer.php";
\ No newline at end of file
Property changes on: XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 01:58:09
|
Revision: 12199
http://sourceforge.net/p/xoops/svn/12199
Author: beckmi
Date: 2013-10-23 01:58:04 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 9119 (timgno): Updated, Files Revision
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/9119
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -42,7 +42,7 @@
$mods_display_admin = $mods->getVar('modules_display_admin');
$mods_display_user = $mods->getVar('modules_display_user');
//Remove the new module directory if it exists
- TDMCreate_clearDir($modPath.'/modules/'.$mods_name);
+ //clearDir($modPath.'/modules/'.$modules_name);
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -54,7 +54,7 @@
$j++;
}
//if( $structure_parametres[3] == 1 || $i == 0) {
- $text .= '<{$'.$tables_name.'.'.correctFormat($structure_champs[0]).'}><br />
+ $text .= '<{$'.$tables_name.'.'.$structure_champs[0].'}><br />
';
//}
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -65,34 +65,7 @@
{
//$class = ($class == "even") ? "odd" : "even";';
$text .= '
- $xoopsTpl->append(\''.$tables_name.'\', array(';
- $j = 0; //$commas[0] = '\'class\' => $class';
- for($i=0; $i<$nb_champs; $i++) {
- $champs = explode(":", $champs_total[$i]);
- //View the elements of the form and choose the parameters
- /*if( $i != 0 )
- { */
- $params1 = explode(":", $params_total[$i-1]);
- if ( $params1[4] != 1 )
- {
- $tpl_var = correctFormat($champs[0]);
- $commas[$i] .= '\''.$tpl_var.'\' => $'.$tables_name.'_arr[$i]->getVar(\''.$champs[0].'\')';
- }
- //}
- $j++;
- }
- //Problem commas
- $key = '';
- for ($i=0; $i<$j; $i++)
- {
- if ( $i != $j - 1 ) {
- $key .= ''.$commas[$i].', ';
- } else {
- $key .= ''.$commas[$i].'';
- }
- }
- $text .= $key; unset($j);
- $text .= '));
+ $xoopsTpl->append(\''.$tables_name.'\', array('.$tables_name.'));
}
}
';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -211,7 +211,7 @@
$modversion[\'config\'][$i][\'formtype\'] = "select";
$modversion[\'config\'][$i][\'valuetype\'] = "text";
$modversion[\'config\'][$i][\'default\'] = "dhtmltextarea";
-$modversion[\'config\'][$i][\'options\'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor");
+$modversion[\'config\'][$i][\'options\'] = XoopsLists::getEditorList();
$modversion[\'config\'][$i][\'category\'] = "global";
$i++;
$modversion[\'config\'][$i][\'name\'] = "keywords";
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt 2013-10-23 01:58:04 UTC (rev 12199)
@@ -1,4 +1,13 @@
=================================
+2012/03/10: Version 1.39 Alpha 2
+=================================
+
+- Added new file readme.php (Timgno)
+- Added new champ in modules table (Timgno)
+- Changed file constArchitecture class with tdmcreate_architecture.php (Timgno)
+- Fixed more bugs (Timgno)
+
+=================================
2012/02/14: Version 1.39 Alpha 1
=================================
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt 2013-10-23 01:58:04 UTC (rev 12199)
@@ -1,3 +1,452 @@
Read Me First
=============
-For a different language, pleace use the english language folder to traslate this module
\ No newline at end of file
+For a different language, pleace use the english language folder to traslate this module
+
+------------------------------------------------
+Version 1.0 - 1.1
+------------------------------------------------
+admin.php
+
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field");
+
+define("_AM_TDMCREATE_FORMEDIT","Edit");
+define("_AM_TDMCREATE_FORMDEL","Delete");
+define("_AM_TDMCREATE_FORMCHAMPS","Edit fields");
+define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table");
+define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online");
+
+define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms");
+define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms");
+
+define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>");
+
+modinfo.php
+
+//Menu
+define("_MI_TDMCREATE_ADMIN_INDEX","Index");
+define("_MI_TDMCREATE_ADMIN_MODULES","Add a module");
+define("_MI_TDMCREATE_ADMIN_TABLES","Add a table");
+define("_MI_TDMCREATE_ADMIN_CONST","Build the module");
+define("_MI_TDMCREATE_ADMIN_ABOUT","Short About");
+define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences");
+define("_MI_TDMCREATE_ADMIN_UPDATE","Update");
+
+define("_MI_TDMCREATE_DESC","Module create of module made by TDM");
+
+------------------------------------------------
+Version 1.1 - 1.15
+------------------------------------------------
+admin.php
+
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field");
+
+define("_AM_TDMCREATE_FORMEDIT","Edit");
+define("_AM_TDMCREATE_FORMDEL","Delete");
+define("_AM_TDMCREATE_FORMCHAMPS","Edit fields");
+define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table");
+define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online");
+// 1.15
+define("_AM_TDMCREATE_MODULES_AUTHOR_MAIL", "Author Email");
+define("_AM_TDMCREATE_MODULES_FORUM_SITE_URL","Topic URL");
+define("_AM_TDMCREATE_MODULES_FORUM_SITE_NAME","Topic URL title");
+
+define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms");
+define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms");
+// 1.15
+define("_AM_TDMCREATE_CONST_OK_MAIN_LANGUAGE", "Creation of main.php file into language folder");
+define("_AM_TDMCREATE_CONST_NOTOK_MAIN_LANGUAGE", "Problemes: Creation of main.php file into language folder");
+
+define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>");
+
+modinfo.php
+
+//Menu
+define("_MI_TDMCREATE_ADMIN_INDEX","Index");
+define("_MI_TDMCREATE_ADMIN_MODULES","Add a module");
+define("_MI_TDMCREATE_ADMIN_TABLES","Add a table");
+define("_MI_TDMCREATE_ADMIN_CONST","Build the module");
+define("_MI_TDMCREATE_ADMIN_ABOUT","Short About");
+define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences");
+define("_MI_TDMCREATE_ADMIN_UPDATE","Update");
+
+define("_MI_TDMCREATE_DESC","Module create of module made by TDM");
+
+------------------------------------------------
+Version 1.15 - 1.37
+------------------------------------------------
+admin.php
+
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index");
+define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field");
+
+define("_AM_TDMCREATE_FORMEDIT","Edit");
+define("_AM_TDMCREATE_FORMDEL","Delete");
+define("_AM_TDMCREATE_FORMCHAMPS","Edit fields");
+define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table");
+define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online");
+// 1.15
+define("_AM_TDMCREATE_MODULES_AUTHOR_MAIL", "Author Email");
+define("_AM_TDMCREATE_MODULES_FORUM_SITE_URL","Topic URL");
+define("_AM_TDMCREATE_MODULES_FORUM_SITE_NAME","Topic URL title");
+
+define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms");
+define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms");
+// 1.15
+define("_AM_TDMCREATE_CONST_OK_MAIN_LANGUAGE", "Creation of main.php file into language folder");
+define("_AM_TDMCREATE_CONST_NOTOK_MAIN_LANGUAGE", "Problemes: Creation of main.php file into language folder");
+
+define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>");
+
+// 1.37
+define("_AM_TDMCREATE_MODULES_LIST", "Modules List");
+define("_AM_TDMCREATE_MODULES_NEW", "New Module");
+
+define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add submitter");
+define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Add date created");
+define("_AM_TDMCREATE_TABLES_ONLINE", "Add online");
+
+modinfo.php
+
+//Menu
+define("_MI_TDMCREATE_ADMIN_INDEX","Index");
+define("_MI_TDMCREATE_ADMIN_MODULES","Add a module");
+define("_MI_TDMCREATE_ADMIN_TABLES","Add a table");
+define("_MI_TDMCREATE_ADMIN_CONST","Build the module");
+define("_MI_TDMCREATE_ADMIN_ABOUT","Short About");
+define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences");
+define("_MI_TDMCREATE_ADMIN_UPDATE","Update");
+
+define("_MI_TDMCREATE_DESC","Module create of module made by TDM");
+
+define("_MI_TDMCREATE_EDITOR", "Editor");
+define("_MI_TDMCREATE_EDITORDSC", "Select an editor to write");
+define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID");
+define("_MI_TDMCREATE_IDPAYPAL_DESC", "ID Paypal for donations.");
+
+------------------------------------------------
+Version 1.37 - 1.38
+------------------------------------------------
+// 1.37
+admin.php
+
+define("_AM_TDMCREATE_MODULES_LIST", "Modules List");
+define("_AM_TDMCREATE_MODULES_NEW", "New Module");
+
+define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add submitter");
+define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Add date created");
+define("_AM_TDMCREATE_TABLES_ONLINE", "Add online");
+
+modinfo.php
+
+//Menu changed
+define("_MI_TDMCREATE_ADMIN_INDEX","Index");
+define("_MI_TDMCREATE_ADMIN_MODULES","Add a module");
+define("_MI_TDMCREATE_ADMIN_TABLES","Add a table");
+define("_MI_TDMCREATE_ADMIN_CONST","Build the module");
+define("_MI_TDMCREATE_ADMIN_ABOUT","Short About");
+define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences");
+define("_MI_TDMCREATE_ADMIN_UPDATE","Update");
+
+define("_MI_TDMCREATE_DESC","Module create of module made by TDM");
+
+define("_MI_TDMCREATE_EDITOR", "Editor");
+define("_MI_TDMCREATE_EDITORDSC", "Select an editor to write");
+define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID");
+define("_MI_TDMCREATE_IDPAYPAL_DESC", "ID Paypal for donations.");
+
+// 1.38
+admin.php
+
+//Buttons
+define("_AM_TDMCREATE_TABLES_NEW","Add Table");
+define("_AM_TDMCREATE_TABLES_LIST","List Tables");
+
+define("_AM_TDMCREATE_TABLES_TOPICS","Add New Topics");
+
+define("_AM_TDMCREATE_NEW","Add Define Language");
+define("_AM_TDMCREATE_LIST","List Defines Languages");
+
+//Error NoFrameworks
+define("_AM_ERROR_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
+//Support
+define("_AM_TDMCREATE_MAINTAINEDBY", "is maintained by the");
+
+define("_AM_TDMCREATE_VERSION", "Version");
+define("_AM_TDMCREATE_RELEASE", "Date created");
+define("_AM_TDMCREATE_STATUS", "Status");
+define("_AM_TDMCREATE_SEARCH", "Search");
+
+//deleted
+define("_AM_TDMCREATE_TABLES_TOPICS", "Add Topic");
+
+// Filemanager.php
+ //Nav
+define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager');
+define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager');
+
+//Tips
+define('_AM_TDMCREATE_FILEMANAGER_NAV_TIPS','
+<ul>
+<li>Change file permission, content or just delete an unused file from your XOOPS site.</li>
+</ul>
+');
+
+// Main
+define('_AM_TDMCREATE_FILEMANAGER_DIRECTORY','Directory');
+define('_AM_TDMCREATE_FILEMANAGER_FILES','Files');
+define('_AM_TDMCREATE_FILEMANAGER_GENERATE','Force generation');
+define('_AM_TDMCREATE_FILEMANAGER_SELECT_THEME','Select theme');
+define('_AM_TDMCREATE_FILEMANAGER_FORCE_GENERATED','Force generated');
+define('_AM_TDMCREATE_FILEMANAGER_NAV_FILE_GENERATED','Files generated');
+define('_AM_TDMCREATE_FILEMANAGER_NOT_CREATED','No files created');
+define('_AM_TDMCREATE_FILEMANAGER_HOME','Home');
+define('_AM_TDMCREATE_FILEMANAGER_SAVE','Save');
+define('_AM_TDMCREATE_FILEMANAGER_CANCEL','Cancel');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE','Restore');
+define('_AM_TDMCREATE_FILEMANAGER_REFRESH','Refresh');
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD','Upload file');
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_CHOOSE','Select file to upload');
+define('_AM_TDMCREATE_FILEMANAGER_ADDDIR','Add Directory');
+define('_AM_TDMCREATE_FILEMANAGER_ADDDIR_NAME','Choose name of directory');
+define('_AM_TDMCREATE_FILEMANAGER_ADDFILE','Add New File');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR','Delete Directory');
+
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_EXISTS','Error: File not exist');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_DELETE','Error: File not delete');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_RENAME','Error: File not rename');
+define('_AM_TDMCREATE_FILEMANAGER_BACK','Back');
+define('_AM_TDMCREATE_FILEMANAGER_DELETE','Delete');
+define('_AM_TDMCREATE_FILEMANAGER_ERROR','Error');
+define('_AM_TDMCREATE_FILEMANAGER_EDIT','Edit of:');
+define('_AM_TDMCREATE_FILEMANAGER_EMPTY_FILE','File empty');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR_NOTOK','Error: delete this directory');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR_OK','Directory successfully deleted');
+
+// Message
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_FILE','Files successfully uploaded');
+define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_FILE','Files successfully extracted');
+define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_ERROR','Files could not be extracted');
+define('_AM_TDMCREATE_FILEMANAGER_DELETE_FILE','Files successfully deleted');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS','Directory successfully created');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_ERROR','Directory could not be created');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_RYSDEL','Are you sure to delete this folder?');
+define('_AM_TDMCREATE_FILEMANAGER_FILE_SUCCESS','File successfully created');
+define('_AM_TDMCREATE_FILEMANAGER_SUREDEL', 'Are you sure to delete this file %s?');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_SUREDEL', 'Are you sure you want to delete this directory %s?<br />Warning: all subdirectories and files file will be deleted');
+
+modinfo.php
+
+// Main
+define("_MI_TDMCREATE_NAME", "TDMCreate");
+define("_MI_TDMCREATE_DESC", "This module does to create others modules.");
+// Admin
+define("_MI_TDMCREATE_ADMIN_NAME","TDMCreate");
+define("_MI_TDMCREATE_ADMIN_DESC","This module does to create others modules: ");
+
+//Menu
+define("_MI_TDMCREATE_ADMENU1","Home");
+define("_MI_TDMCREATE_ADMENU2","Modules");
+define("_MI_TDMCREATE_ADMENU3","Tables");
+define("_MI_TDMCREATE_ADMENU4","Languages");
+define("_MI_TDMCREATE_ADMENU5","Build");
+define("_MI_TDMCREATE_ADMENU6","File Manager");
+define("_MI_TDMCREATE_ADMENU7","About");
+
+//Config
+define("_MI_TDMCREATE_EDITOR","Editor");
+define("_MI_TDMCREATE_EDITOR_DESC","Choose an editor from the list");
+define("_MI_TDMCREATE_PERPAGEADMIN","Admin per page");
+define("_MI_TDMCREATE_PERPAGEADMIN_DESC","Select to view admin per page tables or modules");
+define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID");
+define("_MI_TDMCREATE_IDPAYPAL_DESC", "Insert here your id paypal for donactions.");
+
+------------------------------------------------
+Version 1.38 - 1.39
+------------------------------------------------
+// 1.38
+admin.php
+
+//Buttons
+define("_AM_TDMCREATE_TABLES_NEW","Add Table");
+define("_AM_TDMCREATE_TABLES_LIST","List Tables");
+
+define("_AM_TDMCREATE_TABLES_TOPICS","Add New Topics");
+
+define("_AM_TDMCREATE_NEW","Add Define Language");
+define("_AM_TDMCREATE_LIST","List Defines Languages");
+
+//Error NoFrameworks
+define("_AM_ERROR_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
+//Support
+define("_AM_TDMCREATE_MAINTAINEDBY", "is maintained by the");
+
+define("_AM_TDMCREATE_VERSION", "Version");
+define("_AM_TDMCREATE_RELEASE", "Date created");
+define("_AM_TDMCREATE_STATUS", "Status");
+define("_AM_TDMCREATE_SEARCH", "Search");
+
+//deleted
+define("_AM_TDMCREATE_TABLES_TOPICS", "Add Topic");
+
+// Filemanager.php
+ //Nav
+define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager');
+define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager');
+
+//Tips
+define('_AM_TDMCREATE_FILEMANAGER_NAV_TIPS','
+<ul>
+<li>Change file permission, content or just delete an unused file from your XOOPS site.</li>
+</ul>
+');
+
+// Main
+define('_AM_TDMCREATE_FILEMANAGER_DIRECTORY','Directory');
+define('_AM_TDMCREATE_FILEMANAGER_FILES','Files');
+define('_AM_TDMCREATE_FILEMANAGER_GENERATE','Force generation');
+define('_AM_TDMCREATE_FILEMANAGER_SELECT_THEME','Select theme');
+define('_AM_TDMCREATE_FILEMANAGER_FORCE_GENERATED','Force generated');
+define('_AM_TDMCREATE_FILEMANAGER_NAV_FILE_GENERATED','Files generated');
+define('_AM_TDMCREATE_FILEMANAGER_NOT_CREATED','No files created');
+define('_AM_TDMCREATE_FILEMANAGER_HOME','Home');
+define('_AM_TDMCREATE_FILEMANAGER_SAVE','Save');
+define('_AM_TDMCREATE_FILEMANAGER_CANCEL','Cancel');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE','Restore');
+define('_AM_TDMCREATE_FILEMANAGER_REFRESH','Refresh');
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD','Upload file');
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_CHOOSE','Select file to upload');
+define('_AM_TDMCREATE_FILEMANAGER_ADDDIR','Add Directory');
+define('_AM_TDMCREATE_FILEMANAGER_ADDDIR_NAME','Choose name of directory');
+define('_AM_TDMCREATE_FILEMANAGER_ADDFILE','Add New File');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR','Delete Directory');
+
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_EXISTS','Error: File not exist');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_DELETE','Error: File not delete');
+define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_RENAME','Error: File not rename');
+define('_AM_TDMCREATE_FILEMANAGER_BACK','Back');
+define('_AM_TDMCREATE_FILEMANAGER_DELETE','Delete');
+define('_AM_TDMCREATE_FILEMANAGER_ERROR','Error');
+define('_AM_TDMCREATE_FILEMANAGER_EDIT','Edit of:');
+define('_AM_TDMCREATE_FILEMANAGER_EMPTY_FILE','File empty');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR_NOTOK','Error: delete this directory');
+define('_AM_TDMCREATE_FILEMANAGER_DELDIR_OK','Directory successfully deleted');
+
+// Message
+define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_FILE','Files successfully uploaded');
+define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_FILE','Files successfully extracted');
+define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_ERROR','Files could not be extracted');
+define('_AM_TDMCREATE_FILEMANAGER_DELETE_FILE','Files successfully deleted');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS','Directory successfully created');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_ERROR','Directory could not be created');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_RYSDEL','Are you sure to delete this folder?');
+define('_AM_TDMCREATE_FILEMANAGER_FILE_SUCCESS','File successfully created');
+define('_AM_TDMCREATE_FILEMANAGER_SUREDEL', 'Are you sure to delete this file %s?');
+define('_AM_TDMCREATE_FILEMANAGER_DIR_SUREDEL', 'Are you sure you want to delete this directory %s?<br />Warning: all subdirectories and files file will be deleted');
+
+modinfo.php
+
+// Main
+define("_MI_TDMCREATE_NAME", "TDMCreate");
+define("_MI_TDMCREATE_DESC", "This module does to create others modules.");
+// Admin
+define("_MI_TDMCREATE_ADMIN_NAME","TDMCreate");
+define("_MI_TDMCREATE_ADMIN_DESC","This module does to create others modules: ");
+
+//Menu
+define("_MI_TDMCREATE_ADMENU1","Home");
+define("_MI_TDMCREATE_ADMENU2","Modules");
+define("_MI_TDMCREATE_ADMENU3","Tables");
+define("_MI_TDMCREATE_ADMENU4","Languages");
+define("_MI_TDMCREATE_ADMENU5","Build");
+define("_MI_TDMCREATE_ADMENU6","File Manager");
+define("_MI_TDMCREATE_ADMENU7","About");
+
+//Config
+define("_MI_TDMCREATE_EDITOR","Editor");
+define("_MI_TDMCREATE_EDITOR_DESC","Choose an editor from the list");
+define("_MI_TDMCREATE_PERPAGEADMIN","Admin per page");
+define("_MI_TDMCREATE_PERPAGEADMIN_DESC","Select to view admin per page tables or modules");
+define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID");
+define("_MI_TDMCREATE_IDPAYPAL_DESC", "Insert here your id paypal for donactions.");
+
+// 1.39
+admin.php
+// Modules
+define("_AM_TDMCREATE_MODULES_NAMEANDFOLDER", "Module and Folder Name");
+define("_AM_TDMCREATE_MODULES_NAME", "Module Name");
+define("_AM_TDMCREATE_MODULES_FNAME", "Folder Name");
+
+define("_AM_TDMCREATE_COMMENTS", "Comments");
+
+define('_AM_TDMCREATE_FOLDER', "Folder");
+define('_AM_TDMCREATE_MODULES_NAMEANDFOLDER', "Module and Folder Name");
+define('_AM_TDMCREATE_MODULES_NAME', "Module Name");
+define('_AM_TDMCREATE_MODULES_FOLDER', "Folder Name");
+define('_AM_TDMCREATE_MODULES_DONATIONS', "Donations");
+
+//Buttons
+define("_AM_TDMCREATE_LANGUAGES_NEWFOLDER", "Add Folder");
+define("_AM_TDMCREATE_LANGUAGES_NEWFILE", "Add File");
+
+//Champs
+define ("_AM_TDMCREATE_TABLES_CHAMPS_ADD", "Add New Table");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_EDIT", "Edit table");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_ID", "ID");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_NAME", "Champ");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_TYPE", "Type");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_VALUE", "Value");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_ATTRIBUTES", "Attribute");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_NULL", "Null");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_DEFAULT", "(Default)");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_KEY", "Key");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS", "Parameters");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_ELEMENTS", "Forms: Elements");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_DISPLAY_ADMIN", "Page: Admin View");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_DISPLAY_USER", "Page: User View");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_BLOCK", "Blocks: Blocks View");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_MAIN_FIELD", "Table: Main Field");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_SEARCH", "Search: Index");
+define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_REQUIRED", "Form: Require Field");
+
+// Table Add
+define("_AM_TDMCREATE_TABLES_NAME_EMPTY", "If activated, the table fields have a prefix");
+
+define("_AM_MODULEADMIN_MISSING","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
+define("_AM_TDMCREATE_MAINTAINEDBY", "<span class='bold green'>%s</span><span class='small italic'>is maintained by the<a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a> and by <a href='http://www.xoops.org/modules/newbb/' title='Visit Xoops Community' class='tooltip' rel='external'>Xoops Community</a></span>");
+
+modinfo.php
+
+//Menu
+define("_MI_TDMCREATE_ADMENU5", "Css");
+define("_MI_TDMCREATE_ADMENU6", "Changelog");
+
+define('_MI_TDMCREATE_ADMENU10', "Readme");
+
+//Config
+define("_MI_TDMCREATE_SIZE", "File Size");
+define("_MI_TDMCREATE_MIMETYPES", "Mime types");
+
+// Readme
+define('_AM_TDMCREATE_README', "Readme");
+define('_AM_TDMCREATE_CHANGELOG', "Changelog");
+define('_AM_TDMCREATE_CREDITS', "Credits");
+define('_AM_TDMCREATE_INSTALL', "Install");
+define('_AM_TDMCREATE_LICENCE', "Licence");
+define('_AM_TDMCREATE_LANGDIFF', "Language Difference");
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -221,4 +221,25 @@
return $ret;
}
+/**
+ * function clearDir
+ * Copyright (C) 2012 TXMod Xoops
+ *
+ * @version 1.0
+ */
+
+function clearDir($dir) {
+ if (!($dir = dir($dir))) {
+ return false;
+ }
+ while (false !== $item = $dir->read()) {
+ if ($item != '.' && $item != '..' && !rmdirr ($dir->path ."/". $item)) {
+ $dir->close();
+ return false;
+ }
+ }
+ $dir->close();
+ return true;
+}
+
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php 2013-10-23 01:56:55 UTC (rev 12198)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php 2013-10-23 01:58:04 UTC (rev 12199)
@@ -20,8 +20,7 @@
*
* Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
* ****************************************************************************
- */
-
+ */
if (!defined('XOOPS_ROOT_PATH')){ exit(); }
$dirname = basename( dirname( __FILE__ ) ) ;
@@ -104,7 +103,7 @@
$modversion["config"][$i]["formtype"] = "select";
$modversion["config"][$i]["valuetype"] = "text";
$modversion["config"][$i]["default"] = "dhtmltextarea";
-$modversion["config"][$i]["options"] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor");
+$modversion["config"][$i]["options"] = XoopsLists::getEditorList();
$modversion["config"][$i]["category"] = "global";
$i++;
//Uploads : size cat_imgurl
|
|
From: <be...@us...> - 2013-10-23 01:59:21
|
Revision: 12200
http://sourceforge.net/p/xoops/svn/12200
Author: beckmi
Date: 2013-10-23 01:59:18 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 9506 (timgno): Updated
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/9506
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -22,6 +22,7 @@
* ****************************************************************************
*/
global $pathImageAdmin;
- echo "<div align='center'><a href='http://www.xoops.org' target='_blank'><img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
+ echo "<div align='center'><a href='http://www.xoops.org' target='_blank'>
+ <img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
echo "<div class='center pad5'>" . sprintf(_AM_TDMCREATE_MAINTAINEDBY, $xoopsModule->getVar('name')) . "</div>";
xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -22,7 +22,7 @@
* ****************************************************************************
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
include_once '../include/functions.php';
include_once 'includes.php';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -21,7 +21,6 @@
* Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
* ****************************************************************************
*/
-
include 'admin_header.php';
xoops_cp_header();
@@ -41,8 +40,9 @@
$mods_image = $mods->getVar('modules_image');
$mods_display_admin = $mods->getVar('modules_display_admin');
$mods_display_user = $mods->getVar('modules_display_user');
+ $mods_donations = $mods->getVar('modules_donations');
//Remove the new module directory if it exists
- //clearDir($modPath.'/modules/'.$modules_name);
+ //clearDir($modPath.'/modules/'.$modules_fname);
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
@@ -58,9 +58,9 @@
/*Structure*/
/************************************************/
//Creation de l'architecture
- const_architecture($mods_name, $mods_image);
+ const_architecture($mods_fname, $mods_image);
//Creation du changelog.txt
- const_changelog($mods, $mods_name);
+ const_changelog($mods, $mods_fname);
// Files cicles
foreach (array_keys($tbls_arr) as $i)
@@ -110,14 +110,12 @@
//Creation of the file mysql.sql
const_sql($mods_fname, $tbls_module_table, $tbls_name, $tbls_champs);
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables").
- " WHERE tables_name = 'topic' OR tables_name = '".$tbls_name."_topic'
- OR tables_name = 'cat'
- OR tables_name = 'category'
- OR tables_name = 'categories'
- OR tables_name = '".$tbls_name."_cat'
- OR tables_name = '".$tbls_name."_category'
- OR tables_name = '".$tbls_name."_categories' ");
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables').
+ " WHERE tables_name = 'cat' OR tables_name = 'category'
+ OR tables_name = 'categories'
+ OR tables_name = '".$tbls_name."_cat'
+ OR tables_name = '".$tbls_name."_category'
+ OR tables_name = '".$tbls_name."_categories' ");
list( $topic ) = $xoopsDB->fetchRow($result);
//Creation of the blocks
if ( $tbls_blocks != 1 ) {
@@ -156,8 +154,9 @@
if ( $topic == 1 || $tbls_module_table != null) { //
const_admin_permissions($mods, $mods_fname, $tbls_name, $topic);
}
-
- //Include
+ // JQuery
+ const_js_jquery($mods, $mods_name);
+ //Include
//Configs
const_include_configs($mods, $mods_fname, $mods_author_website_name, $mods_author_website_url);
//Style
@@ -193,7 +192,7 @@
//Creation of admin file menu.php
const_admin_menu($mods, $mods_fname, $tbls_arr, $topic);
//Creation of admin file about.php
- const_admin_about($mods, $mods_fname);
+ const_admin_about($mods, $mods_fname, $mods_donations);
//Creation of admin file index.php
const_admin_index($mods, $mods_fname, $tbls_arr, $tbls_online, $tbls_pending);
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -127,7 +127,10 @@
$langAdmin->addItemButton(_AM_TDMCREATE_LANGUAGES_NEWFOLDER, 'languages.php?op=add_folder', 'add');
$langAdmin->addItemButton(_AM_TDMCREATE_LANGUAGES_NEWFILE, 'languages.php?op=add_file', 'add');
echo $langAdmin->renderButton();
-
+ $numrows_modules = $modsHandler->getCount();
+ if($numrows_modules == 0){
+ redirect_header('modules.php', 3, _AM_TDMCREATE_NOMODULES);
+ }
$criteria = new CriteriaCompo();
$criteria->setSort("languages_id");
$criteria->setOrder("ASC");
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -30,7 +30,7 @@
$adminmenu = array(); $i = 1;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU1;
$adminmenu[$i]["link"] = "admin/index.php";
-$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png";
+$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/dashboard.png";
$i++;
$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU2;
$adminmenu[$i]["link"] = "admin/modules.php";
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -40,7 +40,8 @@
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/modules/";
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'],
+ $GLOBALS['xoopsModuleConfig']['maxsize'], null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']);
$name_img = $_GET['modules_fname'].'_slogo.'.$extension;
@@ -135,8 +136,8 @@
$criteria->setLimit($_REQUEST['limit']);
$limit = $_REQUEST['limit'];
} else {
- $criteria->setLimit($GLOBALS['xoopsModuleConfig']['perpageadmin']);
- $limit = $GLOBALS['xoopsModuleConfig']['perpageadmin'];
+ $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']);
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
}
if (isset($_REQUEST['start'])) {
$criteria->setStart($_REQUEST['start']);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -69,7 +69,7 @@
$obj->setVar('tables_modules', strtolower($_REQUEST['tables_modules']));
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
- $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']);
+ $obj->setVar('tables_prefix_champs', $_REQUEST['tables_prefix_champs']);
$obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
$obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
$obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
@@ -118,7 +118,7 @@
$obj->setVar('tables_modules', $_REQUEST['tables_modules']);
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
- $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']);
+ $obj->setVar('tables_prefix_champs', $_REQUEST['tables_prefix_champs']);
$obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
$obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
$obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
@@ -163,7 +163,7 @@
case "edit_champs":
$obj =& $tblsHandler->get($_REQUEST['tables_id']);
- $form = $obj->getFormChamps();
+ $form = $obj->getFormChamps(false, $_REQUEST['tables_id']);
$form->display();
break;
@@ -191,96 +191,84 @@
$obj =& $tblsHandler->get($_REQUEST['tables_id']);
} else {
$obj =& $tblsHandler->create();
- }
+ }
+ /*
+ for($i=0; $i<intval($_REQUEST['tables_nb_champs']); $i++)
+ {
+ $obj->setVar('champ_id', $_REQUEST['champ_id']);
+ $obj->setVar('champ_name', $_REQUEST['champ_name']);
+ $obj->setVar('champ_tables_nb_champs', $_REQUEST['champ_tables_nb_champs']);
+ $obj->setVar('champ_tables_champs', $_REQUEST['champ_tables_champs']);
+ $obj->setVar('champ_type', $_REQUEST['champ_type']);
+ $obj->setVar('champ_value', $_REQUEST['champ_value']);
+ $obj->setVar('champ_attribute', $_REQUEST['champ_attribute']);
+ $obj->setVar('champ_null', $_REQUEST['champ_null']);
+ $obj->setVar('champ_default', $_REQUEST['champ_default']);
+ $obj->setVar('champ_key', $_REQUEST['champ_key']);
+ $obj->setVar('champ_parameters', $_REQUEST['champ_parameters']);
+ $obj->setVar('champ_elements_id', $_REQUEST['champ_elements_id']);
+ $obj->setVar('champ_elements_value', $_REQUEST['champ_elements_value']);
+ $obj->setVar('champ_elements_name', $_REQUEST['champ_elements_name']);
+ $obj->setVar('champ_elements_admin', $_REQUEST['champ_elements_admin']);
+ $obj->setVar('champ_elements_user', $_REQUEST['champ_elements_block']);
+ $obj->setVar('champ_elements_mfield', $_REQUEST['champ_elements_mfield']);
+ $obj->setVar('champ_elements_search', $_REQUEST['champ_elements_search']);
+ $obj->setVar('champ_elements_required', $_REQUEST['champ_elements_required']);
+ } */
+
+ //Name of the module
+ $modules =& $modsHandler->get($_REQUEST['tables_modules']);
+ $modules_name = $modsHandler->getVar('modules_name');
- // If Champs exists
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('tables_modules', $_REQUEST['tables_modules']));
- $criteria->add(new Criteria('tables_name', $_REQUEST['tables_name']));
- $nb_tables = $tblsHandler->getCount($criteria);
-
- if ( $nb_tables < 1 )
- {
- /*
- for($i=0; $i<intval($_REQUEST['tables_nb_champs']); $i++)
- {
- $obj->setVar('champ_id', $_REQUEST['champ_id']);
- $obj->setVar('champ_name', $_REQUEST['champ_name']);
- $obj->setVar('champ_tables_nb_champs', $_REQUEST['champ_tables_nb_champs']);
- $obj->setVar('champ_tables_champs', $_REQUEST['champ_tables_champs']);
- $obj->setVar('champ_type', $_REQUEST['champ_type']);
- $obj->setVar('champ_value', $_REQUEST['champ_value']);
- $obj->setVar('champ_attribute', $_REQUEST['champ_attribute']);
- $obj->setVar('champ_null', $_REQUEST['champ_null']);
- $obj->setVar('champ_default', $_REQUEST['champ_default']);
- $obj->setVar('champ_key', $_REQUEST['champ_key']);
- $obj->setVar('champ_parameters', $_REQUEST['champ_parameters']);
- $obj->setVar('champ_elements_id', $_REQUEST['champ_elements_id']);
- $obj->setVar('champ_elements_value', $_REQUEST['champ_elements_value']);
- $obj->setVar('champ_elements_name', $_REQUEST['champ_elements_name']);
- $obj->setVar('champ_elements_admin', $_REQUEST['champ_elements_admin']);
- $obj->setVar('champ_elements_user', $_REQUEST['champ_elements_block']);
- $obj->setVar('champ_elements_mfield', $_REQUEST['champ_elements_mfield']);
- $obj->setVar('champ_elements_search', $_REQUEST['champ_elements_search']);
- $obj->setVar('champ_elements_required', $_REQUEST['champ_elements_required']);
- } */
-
- //Name of the module
- $modules =& $modsHandler->get($_REQUEST['tables_modules']);
- $modules_name = $modsHandler->getVar('modules_name');
+ $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
+ $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
+ $obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
+ $obj->setVar('tables_prefix_champs', $_REQUEST['tables_prefix_champs']);
+ $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
+ $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
+ $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
+ $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
+ $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
+ $obj->setVar('tables_created', $_REQUEST['tables_created']);
+ $obj->setVar('tables_published', $_REQUEST['tables_published']);
+ $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
+ $obj->setVar('tables_status', $_REQUEST['tables_status']);
+ $obj->setVar('tables_online', $_REQUEST['tables_online']);
+ $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
+ $obj->setVar('tables_search', $_REQUEST['tables_search']);
+ $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
+ $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
- $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
- $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
- $obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
- $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']);
- $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
- $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']);
- $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']);
- $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']);
- $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']);
- $obj->setVar('tables_created', $_REQUEST['tables_created']);
- $obj->setVar('tables_published', $_REQUEST['tables_published']);
- $obj->setVar('tables_expired', $_REQUEST['tables_expired']);
- $obj->setVar('tables_status', $_REQUEST['tables_status']);
- $obj->setVar('tables_online', $_REQUEST['tables_online']);
- $obj->setVar('tables_pending', $_REQUEST['tables_pending']);
- $obj->setVar('tables_search', $_REQUEST['tables_search']);
- $obj->setVar('tables_coms', $_REQUEST['tables_coms']);
- $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']);
-
- //Image
- include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- if(!is_dir($pathImageAdmin)){
- $uploaddir = $pathImageAdmin;
- }else{
- $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/";
+ //Image
+ include_once XOOPS_ROOT_PATH.'/class/uploader.php';
+ if(!is_dir($pathImageAdmin)){
+ $uploaddir = $pathImageAdmin;
+ }else{
+ $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/";
+ }
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'],
+ $GLOBALS['xoopsModuleConfig']['maxsize'], null, null);
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
+ $name_img = $_REQUEST['tables_name'].'.'.$extension;
+ $uploader->setTargetFileName($name_img);
+ $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $obj->setVar('tables_img', $uploader->getSavedFileName());
}
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
-
- if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
- $name_img = $_REQUEST['tables_name'].'.'.$extension;
- $uploader->setTargetFileName($name_img);
- $uploader->fetchMedia($_POST['xoops_upload_file'][0]);
- if (!$uploader->upload()) {
- $errors = $uploader->getErrors();
- redirect_header("javascript:history.go(-1)",3, $errors);
- } else {
- $obj->setVar('tables_img', $uploader->getSavedFileName());
- }
- } else {
- $obj->setVar('tables_img', $_REQUEST['tables_img']);
- }
-
- if ($tblsHandler->insert($obj)) {
- $tables_id = $GLOBALS['xoopsDB']->getInsertId();
- $obj = $tblsHandler->get($_REQUEST['tables_id']);
- $form = $obj->getFormChamps();
- $form->display();
- }
- } else {
- redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_TABLES_EXIST);
- }
+ } else {
+ $obj->setVar('tables_img', $_REQUEST['tables_img']);
+ }
+
+ if ($tblsHandler->insert($obj)) {
+ $tables_id = $GLOBALS['xoopsDB']->getInsertId();
+ $obj = $tblsHandler->get($tables_id);
+ $form = $obj->getFormChamps(false, $tables_id);
+ $form->display();
+ }
break;
case "tables_create":
@@ -312,12 +300,15 @@
$criteria->setSort('modules_id');
$criteria->setOrder('DESC');
$numrows_modules = $modsHandler->getCount();
+ if($numrows_modules == 0){
+ redirect_header('modules.php', 3, _AM_TDMCREATE_NOMODULES);
+ }
if (isset($_REQUEST['limit'])) {
$criteria->setLimit($_REQUEST['limit']);
$limit = $_REQUEST['limit'];
} else {
- $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']);
- $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage'];
+ $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']);
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
}
if (isset($_REQUEST['start'])) {
$criteria->setStart($_REQUEST['start']);
@@ -373,7 +364,7 @@
echo '<tr class="odd center">';
echo '<td class="center big red"><b>'.$mods_id.'</b></td>';
echo '<td class="left big green"><b>'.$mods_arr[$i]->getVar('modules_name').'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="30px"></td>';
+ echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="20px"></td>';
echo '<td>'.$mods_display_admin.'</td><td>'.$mods_display_user.'</td>';
echo '<td> </td><td> </td><td> </td><td> </td>';
echo '<td class="center width5">';
@@ -406,9 +397,9 @@
echo '<td class="center width5 green">'.$tbls_id.'</td>';
echo '<td class="left"> <b>- '.$tbls_arr[$i]->getVar('tables_name').'</b></td>';
if(!is_dir($pathImageAdmin)){
- echo '<td><img src="'.$pathImageAdmin.'/'.$tbls_arr[$i]->getVar('tables_img').'" height="30px"></td>';
+ echo '<td><img src="'.$pathImageAdmin.'/'.$tbls_arr[$i]->getVar('tables_img').'" height="20px"></td>';
}else{
- echo '<td><img src="../images/uploads/tables/'.$tbls_arr[$i]->getVar('tables_img').'" height="30px"></td>';
+ echo '<td><img src="../images/uploads/tables/'.$tbls_arr[$i]->getVar('tables_img').'" height="20px"></td>';
}
echo '<td>'.$display_admin.'</td><td>'.$display_user.'</td><td>'.$blocks.'</td>';
echo '<td>'.$search.'</td><td>'.$coms.'</td><td>'.$nb_champs.'</td>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -27,28 +27,496 @@
class tdmcreate_champs extends XoopsObject
{
- //Constructor
+ var $champs;
+ var $type;
+ var $elements;
+
+ // Constructor
function __construct()
{
$this->XoopsObject();
- $this->initVar("champ_id",XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("champ_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("champ_tables_nb_champs",XOBJ_DTYPE_INT, null, false, 5);
- $this->initVar("champ_tables_champs",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("champ_id",XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("champ_table_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("champ_table_nb_champs",XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("champ_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_type",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_value",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_attribute",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_null",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_default",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_key",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("champ_parameters",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("champ_admin",XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("champ_user",XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("champ_block",XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("champ_mainfield",XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("champ_search",XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("champ_required",XOBJ_DTYPE_INT, null, false, 1);
}
- //Constructor
+ // Constructor
function tdmcreate_champs()
{
- $this->__construct();
+ $this->__construct();
+ }
+
+ // getChamps
+ function getChamps(&$champs_id, $mn, $tmt, $tn, $tables_champs, $lang, $champs_param_display_form = 0, $cpe = 0, $cprf = 0, $option = 0)
+ {
+ //print_r($champs_param_display_form);
+ $text = '';
+ //Compte le nombre de champs
+ $champs = explode("|", $tables_champs);
+ $nb_champs = count($champs);
+ //Recupere les donnees
+
+ if ( $option == 0 )
+ {
+ //Creation du constructor
+ for ($i=0; $i<$nb_champs; $i++)
+ {
+ $str = explode(":", $champs[$i]);
+ if ( $str[1] == 'int' || $str[1] == 'tinyint' || $str[1] == 'mediumint' || $str[1] == 'smallint' ) {
+ $text .= '$this->initVar("'.$str[0].'", XOBJ_DTYPE_INT, null, false, '.$str[2].');
+ ';
+ } elseif ( $str[1] == 'char' || $str[1] == 'varchar' ) {
+ $text .= '$this->initVar("'.$str[0].'", XOBJ_DTYPE_TXTBOX, null, false, '.$str[2].');
+ ';
+ } elseif ( $str[1] == 'text' || $str[1] == 'tinytext' || $str[1] == 'mediumtext' || $str[1] == 'longtext' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_TXTAREA, null, false);
+ ';
+ } elseif ( $str[1] == 'float' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_FLOAT, null, false);
+ ';
+ } elseif ( $str[1] == 'decimal' || $str[1] == 'double' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_DECIMAL, null, false);
+ ';
+ } elseif ( $str[1] == 'enum' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_ENUM, null, false);
+ ';
+ } elseif ( $str[1] == 'email' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_EMAIL, null, false, '.$str[2].');
+ ';
+ } elseif ( $str[1] == 'url' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_URL, null, false, '.$str[2].');
+ ';
+ } elseif ( $str[1] == 'date' || $str[1] == 'datetime' || $str[1] == 'timestamp' || $str[1] == 'time' || $str[1] == 'year' ) {
+ $text .= '$this->initVar("'.$str[0].'", XOBJ_DTYPE_LTIME, null, false);
+ ';
+ }/* elseif ( $str[1] == 'other' ) {
+ $text .= ' $this->initVar("'.$str[0].'", XOBJ_DTYPE_OTHER, '.$str[2].', false);
+ ';
+ }*/
+ }
+ } else if ( $option == 1 ) {
+ //Creation formulaire
+ for ($i=0; $i<$nb_champs; $i++)
+ {
+ if ( $i != 0 ) {
+ $str = explode(":", $champs[$i]);
+ $lang_form = ''.$lang.strtoupper($str[0]).'';
+ $form = $this->getFormElements($i, $mn, $tmt, $tn, $cpe,$cprf, $lang_form, $str[0]);
+ $text .= ''.$form.'';
+ }
+ }
+ } else if ( $option == 2 ) {
+ //Creation du fichier mysql.sql
+ $text .= '
+ #
+ # Table str for table `'.strtolower($tmt).'` '.$nb_champs.'
+ #
+
+ CREATE TABLE `'.strtolower($tmt).'` (
+ ';
+ $j = 0;
+ for ($i=0; $i<$nb_champs; $i++)
+ {
+ $str = explode(":", $champs[$i]);
+
+ //Debut
+ if ( $str[0] != ' ' )
+ {
+ //If as text, (not value)
+ if ( $str[1] == 'text' || $str[1] == 'date' || $str[1] == 'timestamp' ) {
+ $type = $str[1];
+ } else {
+ $type = $str[1].' ('.$str[2].')';
+ }
+ //If as empty is default not string(not value), if as text not default, if as numeric default is 0 or 0.0000
+ if ( empty($str[5]) ) {
+ $default = "default ''";
+ } elseif ( $str[1] == 'text' ) {
+ $default = "";
+ } elseif ( $str[1] == 'int' || $str[1] == 'tinyint' || $str[1] == 'mediumint' || $str[1] == 'smallint') {
+ $default = "default '0'";
+ } elseif ( $str[1] == 'decimal' || $str[1] == 'double' || $str[1] == 'float' ) {
+ $default = "default '0.0000'";
+ } elseif ( $str[1] == 'date' ) {
+ $default = "default '0000-00-00'";
+ } elseif ( $str[1] == 'datetime' || $str[1] == 'timestamp') {
+ $default = "default '0000-00-00 00:00:00'";
+ } elseif ( $str[1] == 'time' ) {
+ $default = "default '00:00:00'";
+ } elseif ( $str[1] == 'year' ) {
+ $default = "default '0000'";
+ } else {
+ $default = "default '".$str[5]."'";
+ }
+
+ if ( $i == 0 ) {
+ $virgule[$j] = 'PRIMARY KEY (`'.$str[0].'`)';
+ $j++;
+ $text .= '`'.$str[0].'` '.$type.' '.$str[3].' '.$str[4].' auto_increment,
+ ';
+ } else {
+ if ( $str[6] == 'unique' || $str[6] == 'index' || $str[6] == 'fulltext')
+ {
+ if ( $str[6] == 'unique' ) {
+ $text .= '`'.$str[0].'` '.$type.' '.$str[3].' '.$str[4].' '.$default.',
+ ';
+ $virgule[$j] = 'KEY `'.$str[0].'` (`'.$str[0].'`)';
+ } else if ( $str[6] == 'index' ) {
+ $text .= '`'.$str[0].'` '.$type.' '.$str[3].' '.$str[4].' '.$default.',
+ ';
+ $virgule[$j] = 'INDEX (`'.$str[0].'`)';
+ } else if ( $str[6] == 'fulltext' ) ...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:38:55
|
Revision: 12201
http://sourceforge.net/p/xoops/svn/12201
Author: beckmi
Date: 2013-10-23 02:38:48 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 11358 (timgno): Test Beta 4, Added permissions and notifications file and code, Toggle effect in admin/tables.php
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/11358
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/index.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/install.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/lang_diff.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/readme.txt
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/off.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/on.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/cat.png
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/js/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/help/help.html
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.0 to 1.1.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.1 to 1.15.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.1 to 1.37.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.15 to 1.37.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.37 to 1.38.txt
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/class/constArch.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notification.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/license.txt
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/addmodule.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/addtable.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/builder.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/dashboard.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/arrow.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/off.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/on.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/16/toggle.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/addmodule.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/addtable.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/builder.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/dashboard.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/32/index.html
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/arrow.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/icons/blank.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/VeraBd.ttf
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/green.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/red.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/logos/xoops2.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/txmodxoops_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Hotel_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/My Module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/MyShop_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Real Estate_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Shopper_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Shopping_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/album_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/ams_slogo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/empty.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/module1_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/moduleimport_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/realestate_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/travel_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/txmLinks_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/txmrestaurant_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/xoops2.png
XoopsModules/TDMCreate/trunk/TDMCreate/js/functions.js
XoopsModules/TDMCreate/trunk/TDMCreate/modules/index.html
Removed Paths:
-------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/css.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/filesmanager.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/readme.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champ_attributes.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champ_elements.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champ_key.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champ_null.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champ_type.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_champs.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_coms.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/css/code_mirror/
XoopsModules/TDMCreate/trunk/TDMCreate/docs/licence.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/typeoflicense/
XoopsModules/TDMCreate/trunk/TDMCreate/images/deco/
XoopsModules/TDMCreate/trunk/TDMCreate/images/logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/menu/
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/TDMLogo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/blank.gif
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/broken.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/contact.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/links.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/shoutbox.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/topic.png
XoopsModules/TDMCreate/trunk/TDMCreate/include/comment_delete.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/comment_edit.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/comment_new.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/comment_post.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/comment_reply.php
XoopsModules/TDMCreate/trunk/TDMCreate/js/code_mirror/
XoopsModules/TDMCreate/trunk/TDMCreate/js/filemanager.js
XoopsModules/TDMCreate/trunk/TDMCreate/js/jqueryFileTree.js
XoopsModules/TDMCreate/trunk/TDMCreate/language/arabic/
XoopsModules/TDMCreate/trunk/TDMCreate/language/bulgarian/
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/help.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/french/
XoopsModules/TDMCreate/trunk/TDMCreate/language/italian/
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql137.sql
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql138.sql
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql139a.sql
XoopsModules/TDMCreate/trunk/TDMCreate/templates/admin/help.html
XoopsModules/TDMCreate/trunk/TDMCreate/templates/admin/tdmcreate_filemanager.html
XoopsModules/TDMCreate/trunk/TDMCreate/templates/blocks/
XoopsModules/TDMCreate/trunk/TDMCreate/templates/help/
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php 2013-10-23 01:59:18 UTC (rev 12200)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php 2013-10-23 02:38:48 UTC (rev 12201)
@@ -1,33 +1,24 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
- * - Revision Copyright (c) (http://www.txmodxoops.org)
+ * tdmcreate module
*
- * This license contains restrictions!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- * @author TXMod Xoops (in...@tx...)
- *
- * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
*/
-
-include "admin_header.php";
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation("about.php");
-echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
-
-include "admin_footer.php";
\ No newline at end of file
+include 'admin_header.php';
+echo $adminMenu->addNavigation('about.php');
+echo $adminMenu->renderabout('6KJ7RW5DR3VTJ', false);
+include 'admin_footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 01:59:18 UTC (rev 12200)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 02:38:48 UTC (rev 12201)
@@ -1,28 +1,26 @@
-<?php
-/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
- * - Revision Copyright (c) (http://www.txmodxoops.org)
- *
- * This license contains restrictions!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- * @author TXMod Xoops (in...@tx...)
- *
- * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
- * ****************************************************************************
- */
- global $pathImageAdmin;
- echo "<div align='center'><a href='http://www.xoops.org' target='_blank'>
- <img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
- echo "<div class='center pad5'>" . sprintf(_AM_TDMCREATE_MAINTAINEDBY, $xoopsModule->getVar('name')) . "</div>";
-xoops_cp_footer();
\ No newline at end of file
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: admin_footer.php 11084 2013-02-23 15:44:20Z timgno $
+ */
+echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 01:59:18 UTC (rev 12200)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 02:38:48 UTC (rev 12201)
@@ -1,78 +1,56 @@
-<?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
+ 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 By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
- * - Revision Copyright (c) (http://www.txmodxoops.org)
+ * tdmcreate module
*
- * This license contains restrictions!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- * @author TXMod Xoops (in...@tx...)
- *
- * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: admin_header.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-include_once '../include/functions.php';
+include_once("../include/functions.php");
include_once 'includes.php';
+//
+$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
+//
-//echo TDMCreate_adminMenu(_AM_ERROR_NOFRAMEWORKS);
-$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin');
-if ( file_exists($pathDir.'/moduleadmin.php')){
- include_once $pathDir.'/moduleadmin.php';
- //return true;
-}else{
- xoops_cp_header();
- echo xoops_error(_AM_MODULEADMIN_MISSING);
- xoops_cp_footer();
- //return false;
-}
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-$dirname = basename(dirname(dirname( __FILE__ ) ));
-$module_handler =& xoops_gethandler('module');
-$xoopsModule = & $module_handler->getByDirname($dirname);
-$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
-$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16');
-$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32');
-
-$modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate';
-
-$modsHandler=& xoops_getModuleHandler('tdmcreate_modules', $dirname);
-$tblsHandler=& xoops_getModuleHandler('tdmcreate_tables', $dirname);
-$lngsHandler=& xoops_getModuleHandler('tdmcreate_languages', $dirname);
-
+//load class
+$modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate');
+$tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate');
+//
$myts =& MyTextSanitizer::getInstance();
-
-if ($xoopsUser) {
- $moduleperm_handler =& xoops_gethandler('groupperm');
- if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) {
- redirect_header(XOOPS_URL, 1, _NOPERM);
- exit();
- }
-} else {
- redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
- exit();
-}
-
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
include_once(XOOPS_ROOT_PATH."/class/template.php");
$xoopsTpl = new XoopsTpl();
}
-
-$xoopsTpl->assign('pathImageIcon', $pathImageIcon);
-$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin);
-
+//
+$xoopsTpl->assign('pathIcon16', $pathIcon16);
+$xoopsTpl->assign('pathIcon32', $pathIcon32);
//Load languages
-xoops_loadLanguage('admin', $xoopsModule->getVar("dirname"));
-xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname"));
-xoops_loadLanguage('main', $xoopsModule->getVar("dirname"));
\ No newline at end of file
+xoops_loadLanguage('admin', $thisDirname);
+xoops_loadLanguage('modinfo', $thisDirname);
+xoops_loadLanguage('main', $thisDirname);
+// Locad admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:59:18 UTC (rev 12200)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:38:48 UTC (rev 12201)
@@ -1,240 +1,233 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
- * - Revision Copyright (c) (http://www.txmodxoops.org)
+ * tdmcreate module
*
- * This license contains restrictions!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- * @author TXMod Xoops (in...@tx...)
- *
- * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'admin_header.php';
-xoops_cp_header();
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
-$indexAdmin = new ModuleAdmin();
-echo $indexAdmin->addNavigation('building.php');
+if (isset($_REQUEST['mod_name'])) {
+ $modules =& $modulesHandler->get($_REQUEST['mod_name']);
+} else {
+ $modules =& $modulesHandler;
+}
-$op = TDMCreate_CleanVars($_REQUEST, 'op', 'default', 'string');
+$mod_name = strtolower($modules->getVar('mod_name'));
+$mod_desc = $modules->getVar('mod_description');
+$mod_author_website_name = $modules->getVar('mod_author_website_name');
+$mod_author_website_url = $modules->getVar('mod_author_website_url');
+$mod_image = $modules->getVar('mod_image');
+$mod_active_search = $modules->getVar('mod_search');
+$mod_active_comments = $modules->getVar('mod_comments');
+$mod_active_notifications = $modules->getVar('mod_notifications');
+$mod_paypal_button = $modules->getVar('mod_donations');
+$mod_subversion = $modules->getVar('mod_subversion');
+if (isset($_REQUEST['table_name'])) {
+ $tables =& $tablesHandler->get(isset($_REQUEST['table_name']));
+} else {
+ $tables =& $tablesHandler;
+}
+
+//Name of tables
+$criteria = new CriteriaCompo();
+if (isset($_REQUEST['mod_name'])) {
+ $criteria->add(new Criteria('table_mid', $_REQUEST['mod_name']));
+} else {
+ $criteria->add(new Criteria('table_mid'));
+}
+
+$nb_tables = $tablesHandler->getCount($criteria);
+$tables_arr = $tablesHandler->getAll($criteria);
+
+echo $adminMenu->addNavigation('building.php');
switch ($op) {
- case "creation":
- $mods =& $modsHandler->get($_REQUEST['modules_name']);
- $mods_name = $mods->getVar('modules_name');
- $mods_fname = $mods->getVar('modules_fname');
- $mods_desc = $mods->getVar('modules_description');
- $mods_author_website_name = $mods->getVar('modules_author_website_name');
- $mods_author_website_url = $mods->getVar('modules_author_website_url');
- $mods_image = $mods->getVar('modules_image');
- $mods_display_admin = $mods->getVar('modules_display_admin');
- $mods_display_user = $mods->getVar('modules_display_user');
- $mods_donations = $mods->getVar('modules_donations');
- //Remove the new module directory if it exists
- //clearDir($modPath.'/modules/'.$modules_fname);
-
- //Nom des tables et combien de tables
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name']));
- $nb_tables = $tblsHandler->getCount($criteria);
- $tbls_arr = $tblsHandler->getall($criteria);
-
- //Debut
- echo '<table width="100%" cellspacing="1" style="background: #fff;">
- <tr class="marg2">
- <td class="ui-corner-all">';
+ case 'build':
+ // Effacer repertoire of nouveau module s'il existe
+ TDMCreate_clearDir($modPath.'/modules/'.$mod_name);
+ // Debut
+ OpenTable();
/************************************************/
/*Structure*/
- /************************************************/
- //Creation de l'architecture
- const_architecture($mods_fname, $mods_image);
- //Creation du changelog.txt
- const_changelog($mods, $mods_fname);
-
- // Files cicles
- foreach (array_keys($tbls_arr) as $i)
+ /************************************************/
+ //Creation of architecture
+ const_architecture($mod_name, $mod_image);
+ //Creation of changelog.txt
+ const_changelog($modules, $mod_name);
+
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
+ list( $category ) = $xoopsDB->fetchRow($result);
+
+ foreach (array_keys($tables_arr) as $i)
{
- //Variables
- $tbls_id = $tbls_arr[$i]->getVar('tables_id');
- $tbls_name = $tbls_arr[$i]->getVar('tables_name');
- $tbls_module_table = $tbls_arr[$i]->getVar('tables_module_table');
- $tbls_img = $tbls_arr[$i]->getVar('tables_img');
- $tbls_champs = $tbls_arr[$i]->getVar('tables_champs');
- $tbls_parametres = $tbls_arr[$i]->getVar('tables_parametres');
- $tbls_blocks = $tbls_arr[$i]->getVar('tables_blocks');
- $tbls_display_admin = $tb...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:40:33
|
Revision: 12202
http://sourceforge.net/p/xoops/svn/12202
Author: beckmi
Date: 2013-10-23 02:40:25 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 11504 (timgno: Updated, Work in progress)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/11504
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/js/functions.js
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:38:48 UTC (rev 12201)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:40:25 UTC (rev 12202)
@@ -129,7 +129,7 @@
}
// Creation of notifications
if ( isset($table_notifications) ) {
- const_include_notifications($modules, $modules_name, $table_name, $table_fieldname);
+ const_include_notifications($modules, $mod_name, $table_name, $table_fieldname);
}
// Creation of the file mysql.sql
const_sql($mod_name, $table_name, $table_fieldname, $category, $table_fields);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:38:48 UTC (rev 12201)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:40:25 UTC (rev 12202)
@@ -23,7 +23,7 @@
echo $adminMenu->addNavigation('modules.php');
switch ($op)
{
- case "save":
+ case 'save':
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
@@ -87,26 +87,25 @@
}
break;
- case "new":
+ case 'new':
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
echo $adminMenu->renderButton();
$obj =& $modulesHandler->create();
$form = $obj->getForm();
break;
- case "edit":
+ case 'edit':
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
$form = $obj->getForm();
break;
- case "delete":
+ case 'delete':
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- if ($modulesHandler->delete($obj)) {
- $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE mod_id = ".$_REQUEST['mod_id']);
+ if ($modulesHandler->delete($obj)) {
redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
@@ -115,18 +114,29 @@
xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
}
break;
- case "list":
+ case 'list':
default:
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
echo $adminMenu->renderButton();
+
+ $limit = $GLOBALS['xoopsModuleConfig']['adminpager'];
+ $start = TDMCreate_CleanVars( $_REQUEST, 'start', 0 );
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
- $mod_arr = $modulesHandler->getall($criteria);
- $numrows_modules = $modulesHandler->getCount();
-
- if ( $numrows_modules > 0 )
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
+ $mod_arr = $modulesHandler->getall($criteria);
+ $numrows = $modulesHandler->getCount();
+ if ( $numrows > $limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list&limit=' . $limit);
+ $pagenav = $pagenav->renderNav(4);
+ } else {
+ $pagenav = '';
+ }
+ if ( $numrows > 0 )
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
@@ -160,7 +170,8 @@
echo '</td>';
echo '</tr>';
}
- echo '</table><br><br>';
+ echo '</table><br /><br />';
+ echo '<div class="right">'.$pagenav.'</div><br />';
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
@@ -175,4 +186,4 @@
}
break;
}
-include_once "admin_footer.php";
\ No newline at end of file
+include_once 'admin_footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:38:48 UTC (rev 12201)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:40:25 UTC (rev 12202)
@@ -21,7 +21,6 @@
include_once 'admin_header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
echo $adminMenu->addNavigation('tables.php');
-$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
switch ($op) {
case 'save_table':
if (isset($_REQUEST['table_id'])) {
@@ -52,9 +51,9 @@
$obj->setVar('table_notifications', 0);
$obj->setVar('table_nbfields', 7);
- $table_fields = 'cat_id:int:8:unsigned:NOT NULL: :primary|cat_pid:int:5:unsigned:NOT NULL:0:unique|cat_title:varchar:255: :NOT NULL: :unique|cat_desc:text: : :NOT NULL: :|cat_image:varchar:255: :NOT NULL: :|cat_weight:int:5:unsigned:NOT NULL:0:|cat_color:varchar:10: :NULL: :';
+ $table_fields = 'cat_id:int:8: : :unsigned:NOT NULL: :primary|cat_pid:int:5: : :unsigned:NOT NULL:0:unique|cat_title:varchar:255: : : :NOT NULL: :unique|cat_desc:text: : : : :NOT NULL: :|cat_image:varchar:255: : : :NOT NULL: :|cat_weight:int:5: : :unsigned:NOT NULL:0:|cat_color:varchar:10: : : :NULL: :';
- $table_parameters = 'XoopsFormCategory:0:0:0:0:0:1|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
+ $table_parameters = 'XoopsFormCategory:0:0:0:0:0:0:0:1|XoopsFormText:1:1:0:0:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0:0:0|XoopsFormText:1:1:0:0:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:0:0:1';
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
@@ -63,18 +62,15 @@
$uploaddir = $pathIcon32;
}else{
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/";
- }
-
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
-
+ }
+ $uploader = new XoopsMediaUploader($uploaddir, 'gif|jpeg|pjpeg|png', 500000, null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ;
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile1']['name']) ;
$name_img = 'category.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
- $errors = $uploader->getErrors();
- redirect_header("javascript:history.go(-1)",3, $errors);
+ redirect_header('javascript:history.go(-1)', 3, $uploader->getErrors());
} else {
$obj->setVar('table_image', $uploader->getSavedFileName());
}
@@ -105,6 +101,8 @@
$table_parameters .= ( !empty($_REQUEST['fields_param_elements'][$i]) ) ? "".$_REQUEST['fields_param_elements'][$i].":" : " :";
$table_parameters .= ( !empty($_REQUEST['fields_param_admin'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_user'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_form'][$i]) ) ? "1:" : "0:";
+ $table_parameters .= ( !empty($_REQUEST['fields_param_list'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_blocks'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( $i == $_REQUEST['fields_param_main_field']) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_search_field'][$i]) ) ? "1:" : "0:";
@@ -115,6 +113,8 @@
$table_fields .= (!empty($_REQUEST['fields_name'][$i])) ? $_REQUEST['fields_name'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_type'][$i])) ? $_REQUEST['fields_type'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_value'][$i])) ? $_REQUEST['fields_value'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_value_size'][$i])) ? $_REQUEST['fields_value_size'][$i].":" : " :";
+ $table_fields .= (!empty($_REQUEST['fields_value_maxlength'][$i])) ? $_REQUEST['fields_value_maxlength'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_attributes'][$i])) ? $_REQUEST['fields_attributes'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_null'][$i])) ? strtoupper($_REQUEST['fields_null'][$i]).":" : " :";
$table_fields .= (!empty($_REQUEST['fields_default'][$i])) ? $_REQUEST['fields_default'][$i].":" : " :";
@@ -229,14 +229,14 @@
$newname = strtolower($_REQUEST['table_fieldname']);
//echo $count_parameters;
//fields
- for($i=0; $i<$count_fields; $i++)
+ for($i = 0; $i < $count_fields; $i++)
{
- $fields = explode(":", $fields_total[$i]);
+ $fields = explode(':', $fields_total[$i]);
$fields[0] = $newname . substr($fields[0], stripos($fields[0], '_'));
$newfields[$i] = implode(":", $fields);
}
- $newTableFields=implode("|",$newfields);
+ $newTableFields=implode('|',$newfields);
$obj->setVar('table_fields', $newTableFields);
if ($tablesHandler->insert($obj)) {
@@ -273,7 +273,7 @@
case "table_fields":
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=table_fields', 'add');
- echo $adminMenu->renderButton();
+ echo $adminMenu->renderButton();
//fields existe deja ?
$criteria = new CriteriaCompo();
@@ -373,12 +373,25 @@
$xoopsDB->queryF($sql_del);
}
+ $limit = $GLOBALS['xoopsModuleConfig']['adminpager'];
+ $start = TDMCreate_CleanVars( $_REQUEST, 'start', 0 );
+ $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/style.css' );
+ $GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
+
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
+ $criteria->setStart($start);
+ $criteria->setLimit($limit);
$mod_arr = $modulesHandler->getall($criteria);
$numrows_modules = $modulesHandler->getCount();
-
+ if ( $numrows_modules > $limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit);
+ $pagenav = $pagenav->renderNav(4);
+ } else {
+ $pagenav = '';
+ }
if ( $numrows_modules > 0 )
{
echo '<table width="100%" cellspacing="1" class="outer">';
@@ -397,16 +410,13 @@
{
$mod_id = $mod_arr[$i]->getVar('mod_id');
$mod_name = $mod_arr[$i]->getVar('mod_name');
- $mod_image = $mod_arr[$i]->getVar('mod_image');
- $mod_display_admin = ($mod_arr[$i]->getVar('mod_display_admin') == 1) ? _YES : _NO;
- $mod_display_user = ($mod_arr[$i]->getVar('mod_display_user') == 1) ? _YES : _NO;
echo '<tr class="odd center toggleTables">';
echo '<td class="width5"><b>'.$i.'</b><br /><img src="../images/icons/16/toggle.png" alt="Toggle" title="Toggle" /></td>';
$nbsps = ' ';
echo '<td class="left">'.$nbsps.'<img src="../images/icons/16/arrow.gif" alt="Arrow" />'.$nbsps.'<b>'.$mod_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mod_image.'" height="30px"></td>';
- echo '<td>'.$mod_display_admin.'</td>';
- echo '<td>'.$mod_display_user.'</td>';
+ echo '<td><img src="../images/uploads/modules/'.$mod_arr[$i]->getVar('mod_image').'" height="30px"></td>';
+ echo '<td>'.(($mod_arr[$i]->getVar('mod_display_admin') == 1) ? _YES : _NO).'</td>';
+ echo '<td>'.(($mod_arr[$i]->getVar('mod_display_user') == 1) ? _YES : _NO).'</td>';
echo '<td>~</td>';
echo '<td>~</td>';
echo '<td>';
@@ -416,7 +426,7 @@
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $mod_id));
- $criteria->setSort('table_name');
+ $criteria->setSort('table_id');
$criteria->setOrder('ASC');
$table_arr = $tablesHandler->getall($criteria);
$numrows_tables = $tablesHandler->getCount();
@@ -426,23 +436,18 @@
{
$table_name = $table_arr[$i]->getVar('table_name');
$table_image = $table_arr[$i]->getVar('table_image');
- $table_blocks = $table_arr[$i]->getVar('table_blocks');
- $table_admin = (($table_arr[$i]->getVar('table_admin') == 1) ? _YES : _NO);
- $table_user = (($table_arr[$i]->getVar('table_user') == 1) ? _YES : _NO);
- $nb_fields = $table_arr[$i]->getVar('table_nbfields');
- $blocks = ($table_blocks == 1) ? _YES : _NO;
- echo '<tr class="even center">';
+ echo '<tr class="even center toggleHidden">';
echo '<td class="center">'.$i.'</b></a></td>';
- echo '<td class="left"> <b>- '.$table_name.'</b></a></td>';
+ echo '<td class="left"> <b>» '.$table_name.'</b></a></td>';
if(file_exists($image = $pathIcon32.'/'.$table_image)) {
echo '<td><img src="'.$image.'" height="25px"></td>';
} else {
echo '<td><img src="../images/uploads/tables/'.$table_image.'" height="25px"></td>';
}
- echo '<td>'.$table_admin.'</td>';
- echo '<td>'.$table_user.'</td>';
- echo '<td>'.$blocks.'</td>';
- echo '<td>'.$nb_fields.'</td>';
+ echo '<td>'.(($table_arr[$i]->getVar('table_admin') == 1) ? _YES : _NO).'</td>';
+ echo '<td>'.(($table_arr[$i]->getVar('table_user') == 1) ? _YES : _NO).'</td>';
+ echo '<td>'.(($table_arr[$i]->getVar('table_blocks') == 1) ? _YES : _NO).'</td>';
+ echo '<td>'.$table_arr[$i]->getVar('table_nbfields').'</td>';
echo '<td>';
echo '<a href="tables.php?op=edit_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_fields&table_id='.$i.'"><img src="'. $pathIcon16 .'/inserttable.png" alt="'._AM_TDMCREATE_FORMFIELDS.'" title="'._AM_TDMCREATE_FORMFIELDS.'" /></a> <a href="tables.php?op=delete_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
echo '</td>';
@@ -450,7 +455,8 @@
}
}
}
- echo '</table>';
+ echo '</table><br /><br />';
+ echo '<div class="right">'.$pagenav.'</div><br />';
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:38:48 UTC (rev 12201)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:40:25 UTC (rev 12202)
@@ -78,13 +78,15 @@
</tr>";
for($i=0; $i<$table_nbfields ; $i++)
{
- $table_id = ( $i == 0 ) ? strtolower($table_fieldname).'_id' : strtolower($table_fieldname).'_';
- $table_primary = ( $i == 0 ) ? "checked" : "";
- $table_value = ( $i == 0 ) ? "8" : "";
+ $field_id = ( $i == 0 ) ? strtolower($table_fieldname).'_id' : strtolower($table_fieldname).'_';
+ $field_primary = ( $i == 0 ) ? "checked" : "";
+ $field_value = ( $i == 0 ) ? "8" : "";
+ $field_value_size = ( $i != 0 ) ? "40" : "";
+ $field_value_maxlength = ( $i != 0 ) ? "255" : "";
$class = ($class == 'even') ? 'odd' : 'even';
echo "<tr class=".$class.">
- <td align='center'><INPUT type='text' size='10' value='".$table_id."' name='fields_name[".$i."]'></td>
+ <td align='center'><INPUT type='text' size='10' value='".$field_id."' name='fields_name[".$i."]'></td>
<td align='center'><SELECT name='fields_type[".$i."]'>
<OPTION VALUE='int'>INT</OPTION>
<OPTION VALUE='tinyint'>TINYINT</OPTION>
@@ -109,7 +111,13 @@
<OPTION VALUE='time'>TIME</OPTION>
<OPTION VALUE='year'>YEAR</OPTION>
</SELECT></td>
- <td align='center'><INPUT type='text' size='2' name='fields_value[".$i."]' value='".$table_value."'></td>
+ <td align='center'>
+ <INPUT type='text' size='2' name='fields_value[".$i."]' value='".$field_value."'>";
+ if($i != 0) {
+ echo "<br /><INPUT type='text' size='2' name='fields_value_size[".$i."]' value='".$field_value_size."'><br />
+ <INPUT type='text' size='2' name='fields_value_maxlength[".$i."]' value='".$field_value_maxlength."'>";
+ }
+ echo "</td>
<td align='center'><SELECT name='fields_attributes[".$i."]'>
<OPTION VALUE=''></OPTION>
<OPTION VALUE='unsigned'>UNSIGNED</OPTION>
@@ -174,6 +182,14 @@
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_USER."</td>
<td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_user[".$i."]' checked></td>
</tr>
+ <tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_FORM."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_form[".$i."]' checked></td>
+ </tr>
+ <tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_LIST."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_list[".$i."]' checked></td>
+ </tr>
";
//Afficher la case blocks
if ( $table_blocks == 1 )
@@ -192,19 +208,19 @@
<td align='right' class='even'><INPUT type='radio' value='".$i."' name='fields_param_main_field' ".$checked_main_field."></td>
</tr>";
- //Afficher la case blocks
- if ( $table_blocks == 1 )
+ //Afficher la case search
+ if ( $table_search == 1 )
{
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_search_field[".$i."]' checked></td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked></td>
</tr>";
}
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_required_field[".$i."]' checked></td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_required_field[".$i."]' checked></td>
</tr>
</table>";
}
@@ -261,6 +277,8 @@
$fields_name[$i] = '';
$fields_type[$i] = '';
$fields_value[$i] = '';
+ $fields_value_size[$i] = '';
+ $fields_value_maxlength[$i] = '';
$fields_attributes[$i] = '';
$fields_null[$i] = '';
$fields_default[$i] = '';
@@ -271,10 +289,12 @@
$fields_name[$i] = $fields[0];
$fields_type[$i] = $fields[1];
$fields_value[$i] = $fields[2];
- $fields_attributes[$i] = $fields[3];
- $fields_null[$i] = $fields[4];
- $fields_default[$i] = $fields[5];
- $fields_index[$i] = $fields[6];
+ $fields_value_size[$i] = $fields[3];
+ $fields_value_maxlength[$i] = $fields[4];
+ $fields_attributes[$i] = $fields[5];
+ $fields_null[$i] = $fields[6];
+ $fields_default[$i] = $fields[7];
+ $fields_index[$i] = $fields[8];
}
}
//parameters
@@ -284,16 +304,20 @@
$param_elements[$i] = '0';
$param_display_admin[$i] = '0';
$param_display_user[$i] = '0';
+ $param_display_form[$i] = '0';
+ $param_display_list[$i] = '0';
$param_display_blocks[$i] = '0';
} else {
$parameters = explode(":", $parameters_total[$i-1]);
$param_elements[$i] = $parameters[0];
$param_display_admin[$i] = $parameters[1];
$param_display_user[$i] = $parameters[2];
- $param_display_blocks[$i] = $parameters[3];
- $param_display_main_field[$i] = $parameters[4];
- $fields_param_search_field[$i] = $parameters[5];
- $fields_param_required_field[$i] = $parameters[6];
+ $param_display_form[$i] = $parameters[3];
+ $param_display_list[$i] = $parameters[4];
+ $param_display_blocks[$i] = $parameters[5];
+ $param_display_main_field[$i] = $parameters[6];
+ $param_search_field[$i] = $parameters[7];
+ $param_required_field[$i] = $parameters[8];
}
}
$table_action = $table_mid.'&table_id='.$table_id.'&table_name='.$table_name.'&table_fieldname='.$table_fieldname.'&table_blocks='.$table_blocks.'&table_display_admin='.$table_admin.'&table_display_user='.$table_user.'&table_status='.$table_status.'&table_waiting='.$table_waiting.'&table_online='.$table_online.'&table_search='.$table_search.'&table_comments='.$table_comments.'&table_notifications='.$table_notifications.'&table_nbfields='.$table_nbfields.'&select='.$select;
@@ -431,7 +455,13 @@
}
echo "
</SELECT></td>
- <td align='center'><INPUT type='text' size='2' name='fields_value[".$i."]' value='".$fields_value[$i]."'></td>
+ <td align='center'>";
+ echo "<INPUT type='text' size='2' name='fields_value[".$i."]' value='".$fields_value[$i]."'>";
+ if ($i != 0) {
+ echo "<br /><INPUT type='text' size='2' name='fields_value_size[".$i."]' value='".$fields_value_size[$i]."'><br />
+ <INPUT type='text' size='2' name='fields_value_maxlength[".$i."]' value='".$fields_value_maxlength[$i]."'>";
+ }
+ echo "</td>
<td align='center'><SELECT name='fields_attributes[".$i."]'>";
if ( $fields_attributes[$i] == '' ) {
echo "<OPTION VALUE='' selected></OPTION>";
@@ -598,6 +628,26 @@
}
echo "</td>
</tr>
+ <tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_FORM."</td>
+ <td align='right' class='even'>";
+ if ( $param_display_user[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_form[".$i."]' checked>";
+ } else {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_form[".$i."]'>";
+ }
+ echo "</td>
+ </tr>
+ <tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_DISPLAY_LIST."</td>
+ <td align='right' class='even'>";
+ if ( $param_display_user[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_list[".$i."]' checked>";
+ } else {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_list[".$i."]'>";
+ }
+ echo "</td>
+ </tr>
";
//Afficher la case blocks
if ( $table_blocks == 1 )
@@ -631,10 +681,10 @@
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH.",</td>
<td align='right' class='even'>";
- if ( $fields_param_search_field[$i] == 1 ) {
- echo "<INPUT type='checkbox' size='4' name='fields_param_search_field[".$i."]' checked>";
+ if ( $param_search_field[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked>";
} else {
- echo "<INPUT type='checkbox' size='4' name='fields_param_search_field[".$i."]'>";
+ echo "<INPUT type='checkbox' size='4' name='param_search_field[".$i."]'>";
}
echo "</td>
</tr>";
@@ -643,15 +693,14 @@
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
<td align='right' class='even'>";
- if ( $fields_param_required_field[$i] == 1 ) {
- echo "<INPUT type='checkbox' size='4' name='fields_param_required_field[".$i."]' checked>";
+ if ( $param_required_field[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='param_required_field[".$i."]' checked>";
} else {
- echo "<INPUT type='checkbox' size='4' name='fields_param_required_field[".$i."]'>";
+ echo "<INPUT type='checkbox' size='4' name='param_required_field[".$i."]'>";
}
echo "</td>
- </tr>
-
- </table>";
+ </tr>
+ </table>";
}
echo "</td></tr>";
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:38:48 UTC (rev 12201)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:40:25 UTC (rev 12202)
@@ -52,13 +52,26 @@
//Afficher dans l'admin
if( $i == 0 ) {
$fpa[$i] = '0';
+ $fpa[$i] = '0';
+ $fpu[$i] = '0';
+ $fpf[$i] = '0';
+ $fpl[$i] = '0';
+ $fpb[$i] = '0';
+ $fpm[$i] = '0';
+ $fps[$i] = '0';
+ $fpr[$i] = '0';
} else {
$param = explode(':', $parameters_total[$i-1]);
$fpt[$i] = $param[0]; // fpt = fields parameters type
- $fpa[$i] = $param[2]; // fpa = fields parameters admin
- $fprf[$i] = $param[6]; // fprf = fields parameters required field
- if ( $param[4] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
+ $fpa[$i] = $param[1]; // fpa = fields parameters admin
+ $fpu[$i] = $param[2]; // fpu = fields parameters user
+ $fpf[$i] = $param[3]; // fpf = fields parameters form
+ $fpl[$i] = $param[4]; // fpl = fields parameters list
+ $fpb[$i] = $param[5]; // fpb = fields parameters block
+ $fps[$i] = $param[7]; // fps = fields parameters search
+ $fpr[$i] = $param[8]; // fpr = fields parameters required field
+ if ( $param[6] == 1 ) {
+ $fpm = $fields[0]; // fpm = fields parameters main field
}
}
}
@@ -80,7 +93,7 @@
$numrows = $'.$table_name.'Handler->getCount();
$'.$table_name.'_arr = $'.$table_name.'Handler->getAll($criteria);
';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
if ( $table_category != 1 )
{
$text .='
@@ -100,7 +113,7 @@
echo "<tr class=\'".$class."\'>";
$class = ($class == "even") ? "odd" : "even";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
$text .= $fields_data.'
echo "<td class=\'center width5\'>
@@ -135,7 +148,7 @@
$cat_weight = $categories_arr[$i]->getVar(\'cat_weight\');
echo "<tr class=\'".$class."\'>";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
$text .= ''.$fields_data.'
echo "<td class=\'center width5\'>
@@ -162,7 +175,7 @@
{
echo "<table width=\'100%\' cellspacing=\'1\' class=\'outer\'>
<tr>';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '',...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:41:33
|
Revision: 12203
http://sourceforge.net/p/xoops/svn/12203
Author: beckmi
Date: 2013-10-23 02:41:30 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 11525 (timgno: Updated, Is needed reinstallation for test)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/11525
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -104,7 +104,7 @@
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $mod_name, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
+ const_class($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
}
// Creation of permissions
if ( $table_category == 1) {
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -55,6 +55,10 @@
//remove all spaces from the new name
$obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name']));
$obj->setVar('mod_version', $_POST['mod_version']);
+ $obj->setVar('mod_min_php', $_POST['mod_min_php']);
+ $obj->setVar('mod_min_xoops', $_POST['mod_min_xoops']);
+ $obj->setVar('mod_min_admin', $_POST['mod_min_admin']);
+ $obj->setVar('mod_min_db', $_POST['mod_min_db']);
$obj->setVar('mod_description', $_POST['mod_description']);
$obj->setVar('mod_author', $_POST['mod_author']);
$obj->setVar('mod_author_mail', $_POST['mod_author_mail']);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -146,7 +146,7 @@
}
if ( isset($_REQUEST['table_online']) ) {
if ( $_REQUEST['table_online'] == 1 ) {
- $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1: unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1:unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
}
} else {
$table_fields .= '';
@@ -396,14 +396,14 @@
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($mod_arr) as $i)
@@ -460,14 +460,14 @@
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
- echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
echo '</tr></table><br><br>';
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -33,6 +33,10 @@
$this->initVar('mod_id',XOBJ_DTYPE_INT, 0,false,5);
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['name'],false);
$this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['version'],false);
+ $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php'],false);
+ $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops'],false);
+ $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin'],false);
+ $this->initVar('mod_min_db',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_db'],false);
$this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description'], false);
$this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author'], false);
$this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email'],false);
@@ -78,7 +82,11 @@
$form->insertBreak('<div class="center"><b>'._AM_TDMCREATE_MODULES_IMPORTANT.'</b></div>','head');
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'mod_name', 50, 255, $this->getVar('mod_name')), true);
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 50, 255, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 10, 25, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_PHP, 'mod_min_php', 10, 25, $this->getVar('mod_min_php')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_XOOPS, 'mod_min_xoops', 10, 25, $this->getVar('mod_min_xoops')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_ADMIN, 'mod_min_admin', 10, 25, $this->getVar('mod_min_admin')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_DB, 'mod_min_db', 10, 25, $this->getVar('mod_min_db')), true);
// Name description
$editor_configs=array();
$editor_configs['name'] = 'mod_description';
@@ -232,7 +240,7 @@
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE, 'mod_release', 50, 255, $this->getVar('mod_release')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'mod_status', 50, 255, $this->getVar('mod_status')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_PAYPAL_BUTTON, 'mod_donations', 50, 255, $this->getVar('mod_donations')));
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SUBVERSION, 'mod_subversion', 50, 255, $this->getVar('mod_subversion')));
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SUBVERSION, 'mod_subversion', 20, 25, $this->getVar('mod_subversion')));
$form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -137,7 +137,7 @@
</SELECT></td>
<td align='center'>";
if ( $i != 0 ) {
- echo "<table border='0' style='border-color:#666666'; width='100%' cellspacing='1' class='outer'>
+ echo "<table border='0' style='border-color:#555'; width='100%' cellspacing='1' class='outer'>
<tr>
<td align='left' class='head' width='95%'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_ELEMENTS."</td>
<td align='right' class='even' width='5%'>
@@ -191,34 +191,25 @@
<td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_list[".$i."]' checked></td>
</tr>
";
- //Afficher la case blocks
- if ( $table_blocks == 1 )
- {
- //Pour l'affichage dans les blocks
- $checked_blocks = ( $i == 1 || $i == 2 ) ? "checked" : "";
- echo "<tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOC."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' ".$checked_blocks."></td>
- </tr>";
- }
+ //Pour l'affichage dans les blocks
+ $checked_blocks = ( $i == 1 || $i == 2 ) ? "checked" : "";
+ echo "<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOCK."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' ".$checked_blocks."></td>
+ </tr>";
$checked_main_field = ( $i == 1 ) ? "checked" : "";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_MAIN_FIELD."</td>
<td align='right' class='even'><INPUT type='radio' value='".$i."' name='fields_param_main_field' ".$checked_main_field."></td>
- </tr>";
-
- //Afficher la case search
- if ( $table_search == 1 )
- {
- echo "
- <tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH."</td>
- <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked></td>
- </tr>";
- }
+ </tr>";
echo "
<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH."</td>
+ <td align='right' class='even'><INPUT type='checkbox' size='4' name='param_search_field[".$i."]' checked></td>
+ </tr>";
+ echo "
+ <tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
<td align='right' class='even'><INPUT type='checkbox' size='4' name='param_required_field[".$i."]' checked></td>
</tr>
@@ -648,21 +639,17 @@
}
echo "</td>
</tr>
- ";
- //Afficher la case blocks
- if ( $table_blocks == 1 )
- {
- echo "<tr>
- <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOC."</td>
- <td align='right' class='even'>";
- if ( $param_display_blocks[$i] == 1 ) {
- echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' checked>";
- } else {
- echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]'>";
- }
- echo "</td>
- </tr>";
+ ";
+ echo "<tr>
+ <td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_BLOCK."</td>
+ <td align='right' class='even'>";
+ if ( $param_display_blocks[$i] == 1 ) {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]' checked>";
+ } else {
+ echo "<INPUT type='checkbox' size='4' name='fields_param_blocks[".$i."]'>";
}
+ echo "</td>
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_MAIN_FIELD."</td>
@@ -673,10 +660,7 @@
echo "<INPUT type='radio' value='".$i."' name='fields_param_main_field'>";
}
echo "</td>
- </tr>";
- //Afficher la case recherche
- if ( $table_search == 1 )
- {
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_SEARCH.",</td>
@@ -687,8 +671,7 @@
echo "<INPUT type='checkbox' size='4' name='param_search_field[".$i."]'>";
}
echo "</td>
- </tr>";
- }
+ </tr>";
echo "
<tr>
<td align='left' class='head'>"._AM_TDMCREATE_TABLES_FIELDS_MORE_REQUIRED."</td>
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -50,34 +50,34 @@
$fields1 = explode(':', $fields_total[$i]);
$fields[$i] = $fields1[0];
//Afficher dans l'admin
- if( $i == 0 ) {
- $fpa[$i] = '0';
- $fpa[$i] = '0';
- $fpu[$i] = '0';
- $fpf[$i] = '0';
- $fpl[$i] = '0';
- $fpb[$i] = '0';
- $fpm[$i] = '0';
- $fps[$i] = '0';
- $fpr[$i] = '0';
- } else {
- $param = explode(':', $parameters_total[$i-1]);
- $fpt[$i] = $param[0]; // fpt = fields parameters type
- $fpa[$i] = $param[1]; // fpa = fields parameters admin
- $fpu[$i] = $param[2]; // fpu = fields parameters user
- $fpf[$i] = $param[3]; // fpf = fields parameters form
- $fpl[$i] = $param[4]; // fpl = fields parameters list
- $fpb[$i] = $param[5]; // fpb = fields parameters block
- $fps[$i] = $param[7]; // fps = fields parameters search
- $fpr[$i] = $param[8]; // fpr = fields parameters required field
- if ( $param[6] == 1 ) {
- $fpm = $fields[0]; // fpm = fields parameters main field
- }
- }
+ if( $i == 0 ) {
+ $fpe[$i] = $fields[0];
+ $fpa[$i] = '0';
+ $fpu[$i] = '0';
+ $fpf[$i] = '0';
+ $fpl[$i] = '0';
+ $fpb[$i] = '0';
+ $fpm[$i] = '0';
+ $fps[$i] = '0';
+ $fpr[$i] = '0';
+ } else {
+ $param = explode(':', $parameters_total[$i-1]);
+ $fpe[$i] = $param[0]; // fpe = fields parameters element
+ $fpa[$i] = $param[1]; // fpa = fields parameters admin
+ $fpu[$i] = $param[2]; // fpu = fields parameters user
+ $fpf[$i] = $param[3]; // fpf = fields parameters form
+ $fpl[$i] = $param[4]; // fpl = fields parameters list
+ $fpb[$i] = $param[5]; // fpb = fields parameters block
+ if ( $param[6] == 1 ) {
+ $fpm[$i] = $fields[0]; // fpm = fields parameters main field
+ }
+ $fps[$i] = $param[7]; // fps = fields parameters search
+ $fpr[$i] = $param[8]; // fpr = fields parameters required field
+ }
}
$field_id = $fields[0];
-$fields_name = $fields[1];
+$field_name = $fields[1];
$text .= '
echo $adminMenu->addNavigation(\''.$table_name.'.php\');
@@ -93,7 +93,7 @@
$numrows = $'.$table_name.'Handler->getCount();
$'.$table_name.'_arr = $'.$table_name.'Handler->getAll($criteria);
';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
if ( $table_category != 1 )
{
$text .='
@@ -113,7 +113,7 @@
echo "<tr class=\'".$class."\'>";
$class = ($class == "even") ? "odd" : "even";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 1);
$text .= $fields_data.'
echo "<td class=\'center width5\'>
@@ -148,7 +148,7 @@
$cat_weight = $categories_arr[$i]->getVar(\'cat_weight\');
echo "<tr class=\'".$class."\'>";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 1);
$text .= ''.$fields_data.'
echo "<td class=\'center width5\'>
@@ -175,7 +175,7 @@
{
echo "<table width=\'100%\' cellspacing=\'1\' class=\'outer\'>
<tr>';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
$text .= $fcn.'
<th class=\'center width5\'>".'.$language.'_FORMACTION."</th>
</tr>";
@@ -191,7 +191,7 @@
$category_weight = $'.$table_name.'_arr[$i]->getVar(\''.$table_fieldname.'_weight\');
echo "<tr class=\'".$class."\'>";
';
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, 1, 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, 1, 1);
$text .= ''.$fields_data.'
echo "<td class=\'center width5\'>
@@ -217,7 +217,7 @@
} else {
echo "<table width=\'100%\' cellspacing=\'1\' class=\'outer\'>
<tr>';
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 0);
$text .= $fcn.'
<th class=\'center width5\'>".'.$language.'_FORMACTION."</th>
</tr>
@@ -250,7 +250,7 @@
';
- $fields_save = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpu, $fpb, $fps, $fpt, $language, '', 2);
+ $fields_save = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpe, $fpa, $fpu, $fpf, $fpl, $fpb, $fps, $language, '', 2);
$text .= ''.$fields_save.'
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -19,12 +19,12 @@
* @version $Id: const_class.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php';
-function const_class($modules, $mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $table_parameters, $category)
+function const_class($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category)
{
$language = '_AM_'.strtoupper($mod_name).'_';
$file = $mod_name.'_'.$table_name. '.php';
$path_file = TDM_CREATE_MURL.'/'.$mod_name.'/class/'.$file;
- $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, 0, 0, 0, 0);
+ $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, 0, 0, 0);
//fields
$fields_total = explode('|', $table_fields);
$nb_fields = count($fields_total);
@@ -39,23 +39,24 @@
//Afficher dans les elements du formulaire et choisir le type
if( $i == 0 ) {
$fpaif = $fields[0]; // fpaif = fields parameters auto_increment field
- $fpt[$i] = '0';
+ $fpe[$i] = '0';
$fpa[$i] = '0';
$fpu[$i] = '0';
$fpf[$i] = '0';
- $fpl[$i] = '0';
- $fpr[$i] = '0';
+ $fpl[$i] = '0';
+ $fpr[$i] = '0';
+ $fpmf[$i] = '0';
} else {
$param = explode(':', $parameters_total[$i-1]);
//print_r($param);
- $fpt[$i] = $param[0]; // fpt = fields parameters types
- $fpa[$i] = $param[1]; // fpdf = fields parameters display form
- $fpu[$i] = $param[2]; // fpdf = fields parameters display form
- $fpf[$i] = $param[3]; // fpdf = fields parameters display form
- $fpl[$i] = $param[4]; // fpdf = fields parameters display form
- $fpr[$i] = $param[8]; // fprf = fields parameters required field
+ $fpe[$i] = $param[0]; // fpe = fields parameters elements
+ $fpa[$i] = $param[1]; // fpa = fields parameters display admin
+ $fpu[$i] = $param[2]; // fpu = fields parameters display user
+ $fpf[$i] = $param[3]; // fpf = fields parameters display form
+ $fpl[$i] = $param[4]; // fpl = fields parameters display list
+ $fpr[$i] = $param[8]; // fpr = fields parameters required field
if ( $param[6] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
+ $fpmf[$i] = $fields[0]; // fpmf = fields parameters main field
}
}
}
@@ -90,7 +91,7 @@
$form->setExtra(\'enctype="multipart/form-data"\');
';
- $text .= const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, $fpt, $fpr, 1);
+ $text .= const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, $fpe, $fpr, 1);
if( $category == 1) {
$up_mod_name = strtoupper($mod_name);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -23,6 +23,7 @@
$text = '';
$mod_name = $module->getVar('mod_name');
$mod_version = $module->getVar('mod_version');
+$mod_min_xoops = $module->getVar('mod_min_xoops');
$mod_revision = $module->getVar('mod_revision');
$mod_author = $module->getVar('mod_author');
$mod_credits = $module->getVar('mod_credits');
@@ -49,11 +50,10 @@
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license '.$mod_license.'
* @package '.$mod_name.'
- * @since 2.5.x
+ * @since '.$mod_min_xoops.'
* @author '.$mod_author.' <'.$mod_a_m.'> - <'.$mod_a_w_url.'>
* @version $Id: '.$mod_version.' '.$filename.' '.$mod_subversion.' '.$date.'Z '.$mod_credits.' $
*/
';
return $text;
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -77,12 +77,13 @@
{
$fields = explode(':', $fields_total[$j]);
//Afficher dans les elements du formulaire et choisir le type
- if( $j != 0 )
- {
+ if( $j == 0 ) {
+ $fpmf = 0;
+ } else {
$parameters1 = explode(':', $parameters_total[$j-1]);
if ( $parameters1[4] == 1 )
{
- $fields_param_main_field = $fields[0];
+ $fpmf = $fields[0];
}
}
}
@@ -96,7 +97,7 @@
if ($com_itemid > 0) {
$'.$table_name.'Handler =& xoops_getModuleHandler(\''.$table_name.'\', \''.$mod_name.'\');
$'.$table_name.' = $'.$table_name.'handler->get($com_itemid);
- $com_replytitle = $'.$table_name.'->getVar(\''.$fields_param_main_field.'\');
+ $com_replytitle = $'.$table_name.'->getVar(\''.$fpmf.'\');
include XOOPS_ROOT_PATH.\'/include/comment_new.php\';
}
?>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -32,20 +32,23 @@
}
//fields
- $fields_total = explode("|", $table_fields);
+ $fields_total = explode('|', $table_fields);
$nb_fields = count($fields_total);
//print_r($fields_total);
//parameters
- $parameters_total = explode("|", $table_parameters);
+ $parameters_total = explode('|', $table_parameters);
$k = 0;
//Recuperation des parameters affichage dans le formulaire
for($j=0; $j<$nb_fields; $j++)
{
- $fields = explode(":", $fields_total[$j]);
+ $fields = explode(':', $fields_total[$j]);
+
//Afficher dans les elements du formulaire et choisir le type
- if( $j != 0 )
- {
- $param = explode(":", $parameters_total[$j-1]);
+ if( $j == 0 ) {
+ $fpsf[$k] = 0;
+ $fpmf = 0;
+ } else {
+ $param = explode(':', $parameters_total[$j-1]);
if ( $param[7] == 1 )
{
$fpsf[$k] = $fields[0];
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -49,10 +49,12 @@
$modversion[\'manual\'] = "'.$modules->getVar("mod_manual").'";
$modversion[\'manual_file\'] = XOOPS_URL."/modules/{$dirname}/docs/'.$modules->getVar("mod_manual_file").'";
-$modversion[\'min_php\'] = "5.2";
-$modversion[\'min_xoops\'] = "2.5.5";
-$modversion[\'min_admin\']= "1.1";
-$modversion[\'min_db\']= array(\'mysql\'=>\'5.0.7\', \'mysqli\'=>\'5.0.7\');
+$modversion[\'min_php\'] = "'.$modules->getVar("mod_min_php").'";
+$modversion[\'min_xoops\'] = "'.$modules->getVar("mod_min_xoops").'";
+$modversion[\'min_admin\']= "'.$modules->getVar("mod_min_admin").'";';
+$min_db = $modules->getVar('mod_min_db');
+$text = '
+$modversion[\'min_db\']= array(\'mysql\'=>\''.$min_db.'\', \'mysqli\'=>\''.$min_db.'\');
$modversion[\'image\'] = "images/'.strtolower($modules->getVar("mod_image")).'";
$modversion[\'dirname\'] = "{$dirname}";
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php 2013-10-23 02:40:25 UTC (rev 12202)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php 2013-10-23 02:41:30 UTC (rev 12203)
@@ -27,12 +27,12 @@
include_once TDM_CREATE_URL.'/const/const_header.php';
-function const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $lng, $fpt = 0, $fprf = 0, $option = 0)
+function const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $lng, $fpe = 0, $fpr = 0, $option = 0)
{
// fpdf = fields_param_display_form
$text = '';
// Counts the number of fields
- $fields = explode("|", $table_fields);
+ $fields = explode('|', $table_fields);
$nb_fields = count($fields);
// Retr...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:42:55
|
Revision: 12204
http://sourceforge.net/p/xoops/svn/12204
Author: beckmi
Date: 2013-10-23 02:42:50 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 11534 (timgno: Updated to RC 1
Added more field:
min_php textbox in admin/modules.php
min_xoops textbox in admin/modules.php
min_admin textbox in admin/modules.php
min_mysql textbox in admin/modules.php
Is needed a new installation of the module
For more experienced users just create 4 more fields in the table txmcreate_modules after uploading the files if you overwrite the beta 4
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/11534
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/js/functions.js
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/update language 1.38 to 1.39.txt
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:41:30 UTC (rev 12203)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:42:50 UTC (rev 12204)
@@ -104,7 +104,7 @@
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ const_class($modules, $mod_name, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
}
// Creation of permissions
if ( $table_category == 1) {
@@ -129,7 +129,7 @@
}
// Creation of notifications
if ( isset($table_notifications) ) {
- const_include_notifications($modules, $mod_name, $table_name, $table_fieldname);
+ const_include_notifications($modules, $modules_name, $table_name, $table_fieldname);
}
// Creation of the file mysql.sql
const_sql($mod_name, $table_name, $table_fieldname, $category, $table_fields);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:41:30 UTC (rev 12203)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:42:50 UTC (rev 12204)
@@ -23,7 +23,7 @@
echo $adminMenu->addNavigation('modules.php');
switch ($op)
{
- case 'save':
+ case "save":
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
@@ -55,10 +55,10 @@
//remove all spaces from the new name
$obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name']));
$obj->setVar('mod_version', $_POST['mod_version']);
- $obj->setVar('mod_min_php', $_POST['mod_min_php']);
- $obj->setVar('mod_min_xoops', $_POST['mod_min_xoops']);
- $obj->setVar('mod_min_admin', $_POST['mod_min_admin']);
- $obj->setVar('mod_min_db', $_POST['mod_min_db']);
+ $obj->setVar('mod_min_php', $_POST['mod_min_php']);
+ $obj->setVar('mod_min_xoops' => $_POST['mod_min_xoops']);
+ $obj->setVar('mod_min_admin' => $_POST['mod_min_admin']);
+ $obj->setVar('mod_min_mysql' => $_POST['mod_min_mysql']);
$obj->setVar('mod_description', $_POST['mod_description']);
$obj->setVar('mod_author', $_POST['mod_author']);
$obj->setVar('mod_author_mail', $_POST['mod_author_mail']);
@@ -91,25 +91,26 @@
}
break;
- case 'new':
+ case "new":
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
echo $adminMenu->renderButton();
$obj =& $modulesHandler->create();
$form = $obj->getForm();
break;
- case 'edit':
+ case "edit":
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
$form = $obj->getForm();
break;
- case 'delete':
+ case "delete":
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
{
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
- if ($modulesHandler->delete($obj)) {
+ if ($modulesHandler->delete($obj)) {
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE mod_id = ".$_REQUEST['mod_id']);
redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
@@ -118,29 +119,18 @@
xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
}
break;
- case 'list':
+ case "list":
default:
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
echo $adminMenu->renderButton();
-
- $limit = $GLOBALS['xoopsModuleConfig']['adminpager'];
- $start = TDMCreate_CleanVars( $_REQUEST, 'start', 0 );
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
- $criteria->setStart($start);
- $criteria->setLimit($limit);
- $mod_arr = $modulesHandler->getall($criteria);
- $numrows = $modulesHandler->getCount();
- if ( $numrows > $limit ) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list&limit=' . $limit);
- $pagenav = $pagenav->renderNav(4);
- } else {
- $pagenav = '';
- }
- if ( $numrows > 0 )
+ $mod_arr = $modulesHandler->getall($criteria);
+ $numrows_modules = $modulesHandler->getCount();
+
+ if ( $numrows_modules > 0 )
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
@@ -174,8 +164,7 @@
echo '</td>';
echo '</tr>';
}
- echo '</table><br /><br />';
- echo '<div class="right">'.$pagenav.'</div><br />';
+ echo '</table><br><br>';
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
@@ -190,4 +179,4 @@
}
break;
}
-include_once 'admin_footer.php';
\ No newline at end of file
+include_once "admin_footer.php";
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:41:30 UTC (rev 12203)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:42:50 UTC (rev 12204)
@@ -21,6 +21,7 @@
include_once 'admin_header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
echo $adminMenu->addNavigation('tables.php');
+$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
switch ($op) {
case 'save_table':
if (isset($_REQUEST['table_id'])) {
@@ -51,9 +52,9 @@
$obj->setVar('table_notifications', 0);
$obj->setVar('table_nbfields', 7);
- $table_fields = 'cat_id:int:8: : :unsigned:NOT NULL: :primary|cat_pid:int:5: : :unsigned:NOT NULL:0:unique|cat_title:varchar:255: : : :NOT NULL: :unique|cat_desc:text: : : : :NOT NULL: :|cat_image:varchar:255: : : :NOT NULL: :|cat_weight:int:5: : :unsigned:NOT NULL:0:|cat_color:varchar:10: : : :NULL: :';
+ $table_fields = 'cat_id:int:8:unsigned:NOT NULL: :primary|cat_pid:int:5:unsigned:NOT NULL:0:unique|cat_title:varchar:255: :NOT NULL: :unique|cat_desc:text: : :NOT NULL: :|cat_image:varchar:255: :NOT NULL: :|cat_weight:int:5:unsigned:NOT NULL:0:|cat_color:varchar:10: :NULL: :';
- $table_parameters = 'XoopsFormCategory:0:0:0:0:0:0:0:1|XoopsFormText:1:1:0:0:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0:0:0|XoopsFormText:1:1:0:0:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:0:0:1';
+ $table_parameters = 'XoopsFormCategory:0:0:0:0:0:1|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:0|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1';
//Image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
@@ -62,15 +63,18 @@
$uploaddir = $pathIcon32;
}else{
$uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/";
- }
- $uploader = new XoopsMediaUploader($uploaddir, 'gif|jpeg|pjpeg|png', 500000, null, null);
+ }
+
+ $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile1']['name']) ;
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile1"]['name']) ;
$name_img = 'category.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
- redirect_header('javascript:history.go(-1)', 3, $uploader->getErrors());
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
} else {
$obj->setVar('table_image', $uploader->getSavedFileName());
}
@@ -101,8 +105,6 @@
$table_parameters .= ( !empty($_REQUEST['fields_param_elements'][$i]) ) ? "".$_REQUEST['fields_param_elements'][$i].":" : " :";
$table_parameters .= ( !empty($_REQUEST['fields_param_admin'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_user'][$i]) ) ? "1:" : "0:";
- $table_parameters .= ( !empty($_REQUEST['fields_param_form'][$i]) ) ? "1:" : "0:";
- $table_parameters .= ( !empty($_REQUEST['fields_param_list'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_blocks'][$i]) ) ? "1:" : "0:";
$table_parameters .= ( $i == $_REQUEST['fields_param_main_field']) ? "1:" : "0:";
$table_parameters .= ( !empty($_REQUEST['fields_param_search_field'][$i]) ) ? "1:" : "0:";
@@ -113,8 +115,6 @@
$table_fields .= (!empty($_REQUEST['fields_name'][$i])) ? $_REQUEST['fields_name'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_type'][$i])) ? $_REQUEST['fields_type'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_value'][$i])) ? $_REQUEST['fields_value'][$i].":" : " :";
- $table_fields .= (!empty($_REQUEST['fields_value_size'][$i])) ? $_REQUEST['fields_value_size'][$i].":" : " :";
- $table_fields .= (!empty($_REQUEST['fields_value_maxlength'][$i])) ? $_REQUEST['fields_value_maxlength'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_attributes'][$i])) ? $_REQUEST['fields_attributes'][$i].":" : " :";
$table_fields .= (!empty($_REQUEST['fields_null'][$i])) ? strtoupper($_REQUEST['fields_null'][$i]).":" : " :";
$table_fields .= (!empty($_REQUEST['fields_default'][$i])) ? $_REQUEST['fields_default'][$i].":" : " :";
@@ -146,7 +146,7 @@
}
if ( isset($_REQUEST['table_online']) ) {
if ( $_REQUEST['table_online'] == 1 ) {
- $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1:unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
+ $table_fields .= '|'.strtolower($_REQUEST['table_fieldname']).'_online:tinyint:1: unsigned:NOT NULL:0:'; $table_parameters .= '|XoopsFormCheckBox:1:1:1:0:0:1';
}
} else {
$table_fields .= '';
@@ -229,14 +229,14 @@
$newname = strtolower($_REQUEST['table_fieldname']);
//echo $count_parameters;
//fields
- for($i = 0; $i < $count_fields; $i++)
+ for($i=0; $i<$count_fields; $i++)
{
- $fields = explode(':', $fields_total[$i]);
+ $fields = explode(":", $fields_total[$i]);
$fields[0] = $newname . substr($fields[0], stripos($fields[0], '_'));
$newfields[$i] = implode(":", $fields);
}
- $newTableFields=implode('|',$newfields);
+ $newTableFields=implode("|",$newfields);
$obj->setVar('table_fields', $newTableFields);
if ($tablesHandler->insert($obj)) {
@@ -273,7 +273,7 @@
case "table_fields":
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=table_fields', 'add');
- echo $adminMenu->renderButton();
+ echo $adminMenu->renderButton();
//fields existe deja ?
$criteria = new CriteriaCompo();
@@ -373,50 +373,40 @@
$xoopsDB->queryF($sql_del);
}
- $limit = $GLOBALS['xoopsModuleConfig']['adminpager'];
- $start = TDMCreate_CleanVars( $_REQUEST, 'start', 0 );
- $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/style.css' );
- $GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
-
$criteria = new CriteriaCompo();
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
- $criteria->setStart($start);
- $criteria->setLimit($limit);
$mod_arr = $modulesHandler->getall($criteria);
$numrows_modules = $modulesHandler->getCount();
- if ( $numrows_modules > $limit ) {
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit);
- $pagenav = $pagenav->renderNav(4);
- } else {
- $pagenav = '';
- }
+
if ( $numrows_modules > 0 )
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
- echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th align="center" width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($mod_arr) as $i)
{
$mod_id = $mod_arr[$i]->getVar('mod_id');
$mod_name = $mod_arr[$i]->getVar('mod_name');
+ $mod_image = $mod_arr[$i]->getVar('mod_image');
+ $mod_display_admin = ($mod_arr[$i]->getVar('mod_display_admin') == 1) ? _YES : _NO;
+ $mod_display_user = ($mod_arr[$i]->getVar('mod_display_user') == 1) ? _YES : _NO;
echo '<tr class="odd center toggleTables">';
echo '<td class="width5"><b>'.$i.'</b><br /><img src="../images/icons/16/toggle.png" alt="Toggle" title="Toggle" /></td>';
$nbsps = ' ';
echo '<td class="left">'.$nbsps.'<img src="../images/icons/16/arrow.gif" alt="Arrow" />'.$nbsps.'<b>'.$mod_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$mod_arr[$i]->getVar('mod_image').'" height="30px"></td>';
- echo '<td>'.(($mod_arr[$i]->getVar('mod_display_admin') == 1) ? _YES : _NO).'</td>';
- echo '<td>'.(($mod_arr[$i]->getVar('mod_display_user') == 1) ? _YES : _NO).'</td>';
+ echo '<td><img src="../images/uploads/modules/'.$mod_image.'" height="30px"></td>';
+ echo '<td>'.$mod_display_admin.'</td>';
+ echo '<td>'.$mod_display_user.'</td>';
echo '<td>~</td>';
echo '<td>~</td>';
echo '<td>';
@@ -426,7 +416,7 @@
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $mod_id));
- $criteria->setSort('table_id');
+ $criteria->setSort('table_name');
$criteria->setOrder('ASC');
$table_arr = $tablesHandler->getall($criteria);
$numrows_tables = $tablesHandler->getCount();
@@ -436,18 +426,23 @@
{
$table_name = $table_arr[$i]->getVar('table_name');
$table_image = $table_arr[$i]->getVar('table_image');
- echo '<tr class="even center toggleHidden">';
+ $table_blocks = $table_arr[$i]->getVar('table_blocks');
+ $table_admin = (($table_arr[$i]->getVar('table_admin') == 1) ? _YES : _NO);
+ $table_user = (($table_arr[$i]->getVar('table_user') == 1) ? _YES : _NO);
+ $nb_fields = $table_arr[$i]->getVar('table_nbfields');
+ $blocks = ($table_blocks == 1) ? _YES : _NO;
+ echo '<tr class="even center">';
echo '<td class="center">'.$i.'</b></a></td>';
- echo '<td class="left"> <b>» '.$table_name.'</b></a></td>';
+ echo '<td class="left"> <b>- '.$table_name.'</b></a></td>';
if(file_exists($image = $pathIcon32.'/'.$table_image)) {
echo '<td><img src="'.$image.'" height="25px"></td>';
} else {
echo '<td><img src="../images/uploads/tables/'.$table_image.'" height="25px"></td>';
}
- echo '<td>'.(($table_arr[$i]->getVar('table_admin') == 1) ? _YES : _NO).'</td>';
- echo '<td>'.(($table_arr[$i]->getVar('table_user') == 1) ? _YES : _NO).'</td>';
- echo '<td>'.(($table_arr[$i]->getVar('table_blocks') == 1) ? _YES : _NO).'</td>';
- echo '<td>'.$table_arr[$i]->getVar('table_nbfields').'</td>';
+ echo '<td>'.$table_admin.'</td>';
+ echo '<td>'.$table_user.'</td>';
+ echo '<td>'.$blocks.'</td>';
+ echo '<td>'.$nb_fields.'</td>';
echo '<td>';
echo '<a href="tables.php?op=edit_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_fields&table_id='.$i.'"><img src="'. $pathIcon16 .'/inserttable.png" alt="'._AM_TDMCREATE_FORMFIELDS.'" title="'._AM_TDMCREATE_FORMFIELDS.'" /></a> <a href="tables.php?op=delete_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
echo '</td>';
@@ -455,19 +450,18 @@
}
}
}
- echo '</table><br /><br />';
- echo '<div class="right">'.$pagenav.'</div><br />';
+ echo '</table>';
} else {
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr class="center">';
- echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
echo '</tr></table><br><br>';
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php 2013-10-23 02:41:30 UTC (rev 12203)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php 2013-10-23 02:42:50 UTC (rev 12204)
@@ -24,110 +24,109 @@
}
class constArchitecture {
- /*
- *
- *
- */
- var $module_name = '';
- /*
- *
- *
- */
- var $folder_name = null;
- /*
- *
- *
- */
- var $file_name = null;
- /*
- *
- *
- */
- var $path = null;
- /*
- *
- *
- */
- var $copieFile;
- /*
- * @pubblic function constructor class
- * @param string $path
- */
- function __construct($path) {
- $this->path = $path;
- }
- /*
- * @pubblic function class
- * @param string $path
- */
- function constArchitecture($path)
- {
- $this->__construct($path);
- }
- /*
- * @pubblic function makeDir
- * @param string $path
- */
- function makeDir($path)
- {
- $this->path = $path;
- if(!is_dir($this->path)) {
- mkdir($this->path, 0705);
- chmod($this->path, 0705);
- }
- }
- /*
- * @pubblic function makeDirModule
- * @param string $folder_name
- */
- function makeDirInModule($folder_name)
- {
- $this->folder_name = $folder_name;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
- if(!is_dir($fname)) {
- mkdir($fname, 0705);
- chmod($fname, 0705);
- }
- }
- /*
- * @pubblic function makeDir & copy file
- * @param string $folder_name
- * @param string $copieFile
- * @param string $file
- */
- function makeDirAndCopyFile($folder_name, $copieFile, $file)
- {
- $this->file_name = $file;
- $this->folder_name = $folder_name;
- $this->copieFile = $copieFile;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
- if(!is_dir($fname)) {
- mkdir($fname, 0705);
- chmod($fname, 0705);
- $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
- } else {
- $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
- }
- }
- /*
- * @pubblic function copy file
- * @param string $folder_name
- * @param string $copieFile
- * @param string $file
- */
- function copyFile($folder_name, $copieFile, $file)
- {
- $this->file_name = $file;
- $this->folder_name = $folder_name;
- $this->copieFile = $copieFile;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name. "/". $this->file_name;
- /*if(!file_exists($fname)) {
+ /*
+ *
+ *
+ */
+ var $module_name = '';
+ /*
+ *
+ *
+ */
+ var $folder_name = null;
+ /*
+ *
+ *
+ */
+ var $file_name = null;
+ /*
+ *
+ *
+ */
+ var $path = null;
+ /*
+ *
+ *
+ */
+ var $copieFile;
+ /*
+ * @pubblic function constructor class
+ * @param string $path
+ */
+ function __construct($path) {
+ $this->path = $path;
+ }
+ /*
+ * @pubblic function class
+ * @param string $path
+ */
+ function constArchitecture($path)
+ {
+ $this->__construct($path);
+ }
+ /*
+ * @pubblic function makeDir
+ * @param string $path
+ */
+ function makeDir($path)
+ {
+ $this->path = $path;
+ if(!is_dir($this->path)) {
+ mkdir($this->path, 0755);
+ chmod($this->path, 0755);
+ }
+ }
+ /*
+ * @pubblic function makeDirModule
+ * @param string $folder_name
+ */
+ function makeDirInModule($folder_name)
+ {
+ $this->folder_name = $folder_name;
+ $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
+ if(!is_dir($fname)) {
+ mkdir($fname, 0755);
+ chmod($fname, 0755);
+ }
+ }
+ /*
+ * @pubblic function makeDir & copy file
+ * @param string $folder_name
+ * @param string $copieFile
+ * @param string $file
+ */
+ function makeDirAndCopyFile($folder_name, $copieFile, $file)
+ {
+ $this->file_name = $file;
+ $this->folder_name = $folder_name;
+ $this->copieFile = $copieFile;
+ $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
+ if(!is_dir($fname)) {
+ mkdir($fname, 0755);
+ chmod($fname, 0755);
+ $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
+ } else {
+ $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
+ }
+ }
+ /*
+ * @pubblic function copy file
+ * @param string $folder_name
+ * @param string $copieFile
+ * @param string $file
+ */
+ function copyFile($folder_name, $copieFile, $file)
+ {
+ $this->file_name = $file;
+ $this->folder_name = $folder_name;
+ $this->copieFile = $copieFile;
+ $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name. "/". $this->file_name;
+ /*if(!file_exists($fname)) {
chmod($fname, 0777);
- copy($this->copieFile, $fname);
- } else {*/
- copy($this->copieFile, $fname);
- //}
-
- }
+ copy($this->copieFile, $fname);
+ } else {*/
+ copy($this->copieFile, $fname);
+ //}
+ }
}
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:41:30 UTC (rev 12203)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:42:50 UTC (rev 12204)
@@ -36,7 +36,7 @@
$this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php'],false);
$this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops'],false);
$this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin'],false);
- $this->initVar('mod_min_db',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_db'],false);
+ $this->initVar('mod_min_mysql',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_mysql'],false);
$this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description'], false);
$this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author'], false);
$this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email'],false);
@@ -82,11 +82,11 @@
$form->insertBreak('<div class="center"><b>'._AM_TDMCREATE_MODULES_IMPORTANT.'</b></div>','head');
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'mod_name', 50, 255, $this->getVar('mod_name')), true);
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 10, 25, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 50, 255, $this->getVar('mod_version')), true);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_PHP, 'mod_min_php', 10, 25, $this->getVar('mod_min_php')), true);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_XOOPS, 'mod_min_xoops', 10, 25, $this->getVar('mod_min_xoops')), true);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_ADMIN, 'mod_min_admin', 10, 25, $this->getVar('mod_min_admin')), true);
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_DB, 'mod_min_db', 10, 25, $this->getVar('mod_min_db')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_MYSQL, 'mod_min_mysql', 10, 25, $this->getVar('mod_min_mysql')), true);
// Name description
$editor_configs=array();
$editor_configs['name'] = 'mod_description';
@@ -240,7 +240,7 @@
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE, 'mod_release', 50, 255, $this->getVar('mod_release')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'mod_status', 50, 255, $this->getVar('mod_status')));
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_PAYPAL_BUTTON, 'mod_donations', 50, 255, $this->getVar('mod_donations')));
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:45:13
|
Revision: 12206
http://sourceforge.net/p/xoops/svn/12206
Author: beckmi
Date: 2013-10-23 02:45:08 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 11599 (timgno: solved little bugs, Updated)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/11599
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/credits.txt
XoopsModules/TDMCreate/trunk/TDMCreate/docs/readme.txt
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/help/help.html
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -20,17 +20,16 @@
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-include_once("../include/functions.php");
+include_once('../include/functions.php');
include_once 'includes.php';
//
$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
//
-
-$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
-$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-//load class
+// Get class handler
$modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate');
$tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate');
//
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -28,18 +28,12 @@
}
$mod_name = strtolower($modules->getVar('mod_name'));
-$mod_desc = $modules->getVar('mod_description');
$mod_author_website_name = $modules->getVar('mod_author_website_name');
$mod_author_website_url = $modules->getVar('mod_author_website_url');
-$mod_image = $modules->getVar('mod_image');
-$mod_active_search = $modules->getVar('mod_search');
-$mod_active_comments = $modules->getVar('mod_comments');
-$mod_active_notifications = $modules->getVar('mod_notifications');
-$mod_paypal_button = $modules->getVar('mod_donations');
-$mod_subversion = $modules->getVar('mod_subversion');
+$mod_permissions = $modules->getVar('mod_permissions');
if (isset($_REQUEST['table_name'])) {
- $tables =& $tablesHandler->get(isset($_REQUEST['table_name']));
+ $tables =& $tablesHandler->get($_REQUEST['table_name']);
} else {
$tables =& $tablesHandler;
}
@@ -61,14 +55,14 @@
// Effacer repertoire of nouveau module s'il existe
TDMCreate_clearDir($modPath.'/modules/'.$mod_name);
// Debut
- OpenTable();
+ TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_OK, _AM_TDMCREATE_BUILDING_NOTOK);
/************************************************/
/*Structure*/
/************************************************/
//Creation of architecture
- const_architecture($mod_name, $mod_image);
+ const_architecture($modules);
//Creation of changelog.txt
- const_changelog($modules, $mod_name);
+ const_changelog($modules);
$result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
list( $category ) = $xoopsDB->fetchRow($result);
@@ -85,15 +79,10 @@
$table_blocks = $tables_arr[$i]->getVar('table_blocks');
$table_admin = $tables_arr[$i]->getVar('table_admin');
$table_user = $tables_arr[$i]->getVar('table_user');
- if ($mod_active_search != 0) {
- $table_search = $tables_arr[$i]->getVar('table_search');
- }
- if ($mod_active_comments != 0) {
- $table_comments = $tables_arr[$i]->getVar('table_comments');
- }
- if ($mod_active_notifications != 0) {
- $table_notifications = $tables_arr[$i]->getVar('table_notifications');
- }
+ $table_search = $tables_arr[$i]->getVar('table_search');
+ $table_comments = $tables_arr[$i]->getVar('table_comments');
+ $table_notifications = $tables_arr[$i]->getVar('table_notifications');
+ $table_permissions = $tables_arr[$i]->getVar('table_permissions');
$table_waiting = $tables_arr[$i]->getVar('table_waiting');
// Fabrication
@@ -104,114 +93,116 @@
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $mod_name, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
- }
- // Creation of permissions
- if ( $table_category == 1) {
- const_admin_permissions($modules, $mod_name, $table_name, $table_fieldname);
- }
+ const_class($modules, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
+ }
// Creation of pages admin
if ( $table_admin == 1 ) {
- const_admin_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ const_admin_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
}
// Creation of pages and templates user
if ( $table_user == 1 && $table_name != null ) {
- const_user_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
- const_templates_pages($modules, $mod_name, $table_name, $table_fieldname, $table_fields);
+ const_user_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ const_templates_pages($modules, $table_name, $table_fieldname, $table_fields);
}
// Creation of search
- if ( isset($table_search) ) {
- const_include_search($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
- }
- // Creation of comments
- if ( isset($table_comments) ) {
- const_include_comments($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
- }
+ if ( $table_search == 1 ) {
+ const_include_search($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
+ }
// Creation of notifications
- if ( isset($table_notifications) ) {
- const_include_notifications($modules, $modules_name, $table_name, $table_fieldname);
+ if ( $table_notifications == 1 ) {
+ const_include_notifications($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
}
// Creation of the file mysql.sql
- const_sql($mod_name, $table_name, $table_fieldname, $category, $table_fields);
+ const_sql($modules, $table_name, $table_fieldname, $category, $table_fields);
// Creation of blocks
if ( $table_blocks == 1 ) {
- const_blocks($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
+ const_blocks($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
//Creation of template per blocks
- const_blocks_templates($modules, $mod_name, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ const_blocks_templates($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
+ // Creation of admin permissions.php
+ if ( $table_permissions == 1) {
+ const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
}
}
//Creation of architecture of more fields and data
//const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
+ // Creation of comments
+ if ( $table_comments == 1 ) {
+ const_include_comments($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
+ }
if ( $table_waiting == 1 ) {
// Creation of Waiting Plugin
- const_waiting($modules, $mod_name, $tables_arr);
+ const_waiting($modules, $tables_arr);
}
// Creation of xoopsversion.php
- const_xoopsversion($modules, $mod_name, $table_name, $table_fields, $table_parameters, $tables_arr);
+ const_xoopsversion($modules, $table_name, $table_fields, $table_parameters, $tables_arr);
if ( $table_user == 1 && $table_name != null ) {
// Creation of template index
- const_templates_index($modules, $mod_name);
+ const_templates_index($modules);
// Creation of template header
- const_templates_header($modules, $mod_name, $tables_arr);
+ const_templates_header($modules, $tables_arr);
// Creation of template footer
- const_templates_footer($modules, $mod_name, $table_comments, $table_notifications);
+ const_templates_footer($modules, $table_comments, $table_notifications);
}
if ( $table_admin == 1 ) {
// Creation of template admin about
- const_templates_admin_about($modules, $mod_name);
+ const_templates_admin_about($modules);
// Creation of template admin help
- const_templates_admin_help($modules, $mod_name);
+ const_templates_admin_help($modules);
}
// Include
///////////////////////////////////////////////////////////////////////
// Configs
- const_include_common($modules, $mod_name, $mod_author_website_name, $mod_author_website_url);
+ const_include_common($modules, $mod_author_website_name, $mod_author_website_url);
// Functions
- const_include_functions($modules, $mod_name);
+ const_include_functions($modules);
//Creation of file install per l'uploads
- const_include_install($modules, $mod_name, $tables_arr);
+ const_include_install($modules, $tables_arr);
// Language
///////////////////////////////////////////////////////////////////////
if ( $table_user == 1 ) {
//Creation of language main.php
- const_main_language($modules, $mod_name, $mod_desc, $tables_arr);
+ const_main_language($modules, $tables_arr);
}
// Creation of language modinfo.php
- const_modinfo_language($modules, $mod_name, $mod_desc, $table_name, $table_image, $tables_arr, $category);
- // Creation of language admin.php
- const_admin_language($modules, $mod_name, $tables_arr, $category);
+ const_modinfo_language($modules, $table_name, $table_image, $tables_arr, $category);
+ if ( $table_admin == 1 ) {
+ // Creation of language admin.php
+ const_admin_language($modules, $tables_arr, $category);
+ }
if ( $table_blocks == 1 ) {
// Creation of language blocks.php
- const_blocks_language($modules, $mod_name, $tables_arr);
+ const_blocks_language($modules, $tables_arr);
}
// Creation of language help/help.html
- const_help_language($modules, $mod_name, $mod_desc);
+ const_help_language($modules);
///////////////////////////////////////////////////////////////////////
//Creation of style.css
- const_css_style($modules, $mod_name);
+ const_css_style($modules);
/************************************************/
/*Admin*/
/************************************************/
// Creation of admin header.php
- const_admin_header($modules, $mod_name, $tables_arr);
+ const_admin_header($modules, $tables_arr);
// Creation of admin index.php
- const_admin_index($modules, $mod_name, $table_name, $tables_arr);
+ const_admin_index($modules, $table_name, $tables_arr);
// Creation of admin footer.php
- const_admin_footer($modules, $mod_name, $tables_arr);
+ const_admin_footer($modules);
// Creation of admin menu.php
- const_admin_menu($modules, $mod_name, $tables_arr, $category);
+ const_admin_menu($modules, $tables_arr, $category);
// Creation of admin about.php
- const_admin_about($modules, $mod_name, $mod_paypal_button);
+ const_admin_about($modules);
/************************************************/
/*User*/
/************************************************/
if ( $table_user == 1 ) {
- const_user_header($modules, $mod_name);
- const_user_index($modules, $mod_name);
+ const_user_header($modules);
+ const_user_index($modules);
}
- CloseTable();
+ TDMCreate_CloseTable();
break;
case 'default':
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -83,6 +83,8 @@
$obj->setVar('mod_search', $_REQUEST['mod_search']);
$obj->setVar('mod_comments', $_REQUEST['mod_comments']);
$obj->setVar('mod_notifications', $_REQUEST['mod_notifications']);
+ $obj->setVar('mod_permissions', $_REQUEST['mod_permissions']);
+ $obj->setVar('mod_install', $_REQUEST['mod_install']);
$obj->setVar('mod_donations', $_POST['mod_donations']);
$obj->setVar('mod_subversion', $_POST['mod_subversion']);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -21,7 +21,6 @@
include_once 'admin_header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
echo $adminMenu->addNavigation('tables.php');
-$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
switch ($op) {
case 'save_table':
if (isset($_REQUEST['table_id'])) {
@@ -50,6 +49,7 @@
$obj->setVar('table_search', 0);
$obj->setVar('table_comments', 0);
$obj->setVar('table_notifications', 0);
+ $obj->setVar('table_permissions', 0);
$obj->setVar('table_nbfields', 7);
$table_fields = 'cat_id:int:8:unsigned:NOT NULL: :primary|cat_pid:int:5:unsigned:NOT NULL:0:unique|cat_title:varchar:255: :NOT NULL: :unique|cat_desc:text: : :NOT NULL: :|cat_image:varchar:255: :NOT NULL: :|cat_weight:int:5:unsigned:NOT NULL:0:|cat_color:varchar:10: :NULL: :';
@@ -94,7 +94,8 @@
$obj->setVar('table_online', $_REQUEST['table_online']);
$obj->setVar('table_search', $_REQUEST['table_search']);
$obj->setVar('table_comments', $_REQUEST['table_comments']);
- $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+ $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+ $obj->setVar('table_permissions', $_REQUEST['table_permissions']);
$table_fields = '';
$table_parameters = '';
@@ -218,7 +219,8 @@
$obj->setVar('table_online', $_REQUEST['table_online']);
$obj->setVar('table_search', $_REQUEST['table_search']);
$obj->setVar('table_comments', $_REQUEST['table_comments']);
- $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+ $obj->setVar('table_notifications', $_REQUEST['table_notifications']);
+ $obj->setVar('table_permissions', $_REQUEST['table_permissions']);
$table_fields = $obj->getVar('table_fields');
$table_nbfields=$_REQUEST['table_nbfields'];
@@ -300,6 +302,8 @@
$table_search = (isset($_REQUEST['table_search'])) ? $_REQUEST['table_search'] : '0';
$table_comments = (isset($_REQUEST['table_comments'])) ? $_REQUEST['table_comments'] : '0';
$table_notifications = (isset($_REQUEST['table_notifications'])) ? $_REQUEST['table_notifications'] : '0';
+ $table_permissions = (isset($_REQUEST['table_permissions'])) ? $_REQUEST['table_permissions'] : '0';
+
$select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0';
//Image
@@ -329,7 +333,7 @@
if ($tablesHandler->insert($obj)) {
$table_id = $xoopsDB->getInsertId();
$obj = $tablesHandler->get($table_id);
- $form = $obj->getFormFields(false, $table_id, intval($_REQUEST['table_mid']), strtolower($_REQUEST['table_name']), strtolower($_REQUEST['table_fieldname']), $table_blocks, $table_display_admin, $table_display_user, $table_status, $table_waiting, $table_online, $table_search, $table_comments, $table_notifications, intval($_REQUEST['table_nbfields']), $select);
+ $form = $obj->getFormFields(false, $table_id, intval($_REQUEST['table_mid']), strtolower($_REQUEST['table_name']), strtolower($_REQUEST['table_fieldname']), $table_blocks, $table_display_admin, $table_display_user, $table_status, $table_waiting, $table_online, $table_search, $table_comments, $table_notifications, $table_permissions, intval($_REQUEST['table_nbfields']), $select);
}
} else {
redirect_header('tables.php', 2, _AM_TDMCREATE_TABLES_EXIST);
@@ -363,6 +367,9 @@
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=create_table', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW_CATEGORY, 'tables.php?op=create_category', 'add');
echo $adminMenu->renderButton();
+
+ $GLOBALS['xoTheme']->addStylesheet( 'modules/TDMCreate/css/style.css' );
+ $GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
// Remove unnecessary tables
$sql = "SELECT table_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE table_mid = 0";
@@ -383,14 +390,14 @@
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th align="center" width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th class="center width1">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th class="center width10">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th class="center width5">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($mod_arr) as $i)
@@ -431,7 +438,7 @@
$table_user = (($table_arr[$i]->getVar('table_user') == 1) ? _YES : _NO);
$nb_fields = $table_arr[$i]->getVar('table_nbfields');
$blocks = ($table_blocks == 1) ? _YES : _NO;
- echo '<tr class="even center">';
+ echo '<tr class="even center toggleHidden">';
echo '<td class="center">'.$i.'</b></a></td>';
echo '<td class="left"> <b>- '.$table_name.'</b></a></td>';
if(file_exists($image = $pathIcon32.'/'.$table_image)) {
@@ -443,7 +450,7 @@
echo '<td>'.$table_user.'</td>';
echo '<td>'.$blocks.'</td>';
echo '<td>'.$nb_fields.'</td>';
- echo '<td>';
+ echo '<td class="width6">';
echo '<a href="tables.php?op=edit_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_fields&table_id='.$i.'"><img src="'. $pathIcon16 .'/inserttable.png" alt="'._AM_TDMCREATE_FORMFIELDS.'" title="'._AM_TDMCREATE_FORMFIELDS.'" /></a> <a href="tables.php?op=delete_table&table_id='.$i.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
echo '</td>';
echo '</tr>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -61,7 +61,9 @@
$this->initVar('mod_user',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['display_user'], false, 1);
$this->initVar('mod_search',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_search'], false, 1);
$this->initVar('mod_comments',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_comments'], false, 1);
- $this->initVar('mod_notifications', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_notifications'], false, 1);
+ $this->initVar('mod_notifications', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_notifications'], false, 1);
+ $this->initVar('mod_permissions', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_permissions'], false, 1);
+ $this->initVar('mod_install', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['inroot_install'], false, 1);
$this->initVar('mod_donations', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['donations'], false, 50);
$this->initVar('mod_subversion', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['subversion'], false, 10);
}
@@ -112,6 +114,12 @@
$mod_notifications = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_notifications'] : $this->getVar('mod_notifications');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_NOTIFICATIONS, 'mod_notifications', $mod_notifications, _YES, _NO));
+ $mod_permissions = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_permissions'] : $this->getVar('mod_permissions');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_PERMISSIONS, 'mod_permissions', $mod_permissions, _YES, _NO));
+
+ $mod_install = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['inroot_install'] : $this->getVar('mod_install');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_INROOT_INSTALL, 'mod_install', $mod_install, _YES, _NO));
+
$mod_image = $this->getVar('mod_image') ? $this->getVar('mod_image') : 'empty.png';
$uploadirectory = '/modules/'.$xoopsModule->dirname().'/images/uploads/modules';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:43:50 UTC (rev 12205)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 02:45:08 UTC (rev 12206)
@@ -46,11 +46,12 @@
$this->initVar('table_search',XOBJ_DTYPE_INT,null,false, 1);
$this->initVar('table_comments',XOBJ_DTYPE_INT,null,false, 1);
$this->initVar('table_notifications',XOBJ_DTYPE_INT,null,false, 1);
+ $this->initVar('table_permissions',XOBJ_DTYPE_INT,null,false, 1);
}
//Formulaire de saisi de fields
- function getFormFields($action = false, $table_id, $table_mid, $table_name, $table_fieldname, $table_blocks, $table_admin, $table_user, $table_status, $table_waiting, $table_online, $table_search, $table_comments, $table_notifications, $table_nbfields, $select)
+ function getFormFields($action = false, $table_id, $table_mid, $table_name, $table_fieldname, $table_blocks, $table_admin, $table_user, $table_status, $table_waiting, $table_online, $table_search, $table_comments, $table_notifications, $table_permissions, $table_nbfields, $select)
{
global $xoopsDB, $xoopsModule, $xoopsModuleConfig;
if ($action === false) {
@@ -59,7 +60,7 @@
$class = 'even';
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_FIELDS_ADD) : sprintf(_AM_TDMCREATE_TABLES_FIELDS_EDIT);
- $table_actions = $table_mid.'&table_id='.$table_id.'&table_name='.$table_name.'&table_fieldname='.$table_fieldname.'&table_blocks='.$table_blocks.'&table_admin='.$table_admin.'&table_user='.$table_user.'&table_status='.$table_status.'&table_waiting='.$table_waiting.'&table_online='.$table_online.'&table_search='.$table_search.'&table_comments='.$table_comments.'&table_notifications='.$table_notifications.'&table_nbfields='.$table_nbfields.'&select='.$select;
+ $table_actions = $table_mid.'&table_id='.$table_id.'&table_name='.$table_name.'&table_fieldname='.$table_fieldname.'&table_blocks='.$table_blocks.'&table_admin='.$table_admin.'&table_user='.$table_user.'&table_status='.$table_status.'&table_waiting='.$table_waiting.'&table_online='.$table_online.'&table_search='.$table_search.'&table_comments='.$table_comments.'&table_notifications='.$table_notifications.'&table_permissions='.$table_permissions.'&table_nbfields='.$table_nbfields.'&select='.$select;
echo "<FORM Method='POST' Action='".$action."?op=save_table&table_mid=".$table_actions."'>
<table border='0' width='100%' cellspacing='1' class='outer'>
@@ -245,6 +246,7 @@
$table_search = $this->getVar('table_search');
$table_comments = $this->getVar('table_comments');
$table_notifications = $this->getVar('table_notifications');
+ $table_permissions = $this->getVar('table_permissions');
$select = 0;
$fields_total = explode("|", $table_fields);
@@ -296,7 +298,7 @@
$fields_param_required_field[$i] = $parameters[6];
}
}
- $table_action = $table_mid.'&table_id='.$table_id.'&table_name='.$table_name.'&table_fieldname='.$table_fieldname.'&table_blocks='.$table_blocks.'&table_display_admin='.$table_admin.'&table_display_user='.$table_user.'&table_status='.$table_status.'&table_waiting='.$table_waiting.'&table_online='.$table_online.'&table_search='.$table_search.'&table_comments='.$table_comments.'&table_notifications='.$table_notifications.'&table_nbfields='.$table_nbfields.'&select='.$select;
+ $table_action = $table_mid.'&table_id='.$table_id.'&table_name='.$table_name.'&table_fieldname='.$table_fieldname.'&table_blocks='.$table_blocks.'&table_display_admin='.$table_admin.'&table_display_user='.$table_user.'&table_status='.$table_status.'&table_waiting='.$table_waiting.'&table_online='.$table_online.'&table_search='.$table_search.'&table_comments='.$ta...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:46:57
|
Revision: 12207
http://sourceforge.net/p/xoops/svn/12207
Author: beckmi
Date: 2013-10-23 02:46:52 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 12082 (timgno: Updated to Beta 2)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/12082
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/index.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/My Module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/js/functions.js
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_helper.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_request.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/about.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -18,7 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include 'admin_header.php';
+include 'header.php';
echo $adminMenu->addNavigation('about.php');
echo $adminMenu->renderabout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -18,7 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include 'admin_header.php';
+include 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
if (isset($_REQUEST['mod_name'])) {
@@ -30,6 +30,8 @@
$mod_name = strtolower($modules->getVar('mod_name'));
$mod_author_website_name = $modules->getVar('mod_author_website_name');
$mod_author_website_url = $modules->getVar('mod_author_website_url');
+$mod_user = $modules->getVar('mod_user');
+$mod_notifications = $modules->getVar('mod_notifications');
$mod_permissions = $modules->getVar('mod_permissions');
if (isset($_REQUEST['table_name'])) {
@@ -55,7 +57,7 @@
// Effacer repertoire of nouveau module s'il existe
TDMCreate_clearDir($modPath.'/modules/'.$mod_name);
// Debut
- TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_OK, _AM_TDMCREATE_BUILDING_NOTOK);
+ TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_SUCCESS, _AM_TDMCREATE_BUILDING_FAILED);
/************************************************/
/*Structure*/
/************************************************/
@@ -64,13 +66,13 @@
//Creation of changelog.txt
const_changelog($modules);
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('mod_tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
list( $category ) = $xoopsDB->fetchRow($result);
foreach (array_keys($tables_arr) as $i)
{
// Variables
- $table_name = $tables_arr[$i]->getVar('table_name');
+ $table_name = $tables_arr[$i]->getVar('table_name');
$table_fieldname = $tables_arr[$i]->getVar('table_fieldname');
$table_category = $tables_arr[$i]->getVar('table_category');
$table_fields = $tables_arr[$i]->getVar('table_fields');
@@ -86,14 +88,14 @@
$table_waiting = $tables_arr[$i]->getVar('table_waiting');
// Fabrication
- // Copy of images tables
+ // Copy of images tables
$table_image1 = $modPath . '/images/uploads/tables/' . $table_image;
if (file_exists($table_image1)) {
copy($table_image1, $modPath . '/modules/' . $mod_name . '/images/icons/32/' . $table_image);
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $category);
+ const_class($modules, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $table_permissions, $category);
}
// Creation of pages admin
if ( $table_admin == 1 ) {
@@ -113,7 +115,7 @@
const_include_notifications($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
}
// Creation of the file mysql.sql
- const_sql($modules, $table_name, $table_fieldname, $category, $table_fields);
+ const_sql($modules, $table_name, $table_fieldname, $category, $table_fields);
// Creation of blocks
if ( $table_blocks == 1 ) {
@@ -125,8 +127,18 @@
if ( $table_permissions == 1) {
const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
}
- }
- //Creation of architecture of more fields and data
+ }
+ $table_name = isset($table_name) ? $table_name : null;
+ $table_comments = isset($table_comments) ? $table_comments : null;
+ $table_waiting = isset($table_waiting) ? $table_waiting : null;
+ $table_parameters = isset($table_parameters) ? $table_parameters : null;
+ $table_user = isset($table_user) ? $table_user : null;
+ $table_admin = isset($table_admin) ? $table_admin : null;
+ $table_fields = isset($table_fields) ? $table_fields : null;
+ $table_blocks = isset($table_blocks) ? $table_blocks : null;
+ $table_image = isset($table_image) ? $table_image : null;
+ $table_notifications = isset($table_notifications) ? $table_notifications : null;
+ //Creation of architecture of more fields and data
//const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
// Creation of comments
if ( $table_comments == 1 ) {
@@ -137,16 +149,20 @@
// Creation of Waiting Plugin
const_waiting($modules, $tables_arr);
}
+ // Creation of class helper & request
+ if ( $table_name != '' ) {
+ const_class_helper($modules);
+ const_class_request($modules);
+ }
// Creation of xoopsversion.php
- const_xoopsversion($modules, $table_name, $table_fields, $table_parameters, $tables_arr);
- if ( $table_user == 1 && $table_name != null ) {
- // Creation of template index
- const_templates_index($modules);
- // Creation of template header
- const_templates_header($modules, $tables_arr);
- // Creation of template footer
- const_templates_footer($modules, $table_comments, $table_notifications);
- }
+ const_xoopsversion($modules, $table_name, $table_fields, $table_parameters, $table_image, $tables_arr);
+ // Creation of template index
+ const_templates_index($modules);
+ // Creation of template header
+ const_templates_header($modules, $tables_arr);
+ // Creation of template footer
+ const_templates_footer($modules, $table_comments, $table_notifications);
+
if ( $table_admin == 1 ) {
// Creation of template admin about
const_templates_admin_about($modules);
@@ -163,15 +179,15 @@
const_include_install($modules, $tables_arr);
// Language
///////////////////////////////////////////////////////////////////////
- if ( $table_user == 1 ) {
+ if ( $mod_user == 1 ) {
//Creation of language main.php
const_main_language($modules, $tables_arr);
}
// Creation of language modinfo.php
- const_modinfo_language($modules, $table_name, $table_image, $tables_arr, $category);
+ const_modinfo_language($modules, $table_name, $table_image, $tables_arr, $mod_notifications);
if ( $table_admin == 1 ) {
// Creation of language admin.php
- const_admin_language($modules, $tables_arr, $category);
+ const_admin_language($modules, $tables_arr, $mod_permissions);
}
if ( $table_blocks == 1 ) {
// Creation of language blocks.php
@@ -186,19 +202,19 @@
/*Admin*/
/************************************************/
// Creation of admin header.php
- const_admin_header($modules, $tables_arr);
+ const_admin_header($modules, $table_name, $tables_arr);
// Creation of admin index.php
- const_admin_index($modules, $table_name, $tables_arr);
+ const_admin_index($modules, $tables_arr);
// Creation of admin footer.php
const_admin_footer($modules);
// Creation of admin menu.php
- const_admin_menu($modules, $tables_arr, $category);
+ const_admin_menu($modules, $tables_arr, $mod_permissions);
// Creation of admin about.php
const_admin_about($modules);
/************************************************/
/*User*/
/************************************************/
- if ( $table_user == 1 ) {
+ if ( $mod_user == 1 ) {
const_user_header($modules);
const_user_index($modules);
}
@@ -217,8 +233,8 @@
$form->addElement($mod_select, true);
$form->addElement(new XoopsFormHidden('op', 'build'));
- $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
+ $form->addElement(new XoopsFormButton(_REQUIRED.' <span class="red bold">*</span>', 'submit', _SUBMIT, 'submit'));
$form->display();
break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/trunk/TDMCreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/footer.php (rev 0)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/footer.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -0,0 +1,26 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id$
+ */
+echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+xoops_cp_footer();
\ No newline at end of file
Property changes on: XoopsModules/TDMCreate/trunk/TDMCreate/admin/footer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/TDMCreate/trunk/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/header.php (rev 0)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/header.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -0,0 +1,54 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id$
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
+include_once('../include/functions.php');
+include_once 'includes.php';
+//
+$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
+//
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+// Get class handler
+$modulesHandler =& xoops_getModuleHandler('modules', $thisDirname);
+$tablesHandler =& xoops_getModuleHandler('tables', $thisDirname);
+//
+$myts =& MyTextSanitizer::getInstance();
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+//
+$GLOBALS['xoopsTpl']->assign('pathIcon16', $pathIcon16);
+$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
+//Load languages
+xoops_loadLanguage('admin', $thisDirname);
+xoops_loadLanguage('modinfo', $thisDirname);
+xoops_loadLanguage('main', $thisDirname);
+// Locad admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Property changes on: XoopsModules/TDMCreate/trunk/TDMCreate/admin/header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -39,6 +39,8 @@
include_once $cPath.'/const_blocks.php';
include_once $cPath.'/const_blocks_templates.php';
include_once $cPath.'/const_class.php';
+include_once $cPath.'/const_class_helper.php';
+include_once $cPath.'/const_class_request.php';
include_once $cPath.'/const_admin_header.php';
include_once $cPath.'/const_admin_footer.php';
include_once $cPath.'/const_admin_menu.php';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/index.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/index.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -1,33 +1,32 @@
<?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 By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @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 'admin_header.php';
+include 'header.php';
$criteria = new CriteriaCompo();
$count_modules = $modulesHandler->getCount($criteria);
$count_tables = $tablesHandler->getCount($criteria);
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMMODULES. "</label>", $count_modules, 'Green') ;
-$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, "<label>" ._AM_TDMCREATE_THEREARE_NUMTABLES. "</label>", $count_tables, 'Orange');
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMMODULES. '</label>', $count_modules, 'Green') ;
+$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMTABLES. '</label>', $count_tables, 'Orange');
echo $adminMenu->addNavigation('index.php');
echo $adminMenu->renderIndex();
-
-include "admin_footer.php";
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -18,12 +18,12 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: modules.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include_once 'admin_header.php';
+include_once 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'list', 'string' );
echo $adminMenu->addNavigation('modules.php');
switch ($op)
{
- case "save":
+ case 'save':
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
@@ -33,28 +33,30 @@
} else {
$obj =& $modulesHandler->create();
}
- //Image
+ //Image 'gif|jpeg|pjpeg|png' 500000
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/modules/";
- $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
+ $uploaddir = XOOPS_ROOT_PATH . '/modules/'.$xoopsModule->dirname().'/images/uploads/modules/';
+ $uploader = new XoopsMediaUploader($uploaddir, xoops_getModuleOption('mimetypes', $thisDirname),
+ xoops_getModuleOption('maxsize', $thisDirname), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
- $name_img = $_REQUEST['mod_name'].'_slogo.'.$extension;
- $uploader->setTargetFileName($name_img);
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']) ;
+ $img_name = $obj->getVar('mod_name').'_slogo.'.$extension;
+ $uploader->setTargetFileName($img_name);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
$errors = $uploader->getErrors();
- redirect_header("javascript:history.go(-1)",3, $errors);
+ redirect_header('javascript:history.go(-1)', 3, $errors);
} else {
$obj->setVar('mod_image', $uploader->getSavedFileName());
}
} else {
$obj->setVar('mod_image', $_POST['mod_image']);
}
- //remove all spaces from the new name
- $obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name']));
+
+ $obj->setVar('mod_name', preg_replace('/\s+/', '', $_POST['mod_name'])); //remove all spaces from the new name
$obj->setVar('mod_version', $_POST['mod_version']);
+ $obj->setVar('mod_since', $_POST['mod_since']);
$obj->setVar('mod_min_php', $_POST['mod_min_php']);
$obj->setVar('mod_min_xoops', $_POST['mod_min_xoops']);
$obj->setVar('mod_min_admin', $_POST['mod_min_admin']);
@@ -93,18 +95,18 @@
}
break;
- case "new":
+ case 'new':
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
echo $adminMenu->renderButton();
$obj =& $modulesHandler->create();
$form = $obj->getForm();
break;
- case "edit":
+ case 'edit':
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
$form = $obj->getForm();
break;
- case "delete":
+ case 'delete':
$obj =& $modulesHandler->get($_REQUEST['mod_id']);
if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
{
@@ -121,7 +123,7 @@
xoops_confirm(array('ok' => 1, 'mod_id' => $_REQUEST['mod_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('mod_name')));
}
break;
- case "list":
+ case 'list':
default:
$adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
echo $adminMenu->renderButton();
@@ -181,4 +183,4 @@
}
break;
}
-include_once "admin_footer.php";
\ No newline at end of file
+include_once 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -18,7 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: tables.php 11084 2013-02-23 15:44:20Z timgno $
*/
-include_once 'admin_header.php';
+include_once 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
echo $adminMenu->addNavigation('tables.php');
switch ($op) {
@@ -190,7 +190,7 @@
$uploader = new XoopsMediaUploader($uploaddir, 'gif|jpeg|pjpeg|png', 104857600, null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']) ;
+ $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']);
$name_img = $_REQUEST['table_name'].'.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
@@ -247,8 +247,10 @@
break;
case "edit_table":
- $obj =& $tablesHandler->get($_REQUEST['table_id']);
- $form = $obj->getFormTable();
+ $table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0);
+ $table_mid = TDMCreate_CleanVars( $_REQUEST, 'table_mid', 0);
+ $obj =& $tablesHandler->get($table_id);
+ $form = $obj->getFormTable(false, $table_mid);
break;
case "edit_fields":
@@ -344,13 +346,14 @@
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW_CATEGORY, 'tables.php?op=create_category', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
echo $adminMenu->renderButton();
-
+
+ $table_mid = TDMCreate_CleanVars( $_REQUEST, 'table_mid', 0);
$obj =& $tablesHandler->create();
- $form = $obj->getFormTable();
+ $form = $obj->getFormTable(false, $table_mid);
break;
- case "create_category":
- $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=create_table', 'add');
+ case "create_category":
+ $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=create_table', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
echo $adminMenu->renderButton();
@@ -363,7 +366,7 @@
break;
case "table_list":
- default:
+ default:
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=create_table', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW_CATEGORY, 'tables.php?op=create_category', 'add');
echo $adminMenu->renderButton();
@@ -474,4 +477,4 @@
}
break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -25,11 +25,13 @@
$file = 'about.php';
$tdmcreate_path = TDM_CREATE_MURL.'/'.$mod_name.'/admin/'.$file;
$root_path = XOOPS_URL.'/modules/'.$mod_name.'/admin/'.$file;
- $text = '<?php'.const_header($modules, $file).'
-include \'header.php\';
-echo $adminMenu->addNavigation(\'about.php\');
-echo $adminMenu->renderabout(\''.$modules->getVar('mod_donations').'\', false);
-include \'footer.php\';';
+ $text = '<?php'.const_header($modules, $file);
+$text .= <<<EOT
+\ninclude 'header.php';
+echo \$adminMenu->addNavigation('about.php');
+echo \$adminMenu->renderAbout('{$modules->getVar('mod_donations')}', false);
+include 'footer.php';
+EOT;
createFile( $tdmcreate_path, $text,
_AM_TDMCREATE_CONST_OK_ADMINS,
_AM_TDMCREATE_CONST_NOTOK_ADMINS, $file);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php 2013-10-23 02:45:08 UTC (rev 12206)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php 2013-10-23 02:46:52 UTC (rev 12207)
@@ -27,16 +27,15 @@
$file = 'footer.php';
$tdmcreate_path = TDM_CREATE_MURL.'/...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:47:42
|
Revision: 12208
http://sourceforge.net/p/xoops/svn/12208
Author: beckmi
Date: 2013-10-23 02:47:39 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 12105 (timgno: Updated)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/12105
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -104,12 +104,16 @@
// Creation of pages and templates user
if ( $table_user == 1 && $table_name != null ) {
const_user_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- const_templates_pages($modules, $table_name, $table_fieldname, $table_fields);
+ const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
}
// Creation of search
if ( $table_search == 1 ) {
const_include_search($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
- }
+ }
+ // Creation of admin permissions.php
+ if ( $table_permissions == 1) {
+ const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
+ }
// Creation of notifications
if ( $table_notifications == 1 ) {
const_include_notifications($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
@@ -122,11 +126,7 @@
const_blocks($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
//Creation of template per blocks
const_blocks_templates($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- }
- // Creation of admin permissions.php
- if ( $table_permissions == 1) {
- const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
- }
+ }
}
$table_name = isset($table_name) ? $table_name : null;
$table_comments = isset($table_comments) ? $table_comments : null;
@@ -137,14 +137,15 @@
$table_fields = isset($table_fields) ? $table_fields : null;
$table_blocks = isset($table_blocks) ? $table_blocks : null;
$table_image = isset($table_image) ? $table_image : null;
+ $table_permissions = isset($table_permissions) ? $table_permissions : null;
$table_notifications = isset($table_notifications) ? $table_notifications : null;
//Creation of architecture of more fields and data
//const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
// Creation of comments
if ( $table_comments == 1 ) {
const_include_comments($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- }
-
+ }
+
if ( $table_waiting == 1 ) {
// Creation of Waiting Plugin
const_waiting($modules, $tables_arr);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -20,6 +20,7 @@
*/
include_once 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+$table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0 );
echo $adminMenu->addNavigation('tables.php');
switch ($op) {
case 'save_table':
@@ -357,7 +358,7 @@
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
echo $adminMenu->renderButton();
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE table_name = 'categories'");
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_name = 'categories'");
list( $category ) = $xoopsDB->fetchRow($result);
$obj =& $tablesHandler->get($_REQUEST['table_id']);
if ( $category >= 0 ) {
@@ -375,19 +376,24 @@
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
// Remove unnecessary tables
- $sql = "SELECT table_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE table_mid = 0";
+ /*$sql = "SELECT table_id FROM ".$xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_mid = 0";
$result = $xoopsDB->queryF($sql);
while ( $myrow = $xoopsDB->fetchArray($result) )
{
- $sql_del = "DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE table_id = ".$myrow['table_id']."";
+ $sql_del = "DELETE FROM ".$xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_id = ".$myrow['table_id']."";
$xoopsDB->queryF($sql_del);
+ }*/
+ $obj =& $tablesHandler->get($table_id);
+ if ($tablesHandler->deleteAll($obj)) {
+ redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK);
}
$criteria = new CriteriaCompo();
+ $criteria->add( new Criteria('mod_id', 0, '!=') );
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
- $mod_arr = $modulesHandler->getall($criteria);
- $numrows_modules = $modulesHandler->getCount();
+ $mod_arr = $modulesHandler->getAll($criteria);
+ $numrows_modules = $modulesHandler->getCount($criteria);
if ( $numrows_modules > 0 )
{
@@ -472,7 +478,7 @@
echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
- echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '<tr><td class="errorMsg" colspan="8">There are no modules</td></tr>';
echo '</tr></table><br><br>';
}
break;
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -88,7 +88,7 @@
\$numrows = \${$table_name}Handler->getCount();
\${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
if ( $table_category != 1 )
{
$text .= <<<EOT
@@ -110,7 +110,7 @@
echo "<tr class='".\$class."'>";
\$class = (\$class == "even") ? "odd" : "even";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
$text .= $fields_data;
$text .= <<<EOT
@@ -148,7 +148,7 @@
\$cat_weight = \$categories_arr[\$i]->getVar('cat_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
$text .= <<<EOT
\n\t\t\t\t\techo "<td class='center width5'>
<a href='{$table_name}.php?op=edit&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
@@ -175,7 +175,7 @@
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
@@ -192,7 +192,7 @@
\$category_weight = \${$table_name}_arr[\$i]->getVar('{$table_fieldname}_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, 1, 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, 1, 1);
$text .= $fields_data;
$text .= <<<EOT
@@ -220,7 +220,7 @@
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
@@ -252,7 +252,7 @@
\$obj =& \${$table_name}Handler->create();
}
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 2);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 2);
$text .= <<<EOT
\n\t\tif (\${$table_name}Handler->insert(\$obj)) {
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -168,7 +168,6 @@
}
}
EOT;
-
createFile( $tdmcreate_path, $text,
_AM_TDMCREATE_CONST_OK_CLASSES,
_AM_TDMCREATE_CONST_NOTOK_CLASSES, $file);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -22,7 +22,8 @@
{
$mod_name = $module->getVar('mod_name');
$mod_version = $module->getVar('mod_version');
- $mod_min_xoops = $module->getVar('mod_min_xoops');
+ $mod_since = $module->getVar('mod_since');
+ //$mod_min_xoops = $module->getVar('mod_min_xoops');
$mod_author = $module->getVar('mod_author');
$mod_credits = $module->getVar('mod_credits');
$mod_a_m = $module->getVar('mod_author_mail');
@@ -47,11 +48,10 @@
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license {$mod_license}
* @package {$mod_name}
- * @since {$mod_min_xoops}
+ * @since {$mod_since}
* @author {$mod_author} <{$mod_a_m}> - <{$mod_a_w_url}>
* @version \$Id: {$mod_version} {$filename} {$mod_subversion} {$date}Z {$mod_credits} \$
*/
-EOT
-;
+EOT;
return $text;
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -19,7 +19,7 @@
* @version $Id: const_templates_pages.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php';
-function const_templates_pages($modules, $table_name, $table_fieldname, $table_fields)
+function const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters)
{
$mod_name = $modules->getVar('mod_name');
$language = '_MA_'.strtoupper($mod_name).'_';
@@ -29,32 +29,64 @@
//fields
$fields = explode('|', $table_fields);
$nb_fields = count($fields);
+ //parameters
+ $parameters_total = explode('|', $table_parameters);
+ //Recuperation des parameters affichage dans le formulaire
+ for($i=0; $i<$nb_fields; $i++)
+ {
+ $fields_list = explode(':', $fields[$i]);
+ //$fields[$i] = $fields1[0];
+ //Afficher dans les elements du formulaire et choisir le type
+ if( $i == 0 ) {
+ $fpe[$i] = '0';
+ $fpdf[$i] = '0';
+ $fpif = $fields_list[0]; // fpif = fields parameters auto_increment field
+ } else {
+ $param = explode(':', $parameters_total[$i-1]);
+ //print_r($param);
+ $fpdf[$i] = $param[3]; // fpdf = fields parameters display form
+ $fpe[$i] = $param[0]; // fpe = fields parameters elements
+ $fprf[$i] = $param[6]; // fprf = fields parameters required field
+ if ( $param[4] == 1 ) {
+ $fpmf = $fields_list[0]; // fpmf = fields parameters main field
+ }
+ }
+ }
+
$text = '<{include file="db:'.$mod_name.'_header.html"}>';
if($table_name != null)
{
$text .= '
<div class="outer">
- <table class="'.$mod_name.'" cellpadding="0" cellspacing="0" width="100%">
+ <table class="'.$table_name.'" cellpadding="0" cellspacing="0" width="100%">
<tr class="head">
';
for ($i = 0; $i < $nb_fields; $i++)
{
$structure_fields = explode(':', $fields[$i]);
-$text .= ' <th class="fields"><{$smarty.const.'.$language.strtoupper($structure_fields[0]).'}></th>
- ';
+$text .= ' <th class="center"><{$smarty.const.'.$language.strtoupper($structure_fields[0]).'}></th>
+ ';
}
$text .= '</tr>
<{foreach item='.$table_fieldname.' from=$'.$table_name.'}>
- <tr class="<{cycle values=\'odd, even\'}>">
-';
+ <tr class="<{cycle values=\'odd, even\'}>">
+ ';
for ($i = 0; $i < $nb_fields; $i++)
{
- $structure_fields = explode(':', $fields[$i]);
-$text .= ' <td class="fields"><{$'.$table_fieldname.'.'.$structure_fields[0].'}></td>
- ';
+ $structure_fields = explode(':', $fields[$i]);
+ if( $fpe[$i] == 'XoopsFormUploadImage' ) {
+$text .= ' <td class="center"><img src="<{$xoops_url}>/uploads/'.$mod_name.'/images/'.$table_name.'/<{$'.$table_fieldname.'.'.$structure_fields[0].'}>" alt="'.$table_name.'"></td>
+ ';
+ } else if( $fpe[$i] == 'XoopsFormColorPicker' ) {
+$text .= ' <td class="center"><span style="background-color: <{$'.$table_fieldname.'.'.$structure_fields[0].'}>;"> </span></td>
+ ';
+ } else {
+$text .= ' <td class="center"><{$'.$table_fieldname.'.'.$structure_fields[0].'}></td>
+ ';
+ }
}
-$text .= ' </tr>
+$text .= '</tr>
<{/foreach}>
</table>
</div>';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php 2013-10-23 02:46:52 UTC (rev 12207)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php 2013-10-23 02:47:39 UTC (rev 12208)
@@ -185,10 +185,10 @@
for ($i=0; $i < $j; $i++)
{
if ( $i != $j - 1 ) {
- $key .= ''.$comma[$i].',
+ $key .= $comma[$i].',
';
} else {
- $key .= ''.$comma[$i].'
+ $key .= $comma[$i].'
';
}
}
@@ -200,10 +200,10 @@
}
//
-function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpda, $fields_param_type, $lng, $prefix = '', $option = 0)
+function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpda, $fpt, $fpmf, $lng, $prefix = '', $option = 0)
{
$text = '';
-
+
if ( $option == 0 ) {
// Name column of the table
for($i = 0; $i < $nb_fields; $i++)
@@ -230,53 +230,51 @@
} else {
echo "<td class=\'center\'><a href=\'./'.$table_name.'.php?op=update_online&'.$fields_id.'=".$'.$table_name.'_arr[$i]->getVar("'.$fields_id.'")."&'.$table_fieldname.'_online=1\'><img src=".$pathIcon16."/off.png border=\'0\' alt=\'"._OFF."\' title=\'"._OFF."\'></a></td>";
}'; }
- } else if ( $fields[$i] == $table_fieldname.'_title' ) {
+ } else if ( $fields[$i] == $fpmf ) {
if ( $prefix != '' ) {
$text .= 'echo "<td class=\'left\'> ".$prefix." ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
} else {
$text .= 'echo "<td class=\'left\'><img src=\'".'.strtoupper($mod_name).'_URL."/images/icons/16/arrow.gif\'> ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- }
-
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadImage' ) {
- $text .= '$'.$table_fieldname.'_image = $'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\');
- if(file_exists($image = XOOPS_UPLOAD_URL."/'.$mod_name.'/images/'.$table_name.'/".$'.$table_fieldname.'_image)) {
- echo "<td class=\'center\'><img src=\'".$image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
- } else {
- echo "<td class=\'center\'><img src=\'../images/'.$table_name.'/".$'.$table_fieldname.'_image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
}
+ } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
+ $text .= '$image = XOOPS_UPLOAD_URL."/'.$mod_name.'/images/'.$table_name.'/".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\');
+ echo "<td class=\'center\'><img src=\'".$image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadFile' )
+ } else if ( $fpt[$i] == 'XoopsFormUploadFile' )
{
$text .= 'echo "<td class=\'center\'>".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormColorPicker' )
+ } else if ( $fpt[$i] == 'XoopsFormColorPicker' )
{
$text .= 'echo "<td class=\'center\'><span style=\'background-color:".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."\'> </span> -> ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormTextDateSelect' )
+ } else if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
{
$text .= 'echo "<td class=\'center\'>".formatTimeStamp($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormCategory' )
+ } else if ( $fpt[$i] == 'XoopsFormCategory' )
{
$text .= '$'.$table_fieldname.'1 = $categoriesHandler->get($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'));
$'.$table_fieldname.'_categories1 = $'.$table_fieldname.'1->getVar(\''.$table_fieldname.'_title\');
echo "<td class=\'center\'>".$'.$table_fieldname.'_categories1."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormSelectUser' )
+ } else if ( $fpt[$i] == 'XoopsFormSelectUser' )
{
$text .= 'echo "<td class=\'center\'>".XoopsUser::getUnameFromId($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormText' || $fields_param_type[$i] == 'XoopsFormDhtmlTextArea' || $fields_param_type[$i] == 'XoopsFormTextArea' ) {
+ } else if ( $fpt[$i] == 'XoopsFormText' ) {
+ $text .= 'echo "<td class=\'center\'>".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
+ ';
+ } else if ( $fpt[$i] == 'XoopsFormDhtmlTextArea' || $fpt[$i] == 'XoopsFormTextArea' ) {
$text .= 'echo "<td class=\'center\'>".strip_tags($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'))."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormCheckBox' || $fields_param_type[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
$text .= 'echo "<td class=\'center\'>".( ($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\') == 1 ) ? _YES : _NO)."</td>";
';
} else {
- $data = explode("-", $fields_param_type[$i]);
+ $data = explode("-", $fpt[$i]);
// Handler select table
$tablesHandler =& xoops_getModuleHandler('tables', 'TDMCreate');
$criteria = new CriteriaCompo();
@@ -289,21 +287,21 @@
$tables_select_parameters = $tables_select_arr[$k]->getVar('table_parameters');
// Fields
- $fields_total_select = explode("|", $tables_select_fields);
+ $fields_total_select = explode('|', $tables_select_fields);
$nb_fields_select = count($fields_total_select);
// Parameters
- $parameters_total_select = explode("|", $tables_select_parameters);
+ $parameters_total_select = explode('|', $tables_select_parameters);
// Recovery fields names
for($l = 0; $l < $nb_fields_select; $l++)
{
// Fields names
- $fields_select1 = explode(":", $fields_total_select[$l]);
+ $fields_select1 = explode(':', $fields_total_select[$l]);
$fields_select[$l] = $fields_select1[0];
// Show in admin
if( $l != 0 ) {
- $parameters_select = explode(":", $parameters_total_select[$l-1]);
+ $parameters_select = explode(':', $parameters_total_select[$l-1]);
if ( $parameters_select[4] == 1 ) {
$fields_param_main_field = $fields_select1[0];
}
@@ -326,14 +324,14 @@
{
if ( $i != 0 )
{
- if ( $fields_param_type[$i] == 'XoopsFormTextDateSelect' )
+ if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
{
$text .= '
$obj->setVar(\''.$fields[$i].'\', strtotime($_REQUEST[\''.$fields[$i].'\']));';
- } else if ( $fields_param_type[$i] == 'XoopsFormCheckBox' || $fields_param_type[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
$text .= '
$obj->setVar(\''.$fields[$i].'\', (($_REQUEST[\''.$fields[$i].'\'] == 1) ? \'1\' : \'0\'));';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadImage' ) {
+ } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
@@ -353,7 +351,7 @@
$obj->setVar(\''.$fields[$i].'\', $_REQUEST[\''.$fields[$i].'\']);
}
';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadFile' ) {
+ } else if ( $fpt[$i] == 'XoopsFormUploadFile' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
$uploaddir = XOOPS_UPLOAD_PATH.\'/'.$mod_name.'/files/'.$table_name.'/\';
@@ -500,6 +498,7 @@
break;
case "default":
+ case "XoopsFormTables-".$table_name:
default:
$data = explode('-', $fpe[$i]);
$text .= '// '.ucfirst($struct0).'
@@ -513,16 +512,17 @@
return $text;
}
-function search_field($fields_param_search_field, $options)
+function search_field($fpsf, $options)
{
- $nb_fields_param_search_field = count($fields_param_search_field);
+ // fpsf = fields parameters search field
+ $nb_fpsf = count($fpsf);
$sql = '(';
- for($l=0; $l<$nb_fields_param_search_field; $l++)
+ for($l=0; $l<$nb_fpsf; $l++)
{
- if ( $l != $nb_fields_param_search_field - 1 ) {
- $sql .= ''.$fields_param_search_field[$l].' LIKE \'%$queryarray['.$options.']%\' OR ';
+ if ( $l != $nb_fpsf - 1 ) {
+ $sql .= ''.$fpsf[$l].' LIKE \'%$queryarray['.$options.']%\' OR ';
} else {
- $sql .= ''.$fields_param_search_field[$l].' LIKE \'%$queryarray[0]%\'';
+ $sql .= ''.$fpsf[$l].' LIKE \'%$queryarray[0]%\'';
}
}
$sql .= ')';
|
|
From: <be...@us...> - 2013-10-23 02:49:16
|
Revision: 12209
http://sourceforge.net/p/xoops/svn/12209
Author: beckmi
Date: 2013-10-23 02:49:09 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 12173 (timgno: Updated, Added more files, Fixed bugs for edit and save table_fields, Deleted unnecessary file)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/12173
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_helper.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
Added Paths:
-----------
XoopsModules/TDMCreate/trunk/TDMCreate/class/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/structure.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_module.php
XoopsModules/TDMCreate/trunk/TDMCreate/include/common.php
Removed Paths:
-------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/constArch.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/images/32/
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Hotel_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/My Module_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/MyShop_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Real Estate_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Shopper_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/Shopping_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/album_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/ams_slogo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/module1_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/moduleimport_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/realestate_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/travel_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/txmLinks_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/modules/txmrestaurant_logo.png
XoopsModules/TDMCreate/trunk/TDMCreate/images/uploads/tables/cat.png
Deleted: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_footer.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -1,26 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: admin_footer.php 11084 2013-02-23 15:44:20Z timgno $
- */
-echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
- <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
-echo "<div class='center smallsmall italic pad5'>
- <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
- <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
-xoops_cp_footer();
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/admin_header.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -1,55 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.0
- * @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: admin_header.php 11084 2013-02-23 15:44:20Z timgno $
- */
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-include_once('../include/functions.php');
-include_once 'includes.php';
-//
-$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
-//
-$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
-$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
-$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
-// Get class handler
-$modulesHandler =& xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate');
-$tablesHandler =& xoops_getModuleHandler('tdmcreate_tables', 'TDMCreate');
-//
-$myts =& MyTextSanitizer::getInstance();
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
-}
-//
-$xoopsTpl->assign('pathIcon16', $pathIcon16);
-$xoopsTpl->assign('pathIcon32', $pathIcon32);
-//Load languages
-xoops_loadLanguage('admin', $thisDirname);
-xoops_loadLanguage('modinfo', $thisDirname);
-xoops_loadLanguage('main', $thisDirname);
-// Locad admin menu class
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
-}else{
- redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
-}
-xoops_cp_header();
-$adminMenu = new ModuleAdmin();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -55,7 +55,7 @@
switch ($op) {
case 'build':
// Effacer repertoire of nouveau module s'il existe
- TDMCreate_clearDir($modPath.'/modules/'.$mod_name);
+ TDMCreate_clearDir($modPath.'/modules/'.strtolower($mod_name));
// Debut
TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_SUCCESS, _AM_TDMCREATE_BUILDING_FAILED);
/************************************************/
@@ -66,7 +66,7 @@
//Creation of changelog.txt
const_changelog($modules);
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('mod_tdmcreate_tables') . " WHERE table_name = 'mod_".$mod_name."_categories'");
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix('mod_tdmcreate_tables') . " WHERE table_name = 'mod_".strtolower($mod_name)."_categories'");
list( $category ) = $xoopsDB->fetchRow($result);
foreach (array_keys($tables_arr) as $i)
@@ -91,11 +91,11 @@
// Copy of images tables
$table_image1 = $modPath . '/images/uploads/tables/' . $table_image;
if (file_exists($table_image1)) {
- copy($table_image1, $modPath . '/modules/' . $mod_name . '/images/icons/32/' . $table_image);
+ copy($table_image1, $modPath . '/modules/' . strtolower($mod_name) . '/images/icons/32/' . $table_image);
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $table_name, $table_fieldname, $category, $table_fields, $table_parameters, $table_permissions, $category);
+ const_class($modules, $table_name, $table_fieldname, $table_category, $table_fields, $table_parameters, $table_permissions);
}
// Creation of pages admin
if ( $table_admin == 1 ) {
@@ -150,9 +150,10 @@
// Creation of Waiting Plugin
const_waiting($modules, $tables_arr);
}
- // Creation of class helper & request
+ // Creation of class helper, module & request
if ( $table_name != '' ) {
const_class_helper($modules);
+ const_class_module($modules);
const_class_request($modules);
}
// Creation of xoopsversion.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/includes.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -41,6 +41,7 @@
include_once $cPath.'/const_class.php';
include_once $cPath.'/const_class_helper.php';
include_once $cPath.'/const_class_request.php';
+include_once $cPath.'/const_class_module.php';
include_once $cPath.'/const_admin_header.php';
include_once $cPath.'/const_admin_footer.php';
include_once $cPath.'/const_admin_menu.php';
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -160,9 +160,8 @@
$obj->setVar('table_fields', $table_fields);
$obj->setVar('table_parameters', $table_parameters);
- if ($tablesHandler->insert($obj))
- {
- redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
+ if ($tablesHandler->insert($obj)) {
+ redirect_header('tables.php', 2, _AM_TDMCREATE_FORMOK);
}
break;
@@ -248,10 +247,8 @@
break;
case "edit_table":
- $table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0);
- $table_mid = TDMCreate_CleanVars( $_REQUEST, 'table_mid', 0);
- $obj =& $tablesHandler->get($table_id);
- $form = $obj->getFormTable(false, $table_mid);
+ $obj =& $tablesHandler->get($_REQUEST['table_id']);
+ $form = $obj->getFormTable(false, $_REQUEST['table_mid']);
break;
case "edit_fields":
Deleted: XoopsModules/TDMCreate/trunk/TDMCreate/class/constArch.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/constArch.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/constArch.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -1,65 +0,0 @@
-/**
- * ****************************************************************************
- * - TXModCreate By TXMod Xoops - TEAM XOOPS MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.txmodxoops.org)
- *
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TXMod Xoops GPL license
- * @author TXMod Xoops MODULE
- *
- * ****************************************************************************
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class constArch {
- /**
- *
- */
- var $module_name;
- /**
- *
- */
- var $type = null;
- /**
- *
- */
- var $path = null;
- /**
- *
- */
- var $indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/include/index.html";
- /**
- *
- */
- function __construct(){
-
- }
-
- function constArch($path, $module_name, $type, $folder)
- {
- $this->path = $path;
- $this->module_name = $module_name;
- $this->type = $type;
- $this->folder = $folder;
- }
-
- function makeDir($path, $module_name, $folder)
- {
- $path = XOOPS_ROOT_PATH."/modules/TDMCreate/modules/".$modules_name."/".$folder;
- if(!is_dir($path))
- mkdir($path, 0705);
- chmod($path, 0705);
- copy($this->indexFile, XOOPS_ROOT_PATH."/modules/TDMCreate/modules/".$modules_name."/".$folder."/index.html");
- }
-
-}
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php 2013-10-23 02:47:39 UTC (rev 12208)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/constArchitecture.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -1,132 +0,0 @@
-<?php
-/**
- * ****************************************************************************
- * - TXModCreate By TXMod Xoops - TEAM DEV MODULE & THEMES FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.txmodxoops.org)
- *
- * This license contains restrictions...!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TXMod Xoops GPL license
- * @author TXMod Xoops MODULE
- *
- * @Version 2.0.1 $Id Timgno <in...@tx...>
- * ****************************************************************************
- */
-if (!defined('XOOPS_ROOT_PATH')) {
- die('XOOPS root path not defined');
-}
-
-class constArchitecture {
- /*
- *
- *
- */
- var $module_name = '';
- /*
- *
- *
- */
- var $folder_name = null;
- /*
- *
- *
- */
- var $file_name = null;
- /*
- *
- *
- */
- var $path = null;
- /*
- *
- *
- */
- var $copieFile;
- /*
- * @pubblic function constructor class
- * @param string $path
- */
- function __construct($path) {
- $this->path = $path;
- }
- /*
- * @pubblic function class
- * @param string $path
- */
- function constArchitecture($path)
- {
- $this->__construct($path);
- }
- /*
- * @pubblic function makeDir
- * @param string $path
- */
- function makeDir($path)
- {
- $this->path = $path;
- if(!is_dir($this->path)) {
- mkdir($this->path, 0755);
- chmod($this->path, 0755);
- }
- }
- /*
- * @pubblic function makeDirModule
- * @param string $folder_name
- */
- function makeDirInModule($folder_name)
- {
- $this->folder_name = $folder_name;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
- if(!is_dir($fname)) {
- mkdir($fname, 0755);
- chmod($fname, 0755);
- }
- }
- /*
- * @pubblic function makeDir & copy file
- * @param string $folder_name
- * @param string $copieFile
- * @param string $file
- */
- function makeDirAndCopyFile($folder_name, $copieFile, $file)
- {
- $this->file_name = $file;
- $this->folder_name = $folder_name;
- $this->copieFile = $copieFile;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name;
- if(!is_dir($fname)) {
- mkdir($fname, 0755);
- chmod($fname, 0755);
- $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
- } else {
- $this->copyFile($this->folder_name, $this->copieFile, $this->file_name);
- }
- }
- /*
- * @pubblic function copy file
- * @param string $folder_name
- * @param string $copieFile
- * @param string $file
- */
- function copyFile($folder_name, $copieFile, $file)
- {
- $this->file_name = $file;
- $this->folder_name = $folder_name;
- $this->copieFile = $copieFile;
- $fname = $this->path . "/" .$this->module_name. "/" .$this->folder_name. "/". $this->file_name;
- /*if(!file_exists($fname)) {
- chmod($fname, 0777);
- copy($this->copieFile, $fname);
- } else {*/
- copy($this->copieFile, $fname);
- //}
- }
-}
-?>
\ No newline at end of file
Added: XoopsModules/TDMCreate/trunk/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/modules.php (rev 0)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/modules.php 2013-10-23 02:49:09 UTC (rev 12209)
@@ -0,0 +1,269 @@
+<?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.
+ */
+
+/**
+ * Xoops Javascript class
+ *
+ * @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 media
+ * @since 2.5.x
+ * @author TDM TEAM DEV MODULE
+ * @version $Id$ modules.php 11114 2013-02-13 10:22:12Z timgno $
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+//include_once 'iconGenerator.php';
+
+class TDMCreateModules extends XoopsObject
+{
+ // constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('mod_id',XOBJ_DTYPE_INT, 0);
+ $this->initVar('mod_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['name']);
+ $this->initVar('mod_version',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['version']);
+ $this->initVar('mod_since',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['since']);
+ $this->initVar('mod_min_php',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_php']);
+ $this->initVar('mod_min_xoops',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_xoops']);
+ $this->initVar('mod_min_admin',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_admin']);
+ $this->initVar('mod_min_mysql',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['min_mysql']);
+ $this->initVar('mod_description',XOBJ_DTYPE_TXTAREA, $GLOBALS['xoopsModuleConfig']['description']);
+ $this->initVar('mod_author',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author']);
+ $this->initVar('mod_author_mail',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_email']);
+ $this->initVar('mod_author_website_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_url']);
+ $this->initVar('mod_author_website_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['author_website_name']);
+ $this->initVar('mod_credits',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['credits']);
+ $this->initVar('mod_license',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['license']);
+ $this->initVar('mod_release_info',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_info']);
+ $this->initVar('mod_release_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_file']);
+ $this->initVar('mod_manual',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual']);
+ $this->initVar('mod_manual_file',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['manual_file']);
+ $this->initVar('mod_image',XOBJ_DTYPE_TXTBOX, null);
+ $this->initVar('mod_demo_site_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['demo_site_url']);
+ $this->initVar('mod_demo_site_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['demo_site_name']);
+ $this->initVar('mod_support_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['support_url']);
+ $this->initVar('mod_support_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['support_name']);
+ $this->initVar('mod_website_url',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['website_url']);
+ $this->initVar('mod_website_name',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['website_name']);
+ $this->initVar('mod_release',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['release_date']);
+ $this->initVar('mod_status',XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['status']);
+ $this->initVar('mod_admin',XOBJ_DTYPE_INT,$GLOBALS['xoopsModuleConfig']['display_admin']);
+ $this->initVar('mod_user',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['display_user']);
+ $this->initVar('mod_search',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_search']);
+ $this->initVar('mod_comments',XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_comments']);
+ $this->initVar('mod_notifications', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_notifications']);
+ $this->initVar('mod_permissions', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['active_permissions']);
+ $this->initVar('mod_install', XOBJ_DTYPE_INT, $GLOBALS['xoopsModuleConfig']['inroot_install']);
+ $this->initVar('mod_donations', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['donations']);
+ $this->initVar('mod_subversion', XOBJ_DTYPE_TXTBOX, $GLOBALS['xoopsModuleConfig']['subversion']);
+ }
+
+ function getForm($action = false)
+ {
+ global $xoopsModule, $pathIcon32;
+
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+ $title = $this->isNew() ? sprintf(_AM_TDMCREATE_MODULES_ADD) : sprintf(_AM_TDMCREATE_MODULES_EDIT);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+
+ $form = new XoopsThemeForm($title, 'modulesform', $action, 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+
+ $form->insertBreak('<div class="center"><b>'._AM_TDMCREATE_MODULES_IMPORTANT.'</b></div>','head');
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'mod_name', 50, 255, $this->getVar('mod_name')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'mod_version', 10, 25, $this->getVar('mod_version')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SINCE, 'mod_since', 10, 25, $this->getVar('mod_since')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_PHP, 'mod_min_php', 10, 25, $this->getVar('mod_min_php')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_XOOPS, 'mod_min_xoops', 10, 25, $this->getVar('mod_min_xoops')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_ADMIN, 'mod_min_admin', 10, 25, $this->getVar('mod_min_admin')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MIN_MYSQL, 'mod_min_mysql', 10, 25, $this->getVar('mod_min_mysql')), true);
+ // Name description
+ $editor_configs=array();
+ $editor_configs['name'] = 'mod_description';
+ $editor_configs['value'] = $this->getVar('mod_description', 'e');
+ $editor_configs['rows'] = 5;
+ $editor_configs['cols'] = 100;
+ $editor_configs['width'] = '50%';
+ $editor_configs['height'] = '100px';
+ $editor_configs['editor'] = $GLOBALS['xoopsModuleConfig']['tdmcreate_editor'];
+ $form->addElement( new XoopsFormEditor(_AM_TDMCREATE_MODULES_DESCRIPTION, 'mod_description', $editor_configs), true);
+ // Author
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR, 'mod_author', 50, 255, $this->getVar('mod_author')), true);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_LICENSE, 'mod_license', 50, 255, $this->getVar('mod_license')), true);
+ $mod_admin = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['display_admin'] : $this->getVar('mod_admin');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_ADMIN, 'mod_admin', $mod_admin, _YES, _NO));
+ $mod_user = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['display_user'] : $this->getVar('mod_user');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_USER, 'mod_user', $mod_user, _YES, _NO));
+ $mod_search = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_search'] : $this->getVar('mod_search');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_SEARCH, 'mod_search', $mod_search, _YES, _NO));
+ $mod_comments = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_comments'] : $this->getVar('mod_comments');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS, 'mod_comments', $mod_comments, _YES, _NO));
+
+ $mod_notifications = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_notifications'] : $this->getVar('mod_notifications');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_NOTIFICATIONS, 'mod_notifications', $mod_notifications, _YES, _NO));
+
+ $mod_permissions = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['active_permissions'] : $this->getVar('mod_permissions');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_PERMISSIONS, 'mod_permissions', $mod_permissions, _YES, _NO));
+
+ $mod_install = $this->isNew() ? $GLOBALS['xoopsModuleConfig']['inroot_install'] : $this->getVar('mod_install');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_INROOT_INSTALL, 'mod_install', $mod_install, _YES, _NO));
+
+ $mod_image = $this->getVar('mod_image') ? $this->getVar('mod_image') : 'empty.png';
+
+ $uploadirectory = '/modules/'.$xoopsModule->dirname().'/images/uploads/modules';
+ $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE, '<br />');
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './modules/' . $xoopsModule->dirname() . '/images/uploads/modules');
+ $imageselect= new XoopsFormSelect($imgpath, 'mod_image', $mod_image);
+ $mod_image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . $uploadirectory );
+ foreach( $mod_image_array as $image ) {
+ $imageselect->addOption("$image", $image);
+ }
+ $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"mod_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" );
+ $imgtray->addElement($imageselect);
+ $imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $mod_image . "' name='image3' id='image3' alt='' />" ) );
+
+ $fileseltray = new XoopsFormElementTray('', '<br />');
+ $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $GLOBALS['xoopsModuleConfig']['maxsize']));
+ $fileseltray->addElement(new XoopsFormLabel(''));
+ $imgtray->addElement($fileseltray);
+ $form->addElement($imgtray);
+
+//---------- START -----------------
+ ?>
+
+ <script type="text/javascript">
+
+ function showImgSelected2(imgId, selectId, imgDir, extra, xoopsUrl) {
+ if (xoopsUrl == null) {
+ xoopsUrl = "./";
+ }
+ imgDom = xoopsGetElementById(imgId);
+ selectDom = xoopsGetElementById(selectId);
+ if (selectDom.options[selectDom.selectedIndex].value != "") {
+ imgDom.src = xoopsUrl + imgDir + "/" + selectDom.options[selectDom.selectedIndex].value + extra;
+ } else {
+ imgDom.src = xoopsUrl + "/modules/TDMCreate/images/uploads/modules/blank.gif";
+ }
+ }
+
+ function createNewModuleLogo(xoopsUrl) { // this is JavaScript function
+
+ iconDom = xoopsGetElementById(image4);
+ iconName = iconDom.src;
+ caption = xoopsGetElementById(mod_name).value;
+ logoDom = xoopsGetElementById(image3);
+ moduleImageDom=xoopsGetElementById(mod_image);
+ moduleImageSelected=moduleImageDom.options[moduleImageDom.selectedIndex].value;
+ $.ajax({
+ type:'GET',
+ url:xoopsUrl + "/modules/TDMCreate/class/logoGenerator.php?f=phpFunction&iconName=" + iconName + "&caption=" + caption,
+ // call php function , phpFunction=function Name , x= parameter
+ data:{},
+ dataType:"html",
+ success:function (data1) {
+ //alert(data1);
+ logoDom.src = data1.split('\n')[0];//the data returned has too many lines...
[truncated message content] |
|
From: <be...@us...> - 2013-10-23 02:50:11
|
Revision: 12210
http://sourceforge.net/p/xoops/svn/12210
Author: beckmi
Date: 2013-10-23 02:50:09 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 12174 (timgno: Fixed bugs)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/12174
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/class/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tables.php 2013-10-23 02:49:09 UTC (rev 12209)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tables.php 2013-10-23 02:50:09 UTC (rev 12210)
@@ -672,7 +672,7 @@
$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
if ($action === false) {
- $action = $this->isNew() ? TDMC_URL.'/admin/tables.php?op=create_table&table_mid='.$table_mid : $_SERVER['REQUEST_URI'];
+ $action = $_SERVER['REQUEST_URI'];
$sending = $this->isNew() ? 'table_fields' : 'table_save_fields';
}
$title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_ADD) : sprintf(_AM_TDMCREATE_TABLES_EDIT);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php 2013-10-23 02:49:09 UTC (rev 12209)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php 2013-10-23 02:50:09 UTC (rev 12210)
@@ -213,8 +213,8 @@
define('_AM_TDMCREATE_TABLES_WAITING', "Show Table Waiting");
//1.39
-define('_AM_TDMCREATE_MODULES_MIN_PHP', "Minimum Php");
-define('_AM_TDMCREATE_MODULES_MIN_XOOPS', "Minimum Xoops");
+define('_AM_TDMCREATE_MODULES_MIN_PHP', "Minimum PHP");
+define('_AM_TDMCREATE_MODULES_MIN_XOOPS', "Minimum XOOPS");
define('_AM_TDMCREATE_MODULES_MIN_ADMIN', "Minimum Admin");
define('_AM_TDMCREATE_MODULES_MIN_MYSQL', "Minimum Database");
define('_AM_TDMCREATE_BUILDING_FILES', "Files that have been compiled");
|
|
From: <be...@us...> - 2013-10-23 02:54:14
|
Revision: 12212
http://sourceforge.net/p/xoops/svn/12212
Author: beckmi
Date: 2013-10-23 02:54:10 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk to revision 12184 (timgno: Deleted unnecessary parameters, Added new line code in same files, Deleted duplicated code for table_fields, table_parameters)
Revision Links:
--------------
http://sourceforge.net/p/xoops/svn/12184
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:51:02 UTC (rev 12211)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 02:54:10 UTC (rev 12212)
@@ -95,7 +95,7 @@
}
// Creation of classes
if ( $table_admin == 1 || $table_user == 1) {
- const_class($modules, $table_name, $table_fieldname, $table_category, $table_fields, $table_parameters, $table_permissions);
+ const_class($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_permissions);
}
// Creation of pages admin
if ( $table_admin == 1 ) {
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:51:02 UTC (rev 12211)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php 2013-10-23 02:54:10 UTC (rev 12212)
@@ -28,10 +28,19 @@
$stu_mod_name = strtoupper($mod_name);
$stu_table_name = strtoupper($table_name);
$file = $table_name.'.php';
- $tdmcreate_path = TDM_CREATE_MURL.'/'.$mod_name.'/admin/'.$file;
- $root_path = XOOPS_URL.'/modules/'.$mod_name.'/admin/'.$file;
+ $tdmcreate_path = TDM_CREATE_MURL.'/'.$stl_mod_name.'/admin/'.$file;
+ $root_path = XOOPS_URL.'/modules/'.$stl_mod_name.'/admin/'.$file;
+
+ //fields
+ $fields_total = explode('|', $table_fields);
+ $nb_fields = count($fields_total);
+ list($fpif, $fpe, $fpda, $fpdu, $fpdb, $fpmf, $fpds, $fprf) = table_fields($table_fields, $table_parameters);
+
+ //$field_id = $fields[0];
+ //$field_name = $fields[1];
+
$text = '<?php'.const_header($modules, $file);
-$text .= <<<EOT
+ $text .= <<<EOT
\ninclude_once 'header.php';
//It recovered the value of argument op in URL$
\$op = {$mod_name}_CleanVars(\$_REQUEST, 'op', 'list', 'string');
@@ -44,36 +53,7 @@
\${$table_fieldname}_waiting = \${$table_name}Handler->getCount(\$criteria);
EOT;
}
-//fields
-$fields_total = explode('|', $table_fields);
-$nb_fields = count($fields_total);
-//parameters
-$parameters_total = explode('|', $table_parameters);
-
-//Recuperation des noms des tables
-for($i=0; $i<$nb_fields; $i++)
-{
- //Nom des fields
- $fields1 = explode(':', $fields_total[$i]);
- $fields[$i] = $fields1[0];
- //Afficher dans l'admin
- if( $i == 0 ) {
- $fpa[$i] = '0';
- } else {
- $param = explode(':', $parameters_total[$i-1]);
- $fpt[$i] = $param[0]; // fpt = fields parameters type
- $fpa[$i] = $param[2]; // fpa = fields parameters admin
- $fprf[$i] = $param[6]; // fprf = fields parameters required field
- if ( $param[4] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
- }
- }
-}
-
-$field_id = $fields[0];
-$field_name = $fields[1];
-
$text .= <<<EOT
\n\necho \$adminMenu->addNavigation('{$table_name}.php');
switch (\$op)
@@ -83,17 +63,17 @@
\$adminMenu->addItemButton({$language}_ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
echo \$adminMenu->renderButton();
\$criteria = new CriteriaCompo();
- \$criteria->setSort('{$field_id} ASC, {$fpmf}');
+ \$criteria->setSort('{$fpif} ASC, {$fpmf}');
\$criteria->setOrder('ASC');
- \$numrows = \${$table_name}Handler->getCount();
+ \${$table_name}_rows = \${$table_name}Handler->getCount();
\${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 0);
if ( $table_category != 1 )
{
$text .= <<<EOT
\n\t\t// Table view
- if (\$numrows>0)
+ if (\${$table_name}_rows > 0)
{
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
@@ -110,13 +90,13 @@
echo "<tr class='".\$class."'>";
\$class = (\$class == "even") ? "odd" : "even";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 1);
$text .= $fields_data;
$text .= <<<EOT
- \n\t\t\t\t\techo "<td class='center width5'>
- <a href='{$table_name}.php?op=edit&{$field_id}=".\$i."'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
- <a href='{$table_name}.php?op=delete&{$field_id}=".\$i."'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+\n\t\t\t\t\techo "<td class='center width5'>
+ <a href='{$table_name}.php?op=edit&{$fpif}=".\$i."'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='{$table_name}.php?op=delete&{$fpif}=".\$i."'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
</td>";
echo "</tr>";
}
@@ -127,14 +107,14 @@
EOT;
$text .= $fcn;
$text .= <<<EOT
- \n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
+\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
</tr><tr><td class='errorMsg' colspan='{$nb_fields}'>There are no {$table_name}</td></tr>";
echo "</table><br /><br />";
}
EOT;
} else {
$text .= <<<EOT
- \n\t\t// Display function that allows children categories
+\n\t\t// Display function that allows children categories
function {$mod_name}_children(\$cat_id = 0, \${$table_name}_arr, \$prefix = "", \$order = "", &\$class)
{
global \$pathIcon16;
@@ -148,11 +128,11 @@
\$cat_weight = \$categories_arr[\$i]->getVar('cat_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 1);
$text .= <<<EOT
- \n\t\t\t\t\techo "<td class='center width5'>
- <a href='{$table_name}.php?op=edit&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
- <a href='{$table_name}.php?op=delete&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+\n\t\t\t\t\techo "<td class='center width5'>
+ <a href='{$table_name}.php?op=edit&{$fpif}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='{$table_name}.php?op=delete&{$fpif}=".\$i"'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
</td>
</tr>";
\$class = (\$class == "even") ? "odd" : "even";
@@ -170,15 +150,15 @@
}
// Table view
- if (\$numrows>0)
+ if (\${$table_name}_rows > 0)
{
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
- \n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
+\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
</tr>";
\$class = "odd";
\$icon = "<img src='".{$stu_mod_name}_URL."/images/icons/16/arrow.gif'>";
@@ -192,13 +172,13 @@
\$category_weight = \${$table_name}_arr[\$i]->getVar('{$table_fieldname}_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, 1, 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, 1, 1);
$text .= $fields_data;
$text .= <<<EOT
- \n\t\t\t\t\techo "<td class='center width5'>
- <a href='{$table_name}.php?op=edit&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
- <a href='{$table_name}.php?op=delete&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+\n\t\t\t\t\techo "<td class='center width5'>
+ <a href='{$table_name}.php?op=edit&{$fpif}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='{$table_name}.php?op=delete&{$fpif}=".\$i"'><img src=".\$sysPathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
</td>
</tr>";
\$class = (\$class == "even") ? "odd" : "even";
@@ -220,10 +200,10 @@
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
- \n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
+\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
</tr>
<tr><td class='errorMsg' colspan='{$nb_fields}'>There are no {$table_name}</td></tr>";
echo "</table><br /><br />";
@@ -237,8 +217,8 @@
\$adminMenu->addItemButton({$language}_{$stu_table_name}_LIST, '{$table_name}.php', 'list');
echo \$adminMenu->renderButton();
- \$obj =& \${$table_name}Handler->create();
- \$form = \$obj->getForm();
+ \${$table_name}_obj =& \${$table_name}Handler->create();
+ \$form = \${$table_name}_obj->getForm();
\$form->display();
break;
@@ -246,21 +226,21 @@
if ( !\$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('{$table_name}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors()));
}
- if (isset(\$_REQUEST['{$field_id}'])) {
- \$obj =& \${$table_name}Handler->get(\$_REQUEST['{$field_id}']);
+ if (isset(\$_REQUEST['{$fpif}'])) {
+ \${$table_name}_obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
} else {
- \$obj =& \${$table_name}Handler->create();
+ \${$table_name}_obj =& \${$table_name}Handler->create();
}
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 2);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $nb_fields, $fields_total, $fpif, $fpda, $fpe, $fpmf, $language, '', 2);
$text .= <<<EOT
- \n\t\tif (\${$table_name}Handler->insert(\$obj)) {
+\n\t\tif (\${$table_name}Handler->insert(\${$table_name}_obj)) {
redirect_header('{$table_name}.php?op=list', 2, {$language}_FORMOK);
}
- echo \$obj->getHtmlErrors();
- \$form =& \$obj->getForm();
+ echo \${$table_name}_obj->getHtmlErrors();
+ \$form =& \${$table_name}_obj->getForm();
\$form->display();
break;
@@ -268,38 +248,38 @@
\$adminMenu->addItemButton({$language}_ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
\$adminMenu->addItemButton({$language}_{$stu_table_name}_LIST, '{$table_name}.php', 'list');
echo \$adminMenu->renderButton();
- \$obj = \${$table_name}Handler->get(\$_REQUEST['{$field_id}']);
- \$form = \$obj->getForm();
+ \${$table_name}_obj = \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
+ \$form = \${$table_name}_obj->getForm();
\$form->display();
break;
case 'delete':
- \$obj =& \${$table_name}Handler->get(\$_REQUEST['{$field_id}']);
+ \${$table_name}_obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
if (isset(\$_REQUEST['ok']) && \$_REQUEST['ok'] == 1) {
if ( !\$GLOBALS['xoopsSecurity']->check() ) {
redirect_header('{$table_name}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors()));
}
- if (\${$table_name}Handler->delete(\$obj)) {
+ if (\${$table_name}Handler->delete(\${$table_name}_obj)) {
redirect_header('{$table_name}.php', 3, {$language}_FORMDELOK);
} else {
- echo \$obj->getHtmlErrors();
+ echo \${$table_name}_obj->getHtmlErrors();
}
} else {
- xoops_confirm(array('ok' => 1, '{$field_id}' => \$_REQUEST['{$field_id}'], 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}_FORMSUREDEL, \$obj->getVar('{$fpmf}')));
+ xoops_confirm(array('ok' => 1, '{$fpif}' => \$_REQUEST['{$fpif}'], 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}_FORMSUREDEL, \${$table_name}_obj->getVar('{$fpmf}')));
}
break;
EOT;
if(isset($_REQUEST['table_online']) == 1) {
$text .= <<<EOT
\ncase 'update_online':
- if (isset(\$_REQUEST['{$field_id}'])) {
- \$obj =& \${$table_name}Handler->get(\$_REQUEST['{$field_id}']);
+ if (isset(\$_REQUEST['{$fpif}'])) {
+ \${$table_name}_obj =& \${$table_name}Handler->get(\$_REQUEST['{$fpif}']);
}
- \$obj->setVar('{$table_fieldname}_online', \$_REQUEST['{$table_fieldname}_online']);
- if (\${$table_name}Handler->insert(\$obj)) {
+ \${$table_name}_obj->setVar('{$table_fieldname}_online', \$_REQUEST['{$table_fieldname}_online']);
+ if (\${$table_name}Handler->insert(\${$table_name}_obj)) {
redirect_header('{$table_name}.php', 3, {$language}_FORMOK);
}
- echo \$obj->getHtmlErrors();
+ echo \${$table_name}_obj->getHtmlErrors();
break;
EOT;
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:51:02 UTC (rev 12211)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php 2013-10-23 02:54:10 UTC (rev 12212)
@@ -19,46 +19,20 @@
* @version $Id: const_class.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php';
-function const_class($modules, $table_name, $table_fieldname, $table_category, $table_fields, $table_parameters, $table_permissions)
+function const_class($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_permissions)
{
$mod_name = $modules->getVar('mod_name');
+ $stl_mod_name = strtolower($mod_name);
$language = '_AM_'.strtoupper($mod_name).'_';
$file = $table_name. '.php';
- $tdmcreate_path = TDM_CREATE_MURL.'/'.$mod_name.'/class/'.$file;
- $root_path = XOOPS_URL.'/modules/'.$mod_name.'/class/'.$file;
- $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, 0, 0, 0, 0);
- //fields
- $fields_total = explode('|', $table_fields);
- $nb_fields = count($fields_total);
- //print_r($fields_total);
- //parameters
- $parameters_total = explode('|', $table_parameters);
-
- //Recuperation des parameters affichage dans le formulaire
- for($i=0; $i<$nb_fields; $i++)
- {
- $fields = explode(':', $fields_total[$i]);
- //$fields[$i] = $fields1[0];
- //Afficher dans les elements du formulaire et choisir le type
- if( $i == 0 ) {
- $fpe[$i] = '0';
- $fpdf[$i] = '0';
- $fpif = $fields[0]; // fpif = fields parameters auto_increment field
- } else {
- $param = explode(':', $parameters_total[$i-1]);
- //print_r($param);
- $fpdf[$i] = $param[3]; // fpdf = fields parameters display form
- $fpe[$i] = $param[0]; // fpe = fields parameters elements
- $fprf[$i] = $param[6]; // fprf = fields parameters required field
- if ( $param[4] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
- }
- }
- }
+ $tdmcreate_path = TDM_CREATE_MURL.'/'.$stl_mod_name.'/class/'.$file;
+ $root_path = XOOPS_URL.'/modules/'.$stl_mod_name.'/class/'.$file;
+ $constructor = const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, 0, 0, 0, 0);
+ list($fpif, $fpe, $fpda, $fpdu, $fpdb, $fpmf, $fpds, $fprf) = table_fields($table_fields, $table_parameters);
//$field_id = $fields[0];
//$field_name = $fields[1];
//table_fields($table_fields);
- $form = const_fields($mod_name, $table_name, $table_fieldname, $table_category, $table_fields, $language, $fpdf, $fpe, $fprf, 1);
+ $form = const_fields($mod_name, $table_name, $table_fieldname, $table_fields, $language, $fpda, $fpe, $fprf, 1);
$ucf_mod_name_table_name = ucfirst($mod_name).ucfirst($table_name);
$lang_add = $language.strtoupper($table_fieldname).'_ADD';
$lang_edit = $language.strtoupper($table_fieldname).'_EDIT';
@@ -119,7 +93,7 @@
\$gperm_handler = &xoops_gethandler ( 'groupperm' );
\$full_list = array_keys ( \$group_list );
global \$xoopsModule;
- if (! \$this->isNew ()) {
+ if ( !\$this->isNew() ) {
\$groups_ids_approve = \$gperm_handler->getGroupIds ( '{$mod_name}_approve', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
\$groups_ids_submit = \$gperm_handler->getGroupIds ( '{$mod_name}_submit', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
\$groups_ids_view = \$gperm_handler->getGroupIds ( '{$mod_name}_view', \$this->getVar ( '{$fpif}' ), \$xoopsModule->getVar ( 'mid' ) );
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 02:51:02 UTC (rev 12211)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php 2013-10-23 02:54:10 UTC (rev 12212)
@@ -22,41 +22,17 @@
function const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters)
{
$mod_name = $modules->getVar('mod_name');
+ $stl_mod_name = strtolower($mod_name);
$language = '_MA_'.strtoupper($mod_name).'_';
$file = $mod_name.'_'.$table_name.'.html';
- $tdmcreate_path = TDM_CREATE_MURL.'/'.$mod_name.'/templates/'.$file;
- $root_path = XOOPS_URL.'/modules/'.$mod_name.'/templates/'.$file;
+ $tdmcreate_path = TDM_CREATE_MURL.'/'.$stl_mod_name.'/templates/'.$file;
+ $root_path = XOOPS_URL.'/modules/'.$stl_mod_name.'/templates/'.$file;
//fields
$fields_total = explode('|', $table_fields);
$nb_fields = count($fields_total);
- //print_r($fields_total);
- //parameters
- $parameters_total = explode('|', $table_parameters);
-
- //Recuperation des parameters affichage dans le formulaire
- for($i=0; $i<$nb_fields; $i++)
- {
- $fields = explode(':', $fields_total[$i]);
- //$fields[$i] = $fields1[0];
- //Afficher dans les elements du formulaire et choisir le type
- if( $i == 0 ) {
- $fpe[$i] = '0';
- $fpdf[$i] = '0';
- $fpif = $fields[0]; // fpif = fields parameters auto_increment field
- } else {
- $param = explode(':', $parameters_total[$i-1]);
- //print_r($param);
- $fpdf[$i] = $param[3]; // fpdf = fields parameters display form
- $fpe[$i] = $param[0]; // fpe = fields parameters elements
- $fprf[$i] = $param[6]; // fprf = fields parameters required field
- if ( $param[4] == 1 ) {
- $fpmf = $fields[0]; // fpmf = fields parameters main field
- }
- }
- }
- //table_fields($table_fields);
+ list($fpif, $fpe, $fpda, $fpdu, $fpdb, $fpmf, $fpds, $fprf) = table_fields($table_fields, $table_parameters);
- $text = '<{include file="db:'.$mod_name.'_header.html"}>';
+ $text = '<{include file="db:'.$stl_mod_name.'_header.html"}>';
if($table_name != null)
{
$text .= '
@@ -66,7 +42,7 @@
';
for ($i = 0; $i < $nb_fields; $i++)
{
- $structure_fields = explode(':', $fields[$i]);
+ $structure_fields = explode(':', $fields_total[$i]);
$text .= ' <th class="center"><{$smarty.const.'.$language.strtoupper($structure_fields[0]).'}></th>
';
}
@@ -76,7 +52,7 @@
';
for ($i = 0; $i < $nb_fields; $i++)
{
- $structure_fields = explode(':', $fields[$i]);
+ $structure_fields = explode(':', $fields_total[$i]);
if( $fpe[$i] == 'XoopsFormUploadImage' ) {
$text .= ' <td class="center"><img src="<{$xoops_url}>/uploads/'.$mod_name.'/images/'.$table_name.'/<{$'.$table_fieldname.'.'.$structure_fields[0].'}>" alt="'.$table_name.'"></td>
';
|