|
From: <txm...@us...> - 2014-03-04 19:20:12
|
Revision: 12346
http://sourceforge.net/p/xoops/svn/12346
Author: txmodxoops
Date: 2014-03-04 19:20:06 +0000 (Tue, 04 Mar 2014)
Log Message:
-----------
Only for repository, no tests
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/class_files.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/headerfiles.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/htmlsmartycodes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/structure.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_parameters.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user_templates.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form_elements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables_fields.php
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/architecture.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/architecture.php 2014-03-04 19:20:06 UTC (rev 12346)
@@ -0,0 +1,110 @@
+<?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: architecture.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class Architecture extends Structure
+{
+ /*
+ * @public function constructor class
+ * @param string $path
+ */
+ public function __construct($path) {
+ $this->path = $path;
+ }
+ /*
+ * @public function isDir
+ * @param string $dname
+ */
+ public function ArchitectureFiles( $module, $pathName )
+ {
+ $indexFile = $pathName.'/index.html';
+ $this->path = XOOPS_ROOT_PATH.'/modules/TDMCreate';
+ $fdocs = $this->path.'/docs';
+ $fimages = $this->path.'/images';
+ //Creation of the Directory of modules
+ $targetDirectory = $pathName.'/modules/'.strtolower($module->getVar('mod_name'));
+
+ // Making of a new object
+ $classStruct = Structure::Structure($targetDirectory);
+ // Creation of "module" folder
+ $classStruct->makeDir($targetDirectory);
+ // Creation of "admin" folder and index.html file
+ $classStruct->makeDirAndCopyFile('admin/', $indexFile, 'index.html');
+ // Creation of "blocks" folder and index.html file
+ $classStruct->makeDirAndCopyFile('blocks/', $indexFile, 'index.html');
+ // Creation of "class" folder and index.html file
+ $classStruct->makeDirAndCopyFile('class/', $indexFile, 'index.html');
+ // Creation of "css" folder and index.html file
+ $classStruct->makeDirAndCopyFile('css/', $indexFile, 'index.html');
+ // Creation of "images" folder and index.html file
+ $classStruct->makeDirAndCopyFile('images/', $indexFile, 'index.html');
+ //Copy the logo of the module
+ $mod_image = str_replace(' ', '', strtolower($module->getVar('mod_image')));
+ $classStruct->copyFile('images/', $fimages.'/uploads/modules/'.$mod_image, $mod_image);
+
+ // Creation of 'images/icons' folder and index.html file - Added in Version 1.15
+ $classStruct->makeDirAndCopyFile('images/icons/', $indexFile, 'index.html');
+ // Creation of "images/icons/16" folder and index.html file
+ $classStruct->makeDirAndCopyFile('images/icons/16/', $indexFile, 'index.html');
+ // Creation of "images/icons/32" folder and index.html file
+ $classStruct->makeDirAndCopyFile('images/icons/32/', $indexFile, 'index.html');
+ // Creation of 'on.png' file
+ $classStruct->copyFile('images/icons/16/', $fimages.'/icons/16/on.png', 'on.png');
+ // Creation of 'off.png' file
+ $classStruct->copyFile('images/icons/16/', $fimages.'/icons/16/off.png', 'off.png');
+ // Creation of 'arrow.gif' file
+ $classStruct->copyFile('images/icons/16/', $fimages.'/icons/16/arrow.gif', 'arrow.gif');
+ // Creation of 'txmodxoops_logo.png' file
+ $classStruct->copyFile('images/', $fimages.'/txmodxoops_logo.png', 'txmodxoops_logo.png');
+
+ // Creation of 'docs' folder and index.html file
+ $classStruct->makeDirAndCopyFile('docs/', $indexFile, 'index.html');
+ // Creation of 'credits.txt' file
+ $classStruct->copyFile('docs/', $fdocs.'/credits.txt', 'credits.txt');
+ // Creation of 'install.txt' file
+ $classStruct->copyFile('docs/', $fdocs.'/install.txt', 'install.txt');
+ // Creation of 'lang_diff.txt' file
+ $classStruct->copyFile('docs/', $fdocs.'/lang_diff.txt', 'lang_diff.txt');
+ // Creation of 'license.txt' file
+ $classStruct->copyFile('docs/', $fdocs.'/license.txt', 'license.txt');
+ // Creation of 'readme.txt' file
+ $classStruct->copyFile('docs/', $fdocs.'/readme.txt', 'readme.txt');
+
+ // Creation of "include" folder and index.html file
+ $classStruct->makeDirAndCopyFile('include/', $indexFile, 'index.html');
+ // Creation of "language" folder and index.html file
+ $classStruct->makeDirAndCopyFile('language/', $indexFile, 'index.html');
+ // Creation of "language/local_language" folder and index.html file
+ $classStruct->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/', $indexFile, 'index.html');
+ // Creation of "language/local_language/help" folder and index.html file
+ $classStruct->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help/', $indexFile, 'index.html');
+ // Creation of "templates" folder and index.html file
+ $classStruct->makeDirAndCopyFile('templates/', $indexFile, 'index.html');
+ // Creation of "templates/admin" folder and index.html file
+ $classStruct->makeDirAndCopyFile('templates/admin/', $indexFile, 'index.html');
+ // Creation of "templates/blocks" folder and index.html file
+ $classStruct->makeDirAndCopyFile('templates/blocks/', $indexFile, 'index.html');
+ // Creation of "sql" folder and index.html file
+ $classStruct->makeDirAndCopyFile('sql/', $indexFile, 'index.html');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-03-04 19:20:06 UTC (rev 12346)
@@ -0,0 +1,222 @@
+<?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: fields.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+require_once "tdmcreate_htmltable.php";
+class TDMCreateFields extends XoopsObject
+{
+ //Constructor
+ public function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar("field_id", XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar("field_table", XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("field_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("field_type", XOBJ_DTYPE_TXTBOX, null, false, 100);
+ $this->initVar("field_value", XOBJ_DTYPE_TXTBOX, null, false, 4);
+ $this->initVar("field_attribute", XOBJ_DTYPE_TXTBOX, null, false, 50);
+ $this->initVar("field_null", XOBJ_DTYPE_TXTBOX, null, false, 10);
+ $this->initVar("field_default", XOBJ_DTYPE_TXTBOX, null, false, 150);
+ $this->initVar("field_key", XOBJ_DTYPE_TXTBOX, null, false, 10);
+ $this->initVar("field_auto_increment", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_display_admin", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_display_user", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_display_block", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_mainfield", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_search", XOBJ_DTYPE_INT, null, false, 1);
+ $this->initVar("field_required", XOBJ_DTYPE_INT, null, false, 1);
+ // For relationship
+ $this->initVar("table_id", XOBJ_DTYPE_INT, null, false, 8);
+ $this->initVar("table_module", XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("table_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
+ $this->initVar("table_nbfields", XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("table_fieldname", XOBJ_DTYPE_TXTBOX, null, false, 50);
+
+ $this->initVar("fieldtype_id", XOBJ_DTYPE_INT, null, false, 5);
+ $this->initVar("fieldtype_value", XOBJ_DTYPE_TXTBOX, null, false, 25);
+ $this->initVar("fieldtype_name", XOBJ_DTYPE_TXTBOX, null, false, 255);
+ }
+
+ public function getForm($action = false)
+ {
+ if ($action === false) {
+ $action = $_SERVER["REQUEST_URI"];
+ }
+
+ $title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
+
+ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
+ include_once(XOOPS_ROOT_PATH."/modules/TDMCreate/class/tdmcreate_themeform.php");
+ $form = new TDMCreate_XoopsThemeForm($title, "form", $action, "post", true);
+ $form->setExtra('enctype="multipart/form-data"');
+
+ if (!$this->isNew()) {
+ $field_table = $this->getVar('field_table');
+ } else {
+ $field_table = array( 1 => 0 );
+ }
+
+ //$option_tray = new XoopsFormElementTray(' ');
+ //$option_tray->setExtra('colspan="2"');//_AM_TDMCREATE_FIELD_TYPE
+
+ // New Object HtmlTable
+ $tableForm = new TDMCreate_HtmlTable(null, 'display outer');
+ // header row
+ $tableForm->addRow('center bgblue');
+ $cells = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
+ $tableForm->addCells($cells, 'first', 'header');
+
+ $tablesHandler = xoops_getModuleHandler('tdmcreate_tables');
+ $criteria = new CriteriaCompo(new Criteria('table_name', $this->getVar('table_name')));
+ $criteria->add(new Criteria('table_nbfields', $this->getVar('table_nbfields')));
+ $nb_fields = $tablesHandler->getAll($criteria);
+ unset($criteria);
+ for($i = 1; $i <= count($nb_fields); $i++)
+ {
+ $field_name = $this->isNew() ? $this->getVar("table_fieldname") : $this->getVar("field_name");
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, "field_name", 15, 255, $field_name);
+ // fieldtype
+ $fieldtypeHandler=& xoops_getModuleHandler('tdmcreate_fieldtype');
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, "field_type", $this->getVar("field_type"));
+ $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
+ // fieldvalue
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, "field_value", 5, 20, $this->getVar("field_value"));
+ // fieldattributes
+ $fieldattrsHandler=& xoops_getModuleHandler('tdmcreate_fieldattributes');
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, "field_attribute", $this->getVar("field_attribute"));
+ $field_attributes_select->addOptionArray($fieldattrsHandler->getList());
+ // fieldnull
+ $fieldnullHandler=& xoops_getModuleHandler('tdmcreate_fieldnull');
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, "field_null", $this->getVar("field_null"));
+ $field_null_select->addOptionArray($fieldnullHandler->getList());
+ // fielddefault
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, "field_default", 15, 25, $this->getVar("field_default"));
+ // fieldkey
+ $fieldkeyHandler=& xoops_getModuleHandler('tdmcreate_fieldkey');
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, "field_key", $this->getVar("field_key"));
+ $field_key_select->addOptionArray($fieldkeyHandler->getList());
+ // render fields
+ $tableFormDataArray = array($i, $field_name->render(), $fieldtype_select->render(), $field_value->render(), $field_attributes_select->render(), $field_null_select->render(), $field_default->render(), $field_key_select->render());
+ // data row
+ $tableForm->addRow('center bgyellow');
+ $tableForm->addCells($tableFormDataArray, 'first', 'data');
+ $tableOtherForm = new TDMCreate_HtmlTable(null, 'display');
+ if($i == 1) {
+ $field_autoincrement = $this->isNew() ? 0 : $this->getVar("field_auto_increment");
+ $check_field_autoincrement = new XoopsFormCheckBox(" ", "field_auto_increment", $field_autoincrement);
+ $check_field_autoincrement->addOption(1, _AM_TDMCREATE_FIELD_AUTO_INCREMENT);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_autoincrement->render(), null, 'data');
+ } elseif($i > 1) {
+ // Box header row
+ $tableOtherForm->addRow('center bgyellow');
+ $tableOtherForm->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
+ // fieldelements
+ $fieldelementsHandler=& xoops_getModuleHandler('tdmcreate_fieldelements');
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name', $this->getVar("field_element_name"));
+ $field_elements_select->addOptionArray($fieldelementsHandler->getList());
+ $criteria = new CriteriaCompo(new Criteria('table_id', $this->getVar('table_id')));
+ $criteria->add(new Criteria('table_module', $this->getVar('table_module')));
+ $criteria->setSort('table_name');
+ $criteria->setOrder('ASC');
+ $tbls_arr1 = $tablesHandler->getall($criteria);
+ unset($criteria);
+ foreach (array_keys($tbls_arr1) as $j)
+ {
+ $tbls_name1 = $tbls_arr1[$j]->getVar('table_name');
+ if ( $j[$i] == 'XoopsFormTables-'.$tbls_name1 ) {
+ $field_elements_select->addOption('XoopsFormTables-'.$tbls_name1, 'Table : '.$tbls_name1);
+ }
+ }
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($field_elements_select->render(), null, 'data');
+ $field_display_admin = $this->isNew() ? 0 : $this->getVar("field_display_admin");
+ $check_field_display_admin = new XoopsFormCheckBox(" ", "field_display_admin", $field_display_admin);
+ $check_field_display_admin->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_ADMIN);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_display_admin->render(), null, 'data');
+ $field_display_user = $this->isNew() ? 0 : $this->getVar("field_display_user");
+ $check_field_display_user = new XoopsFormCheckBox(" ", "field_display_user", $field_display_user);
+ $check_field_display_user->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_USER);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_display_user->render(), null, 'data');
+ $field_display_block = $this->isNew() ? 0 : $this->getVar("field_display_block");
+ $check_field_display_block = new XoopsFormCheckBox(" ", "field_display_block", $field_display_block);
+ $check_field_display_block->addOption(1, _AM_TDMCREATE_FIELD_DISPLAY_BLOCK);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_display_block->render(), null, 'data');
+ $field_mnfield = $this->isNew() ? 0 : $this->getVar("field_mainfield");
+ $field_mainfield = new XoopsFormRadio(" ", "field_mainfield", $field_mnfield);
+ $field_mainfield->addOption( ' ', _AM_TDMCREATE_FIELD_MAINFIELD );
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($field_mainfield->render(), null, 'data');
+ $field_search = $this->isNew() ? 0 : $this->getVar("field_search");
+ $check_field_search = new XoopsFormCheckBox(" ", "field_search", $field_search);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_search->render(), null, 'data');
+ $field_required = $this->isNew() ? 0 : $this->getVar("field_required");
+ $check_field_required = new XoopsFormCheckBox(" ", "field_required", $field_required);
+ $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_required->render(), null, 'data');
+ }
+ $tableForm->addCell($tableOtherForm->display(), null, 'data');
+
+ if (!$this->isNew()) {
+ $tableFormHiddenId = new XoopsFormHidden('table_id', $this->getVar('table_id'));
+ //$form->addElement(new XoopsFormHidden('fields_modified', true));
+ }
+ }
+ $form->addElement($tableForm->display());
+ /*if (!$this->isNew()) {
+ $form->addElement(new XoopsFormHidden('table_id', $this->getVar('table_id')));
+ $form->addElement(new XoopsFormHidden('fields_modified', true));
+ }
+
+ $form->addElement(new XoopsFormHidden("op", "save_fields"));
+ $form->addElement(new XoopsFormHidden("field_table", $this->getVar("field_table")));
+ $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit"));*/
+ $tableFormButton = new XoopsFormButton("", "submit", _SUBMIT, "submit");
+ $tableForm->addRow('right grey');
+ $tableForm->addCell($tableFormButton, null, 'data');
+ $form->addElement(new XoopsFormHidden("op", "save_fields"));
+ $form->addElement($tableForm);
+ $form->addElement($tableFormButton);
+ return $form;
+ }
+}
+class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, "tdmcreate_fields", "tdmcreatefields", "field_id", "field_table");
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_class.php 2014-03-04 19:20:06 UTC (rev 12346)
@@ -0,0 +1,249 @@
+<?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: fields_class.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class FieldsClass /*extends HeaderFile*/
+{
+ /*
+ * @var string
+ */
+ public $_module = null;
+ /*
+ * @var array
+ */
+ public $_table = array();
+ /*
+ * @var array
+ */
+ public $_type = array();
+ /*
+ * @var string
+ */
+ public $file_name = null;
+ /*
+ * @public function constructor
+ * @param string $modules
+ */
+ public function __construct($module, $table, $file_name) {
+ $this->_module = $module;
+ $this->_table[] = $table;
+ $this->file_name = $file_name;
+ }
+ /*
+ * @public function getInitVar
+ * @param array $element_name
+ * @param mixed $xobj_dtype
+ */
+ public function getInitVar(array $element_name, $xobj_dtype) {
+ $ret = <<<EOT
+ \$this->initVar('{$element_name[0]}', {$xobj_dtype});
+EOT;
+ return $ret;
+ }
+ /*
+ * @public function render
+ * @param null
+ */
+ public function render() {
+ $module_name = $this->getModuleName();
+ $language = $this->getLanguage('_AM_', '_');
+ // fpda = fields parameter display admin
+ // fpe = fields parameter element
+ // fprf = fields parameter required field
+ $mod_name = strtolower($mod_name);
+ $table_name = strtolower($table_name);
+ $table_fieldname = strtolower($table_fieldname);
+ $ret = '';
+ // Counts the number of fields
+ $fields = explode('|', $table_fields);
+ $nb_fields = count($fields);
+ // Retrieve the data
+ if ( $option == 0 )
+ {
+ // Creation of the constructor
+ for ($i = 0; $i < $nb_fields; $i++)
+ {
+ $struct = explode(':', $fields[$i]);
+ if ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_INT);
+EOT;
+ } elseif ( $struct[1] == 'char' || $struct[1] == 'varchar' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTBOX);
+EOT;
+ } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_TXTAREA);';
+ } elseif ( $struct[1] == 'float' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_FLOAT);';
+ } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_DECIMAL);';
+ } elseif ( $struct[1] == 'enum' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_ENUM);';
+ } elseif ( $struct[1] == 'email' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_EMAIL);';
+ } elseif ( $struct[1] == 'url' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_URL);';
+ } elseif ( $struct[1] == 'date' || $struct[1] == 'datetime' || $struct[1] == 'timestamp' || $struct[1] == 'time' || $struct[1] == 'year' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_LTIME);';
+ }/* elseif ( $struct[1] == 'other' ) {
+ $ret .= <<<EOT
+ \$this->initVar(\''.$struct[0].'\', XOBJ_DTYPE_OTHER, '.$struct[2].', false);';
+ }*/
+ }
+ } else if ( $option == 1 ) {
+ // Creation form
+ for ($i=0; $i < $nb_fields; $i++)
+ {
+ if ( $i != 0 ) {
+ $struct = explode(':', $fields[$i]);
+ $lng_form = $language.strtoupper($struct[0]);
+ $ret .= <<<EOT
+ $this->form_elements($i, $mod_name, $table_name, $table_fieldname, $fpe, $fprf, $lng_form, $struct[0]);
+ }
+ }
+ } else if ( $option == 2 ) {
+ // Creation of file mysql.sql
+ $ret .= <<<EOT
+
+#
+# Structure table for `mod_'.$mod_name.'_'.strtolower($table_name).'` '.$nb_fields.'
+#
+
+CREATE TABLE `mod_'.$mod_name.'_'.strtolower($table_name).'` (
+';
+ $j = 0;
+ for ($i=0; $i < $nb_fields; $i++)
+ {
+ $struct = explode(':', $fields[$i]);
+// echo "--- START ----------------- STRUCTURE -------------------------------------</br>";
+// var_dump($struct);
+ //Debut
+ if ( $struct[0] != ' ' )
+ {
+ //If as text, (not value)
+ if ( $struct[1] == 'text' || $struct[1] == 'date' || $struct[1] == 'timestamp' ) {
+ $type = $struct[1];
+ } else {
+ $type = $struct[1].' ('.$struct[2].')';
+ }
+ //If as empty is default not string(not value), if as text not default, if as numeric default is 0 or 0.0000
+ //echo $struct[5]." struct[5] --------------- </br>";
+ if ( $struct[5] == '' ) {
+ $default = "default ''";
+ //echo " default 1 </br>";
+ } elseif ( $struct[1] == 'text' || $struct[1] == 'tinytext' || $struct[1] == 'mediumtext' || $struct[1] == 'longtext' ) {
+ $default = "";
+ // echo " default 2 </br>";
+ } elseif ( $struct[1] == 'int' || $struct[1] == 'tinyint' || $struct[1] == 'mediumint' || $struct[1] == 'smallint') {
+ $default = "default '0'";
+ //echo " default 3 </br>";
+ } elseif ( $struct[1] == 'decimal' || $struct[1] == 'double' || $struct[1] == 'float' ) {
+ $default = "default '0.0000'";
+ // echo " default 4 </br>";
+ } elseif ( $struct[1] == 'date' ) {
+ // echo " default 5 </br>";
+ $default = "default '0000-00-00'";
+ } elseif ( $struct[1] == 'datetime' || $struct[1] == 'timestamp') {
+ $default = "default '0000-00-00 00:00:00'";
+ //echo " default 6 </br>";
+ } elseif ( $struct[1] == 'time' ) {
+ $default = "default '00:00:00'";
+ // echo " default 7 </br>";
+ } elseif ( $struct[1] == 'year' ) {
+ $default = "default '0000'";
+ //echo " default 8 </br>";
+ } elseif ( $struct[1] == 'other' ) {
+ $default = "default '".$struct[5]."'";
+ //echo " default 9 </br>";
+ } else {
+ $default = "default ''";
+ //echo " default 10 </br>";
+ }
+
+// echo $default." Default </br>";
+// echo $struct[0]." struct[0] </br>";
+// echo $struct[6]." struct[6] </br>";
+
+ if ( $i == 0 ) {
+ $comma[$j] = 'PRIMARY KEY (`'.$struct[0].'`)';
+ $j++;
+ $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' auto_increment,
+';
+ } else {
+ if ( $struct[6] == 'unique' || $struct[6] == 'index' || $struct[6] == 'fulltext')
+ {
+ if ( $struct[6] == 'unique' ) {
+ $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
+';
+ $comma[$j] = 'KEY `'.$struct[0].'` (`'.$struct[0].'`)';
+ } else if ( $struct[6] == 'index' ) {
+ $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
+';
+ $comma[$j] = 'INDEX (`'.$struct[0].'`)';
+ } else if ( $struct[6] == 'fulltext' ) {
+ $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
+';
+ $comma[$j] = 'FULLTEXT KEY `'.$struct[0].'` (`'.$struct[0].'`)';
+ }
+ $j++;
+ } else {
+ $ret .= <<<EOT`'.$struct[0].'` '.$type.' '.$struct[3].' '.$struct[4].' '.$default.',
+';
+ }
+ }
+ }
+// echo $i."--- i -------</br>";
+// echo $j."--- j -------</br>";
+// var_dump($comma);
+// echo $comma[$i]."comma[i] </br>";
+// echo $text."</br>";
+ }
+ //Problem comma
+ $key = '';
+ for ($i=0; $i < $j; $i++)
+ {
+ if ( $i != $j - 1 ) {
+ $key .= $comma[$i].',
+';
+ } else {
+ $key .= $comma[$i].'
+';
+ }
+ }
+ // echo $key."================= KEY ========================= </br>";
+ $ret .= <<<EOT$key;
+ $ret .= <<<EOT) ENGINE=MyISAM;';
+ }
+ return $text;
+EOT;
+ return $ret;
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields_database.php 2014-03-04 19:20:06 UTC (rev 12346)
@@ -0,0 +1,250 @@
+<?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: fields_database.php 12258 2014-01-02 09:33:29Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) {
+ die('XOOPS root path not defined');
+}
+
+class FieldsDatabase /*extends HeaderFile*/
+{
+ /*
+ * @var string
+ */
+ public $_module = null;
+ /*
+ * @var string
+ */
+ public $_table = array();
+ /*
+ * @var string
+ */
+ public $file_name = null;
+ /*
+ * @public function constructor
+ * @param string $modules
+ */
+ public function __construct($module, $table, $file_name) {
+ $this->_module = $module;
+ $this->_table[] = $table;
+ $this->file_name =...
[truncated message content] |
|
From: <txm...@us...> - 2014-04-13 07:52:05
|
Revision: 12443
http://sourceforge.net/p/xoops/svn/12443
Author: txmodxoops
Date: 2014-04-13 07:51:58 +0000 (Sun, 13 Apr 2014)
Log Message:
-----------
Added custom themeform in subdirectory
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/themeform.php
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/index.html 2014-04-13 07:51:58 UTC (rev 12443)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/themeform.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/themeform.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/form/themeform.php 2014-04-13 07:51:58 UTC (rev 12443)
@@ -0,0 +1,65 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 themeform.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+xoops_load('XoopsFormLoader');
+
+/**
+ * Form that will output as a theme-enabled HTML table
+ *
+ * Also adds JavaScript to validate required fields
+ */
+class TDMCreateThemeForm extends XoopsForm
+{
+ /**
+ * create HTML to output the form as a theme-enabled table with validation.
+ *
+ * YOU SHOULD AVOID TO USE THE FOLLOWING Nocolspan METHOD, IT WILL BE REMOVED
+ *
+ * To use the noColspan simply use the following example:
+ *
+ * $colspan = new XoopsFormDhtmlTextArea( '', 'key', $value, '100%', '100%' );
+ * $colspan->setNocolspan();
+ * $form->addElement( $colspan );
+ *
+ * @return string
+ */
+ public function render()
+ {
+ $ele_name = $this->getName();
+ $ret = ($this->getTitle() ? '<div class=" center head ">' . $this->getTitle() . '</div>' : '');
+ $ret .= NWLINE . '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $this->getExtra() . '>' . NWLINE;
+ $hidden = '';
+ $class = 'even';
+ foreach ($this->getElements() as $ele) {
+ if (!is_object($ele)) {
+ $ret .= $ele;
+ } else if (!$ele->isHidden()) {
+ $ret .= $ele->render();
+ } else {
+ $hidden .= $ele->render();
+ }
+ }
+ $ret .= NWLINE . ' ' . $hidden . NWLINE . '</form>';
+ $ret .= $this->renderValidationJS(true);
+ return $ret;
+ }
+}
\ No newline at end of file
|
|
From: <txm...@us...> - 2014-06-21 17:07:43
|
Revision: 12623
http://sourceforge.net/p/xoops/svn/12623
Author: txmodxoops
Date: 2014-06-21 17:07:35 +0000 (Sat, 21 Jun 2014)
Log Message:
-----------
- Fixed bugs
- Updated
- Work in progress
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/mysql.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-21 16:51:00 UTC (rev 12622)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-21 17:07:35 UTC (rev 12623)
@@ -91,8 +91,8 @@
* @public function getForm
*
* @param integer $field_mid
- * @param integer $f_tid
- * @param integer $f_numb
+ * @param integer $field_tid
+ * @param integer $field_numb
* @param string $f_name
* @param mixed $action
*/
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php 2014-06-21 16:51:00 UTC (rev 12622)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/pages.php 2014-06-21 17:07:35 UTC (rev 12623)
@@ -88,7 +88,7 @@
case 'list':
default:
\$limit = xoops_getModuleOption('adminpager');
- \$start = TDMCreate_CleanVars(\$_REQUEST, 'start', 0);
+ \$start = {$module_name}_CleanVars(\$_REQUEST, 'start', 0);
\$adminMenu->addItemButton({$language}ADD_{$stu_table_name}, '{$table_name}.php?op=new', 'add');
echo \$adminMenu->renderButton();
\$criteria = new CriteriaCompo();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/mysql.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/mysql.php 2014-06-21 16:51:00 UTC (rev 12622)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/sql/mysql.php 2014-06-21 17:07:35 UTC (rev 12623)
@@ -87,6 +87,8 @@
* @param string $module_name
* @param string $table_name
* @param integer $nb_fields
+ *
+ * Unused IF NOT EXISTS
*/
public function getHeadDatabaseTable($module_name, $table_name, $nb_fields)
{
@@ -96,7 +98,7 @@
# Structure table for `mod_{$module_name}_{$table_name}` {$nb_fields}
#
-CREATE TABLE IF NOT EXISTS `mod_{$module_name}_{$table_name}` (\n
+CREATE TABLE `mod_{$module_name}_{$table_name}` (\n
SQL;
return $ret;
}
|
|
From: <txm...@us...> - 2014-06-24 21:03:37
|
Revision: 12643
http://sourceforge.net/p/xoops/svn/12643
Author: txmodxoops
Date: 2014-06-24 21:03:34 +0000 (Tue, 24 Jun 2014)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldattributes.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -44,6 +44,6 @@
{
function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fieldattributes', 'tdmcreatefieldattributes', 'fieldattribute_name', 'fieldattribute_value');
+ parent::__construct($db, 'tdmcreate_fieldattributes', 'tdmcreatefieldattributes', 'fieldattribute_name', 'fieldattribute_value');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldelements.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -76,6 +76,6 @@
*/
public function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
+ parent::__construct($db, 'tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldkey.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -44,6 +44,6 @@
{
function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fieldkey', 'tdmcreatefieldkey', 'fieldkey_name', 'fieldkey_value');
+ parent::__construct($db, 'tdmcreate_fieldkey', 'tdmcreatefieldkey', 'fieldkey_name', 'fieldkey_value');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldnull.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -44,6 +44,6 @@
{
function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fieldnull', 'tdmcreatefieldnull', 'fieldnull_name', 'fieldnull_value');
+ parent::__construct($db, 'tdmcreate_fieldnull', 'tdmcreatefieldnull', 'fieldnull_name', 'fieldnull_value');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -257,7 +257,7 @@
*/
public function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_name');
+ parent::__construct($db, 'tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_name');
}
/**
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fieldtype.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -44,6 +44,6 @@
{
function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_fieldtype', 'tdmcreatefieldtype', 'fieldtype_name', 'fieldtype_value');
+ parent::__construct($db, 'tdmcreate_fieldtype', 'tdmcreatefieldtype', 'fieldtype_name', 'fieldtype_value');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -299,6 +299,6 @@
*/
public function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_modules', 'tdmcreatemodules', 'mod_id', 'mod_name');
+ parent::__construct($db, 'tdmcreate_modules', 'tdmcreatemodules', 'mod_id', 'mod_name');
}
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-06-24 20:57:46 UTC (rev 12642)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-06-24 21:03:34 UTC (rev 12643)
@@ -242,6 +242,6 @@
*/
public function __construct(&$db)
{
- parent::__construct($db, 'mod_tdmcreate_tables', 'tdmcreatetables', 'table_id', 'table_name');
+ parent::__construct($db, 'tdmcreate_tables', 'tdmcreatetables', 'table_id', 'table_name');
}
}
\ No newline at end of file
|
|
From: <txm...@us...> - 2014-06-24 22:36:23
|
Revision: 12645
http://sourceforge.net/p/xoops/svn/12645
Author: txmodxoops
Date: 2014-06-24 22:36:12 +0000 (Tue, 24 Jun 2014)
Log Message:
-----------
- solved issues for modules without tables
- fixed bugs
- still work to do
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-24 21:35:40 UTC (rev 12644)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-06-24 22:36:12 UTC (rev 12645)
@@ -89,6 +89,7 @@
$tables = $this->tdmcreate->getHandler('tables')->getObjects($criteria_tables);
unset($criteria_tables);
//
+ $table = null;
foreach (array_keys($tables) as $t)
{
$table_id = $tables[$t]->getVar('table_id');
@@ -113,18 +114,20 @@
$this->structure->makeDir($targetDirectory);
// Copied of index.html file in "root module" folder
$this->structure->copyFile('', $indexFile, 'index.html');
- if ( $table->getVar('table_admin') == 1) {
- // Creation of "admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
+ if (is_object($table)) {
+ if ( $table->getVar('table_admin') == 1) {
+ // Creation of "admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('admin', $indexFile, 'index.html');
+ }
+ if ( $table->getVar('table_blocks') == 1) {
+ // Creation of "blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
+ }
+ if ( $table->getVar('table_name') != null) {
+ // Creation of "class" folder and index.html file
+ $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
+ }
}
- if ( $table->getVar('table_blocks') == 1) {
- // Creation of "blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('blocks', $indexFile, 'index.html');
- }
- if ( $table->getVar('table_name') != null) {
- // Creation of "class" folder and index.html file
- $this->structure->makeDirAndCopyFile('class', $indexFile, 'index.html');
- }
// Creation of "assets" folder and index.html file
$this->structure->makeDirAndCopyFile('assets', $indexFile, 'index.html');
// Creation of "css" folder and index.html file
@@ -164,22 +167,24 @@
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language'], $indexFile, 'index.html');
// Creation of "language/local_language/help" folder and index.html file
$this->structure->makeDirAndCopyFile('language/'.$GLOBALS['xoopsConfig']['language']. '/help', $indexFile, 'index.html');
- if (( $table->getVar('table_user') == 1) || ( $table->getVar('table_admin') == 1 )) {
- // Creation of "templates" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
+ if (is_object($table)) {
+ if (( $table->getVar('table_user') == 1) || ( $table->getVar('table_admin') == 1 )) {
+ // Creation of "templates" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates', $indexFile, 'index.html');
+ }
+ if ( $table->getVar('table_admin') == 1 ) {
+ // Creation of "templates/admin" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
+ }
+ if ( $table->getVar('table_blocks') == 1 ) {
+ // Creation of "templates/blocks" folder and index.html file
+ $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
+ }
+ if ( $table->getVar('table_name') != null ) {
+ // Creation of "sql" folder and index.html file
+ $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
+ }
}
- if ( $table->getVar('table_admin') == 1 ) {
- // Creation of "templates/admin" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/admin', $indexFile, 'index.html');
- }
- if ( $table->getVar('table_blocks') == 1 ) {
- // Creation of "templates/blocks" folder and index.html file
- $this->structure->makeDirAndCopyFile('templates/blocks', $indexFile, 'index.html');
- }
- if ( $table->getVar('table_name') != null ) {
- // Creation of "sql" folder and index.html file
- $this->structure->makeDirAndCopyFile('sql', $indexFile, 'index.html');
- }
}
/*
@@ -199,6 +204,7 @@
unset($criteria_tables);
$ret = array();
//
+ $table = null;
foreach (array_keys($tables) as $t)
{
$table_mid = $tables[$t]->getVar('table_mid');
@@ -261,151 +267,153 @@
/*var_dump($table_name); */
}
// Creation of blocks language file
- if ( $table->getVar('table_blocks') == 1) {
- // Language Blocks File
- $languageBlocks = LanguageBlocks::getInstance();
- $languageBlocks->write($module, $tables, 'blocks.php');
- $ret[] = $languageBlocks->render();
- }
- // Language Modinfo File
- $languageModinfo = LanguageModinfo::getInstance();
- $languageModinfo->write($module, $table, $tables, 'modinfo.php');
- $ret[] = $languageModinfo->render();
- // Creation of admin files
- if ( $table->getVar('table_admin') == 1) {
- // Admin Header File
- $adminHeader = AdminHeader::getInstance();
- $adminHeader->write($module, $table, $tables, 'header.php');
- $ret[] = $adminHeader->render();
- // Admin Index File
- $adminIndex = AdminIndex::getInstance();
- $adminIndex->write($module, $tables, 'index.php');
- $ret[] = $adminIndex->render();
- // Admin Menu File
- $adminMenu = AdminMenu::getInstance();
- $adminMenu->write($module, $tables, 'menu.php');
- $ret[] = $adminMenu->render();
- // Creation of admin permission file
- if (( $table->getVar('table_permissions') == 1)) {
- // Admin Permissions File
- $adminPermissions = AdminPermissions::getInstance();
- $adminPermissions->write($module, $tables, 'permissions.php');
- $ret[] = $adminPermissions->render();
+ if (is_object($table)) {
+ if ( $table->getVar('table_blocks') == 1) {
+ // Language Blocks File
+ $languageBlocks = LanguageBlocks::getInstance();
+ $languageBlocks->write($module, $tables, 'blocks.php');
+ $ret[] = $languageBlocks->render();
+ }
+ // Language Modinfo File
+ $languageModinfo = LanguageModinfo::getInstance();
+ $languageModinfo->write($module, $table, $tables, 'modinfo.php');
+ $ret[] = $languageModinfo->render();
+ // Creation of admin files
+ if ( $table->getVar('table_admin') == 1) {
+ // Admin Header File
+ $adminHeader = AdminHeader::getInstance();
+ $adminHeader->write($module, $table, $tables, 'header.php');
+ $ret[] = $adminHeader->render();
+ // Admin Index File
+ $adminIndex = AdminIndex::getInstance();
+ $adminIndex->write($module, $tables, 'index.php');
+ $ret[] = $adminIndex->render();
+ // Admin Menu File
+ $adminMenu = AdminMenu::getInstance();
+ $adminMenu->write($module, $tables, 'menu.php');
+ $ret[] = $adminMenu->render();
+ // Creation of admin permission file
+ if (( $table->getVar('table_permissions') == 1)) {
+ // Admin Permissions File
+ $adminPermissions = AdminPermissions::getInstance();
+ $adminPermissions->write($module, $tables, 'permissions.php');
+ $ret[] = $adminPermissions->render();
+ }
+ // Admin Aboutr File
+ $adminAbout = AdminAbout::getInstance();
+ $adminAbout->write($module, 'about.php');
+ $ret[] = $adminAbout->render();
+ // Admin Footer File
+ $adminFooter = AdminFooter::getInstance();
+ $adminFooter->write($module, 'footer.php');
+ $ret[] = $adminFooter->render();
+ // Language Admin File
+ $languageAdmin = LanguageAdmin::getInstance();
+ $languageAdmin->write($module, $tables, 'admin.php');
+ $ret[] = $languageAdmin->render();
+ // Templates Index File
+ $adminTemplatesAbout = TemplatesAdminAbout::getInstance();
+ $adminTemplatesAbout->write($module, $stl_mod_name.'_about.tpl');
+ $ret[] = $adminTemplatesAbout->render();
+ // Templates Index File
+ $adminTemplatesIndex = TemplatesAdminIndex::getInstance();
+ $adminTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
+ $ret[] = $adminTemplatesIndex->render();
+ // Templates Footer File
+ $adminTemplatesFooter = TemplatesAdminFooter::getInstance();
+ $adminTemplatesFooter->write($module, $stl_mod_name.'_footer.tpl');
+ $ret[] = $adminTemplatesFooter->render();
+ // Templates Header File
+ $adminTemplatesHeader = TemplatesAdminHeader::getInstance();
+ $adminTemplatesHeader->write($module, $stl_mod_name.'_header.tpl');
+ $ret[] = $adminTemplatesHeader->render();
+ }
+ // Creation of notifications files
+ if ( $table->getVar('table_notifications') == 1 ) {
+ // Include Notifications File
+ $includeNotifications = IncludeNotifications::getInstance();
+ $includeNotifications->write($module, $table, 'notifications.php');
+ $ret[] = $includeNotifications->render();
}
- // Admin Aboutr File
- $adminAbout = AdminAbout::getInstance();
- $adminAbout->write($module, 'about.php');
- $ret[] = $adminAbout->render();
- // Admin Footer File
- $adminFooter = AdminFooter::getInstance();
- $adminFooter->write($module, 'footer.php');
- $ret[] = $adminFooter->render();
- // Language Admin File
- $languageAdmin = LanguageAdmin::getInstance();
- $languageAdmin->write($module, $tables, 'admin.php');
- $ret[] = $languageAdmin->render();
- // Templates Index File
- $adminTemplatesAbout = TemplatesAdminAbout::getInstance();
- $adminTemplatesAbout->write($module, $stl_mod_name.'_about.tpl');
- $ret[] = $adminTemplatesAbout->render();
- // Templates Index File
- $adminTemplatesIndex = TemplatesAdminIndex::getInstance();
- $adminTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
- $ret[] = $adminTemplatesIndex->render();
- // Templates Footer File
- $adminTemplatesFooter = TemplatesAdminFooter::getInstance();
- $adminTemplatesFooter->write($module, $stl_mod_name.'_footer.tpl');
- $ret[] = $adminTemplatesFooter->render();
- // Templates Header File
- $adminTemplatesHeader = TemplatesAdminHeader::getInstance();
- $adminTemplatesHeader->write($module, $stl_mod_name.'_header.tpl');
- $ret[] = $adminTemplatesHeader->render();
- }
- // Creation of notifications files
- if ( $table->getVar('table_notifications') == 1 ) {
- // Include Notifications File
- $includeNotifications = IncludeNotifications::getInstance();
- $includeNotifications->write($module, $table, 'notifications.php');
- $ret[] = $includeNotifications->render();
- }
- // Include Install File
- $includeInstall = IncludeInstall::getInstance();
- $includeInstall->write($module, $tables, 'install.php');
- $ret[] = $includeInstall->render();
- // Creation of sql file
- if ( $table->getVar('table_name') != null) {
- // Sql File
- $sqlFile = SqlFile::getInstance();
- $sqlFile->write($module, $tables, 'mysql.sql');
- $ret[] = $sqlFile->render();
- }
- // Creation of search file
- if ( $table->getVar('table_search') == 1) {
- // Include Search File
- $includeSearch = IncludeSearch::getInstance();
- $includeSearch->write($module, $table, 'search.php');
- $ret[] = $includeSearch->render();
- }
- // Creation of comments files
- if ( $table->getVar('table_comments') == 1) {
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_edit');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_delete');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_post');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_reply');
- // Include Comments File
- $includeComments = IncludeComments::getInstance();
- $includeComments->write($module, $table);
- $ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
- }
- // Creation of user files
- if ( ($table->getVar('table_user') == 1)) {
- // Templates Index File
- $userTemplatesIndex = TemplatesUserIndex::getInstance();
- $userTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
- $ret[] = $userTemplatesIndex->render();
- // Templates Footer File
- $userTemplatesFooter = TemplatesUserFooter::getInstance();
- $userTemplatesFooter->write($module, $table, $stl_mod_name.'_footer.tpl');
- $ret[] = $userTemplatesFooter->render();
- // Templates Header File
- $userTemplatesHeader = TemplatesUserHeader::getInstance();
- $userTemplatesHeader->write($module, $tables, $stl_mod_name.'_header.tpl');
- $ret[] = $userTemplatesHeader->render();
- // User Footer File
- $userFooter = UserFooter::getInstance();
- $userFooter->write($module, 'footer.php');
- $ret[] = $userFooter->render();
- // User Header File
- $userHeader = UserHeader::getInstance();
- $userHeader->write($module, 'header.php');
- $ret[] = $userHeader->render();
- // User Notification Update File
- if ( ($table->getVar('table_notifications') == 1 )) {
- $userNotificationUpdate = UserNotificationUpdate::getInstance();
- $userNotificationUpdate->write($module, 'notification_update.php');
- $ret[] = $userNotificationUpdate->render();
- }
- // User Index File
- $userIndex = UserIndex::getInstance();
- $userIndex->write($module, 'index.php');
- $ret[] = $userIndex->render();
- // Language Main File
- $languageMain = LanguageMain::getInstance();
- $languageMain->write($module, $table, $tables, 'main.php');
- $ret[] = $languageMain->render();
- }
+ // Include Install File
+ $includeInstall = IncludeInstall::getInstance();
+ $includeInstall->write($module, $tables, 'install.php');
+ $ret[] = $includeInstall->render();
+ // Creation of sql file
+ if ( $table->getVar('table_name') != null) {
+ // Sql File
+ $sqlFile = SqlFile::getInstance();
+ $sqlFile->write($module, $tables, 'mysql.sql');
+ $ret[] = $sqlFile->render();
+ }
+ // Creation of search file
+ if ( $table->getVar('table_search') == 1) {
+ // Include Search File
+ $includeSearch = IncludeSearch::getInstance();
+ $includeSearch->write($module, $table, 'search.php');
+ $ret[] = $includeSearch->render();
+ }
+ // Creation of comments files
+ if ( $table->getVar('table_comments') == 1) {
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_edit');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_delete');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_post');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsIncludes($module, 'comment_reply');
+ // Include Comments File
+ $includeComments = IncludeComments::getInstance();
+ $includeComments->write($module, $table);
+ $ret[] = $includeComments->renderCommentsNew($module, 'comment_new');
+ }
+ // Creation of user files
+ if ( ($table->getVar('table_user') == 1)) {
+ // Templates Index File
+ $userTemplatesIndex = TemplatesUserIndex::getInstance();
+ $userTemplatesIndex->write($module, $stl_mod_name.'_index.tpl');
+ $ret[] = $userTemplatesIndex->render();
+ // Templates Footer File
+ $userTemplatesFooter = TemplatesUserFooter::getInstance();
+ $userTemplatesFooter->write($module, $table, $stl_mod_name.'_footer.tpl');
+ $ret[] = $userTemplatesFooter->render();
+ // Templates Header File
+ $userTemplatesHeader = TemplatesUserHeader::getInstance();
+ $userTemplatesHeader->write($module, $tables, $stl_mod_name.'_header.tpl');
+ $ret[] = $userTemplatesHeader->render();
+ // User Footer File
+ $userFooter = UserFooter::getInstance();
+ $userFooter->write($module, 'footer.php');
+ $ret[] = $userFooter->render();
+ // User Header File
+ $userHeader = UserHeader::getInstance();
+ $userHeader->write($module, 'header.php');
+ $ret[] = $userHeader->render();
+ // User Notification Update File
+ if ( ($table->getVar('table_notifications') == 1 )) {
+ $userNotificationUpdate = UserNotificationUpdate::getInstance();
+ $userNotificationUpdate->write($module, 'notification_update.php');
+ $ret[] = $userNotificationUpdate->render();
+ }
+ // User Index File
+ $userIndex = UserIndex::getInstance();
+ $userIndex->write($module, 'index.php');
+ $ret[] = $userIndex->render();
+ // Language Main File
+ $languageMain = LanguageMain::getInstance();
+ $languageMain->write($module, $table, $tables, 'main.php');
+ $ret[] = $languageMain->render();
+ }
+ }
// Class Helper File
$classHelper = ClassHelper::getInstance();
$classHelper->write($module, 'helper.php');
@@ -422,7 +430,7 @@
$includeFunctions = IncludeFunctions::getInstance();
$includeFunctions->write($module, 'functions.php');
$ret[] = $includeFunctions->render();
- // Docs Changelog File
+ // Docs Changelog File
$docsChangelog = DocsChangelog::getInstance();
$docsChangelog->write($module, 'changelog.txt');
$ret[] = $docsChangelog->render();
@@ -433,7 +441,7 @@
// Include Jquery File
$includeJquery = IncludeJquery::getInstance();
$includeJquery->write($module, 'functions.js');
- $ret[] = $includeJquery->render();
+ $ret[] = $includeJquery->render();
// User Xoops Version File
$userXoopsVersion = UserXoopsVersion::getInstance();
$userXoopsVersion->write($module, $table, $tables, 'xoops_version.php');
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-24 21:35:40 UTC (rev 12644)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-06-24 22:36:12 UTC (rev 12645)
@@ -645,30 +645,32 @@
$module_name = $module->getVar('mod_name');
$language = $this->getLanguage($module_name, 'MI');
$content = $this->getHeaderFilesComments($module, $filename);
- $content .= $this->getXoopsVersionHeader($module, $table, $language);
- $content .= $this->getXoopsVersionMySQL($module_name, $table);
- if ($table->getVar('table_search') == 1) {
- $content .= $this->getXoopsVersionSearch($module);
+ $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ if (is_object($table)) {
+ $content .= $this->getXoopsVersionMySQL($module_name, $table);
+ if ($table->getVar('table_search') == 1) {
+ $content .= $this->getXoopsVersionSearch($module);
+ }
+ if ($table->getVar('table_comments') == 1) {
+ $content .= $this->getXoopsVersionComments($module);
+ }
+ if($table->getVar('table_admin') == 1) {
+ $content .= $this->getXoopsVersionTemplatesAdmin($module_name);
+ }
+ if($table->getVar('table_user') == 1) {
+ $content .= $this->getXoopsVersionTemplatesUser($module_name);
+ }
+ if ($table->getVar('table_submenu') == 1) {
+ $content .= $this->getXoopsVersionSubmenu($language);
+ }
+ if ($table->getVar('table_blocks') == 1) {
+ $content .= $this->getXoopsVersionBlocks($module_name, $language);
+ }
+ $content .= $this->getXoopsVersionConfig($module, $table, $language);
+ if ($table->getVar('table_notifications') == 1) {
+ $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
+ }
}
- if ($table->getVar('table_comments') == 1) {
- $content .= $this->getXoopsVersionComments($module);
- }
- if($table->getVar('table_admin') == 1) {
- $content .= $this->getXoopsVersionTemplatesAdmin($module_name);
- }
- if($table->getVar('table_user') == 1) {
- $content .= $this->getXoopsVersionTemplatesUser($module_name);
- }
- if ($table->getVar('table_submenu') == 1) {
- $content .= $this->getXoopsVersionSubmenu($language);
- }
- if ($table->getVar('table_blocks') == 1) {
- $content .= $this->getXoopsVersionBlocks($module_name, $language);
- }
- $content .= $this->getXoopsVersionConfig($module, $table, $language);
- if ($table->getVar('table_notifications') == 1) {
- $content .= $this->getXoopsVersionNotifications($module, $language, $filename);
- }
$this->tdmcfile->create($module_name, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
return $this->tdmcfile->renderFile();
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-06-24 21:35:40 UTC (rev 12644)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-06-24 22:36:12 UTC (rev 12645)
@@ -166,7 +166,7 @@
$this_image = $this->getVar('mod_image');
$mod_image = $this_image ? $this_image : 'empty.png';
- $uploadirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules';
+ $uploadirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/repository';
$imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br />');
$imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . strtolower($uploadirectory) . '/');
$imageselect= new XoopsFormSelect($imgpath, 'mod_image', $mod_image);
|