|
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' ) {
+ $text .= '`'.$str[0].'` '.$type.' '.$str[3].' '.$str[4].' '.$default.',
+ ';
+ $virgule[$j] = 'FULLTEXT KEY `'.$str[0].'` (`'.$str[0].'`)';
+ }
+ $j++;
+ } else {
+ $text .= '`'.$str[0].'` '.$type.' '.$str[3].' '.$str[4].' '.$default.',
+ ';
+ }
+ }
+ }
+ }
+
+ //Probleme virgule
+ $key = '';
+ for ($i=0; $i<$j; $i++)
+ {
+ if ( $i != $j - 1 ) {
+ $key .= ''.$virgule[$i].',
+ ';
+ } else {
+ $key .= ''.$virgule[$i].'
+ ';
+ }
+ }
+ $text .= $key;
+ $text .= ') ENGINE=MyISAM;';
+ }
+ return $text;
+ //return $this->champs;
}
+
+ // getType
+ function getChampsParameters(&$type_id, $mn, $tn, $champs_id, $nb_champs, $champs, $cpda, $cpt, $lang, $prefix = '', $option = 0)
+ {
+ $text = '';
+ if ( $option == 0 ) {
+ for($i=0; $i<$nb_champs; $i++)
+ {
+ if ( $i != 0 ) {
+ if ( $cpda[$i] == 1 ) {
+ $text .= '<th align=\"center\">".'.$lang.'_'.strtoupper($champs[$i]).'."</th>
+ ';
+ }
+ }
+ }
+ } elseif ( $option == 1 ) {
+ for($i=0; $i<$nb_champs; $i++)
+ {
+ if ( $cpda[$i] == 1 ) {
+ if ( $i == $nb_champs - 1 )
+ {
+ $text .= '
+ $online = $'.$tn.'_arr[$i]->getVar("'.$champs[$i].'");
+
+ if( $online == 1 ) {';
+ $text .= '
+ echo "<td align=\"center\"><a href=\"./'.$tn.'.php?op=update_online_'.$tn.'&'.$champs_id.'=".$'.$tn.'_arr[$i]->getVar("'.$champs_id.'")."&'.$tn.'_online=0\"><img src=".$pathImageIcon."/on.png border=\"0\" alt=\"".'.$lang.'_ON."\" title=\"".'.$lang.'_ON."\"></a></td>";
+ } else {';
+ $text .= '
+ echo "<td align=\"center\"><a href=\"./'.$tn.'.php?op=update_online_'.$tn.'&'.$champs_id.'=".$'.$tn.'_arr[$i]->getVar("'.$champs_id.'")."&'.$tn.'_online=1\"><img src=".$pathImageIcon."/off.png border=\"0\" alt=\"".'.$lang.'_OFF."\" title=\"".'.$lang.'_OFF."\"></a></td>";
+ }';
+ } else if ( $champs[$i] == 'topic_title' ) {
+ if ( $prefix == 1 ) {
+ $text .= 'echo "<td align=\"left\">".$prefix." ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>";
+ ';
+ } else {
+ $text .= 'echo "<td align=\"left\"><img src=\"".XOOPS_URL."/modules/'.$mn.'/images/deco/arrow.gif\"> ".$topic_arr[$i]->getVar("'.$champs[$i].'")."</td>";
+ ';
+ }
+
+ } else if ( $cpt[$i] == 'XoopsFormUploadImage' ) {
+ $text .= 'echo "<td align=\"center\"><img src=\"".XOOPS_URL."/uploads/'.$mn.'/'.$tn.'/'.$champs[$i].'/".$'.$tn.'_arr[$i]->getVar("'.$champs[$i].'")."\" height=\"30px\" title=\"'.$champs[$i].'\" alt=\"'.$champs[$i].'\"></td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormUploadFile' )
+ {
+ $text .= 'echo "<td align=\"center\">".$'.$tn.'_arr[$i]->getVar("'.$champs[$i].'")."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormColorPicker' )
+ {
+ $text .= 'echo "<td align=\"center\"><span style=\"background-color:".$'.$tn.'_arr[$i]->getVar("'.$champs[$i].'")."\"> </span> -> ".$'.$tn.'_arr[$i]->getVar("'.$champs[$i].'")."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormTextDateSelect' )
+ {
+ $text .= 'echo "<td align=\"center\">".formatTimeStamp($'.$tn.'_arr[$i]->getVar("'.$champs[$i].'"),"S")."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormTopic' )
+ {
+ $text .= '$'.$tn.'1 = $topicHandler->get($'.$tn.'_arr[$i]->getVar("'.$champs[$i].'"));
+ $'.$tn.'_topic1 = $'.$tn.'1->getVar("topic_title");
+ echo "<td align=\"center\">".$'.$tn.'_topic1."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormSelectUser' )
+ {
+ $text .= 'echo "<td align=\"center\">".XoopsUser::getUnameFromId($'.$tn.'_arr[$i]->getVar("'.$champs[$i].'"),"S")."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormText' || $cpt[$i] == 'XoopsFormDhtmlTextArea' || $cpt[$i] == 'XoopsFormTextArea' ) {
+ $text .= 'echo "<td align=\"center\">".$'.$tn.'_arr[$i]->getVar("'.$champs[$i].'")."</td>";
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormCheckBox' || $cpt[$i] == 'XoopsFormRadioYN' ) {
+ $text .= '
+ $verif_'.$champs[$i].' = ( $'.$tn.'_arr[$i]->getVar("'.$champs[$i].'") == 1 ) ? _YES : _NO;
+ echo "<td align=\"center\">".$verif_'.$champs[$i].'."</td>";
+ ';
+ } else {
+ $data = explode("-", $cpt[$i]);
+ //Table du select
+ $tablesHandler =& xoops_getModuleHandler('TDMCreate_tables', 'TDMCreate');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('tn', $data[1]));
+ $tables_select_arr = $tablesHandler->getall($criteria);
+
+ foreach (array_keys($tables_select_arr) as $k)
+ {
+ $tables_select_champs = $tables_select_arr[$k]->getVar('tables_champs');
+ $tables_select_parametres = $tables_select_arr[$k]->getVar('tables_parametres');
+
+ //Champs
+ $champs_total_select = explode("|", $tables_select_champs);
+ $nb_champs_select = count($champs_total_select);
+
+ //Parametres
+ $parametres_total_select = explode("|", $tables_select_parametres);
+
+ //Recuperation des noms des tables
+ for($l=0; $l<$nb_champs_select; $l++)
+ {
+ //Nom des champs
+ $champs_select1 = explode(":", $champs_total_select[$l]);
+ $champs_select[$l] = $champs_select1[0];
+ //Afficher dans l'admin
+ if( $l != 0 ) {
+ $parametres_select = explode(":", $parametres_total_select[$l-1]);
+ if ( $parametres_select[4] == 1 ) {
+ $champs_param_main_field = $champs_select1[0];
+ //echo $champs_param_main_field;
+ }
+ }
+ }
+
+ $text .= '
+ $'.$data[1].' =& $'.$data[1].'Handler->get($'.$tn.'_arr[$i]->getVar("'.$champs[$i].'"));
+ $title_'.$data[1].' = $'.$data[1].'->getVar("'.$champs_param_main_field.'");
+ echo "<td align=\"center\">".$title_'.$data[1].'."</td>";
+ ';
+ }
+
+ }
+ }
+ }
+ } elseif ( $option == 2 ) {
+ for($i=0; $i<$nb_champs; $i++)
+ {
+ if ( $i != 0 )
+ {
+ if ( $cpt[$i] == 'XoopsFormTextDateSelect' )
+ {
+ $text .= '//Form '.$champs[$i].'
+ $obj->setVar("'.$champs[$i].'", strtotime($_REQUEST["'.$champs[$i].'"]));
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormCheckBox' || $cpt[$i] == 'XoopsFormRadioYN' ) {
+ $text .= '//Form '.$champs[$i].'
+ $verif_'.$champs[$i].' = ($_REQUEST["'.$champs[$i].'"] == 1) ? "1" : "0";
+ $obj->setVar("'.$champs[$i].'", $verif_'.$champs[$i].');
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormUploadImage' ) {
+ $text .= '//Form '.$champs[$i].'
+ include_once XOOPS_ROOT_PATH."/class/uploader.php";
+ $uploaddir = XOOPS_UPLOAD_PATH."/'.$mn.'/images/";
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["'.$champs[$i].'_mimetypes"],
+ $GLOBALS["xoopsModuleConfig"]["'.$champs[$i].'_size"], null, null);
+ if ($uploader->fetchMedia($_POST[\'xoops_upload_file\'][0])) {
+ $uploader->setPrefix("'.$champs[$i].'_") ;
+ $uploader->fetchMedia($_POST[\'xoops_upload_file\'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $obj->setVar("'.$champs[$i].'", $uploader->getSavedFileName());
+ }
+ } else {
+ $obj->setVar("'.$champs[$i].'", $_REQUEST["'.$champs[$i].'"]);
+ }
+ ';
+ } else if ( $cpt[$i] == 'XoopsFormUploadFile' ) {
+ $text .= '//Form '.$champs[$i].'
+ include_once XOOPS_ROOT_PATH."/class/uploader.php";
+ $uploaddir = XOOPS_UPLOAD_PATH."/'.$mn.'/files/";
+ $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["'.$champs[$i].'_mimetypes"],
+ $GLOBALS["xoopsModuleConfig"]["'.$champs[$i].'_size"], null, null);
+ if ($uploader->fetchMedia($_POST[\'xoops_upload_file\'][0])) {
+ $uploader->setPrefix("'.$champs[$i].'_") ;
+ $uploader->fetchMedia($_POST[\'xoops_upload_file\'][0]);
+ if (!$uploader->upload()) {
+ $errors = $uploader->getErrors();
+ redirect_header("javascript:history.go(-1)",3, $errors);
+ } else {
+ $obj->setVar("'.$champs[$i].'", $uploader->getSavedFileName());
+ }
+ }
+ ';
+ } else {
+ $text .= '//Form '.$champs[$i].'
+ $obj->setVar("'.$champs[$i].'", $_REQUEST["'.$champs[$i].'"]);
+ ';
+ }
+ }
+ }
+
+ }
+ return $text;
+ //return $this->type;
+ }
+
+ // getElements
+ function getFormElements(&$elements_id, $i, $mn, $tmt, $tn, $cpe, $cprf, $lang_form, $str0)
+ {
+ $lang1 = '_AM_'.strtoupper($mn).'_';
+ $req_field = ( $cprf[$i] == 1) ? 'true' : 'false';
+ $text = '';
+ switch ($cpe[$i])
+ {
+ case "0":
+ break;
+
+ case "XoopsFormText":
+ $text .= '$form->addElement(new XoopsFormText('.$lang_form.', "'.$str0.'", 50, 255, $this->getVar("'.$str0.'")), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormTextArea":
+ $text .= '$form->addElement(new XoopsFormTextArea('.$lang_form.', "'.$str0.'", $this->getVar("'.$str0.'"), 4, 47), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormDhtmlTextArea":
+ $text .= '$editor_configs=array();
+ $editor_configs["name"] ="'.$str0.'";
+ $editor_configs["value"] = $this->getVar("'.$str0.'", "e");
+ $editor_configs["rows"] = 10;
+ $editor_configs["cols"] = 80;
+ $editor_configs["width"] = "100%";
+ $editor_configs["height"] = "400px";
+ $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["'.$mn.'_editor"];
+ $form->addElement( new XoopsFormEditor('.$lang_form.', "'.$str0.'", $editor_configs), true );
+ ';
+ break;
+
+ case "XoopsFormCheckBox":
+ $text .= ' $'.$str0.' = $this->isNew() ? 0 : $this->getVar("'.$str0.'");
+ $check_'.$str0.' = new XoopsFormCheckBox('.$lang_form.', "'.$str0.'", $'.$str0.');
+ $check_'.$str0.'->addOption(1, " ");
+ $form->addElement($check_'.$str0.');
+ ';
+ break;
+
+ case "XoopsFormHidden":
+ $text .= '$form->addElement(new XoopsFormHidden("'.$str0.'", $this->getVar("'.$str0.'")));
+ ';
+ break;
+
+ case "XoopsFormUploadImage":
+ $text .= '
+ $'.$str0.' = $this->getVar("'.$str0.'") ? $this->getVar("'.$str0.'") : \'blank.gif\';
+
+ $uploadirectory_'.$str0.' = \'/uploads/'.$mn.'/'.$tn.'/'.$str0.'\';
+ $imgtray_'.$str0.' = new XoopsFormElementTray('.$lang_form.',\'<br />\');
+ $imgpath_'.$str0.' = sprintf('1.'FORMIMAGE_PATH, $uploadirectory_'.$str0.');
+ $imageselect_'.$str0.' = new XoopsFormSelect($imgpath_'.$str0.', \''.$str0.'\', $'.$str0.');
+ $image_array_'.$str0.' = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory_'.$str0.' );
+ foreach( $image_array_'.$str0.' as $image_'.$str0.' ) {
+ $imageselect_'.$str0.'->addOption("$image_'.$str0.'", $image_'.$str0.');
+ }
+ $imageselect_'.$str0.'->setExtra( "onchange=\'showImgSelected(\"image_'.$str0.'\", \"'.$str0.'\", \"".$uploadirectory_'.$str0.'."\", \"\", \"".XOOPS_URL."\")\'" );
+ $imgtray_'.$str0.'->addElement($imageselect_'.$str0.', false);
+ $imgtray_'.$str0.'->addElement( new XoopsFormLabel( \'\', "<br /><img src=\'".XOOPS_URL."/".$uploadirectory_'.$str0.'."/".$'.$str0.'."\' name=\'image_'.$str0.'\' id=\'image_'.$str0.'\' alt=\'\' />" ) );
+ $fileseltray_'.$str0.' = new XoopsFormElementTray(\'\',\'<br />\');
+ $fileseltray_'.$str0.'->addElement(new XoopsFormFile('.$lang1.'FORMUPLOAD , "'.$str0.'", $xoopsModuleConfig["'.$str0.'_size"]),false);
+ $fileseltray_'.$str0.'->addElement(new XoopsFormLabel(\'\'), false);
+ $imgtray_'.$str0.'->addElement($fileseltray_'.$str0.');
+ $form->addElement($imgtray_'.$str0.');
+
+ ';
+ break;
+
+ case "XoopsFormUploadFile":
+ $text .= '$form->addElement(new XoopsFormFile('.$lang_form.', "'.$str0.'", $xoopsModuleConfig["'.$str0.'_size"]), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormColorPicker":
+ $text .= '$form->addElement(new XoopsFormColorPicker('.$lang_form.', "'.$str0.'", $this->getVar("'.$str0.'")), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormSelect":
+ $cat = ($cat == $mn.'_cat') ? $mn.'_cat' : $mn.'_category';
+ $text .= '
+ $catHandler =& xoops_getModuleHandler("'.$cat.'", "'.$mn.'");
+ $cat_select = new XoopsFormSelect("'.$lang_form.'", "'.$str0.'", $this->getVar("'.$str0.'"));
+ $cat_select->addOption($catHandler->getList());
+ $form->addElement($cat_select, '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormSelectUser":
+ $text .= '$form->addElement(new XoopsFormSelectUser('.$lang_form.', "'.$str0.'", false, $this->getVar("'.$str0.'"), 1, false), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormRadioYN":
+ $text .= ' $'.$str0.' = $this->isNew() ? 0 : $this->getVar("'.$str0.'");
+ $form->addElement(new XoopsFormRadioYN('.$lang_form.', "'.$str0.'", $'.$str0.', _YES, _NO), '.$req_field.');
+ ';
+ break;
+
+ case "XoopsFormTextDateSelect":
+ $text .= '$form->addElement(new XoopsFormTextDateSelect('.$lang_form.', "'.$str0.'", "", $this->getVar("'.$str0.'")));
+ ';
+ break;
+
+ default:
+ $data = explode("-", $cpe[$i]);
+ $text .= '
+ include_once(XOOPS_ROOT_PATH."/class/tree.php");
+ $'.$data[1].'Handler =& xoops_getModuleHandler("'.$mn.'_'.$data[1].'", "'.$mn.'");
+ $criteria = new CriteriaCompo();
+ $criteria->setSort(\''.$data[1].'_id ASC, '.$data[1].'_title\');
+ $criteria->setOrder(\'ASC\');
+ $'.$data[1].'_arr = $'.$data[1].'Handler->getall();
+ $mytree = new XoopsObjectTree($'.$data[1].'_arr, "'.$data[1].'_id", "'.$data[1].'_pid");
+ $form->addElement(new XoopsFormLabel('.$lang_form.', $mytree->makeSelBox("'.$data[1].'_pid", "'.$data[1].'_title","--", $this->getVar("'.$data[1].'_pid"),'.$req_field.')));
+ ';
+ break;
+ }
+ return $text;
+ //return $this->elements;
+ }
}
class TDMCreatetdmcreate_champsHandler extends XoopsPersistableObjectHandler
{
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -33,30 +33,30 @@
{
$this->XoopsObject();
$this->initVar("modules_id",XOBJ_DTYPE_INT, 0, false);
- $this->initVar("modules_name",XOBJ_DTYPE_TXTBOX,null,false, 255);
- $this->initVar("modules_fname",XOBJ_DTYPE_TXTBOX,null,false, 255);
- $this->initVar("modules_version",XOBJ_DTYPE_TXTBOX,null,false, 255);
- $this->initVar("modules_description",XOBJ_DTYPE_TXTAREA, null, false);
- $this->initVar("modules_author",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_author_mail",XOBJ_DTYPE_TXTBOX,null,false, 255);
- $this->initVar("modules_author_website_url",XOBJ_DTYPE_TXTBOX,null,false, 255);
- $this->initVar("modules_author_website_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_credits",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("modules_name",XOBJ_DTYPE_TXTBOX, 'Module Name',false, 255);
+ $this->initVar("modules_fname",XOBJ_DTYPE_TXTBOX, 'foldername',false, 255);
+ $this->initVar("modules_version",XOBJ_DTYPE_TXTBOX,'1.00',false, 255);
+ $this->initVar("modules_description",XOBJ_DTYPE_TXTAREA, 'Description of the module', false);
+ $this->initVar("modules_author",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops (Timgno)', false, 255);
+ $this->initVar("modules_author_mail",XOBJ_DTYPE_TXTBOX, 'su...@tx...',false, 255);
+ $this->initVar("modules_author_website_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org',false, 255);
+ $this->initVar("modules_author_website_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops (Timgno)', false, 255);
+ $this->initVar("modules_credits",XOBJ_DTYPE_TXTBOX, 'Timgno', false, 255);
$this->initVar("modules_license",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_release_info",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_release_file",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_manual",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_manual_file",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("modules_release_info",XOBJ_DTYPE_TXTBOX, 'Beta 1 15/04/2012', false, 255);
+ $this->initVar("modules_release_file",XOBJ_DTYPE_TXTBOX, 'changelog.txt', false, 255);
+ $this->initVar("modules_manual",XOBJ_DTYPE_TXTBOX, 'Manual', false, 255);
+ $this->initVar("modules_manual_file",XOBJ_DTYPE_TXTBOX, 'install.txt', false, 255);
$this->initVar("modules_image",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_demo_site_url",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_demo_site_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_forum_site_url",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_forum_site_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_website_url",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_website_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, null, false, 155);
- $this->initVar("modules_status",XOBJ_DTYPE_TXTBOX, null, false, 155);
- $this->initVar("modules_donations",XOBJ_DTYPE_TXTBOX, null, false, 15);
+ $this->initVar("modules_demo_site_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/modules/', false, 255);
+ $this->initVar("modules_demo_site_name",XOBJ_DTYPE_TXTBOX, 'Module TXMod Xoops', false, 255);
+ $this->initVar("modules_forum_site_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/modules/newbb', false, 255);
+ $this->initVar("modules_forum_site_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops Community', false, 255);
+ $this->initVar("modules_website_url",XOBJ_DTYPE_TXTBOX, 'http://www.txmodxoops.org/', false, 255);
+ $this->initVar("modules_website_name",XOBJ_DTYPE_TXTBOX, 'TXMod Xoops', false, 255);
+ $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, '15/04/2012', false, 155);
+ $this->initVar("modules_status",XOBJ_DTYPE_TXTBOX, 'Beta 1', false, 155);
+ $this->initVar("modules_donations",XOBJ_DTYPE_TXTBOX, '6KJ7RW5DR3VTJ', false, 15);
$this->initVar("modules_display_admin",XOBJ_DTYPE_INT, 0, false, 1);
$this->initVar("modules_display_user",XOBJ_DTYPE_INT, 0, false, 1);
$this->initVar("modules_active_search",XOBJ_DTYPE_INT, 0, false, 1);
@@ -69,9 +69,7 @@
}
function getForm($action = false)
- {
- global $xoopsModule;
-
+ {
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
@@ -98,7 +96,7 @@
$editor_configs["cols"] = 100;
$editor_configs["width"] = "100%";
$editor_configs["height"] = "100px";
- $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['TDMCreate_editor'];
+ $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['tdmcreate_editor'];
$form->addElement( new XoopsFormEditor(_AM_TDMCREATE_MODULES_DESCRIPTION, "modules_description", $editor_configs), true);
// Author
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR, 'modules_author', 50, 255, $this->getVar('modules_author')), true);
@@ -113,24 +111,37 @@
$modules_license_select->addOption('Q Public License (QPL-1.0)', 'Q Public License');
$modules_license_select->addOption('Academic Free License (AFL-3.0)', 'Academic Free License');
$form->addElement($modules_license_select, true);
+
+ $options_tray = new XoopsFormElementTray(_OPTIONS, ' ');
+ $options_tray->setDescription('CheckBox Options');
// Display Admin
- $modules_display_admin = $this->isNew() ? 0 : $this->getVar('modules_display_admin');
- $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_ADMIN, 'modules_display_admin', $modules_display_admin, _YES, _NO));
+ $mdisplay_admin = $this->isNew() ? 0 : $this->getVar('modules_display_admin');
+ $display_admin = new XoopsFormCheckBox('', 'modules_display_admin', $mdisplay_admin);
+ $display_admin->addOption(1, _AM_TDMCREATE_MODULES_DISPLAY_ADMIN);
+ $options_tray->addElement($display_admin);
// Display User
- $modules_display_user = $this->isNew() ? 0 : $this->getVar('modules_display_user');
- $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_DISPLAY_USER, 'modules_display_user', $modules_display_user, _YES, _NO));
- $modules_active_search = $this->isNew() ? 0 : $this->getVar('modules_active_search');
- $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_SEARCH, 'modules_active_search', $modules_active_search, _YES, _NO));
- $modules_active_comments = $this->isNew() ? 0 : $this->getVar('modules_active_comments');
- $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_COMS, 'modules_active_comments', $modules_active_comments, _YES, _NO));
+ $mdisplay_user = $this->isNew() ? 0 : $this->getVar('modules_display_user');
+ $display_user = new XoopsFormCheckBox('', 'modules_display_user', $mdisplay_user);
+ $display_user->addOption(1, _AM_TDMCREATE_MODULES_DISPLAY_USER);
+ $options_tray->addElement($display_admin);
+ // Search Active
+ $mactive_search = $this->isNew() ? 0 : $this->getVar('modules_active_search');
+ $active_search = new XoopsFormCheckBox('', 'modules_active_search', $mactive_search);
+ $active_search->addOption(1, _AM_TDMCREATE_MODULES_ACTIVE_SEARCH);
+ $options_tray->addElement($active_search);
+ // Comments Active
+ $mactive_comments = $this->isNew() ? 0 : $this->getVar('modules_active_comments');
+ $active_comments = new XoopsFormCheckBox('', 'modules_active_comments', $mactive_comments);
+ $active_comments->addOption(1, _AM_TDMCREATE_MODULES_ACTIVE_COMS);
+ $options_tray->addElement($active_comments);
+ $form->addElement($options_tray);
- $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'blank.gif';
-
- $uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/modules";
- $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE,'<br />');
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".".$uploadirectory);
+ $modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'default_slogo.png';
+ $uploadirectory = "/modules/{$GLOBALS['xoopsModule']->dirname()}/images/uploads/modules";
+ $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULES_IMAGE,'<br /><br />');
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".".$uploadirectory."/");
$imageselect = new XoopsFormSelect($imgpath, 'modules_image', $modules_image);
- $modules_image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory );
+ $modules_image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory );
foreach( $modules_image_array as $image ) {
$imageselect->addOption("$image", $image);
}
@@ -139,7 +150,7 @@
$imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $modules_image . "' name='image3' id='image3' alt='' />" ) );
$fileseltray= new XoopsFormElementTray('','<br />');
- $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', 104857600),false);
+ $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', $GLOBALS['xoopsModuleConfig']['maxsize']),false);
$fileseltray->addElement(new XoopsFormLabel(''), false);
$imgtray->addElement($fileseltray);
$form->addElement($imgtray);
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 01:58:04 UTC (rev 12199)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 01:59:18 UTC (rev 12200)
@@ -35,6 +35,7 @@
$this->initVar("tables_modules",XOBJ_DTYPE_INT, null, false, 11);
$this->initVar("tables_module_table",XOBJ_DTYPE_TXTBOX, null, false, 155);
$this->initVar("tables_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("tables_prefix_champs",XOBJ_DTYPE_INT, null, false, 1);
$this->initVar("tables_img",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("tables_nb_champs",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("tables_blocks",XOBJ_DTYPE_INT, null, false, 0);
@@ -42,10 +43,10 @@
$this->initVar("tables_display_user",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_submitter",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_publisher",XOBJ_DTYPE_INT, null, false, 0);
+ $this->initVar("tables_created",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_published",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_expired",XOBJ_DTYPE_INT, null, false, 0);
- $this->initVar("tables_status",XOBJ_DTYPE_INT, null, false, 0);
- $this->initVar("tables_created",XOBJ_DTYPE_INT, null, false, 0);
+ $this->initVar("tables_status",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_online",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_waiting",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("tables_search",XOBJ_DTYPE_INT, null, false, 0);
@@ -65,9 +66,13 @@
$this->initVar("champ_elements_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
$this->initVar("champ_elements_admin",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("champ_elements_user",XOBJ_DTYPE_INT, null, false, 0);
+ $this->initVar("champ_elements_block",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("champ_elements_mfield",XOBJ_DTYPE_INT, null, false, 0);
$this->initVar("champ_elements_search",XOBJ_DTYPE_INT, null, false, 0);
- $this->initVar("champ_elements_required",XOBJ_DTYPE_INT, null, false, 0);
+ $this->initVar("champ_elements_required",XOBJ_DTYPE_INT, null, false, 0);
+
+ $this->initVar("champ_type_value",XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("champ_type_name",XOBJ_DTYPE_TXTBOX, null, false, 255);
}
//Constructor
@@ -76,7 +81,159 @@
$this->__construct();
}
- function getFormChamps($action = false)
+ //Form creation of tables
+ function getFormTable($action = false)
+ {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ $isAction = $this->isNew() ? 'tables_champs' : 'tables_save';
+ }
+ $title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_ADD) : sprintf(_AM_TDMCREATE_TABLES_EDIT);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+
+ $form = new XoopsThemeForm($title, 'form_tables', $action, 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+
+ $modulesHandler =& xoops_getModuleHandler('TDMCreate_modules', 'TDMCreate');
+ $modules_select = new XoopsFormSelect(_AM_TDMCREATE_TABLES_MODULES, 'tables_modules', $this->getVar('tables_modules'));
+ $modules_select->addOptionArray($modulesHandler->getList());
+ $form->addElement($modules_select, true);
+
+ $tables_name = new XoopsFormElementTray(_AM_TDMCREATE_TABLES_NAME,' ');
+ $tables_name->addElement(new XoopsFormText('', 'tables_name', 20, 255, $this->getVar('tables_name')), true);
+ $prefix_champs = $this->isNew() ? 0 : $this->getVar("tables_prefix_champs");
+ $prefix_champs_checked = new XoopsFormCheckBox( '', 'tables_prefix_champs', $prefix_champs );
+ $prefix_champs_checked->addOption( 1, _AM_TDMCREATE_TABLES_NAME_EMPTY );
+ $tables_name->addElement($prefix_champs_checked);
+ $form->addElement($tables_name);
+
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_TABLES_NB_CHAMPS, 'tables_nb_champs', 3, 25, $this->getVar('tables_nb_champs')), true);
+
+ $options_tray1 = new XoopsFormElementTray(_OPTIONS, ' ');
+ $options_tray1->setDescription('CheckBox Options');
+ // Display Blocks
+ $tables_blocks = $this->isNew() ? 0 : $this->getVar('tables_blocks');
+ $display_blocks = new XoopsFormCheckBox( '', 'tables_blocks', $tables_blocks);
+ $display_blocks->addOption(1, _AM_TDMCREATE_TABLES_BLOCKS);
+ $options_tray1->addElement($display_blocks);
+ // Display Admin
+ $tdisplay_admin = $this->isNew() ? 0 : $this->getVar('tables_display_admin');
+ $display_admin = new XoopsFormCheckBox( '', 'tables_display_admin', $tdisplay_admin);
+ $display_admin->addOption(1, _AM_TDMCREATE_TABLES_DISPLAY_ADMIN);
+ $options_tray1->addElement($display_admin);
+ // Display User
+ $tdisplay_user = $this->isNew() ? 0 : $this->getVar('tables_display_user');
+ $display_user = new XoopsFormCheckBox( '', 'tables_display_user', $tdisplay_user);
+ $display_user->addOption(1, _AM_TDMCREATE_TABLES_DISPLAY_USER);
+ $options_tray1->addElement($display_user);
+ $form->addElement($options_tray1);
+
+ $form->addElement(new XoopsFormLabel('', _AM_TDMCREATE_FORM_INFO_TABLE_FIELD));
+ $options_tray = new XoopsFormElementTray( _AM_TDMCREATE_TABLES_CHECKOPTIONS, '' );
+
+ //submitter option
+ $tbls_submitter = $this->isNew() ? 0 : $this->getVar("tables_submitter");
+ $submitter_checkbox = new XoopsFormCheckBox( '', 'tables_submitter', $tbls_submitter );
+ $submitter_checkbox->addOption( 1, _AM_TDMCREATE_TABLES_SUBMITTER );
+ $options_tray->addElement( $submitter_checkbox );
+ //publisher option
+ $tbls_publisher = $this->isNew() ? 0 : $this->getVar("tables_submitter");
+ $publisher_checkbox = new XoopsFormCheckBox( '', 'tables_publisher', $tbls_publisher );
+ $publisher_checkbox->addOption( 1, _AM_TDMCREATE_TABLES_PUBLISHER );
+ $options_tray->addElement( $publisher_checkbox );
+ //created option
+ $tbls_created = $this->isNew() ? 0 : $this->getVar("tables_created");
+ $created_checkbox = new XoopsFormCheckBox( '', 'tables_created', $tbls_created );
+ $created_checkbox->addOption( 1, _AM_TDMCREATE_TABLES_CREATED );
+ $options_tray->addElement( $created_checkbox );
+ //published option
+ $tbls_published = $this->isNew() ? 0 : $this->getVar("tables_published");
+ $published_checkbox = new XoopsFormCheckBox( '', 'tables_publis...
[truncated message content] |