|
From: <be...@us...> - 2014-06-22 02:42:32
|
Revision: 12629
http://sourceforge.net/p/xoops/svn/12629
Author: beckmi
Date: 2014-06-22 02:42:25 +0000 (Sun, 22 Jun 2014)
Log Message:
-----------
updated to XOOPS 2.5.7 version of jQuery UI Tabs (noo-b/mamba)
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/about.php
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/clone.php
XoopsModules/publisher/trunk/publisher/admin/file.php
XoopsModules/publisher/trunk/publisher/admin/import/news.php
XoopsModules/publisher/trunk/publisher/admin/import/smartsection.php
XoopsModules/publisher/trunk/publisher/admin/import/wfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xfsection.php
XoopsModules/publisher/trunk/publisher/admin/import.php
XoopsModules/publisher/trunk/publisher/admin/index.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/admin/menu.php
XoopsModules/publisher/trunk/publisher/admin/mimetypes.php
XoopsModules/publisher/trunk/publisher/admin/pagewrap.php
XoopsModules/publisher/trunk/publisher/admin/permissions.php
XoopsModules/publisher/trunk/publisher/admin/preferences.php
XoopsModules/publisher/trunk/publisher/admin/pw_delete_file.php
XoopsModules/publisher/trunk/publisher/admin/pw_upload_file.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/author_items.php
XoopsModules/publisher/trunk/publisher/backend.php
XoopsModules/publisher/trunk/publisher/blocks/category_items_sel.php
XoopsModules/publisher/trunk/publisher/blocks/date_to_date.php
XoopsModules/publisher/trunk/publisher/blocks/items_columns.php
XoopsModules/publisher/trunk/publisher/blocks/items_menu.php
XoopsModules/publisher/trunk/publisher/blocks/items_new.php
XoopsModules/publisher/trunk/publisher/blocks/items_random_item.php
XoopsModules/publisher/trunk/publisher/blocks/items_recent.php
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/blocks/latest_files.php
XoopsModules/publisher/trunk/publisher/blocks/latest_news.php
XoopsModules/publisher/trunk/publisher/blocks/search.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/blockform.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/file.php
XoopsModules/publisher/trunk/publisher/class/form/category.php
XoopsModules/publisher/trunk/publisher/class/form/file.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/formdatetime.php
XoopsModules/publisher/trunk/publisher/class/groupperm.php
XoopsModules/publisher/trunk/publisher/class/highlighter.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/metagen.php
XoopsModules/publisher/trunk/publisher/class/mimetype.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/class/publisher.php
XoopsModules/publisher/trunk/publisher/class/rating.php
XoopsModules/publisher/trunk/publisher/class/request.php
XoopsModules/publisher/trunk/publisher/class/session.php
XoopsModules/publisher/trunk/publisher/class/themetabform.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/comment_delete.php
XoopsModules/publisher/trunk/publisher/comment_edit.php
XoopsModules/publisher/trunk/publisher/comment_new.php
XoopsModules/publisher/trunk/publisher/comment_post.php
XoopsModules/publisher/trunk/publisher/comment_reply.php
XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt
XoopsModules/publisher/trunk/publisher/docs/changelog.txt
XoopsModules/publisher/trunk/publisher/docs/install.txt
XoopsModules/publisher/trunk/publisher/file.php
XoopsModules/publisher/trunk/publisher/footer.php
XoopsModules/publisher/trunk/publisher/header.php
XoopsModules/publisher/trunk/publisher/include/ajax_rating.php
XoopsModules/publisher/trunk/publisher/include/ajax_upload.php
XoopsModules/publisher/trunk/publisher/include/comment_functions.php
XoopsModules/publisher/trunk/publisher/include/common.php
XoopsModules/publisher/trunk/publisher/include/constants.php
XoopsModules/publisher/trunk/publisher/include/functions.php
XoopsModules/publisher/trunk/publisher/include/install.php
XoopsModules/publisher/trunk/publisher/include/media.textsanitizer.php
XoopsModules/publisher/trunk/publisher/include/notification.inc.php
XoopsModules/publisher/trunk/publisher/include/plugin.tag.php
XoopsModules/publisher/trunk/publisher/include/search.inc.php
XoopsModules/publisher/trunk/publisher/include/seo.inc.php
XoopsModules/publisher/trunk/publisher/include/seo_functions.php
XoopsModules/publisher/trunk/publisher/include/update.php
XoopsModules/publisher/trunk/publisher/index.php
XoopsModules/publisher/trunk/publisher/item.php
XoopsModules/publisher/trunk/publisher/language/english/admin.php
XoopsModules/publisher/trunk/publisher/language/english/blocks.php
XoopsModules/publisher/trunk/publisher/language/english/common.php
XoopsModules/publisher/trunk/publisher/language/english/main.php
XoopsModules/publisher/trunk/publisher/language/english/modinfo.php
XoopsModules/publisher/trunk/publisher/list.tag.php
XoopsModules/publisher/trunk/publisher/makepdf.php
XoopsModules/publisher/trunk/publisher/notification_update.php
XoopsModules/publisher/trunk/publisher/pop.php
XoopsModules/publisher/trunk/publisher/print.php
XoopsModules/publisher/trunk/publisher/rate.php
XoopsModules/publisher/trunk/publisher/search.php
XoopsModules/publisher/trunk/publisher/sql/mysql.sql
XoopsModules/publisher/trunk/publisher/submit.php
XoopsModules/publisher/trunk/publisher/thumb.php
XoopsModules/publisher/trunk/publisher/view.tag.php
XoopsModules/publisher/trunk/publisher/visit.php
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/admin/import/ams.php
XoopsModules/publisher/trunk/publisher/admin/import/ams0.php
XoopsModules/publisher/trunk/publisher/admin/import/cjaycontent.php
XoopsModules/publisher/trunk/publisher/admin/import/xnews.php
XoopsModules/publisher/trunk/publisher/assets/
XoopsModules/publisher/trunk/publisher/assets/css/
XoopsModules/publisher/trunk/publisher/assets/css/images/
XoopsModules/publisher/trunk/publisher/assets/css/images/index.html
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_flat_75_ffffff_40x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_65_ffffff_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_75_dadada_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_95_fef1ec_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_222222_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_2e83ff_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_454545_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_888888_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_cd0a0a_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/index.html
XoopsModules/publisher/trunk/publisher/assets/css/jquery.popeye.style.css
XoopsModules/publisher/trunk/publisher/assets/css/publisher.css
XoopsModules/publisher/trunk/publisher/assets/images/
XoopsModules/publisher/trunk/publisher/assets/images/VeraBd.ttf
XoopsModules/publisher/trunk/publisher/assets/images/arrow-bg.png
XoopsModules/publisher/trunk/publisher/assets/images/bg.gif
XoopsModules/publisher/trunk/publisher/assets/images/blank.png
XoopsModules/publisher/trunk/publisher/assets/images/bullet.gif
XoopsModules/publisher/trunk/publisher/assets/images/button_delete.png
XoopsModules/publisher/trunk/publisher/assets/images/button_edit.png
XoopsModules/publisher/trunk/publisher/assets/images/dot-grey.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/
XoopsModules/publisher/trunk/publisher/assets/images/gfx/count-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/enlarge-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/enlarge-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/index.html
XoopsModules/publisher/trunk/publisher/assets/images/gfx/loading.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev.gif
XoopsModules/publisher/trunk/publisher/assets/images/grad-bg.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/
XoopsModules/publisher/trunk/publisher/assets/images/icon/approve.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/cat.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/clone.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/close12.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/delete.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/delete.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/doc.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/edit.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/edit.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/file.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/friend.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/index.html
XoopsModules/publisher/trunk/publisher/assets/images/icon/newanswer.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/open12.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/pdf.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/print.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/subcat.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon32/
XoopsModules/publisher/trunk/publisher/assets/images/icon32/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/icon32/folder_txt.png
XoopsModules/publisher/trunk/publisher/assets/images/icon32/index.html
XoopsModules/publisher/trunk/publisher/assets/images/important-32.png
XoopsModules/publisher/trunk/publisher/assets/images/index.html
XoopsModules/publisher/trunk/publisher/assets/images/item_icon.gif
XoopsModules/publisher/trunk/publisher/assets/images/left_both.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/
XoopsModules/publisher/trunk/publisher/assets/images/links/approve.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/cat.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/clone.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/close12.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/delete.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/delete.png
XoopsModules/publisher/trunk/publisher/assets/images/links/doc.png
XoopsModules/publisher/trunk/publisher/assets/images/links/edit.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/edit.png
XoopsModules/publisher/trunk/publisher/assets/images/links/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/links/file.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/friend.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/index.html
XoopsModules/publisher/trunk/publisher/assets/images/links/newanswer.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/next.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/open12.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/pdf.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/previous.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/print.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/subcat.gif
XoopsModules/publisher/trunk/publisher/assets/images/loadingbar.gif
XoopsModules/publisher/trunk/publisher/assets/images/module_logo.png
XoopsModules/publisher/trunk/publisher/assets/images/no.gif
XoopsModules/publisher/trunk/publisher/assets/images/off.png
XoopsModules/publisher/trunk/publisher/assets/images/on.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/
XoopsModules/publisher/trunk/publisher/assets/images/popeye/bg1.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/compact3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/enlarge3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/index.html
XoopsModules/publisher/trunk/publisher/assets/images/popeye/loading3.gif
XoopsModules/publisher/trunk/publisher/assets/images/popeye/next3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/prev3.png
XoopsModules/publisher/trunk/publisher/assets/images/right_both.gif
XoopsModules/publisher/trunk/publisher/assets/images/rss.gif
XoopsModules/publisher/trunk/publisher/assets/images/span-bg.gif
XoopsModules/publisher/trunk/publisher/assets/images/starrating.gif
XoopsModules/publisher/trunk/publisher/assets/images/transparent_bg.png
XoopsModules/publisher/trunk/publisher/assets/images/working.gif
XoopsModules/publisher/trunk/publisher/assets/index.html
XoopsModules/publisher/trunk/publisher/assets/js/
XoopsModules/publisher/trunk/publisher/assets/js/ajaxupload.3.9.js
XoopsModules/publisher/trunk/publisher/assets/js/behavior.js
XoopsModules/publisher/trunk/publisher/assets/js/cookies.js
XoopsModules/publisher/trunk/publisher/assets/js/funcs.js
XoopsModules/publisher/trunk/publisher/assets/js/index.html
XoopsModules/publisher/trunk/publisher/assets/js/jquery.easing.js
XoopsModules/publisher/trunk/publisher/assets/js/jquery.popeye-2.0.4.js
XoopsModules/publisher/trunk/publisher/assets/js/publisher.js
XoopsModules/publisher/trunk/publisher/assets/js/rating.js
XoopsModules/publisher/trunk/publisher/assets/js/script.easing.js
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_date_to_date.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_columns.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_menu.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_new.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_random_item.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_files.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_news.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_archive.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_author_items.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_categories_table.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_list.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_wfsection.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_footer.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_header.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_item.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_print.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_rss.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_search.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem_block.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.tpl
XoopsModules/publisher/trunk/publisher/tests/
XoopsModules/publisher/trunk/publisher/tests/index.html
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/css/
XoopsModules/publisher/trunk/publisher/images/
XoopsModules/publisher/trunk/publisher/js/
XoopsModules/publisher/trunk/publisher/tcpdf/
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_date_to_date.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_columns.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_menu.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_new.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_random_item.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_files.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_news.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.html
XoopsModules/publisher/trunk/publisher/templates/publisher_archive.html
XoopsModules/publisher/trunk/publisher/templates/publisher_author_items.html
XoopsModules/publisher/trunk/publisher/templates/publisher_categories_table.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_list.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_wfsection.html
XoopsModules/publisher/trunk/publisher/templates/publisher_footer.html
XoopsModules/publisher/trunk/publisher/templates/publisher_header.html
XoopsModules/publisher/trunk/publisher/templates/publisher_item.html
XoopsModules/publisher/trunk/publisher/templates/publisher_print.html
XoopsModules/publisher/trunk/publisher/templates/publisher_rss.html
XoopsModules/publisher/trunk/publisher/templates/publisher_search.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.html
Modified: XoopsModules/publisher/trunk/publisher/admin/about.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/about.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/about.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,32 +1,32 @@
-<?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.
-*/
-
-/**
- * Publisher
- *
- * @copyright The XOOPS Project (http://www.xoops.org)
- * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
- * @package Publisher
- * @since 1.0
- * @author Mage, Mamba
- * @version $Id$
- */
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
-
-xoops_cp_footer();
\ No newline at end of file
+<?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.
+*/
+
+/**
+ * Publisher
+ *
+ * @copyright The XOOPS Project (http://www.xoops.org)
+ * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
+ * @package Publisher
+ * @since 1.0
+ * @author Mage, Mamba
+ * @version $Id$
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
+
+xoops_cp_footer();
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,46 +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.
- */
-
-/**
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Publisher
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author The SmartFactory <www.smartfactory.ca>
- * @version $Id$
- */
-
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-
-//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
-xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
-
-$imagearray = array(
- 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
- 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
- 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
- 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
-);
-if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
-}else{
- echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
-}
-/*
-$myts = MyTextSanitizer::getInstance();
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
-} */
\ No newline at end of file
+<?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.
+ */
+
+/**
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Publisher
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @author The SmartFactory <www.smartfactory.ca>
+ * @version $Id$
+ */
+
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+
+//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
+xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
+
+$imagearray = array(
+ 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
+ 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
+ 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
+ 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
+);
+if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
+ include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
+} else {
+ echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
+}
+/*
+$myts = MyTextSanitizer::getInstance();
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+} */
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,410 +1,410 @@
-<?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.
- */
-
-/**
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Publisher
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author The SmartFactory <www.smartfactory.ca>
- * @version $Id$
- */
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-$op = PublisherRequest::getString('op');
-
-$op = isset($_POST['editor']) ? 'mod' : $op;
-if (isset($_POST['addcategory'])) {
- $op = 'addcategory';
-}
-
-// Where do we start ?
-$startcategory = PublisherRequest::getInt('startcategory');
-$categoryid = PublisherRequest::getInt('categoryid');
-
-switch ($op) {
-
- case "del":
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
- $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
- $name = (isset($_POST['name'])) ? $_POST['name'] : '';
- if ($confirm) {
- if (!$publisher->getHandler('category')->delete($categoryObj)) {
- redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
- exit();
- }
- redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
- exit();
- } else {
- xoops_cp_header();
- xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
- xoops_cp_footer();
- }
- break;
-
- case "mod":
- //Added by fx2024
- $nb_subcats = isset($_POST['nb_subcats']) ? intval($_POST['nb_subcats']) : 0;
- $nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
- //end of fx2024 code
-
- publisher_cpHeader();
- publisher_editCat(true, $categoryid, $nb_subcats);
- break;
-
- case "addcategory":
- global $modify;
-
- $parentid = PublisherRequest::getInt('parentid');
-
- if ($categoryid != 0) {
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
- } else {
- $categoryObj = $publisher->getHandler('category')->create();
- }
-
- // Uploading the image, if any
- // Retreive the filename to be uploaded
- if (isset($_FILES['image_file']['name']) && $_FILES['image_file']['name'] != "") {
- $filename = $_POST["xoops_upload_file"][0];
- if (!empty($filename) || $filename != "") {
- // TODO : implement publisher mimetype management
- $max_size = $publisher->getConfig('maximum_filesize');
- $max_imgwidth = $publisher->getConfig('maximum_image_width');
- $max_imgheight = $publisher->getConfig('maximum_image_height');
- $allowed_mimetypes = publisher_getAllowedImagesTypes();
-
- if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) {
- redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
- exit();
- }
-
- xoops_load('XoopsMediaUploader');
- $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
- if ($uploader->fetchMedia($filename) && $uploader->upload()) {
- $categoryObj->setVar('image', $uploader->getSavedFileName());
- } else {
- redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
- exit();
- }
- }
- } else {
- if (isset($_POST['image'])) {
- $categoryObj->setVar('image', $_POST['image']);
- }
- }
- $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0);
-
- $applyall = isset($_POST['applyall']) ? intval($_POST['applyall']) : 0;
- $categoryObj->setVar('weight', isset($_POST['weight']) ? intval($_POST['weight']) : 1);
-
- // Groups and permissions
- $grpread = isset($_POST['groups_read']) ? $_POST['groups_read'] : array();
- $grpsubmit = isset($_POST['groups_submit']) ? $_POST['groups_submit'] : array();
- $grpmoderation = isset($_POST['groups_moderation']) ? $_POST['groups_moderation'] : array();
-
-
- $categoryObj->setVar('name', $_POST['name']);
-
- //Added by skalpa: custom template support
- if (isset($_POST['template'])) {
- $categoryObj->setVar('template', $_POST['template']);
- }
-
- if (isset($_POST['meta_description'])) {
- $categoryObj->setVar('meta_description', $_POST['meta_description']);
- }
- if (isset($_POST['meta_keywords'])) {
- $categoryObj->setVar('meta_keywords', $_POST['meta_keywords']);
- }
- if (isset($_POST['short_url'])) {
- $categoryObj->setVar('short_url', $_POST['short_url']);
- }
- $categoryObj->setVar('moderator', intval($_POST['moderator']));
- $categoryObj->setVar('description', $_POST['description']);
-
- if (isset($_POST['header'])) {
- $categoryObj->setVar('header', $_POST['header']);
- }
-
- if ($categoryObj->isNew()) {
- $redirect_msg = _AM_PUBLISHER_CATCREATED;
- $redirect_to = 'category.php?op=mod';
- } else {
- $redirect_msg = _AM_PUBLISHER_COLMODIFIED;
- $redirect_to = 'category.php';
- }
-
- if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
- }
- // TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
-
-
- //Added by fx2024
- $parentCat = $categoryObj->categoryid();
- $sizeof = sizeof($_POST['scname']);
- for ($i = 0; $i < $sizeof; $i++) {
- if ($_POST['scname'][$i] != '') {
- $categoryObj = $publisher->getHandler('category')->create();
- $categoryObj->setVar('name', $_POST['scname'][$i]);
- $categoryObj->setVar('parentid', $parentCat);
-
- if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
- }
- // TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
- }
- }
- //end of fx2024 code
- redirect_header($redirect_to, 2, $redirect_msg);
- exit();
- break;
-
- //Added by fx2024
-
- case "addsubcats":
- $categoryid = 0;
- $nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet'];
-
- $categoryObj = $publisher->getHandler('category')->create();
- $categoryObj->setVar('name', $_POST['name']);
- $categoryObj->setVar('description', $_POST['description']);
- $categoryObj->setVar('weight', $_POST['weight']);
- if (isset($parentCat)) {
- $categoryObj->setVar('parentid', $parentCat);
- }
-
- publisher_cpHeader();
- publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj);
- exit();
-
- break;
- //end of fx2024 code
-
- case "cancel":
- redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
- exit();
-
- case "default":
- default:
- publisher_cpHeader();
- //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES);
-
- echo "<br />\n";
- echo "<form><div style=\"margin-bottom: 12px;\">";
- echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_PUBLISHER_CATEGORY_CREATE . "'> ";
- //echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> ";
- echo "</div></form>";
-
- // Creating the objects for top categories
- $categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
-
- publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
-
- echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
- echo "<tr>";
- echo "<th class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . "</strong></td>";
- echo "<th width='60' class='bg3' width='65' align='center'><strong>" . _CO_PUBLISHER_WEIGHT . "</strong></td>";
- echo "<th width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
- echo "</tr>";
- $totalCategories = $publisher->getHandler('category')->getCategoriesCount(0);
- if (count($categoriesObj) > 0) {
- foreach ($categoriesObj as $key => $thiscat) {
- publisher_displayCategory($thiscat);
- }
- } else {
- echo "<tr>";
- echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOCAT . "</td>";
- echo "</tr>";
- $categoryid = '0';
- }
- echo "</table>\n";
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
- $pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory');
- echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
- echo "<br />";
- publisher_closeCollapsableBar('createdcategories', 'createdcategoriesicon');
- echo "<br>";
- //editcat(false);
- break;
-}
-
-xoops_cp_footer();
-
-function publisher_displayCategory($categoryObj, $level = 0)
-{
- $publisher = PublisherPublisher::getInstance();
-
- $description = $categoryObj->description();
- if (!XOOPS_USE_MULTIBYTES) {
- if (strlen($description) >= 100) {
- $description = substr($description, 0, (100 - 1)) . "...";
- }
- }
- $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "&parentid=" . $categoryObj->parentid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>";
-
- $spaces = '';
- for ($j = 0; $j < $level; $j++) {
- $spaces .= ' ';
- }
-
- echo "<tr>";
- echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>";
- echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>";
- echo "<td class='even' align='center'> $modify $delete </td>";
- echo "</tr>";
- $subCategoriesObj = $publisher->getHandler('category')->getCategories(0, 0, $categoryObj->categoryid());
- if (count($subCategoriesObj) > 0) {
- $level++;
- foreach ($subCategoriesObj as $key => $thiscat) {
- publisher_displayCategory($thiscat, $level);
- }
- }
- unset($categoryObj);
-}
-
-function publisher_editCat($showmenu = false, $categoryid = 0, $nb_subcats = 4, $categoryObj = null)
-{
- $publisher = PublisherPublisher::getInstance();
-
- // if there is a parameter, and the id exists, retrieve data: we're editing a category
- if ($categoryid != 0) {
- // Creating the category object for the selected category
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
- if ($categoryObj->notLoaded()) {
- redirect_header("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT);
- exit();
- }
- } else {
- if (!$categoryObj) {
- $categoryObj = $publisher->getHandler('category')->create();
- }
- }
-
- if ($categoryid != 0) {
- if ($showmenu) {
- //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_EDITING);
- }
- echo "<br />\n";
- publisher_openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO);
- } else {
- if ($showmenu) {
- //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_CREATINGNEW);
- }
- publisher_openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO);
- }
-
- $sform = $categoryObj->getForm($nb_subcats);
- $sform->display();
-
- if (!$categoryid) {
- publisher_closeCollapsableBar('createtable', 'createtableicon');
- } else {
- publisher_closeCollapsableBar('edittable', 'edittableicon');
- }
-
- //Added by fx2024
- if ($categoryid) {
- $sel_cat = $categoryid;
-
- publisher_openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC);
- // Get the total number of sub-categories
- $categoriesObj = $publisher->getHandler('category')->get($sel_cat);
- $totalsubs = $publisher->getHandler('category')->getCategoriesCount($sel_cat);
- // creating the categories objects that are published
- $subcatsObj = $publisher->getHandler('category')->getCategories(0, 0, $categoriesObj->categoryid());
- $totalSCOnPage = count($subcatsObj);
- echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
- echo "<tr>";
- echo "<td width='60' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATID . "</strong></td>";
- echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATCOLNAME . "</strong></td>";
- echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_SUBDESCRIPT . "</strong></td>";
- echo "<td width='60' class='bg3' align='right'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
- echo "</tr>";
- if ($totalsubs > 0) {
- foreach ($subcatsObj as $subcat) {
- $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>";
- echo "<tr>";
- echo "<td class='head' align='left'>" . $subcat->categoryid() . "</td>";
- echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->categoryid() . "&parentid=" . $subcat->parentid() . "'>" . $subcat->name() . "</a></td>";
- echo "<td class='even' align='left'>" . $subcat->description() . "</td>";
- echo "<td class='even' align='right'> {$modify} {$delete} </td>";
- echo "</tr>";
- }
- } else {
- echo "<tr>";
- echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOSUBCAT . "</td>";
- echo "</tr>";
- }
- echo "</table>\n";
- echo "<br />\n";
- publisher_closeCollapsableBar('subcatstable', 'subcatsicon');
-
- publisher_openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC);
- $startitem = PublisherRequest::getInt('startitem');
- // Get the total number of published ITEMS
- $totalitems = $publisher->getHandler('item')->getItemsCount($sel_cat, array(_PUBLISHER_STATUS_PUBLISHED));
- // creating the items objects that are published
- $itemsObj = $publisher->getHandler('item')->getAllPublished($publisher->getConfig('idxcat_perpage'), $startitem, $sel_cat);
- $totalitemsOnPage = count($itemsObj);
- $allcats = $publisher->getHandler('category')->getObjects(null, true);
- echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
- echo "<tr>";
- echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . "</strong></td>";
- echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCOLNAME . "</strong></td>";
- echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMDESC . "</strong></td>";
- echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . "</strong></td>";
- echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
- echo "</tr>";
- if ($totalitems > 0) {
- for ($i = 0; $i < $totalitemsOnPage; $i++) {
- $categoryObj = $allcats[$itemsObj[$i]->categoryid()];
- $modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>";
- $delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>";
- echo "<tr>";
- echo "<td class='head' align='center'>" . $itemsObj[$i]->itemid() . "</td>";
- echo "<td class='even' align='left'>" . $categoryObj->name() . "</td>";
- echo "<td class='even' align='left'>" . $itemsObj[$i]->getitemLink() . "</td>";
- echo "<td class='even' align='center'>" . $itemsObj[$i]->datesub('s') . "</td>";
- echo "<td class='even' align='center'> $modify $delete </td>";
- echo "</tr>";
- }
- } else {
- $itemid = -1;
- echo "<tr>";
- echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS . "</td>";
- echo "</tr>";
- }
- echo "</table>\n";
- echo "<br />\n";
- $parentid = PublisherRequest::getInt('parentid');
- $pagenav_extra_args = "op=mod&categoryid=$sel_cat&parentid=$parentid";
- xoops_load('XoopsPageNav');
- $pagenav = new XoopsPageNav($totalitems, $publisher->getConfig('idxcat_perpage'), $startitem, 'startitem', $pagenav_extra_args);
- echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
- echo "<input type='button' name='button' onclick=\"location='item.php?op=mod&categoryid=" . $sel_cat . "'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> ";
- echo "</div>";
- }
- //end of fx2024 code
-}
\ No newline at end of file
+<?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.
+ */
+
+/**
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Publisher
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @author The SmartFactory <www.smartfactory.ca>
+ * @version $Id$
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+$op = PublisherRequest::getString('op');
+
+$op = isset($_POST['editor']) ? 'mod' : $op;
+if (isset($_POST['addcategory'])) {
+ $op = 'addcategory';
+}
+
+// Where do we start ?
+$startcategory = PublisherRequest::getInt('startcategory');
+$categoryid = PublisherRequest::getInt('categoryid');
+
+switch ($op) {
+
+ case "del":
+ $categoryObj = $publisher->getHandler('category')->get($categoryid);
+ $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
+ $name = (isset($_POST['name'])) ? $_POST['name'] : '';
+ if ($confirm) {
+ if (!$publisher->getHandler('category')->delete($categoryObj)) {
+ redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
+ exit();
+ }
+ redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
+ exit();
+ } else {
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
+ xoops_cp_footer();
+ }
+ break;
+
+ case "mod":
+ //Added by fx2024
+ $nb_subcats = isset($_POST['nb_subcats']) ? intval($_POST['nb_subcats']) : 0;
+ $nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
+ //end of fx2024 code
+
+ publisher_cpHeader();
+ publisher_editCat(true, $categoryid, $nb_subcats);
+ break;
+
+ case "addcategory":
+ global $modify;
+
+ $parentid = PublisherRequest::getInt('parentid');
+
+ if ($categoryid != 0) {
+ $categoryObj = $publisher->getHandler('category')->get($categoryid);
+ } else {
+ $categoryObj = $publisher->getHandler('category')->create();
+ }
+
+ // Uploading the image, if any
+ // Retreive the filename to be uploaded
+ if (isset($_FILES['image_file']['name']) && $_FILES['image_file']['name'] != "") {
+ $filename = $_POST["xoops_upload_file"][0];
+ if (!empty($filename) || $filename != "") {
+ // TODO : implement publisher mimetype management
+ $max_size = $publisher->getConfig('maximum_filesize');
+ $max_imgwidth = $publisher->getConfig('maximum_image_width');
+ $max_imgheight = $publisher->getConfig('maximum_image_height');
+ $allowed_mimetypes = publisher_getAllowedImagesTypes();
+
+ if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) {
+ redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
+ exit();
+ }
+
+ xoops_load('XoopsMediaUploader');
+ $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
+ if ($uploader->fetchMedia($filename) && $uploader->upload()) {
+ $categoryObj->setVar('image', $uploader->getSavedFileName());
+ } else {
+ redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
+ exit();
+ }
+ }
+ } else {
+ if (isset($_POST['image'])) {
+ $categoryObj->setVar('image', $_POST['image']);
+ }
+ }
+ $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0);
+
+ $applyall = isset($_POST['applyall']) ? intval($_POST['applyall']) : 0;
+ $categoryObj->setVar('weight', isset($_POST['weight']) ? intval($_POST['weight']) : 1);
+
+ // Groups and permissions
+ $grpread = isset($_POST['groups_read']) ? $_POST['groups_read'] : array();
+ $grpsubmit = isset($_POST['groups_submit']) ? $_POST['groups_submit'] : array();
+ $grpmoderation = isset($_POST['groups_moderation']) ? $_POST['groups_moderation'] : array();
+
+ $categoryObj->setVar('name', $_POST['name']);
+
+ //Added by skalpa: custom template support
+ if (isset($_POST['template'])) {
+ $categoryObj->setVar('template', $_POST['template']);
+ }
+
+ if (isset($_POST['meta_description'])) {
+ $categoryObj->setVar('meta_description', $_POST['meta_description']);
+ }
+ if (isset($_POST['meta_keywords'])) {
+ $categoryObj->setVar('meta_keywords', $_POST['meta_keywords']);
+ }
+ if (isset($_POST['short_url'])) {
+ $categoryObj->setVar('short_url', $_POST['short_url']);
+ }
+ $categoryObj->setVar('moderator', intval($_POST['moderator']));
+ $categoryObj->setVar('description', $_POST['description']);
+
+ if (isset($_POST['header'])) {
+ $categoryObj->setVar('header', $_POST['header']);
+ }
+
+ if ($categoryObj->isNew()) {
+ $redirect_msg = _AM_PUBLISHER_CATCREATED;
+ $redirect_to = 'category.php?op=mod';
+ } else {
+ $redirect_msg = _AM_PUBLISHER_COLMODIFIED;
+ $redirect_to = 'category.php';
+ }
+
+ if (!$categoryObj->store()) {
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
+ exit;
+ }
+ // TODO : put this function in the category class
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+
+ //Added by fx2024
+ $parentCat = $categoryObj->categoryid();
+ $sizeof = sizeof($_POST['scname']);
+ for ($i = 0; $i < $sizeof; ++$i) {
+ if ($_POST['scname'][$i] != '') {
+ $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj->setVar('name', $_POST['scname'][$i]);
+ $categoryObj->setVar('parentid', $parentCat);
+
+ if (!$categoryObj->store()) {
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
+ exit;
+ }
+ // TODO : put this function in the category class
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+ }
+ }
+ //end of fx2024 code
+ redirect_header($redirect_to, 2, $redirect_msg);
+ exit();
+ break;
+
+ //Added by fx2024
+
+ case "addsubcats":
+ $categoryid = 0;
+ $nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet'];
+
+ $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj->setVar('name', $_POST['name']);
+ $categoryObj->setVar('description', $_POST['description']);
+ $categoryObj->setVar('weight', $_POST['weight']);
+ if (isset($parentCat)) {
+ $categoryObj->setVar('parentid', $parentCat);
+ }
+
+ publisher_cpHeader();
+ publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj);
+ exit();
+
+ break;
+ //end of fx2024 code
+
+ case "cancel":
+ redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
+ exit();
+
+ case "default":
+ default:
+ publisher_cpHeader();
+ //publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES);
+
+ echo "<br />\n";
+ echo "<form><div style=\"margin-bottom: 12px;\">";
+ echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_PUBLISHER_CATEGORY_CREATE . "'> ";
+ //echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> ";
+ echo "</div></form>";
+
+ // Creating the objects for top categories
+ $categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
+
+ publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
+
+ echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
+ echo "<tr>";
+ echo "<th width='20' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMCATEGORY_ID . "</strong></td>";
+ echo "<th class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . "</strong></td>";
+ echo "<th width='60' class='bg3' width='65' align='center'><strong>" . _CO_PUBLISHER_WEIGHT . "</strong></td>";
+ echo "<th width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
+ echo "</tr>";
+ $totalCategories = $publisher->getHandler('category')->getCategoriesCount(0);
+ if (count($categoriesObj) > 0) {
+ foreach ($categoriesObj as $key => $thiscat) {
+ publisher_displayCategory($thiscat);
+ }
+ } else {
+ echo "<tr>";
+ echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOCAT . "</td>";
+ echo "</tr>";
+ $categoryid = '0';
+ }
+ echo "</table>\n";
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory');
+ echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
+ echo "<br />";
+ publisher_closeCollapsableBar('createdcategories', 'createdcategoriesicon');
+ echo "<br>";
+ //editcat(false);
+ break;
+}
+
+xoops_cp_footer();
+
+function publisher_displayCategory($categoryObj, $level = 0)
+{
+ $publisher = PublisherPublisher::getInstance();
+
+ $description = $categoryObj->description();
+ if (!XOOPS_USE_MULTIBYTES) {
+ if (strlen($description) >= 100) {
+ $description = substr($description, 0, (100 - 1)) . "...";
+ }
+ }
+ $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "&parentid=" . $categoryObj->parentid() . "'><img src='" . PUBLISHER_URL . "/assets/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
+ $delete = "<a href='category.php?op=del&categoryid=" . $categ...
[truncated message content] |