|
From: <txm...@us...> - 2013-04-02 18:37:26
|
Revision: 11337
http://sourceforge.net/p/xoops/svn/11337
Author: txmodxoops
Date: 2013-04-02 18:37:21 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
Adding new module shopping
Added Paths:
-----------
XoopsModules/txmshopping/
XoopsModules/txmshopping/releases/1.0/
XoopsModules/txmshopping/releases/1.0/shopping/
XoopsModules/txmshopping/releases/1.0/shopping/admin/
XoopsModules/txmshopping/releases/1.0/shopping/admin/about.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_footer.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_header.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/index.html
XoopsModules/txmshopping/releases/1.0/shopping/admin/index.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/itemproperties.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/items.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/itemtype.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/menu.php
XoopsModules/txmshopping/releases/1.0/shopping/admin/typeproperty.php
XoopsModules/txmshopping/releases/1.0/shopping/blocks/
XoopsModules/txmshopping/releases/1.0/shopping/blocks/index.html
XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemproperties.php
XoopsModules/txmshopping/releases/1.0/shopping/blocks/items.php
XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemtype.php
XoopsModules/txmshopping/releases/1.0/shopping/blocks/typeproperty.php
XoopsModules/txmshopping/releases/1.0/shopping/class/
XoopsModules/txmshopping/releases/1.0/shopping/class/index.html
XoopsModules/txmshopping/releases/1.0/shopping/class/shopping_itemproperties.php
XoopsModules/txmshopping/releases/1.0/shopping/class/shopping_items.php
XoopsModules/txmshopping/releases/1.0/shopping/class/shopping_itemtype.php
XoopsModules/txmshopping/releases/1.0/shopping/class/shopping_typeproperty.php
XoopsModules/txmshopping/releases/1.0/shopping/css/
XoopsModules/txmshopping/releases/1.0/shopping/css/index.html
XoopsModules/txmshopping/releases/1.0/shopping/css/style.css
XoopsModules/txmshopping/releases/1.0/shopping/docs/
XoopsModules/txmshopping/releases/1.0/shopping/docs/changelog.txt
XoopsModules/txmshopping/releases/1.0/shopping/docs/credits.txt
XoopsModules/txmshopping/releases/1.0/shopping/docs/index.html
XoopsModules/txmshopping/releases/1.0/shopping/docs/install.txt
XoopsModules/txmshopping/releases/1.0/shopping/docs/lang_diff.txt
XoopsModules/txmshopping/releases/1.0/shopping/docs/license.txt
XoopsModules/txmshopping/releases/1.0/shopping/docs/readme.txt
XoopsModules/txmshopping/releases/1.0/shopping/header.php
XoopsModules/txmshopping/releases/1.0/shopping/images/
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/16/
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/16/arrow.gif
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/16/index.html
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/16/off.png
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/16/on.png
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/32/
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/32/index.html
XoopsModules/txmshopping/releases/1.0/shopping/images/icons/index.html
XoopsModules/txmshopping/releases/1.0/shopping/images/index.html
XoopsModules/txmshopping/releases/1.0/shopping/images/shopping_logo.png
XoopsModules/txmshopping/releases/1.0/shopping/images/txmodxoops_logo.png
XoopsModules/txmshopping/releases/1.0/shopping/include/
XoopsModules/txmshopping/releases/1.0/shopping/include/common.php
XoopsModules/txmshopping/releases/1.0/shopping/include/functions.php
XoopsModules/txmshopping/releases/1.0/shopping/include/index.html
XoopsModules/txmshopping/releases/1.0/shopping/include/install.php
XoopsModules/txmshopping/releases/1.0/shopping/include/waiting.plugin.php
XoopsModules/txmshopping/releases/1.0/shopping/index.php
XoopsModules/txmshopping/releases/1.0/shopping/itemproperties.php
XoopsModules/txmshopping/releases/1.0/shopping/items.php
XoopsModules/txmshopping/releases/1.0/shopping/itemtype.php
XoopsModules/txmshopping/releases/1.0/shopping/language/
XoopsModules/txmshopping/releases/1.0/shopping/language/english/
XoopsModules/txmshopping/releases/1.0/shopping/language/english/admin.php
XoopsModules/txmshopping/releases/1.0/shopping/language/english/blocks.php
XoopsModules/txmshopping/releases/1.0/shopping/language/english/help/
XoopsModules/txmshopping/releases/1.0/shopping/language/english/help/help.html
XoopsModules/txmshopping/releases/1.0/shopping/language/english/help/index.html
XoopsModules/txmshopping/releases/1.0/shopping/language/english/index.html
XoopsModules/txmshopping/releases/1.0/shopping/language/english/main.php
XoopsModules/txmshopping/releases/1.0/shopping/language/english/modinfo.php
XoopsModules/txmshopping/releases/1.0/shopping/language/index.html
XoopsModules/txmshopping/releases/1.0/shopping/sql/
XoopsModules/txmshopping/releases/1.0/shopping/sql/index.html
XoopsModules/txmshopping/releases/1.0/shopping/sql/mysql.sql
XoopsModules/txmshopping/releases/1.0/shopping/templates/
XoopsModules/txmshopping/releases/1.0/shopping/templates/admin/
XoopsModules/txmshopping/releases/1.0/shopping/templates/admin/index.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/admin/shopping_admin_about.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/admin/shopping_admin_help.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/index.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/itemproperties_block.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/items_block.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/itemtype_block.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/blocks/typeproperty_block.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/index.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_footer.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_header.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_index.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_itemproperties.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_items.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_itemtype.html
XoopsModules/txmshopping/releases/1.0/shopping/templates/shopping_typeproperty.html
XoopsModules/txmshopping/releases/1.0/shopping/typeproperty.php
XoopsModules/txmshopping/releases/1.0/shopping/xoops_version.php
XoopsModules/txmshopping/trunk/shopping/
XoopsModules/txmshopping/trunk/shopping/admin/
XoopsModules/txmshopping/trunk/shopping/admin/about.php
XoopsModules/txmshopping/trunk/shopping/admin/admin_footer.php
XoopsModules/txmshopping/trunk/shopping/admin/admin_header.php
XoopsModules/txmshopping/trunk/shopping/admin/index.html
XoopsModules/txmshopping/trunk/shopping/admin/index.php
XoopsModules/txmshopping/trunk/shopping/admin/itemproperties.php
XoopsModules/txmshopping/trunk/shopping/admin/items.php
XoopsModules/txmshopping/trunk/shopping/admin/itemtype.php
XoopsModules/txmshopping/trunk/shopping/admin/menu.php
XoopsModules/txmshopping/trunk/shopping/admin/typeproperty.php
XoopsModules/txmshopping/trunk/shopping/blocks/
XoopsModules/txmshopping/trunk/shopping/blocks/index.html
XoopsModules/txmshopping/trunk/shopping/blocks/itemproperties.php
XoopsModules/txmshopping/trunk/shopping/blocks/items.php
XoopsModules/txmshopping/trunk/shopping/blocks/itemtype.php
XoopsModules/txmshopping/trunk/shopping/blocks/typeproperty.php
XoopsModules/txmshopping/trunk/shopping/class/
XoopsModules/txmshopping/trunk/shopping/class/index.html
XoopsModules/txmshopping/trunk/shopping/class/shopping_itemproperties.php
XoopsModules/txmshopping/trunk/shopping/class/shopping_items.php
XoopsModules/txmshopping/trunk/shopping/class/shopping_itemtype.php
XoopsModules/txmshopping/trunk/shopping/class/shopping_typeproperty.php
XoopsModules/txmshopping/trunk/shopping/css/
XoopsModules/txmshopping/trunk/shopping/css/index.html
XoopsModules/txmshopping/trunk/shopping/css/style.css
XoopsModules/txmshopping/trunk/shopping/docs/
XoopsModules/txmshopping/trunk/shopping/docs/changelog.txt
XoopsModules/txmshopping/trunk/shopping/docs/credits.txt
XoopsModules/txmshopping/trunk/shopping/docs/index.html
XoopsModules/txmshopping/trunk/shopping/docs/install.txt
XoopsModules/txmshopping/trunk/shopping/docs/lang_diff.txt
XoopsModules/txmshopping/trunk/shopping/docs/license.txt
XoopsModules/txmshopping/trunk/shopping/docs/readme.txt
XoopsModules/txmshopping/trunk/shopping/header.php
XoopsModules/txmshopping/trunk/shopping/images/
XoopsModules/txmshopping/trunk/shopping/images/icons/
XoopsModules/txmshopping/trunk/shopping/images/icons/16/
XoopsModules/txmshopping/trunk/shopping/images/icons/16/arrow.gif
XoopsModules/txmshopping/trunk/shopping/images/icons/16/index.html
XoopsModules/txmshopping/trunk/shopping/images/icons/16/off.png
XoopsModules/txmshopping/trunk/shopping/images/icons/16/on.png
XoopsModules/txmshopping/trunk/shopping/images/icons/32/
XoopsModules/txmshopping/trunk/shopping/images/icons/32/index.html
XoopsModules/txmshopping/trunk/shopping/images/icons/index.html
XoopsModules/txmshopping/trunk/shopping/images/index.html
XoopsModules/txmshopping/trunk/shopping/images/shopping_logo.png
XoopsModules/txmshopping/trunk/shopping/images/txmodxoops_logo.png
XoopsModules/txmshopping/trunk/shopping/include/
XoopsModules/txmshopping/trunk/shopping/include/common.php
XoopsModules/txmshopping/trunk/shopping/include/functions.php
XoopsModules/txmshopping/trunk/shopping/include/index.html
XoopsModules/txmshopping/trunk/shopping/include/install.php
XoopsModules/txmshopping/trunk/shopping/include/waiting.plugin.php
XoopsModules/txmshopping/trunk/shopping/index.php
XoopsModules/txmshopping/trunk/shopping/itemproperties.php
XoopsModules/txmshopping/trunk/shopping/items.php
XoopsModules/txmshopping/trunk/shopping/itemtype.php
XoopsModules/txmshopping/trunk/shopping/language/
XoopsModules/txmshopping/trunk/shopping/language/english/
XoopsModules/txmshopping/trunk/shopping/language/english/admin.php
XoopsModules/txmshopping/trunk/shopping/language/english/blocks.php
XoopsModules/txmshopping/trunk/shopping/language/english/help/
XoopsModules/txmshopping/trunk/shopping/language/english/help/help.html
XoopsModules/txmshopping/trunk/shopping/language/english/help/index.html
XoopsModules/txmshopping/trunk/shopping/language/english/index.html
XoopsModules/txmshopping/trunk/shopping/language/english/main.php
XoopsModules/txmshopping/trunk/shopping/language/english/modinfo.php
XoopsModules/txmshopping/trunk/shopping/language/index.html
XoopsModules/txmshopping/trunk/shopping/sql/
XoopsModules/txmshopping/trunk/shopping/sql/index.html
XoopsModules/txmshopping/trunk/shopping/sql/mysql.sql
XoopsModules/txmshopping/trunk/shopping/templates/
XoopsModules/txmshopping/trunk/shopping/templates/admin/
XoopsModules/txmshopping/trunk/shopping/templates/admin/index.html
XoopsModules/txmshopping/trunk/shopping/templates/admin/shopping_admin_about.html
XoopsModules/txmshopping/trunk/shopping/templates/admin/shopping_admin_help.html
XoopsModules/txmshopping/trunk/shopping/templates/blocks/
XoopsModules/txmshopping/trunk/shopping/templates/blocks/index.html
XoopsModules/txmshopping/trunk/shopping/templates/blocks/itemproperties_block.html
XoopsModules/txmshopping/trunk/shopping/templates/blocks/items_block.html
XoopsModules/txmshopping/trunk/shopping/templates/blocks/itemtype_block.html
XoopsModules/txmshopping/trunk/shopping/templates/blocks/typeproperty_block.html
XoopsModules/txmshopping/trunk/shopping/templates/index.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_footer.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_header.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_index.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_itemproperties.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_items.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_itemtype.html
XoopsModules/txmshopping/trunk/shopping/templates/shopping_typeproperty.html
XoopsModules/txmshopping/trunk/shopping/typeproperty.php
XoopsModules/txmshopping/trunk/shopping/xoops_version.php
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/about.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/about.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/about.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,26 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 about.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include 'admin_header.php';
+echo $adminMenu->addNavigation('about.php');
+echo $adminMenu->renderabout('YDRUY5QZQHAHS', false);
+include 'admin_footer.php';
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_footer.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_footer.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_footer.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,30 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 admin_footer.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a>
+ <a href='http://www.txmodxoops.org' title='Visit TXMod Xoops' rel='external'>
+ <img src='../images/txmodxoops_logo.png' alt='TXMod Xoops' /></a></div>";
+echo "<div class='center smallsmall italic pad5'>
+ <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_SHOPPING_MAINTAINEDBY."
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+xoops_cp_footer();
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_header.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_header.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/admin_header.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,57 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 admin_header.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+require_once dirname(dirname(dirname(dirname(__FILE__)))). '/include/cp_header.php';
+$thisdir = dirname(dirname(__FILE__));
+include_once $thisdir.'/include/common.php';
+include_once $thisdir.'/include/functions.php';
+
+$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname');
+
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+//load handlers
+$itemtypeHandler =& xoops_getModuleHandler('shopping_itemtype', $thisDirname);
+$typepropertyHandler =& xoops_getModuleHandler('shopping_typeproperty', $thisDirname);
+$itemsHandler =& xoops_getModuleHandler('shopping_items', $thisDirname);
+$itempropertiesHandler =& xoops_getModuleHandler('shopping_itemproperties', $thisDirname);
+
+$myts =& MyTextSanitizer::getInstance();
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+
+$xoopsTpl->assign('pathIcon16', $pathIcon16);
+$xoopsTpl->assign('pathIcon32', $pathIcon32);
+//Load languages
+xoops_loadLanguage('admin', $thisDirname);
+xoops_loadLanguage('modinfo', $thisDirname);
+xoops_loadLanguage('main', $thisDirname);
+// Local admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+xoops_cp_header();
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/index.html
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/index.html (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/index.html 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/index.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/index.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/index.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,46 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 index.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include_once 'admin_header.php';
+ //count "total item"
+ $count_item = $itemtypeHandler->getCount();
+ //count "total type"
+ $count_type = $typepropertyHandler->getCount();
+ //count "total item"
+ $count_item = $itemsHandler->getCount();
+ //count "total item"
+ $count_item = $itempropertiesHandler->getCount();
+ // InfoBox itemproperties
+ $adminMenu->addInfoBox(_AM_SHOPPING_STATISTICS);
+ // InfoBox item
+ $adminMenu->addInfoBoxLine(_AM_SHOPPING_STATISTICS, _AM_SHOPPING_THEREARE_ITEMTYPE, $count_item);
+ // InfoBox type
+ $adminMenu->addInfoBoxLine(_AM_SHOPPING_STATISTICS, _AM_SHOPPING_THEREARE_TYPEPROPERTY, $count_type);
+ // InfoBox item
+ $adminMenu->addInfoBoxLine(_AM_SHOPPING_STATISTICS, _AM_SHOPPING_THEREARE_ITEMS, $count_item);
+ // InfoBox item
+ $adminMenu->addInfoBoxLine(_AM_SHOPPING_STATISTICS, _AM_SHOPPING_THEREARE_ITEMPROPERTIES, $count_item);
+ // Render Index
+ echo $adminMenu->addNavigation('index.php');
+ echo $adminMenu->renderIndex();
+include_once 'admin_footer.php';
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/itemproperties.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/itemproperties.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/itemproperties.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,157 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 itemproperties.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include_once 'admin_header.php';
+//It recovered the value of argument op in URL$
+$op = shopping_CleanVars($_REQUEST, 'op', 'list', 'string');
+echo $adminMenu->addNavigation('itemproperties.php');
+switch ($op)
+{
+ case 'list':
+ default:
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMPROPERTIES, 'itemproperties.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ $numrows = $itempropertiesHandler->getCount();
+ $itemproperties_arr = $itempropertiesHandler->getAll($criteria);
+
+ // Table view
+ if ($numrows>0)
+ {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_TID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_PID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_VALUE."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($itemproperties_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+
+ $itemtype =& $itemtypeHandler->get($itemproperties_arr[$i]->getVar('item_tid'));
+ $itemproperties_itemtype = $itemtype->getVar('item_name');
+ echo "<td class='center'>".$itemproperties_itemtype."</td>";
+
+ $typeproperty =& $typepropertyHandler->get($itemproperties_arr[$i]->getVar('item_pid'));
+ $itemproperties_typeproperty = $typeproperty->getVar('type_name');
+ echo "<td class='center'>".$itemproperties_typeproperty."</td>";
+ echo "<td class='center'>".strip_tags($itemproperties_arr[$i]->getVar('item_value'))."</td>";
+ echo "<td class='center'>".( ($itemproperties_arr[$i]->getVar('item_status') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($itemproperties_arr[$i]->getVar('item_waiting') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($itemproperties_arr[$i]->getVar('item_online') == 1 ) ? _YES : _NO)."</td>";
+
+ echo "<td class='center width5'>
+ <a href='itemproperties.php?op=edit&item_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='itemproperties.php?op=delete&item_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+ </td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ } else {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_TID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_PID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_VALUE."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr><tr><td class='errorMsg' colspan='7'>There are no item</td></tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMPROPERTIES_LIST, 'itemproperties.php', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $itempropertiesHandler->create();
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'save':
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('itemproperties.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['item_id'])) {
+ $obj =& $itempropertiesHandler->get($_REQUEST['item_id']);
+ } else {
+ $obj =& $itempropertiesHandler->create();
+ }
+
+ // Form save fields
+ $obj->setVar('item_tid', $_REQUEST['item_tid']);
+ $obj->setVar('item_pid', $_REQUEST['item_pid']);
+ $obj->setVar('item_value', $_REQUEST['item_value']);
+ $obj->setVar('item_status', (($_REQUEST['item_status'] == 1) ? '1' : '0'));
+ $obj->setVar('item_waiting', (($_REQUEST['item_waiting'] == 1) ? '1' : '0'));
+ $obj->setVar('item_online', (($_REQUEST['item_online'] == 1) ? '1' : '0'));
+
+ if ($itempropertiesHandler->insert($obj)) {
+ redirect_header('itemproperties.php?op=list', 2, _AM_SHOPPING_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case 'edit':
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMPROPERTIES, 'itemproperties.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMPROPERTIES_LIST, 'itemproperties.php', 'list');
+ echo $adminMenu->renderButton();
+ $obj = $itempropertiesHandler->get($_REQUEST['item_id']);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'delete':
+ $obj =& $itempropertiesHandler->get($_REQUEST['item_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('itemproperties.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($itempropertiesHandler->delete($obj)) {
+ redirect_header('itemproperties.php', 3, _AM_SHOPPING_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'item_id' => $_REQUEST['item_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SHOPPING_FORMSUREDEL, $obj->getVar('item_id')));
+ }
+ break;
+}
+include_once 'admin_footer.php';
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/items.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/items.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/items.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,158 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 items.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include_once 'admin_header.php';
+//It recovered the value of argument op in URL$
+$op = shopping_CleanVars($_REQUEST, 'op', 'list', 'string');
+echo $adminMenu->addNavigation('items.php');
+switch ($op)
+{
+ case 'list':
+ default:
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMS, 'items.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ $numrows = $itemsHandler->getCount();
+ $items_arr = $itemsHandler->getAll($criteria);
+
+ // Table view
+ if ($numrows>0)
+ {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_TID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_PRICE."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STOCK."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($items_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+
+ $itemtype =& $itemtypeHandler->get($items_arr[$i]->getVar('item_tid'));
+ $items_itemtype = $itemtype->getVar('item_name');
+ echo "<td class='center'>".$items_itemtype."</td>";
+ echo "<td class='center'>".strip_tags($items_arr[$i]->getVar('item_name'))."</td>";
+ echo "<td class='center'>".strip_tags($items_arr[$i]->getVar('item_price'))."</td>";
+ echo "<td class='center'>".strip_tags($items_arr[$i]->getVar('item_stock'))."</td>";
+ echo "<td class='center'>".( ($items_arr[$i]->getVar('item_status') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($items_arr[$i]->getVar('item_waiting') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($items_arr[$i]->getVar('item_online') == 1 ) ? _YES : _NO)."</td>";
+
+ echo "<td class='center width5'>
+ <a href='items.php?op=edit&item_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='items.php?op=delete&item_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+ </td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ } else {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_TID."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_PRICE."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STOCK."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr><tr><td class='errorMsg' colspan='8'>There are no item</td></tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMS_LIST, 'items.php', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $itemsHandler->create();
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'save':
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('items.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['item_id'])) {
+ $obj =& $itemsHandler->get($_REQUEST['item_id']);
+ } else {
+ $obj =& $itemsHandler->create();
+ }
+
+ // Form save fields
+ $obj->setVar('item_tid', $_REQUEST['item_tid']);
+ $obj->setVar('item_name', $_REQUEST['item_name']);
+ $obj->setVar('item_price', $_REQUEST['item_price']);
+ $obj->setVar('item_stock', $_REQUEST['item_stock']);
+ $obj->setVar('item_status', (($_REQUEST['item_status'] == 1) ? '1' : '0'));
+ $obj->setVar('item_waiting', (($_REQUEST['item_waiting'] == 1) ? '1' : '0'));
+ $obj->setVar('item_online', (($_REQUEST['item_online'] == 1) ? '1' : '0'));
+
+ if ($itemsHandler->insert($obj)) {
+ redirect_header('items.php?op=list', 2, _AM_SHOPPING_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case 'edit':
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMS, 'items.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMS_LIST, 'items.php', 'list');
+ echo $adminMenu->renderButton();
+ $obj = $itemsHandler->get($_REQUEST['item_id']);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'delete':
+ $obj =& $itemsHandler->get($_REQUEST['item_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('items.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($itemsHandler->delete($obj)) {
+ redirect_header('items.php', 3, _AM_SHOPPING_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'item_id' => $_REQUEST['item_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SHOPPING_FORMSUREDEL, $obj->getVar('item_id')));
+ }
+ break;
+}
+include_once 'admin_footer.php';
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/itemtype.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/itemtype.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/itemtype.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,143 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 itemtype.php 11337 Tue 2013/04/02 17:54:27Z Timgno $
+ */
+
+include_once 'admin_header.php';
+//It recovered the value of argument op in URL$
+$op = shopping_CleanVars($_REQUEST, 'op', 'list', 'string');
+echo $adminMenu->addNavigation('itemtype.php');
+switch ($op)
+{
+ case 'list':
+ default:
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMTYPE, 'itemtype.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ $numrows = $itemtypeHandler->getCount();
+ $itemtype_arr = $itemtypeHandler->getAll($criteria);
+
+ // Table view
+ if ($numrows>0)
+ {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($itemtype_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+ echo "<td class='center'>".strip_tags($itemtype_arr[$i]->getVar('item_name'))."</td>";
+ echo "<td class='center'>".( ($itemtype_arr[$i]->getVar('item_status') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($itemtype_arr[$i]->getVar('item_waiting') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($itemtype_arr[$i]->getVar('item_online') == 1 ) ? _YES : _NO)."</td>";
+
+ echo "<td class='center width5'>
+ <a href='itemtype.php?op=edit&item_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='itemtype.php?op=delete&item_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+ </td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ } else {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_ITEM_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_ITEM_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr><tr><td class='errorMsg' colspan='5'>There are no item</td></tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMTYPE_LIST, 'itemtype.php', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $itemtypeHandler->create();
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'save':
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('itemtype.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['item_id'])) {
+ $obj =& $itemtypeHandler->get($_REQUEST['item_id']);
+ } else {
+ $obj =& $itemtypeHandler->create();
+ }
+
+ // Form save fields
+ $obj->setVar('item_name', $_REQUEST['item_name']);
+ $obj->setVar('item_status', (($_REQUEST['item_status'] == 1) ? '1' : '0'));
+ $obj->setVar('item_waiting', (($_REQUEST['item_waiting'] == 1) ? '1' : '0'));
+ $obj->setVar('item_online', (($_REQUEST['item_online'] == 1) ? '1' : '0'));
+
+ if ($itemtypeHandler->insert($obj)) {
+ redirect_header('itemtype.php?op=list', 2, _AM_SHOPPING_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case 'edit':
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_ITEMTYPE, 'itemtype.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_SHOPPING_ITEMTYPE_LIST, 'itemtype.php', 'list');
+ echo $adminMenu->renderButton();
+ $obj = $itemtypeHandler->get($_REQUEST['item_id']);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'delete':
+ $obj =& $itemtypeHandler->get($_REQUEST['item_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('itemtype.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($itemtypeHandler->delete($obj)) {
+ redirect_header('itemtype.php', 3, _AM_SHOPPING_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'item_id' => $_REQUEST['item_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SHOPPING_FORMSUREDEL, $obj->getVar('item_id')));
+ }
+ break;
+}
+include_once 'admin_footer.php';
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/menu.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/menu.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/menu.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,54 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 menu.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+$dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+$module_handler =& xoops_gethandler('module');
+$xoopsModule =& XoopsModule::getByDirname($dirname);
+$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
+$pathIcon32 = $moduleInfo->getInfo('icons32');
+$adminmenu = array();
+$i = 1;
+$adminmenu[$i]['title'] = _MI_SHOPPING_ADMENU1;
+$adminmenu[$i]['link'] = 'admin/index.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/home.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_SHOPPING_ADMENU2;
+$adminmenu[$i]['link'] = 'admin/itemtype.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/type.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_SHOPPING_ADMENU3;
+$adminmenu[$i]['link'] = 'admin/typeproperty.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/view_detailed.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_SHOPPING_ADMENU4;
+$adminmenu[$i]['link'] = 'admin/items.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/attach.png';
+$i++;
+$adminmenu[$i]['title'] = _MI_SHOPPING_ADMENU5;
+$adminmenu[$i]['link'] = 'admin/itemproperties.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/view_text.png';
+$i++;
+$adminmenu[$i]["title"] = _MI_SHOPPING_ADMENU6;
+$adminmenu[$i]['link'] = 'admin/about.php';
+$adminmenu[$i]['icon'] = $pathIcon32.'/about.png';
+unset( $i );
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/admin/typeproperty.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/admin/typeproperty.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/admin/typeproperty.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,150 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 typeproperty.php 11337 Tue 2013/04/02 17:54:27Z Timgno $
+ */
+
+include_once 'admin_header.php';
+//It recovered the value of argument op in URL$
+$op = shopping_CleanVars($_REQUEST, 'op', 'list', 'string');
+echo $adminMenu->addNavigation('typeproperty.php');
+switch ($op)
+{
+ case 'list':
+ default:
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_TYPEPROPERTY, 'typeproperty.php?op=new', 'add');
+ echo $adminMenu->renderButton();
+ $criteria = new CriteriaCompo();
+ $criteria->setSort('type_id');
+ $criteria->setOrder('ASC');
+ $numrows = $typepropertyHandler->getCount();
+ $typeproperty_arr = $typepropertyHandler->getAll($criteria);
+
+ // Table view
+ if ($numrows>0)
+ {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_TYPE_TID."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr>";
+
+ $class = "odd";
+
+ foreach (array_keys($typeproperty_arr) as $i)
+ {
+ echo "<tr class='".$class."'>";
+ $class = ($class == "even") ? "odd" : "even";
+
+ $itemtype =& $itemtypeHandler->get($typeproperty_arr[$i]->getVar('type_tid'));
+ $typeproperty_itemtype = $itemtype->getVar('item_name');
+ echo "<td class='center'>".$typeproperty_itemtype."</td>";
+ echo "<td class='center'>".strip_tags($typeproperty_arr[$i]->getVar('type_name'))."</td>";
+ echo "<td class='center'>".( ($typeproperty_arr[$i]->getVar('type_status') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($typeproperty_arr[$i]->getVar('type_waiting') == 1 ) ? _YES : _NO)."</td>";
+ echo "<td class='center'>".( ($typeproperty_arr[$i]->getVar('type_online') == 1 ) ? _YES : _NO)."</td>";
+
+ echo "<td class='center width5'>
+ <a href='typeproperty.php?op=edit&type_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
+ <a href='typeproperty.php?op=delete&type_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a>
+ </td>";
+ echo "</tr>";
+ }
+ echo "</table><br /><br />";
+ } else {
+ echo "<table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'>"._AM_SHOPPING_TYPE_TID."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_NAME."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_STATUS."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_WAITING."</th>
+ <th class='center'>"._AM_SHOPPING_TYPE_ONLINE."</th>
+ <th class='center width5'>"._AM_SHOPPING_FORMACTION."</th>
+ </tr><tr><td class='errorMsg' colspan='6'>There are no type</td></tr>";
+ echo "</table><br /><br />";
+ }
+
+ break;
+
+ case 'new':
+ $adminMenu->addItemButton(_AM_SHOPPING_TYPEPROPERTY_LIST, 'typeproperty.php', 'list');
+ echo $adminMenu->renderButton();
+
+ $obj =& $typepropertyHandler->create();
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'save':
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('typeproperty.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if (isset($_REQUEST['type_id'])) {
+ $obj =& $typepropertyHandler->get($_REQUEST['type_id']);
+ } else {
+ $obj =& $typepropertyHandler->create();
+ }
+
+ // Form save fields
+ $obj->setVar('type_tid', $_REQUEST['type_tid']);
+ $obj->setVar('type_name', $_REQUEST['type_name']);
+ $obj->setVar('type_status', (($_REQUEST['type_status'] == 1) ? '1' : '0'));
+ $obj->setVar('type_waiting', (($_REQUEST['type_waiting'] == 1) ? '1' : '0'));
+ $obj->setVar('type_online', (($_REQUEST['type_online'] == 1) ? '1' : '0'));
+
+ if ($typepropertyHandler->insert($obj)) {
+ redirect_header('typeproperty.php?op=list', 2, _AM_SHOPPING_FORMOK);
+ }
+
+ echo $obj->getHtmlErrors();
+ $form =& $obj->getForm();
+ $form->display();
+ break;
+
+ case 'edit':
+ $adminMenu->addItemButton(_AM_SHOPPING_ADD_TYPEPROPERTY, 'typeproperty.php?op=new', 'add');
+ $adminMenu->addItemButton(_AM_SHOPPING_TYPEPROPERTY_LIST, 'typeproperty.php', 'list');
+ echo $adminMenu->renderButton();
+ $obj = $typepropertyHandler->get($_REQUEST['type_id']);
+ $form = $obj->getForm();
+ $form->display();
+ break;
+
+ case 'delete':
+ $obj =& $typepropertyHandler->get($_REQUEST['type_id']);
+ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) {
+ if ( !$GLOBALS['xoopsSecurity']->check() ) {
+ redirect_header('typeproperty.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+ if ($typepropertyHandler->delete($obj)) {
+ redirect_header('typeproperty.php', 3, _AM_SHOPPING_FORMDELOK);
+ } else {
+ echo $obj->getHtmlErrors();
+ }
+ } else {
+ xoops_confirm(array('ok' => 1, 'type_id' => $_REQUEST['type_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_SHOPPING_FORMSUREDEL, $obj->getVar('type_id')));
+ }
+ break;
+}
+include_once 'admin_footer.php';
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/blocks/index.html
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/blocks/index.html (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/blocks/index.html 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemproperties.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemproperties.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemproperties.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,88 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 itemproperties.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include_once XOOPS_ROOT_PATH.'/modules/shopping/include/functions.php';
+function b_shopping_itemproperties_show($options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/shopping/class/shopping_itemproperties.php';
+ $myts =& MyTextSanitizer::getInstance();
+
+ $item = array();
+ $type_block = $options[0];
+ $nb_itemproperties = $options[1];
+ $lenght_title = $options[2];
+
+ $itempropertiesHandler =& xoops_getModuleHandler('shopping_itemproperties', 'shopping');
+ $criteria = new CriteriaCompo();
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+
+ if ($type_block)
+ {
+ $criteria->add(new Criteria('item_id', 0, '!='));
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ }
+
+ $criteria->setLimit($nb_itemproperties);
+ $itemproperties_arr = $itempropertiesHandler->getAll($criteria);
+ foreach (array_keys($itemproperties_arr) as $i)
+ {
+ $item[$i]['item_id'] = $itemproperties_arr[$i]->getVar('item_id');
+ $item[$i]['item_tid'] = $itemproperties_arr[$i]->getVar('item_tid');
+ $item[$i]['item_pid'] = $itemproperties_arr[$i]->getVar('item_pid');
+ $item[$i]['item_value'] = $itemproperties_arr[$i]->getVar('item_value');
+ $item[$i]['item_status'] = $itemproperties_arr[$i]->getVar('item_status');
+ $item[$i]['item_waiting'] = $itemproperties_arr[$i]->getVar('item_waiting');
+ $item[$i]['item_online'] = $itemproperties_arr[$i]->getVar('item_online');
+ }
+ return $item;
+}
+
+function b_shopping_itemproperties_edit($options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/shopping/class/shopping_itemproperties.php';
+
+ $form = _MB_SHOPPING_DISPLAY."\n";
+ $form .= "<input type='hidden' name='options[0]' value='".$options[0]."' />";
+ $form .= "<input name='options[1]' size='5' maxlength='255' value='".$options[1]."' type='text' /> <br />";
+ $form .= _MB_SHOPPING_TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".$options[2]."' type='text' /><br /><br />";
+ $itempropertiesHandler =& xoops_getModuleHandler('shopping_itemproperties', 'shopping');
+ $criteria = new CriteriaCompo();
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ $criteria->add(new Criteria('item_id', 0, '!='));
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ $itemproperties_arr = $itempropertiesHandler->getAll($criteria);
+ $form .= _MB_SHOPPING_CATTODISPLAY."<br /><select name='options[]' multiple='multiple' size='5'>";
+ $form .= "<option value='0' " . (array_search(0, $options) === false ? "" : "selected='selected'") . ">" ._MB_SHOPPING_ALLCAT . "</option>";
+ foreach (array_keys($itemproperties_arr) as $i) {
+ $item_id = $itemproperties_arr[$i]->getVar('item_id');
+ $form .= "<option value='" . $item_id . "' " . (array_search($item_id, $options) === false ? "" : "selected='selected'") . ">".$itemproperties_arr[$i]->getVar('item_title')."</option>";
+ }
+ $form .= "</select>";
+ return $form;
+}
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/blocks/items.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/blocks/items.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/blocks/items.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,89 @@
+<?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.
+*/
+/**
+ * Shopping module for xoops
+ *
+ * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GPL 2.0 or later
+ * @package Shopping
+ * @since 2.5.x
+ * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org>
+ * @version $Id: 1.0 items.php 11337 Tue 2013/04/02 17:54:28Z Timgno $
+ */
+
+include_once XOOPS_ROOT_PATH.'/modules/shopping/include/functions.php';
+function b_shopping_items_show($options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/shopping/class/shopping_items.php';
+ $myts =& MyTextSanitizer::getInstance();
+
+ $item = array();
+ $type_block = $options[0];
+ $nb_items = $options[1];
+ $lenght_title = $options[2];
+
+ $itemsHandler =& xoops_getModuleHandler('shopping_items', 'shopping');
+ $criteria = new CriteriaCompo();
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+
+ if ($type_block)
+ {
+ $criteria->add(new Criteria('item_id', 0, '!='));
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ }
+
+ $criteria->setLimit($nb_items);
+ $items_arr = $itemsHandler->getAll($criteria);
+ foreach (array_keys($items_arr) as $i)
+ {
+ $item[$i]['item_id'] = $items_arr[$i]->getVar('item_id');
+ $item[$i]['item_tid'] = $items_arr[$i]->getVar('item_tid');
+ $item[$i]['item_name'] = $items_arr[$i]->getVar('item_name');
+ $item[$i]['item_price'] = $items_arr[$i]->getVar('item_price');
+ $item[$i]['item_stock'] = $items_arr[$i]->getVar('item_stock');
+ $item[$i]['item_status'] = $items_arr[$i]->getVar('item_status');
+ $item[$i]['item_waiting'] = $items_arr[$i]->getVar('item_waiting');
+ $item[$i]['item_online'] = $items_arr[$i]->getVar('item_online');
+ }
+ return $item;
+}
+
+function b_shopping_items_edit($options)
+{
+ include_once XOOPS_ROOT_PATH.'/modules/shopping/class/shopping_items.php';
+
+ $form = _MB_SHOPPING_DISPLAY."\n";
+ $form .= "<input type='hidden' name='options[0]' value='".$options[0]."' />";
+ $form .= "<input name='options[1]' size='5' maxlength='255' value='".$options[1]."' type='text' /> <br />";
+ $form .= _MB_SHOPPING_TITLELENGTH." : <input name='options[2]' size='5' maxlength='255' value='".$options[2]."' type='text' /><br /><br />";
+ $itemsHandler =& xoops_getModuleHandler('shopping_items', 'shopping');
+ $criteria = new CriteriaCompo();
+ array_shift($options);
+ array_shift($options);
+ array_shift($options);
+ $criteria->add(new Criteria('item_id', 0, '!='));
+ $criteria->setSort('item_id');
+ $criteria->setOrder('ASC');
+ $items_arr = $itemsHandler->getAll($criteria);
+ $form .= _MB_SHOPPING_CATTODISPLAY."<br /><select name='options[]' multiple='multiple' size='5'>";
+ $form .= "<option value='0' " . (array_search(0, $options) === false ? "" : "selected='selected'") . ">" ._MB_SHOPPING_ALLCAT . "</option>";
+ foreach (array_keys($items_arr) as $i) {
+ $item_id = $items_arr[$i]->getVar('item_id');
+ $form .= "<option value='" . $item_id . "' " . (array_search($item_id, $options) === false ? "" : "selected='selected'") . ">".$items_arr[$i]->getVar('item_title')."</option>";
+ }
+ $form .= "</select>";
+ return $form;
+}
+?>
\ No newline at end of file
Added: XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemtype.php
===================================================================
--- XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemtype.php (rev 0)
+++ XoopsModules/txmshopping/releases/1.0/shopping/blocks/itemtype.php 2013-04-02 18:37:21 UTC (rev 11337)
@@ -0,0 +1,86 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this sour...
[truncated message content] |