|
From: <be...@us...> - 2013-10-23 01:25:05
|
Revision: 12195
http://sourceforge.net/p/xoops/svn/12195
Author: beckmi
Date: 2013-10-23 01:24:56 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
Updating trunk: to version 1.38.6 Beta 1 (timgno)
Modified Paths:
--------------
XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_about_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_admin_permissions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_blocks_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_class_menu.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_css_style.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_entete.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_help_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_comments_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_configs.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_install.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_notification.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_js_jquery.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_languages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_main_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_modinfo_language.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_about.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_admin_help.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_footer.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_header.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_index.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_user_pages.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/trunk/TDMCreate/const/const_xoopsversion.php
XoopsModules/TDMCreate/trunk/TDMCreate/docs/changelog.TXT
XoopsModules/TDMCreate/trunk/TDMCreate/include/functions.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/trunk/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/trunk/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/trunk/TDMCreate/xoops_version.php
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/building.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,57 +1,61 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id: building.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'admin_header.php';
-echo $adminMenu->addNavigation('const.php');
+
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
if (isset($_REQUEST['modules_name'])) {
$modules =& $modulesHandler->get($_REQUEST['modules_name']);
} else {
- $modules = & $modulesHandler;
+ $modules =& $modulesHandler;
}
-$modules_name = $modules->getVar('modules_name');
-$modules_desc = $modules->getVar('modules_description');
+$modules_name = $modules->getVar('modules_name');
+$modules_desc = $modules->getVar('modules_description');
$modules_author_website_name = $modules->getVar('modules_author_website_name');
-$modules_author_website_url = $modules->getVar('modules_author_website_url');
-$modules_image = $modules->getVar('modules_image');
-$modules_active_search = $modules->getVar('modules_active_search');
-$modules_active_comments = $modules->getVar('modules_active_comments');
+$modules_author_website_url = $modules->getVar('modules_author_website_url');
+$modules_image = $modules->getVar('modules_image');
+$modules_active_search = $modules->getVar('modules_active_search');
+$modules_active_comments = $modules->getVar('modules_active_comments');
+$modules_active_notifications = $modules->getVar('modules_active_notifications');
+$modules_paypal_button = $modules->getVar('modules_paypal_button');
+$modules_subversion = $modules->getVar('modules_subversion');
//Nom des tables et combien de tables
$criteria = new CriteriaCompo();
if (isset($_REQUEST['modules_name'])) {
- $criteria->add(new Criteria('tables_modules', $_REQUEST['modules_name']));
+ $criteria->add(new Criteria('tables_mid', $_REQUEST['modules_name']));
} else {
- $criteria->add(new Criteria('tables_modules'));
+ $criteria->add(new Criteria('tables_mid'));
}
$nb_tables = $tablesHandler->getCount($criteria);
$tables_arr = $tablesHandler->getall($criteria);
+echo $adminMenu->addNavigation('building.php');
switch ($op) {
- case "creation":
+ case "build":
//Effacer repertoire du nouveau module s'il existe
- clearDir($modPath.'/modules/'.$modules_name);
+ TDMCreate_clearDir($modPath.'/modules/'.$modules_name);
//Debut
OpenTable();
@@ -98,11 +102,11 @@
//Creation of pages admin
if ( $tables_display_admin == 1 ) {
- const_admin_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_category, $tables_name, $tables_img, $tables_fields, $tables_parameters);
+ const_admin_pages($modules, $modules_name, $tables_module_table, $tables_category, $tables_name, $tables_fields, $tables_parameters);
}
//Creation of pages and templates user
if ( $tables_display_user == 1 && $tables_module_table != NULL ) {
- const_user_pages($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_img, $tables_fields, $tables_parameters);
+ const_user_pages($modules, $modules_name, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
const_templates_pages($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
//Creation de search
@@ -111,7 +115,7 @@
}
//Creation of comments
if ( $modules_active_comments == 1 && $tables_comments == 1 ) {
- const_include_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters, $tables_img);
+ const_include_comments($modules, $modules_name, $tables_name, $tables_module_table, $tables_fields, $tables_parameters);
}
//Creation of the file mysql.sql
@@ -128,7 +132,7 @@
}
//Creation of Waiting Plugin
- const_waiting($modules, $modules_name, $tables_arr);
+ const_waiting($modules, $modules_name, $tables_arr);
//Creation de xoopsversion.php
@@ -184,12 +188,12 @@
const_admin_menu($modules, $modules_name, $tables_arr, $category);
//Creation de admin about.php
//$menu++;
- const_admin_about($modules, $modules_name);
+ const_admin_about($modules, $modules_name, $modules_paypal_button);
/************************************************/
/*Admin*/
/************************************************/
- const_user_header($modules, $modules_name, $tables_id, $tables_module_table, $tables_name);
- const_user_index($modules, $modules_name, $tables_id, $tables_module_table, $tables_name, $tables_fields, $tables_parameters);
+ const_user_header($modules, $modules_name, $tables_module_table, $tables_name);
+ const_user_index($modules, $modules_name, $tables_module_table, $tables_name);
CloseTable();
break;
@@ -216,7 +220,7 @@
$tables_select->addOptionArray($tablesHandler->getList());
$form->addElement($tables_select, FALSE);
- $form->addElement(new XoopsFormHidden('op', 'creation'));
+ $form->addElement(new XoopsFormHidden('op', 'build'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$form->display();
break;
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/modules.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,27 +1,29 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id$
*/
include_once 'admin_header.php';
-$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
-switch ($op) {
- case "modules_save":
+$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'list', 'string' );
+echo $adminMenu->addNavigation('modules.php');
+switch ($op)
+{
+ case "save":
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
@@ -48,75 +50,74 @@
$obj->setVar('modules_image', $uploader->getSavedFileName());
}
} else {
- $obj->setVar('modules_image', $_REQUEST['modules_image']);
+ $obj->setVar('modules_image', $_POST['modules_image']);
}
- //remove all spaces from the new name
- $spacesRemoved = str_replace(' ', '', $_REQUEST['modules_name']);
-
- $obj->setVar('modules_name', $spacesRemoved );
- $obj->setVar('modules_version', $_REQUEST['modules_version']);
- $obj->setVar('modules_description', $_REQUEST['modules_description']);
- $obj->setVar('modules_author', $_REQUEST['modules_author']);
- $obj->setVar('modules_author_mail', $_REQUEST['modules_author_mail']);
- $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']);
- $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']);
- $obj->setVar('modules_credits', $_REQUEST['modules_credits']);
- $obj->setVar('modules_license', $_REQUEST['modules_license']);
- $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']);
- $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']);
- $obj->setVar('modules_manual', $_REQUEST['modules_manual']);
- $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']);
- $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']);
- $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']);
- $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']);
- $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']);
- $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']);
- $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']);
- $obj->setVar('modules_release', $_REQUEST['modules_release']);
- $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']);
+ //remove all spaces from the new name
+ $obj->setVar('modules_name', preg_replace('/\s+/', '', $_POST['modules_name']));
+ $obj->setVar('modules_version', $_POST['modules_version']);
+ $obj->setVar('modules_description', $_POST['modules_description']);
+ $obj->setVar('modules_author', $_POST['modules_author']);
+ $obj->setVar('modules_author_mail', $_POST['modules_author_mail']);
+ $obj->setVar('modules_author_website_url', $_POST['modules_author_website_url']);
+ $obj->setVar('modules_author_website_name', $_POST['modules_author_website_name']);
+ $obj->setVar('modules_credits', $_POST['modules_credits']);
+ $obj->setVar('modules_license', $_POST['modules_license']);
+ $obj->setVar('modules_release_info', $_POST['modules_release_info']);
+ $obj->setVar('modules_release_file', $_POST['modules_release_file']);
+ $obj->setVar('modules_manual', $_POST['modules_manual']);
+ $obj->setVar('modules_manual_file', $_POST['modules_manual_file']);
+ $obj->setVar('modules_demo_site_url', $_POST['modules_demo_site_url']);
+ $obj->setVar('modules_demo_site_name', $_POST['modules_demo_site_name']);
+ $obj->setVar('modules_forum_site_url', $_POST['modules_forum_site_url']);
+ $obj->setVar('modules_forum_site_name', $_POST['modules_forum_site_name']);
+ $obj->setVar('modules_module_website_url', $_POST['modules_module_website_url']);
+ $obj->setVar('modules_module_website_name', $_POST['modules_module_website_name']);
+ $obj->setVar('modules_release', $_POST['modules_release']);
+ $obj->setVar('modules_module_status', $_POST['modules_module_status']);
$obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']);
$obj->setVar('modules_display_user', $_REQUEST['modules_display_user']);
$obj->setVar('modules_active_search', $_REQUEST['modules_active_search']);
$obj->setVar('modules_active_comments', $_REQUEST['modules_active_comments']);
+ $obj->setVar('modules_active_notifications', $_REQUEST['modules_active_notifications']);
+ $obj->setVar('modules_paypal_button', $_POST['modules_paypal_button']);
+ $obj->setVar('modules_subversion', $_POST['modules_subversion']);
if ($modulesHandler->insert($obj)) {
- redirect_header('modules.php?op=default', 2, _AM_TDMCREATE_FORMOK);
+ redirect_header('modules.php?op=list', 2, _AM_TDMCREATE_FORMOK);
}
- break;
+ break;
- case "modules_create":
- echo $adminMenu->addNavigation('modules.php');
- $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list');
+ case "new":
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=list', 'list');
echo $adminMenu->renderButton();
$obj =& $modulesHandler->create();
$form = $obj->getForm();
- break;
- case "modules_edit":
- $obj =& $modulesHandler->get($_REQUEST['modules_id']);
- $form = $obj->getForm();
- break;
- case "modules_delete":
- $obj =& $modulesHandler->get($_REQUEST['modules_id']);
- if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
- {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
- }
- if ($modulesHandler->delete($obj)) {
- $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']);
- redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
- } else {
- echo $obj->getHtmlErrors();
- }
- } else {
- xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'modules_delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name')));
- }
- break;
- case "modules_list":
- default:
- echo $adminMenu->addNavigation('modules.php');
- $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=modules_create', 'add');
+ break;
+ case "edit":
+ $obj =& $modulesHandler->get($_REQUEST['modules_id']);
+ $form = $obj->getForm();
+ break;
+ case "delete":
+ $obj =& $modulesHandler->get($_REQUEST['modules_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1)
+ {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header('modules.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($modulesHandler->delete($obj)) {
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_modules")." WHERE modules_id = ".$_REQUEST['modules_id']);
+ redirect_header('modules.php', 3, _AM_TDMCREATE_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name')));
+ }
+ break;
+ case "list":
+ default:
+ $adminMenu->addItemButton(_AM_TDMCREATE_MODULES_NEW, 'modules.php?op=new', 'add');
echo $adminMenu->renderButton();
$criteria = new CriteriaCompo();
@@ -126,42 +127,51 @@
$numrows_modules = $modulesHandler->getCount();
if ( $numrows_modules > 0 )
- {
- echo '<table width="100%" cellspacing="1" class="outer">';
- echo '<tr class="center">';
- echo '<th width="20%">'._AM_TDMCREATE_NAME.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
- echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.'</th>';
- echo '</tr>';
- $class = 'odd';
- foreach (array_keys($modules_arr) as $i)
- {
- $modules_id = $modules_arr[$i]->getVar('modules_id');
- $modules_name = $modules_arr[$i]->getVar('modules_name');
- $modules_image = $modules_arr[$i]->getVar('modules_image');
- //$modules_blocks = $modules_arr[$i]->getVar('modules_blocks');
- $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin');
- $modules_display_user = $modules_arr[$i]->getVar('modules_display_user');
- $display_admin = ($modules_display_admin == 1) ? _YES : _NO;
- $display_user = ($modules_display_user == 1) ? _YES : _NO;
- echo '<tr class="odd center">';
- echo '<td><b>'.$modules_name.'</b></td>';
- echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>';
- echo '<td>'.$display_admin.'</td>';
- echo '<td>'.$display_user.'</td>';
- echo '<td> </td>';
- echo '<td> </td>';
- echo '<td>';
- echo '<a href="modules.php?op=modules_edit&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
- echo '</td>';
- echo '</tr>';
- }
- echo '</table><br><br>';
- }
- break;
+ {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '</tr>';
+ $class = 'odd';
+ foreach (array_keys($modules_arr) as $i)
+ {
+ $modules_id = $modules_arr[$i]->getVar('modules_id');
+ $modules_name = $modules_arr[$i]->getVar('modules_name');
+ $modules_image = $modules_arr[$i]->getVar('modules_image');
+ //$modules_blocks = $modules_arr[$i]->getVar('modules_blocks');
+ $modules_display_admin = $modules_arr[$i]->getVar('modules_display_admin');
+ $modules_display_user = $modules_arr[$i]->getVar('modules_display_user');
+ $display_admin = ($modules_display_admin == 1) ? _YES : _NO;
+ $display_user = ($modules_display_user == 1) ? _YES : _NO;
+ echo '<tr class="odd center">';
+ echo '<td><b>'.$i.'</b></td>';
+ echo '<td><b>'.$modules_name.'</b></td>';
+ echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>';
+ echo '<td>'.$display_admin.'</td>';
+ echo '<td>'.$display_user.'</td>';
+ echo '<td>';
+ echo '<a href="modules.php?op=edit&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._EDIT.'" title="'._EDIT.'"></a> <a href="modules.php?op=delete&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._DELETE.'" title="'._DELETE.'"></a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table><br><br>';
+ } else {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '</tr></table><br><br>';
+ }
+ break;
}
include_once "admin_footer.php";
\ No newline at end of file
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/admin/tables.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,25 +1,26 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @license TDM GPL license
- * @author TDM TEAM DEV MODULE
- *
- * ****************************************************************************
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.0
+ * @author Txmod Xoops http://www.txmodxoops.org
+ * @version $Id$
*/
include_once 'admin_header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+echo $adminMenu->addNavigation('tables.php');
switch ($op) {
case "tables_save":
if (isset($_REQUEST['tables_id'])) {
@@ -29,10 +30,10 @@
}
//Module Name
- $modules =& $modulesHandler->get($_REQUEST['tables_modules']);
+ $modules =& $modulesHandler->get($_REQUEST['tables_mid']);
$modules_name = $modules->getVar('modules_name');
- $obj->setVar('tables_modules', $_REQUEST['tables_modules']);
+ $obj->setVar('tables_mid', $_REQUEST['tables_mid']);
if ( $_REQUEST['select'] == 1 )
{
@@ -149,7 +150,7 @@
$obj =& $tablesHandler->create();
}
//Module Name
- $modules =& $modulesHandler->get($_REQUEST['tables_modules']);
+ $modules =& $modulesHandler->get($_REQUEST['tables_mid']);
$modules_name = $modules->getVar('modules_name');
$tables_blocks = (isset($_REQUEST['tables_blocks'])) ? $_REQUEST['tables_blocks'] : '0';
@@ -190,7 +191,7 @@
$oldname=$obj->getVar('tables_name');
- $obj->setVar('tables_modules', strtolower($_REQUEST['tables_modules']));
+ $obj->setVar('tables_mid', strtolower($_REQUEST['tables_mid']));
$obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name']));
$obj->setVar('tables_name', strtolower($_REQUEST['tables_name']));
$obj->setVar('tables_blocks', $_REQUEST['tables_blocks']);
@@ -239,7 +240,7 @@
//}
}
-$newTableFields=implode("|",$newfields);
+ $newTableFields=implode("|",$newfields);
$obj->setVar('tables_fields', $newTableFields);
@@ -302,48 +303,50 @@
$obj->setVar('modules_image', $uploader->getSavedFileName());
}
} else {
- $obj->setVar('modules_image', $_REQUEST['modules_image']);
+ $obj->setVar('modules_image', $_POST['modules_image']);
}
- $spacesRemoved = str_replace(' ', '', $_REQUEST['modules_name']);
+ $spacesRemoved = preg_replace('/\s+/', '', $_POST['modules_name']);
$obj->setVar('modules_name', $spacesRemoved);
- $obj->setVar('modules_version', $_REQUEST['modules_version']);
- $obj->setVar('modules_description', $_REQUEST['modules_description']);
- $obj->setVar('modules_author', $_REQUEST['modules_author']);
- $obj->setVar('modules_author_email', $_REQUEST['modules_author_email']);
- $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']);
- $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']);
- $obj->setVar('modules_credits', $_REQUEST['modules_credits']);
- $obj->setVar('modules_license', $_REQUEST['modules_license']);
- $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']);
- $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']);
- $obj->setVar('modules_manual', $_REQUEST['modules_manual']);
- $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']);
- $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']);
- $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']);
- $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']);
- $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']);
- $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']);
- $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']);
- $obj->setVar('modules_release', $_REQUEST['modules_release']);
- $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']);
+ $obj->setVar('modules_version', $_POST['modules_version']);
+ $obj->setVar('modules_description', $_POST['modules_description']);
+ $obj->setVar('modules_author', $_POST['modules_author']);
+ $obj->setVar('modules_author_email', $_POST['modules_author_email']);
+ $obj->setVar('modules_author_website_url', $_POST['modules_author_website_url']);
+ $obj->setVar('modules_author_website_name', $_POST['modules_author_website_name']);
+ $obj->setVar('modules_credits', $_POST['modules_credits']);
+ $obj->setVar('modules_license', $_POST['modules_license']);
+ $obj->setVar('modules_release_info', $_POST['modules_release_info']);
+ $obj->setVar('modules_release_file', $_POST['modules_release_file']);
+ $obj->setVar('modules_manual', $_POST['modules_manual']);
+ $obj->setVar('modules_manual_file', $_POST['modules_manual_file']);
+ $obj->setVar('modules_demo_site_url', $_POST['modules_demo_site_url']);
+ $obj->setVar('modules_demo_site_name', $_POST['modules_demo_site_name']);
+ $obj->setVar('modules_forum_site_url', $_POST['modules_forum_site_url']);
+ $obj->setVar('modules_forum_site_name', $_POST['modules_forum_site_name']);
+ $obj->setVar('modules_module_website_url', $_POST['modules_module_website_url']);
+ $obj->setVar('modules_module_website_name', $_POST['modules_module_website_name']);
+ $obj->setVar('modules_release', $_POST['modules_release']);
+ $obj->setVar('modules_module_status', $_POST['modules_module_status']);
$obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']);
$obj->setVar('modules_display_user', $_REQUEST['modules_display_user']);
$obj->setVar('modules_active_search', $_REQUEST['modules_active_search']);
$obj->setVar('modules_active_comments', $_REQUEST['modules_active_comments']);
+ $obj->setVar('modules_active_notifications', $_REQUEST['modules_active_notifications']);
+ $obj->setVar('modules_paypal_button', $_POST['modules_paypal_button']);
+ $obj->setVar('modules_subversion', $_POST['modules_subversion']);
if ($modulesHandler->insert($obj)) {
-$modules_id=$obj->getVar('modules_id');
+ $modules_id = $obj->getVar('modules_id');
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('tables_modules', $modules_id));
- $tables_arr = $tablesHandler->getall($criteria);
+ $criteria->add(new Criteria('tables_mid', $modules_id));
+ $tables_arr = $tablesHandler->getAll($criteria);
foreach (array_keys($tables_arr) as $i)
- {
- //Variables
- $tables_arr[$i]->setVar('tables_module_table', $spacesRemoved.'_'.$tables_arr[$i]->getVar('tables_name'));
- $tablesHandler->insert($tables_arr[$i]);
- }
-
- redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK);
+ {
+ //Variables
+ $tables_arr[$i]->setVar('tables_module_table', $spacesRemoved.'_'.$tables_arr[$i]->getVar('tables_name'));
+ $tablesHandler->insert($tables_arr[$i]);
+ }
+ redirect_header('tables.php?op=default', 2, _AM_TDMCREATE_FORMOK);
}
break;
@@ -359,7 +362,7 @@
redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
}
if ($modulesHandler->delete($obj)) {
- $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = ".$_REQUEST['modules_id']);
+ $xoopsDB->queryF("DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_mid = ".$_REQUEST['modules_id']);
redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK);
} else {
echo $obj->getHtmlErrors();
@@ -369,8 +372,7 @@
}
break;
- case "tables_fields":
- echo $adminMenu->addNavigation('tables.php');
+ case "tables_fields":
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=tables_list', 'list');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_fields', 'add');
echo $adminMenu->renderButton();
@@ -398,6 +400,7 @@
$tables_online = (isset($_REQUEST['tables_online'])) ? $_REQUEST['tables_online'] : '0';
$tables_search = (isset($_REQUEST['tables_search'])) ? $_REQUEST['tables_search'] : '0';
$tables_comments = (isset($_REQUEST['tables_comments'])) ? $_REQUEST['tables_comments'] : '0';
+ $tables_notifications = (isset($_REQUEST['tables_notifications'])) ? $_REQUEST['tables_notifications'] : '0';
$select = (isset($_REQUEST['select'])) ? $_REQUEST['select'] : '0';
//Image
@@ -410,7 +413,7 @@
$uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ;
+ $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']);
$name_img = $_REQUEST['tables_name'].'.'.$extension;
$uploader->setTargetFileName($name_img);
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
@@ -427,7 +430,7 @@
if ($tablesHandler->insert($obj)) {
$tables_id = $xoopsDB->getInsertId();
$obj = $tablesHandler->get($tables_id);
- $form = $obj->getFormFields(false, $tables_id, intval($_REQUEST['tables_modules']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_status, $tables_waiting, $tables_online, $tables_search, $tables_comments, intval($_REQUEST['tables_nb_fields']), $select);
+ $form = $obj->getFormFields(false, $tables_id, intval($_REQUEST['tables_mid']), strtolower($_REQUEST['tables_name']), $tables_blocks, $tables_display_admin, $tables_display_user, $tables_status, $tables_waiting, $tables_online, $tables_search, $tables_comments, $tables_notifications, intval($_REQUEST['tables_nb_fields']), $select);
}
} else {
redirect_header('tables.php?op=list_tables', 2, _AM_TDMCREATE_TABLES_EXIST);
@@ -454,13 +457,12 @@
list( $category ) = $xoopsDB->fetchRow($result);
$obj =& $tablesHandler->get($_REQUEST['tables_id']);
if ( $category >= 0 ) {
- $form = $obj->getFormCategory();
+ $form = $obj->getFormCategory();
}
break;
case "tables_list":
default:
- echo $adminMenu->addNavigation('tables.php');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add');
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_CATEGORIES, 'tables.php?op=categories_create', 'add');
echo $adminMenu->renderButton();
@@ -472,7 +474,7 @@
global $pathIcon32;
//Retirer les tables inutiles
- $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0";
+ $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_mid = 0";
$result = $xoopsDB->queryF($sql);
while ( $myrow = $xoopsDB->fetchArray($result) )
{
@@ -490,13 +492,14 @@
{
echo '<table width="100%" cellspacing="1" class="outer">';
echo '<tr>';
- echo '<th align="center" width="30%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th align="center" width="10%">'._AM_TDMCREATE_NAME.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
- echo '<th align="center" width="20%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<th align="center" width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
echo '</tr>';
$class = 'odd';
foreach (array_keys($modules_arr) as $i)
@@ -509,19 +512,20 @@
$modules_display_admin = ($modules_display_admin == 1) ? _YES : _NO;
$modules_display_user = ($modules_display_user == 1) ? _YES : _NO;
echo '<tr class="odd center">';
+ echo '<td class="width5"><b>'.$i.'</b></td>';
echo '<td class="left"><b>'.$modules_name.'</b></td>';
echo '<td><img src="../images/uploads/modules/'.$modules_image.'" height="30px"></td>';
echo '<td>'.$modules_display_admin.'</td>';
echo '<td>'.$modules_display_user.'</td>';
- echo '<td> </td>';
- echo '<td> </td>';
+ echo '<td>~</td>';
+ echo '<td>~</td>';
echo '<td>';
- echo '<a href="tables.php?op=edit_modules&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=delete_modules&modules_id='.$modules_id.'"><img src='. $pathIcon16 ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
+ echo '<a href="modules.php?op=edit&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._EDIT.'" title="'._EDIT.'"></a> <a href="modules.php?op=delete&modules_id='.$modules_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._DELETE.'" title="'._DELETE.'"></a>';
echo '</td>';
echo '</tr>';
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria('tables_modules', $modules_id));
+ $criteria->add(new Criteria('tables_mid', $modules_id));
$criteria->setSort('tables_name');
$criteria->setOrder('ASC');
$tables_arr = $tablesHandler->getall($criteria);
@@ -529,40 +533,45 @@
if ( $numrows_tables != 0 )
{
foreach (array_keys($tables_arr) as $i)
- {
- $tables_id = $tables_arr[$i]->getVar('tables_id');
- $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_blocks');
- $tables_fields = $tables_arr[$i]->getVar('tables_fields');
+ $tables_blocks = $tables_arr[$i]->getVar('tables_blocks');
$tables_display_admin = $tables_arr[$i]->getVar('tables_display_admin');
- $tables_display_user = $tables_arr[$i]->getVar('tables_display_user');
- $fields = explode("|", $tables_fields);
+ $tables_display_user = $tables_arr[$i]->getVar('tables_display_user');
$nb_fields = $tables_arr[$i]->getVar('tables_nb_fields');
$display_admin = ($tables_display_admin == 1) ? _YES : _NO;
$display_user = ($tables_display_user == 1) ? _YES : _NO;
$blocks = ($tables_blocks == 1) ? _YES : _NO;
echo '<tr class="even center">';
+ echo '<td class="center">'.$i.'</b></a></td>';
echo '<td class="left"> <b>- '.$tables_name.'</b></a></td>';
-
-// if(!is_dir($pathIcon32)){
- echo '<td><img src="'.$pathIcon32.'/'.$tables_img.'" height="30px"></td>';
-// }else{
-// echo '<td><img src="../images/uploads/tables/'.$tables_img.'" height="30px"></td>';
-// }
+ echo '<td><img src="'.$pathIcon32.'/'.$tables_img.'" height="30px"></td>';
echo '<td>'.$display_admin.'</td>';
echo '<td>'.$display_user.'</td>';
echo '<td>'.$blocks.'</td>';
echo '<td>'.$nb_fields.'</td>';
echo '<td>';
- echo '<a href="tables.php?op=edit_tables&tables_id='.$tables_id.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_fields&tables_id='.$tables_id.'"><img src="'. $pathIcon16 .'/inserttable.png" alt="'._AM_TDMCREATE_FORMFIELDS.'" title="'._AM_TDMCREATE_FORMFIELDS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tables_id.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
+ echo '<a href="tables.php?op=edit_tables&tables_id='.$i.'"><img src="'. $pathIcon16 .'/edit.png" alt="'._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_fields&tables_id='.$i.'"><img src="'. $pathIcon16 .'/inserttable.png" alt="'._AM_TDMCREATE_FORMFIELDS.'" title="'._AM_TDMCREATE_FORMFIELDS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$i.'"><img src="'. $pathIcon16 .'/delete.png" alt="'._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>';
echo '</td>';
echo '</tr>';
}
}
}
echo '</table>';
+ } else {
+ echo '<table width="100%" cellspacing="1" class="outer">';
+ echo '<tr class="center">';
+ echo '<th width="1%">'._AM_TDMCREATE_ID.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>';
+ echo '<th width="15%">'._AM_TDMCREATE_DISPLAY_USER.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
+ echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
+ echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
+ echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '</tr></table><br><br>';
}
break;
}
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_modules.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -22,11 +22,6 @@
if (!defined("XOOPS_ROOT_PATH")) {
die("XOOPS root path not defined");
}
-
-if (!class_exists('XoopsPersistableObjectHandler')) {
- include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/class/object.php';
-}
-
//include_once 'iconGenerator.php';
class tdmcreate_modules extends XoopsObject
@@ -36,33 +31,36 @@
{
global $xoopsModuleConfig;;
$this->XoopsObject();
- $this->initVar("modules_id",XOBJ_DTYPE_INT, 0,false,5);
- $this->initVar("modules_name",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_name"],false);
- $this->initVar("modules_version",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_version"],false);
- $this->initVar("modules_description",XOBJ_DTYPE_TXTAREA, $xoopsModuleConfig["module_description"], false);
- $this->initVar("modules_author",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_author"], false);
- $this->initVar("modules_author_mail",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_author_email"],false);
- $this->initVar("modules_author_website_url",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_author_website_url"],false);
- $this->initVar("modules_author_website_name",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_author_website"],false);
- $this->initVar("modules_credits",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_credits"], false);
- $this->initVar("modules_license",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_license"], false);
- $this->initVar("modules_release_info",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_release_info"], false);
- $this->initVar("modules_release_file",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_release_file"], false);
- $this->initVar("modules_manual",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_manual"], false);
- $this->initVar("modules_manual_file",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_manual_file"], false);
- $this->initVar("modules_image",XOBJ_DTYPE_TXTBOX, null, false);
- $this->initVar("modules_demo_site_url",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_demo_site_url"], false);
- $this->initVar("modules_demo_site_name",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_demo_site_name"], false);
- $this->initVar("modules_forum_site_url",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_forum_site_url"], false);
- $this->initVar("modules_forum_site_name",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_forum_site_name"], false);
- $this->initVar("modules_module_website_url",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_website_url"], false);
- $this->initVar("modules_module_website_name",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_website_name"], false);
- $this->initVar("modules_release",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_release"], false);
- $this->initVar("modules_module_status",XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig["module_module_status"], false);
- $this->initVar("modules_display_admin",XOBJ_DTYPE_INT,$xoopsModuleConfig["module_display_admin"], false, 1);
- $this->initVar("modules_display_user",XOBJ_DTYPE_INT, $xoopsModuleConfig["module_display_user"], false, 1);
- $this->initVar("modules_active_search",XOBJ_DTYPE_INT, $xoopsModuleConfig["module_active_search"], false, 1);
- $this->initVar("modules_active_comments",XOBJ_DTYPE_INT, $xoopsModuleConfig["module_active_comments"], false, 1);
+ $this->initVar('modules_id',XOBJ_DTYPE_INT, 0,false,5);
+ $this->initVar('modules_name',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_name'],false);
+ $this->initVar('modules_version',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_version'],false);
+ $this->initVar('modules_description',XOBJ_DTYPE_TXTAREA, $xoopsModuleConfig['module_description'], false);
+ $this->initVar('modules_author',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_author'], false);
+ $this->initVar('modules_author_mail',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_author_email'],false);
+ $this->initVar('modules_author_website_url',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_author_website_url'],false);
+ $this->initVar('modules_author_website_name',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_author_website'],false);
+ $this->initVar('modules_credits',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_credits'], false);
+ $this->initVar('modules_license',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_license'], false);
+ $this->initVar('modules_release_info',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_release_info'], false);
+ $this->initVar('modules_release_file',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_release_file'], false);
+ $this->initVar('modules_manual',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_manual'], false);
+ $this->initVar('modules_manual_file',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_manual_file'], false);
+ $this->initVar('modules_image',XOBJ_DTYPE_TXTBOX, null, false);
+ $this->initVar('modules_demo_site_url',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_demo_site_url'], false);
+ $this->initVar('modules_demo_site_name',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_demo_site_name'], false);
+ $this->initVar('modules_forum_site_url',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_forum_site_url'], false);
+ $this->initVar('modules_forum_site_name',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_forum_site_name'], false);
+ $this->initVar('modules_module_website_url',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_website_url'], false);
+ $this->initVar('modules_module_website_name',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_website_name'], false);
+ $this->initVar('modules_release',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_release'], false);
+ $this->initVar('modules_module_status',XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_module_status'], false);
+ $this->initVar('modules_display_admin',XOBJ_DTYPE_INT,$xoopsModuleConfig['module_display_admin'], false, 1);
+ $this->initVar('modules_display_user',XOBJ_DTYPE_INT, $xoopsModuleConfig['module_display_user'], false, 1);
+ $this->initVar('modules_active_search',XOBJ_DTYPE_INT, $xoopsModuleConfig['module_active_search'], false, 1);
+ $this->initVar('modules_active_comments',XOBJ_DTYPE_INT, $xoopsModuleConfig['module_active_comments'], false, 1);
+ $this->initVar('modules_active_notifications', XOBJ_DTYPE_INT, $xoopsModuleConfig['module_active_notifications'], false, 1);
+ $this->initVar('modules_paypal_button', XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_paypal_button'], false, 50);
+ $this->initVar('modules_subversion', XOBJ_DTYPE_TXTBOX, $xoopsModuleConfig['module_subversion'], false, 10);
}
function getForm($action = false)
@@ -104,6 +102,9 @@
$modules_active_comments = $this->isNew() ? 0 : $this->getVar('modules_active_comments');
$form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_COMMENTS, 'modules_active_comments', $modules_active_comments, _YES, _NO));
+ $modules_active_notifications = $this->isNew() ? 0 : $this->getVar('modules_active_notifications');
+ $form->addElement(new XoopsFormRadioYN(_AM_TDMCREATE_MODULES_ACTIVE_NOTIFICATIONS, 'modules_active_notifications', $modules_active_notifications, _YES, _NO));
+
$modules_image = $this->getVar('modules_image') ? $this->getVar('modules_image') : 'module_logo.png';
$uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/modules";
@@ -117,12 +118,6 @@
$imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"modules_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" );
$imgtray->addElement($imageselect,FALSE);
$imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $modules_image . "' name='image3' id='image3' alt='' />" ) );
-
-// $fileseltray= new XoopsFormElementTray('','<br />');
-// $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', 104857600),FALSE);
-// $fileseltray->addElement(new XoopsFormLabel(''), FALSE);
-// $imgtray->addElement($fileseltray);
-
$form->addElement($imgtray);
//---------- START -----------------
@@ -186,59 +181,34 @@
<?php
+ $tables_img = $this->getVar('tables_img') ? $this->getVar('tables_img') : 'about.png';
+ if(is_dir($pathIcon32)){
+ $uploadirectory = $pathIcon32;
+ }else{
+ $uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/tables";
+ }
+ $createLogoTray = new XoopsFormElementTray('Create new Logo','<br />');
+ if(is_dir($pathIcon32)){
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".$pathIcon32");
+ }else{
+ $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/tables");
+ }
+ $iconSelect= new XoopsFormSelect($imgpath, 'tables_img', $tables_img, 8);
+ $tables_img_array = XoopsLists :: getImgListAsArray( $uploadirectory );
+ foreach( $tables_img_array as $image ) {
+ $iconSelect->addOption("$image", $image);
+ }
+ $iconSelect->setExtra( "onchange='showImgSelected2(\"image4\", \"tables_img\", \"" . $uploadirectory . "\", \"\", \"" . '' . "\")'" );
+ $createLogoTray->addElement($iconSelect,FALSE);
+ $createLogoTray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . $pathIcon32 . "/" . $tables_img . "' name='image4' id='image4' alt='' />" ) );
- $tables_img = $this->getVar('tables_img') ? $this->getVar('tables_img') : 'about.png';
- if(is_dir($pathIcon32)){
- $uploadirectory = $pathIcon32;
+ // Create preview and submit buttons
+ $buttonLogoGenerator4= new XoopsFormButton('', 'button4', "Create New Logo", 'button');
+ $buttonLogoGenerator4->setExtra("onclick='createNewModuleLogo(\"" . XOOPS_URL . "\")'");
+ $createLogoTray->addElement($buttonLogoGenerator4);
- }else{
- $uploadirectory = "/modules/".$xoopsModule->dirname()."/images/uploads/tables";
- }
+ $form->addElement($createLogoTray);
- $createLogoTray = new XoopsFormElementTray('Create new Logo','<br />');
- // if(is_dir(XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/icons/32")){
- // $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./Frameworks/moduleclasses/icons/32");
- // }else{
- // $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/tables");
- // }
-
- if(is_dir($pathIcon32)){
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".$pathIcon32");
- }else{
- $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, "./modules/".$xoopsModule->dirname()."/images/uploads/tables");
- }
-
- $iconSelect= new XoopsFormSelect($imgpath, 'tables_img', $tables_img, 8);
- $tables_img_array = XoopsLists :: getImgListAsArray( $uploadirectory );
-
- foreach( $tables_img_array as $image ) {
- $iconSelect->addOption("$image", $image);
- }
-
-
- $iconSelect->setExtra( "onchange='showImgSelected2(\"image4\", \"tables_img\", \"" . $uploadirectory . "\", \"\", \"" . '' . "\")'" );
-
- $createLogoTray->addElement($iconSelect,FALSE);
-
- //mb $imgtray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $tables_img . "' name='image3' id='image3' alt='' />" ) );
- $createLogoTray -> addElement( new XoopsFormLabel( '', "<br /><img src='" . $pathIcon32 . "/" . $tables_img . "' name='image4' id='image4' alt='' />" ) );
-
-// $fileseltray= new XoopsFormElementTray('','<br />');
-// $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD , 'attachedfile', 104857600),false);
-// $fileseltray->addElement(new XoopsFormLabel(''), false);
-// $createLogoTray->addElement($fileseltray);
-// $createLogoTray->addElement(new XoopsFormHidden('op', 'createLogo'));
-// $createLogoTray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
-
-
- // Create preview and submit buttons
-
- $buttonLogoGenerator4= new XoopsFormButton('', 'button4', "Create New Logo", 'button');
- $buttonLogoGenerator4->setExtra("onclick='createNewModuleLogo(\"" . XOOPS_URL . "\")'");
- $createLogoTray->addElement($buttonLogoGenerator4);
-
- $form->addElement($createLogoTray);
-
//------------ END --------------------
@@ -259,9 +229,11 @@
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MODULE_WEBSITE_URL, 'modules_module_website_url', 50, 255, $this->getVar('modules_module_website_url')), FALSE);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_MODULE_WEBSITE_NAME, 'modules_module_website_name', 50, 255, $this->getVar('modules_module_website_name')), FALSE);
$form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_RELEASE, 'modules_release', 50, 255, $this->getVar('modules_release')), FALSE);
- $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'modules_module_status', 50, 255, $this->getVar('modules_module_status')), FALSE);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_STATUS, 'modules_module_status', 50, 255, $this->getVar('modules_module_status')), FALSE);
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_PAYPAL_BUTTON, 'modules_paypal_button', 50, 255, $this->getVar('modules_paypal_button')));
+ $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULES_SUBVERSION, 'modules_subversion', 50, 255, $this->getVar('modules_subversion')));
- $form->addElement(new XoopsFormHidden('op', 'modules_save'));
+ $form->addElement(new XoopsFormHidden('op', 'save'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$form->display();
return $form;
Modified: XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php
===================================================================
--- XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 01:22:43 UTC (rev 12194)
+++ XoopsModules/TDMCreate/trunk/TDMCreate/class/tdmcreate_tables.php 2013-10-23 01:24:56 UTC (rev 12195)
@@ -1,60 +1,56 @@
<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
/**
- * ****************************************************************************
- * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS
- * - Licence GPL Copyright (c) (http://www.tdmxoops.net)
+ * tdmcreate module
*
- * Cette licence, contient des limitations!!!
- *
- * You may not change or alter any portion of this c...
[truncated message content] |