From: <be...@us...> - 2012-01-30 09:38:05
|
Revision: 8834 http://xoops.svn.sourceforge.net/xoops/?rev=8834&view=rev Author: beckmi Date: 2012-01-30 09:37:51 +0000 (Mon, 30 Jan 2012) Log Message: ----------- Updating to 1.38 Alpha 5 Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/const.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_include_search.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_main_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_modinfo_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/modinfo.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/menu.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_about_language.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class_admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_css_admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/logo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help/index.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/arabic/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help/index.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/bulgarian/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help/ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help/help.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help/index.html XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/french/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/help.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/update language 1.1 to 1.37.txt Removed Paths: ------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/object.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/feedsLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/gviewLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/passgenLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/radiostreamLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/modules/videostreamLogo.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/broken.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/cat.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/contact.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/feed.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/links.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/param.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/radio.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/shoutbox.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/topic.png XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/images/uploads/tables/video.png Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/const.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/const.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/const.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -27,28 +27,25 @@ $op = TDMCreate_CleanVars($_REQUEST, 'op', 'default', 'string'); -//Nom du module -$modules =& $modulesHandler->get($_REQUEST['modules_name']); -$modules_name = $modules->getVar('modules_name'); -$modules_desc = $modules->getVar('modules_description'); -$modules_author_website_name = $modules->getVar('modules_author_website_name'); -$modules_author_website_url = $modules->getVar('modules_author_website_url'); -$modules_image = $modules->getVar('modules_image'); - -//Nom des tables et combien de tables -$criteria = new CriteriaCompo(); -$criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name'])); -$nb_tables = $tablesHandler->getCount($criteria); -$tables_arr = $tablesHandler->getall($criteria); - $modPath = XOOPS_ROOT_PATH.'/modules/TDMCreate'; switch ($op) { case "creation": - + $modules =& $modulesHandler->get($_REQUEST['modules_name']); + $modules_name = $modules->getVar('modules_name'); + $modules_desc = $modules->getVar('modules_description'); + $modules_author_website_name = $modules->getVar('modules_author_website_name'); + $modules_author_website_url = $modules->getVar('modules_author_website_url'); + $modules_image = $modules->getVar('modules_image'); //Effacer repertoire du nouveau module s'il existe - clearDir($modPath.'/modules/'.$modules_name); + clearDir($modPath.'/modules/'.$modules_name); + //Nom des tables et combien de tables + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name'])); + $nb_tables = $tablesHandler->getCount($criteria); + $tables_arr = $tablesHandler->getall($criteria); + //Debut echo '<table width="100%" cellspacing="1" class="outer">'; /************************************************/ @@ -115,9 +112,21 @@ const_blocks_templates($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres); } } + //Variables + $tables_id = $tablesHandler->getVar('tables_id'); + $tables_name = $tablesHandler->getVar('tables_name'); + $tables_module_table = $tablesHandler->getVar('tables_module_table'); + $tables_img = $tablesHandler->getVar('tables_img'); + $tables_champs = $tablesHandler->getVar('tables_champs'); + $tables_parametres = $tablesHandler->getVar('tables_parametres'); + $tables_blocks = $tablesHandler->getVar('tables_blocks'); + $tables_display_admin = $tablesHandler->getVar('tables_display_admin'); + $tables_display_user = $tablesHandler->getVar('tables_display_user'); + $tables_search = $tablesHandler->getVar('tables_search'); + $tables_coms = $tablesHandler->getVar('tables_coms'); //Creation de xoopsversion.php /*Mettre xoops version vers la fin pour integrer les bloc, etc*/ - const_xoopsversion($modules, $modules_name, $tables_blocks, $tables_arr, $tables_module_table); + const_xoopsversion($modules, $modules_name, $tables_blocks, $tables_arr, $tables_module_table, $tables_parametres); // Creation of template index const_templates_index($modules, $modules_name, $tables_name, $tables_module_table, $tables_champs, $tables_parametres); // Creation of template header @@ -129,6 +138,7 @@ // Creation of template admin help const_templates_admin_help($modules, $modules_name); //Creation du fichier permissions + $topic = 0; if ( $topic == 1 || $tables_module_table != null) { // const_admin_permissions($modules, $modules_name, $tables_arr, $topic); } @@ -146,11 +156,11 @@ //Language /////////////////////////////////////////////////////////////////////// //Creation du language main.php - const_main_language($modules, $modules_name); + const_main_language($modules, $modules_name, $modules_desc); //Creation du language modinfo.php - const_modinfo_language($modules, $modules_name); + const_modinfo_language($modules, $modules_name, $modules_desc); //Creation du language admin.php - const_admin_language($modules, $modules_name); + const_admin_language($modules, $modules_name, $modules_desc); //Creation du language blocks.php const_blocks_language($modules, $modules_name); //Creation du language help.php @@ -194,12 +204,12 @@ $modules_select->addOptionArray($modulesHandler->getList()); $form->addElement($modules_select, true); - foreach (array_keys($tables_arr) as $i) + /*foreach (array_keys($tables_arr) as $i) { //Variables $tables_name = $tables_arr[$i]->getVar('tables_name'); - } - + }*/ + $tables_name = $tablesHandler->getVar('tables_name'); $tables_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', $tables_name, 4); $tables_select->addOptionArray($tablesHandler->getList()); $form->addElement($tables_select, false); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/filesmanager.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -37,11 +37,21 @@ */ include 'admin_header.php'; xoops_cp_header(); + +// Get Action type +$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' ); + +xoops_load('XoopsFile'); +XoopsFile::load('file'); + +switch ($op) { + default: + echo '<br class="clear" /> <div class="spacer"> <table class="outer ui-corner-all" cellspacing="1"> <tr> - <th><{$smarty.const._AM_TDMCREATE_YOUR_MODULES}></th> + <th>'._AM_TDMCREATE_YOUR_MODULES.'</th> <th> </th> </tr> <tr> @@ -54,7 +64,26 @@ </td> </tr> </table> - <br class="clear" /> </div>'; + + break; + + //save + case 'filemanager_save': + + break; + + case 'filemanager_upload_save': + + break; + + case 'filemanager_add_dir_save': + + break; + + case 'filemanager_add_file_save': + + break; +} include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -52,11 +52,15 @@ $obj->setVar('tables_blocs', 0); $obj->setVar('tables_display_admin', 1); $obj->setVar('tables_display_user', 1); + $obj->setVar('tables_submitter', 0); + $obj->setVar('tables_date_created', 0); + $obj->setVar('tables_online', 0); $obj->setVar('tables_search', 0); $obj->setVar('tables_coms', 0); $obj->setVar('tables_nb_champs', 7); - $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; + $tables_champs = 'topic_id:int:11:unsigned:NOT NULL: :|topic_pid:int:5:unsigned:NOT NULL:0:|topic_title:varchar:255: :NOT NULL: :|topic_desc:text: : :NOT NULL: :|topic_img:varchar:255: :NOT NULL: :|topic_weight:int:5: :NOT NULL:0:|topic_color:varchar:10: :NULL: :'; + $tables_parametres = 'XoopsFormTopic:0:0:0:0:0:0|XoopsFormText:1:1:0:1:0:1|XoopsFormTextArea:0:1:0:0:0:1|XoopsFormUploadImage:1:1:0:0:0:0|XoopsFormText:1:1:0:0:0:1|XoopsFormColorPicker:1:1:0:0:0:0|XoopsFormSelectBox:0:0:0:0:0:1|XoopsFormSelectUser:0:0:0:0:0:1|XoopsFormTextDateSelect:0:0:0:0:0:1|XoopsFormCheckBox:1:1:0:0:0:1'; //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; @@ -90,6 +94,9 @@ $obj->setVar('tables_blocs', $_REQUEST['tables_blocs']); $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_date_created', $_REQUEST['tables_date_created']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); $obj->setVar('tables_search', $_REQUEST['tables_search']); $obj->setVar('tables_coms', $_REQUEST['tables_coms']); $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); @@ -103,7 +110,7 @@ $tables_parametres .= ( !empty($_REQUEST['champs_param_elements'][$i]) ) ? "".$_REQUEST['champs_param_elements'][$i].":" : " :"; $tables_parametres .= ( !empty($_REQUEST['champs_param_display_admin'][$i]) ) ? "1:" : "0:"; $tables_parametres .= ( !empty($_REQUEST['champs_param_display_user'][$i]) ) ? "1:" : "0:"; - $tables_parametres .= ( !empty($_REQUEST['champs_param_display_blocs'][$i]) ) ? "1:" : "0:"; + $tables_parametres .= ( !empty($_REQUEST['champs_param_display_blocks'][$i]) ) ? "1:" : "0:"; $tables_parametres .= ( $i == $_REQUEST['champs_param_main_field']) ? "1:" : "0:"; $tables_parametres .= ( !empty($_REQUEST['champs_param_search_field'][$i]) ) ? "1:" : "0:"; $tables_parametres .= ( !empty($_REQUEST['champs_param_required_field'][$i]) ) ? "1" : "0"; @@ -115,7 +122,7 @@ $tables_champs .= (!empty($_REQUEST['champs_valeur'][$i])) ? "".$_REQUEST['champs_valeur'][$i].":" : " :"; $tables_champs .= (!empty($_REQUEST['champs_attributs'][$i])) ? "".$_REQUEST['champs_attributs'][$i].":" : " :"; $tables_champs .= (!empty($_REQUEST['champs_null'][$i])) ? "".strtoupper($_REQUEST['champs_null'][$i]).":" : " :"; - //$tables_champs .= (!empty($_REQUEST['champs_default'][$i])) ? "".$_REQUEST['champs_default'][$i].":" : " :"; + $tables_champs .= (!empty($_REQUEST['champs_default'][$i])) ? "".$_REQUEST['champs_default'][$i].":" : " :"; $tables_champs .= (!empty($_REQUEST['champs_clef'][$i])) ? "".$_REQUEST['champs_clef'][$i]."" : " "; //Coupure entre les champs et coupre entre les parametres @@ -124,7 +131,7 @@ if ( $i != 0 ) $tables_parametres .= '|'; } else { - $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1'; + $tables_parametres .= '|XoopsFormSelectBox:1:1:1:0:0:1|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1'; } } } @@ -156,6 +163,9 @@ $tables_blocks = (isset($_REQUEST['tables_blocs'])) ? $_REQUEST['tables_blocs'] : '0'; $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0'; $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0'; + $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0'; + $tables_date_created = (isset($_REQUEST['tables_date_created'])) ? $_REQUEST['tables_date_created'] : '0'; + $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0'; $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0'; $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0'; $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0'; @@ -190,6 +200,9 @@ $obj->setVar('tables_blocs', $_REQUEST['tables_blocs']); $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_date_created', $_REQUEST['tables_date_created']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); //mettre des isset pour search if ( isset($_REQUEST['tables_search']) ) $obj->setVar('tables_search', $_REQUEST['tables_search']); @@ -336,6 +349,9 @@ $tables_blocks = (isset($_REQUEST['tables_blocs'])) ? $_REQUEST['tables_blocs'] : '0'; $tables_display_admin = (isset($_REQUEST['tables_display_admin'])) ? $_REQUEST['tables_display_admin'] : '0'; $tables_display_user = (isset($_REQUEST['tables_display_user'])) ? $_REQUEST['tables_display_user'] : '0'; + $tables_submitter = (isset($_REQUEST['tables_submitter'])) ? $_REQUEST['tables_submitter'] : '0'; + $tables_date_created = (isset($_REQUEST['tables_date_created'])) ? $_REQUEST['tables_date_created'] : '0'; + $tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0'; $tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0'; $tables_coms = (isset($_REQUEST['tables_coms'])) ? $_REQUEST['tables_coms'] : '0'; $select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0'; @@ -398,7 +414,7 @@ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE tables_name = 'topic'"); list( $topic ) = $xoopsDB->fetchRow($result); - $obj =& $tablesHandler->get($_REQUEST['tables_id']); + $obj =& $tablesHandler->get(isset($_REQUEST['tables_id'])); if ( $topic >= 0 ) { $form = $obj->getFormTopic(); } @@ -477,7 +493,7 @@ $tables_modules = $tables_arr[$i]->getVar('tables_modules'); $tables_name = $tables_arr[$i]->getVar('tables_name'); $tables_img = $tables_arr[$i]->getVar('tables_img'); - $tables_blocks = $tables_arr[$i]->getVar('tables_blocs'); + $tables_blocks = $tables_arr[$i]->getVar('tables_blocks'); $tables_champs = $tables_arr[$i]->getVar('tables_champs'); $tables_display_admin = $tables_arr[$i]->getVar('tables_display_admin'); $tables_display_user = $tables_arr[$i]->getVar('tables_display_user'); Added: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/menu.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/menu.php (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/menu.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -0,0 +1,205 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ + +class TDMCreateMenu +{ + public $Width = 80; + public $Height = 85; + public $BgColor = 'transparent'; + public $OverBgColor = '#FFF6C1'; + public $BorderWidth = 1; + public $BorderColor = '#CCCCCC'; + public $OverBorderColor = '#FF9900'; + public $BorderStyle = 'solid'; + public $OverBorderStyle = 'solid'; + public $Font = 'Tahoma, Arial, Helvetica'; + public $FontColor = '#666666'; + public $OverFontColor = '#1E90FF'; + public $FontDeco = 'none'; + public $OverFontDeco = 'none'; + public $FontSize = 11; + public $FontWeight = 'bold'; + public $FontExtra = 'Tahoma, Arial, Helvetica'; + public $FontExtraColor = '#A98952'; + public $OverFontExtraColor = '#0033FF'; + public $FontExtraDeco = 'underline'; + public $OverFontExtraDeco = 'underline'; + public $FontExtraSize = 9; + public $FontExtraWeight = 'normal'; + public $TextAlign = 'center'; + private $_items = array(); + + public function addItem($id, $link='', $icon='', $name='', $extra='', $alt=''){ + if (isset($this->_items[$id])) return false; + $rtn['link'] = $link; + $rtn['icon'] = $icon; + $rtn['name'] = $name; + $rtn['extra'] = $extra; + $rtn['alt'] = $alt; + $this->_items[$id] = $rtn; + return true; + } + + public function setLink($id, $link){ + if (isset($this->_items[$id])){ + $this->_items[$id]['link'] = $link; + return true; + } else { + return false; + } + } + + public function setIcon($id, $icon){ + if (isset($this->_items[$id])){ + $this->_items[$id]['icon'] = $icon; + return true; + } else { + return false; + } + } + + public function setName($id, $name){ + if (isset($this->_items[$id])){ + $this->_items[$id]['name'] = $name; + return true; + } else { + return false; + } + } + + public function setExtra($id, $extra){ + if (isset($this->_items[$id])){ + $this->_items[$id]['extra'] = $extra; + return true; + } else { + return false; + } + } + + public function setAlt($id, $alt){ + if (isset($this->_items[$id])){ + $this->_items[$id]['alt'] = $alt; + return true; + } else { + return false; + } + } + + public function getCSS($ws = true){ + if ($ws) $csscode = "<style type=\"text/css\">\n<!--"; + $csscode .= "div.rmmenuicon{ + margin: 3px; + font-family: $this->Font; + text-align: ".$this->TextAlign."; + } + div.rmmenuicon a { + display: block; float: left; + height: ".$this->Height."px !important; + height: ".$this->Height."px; + width: ".$this->Width."px !important; + width: ".$this->Width."px; + vertical-align: middle; + text-decoration : none; + border: ".$this->BorderWidth."px $this->BorderStyle $this->BorderColor; + padding: 2px 5px 1px 5px; + margin: 3px; + color: $this->FontColor; + + + background-color: #f0f0f0; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + -khtml-border-radius: 6px; + border-radius: 6px; + } + div.rmmenuicon img { margin-top: 8px; margin-bottom: 8px; } + div.rmmenuicon a span { + font-size: ".$this->FontSize."px; + font-weight: $this->FontWeight; + display: block; + } + div.rmmenuicon a span.uno{ + font-size: ".$this->FontExtraSize."px; + font-weight: $this->FontExtraWeight; + text-decoration: $this->FontExtraDeco; + color: $this->FontExtraColor; + } + div.rmmenuicon a:hover{ + background-color: $this->OverBgColor; + border: ".$this->BorderWidth."px $this->BorderStyle $this->OverBorderColor; + color: $this->OverFontColor; + } + div.rmmenuicon a:hover span{ + text-decoration: $this->OverFontDeco; + } + div.rmmenuicon a:hover span.uno{ + text-decoration: $this->OverFontExtraDeco; + color: $this->OverFontExtraColor; + } + + div.hometitle{ + color: #333; + font-size: 18px; + padding: 0 12px 0 12px; + } + div.textbody{ + color: #000; + font-size: 12px; + padding: 0 12px 0 12px; + background-color: #f0f0f0; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + -khtml-border-radius: 6px; + border-radius: 6px; + } + div.CPbigTitle{ + font-size: 12px; + color: #606060; + background: no-repeat left top; + font-weight: bold; + height: 30px; + vertical-align: middle; + padding: 10px 0 0 40px; + border-bottom: 3px solid #393e41; + + }"; + if ($ws) $csscode .= "\n-->\n</style>"; + return $csscode; + } + + public function render(){ + + $ret = "<div class='rmmenuicon'>"; + foreach ($this->_items as $k => $v){ + $ret .= "<a href='$v[link]' title='".($v['alt']!='' ? $v['alt'] : $v['name'])."'>".($v['icon']!='' ? "<img src='$v[icon]' alt='$v[name]' /> " : ''); + if ($v['name'] != '') $ret .= "<span>$v[name]</span>"; + if ($v['extra'] != '') $ret .= "<span class='uno'>$v[extra]</span>"; + $ret .= "</a>"; + } + $ret .= "</div><div style='clear: both;'></div>"; + return $ret; + } + + public function display(){ + echo $this->render(); + } +} +?> \ No newline at end of file Deleted: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/object.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/object.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/object.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -1,412 +0,0 @@ -<?php -/** - * **************************************************************************** - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - * Cette licence, contient des limitations!!! - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @license TDM GPL license - * @author TDM TEAM DEV MODULE - * - * **************************************************************************** - */ - -class XoopsPersistableObjectHandler extends XoopsObjectHandler{ - - /** - * Information about the class, the handler is managing - * - * @var string - */ - var $table; - var $keyName; - var $className; - var $identifierName; - - - /** - * Constructor - called from child classes - * @param object $db {@link XoopsDatabase} object - * @param string $tablename Name of database table - * @param string $classname Name of Class, this handler is managing - * @param string $keyname Name of the property, holding the key - * - * @return void - */ - function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) { - $this->XoopsObjectHandler($db); - $this->table = $db->prefix($tablename); - $this->keyName = $keyname; - $this->className = $classname; - if ($idenfierName != false) { - $this->identifierName = $idenfierName; - } - } - - /** - * create a new user - * - * @param bool $isNew Flag the new objects as "new"? - * - * @return object - */ - function &create($isNew = true) { - $obj =& new $this->className(); - if ($isNew === true) { - $obj->setNew(); - } - return $obj; - } - - /** - * retrieve an object - * - * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor - * @param bool $as_object whether to return an object or an array - * @return mixed reference to the object, FALSE if failed - */ - function &get($id, $as_object=true) { - if (is_array($this->keyName)) { - $criteria = new CriteriaCompo(); - for ($i = 0; $i < count($this->keyName); $i++) { - $criteria->add(new Criteria($this->keyName[$i], intval($id[$i]))); - } - } else { - $criteria = new Criteria($this->keyName, intval($id)); - } - $criteria->setLimit(1); - $obj_array = $this->getObjects($criteria, false, $as_object); - if (count($obj_array) != 1) { - $obj = $this->create(); - return $obj; - } - return $obj_array[0]; - } - - /** - * retrieve objects from the database - * - * @param object $criteria {@link CriteriaElement} conditions to be met - * @param bool $id_as_key use the ID as key for the array? - * @param bool $as_object return an array of objects? - * - * @return array - */ - function getObjects($criteria=null, $id_as_key=false, $as_object=true){ - $ret = array(); - $limit = $start = 0; - $sql = 'SELECT * FROM '.$this->table; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - if ($criteria->getSort() != '') { - $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - return $this->convertResultSet($result, $id_as_key, $as_object); - } - - /** - * Convert a database resultset to a returnable array - * - * @param object $result database resultset - * @param bool $id_as_key - should NOT be used with joint keys - * @param bool $as_object - * - * @return array - */ - function convertResultSet($result, $id_as_key = false, $as_object = true) { - $ret = array(); - while ($myrow = $this->db->fetchArray($result)) { - $obj =& $this->create(false); - $obj->assignVars($myrow); - if (!$id_as_key) { - if ($as_object) { - $ret[] =& $obj; - } else { - $row = array(); - $vars = $obj->getVars(); - foreach (array_keys($vars) as $i) { - $row[$i] = $obj->getVar($i); - } - $ret[] = $row; - } - } else { - if ($as_object) { - $ret[$myrow[$this->keyName]] =& $obj; - } else { - $row = array(); - $vars = $obj->getVars(); - foreach (array_keys($vars) as $i) { - $row[$i] = $obj->getVar($i); - } - $ret[$myrow[$this->keyName]] = $row; - } - } - unset($obj); - } - return $ret; - } - - /** - * Retrieve a list of objects as arrays - DON'T USE WITH JOINT KEYS - * - * @param object $criteria {@link CriteriaElement} conditions to be met - * @param int $limit Max number of objects to fetch - * @param int $start Which record to start at - * - * @return array - */ - function getList($criteria = null, $limit = 0, $start = 0) { - $ret = array(); - if ($criteria == null) { - $criteria = new CriteriaCompo(); - } - - if ($criteria->getSort() == '') { - $criteria->setSort($this->identifierName); - } - - $sql = 'SELECT '.$this->keyName; - if(!empty($this->identifierName)){ - $sql .= ', '.$this->identifierName; - } - $sql .= ' FROM '.$this->table; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - if ($criteria->getSort() != '') { - $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); - } - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - $myts =& MyTextSanitizer::getInstance(); - while ($myrow = $this->db->fetchArray($result)) { - //identifiers should be textboxes, so sanitize them like that - $ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]); - } - return $ret; - } - - /** - * count objects matching a condition - * - * @param object $criteria {@link CriteriaElement} to match - * @return int count of objects - */ - function getCount($criteria=null){ - $field = ""; - $groupby = false; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - if ($criteria->groupby != "") { - $groupby = true; - $field = $criteria->groupby.", "; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used - } - } - $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - if ($criteria->groupby != "") { - $sql .= $criteria->getGroupby(); - } - } - $result = $this->db->query($sql); - if (!$result) { - return 0; - } - if ($groupby == false) { - list($count) = $this->db->fetchRow($result); - return $count; - } else { - $ret = array(); - while (list($id, $count) = $this->db->fetchRow($result)) { - $ret[$id] = $count; - } - return $ret; - } - } - - /** - * delete an object from the database - * - * @param object $obj reference to the object to delete - * @param bool $force - * @return bool FALSE if failed. - */ - function delete(&$obj, $force = false){ - if (is_array($this->keyName)) { - $clause = array(); - for ($i = 0; $i < count($this->keyName); $i++) { - $clause[] = $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); - } - $whereclause = implode(" AND ", $clause); - } else { - $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); - } - $sql = "DELETE FROM ".$this->table." WHERE ".$whereclause; - if (false != $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } - - /** - * insert a new object in the database - * - * @param object $obj reference to the object - * @param bool $force whether to force the query execution despite security settings - * @param bool $checkObject check if the object is dirty and clean the attributes - * @return bool FALSE if failed, TRUE if already present and unchanged or successful - */ - - function insert(&$obj, $force=false, $checkObject=true){ - if ($checkObject != false) { - if (!is_object($obj)) { - var_dump($obj); - return false; - } - /** - * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 - */ - if (!is_a($obj, $this->className)) { - $obj->setErrors(get_class($obj)." Differs from ".$this->className); - return false; - } - if (!$obj->isDirty()) { - $obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith - return true; - } - } - if (!$obj->cleanVars()) { - return false; - } - - foreach ($obj->cleanVars as $k => $v) { - if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { - $cleanvars[$k] = intval($v); - } elseif ( is_array( $v ) ) { - $cleanvars[ $k ] = $this->db->quoteString( implode( ',', $v ) ); - } else { - $cleanvars[$k] = $this->db->quoteString($v); - } - } - if ($obj->isNew()) { - if (!is_array($this->keyName)) { - if ($cleanvars[$this->keyName] < 1) { - $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); - } - } - $sql = "INSERT INTO ".$this->table." (".implode(',', array_keys($cleanvars)).") VALUES (".implode(',', array_values($cleanvars)) .")"; - } else { - $sql = "UPDATE ".$this->table." SET"; - foreach ($cleanvars as $key => $value) { - if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { - continue; - } - if (isset($notfirst) ) { - $sql .= ","; - } - $sql .= " ".$key." = ".$value; - $notfirst = true; - } - if (is_array($this->keyName)) { - $whereclause = ""; - for ($i = 0; $i < count($this->keyName); $i++) { - if ($i > 0) { - $whereclause .= " AND "; - } - $whereclause .= $this->keyName[$i]." = ".$obj->getVar($this->keyName[$i]); - } - } else { - $whereclause = $this->keyName." = ".$obj->getVar($this->keyName); - } - $sql .= " WHERE ".$whereclause; - } - if (false != $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - if ($obj->isNew() && !is_array($this->keyName)) { - $obj->assignVar($this->keyName, $this->db->getInsertId()); - } - return true; - } - - /** - * Change a value for objects with a certain criteria - * - * @param string $fieldname Name of the field - * @param string $fieldvalue Value to write - * @param object $criteria {@link CriteriaElement} - * @return bool - */ - function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false){ - $set_clause = $fieldname . ' = '; - if ( is_numeric( $fieldvalue ) ) { - $set_clause .= $fieldvalue; - } elseif ( is_array( $fieldvalue ) ) { - $set_clause .= $this->db->quoteString( implode( ',', $fieldvalue ) ); - } else { - $set_clause .= $this->db->quoteString( $fieldvalue ); - } - $sql = 'UPDATE '.$this->table.' SET '.$set_clause; - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' '.$criteria->renderWhere(); - } - if (false != $force) { - $result = $this->db->queryF($sql); - } else { - $result = $this->db->query($sql); - } - if (!$result) { - return false; - } - return true; - } - - /** - * delete all objects meeting the conditions - * - * @param object $criteria {@link CriteriaElement} with conditions to meet - * @return bool - */ - function deleteAll($criteria = null){ - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql = 'DELETE FROM '.$this->table; - $sql .= ' '.$criteria->renderWhere(); - if (!$this->db->queryF($sql)) { - return false; - } - $rows = $this->db->getAffectedRows(); - return $rows > 0 ? $rows : true; - } - return false; - } -} -?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_modules.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -87,7 +87,16 @@ $form->insertBreak('<div class="center"><b>'._AM_TDMCREATE_MODULES_IMPORTANT.'</b></div>','head'); $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_NAME, 'modules_name', 50, 255, $this->getVar('modules_name')), true); $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_VERSION, 'modules_version', 50, 255, $this->getVar('modules_version')), true); - $form->addElement(new XoopsFormEditor(_AM_TDMCREATE_MODULES_DESCRIPTION, 'modules_description', $this->getVar('modules_description', 'e'), 5, 47), true); + // Name description + $editor_configs=array(); + $editor_configs["name"] ="modules_description"; + $editor_configs["value"] = $this->getVar('modules_description', 'e'); + $editor_configs["rows"] = 5; + $editor_configs["cols"] = 100; + $editor_configs["width"] = "100%"; + $editor_configs["height"] = "100px"; + $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['TDMCreate_editor']; + $form->addElement( new XoopsFormEditor(_AM_TDMCREATE_MODULES_DESCRIPTION, "modules_description", $editor_configs), true); $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_AUTHOR, 'modules_author', 50, 255, $this->getVar('modules_author')), true); $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_LICENSE, 'modules_license', 50, 255, $this->getVar('modules_license')), true); $modules_display_admin = $this->isNew() ? '1' : $this->getVar('modules_display_admin'); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/class/tdmcreate_tables.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -68,7 +68,19 @@ $class = 'even'; $title = $this->isNew() ? sprintf(_AM_TDMCREATE_TABLES_CHAMPS_ADD) : sprintf(_AM_TDMCREATE_TABLES_CHAMPS_EDIT); - $tables_actions = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocks=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_date_created=".$tables_date_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; + $tables_actions = $tables_modules. + "&tables_id=".$tables_id. + "&tables_name=".$tables_name. + "&tables_blocks=".$tables_blocks. + "&tables_display_admin=".$tables_display_admin. + "&tables_display_user=".$tables_display_user. + "&tables_submitter=".$tables_submitter. + "&tables_date_created=".$tables_date_created. + "&tables_online=".$tables_online. + "&tables_search=".$tables_search. + "&tables_coms=".$tables_coms. + "&tables_nb_champs=".$tables_nb_champs. + "&select=".$select; echo "<FORM Method='POST' Action='".$action."?op=tables_save&tables_modules=".$tables_actions."'> <table border='0' width='100%' cellspacing='1' class='outer'> @@ -102,6 +114,7 @@ <OPTION VALUE='double'>DOUBLE</OPTION> <OPTION VALUE='float'>FLOAT</OPTION> <OPTION VALUE='enum'>ENUM</OPTION> + <OPTION VALUE='char'>CHAR</OPTION> <OPTION VALUE='varchar'>VARCHAR</OPTION> <OPTION VALUE='text'>TEXT</OPTION> <OPTION VALUE='longtext'>LONGTEXT</OPTION> @@ -141,6 +154,7 @@ <OPTION VALUE='XoopsFormDhtmlTextArea'>DhtmlTextArea</OPTION> <OPTION VALUE='XoopsFormCheckBox'>CheckBox</OPTION> <OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION> + <OPTION VALUE='XoopsFormSelectBox'>SelectBox</OPTION> <OPTION VALUE='XoopsFormSelectUser'>SelectUser</OPTION> <OPTION VALUE='XoopsFormColorPicker'>ColorPicker</OPTION> <OPTION VALUE='XoopsFormUploadImage'>UploadImage</OPTION> @@ -295,7 +309,19 @@ $champs_param_required_field[$i] = $parametres[6]; } } - $tables_action = $tables_modules."&tables_id=".$tables_id."&tables_name=".$tables_name."&tables_blocks=".$tables_blocks."&tables_display_admin=".$tables_display_admin."&tables_display_user=".$tables_display_user."&tables_submitter=".$tables_submitter."&tables_date_created=".$tables_date_created."&tables_online=".$tables_online."&tables_search=".$tables_search."&tables_coms=".$tables_coms."&tables_nb_champs=".$tables_nb_champs."&select=".$select; + $tables_action = $tables_modules. + "&tables_id=".$tables_id. + "&tables_name=".$tables_name. + "&tables_blocks=".$tables_blocks. + "&tables_display_admin=".$tables_display_admin. + "&tables_display_user=".$tables_display_user. + "&tables_submitter=".$tables_submitter. + "&tables_date_created=".$tables_date_created. + "&tables_online=".$tables_online. + "&tables_search=".$tables_search. + "&tables_coms=".$tables_coms. + "&tables_nb_champs=".$tables_nb_champs. + "&select=".$select; echo "<FORM Method='POST' Action='".$action."?op=tables_save&tables_modules=".$tables_action."'> <table border='0' width='100%' cellspacing='1' class='outer'> @@ -338,6 +364,26 @@ } else { echo "<OPTION VALUE='decimal'>DECIMAL</OPTION>"; } + if ( $champs_type[$i] == 'double' ) { + echo "<OPTION VALUE='double' selected>DOUBLE</OPTION>"; + } else { + echo "<OPTION VALUE='double'>DOUBLE</OPTION>"; + } + if ( $champs_type[$i] == 'float' ) { + echo "<OPTION VALUE='float' selected>FLOAT</OPTION>"; + } else { + echo "<OPTION VALUE='float'>FLOAT</OPTION>"; + } + if ( $champs_type[$i] == 'enum' ) { + echo "<OPTION VALUE='enum' selected>ENUM</OPTION>"; + } else { + echo "<OPTION VALUE='enum'>ENUM</OPTION>"; + } + if ( $champs_type[$i] == 'char' ) { + echo "<OPTION VALUE='char' selected>CHAR</OPTION>"; + } else { + echo "<OPTION VALUE='char'>CHAR</OPTION>"; + } if ( $champs_type[$i] == 'varchar' ) { echo "<OPTION VALUE='varchar' selected>VARCHAR</OPTION>"; } else { @@ -437,11 +483,16 @@ </SELECT></td> <td align='center' width='30%'>"; if ( $i != 0 ) { - echo "<table border='0' style='border-color:#666666'; width='100%' cellspacing='1' class='outer'> + echo "<table border='0' style='border-color:#777'; width='100%' cellspacing='1' class='outer'> <tr> <td align='left' class='head' width='95%'>Form : Elements</td> <td align='right' class='even' width='5%'> <SELECT name='champs_param_elements[".$i."]'>"; + if ( $param_elements[$i] == 'None' ) { + echo "<OPTION VALUE='Null' selected>None</OPTION>"; + } else { + echo "<OPTION VALUE='Null'>None</OPTION>"; + } if ( $param_elements[$i] == 'XoopsFormText' ) { echo "<OPTION VALUE='XoopsFormText' selected>Text</OPTION>"; } else { @@ -467,6 +518,11 @@ } else { echo "<OPTION VALUE='XoopsFormRadioYN'>RadioYN</OPTION>"; } + if ( $param_elements[$i] == 'XoopsFormSelectBox' ) { + echo "<OPTION VALUE='XoopsFormSelectBox' selected>SelectBox</OPTION>"; + } else { + echo "<OPTION VALUE='XoopsFormSelectBox'>SelectBox</OPTION>"; + } if ( $param_elements[$i] == 'XoopsFormSelectUser' ) { echo "<OPTION VALUE='XoopsFormSelectUser' selected>SelectUser</OPTION>"; } else { Added: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_about_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_about_language.php (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_about_language.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -0,0 +1,62 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; + +function const_about_language($modules, $modules_name) +{ + if(!isset($xoopsConfig)) { + global $xoopsConfig; + } + $language = '_AM_'.strtoupper($modules_name).'_'; + $file = "about.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/language/".$xoopsConfig['language']."/".$file; + $en_tete = const_entete($modules, 0); + + $text = '<?php'.$en_tete.' +// language/about.php +define("'.$language.'ABOUT_RELEASEDATE","Rilasciato: "); +define("'.$language.'ABOUT_UPDATEDATE","Aggiornato: "); +define("'.$language.'ABOUT_AUTHOR","Autore"); +define("'.$language.'ABOUT_CREDITS","Crediti"); +define("'.$language.'ABOUT_README","Informazioni Generali"); +define("'.$language.'ABOUT_MANUAL","Manuale"); +define("'.$language.'ABOUT_LICENSE","Licenza"); +define("'.$language.'ABOUT_MODULE_STATUS","Stato"); +define("'.$language.'ABOUT_WEBSITE","Sito Web"); +define("'.$language.'ABOUT_WEBSITE_FORUM","Forum Sito Web"); +define("'.$language.'ABOUT_AUTHOR_NAME","Nome Autore"); +define("'.$language.'ABOUT_AUTHOR_WORD","Word Autore"); +define("'.$language.'ABOUT_CHANGELOG","Change Log"); +define("'.$language.'ABOUT_MODULE_INFO","Info Modulo"); +define("'.$language.'ABOUT_AUTHOR_INFO","Info Autore"); +define("'.$language.'ABOUT_DESCRIPTION","Descrizione: "); +define("'.$language.'ABOUT_DISCLAIMER","Disclaimer"); +define("'.$language.'ABOUT_DISCLAIMER_TEXT","Licenza GPL - Non Garantita"); + +?>'; + +createFile($path_file, $text, + _AM_TDMCREATE_CONST_OK_LANGUAGES, + _AM_TDMCREATE_CONST_NOTOK_LANGUAGES, $file); +} + +?> Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-01-30 07:29:44 UTC (rev 8833) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_admin_language.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -21,7 +21,7 @@ include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; -function const_admin_language($modules, $modules_name) +function const_admin_language($modules, $modules_name, $modules_description) { if(!isset($xoopsConfig)) { global $xoopsConfig; @@ -34,6 +34,10 @@ //} $en_tete = const_entete($modules, 0); $text = '<?php'.$en_tete.' +// Name of module +define("'.$language.'NAME", "'.ucfirst($modules_name).'"); +// Description of module +define("'.$language.'DESC", "'.ucfirst($modules_description).'"); '; $criteria = new CriteriaCompo(); $criteria->add(new Criteria('languages_file', 'admin')); Added: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class_admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class_admin.php (rev 0) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/const/const_class_admin.php 2012-01-30 09:37:51 UTC (rev 8834) @@ -0,0 +1,366 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * + * Cette licence, contient des limitations!!! + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * + * **************************************************************************** + */ +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/const/const_entete.php'; +include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php'; + +function const_class_admin($modules, $modules_name) +{ + $modules_name_minuscule = strtolower($modules_name); + $file = "admin.php"; + $path_file = TDM_CREATE_MURL."/".$modules_name."/class/".$file; + $en_tete = const_entete($modules, 0); + + $text = '<?php'.$en_tete.' +class ModuleAdmin +{ + + var $_itemButton = array(); + var $_itemLabel = array(); + var $_itemLineLabel = array(); + var $_itemConfigLabel = \'\'; + var $_itemLineConfigLabel = array(); + var $_itemChangelogLabel = \'\'; + var $_obj = array(); + + /** + * Constructor + */ + function __construct() + { + global $xoopsModule; + $this->_obj =& $xoopsModule; + echo "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/modules/" . $xoopsModule->getVar(\'dirname\', \'e\') . "/admin/style.css\";</style>\n"; + + } + + function addItemButton($title, $link, $icon = \'add\', $extra = \'\') + { + $ret[\'title\'] = $title; + $ret[\'link\'] = $link; + $ret[\'icon\'] = $icon . \'.png\'; + $ret[\'extra\'] = $extra; + $this -> _itemButton[] = $ret; + return true; + + } + + function renderButton($position = "right", $delimeter = " ") + { + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar(\'dirname\') . "/images/admin/"; + switch ($position) + { + default: + case "right": + $ret = "<div class=\"floatright\">\n"; + break; + + case "left": + $ret = "<div class=\"floatleft\">\n"; + break; + + case "center": + $ret = "<div class=\"aligncenter\">\n"; + break; + } + $ret .= "<div class=\"xo-buttons\">\n"; + foreach (array_keys( $this -> _itemButton) as $i) { + $ret .= "<a class=\'ui-corner-all tooltip\' href=\'" . $this -> _itemButton[$i][\'link\'] . "\' title=\'" . $this -> _itemButton[$i][\'title\'] . "\'>"; + $ret .= "<img src=\'" . $path . $this -> _itemButton[$i][\'icon\'] . "\' title=\'" . $this -> _itemButton[$i][\'title\'] . "\' />" . $this -> _itemButton[$i][\'title\'] . $this -> _itemButton[$i][\'extra\']; + $ret .= "</a>\n"; + $ret .= $delimeter; + } + $ret .= "</div>\n</div>\n"; + $ret .= "<br /> <br /><br />"; + return $ret; + } + + function addLabel($title) + { + $ret[\'title\'] = $title; + $this -> _itemLabel[] = $ret; + return true; + } + + function addLineLabel($label, $text, $value = \'\', $color = \'none\', $type = \'default\') + { + $ret[\'label\'] = $label; + $line = ""; + switch ($type) + { + default: + case "default": + $line .= sprintf($text, "<span style=\'color : " . $color . "; font-weight : bold;\'>" . $value . "</span>"); + break; + + case "module": + $date = explode(\'/\',$this->_obj->getInfo(\'release_date\')); + $release_date = formatTimestamp(mktime(0, 0, 0, $date[1], $date[2], $date[0]), \'s\'); + $line .= "<table>\n<tr>\n<td width=\"100px\">\n"; + $line .= "<img src=\'" . XOOPS_URL . "/modules/" . $this->_obj->getVar(\'dirname\') . "/" . $this->_obj->getInfo(\'image\') . "\' alt=\'" . $this->_obj->getVar(\'name\') . "\' style=\'float: left; margin-right: 10px;\' />\n"; + $line .= "</td><td>\n"; + $line .= "<div style=\'margin-top: 1px; margin-bottom: 4px; font-size: 18px; line-height: 18px; color: #2F5376; font-weight: bold;\'>\n"; + $line .= $this->_obj->getInfo(\'name\') . " " . $this->_obj->getInfo(\'version\') . " " . $this->_obj->getInfo(\'status_version\') ; + $line .= "<br />\n"; + $line .= "</div>\n"; + $line .= "<div style=\'line-height: 16px; font-weight: bold;\'>\n"; + $line .= "by " . $this->_obj->getInfo(\'author\') ; + if ($this->_obj->getInfo(\'pseudo\') != \'\'){ + $line .= " (" . $this->_obj->getInfo(\'pseudo\') . ")\n"; + } + $line .= "</div>\n"; + $line .= "<div style=\'line-height: 16px;\'>\n"; + + if ($this->_obj->getInfo(\'credits\') != \'\'){ + $line .= "Credits: " . $this->_obj->getInfo(\'credits\') ; + } + $line .= "<br />\n"; + + $line .= "<a href=\"http://" . $this->_obj->getInfo(\'license_url\') . "\" target=\"_blank\" >" . $this->_obj->getInfo(\'license\') . "</a>\n"; + $line .= "<br />\n"; + + $line .= "<a href=\"http://" . $this->_obj->getInfo(\'website\') . "\" target=\"_blank\" >" . $this->_obj->getInfo(\'website\') . "</a>\n"; + $line .= "<br />\n"; + if ($value != \'\'){ + $line .= \'<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> + <input type="hidden" name="cmd" value="_s-xclick"> + <input type="hidden" name="business" value="you...@em..." /> + <input type="hidden" name="hosted_button_id" value="\' . $value . \'" /> + <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" /> + <img alt="" border="0" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1"> + </form>\'; + } + $line .= "</div>\n"; + $line .= "</td>\n</tr>\n</table>\n"; + break; + + case "information": + $line .= $text; + break; + } + $ret[\'line\'] = $line; + $this -> _itemLineLabel[] = $ret; + return true; + } + + function renderLabel() + { + $ret = ""; + foreach (array_keys( $this -> _itemLabel) as $i) { + $ret .= "<fieldset><legend class=\"label\">"; + $ret .= $this -> _itemLabel[$i][\'title\']; + $ret .= "</legend>\n"; + foreach (array_keys( $this -> _itemLineLabel) as $k) { + if ($this -> _itemLineLabel[$k][\'label\'] == $this -> _itemLabel[$i][\'title\']){ + $ret .= $this -> _itemLineLabel[$k][\'line\']; + $ret .= "<br />"; + } + } + $ret .= "</fieldset>\n"; + $ret .= "<br/>\n"; + } + return $ret; + } + + function addConfigLabel($title) + { + $this -> _itemConfigLabel = $title; + return true; + } + + function addLineConfigLabel($text, $value = \'\', $type = \'default\') + { + $line = ""; + $path = XOOPS_URL . "/modules/" . $this->_obj->getVar(\'dirname\') . "/images/icons/"; + switch ($type) + { + de... [truncated message content] |