From: <luc...@us...> - 2013-05-21 21:00:23
|
Revision: 11570 http://sourceforge.net/p/xoops/svn/11570 Author: luciorota Date: 2013-05-21 21:00:18 +0000 (Tue, 21 May 2013) Log Message: ----------- - added: sort subcategories by cid or title or weight - fixed: update procedure now updates also permissions - fixed: language definition in modinfo.php - fixed: deprecated "XoopsTree" Modified Paths: -------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/about.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_footer.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header2.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/brokendown.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/category.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/cookies.js XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/download.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/funcs.js XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ip_log.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/menu.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mimetypes.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/mirror.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/modifications.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/newdownloads.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/newstory.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/permissions.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/review.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/update.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/votedata.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/blocks/wfdownloads_top.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/blocks/wfdownloads_top_by_cat.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/category.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/dbupdater.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/download.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/img_uploader.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/ip_log.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/mimetype.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/mirror.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/modification.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/object.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/rating.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/report.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/review.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/uploader.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/class/wfd_lists.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/comment_delete.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/comment_edit.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/comment_new.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/comment_post.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/comment_reply.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/changelog.txt XoopsModules/wfdownloads/branches/luciorota/wfdownloads/docs/english/__about.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/footer.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/header.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/comment_functions.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/functions.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/notification.inc.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/search.inc.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/update.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/index.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/admin.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/help/help.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/modinfo.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/mirror.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/module.css XoopsModules/wfdownloads/branches/luciorota/wfdownloads/newlist.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/notification_update.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/ratefile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/review.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/rss.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/singlefile.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/sql/wfdownloads.sql XoopsModules/wfdownloads/branches/luciorota/wfdownloads/submit.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_admin_menu.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_brokenfile.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_disclaimer.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_download.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_footer.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_header.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_index.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_mirrors.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_newlistindex.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_ratefile.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_reviews.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_singlefile.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_topten.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.html XoopsModules/wfdownloads/branches/luciorota/wfdownloads/thickbox.css XoopsModules/wfdownloads/branches/luciorota/wfdownloads/topten.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/visit.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/xoops_version.php Added Paths: ----------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/imageupload.php Removed Paths: ------------- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/main.php XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/upload.php Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/about.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/about.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/about.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,23 +1,23 @@ <?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. + 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 XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package - * @since - * @author XOOPS Development Team - * @version $Id $ + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - include_once dirname(__FILE__) . '/admin_header.php'; xoops_cp_header(); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_footer.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_footer.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_footer.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,23 +1,23 @@ <?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. + 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 XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package - * @since - * @author XOOPS Development Team - * @version $Id $ + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - echo "<div class='adminfooter'>\n" ." <div style='text-align: center;'>\n" ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,23 +1,23 @@ <?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. + 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 XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package - * @since - * @author XOOPS Development Team - * @version $Id $ + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - $path = dirname(dirname(dirname(dirname(__FILE__)))); include_once $path . '/mainfile.php'; include_once $path . '/include/cp_functions.php'; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header2.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header2.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/admin_header2.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,13 +1,23 @@ <?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. + */ /** - * $Id: admin_header.php,v 1.5 2007/08/10 20:59:33 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - include '../../../include/cp_header.php'; include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/functions.php'); include_once(XOOPS_ROOT_PATH . '/modules/wfdownloads/include/common.php'); Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/brokendown.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/brokendown.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/brokendown.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,13 +1,23 @@ <?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. + */ /** - * $Id: brokendown.php,v 1.7 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - include 'admin_header.php'; $op = ''; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/category.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/category.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/category.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,11 +1,22 @@ <?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. + */ /** - * $Id: category.php,v 1.11 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ include 'admin_header.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/cookies.js =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/cookies.js 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/cookies.js 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,4 +1,24 @@ +/* + 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. + */ /** + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ + */ + +/** * Read the JavaScript cookies tutorial at: * http://www.netspade.com/articles/javascript/cookies.xml */ Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/download.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/download.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/download.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,48 +1,59 @@ <?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. + */ /** - * $Id: main.php,v 1.23 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - include 'admin_header.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; -include_once WFDOWNLOADS_ROOT_PATH . 'class/wfd_lists.php'; +include_once WFDOWNLOADS_ROOT_PATH.'class/wfd_lists.php'; include_once XOOPS_ROOT_PATH . '/class/tree.php'; include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; -//$mytree = new XoopsTree($xoopsDB -> prefix('wfdownloads_cat'), "cid", "pid"); - function Download() { - $lid = isset($_REQUEST['lid']) ? intval($_REQUEST['lid']) : 0; + $download_handler = xoops_getmodulehandler('download'); + $category_handler = xoops_getmodulehandler('category'); - $category_handler = xoops_getmodulehandler('category'); + $lid = wfdownloads_CleanVars($_REQUEST, 'lid', 0, 'int'); + $numrows = $category_handler->getCount(); if ($numrows) { wfdownloads_xoops_cp_header(); $indexAdmin = new ModuleAdmin(); - echo $indexAdmin->addNavigation('main.php'); + echo $indexAdmin->addNavigation('download.php'); - //wfdownloads_adminMenu(3, _AM_WFD_MDOWNLOADS); + $adminMenu = new ModuleAdmin(); + $adminMenu->addItemButton(_MI_WFD_BINDEX, 'download.php?op=list', 'list'); + $adminMenu->addItemButton(_AM_WFD_FFS_DOWNLOADTITLE, 'download.php?op=Download', 'add'); + echo $adminMenu->renderButton(); - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_FILE_ALLOWEDAMIME . "</legend>\n - <div style='padding: 8px;'>\n"; - + // allowed mimetypes list + echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_FILE_ALLOWEDAMIME . "</legend>\n"; + echo "<div style='padding: 8px;'>\n"; $mime_handler = xoops_getmodulehandler('mimetype'); $criteria = new Criteria("mime_admin", 1); $mimetypes = $mime_handler->getList($criteria); $allowmimetypes = implode(' | ', $mimetypes); echo $allowmimetypes; - echo "</div>\n - </fieldset><br />\n - "; + echo "</div>\n"; + echo "</fieldset><br />\n"; - $download_handler = xoops_getmodulehandler('download'); if ($lid) { $download = $download_handler->get($lid); $title = _AM_WFD_FILE_MODIFYFILE; @@ -80,7 +91,7 @@ $customArray['fid'] = $fid; $customArray['formulize_mgr'] =& xoops_getmodulehandler('elements', 'formulize'); - $customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); + $customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS); $customArray['prevEntry'] = getEntryValues($download->getVar('formulize_idreq'), $customArray['formulize_mgr'], $customArray['groups'], $fid); $customArray['entry'] = $download->getVar('formulize_idreq'); $customArray['go_back'] = ""; @@ -92,7 +103,7 @@ $customArray['owner_groups'] = $owner_groups; } - $sform = $download->getAdminForm($title, $customArray); + $sform = $download->getAdminForm($title, $customArray); } elseif(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) { $sform = $download->getCategoryForm(); } else { @@ -101,7 +112,7 @@ $sform->display(); // changed - end - March 4 2006 - jpc } else { - redirect_header(WFDOWNLOADS_URL . 'admin/category.php?', 1, _AM_WFD_CCATEGORY_NOEXISTS); + redirect_header(WFDOWNLOADS_URL.'admin/category.php?', 1, _AM_WFD_CCATEGORY_NOEXISTS); exit(); } @@ -124,10 +135,8 @@ $anon_criteria->setSort("ratingtimestamp"); $anon_criteria->setOrder("DESC"); - echo " - <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_VOTE_RATINGINFOMATION . "</legend>\n - <div style='padding: 8px;'><b>" . _AM_WFD_VOTE_TOTALVOTES . "</b>" . $totalvotes . "<br /><br />\n - "; + echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_VOTE_RATINGINFOMATION . "</legend>\n"; + echo "<div style='padding: 8px;'><b>" . _AM_WFD_VOTE_TOTALVOTES . "</b>" . $totalvotes . "<br /><br />\n"; printf(_AM_WFD_VOTE_REGUSERVOTES, $votesreg); @@ -136,18 +145,18 @@ printf(_AM_WFD_VOTE_ANONUSERVOTES, $votesanon); echo " - </div>\n - <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n - <tr>\n - <th align='center'>" . _AM_WFD_VOTE_USER . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_IP . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_RATING . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_USERAVG . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_TOTALRATE . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_DATE . "</td>\n - <th align='center'>" . _AM_WFD_MINDEX_ACTION . "</td>\n - </tr>\n - "; + </div>\n + <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n + <tr>\n + <th align='center'>" . _AM_WFD_VOTE_USER . "</td>\n + <th align='center'>" . _AM_WFD_VOTE_IP . "</td>\n + <th align='center'>" . _AM_WFD_VOTE_RATING . "</td>\n + <th align='center'>" . _AM_WFD_VOTE_USERAVG . "</td>\n + <th align='center'>" . _AM_WFD_VOTE_TOTALRATE . "</td>\n + <th align='center'>" . _AM_WFD_VOTE_DATE . "</td>\n + <th align='center'>" . _AM_WFD_MINDEX_ACTION . "</td>\n + </tr>\n + "; if ($votesreg == 0) { echo "<tr><td align='center' colspan='7' class='even'><b>" . _AM_WFD_VOTE_NOREGVOTES . "</b></td></tr>"; @@ -156,7 +165,7 @@ $uids[] = $regvotes[$i]->getVar('ratinguser'); } - $criteria = new Criteria("ratinguser", "(" . implode(',', $uids) . ")", "IN"); + $criteria = new Criteria("ratinguser", "(".implode(',', $uids).")", "IN"); $criteria->setGroupby("ratinguser"); $userratings = $rating_handler->getUserAverage($criteria); @@ -175,7 +184,7 @@ <td align='center' class='even'>$uservotes</th>\n <td align='center' class='even'>$formatted_date</th>\n <td align='center' class='even'>\n - <a href='" . WFDOWNLOADS_URL . "admin/main.php?op=delVote&lid=" . $lid . "&rid=" . $regvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n + <a href='" . WFDOWNLOADS_URL . "admin/download.php?op=delVote&lid=" . $lid . "&rid=" . $regvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n </th></tr>\n "; } @@ -216,7 +225,7 @@ <td align='center' class='even'>$uservotes</th>\n <td align='center' class='even'>$formatted_date</th>\n <td align='center' class='even'>\n - <a href='" . WFDOWNLOADS_URL . "admin/main.php?op=delVote&lid=" . $lid . "&rid=" . $anonvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n + <a href='" . WFDOWNLOADS_URL . "admin/download.php?op=delVote&lid=" . $lid . "&rid=" . $anonvotes[$i]->getVar('ratingid') . "'>" . $imagearray['deleteimg'] . "</a>\n </th></tr>\n "; } @@ -237,7 +246,7 @@ if ($rating_handler->delete($rating, true)) { wfd_updaterating(intval($rating->getVar('lid'))); } - redirect_header(WFDOWNLOADS_URL . 'admin/main.php', 1, _AM_WFD_VOTE_VOTEDELETED); + redirect_header(WFDOWNLOADS_URL . 'admin/download.php', 1, _AM_WFD_VOTE_VOTEDELETED); } function addDownload() @@ -251,9 +260,11 @@ $download_handler = xoops_getmodulehandler('download'); if ($lid > 0) { $thisIsANewRecord = false; /* Added by Lankford on 2007/3/21 */ + $download = $download_handler->get($lid); } else { $thisIsANewRecord = true; /* Added by Lankford on 2007/3/21 */ + $download = $download_handler->create(); } @@ -276,7 +287,8 @@ $download->setVar('filetype', $filetype); } else { global $_FILES; - $down = wfd_uploading($_FILES, $xoopsModuleConfig['uploaddir'], "", "download.php?op=download", 0, 0); + + $down = wfd_uploading($_FILES, $xoopsModuleConfig['uploaddir'], "", "download.php", 0, 0); $url = ($_POST["url"] != "http://") ? $_POST["url"] : ''; $size = $down['size']; $title = $_FILES['userfile']['name']; @@ -419,6 +431,7 @@ $download->setVar('ipaddress', $_SERVER['REMOTE_ADDR']); } + // added - start - March 4 2006 - jpc $category_handler = xoops_getmodulehandler('category'); $category = $category_handler->get($cid); @@ -446,9 +459,9 @@ } $member_handler =& xoops_gethandler('member'); $owner_groups =& $member_handler->getGroupsByUser($owner, FALSE); - $uid = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0; - $groups = $xoopsUser ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS); - $entries = handleSubmission($formulize_mgr, $entries, $uid, $owner, $fid, $owner_groups, $groups, "new"); // "new" causes xoops token check to be skipped, since WF-downloads should be doing that + $uid = !empty($xoopsUser) ? $xoopsUser->getVar('uid') : 0; + $groups = $xoopsUser ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS); + $entries = handleSubmission($formulize_mgr, $entries, $uid, $owner, $fid, $owner_groups, $groups, "new"); // "new" causes xoops token check to be skipped, since WF-downloads should be doing that //if (!$lid) if(!$owner) { @@ -457,8 +470,6 @@ } } // added - end - March 4 2006 - jpc - - $download_handler->insert($download); $newid = intval($download->getVar('lid')); /** @@ -502,20 +513,18 @@ // Page start here $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'main'; -switch ($op) -{ +switch ($op) { case "addDownload": addDownload(); break; - case "download": case "Download": Download(); break; case "delDownload": global $xoopsModule, $xoopsModuleConfig; - $confirm = (isset($_REQUEST['confirm'])) ? true : false; + $confirm = (isset($_REQUEST['confirm'])) ? 1 : 0; $lid = (isset($_GET['lid'])) ? intval($_GET['lid']) : 0; $lid = (isset($_POST['lid'])) ? intval($_POST['lid']) : $lid; $download_handler = xoops_getmodulehandler('download'); @@ -532,11 +541,11 @@ exit(); } else { wfdownloads_xoops_cp_header(); - xoops_confirm(array('op' => 'delDownload', 'lid' => $lid, 'confirm' => true, 'title' => $title), 'download.php', _AM_WFD_FILE_REALLYDELETEDTHIS . "<br /><br>" . $title, _DELETE); + xoops_confirm(array('op' => 'delDownload', 'lid' => $lid, 'confirm' => 1, 'title' => $title), 'download.php', _AM_WFD_FILE_REALLYDELETEDTHIS . "<br /><br>" . $title, _DELETE); xoops_cp_footer(); } break; - + case "delVote": delVote(); break; @@ -551,11 +560,11 @@ default: global $xoopsUser, $xoopsDB, $xoopsConfig; include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; - $start1 = isset($_GET['start1']) ? intval($_GET['start1']) : 0; - $start2 = isset($_GET['start2']) ? intval($_GET['start2']) : 0; - $start3 = isset($_GET['start3']) ? intval($_GET['start3']) : 0; - $start4 = isset($_GET['start4']) ? intval($_GET['start4']) : 0; + $start = wfdownloads_CleanVars($_GET, 'start', 0, 'int'); + $start1 = wfdownloads_CleanVars($_GET, 'start1', 0, 'int'); + $start2 = wfdownloads_CleanVars($_GET, 'start2', 0, 'int'); + $start3 = wfdownloads_CleanVars($_GET, 'start3', 0, 'int'); + $start4 = wfdownloads_CleanVars($_GET, 'start4', 0, 'int'); $totalcats = wfd_totalcategory(); $report_handler = xoops_getmodulehandler('report'); @@ -573,24 +582,15 @@ wfdownloads_xoops_cp_header(); $indexAdmin = new ModuleAdmin(); - echo $indexAdmin->addNavigation('main.php'); - //wfdownloads_adminMenu(0, _AM_WFD_BINDEX); + echo $indexAdmin->addNavigation('download.php'); + + $adminMenu = new ModuleAdmin(); + $adminMenu->addItemButton(_MI_WFD_BINDEX, 'download.php?op=list', 'list'); + $adminMenu->addItemButton(_AM_WFD_FFS_DOWNLOADTITLE, 'download.php?op=Download', 'add'); + echo $adminMenu->renderButton(); - // echo " - // <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_MINDEX_DOWNSUMMARY . "</legend>\n - // <div style='padding: 8px;'><small>\n - // <a href='category.php'>" . _AM_WFD_SCATEGORY . "</a><b>" . $totalcats . "</b> | \n - // <a href='main.php'>" . _AM_WFD_SFILES . "</a><b>" . $totaldownloads . "</b> | \n - // <a href='newdownloads.php'>" . _AM_WFD_SNEWFILESVAL . "</a><b>" . $totalnewdownloads . "</b> | \n - // <a href='modifications.php'>" . _AM_WFD_SMODREQUEST . "</a><b>" . $totalmodrequests . "</b> | \n - // <a href='brokendown.php'>" . _AM_WFD_SBROKENSUBMIT . "</a><b>" . $totalbrokendownloads . "</b> | \n - // <a href='review.php'>" . _AM_WFD_SREVIEWS . "</a><b>" . $newreviews . "</b> | \n - // <a href='mirror.php'>" . _AM_WFD_SMIRRORS . "</a><b>" . $newmirrors . "</b>\n - // </small></div></fieldset><br />\n - // "; - //echo wfd_serverstats(); - if ($totaldownloads > 0) { + // Published Downloads $criteria = new CriteriaCompo(); $criteria->setLimit($xoopsModuleConfig['admin_perpage']); $criteria->setStart($start); @@ -608,9 +608,7 @@ wfd_downlistfooter(); } wfd_downlistpagenav($published_array_count, $start, 'art'); - /** - * Auto Publish - */ + // Auto Published Downloads $criteria = new Criteria("published", time(), ">"); $auto_publish_count = $download_handler->getCount($criteria); $criteria->setSort("published"); @@ -628,9 +626,7 @@ wfd_downlistfooter(); } wfd_downlistpagenav($auto_publish_count, $start2, 'art2'); - /** - * Expired downloads - */ + // Expired downloads $criteria = new CriteriaCompo(); $criteria->add(new Criteria("expired", time(), "<"), 'AND'); $criteria->add(new Criteria("expired", 0, "<>"), 'AND'); @@ -641,7 +637,7 @@ $criteria->setStart($start3); $expired_array = $download_handler->getObjects($criteria); - wfd_downlistheader("Expired"); + wfd_downlistheader(_AM_WFD_MINDEX_EXPIREDDOWN); if ($expired_count > 0) { foreach (array_keys($expired_array) as $i) { wfd_downlistbody($expired_array[$i]->toArray()); @@ -650,10 +646,7 @@ wfd_downlistfooter(); } wfd_downlistpagenav($expired_count, $start3, 'art3'); - /** - * Offline download - */ - + // Offline download $criteria = new Criteria("offline", 1); $offline_count = $download_handler->getCount($criteria); $criteria->setSort("published"); @@ -688,14 +681,11 @@ print "</form>"; } else { global $xoopsDB; - $sqls[] = "ALTER TABLE " . $xoopsDB->prefix("wfdownloads_cat") . " ADD formulize_fid int(5) NOT NULL default '0';"; $sqls[] = "ALTER TABLE " . $xoopsDB->prefix("wfdownloads_downloads") . " ADD formulize_idreq int(5) NOT NULL default '0';"; - foreach($sqls as $sql) if(!$result = $xoopsDB->queryF($sql)) exit("Error patching for Formulize.<br>SQL dump:<br>" . $sql . "<br>Please contact <a href=su...@fr...>Freeform Solutions</a> for assistance."); - print "Patching for Formulize completed."; } } Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/funcs.js =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/funcs.js 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/funcs.js 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,3 +1,23 @@ +/* + 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. + */ +/** + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ + */ + function smartsectionPageWrap(id, page) { var revisedMessage; var textareaDom = xoopsGetElementById(id); Added: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/imageupload.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/imageupload.php (rev 0) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/imageupload.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -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. + */ +/** + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ + */ +include 'admin_header.php'; + +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once XOOPS_ROOT_PATH."/class/xoopstree.php"; + +$op = wfdownloads_CleanVars($_REQUEST, 'op', 'default', 'string'); +$rootpath = wfdownloads_CleanVars($_GET, 'rootpath', 0, 'int'); + +switch ($op) { + case "upload": + if ($_FILES['uploadfile']['name'] != "") { + if (file_exists(XOOPS_ROOT_PATH . "/" . $_POST['uploadpath'] . "/" . $_FILES['uploadfile']['name'])) { + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 2, _AM_WFD_DOWN_IMAGEEXIST); + } + $allowed_mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'); + $maxfilesize = $xoopsModuleConfig['maxfilesize']; + $maxfilewidth = $xoopsModuleConfig['maximgwidth']; + $maxfileheight = $xoopsModuleConfig['maximgheight']; + $uploaddir = XOOPS_ROOT_PATH."/".$_POST['uploadpath']; + $screenshot = strtolower($_FILES['uploadfile']['name']); + wfd_uploading($screenshot, XOOPS_ROOT_PATH . "/" . $_POST['uploadpath'], $allowed_mimetypes, "imageupload.php", 1, 0, true); + + include_once WFDOWNLOADS_ROOT_PATH . 'class/img_uploader.php'; + $uploader = new XoopsMediaImgUploader($uploaddir . "/", $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight); + + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 2 , _AM_WFD_DOWN_IMAGEUPLOAD); + exit(); + + } else { + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 2 , _AM_WFD_DOWN_NOIMAGEEXIST); + exit(); + } + break; + + case "delfile": + if (isset($_POST['confirm']) && $_POST['confirm'] == 1) { + $filetodelete = XOOPS_ROOT_PATH . "/" . $_POST['uploadpath'] . "/" . $_POST['downfile']; + if (file_exists($filetodelete)) { + chmod($filetodelete, 0666); + if (@unlink($filetodelete)) { + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 1, _AM_WFD_DOWN_FILEDELETED); + } else { + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 1, _AM_WFD_DOWN_FILEERRORDELETE); + } + } + exit(); + } else { + if (empty($_POST['downfile'])) { + redirect_header(WFDOWNLOADS_URL . 'admin/imageupload.php', 1, _AM_WFD_DOWN_NOFILEERROR); + exit(); + } + wfdownloads_xoops_cp_header(); + xoops_confirm(array('op' => 'delfile', 'uploadpath' => $_POST['uploadpath'], 'downfile' => $_POST['downfile'], 'confirm' => 1), + 'imageupload.php', _AM_WFD_DOWN_DELETEFILE . "<br /><br />" . $_POST['downfile'], _AM_WFD_BDELETE); + } + break; + + case "default": + default: + include_once WFDOWNLOADS_ROOT_PATH . 'class/wfd_lists.php'; + + $displayimage = ''; + wfdownloads_xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + echo $indexAdmin->addNavigation('imageupload.php'); + + Global $xoopsUser, $xoopsDB, $xoopsModuleConfig; + + $dirarray = array(1 => $xoopsModuleConfig['catimage'], 2 => $xoopsModuleConfig['screenshots'], 3 => $xoopsModuleConfig['mainimagedir']); + $namearray = array(1 => _AM_WFD_DOWN_CATIMAGE , 2 => _AM_WFD_DOWN_SCREENSHOTS, 3 => _AM_WFD_DOWN_MAINIMAGEDIR); + $listarray = array(1 => _AM_WFD_DOWN_FCATIMAGE , 2 => _AM_WFD_DOWN_FSCREENSHOTS, 3 => _AM_WFD_DOWN_FMAINIMAGEDIR); + + //wfdownloads_adminMenu(6, _AM_WFD_MUPLOADS); + if ($rootpath > 0) { + echo "<div><b>" . _AM_WFD_DOWN_FUPLOADPATH . "</b> " . XOOPS_ROOT_PATH . "/" . $dirarray[$rootpath] . "</div>\n"; + echo "<div><b>" . _AM_WFD_DOWN_FUPLOADURL . "</b> " . XOOPS_URL . "/" . $dirarray[$rootpath] . "</div><br />\n"; + } + $pathlist = (isset($listarray[$rootpath])) ? $namearray[$rootpath] : ''; + $namelist = (isset($listarray[$rootpath])) ? $namearray[$rootpath] : ''; + + $iform = new XoopsThemeForm(_AM_WFD_DOWN_FUPLOADIMAGETO . $pathlist, "op", xoops_getenv('PHP_SELF')); + $iform->setExtra('enctype="multipart/form-data"'); + + ob_start(); + $iform->addElement(new XoopsFormHidden('dir', $rootpath)); + wfd_getDirSelectOption($namelist, $dirarray, $namearray); + $iform->addElement(new XoopsFormLabel(_AM_WFD_DOWN_FOLDERSELECTION, ob_get_contents())); + ob_end_clean(); + + if ($rootpath > 0) { + $graph_array = &WfsLists::getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $dirarray[$rootpath], $type = "images"); + $indeximage_select = new XoopsFormSelect('', 'downfile', ''); + $indeximage_select->addOptionArray($graph_array); + $indeximage_select->setExtra("onchange='showImgSelected(\"image\", \"downfile\", \"" . $dirarray[$rootpath] . "\", \"\", \"" . XOOPS_URL . "\")'"); + $indeximage_tray = new XoopsFormElementTray(_AM_WFD_DOWN_FSHOWSELECTEDIMAGE, ' '); + $indeximage_tray->addElement($indeximage_select); + if (!empty($_REQUEST['downfile'])) { + $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $dirarray[$rootpath] . "/" . $_REQUEST['downfile'] . "' name='image' id='image' alt='' title='image' />")); + } else { + $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' name='image' id='image' alt='' title='image' />")); + } + $iform->addElement($indeximage_tray); + + $iform->addElement(new XoopsFormFile(_AM_WFD_DOWN_FUPLOADIMAGE, 'uploadfile', 0)); + $iform->addElement(new XoopsFormHidden('uploadpath', $dirarray[$rootpath])); + $iform->addElement(new XoopsFormHidden('rootnumber', $rootpath)); + + $dup_tray = new XoopsFormElementTray('', ''); + $dup_tray->addElement(new XoopsFormHidden('op', 'upload')); + $butt_dup = new XoopsFormButton('', '', _AM_WFD_BUPLOAD, 'submit'); + $butt_dup->setExtra('onclick="this.form.elements.op.value=\'upload\'"'); + $dup_tray->addElement($butt_dup); + + $butt_dupct = new XoopsFormButton('', '', _AM_WFD_BDELETEIMAGE, 'submit'); + $butt_dupct->setExtra('onclick="this.form.elements.op.value=\'delfile\'"'); + $dup_tray->addElement($butt_dupct); + $iform->addElement($dup_tray); + } + $iform->display(); + echo wfd_serverstats(); +} +//xoops_cp_footer(); +include_once "admin_footer.php"; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/import.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,4 +1,24 @@ <?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. + */ +/** + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ + */ + // ======================================================== // Conversion file for any version before wf-downloads 3 // ======================================================== Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/index.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,24 +1,23 @@ <?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. + 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 XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package - * @since - * @author XOOPS Development Team - * @version $Id $ + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - - require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; include_once dirname(__FILE__) . '/admin_header.php'; @@ -56,7 +55,7 @@ if ($totaldownloads > 0) { $indexAdmin->addInfoBoxLine( - _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="main.php">' . _AM_WFD_SFILES . '</a><b>' + _AM_WFD_MINDEX_DOWNSUMMARY, "<infolabel>" . '<a href="download.php">' . _AM_WFD_SFILES . '</a><b>' . "</infolabel>", $totaldownloads, 'Green' ); } else { Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/indexpage.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,13 +1,23 @@ <?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. + */ /** - * $Id: indexpage.php,v 1.6 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ */ - include 'admin_header.php'; $op = isset($_REQUEST['op']) ?$_REQUEST['op'] : "default"; Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ip_log.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ip_log.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/ip_log.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,4 +1,23 @@ <?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. + */ +/** + * WF-Downloads module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package wfdownload + * @since 3.23 + * @author WF-Sections, Xoops Development Team, luciorota + * @version svn:$Id$ + */ $lid = isset($_GET['lid']) && $_GET['lid'] != '' ? $_GET['lid'] : 0; if(!$lid) { header('Location index.php'); Deleted: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/main.php =================================================================== --- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/main.php 2013-05-21 20:49:57 UTC (rev 11569) +++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/admin/main.php 2013-05-21 21:00:18 UTC (rev 11570) @@ -1,706 +0,0 @@ -<?php -/** - * $Id: main.php,v 1.23 2007/09/30 12:39:13 m0nty_ Exp $ - * Module: WF-Downloads - * Version: v2.0.5a - * Release Date: 26 july 2004 - * Author: WF-Sections - * Licence: GNU - */ - -include 'admin_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php'; -include_once WFDOWNLOADS_ROOT_PATH . 'class/wfd_lists.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopstree.php'; - -//$mytree = new XoopsTree($xoopsDB -> prefix('wfdownloads_cat'), "cid", "pid"); - -function Download() -{ - $lid = isset($_REQUEST['lid']) ? intval($_REQUEST['lid']) : 0; - - $category_handler = xoops_getmodulehandler('category'); - $numrows = $category_handler->getCount(); - if ($numrows) { - wfdownloads_xoops_cp_header(); - $indexAdmin = new ModuleAdmin(); - echo $indexAdmin->addNavigation('main.php'); - - //wfdownloads_adminMenu(3, _AM_WFD_MDOWNLOADS); - - echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_FILE_ALLOWEDAMIME . "</legend>\n - <div style='padding: 8px;'>\n"; - - $mime_handler = xoops_getmodulehandler('mimetype'); - $criteria = new Criteria("mime_admin", 1); - $mimetypes = $mime_handler->getList($criteria); - $allowmimetypes = implode(' | ', $mimetypes); - echo $allowmimetypes; - echo "</div>\n - </fieldset><br />\n - "; - - $download_handler = xoops_getmodulehandler('download'); - if ($lid) { - $download = $download_handler->get($lid); - $title = _AM_WFD_FILE_MODIFYFILE; - // added - start - March 4 2006 - jpc - $cid = intval($download->getVar('cid')); - $category = $category_handler->get($cid); - // added - end - March 4 2006 - jpc - - // changed - start - April 22 2006 - jwe - //$title = _AM_WFD_FILE_MODIFYFILE; - $title = preg_replace("/{category}/", $category->getVar('title'), _AM_WFD_FFS_EDITDOWNLOADTITLE); - // changed - end - April 22 2006 - jwe - - } else { - $download = $download_handler->create(); - $title = _AM_WFD_FILE_CREATENEWFILE; - // added - start - March 4 2006 - jpc - $cid = (!empty($_POST['cid'])) ? intval($_POST['cid']) : 0 ; - $download->setVar('cid', $cid); - $category = $category_handler->get($cid); - // added - end - March 4 2006 - jpc - - // changed - start - April 22 2006 - jwe - //$title = _AM_WFD_FILE_CREATENEWFILE; - $title = preg_replace("/{category}/", $category->getVar('title'), _AM_WFD_FFS_DOWNLOADTITLE); - // changed - end - April 22 2006 - jwe - - } - - // changed - start - March 4 2006 - jpc - if ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) { - - $fid = $category->getVar('formulize_fid'); - $customArray = array(); - if($fid) { - global $xoopsUser; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php"; - include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php"; - - $customArray['fid'] = $fid; - $customArray['formulize_mgr'] =& xoops_getmodulehandler('elements', 'formulize'); - $customArray['groups'] = $xoopsUser ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS); - $customArray['prevEntry'] = getEntryValues($download->getVar('formulize_idreq'), $customArray['formulize_mgr'], $customArray['groups'], $fid); - $customArray['entry'] = $download->getVar('formulize_idreq'); - $customArray['go_back'] = ""; - $customArray['parentLinks'] = ""; - - $owner = getEntryOwner($entry); - $member_handler =& xoops_gethandler('member'); - $owner_groups =& $member_handler->getGroupsByUser($owner, FALSE); - - $customArray['owner_groups'] = $owner_groups; - } - $sform = $download->getAdminForm($title, $customArray); - } elseif(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) { - $sform = $download->getCategoryForm(); - } else { - $sform = $download->getAdminForm($title); - } - $sform->display(); - // changed - end - March 4 2006 - jpc - } else { - redirect_header(WFDOWNLOADS_URL . 'admin/category.php?', 1, _AM_WFD_CCATEGORY_NOEXISTS); - exit(); - } - - if ($lid) { - global $imagearray; - // Vote data - $rating_handler = xoops_getmodulehandler('rating'); - $totalvotes = $rating_handler->getCount(); - - $reg_criteria = new CriteriaCompo(new Criteria('lid', $lid)); - $reg_criteria->add(new Criteria("ratinguser", 0, ">")); - $votesreg = $rating_handler->getCount($reg_criteria); - $reg_criteria->setSort("ratingtimestamp"); - $reg_criteria->setOrder("DESC"); - $regvotes = $rating_handler->getObjects($reg_criteria); - - $anon_criteria = new CriteriaCompo(new Criteria('lid', $lid)); - $anon_criteria->add(new Criteria("ratinguser", 0, "=")); - $votesanon = $rating_handler->getCount($anon_criteria); - $anon_criteria->setSort("ratingtimestamp"); - $anon_criteria->setOrder("DESC"); - - echo " - <fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_WFD_VOTE_RATINGINFOMATION . "</legend>\n - <div style='padding: 8px;'><b>" . _AM_WFD_VOTE_TOTALVOTES . "</b>" . $totalvotes . "<br /><br />\n - "; - - printf(_AM_WFD_VOTE_REGUSERVOTES, $votesreg); - - echo "<br />"; - - printf(_AM_WFD_VOTE_ANONUSERVOTES, $votesanon); - - echo " - </div>\n - <table width='100%' cellspacing='1' cellpadding='2' class='outer'>\n - <tr>\n - <th align='center'>" . _AM_WFD_VOTE_USER . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_IP . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_RATING . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_USERAVG . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_TOTALRATE . "</td>\n - <th align='center'>" . _AM_WFD_VOTE_DATE . "</td>\n - <th align='center'>" . _AM_WFD_MINDEX_ACTION . "</td>\n - </tr>\n - "; - - if ($votesreg == 0) { - echo "<tr><td align='center' colspan='8' class='even'><b>" . _AM_WFD_VO... [truncated message content] |