From: <txm...@us...> - 2013-04-03 19:55:44
|
Revision: 11342 http://sourceforge.net/p/xoops/svn/11342 Author: txmodxoops Date: 2013-04-03 19:55:30 +0000 (Wed, 03 Apr 2013) Log Message: ----------- Adding new module txmlinks Added Paths: ----------- XoopsModules/txmlinks/ XoopsModules/txmlinks/branches/ XoopsModules/txmlinks/releases/ XoopsModules/txmlinks/releases/1.0/ XoopsModules/txmlinks/releases/1.0/txmlinks/ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/about.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_footer.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_header.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/brokens.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/categories.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/links.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/menu.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/modifies.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/permissions.php XoopsModules/txmlinks/releases/1.0/txmlinks/admin/ratings.php XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/ XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/brokens.php XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/links.php XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/modifies.php XoopsModules/txmlinks/releases/1.0/txmlinks/blocks/ratings.php XoopsModules/txmlinks/releases/1.0/txmlinks/brokens.php XoopsModules/txmlinks/releases/1.0/txmlinks/categories.php XoopsModules/txmlinks/releases/1.0/txmlinks/class/ XoopsModules/txmlinks/releases/1.0/txmlinks/class/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/class/txmlinks_brokens.php XoopsModules/txmlinks/releases/1.0/txmlinks/class/txmlinks_categories.php XoopsModules/txmlinks/releases/1.0/txmlinks/class/txmlinks_links.php XoopsModules/txmlinks/releases/1.0/txmlinks/class/txmlinks_modifies.php XoopsModules/txmlinks/releases/1.0/txmlinks/class/txmlinks_ratings.php XoopsModules/txmlinks/releases/1.0/txmlinks/css/ XoopsModules/txmlinks/releases/1.0/txmlinks/css/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/css/style.css XoopsModules/txmlinks/releases/1.0/txmlinks/docs/ XoopsModules/txmlinks/releases/1.0/txmlinks/docs/changelog.txt XoopsModules/txmlinks/releases/1.0/txmlinks/docs/credits.txt XoopsModules/txmlinks/releases/1.0/txmlinks/docs/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/docs/install.txt XoopsModules/txmlinks/releases/1.0/txmlinks/docs/lang_diff.txt XoopsModules/txmlinks/releases/1.0/txmlinks/docs/license.txt XoopsModules/txmlinks/releases/1.0/txmlinks/docs/readme.txt XoopsModules/txmlinks/releases/1.0/txmlinks/header.php XoopsModules/txmlinks/releases/1.0/txmlinks/images/ XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/ XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/16/ XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/16/arrow.gif XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/16/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/16/off.png XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/16/on.png XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/32/ XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/32/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/images/icons/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/images/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/images/txmlinks_logo.png XoopsModules/txmlinks/releases/1.0/txmlinks/images/txmodxoops_logo.png XoopsModules/txmlinks/releases/1.0/txmlinks/include/ XoopsModules/txmlinks/releases/1.0/txmlinks/include/common.php XoopsModules/txmlinks/releases/1.0/txmlinks/include/functions.php XoopsModules/txmlinks/releases/1.0/txmlinks/include/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/include/install.php XoopsModules/txmlinks/releases/1.0/txmlinks/include/waiting.plugin.php XoopsModules/txmlinks/releases/1.0/txmlinks/index.php XoopsModules/txmlinks/releases/1.0/txmlinks/language/ XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/ XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/admin.php XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/blocks.php XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/help/ XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/help/help.html XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/help/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/main.php XoopsModules/txmlinks/releases/1.0/txmlinks/language/english/modinfo.php XoopsModules/txmlinks/releases/1.0/txmlinks/language/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/links.php XoopsModules/txmlinks/releases/1.0/txmlinks/modifies.php XoopsModules/txmlinks/releases/1.0/txmlinks/ratings.php XoopsModules/txmlinks/releases/1.0/txmlinks/sql/ XoopsModules/txmlinks/releases/1.0/txmlinks/sql/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/sql/mysql.sql XoopsModules/txmlinks/releases/1.0/txmlinks/templates/ XoopsModules/txmlinks/releases/1.0/txmlinks/templates/admin/ XoopsModules/txmlinks/releases/1.0/txmlinks/templates/admin/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/admin/txmlinks_admin_about.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/admin/txmlinks_admin_help.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/ XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/brokens_block.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/links_block.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/modifies_block.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/blocks/ratings_block.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/index.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_brokens.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_categories.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_footer.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_header.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_index.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_links.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_modifies.html XoopsModules/txmlinks/releases/1.0/txmlinks/templates/txmlinks_ratings.html XoopsModules/txmlinks/releases/1.0/txmlinks/xoops_version.php XoopsModules/txmlinks/trunk/ XoopsModules/txmlinks/trunk/txmlinks/ XoopsModules/txmlinks/trunk/txmlinks/admin/ XoopsModules/txmlinks/trunk/txmlinks/admin/about.php XoopsModules/txmlinks/trunk/txmlinks/admin/admin_footer.php XoopsModules/txmlinks/trunk/txmlinks/admin/admin_header.php XoopsModules/txmlinks/trunk/txmlinks/admin/brokens.php XoopsModules/txmlinks/trunk/txmlinks/admin/categories.php XoopsModules/txmlinks/trunk/txmlinks/admin/index.html XoopsModules/txmlinks/trunk/txmlinks/admin/index.php XoopsModules/txmlinks/trunk/txmlinks/admin/links.php XoopsModules/txmlinks/trunk/txmlinks/admin/menu.php XoopsModules/txmlinks/trunk/txmlinks/admin/modifies.php XoopsModules/txmlinks/trunk/txmlinks/admin/permissions.php XoopsModules/txmlinks/trunk/txmlinks/admin/ratings.php XoopsModules/txmlinks/trunk/txmlinks/blocks/ XoopsModules/txmlinks/trunk/txmlinks/blocks/brokens.php XoopsModules/txmlinks/trunk/txmlinks/blocks/index.html XoopsModules/txmlinks/trunk/txmlinks/blocks/links.php XoopsModules/txmlinks/trunk/txmlinks/blocks/modifies.php XoopsModules/txmlinks/trunk/txmlinks/blocks/ratings.php XoopsModules/txmlinks/trunk/txmlinks/brokens.php XoopsModules/txmlinks/trunk/txmlinks/categories.php XoopsModules/txmlinks/trunk/txmlinks/class/ XoopsModules/txmlinks/trunk/txmlinks/class/index.html XoopsModules/txmlinks/trunk/txmlinks/class/txmlinks_brokens.php XoopsModules/txmlinks/trunk/txmlinks/class/txmlinks_categories.php XoopsModules/txmlinks/trunk/txmlinks/class/txmlinks_links.php XoopsModules/txmlinks/trunk/txmlinks/class/txmlinks_modifies.php XoopsModules/txmlinks/trunk/txmlinks/class/txmlinks_ratings.php XoopsModules/txmlinks/trunk/txmlinks/css/ XoopsModules/txmlinks/trunk/txmlinks/css/index.html XoopsModules/txmlinks/trunk/txmlinks/css/style.css XoopsModules/txmlinks/trunk/txmlinks/docs/ XoopsModules/txmlinks/trunk/txmlinks/docs/changelog.txt XoopsModules/txmlinks/trunk/txmlinks/docs/credits.txt XoopsModules/txmlinks/trunk/txmlinks/docs/index.html XoopsModules/txmlinks/trunk/txmlinks/docs/install.txt XoopsModules/txmlinks/trunk/txmlinks/docs/lang_diff.txt XoopsModules/txmlinks/trunk/txmlinks/docs/license.txt XoopsModules/txmlinks/trunk/txmlinks/docs/readme.txt XoopsModules/txmlinks/trunk/txmlinks/header.php XoopsModules/txmlinks/trunk/txmlinks/images/ XoopsModules/txmlinks/trunk/txmlinks/images/icons/ XoopsModules/txmlinks/trunk/txmlinks/images/icons/16/ XoopsModules/txmlinks/trunk/txmlinks/images/icons/16/arrow.gif XoopsModules/txmlinks/trunk/txmlinks/images/icons/16/index.html XoopsModules/txmlinks/trunk/txmlinks/images/icons/16/off.png XoopsModules/txmlinks/trunk/txmlinks/images/icons/16/on.png XoopsModules/txmlinks/trunk/txmlinks/images/icons/32/ XoopsModules/txmlinks/trunk/txmlinks/images/icons/32/index.html XoopsModules/txmlinks/trunk/txmlinks/images/icons/index.html XoopsModules/txmlinks/trunk/txmlinks/images/index.html XoopsModules/txmlinks/trunk/txmlinks/images/txmlinks_logo.png XoopsModules/txmlinks/trunk/txmlinks/images/txmodxoops_logo.png XoopsModules/txmlinks/trunk/txmlinks/include/ XoopsModules/txmlinks/trunk/txmlinks/include/common.php XoopsModules/txmlinks/trunk/txmlinks/include/functions.php XoopsModules/txmlinks/trunk/txmlinks/include/index.html XoopsModules/txmlinks/trunk/txmlinks/include/install.php XoopsModules/txmlinks/trunk/txmlinks/include/waiting.plugin.php XoopsModules/txmlinks/trunk/txmlinks/index.php XoopsModules/txmlinks/trunk/txmlinks/language/ XoopsModules/txmlinks/trunk/txmlinks/language/english/ XoopsModules/txmlinks/trunk/txmlinks/language/english/admin.php XoopsModules/txmlinks/trunk/txmlinks/language/english/blocks.php XoopsModules/txmlinks/trunk/txmlinks/language/english/help/ XoopsModules/txmlinks/trunk/txmlinks/language/english/help/help.html XoopsModules/txmlinks/trunk/txmlinks/language/english/help/index.html XoopsModules/txmlinks/trunk/txmlinks/language/english/index.html XoopsModules/txmlinks/trunk/txmlinks/language/english/main.php XoopsModules/txmlinks/trunk/txmlinks/language/english/modinfo.php XoopsModules/txmlinks/trunk/txmlinks/language/index.html XoopsModules/txmlinks/trunk/txmlinks/links.php XoopsModules/txmlinks/trunk/txmlinks/modifies.php XoopsModules/txmlinks/trunk/txmlinks/ratings.php XoopsModules/txmlinks/trunk/txmlinks/sql/ XoopsModules/txmlinks/trunk/txmlinks/sql/index.html XoopsModules/txmlinks/trunk/txmlinks/sql/mysql.sql XoopsModules/txmlinks/trunk/txmlinks/templates/ XoopsModules/txmlinks/trunk/txmlinks/templates/admin/ XoopsModules/txmlinks/trunk/txmlinks/templates/admin/index.html XoopsModules/txmlinks/trunk/txmlinks/templates/admin/txmlinks_admin_about.html XoopsModules/txmlinks/trunk/txmlinks/templates/admin/txmlinks_admin_help.html XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/ XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/brokens_block.html XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/index.html XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/links_block.html XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/modifies_block.html XoopsModules/txmlinks/trunk/txmlinks/templates/blocks/ratings_block.html XoopsModules/txmlinks/trunk/txmlinks/templates/index.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_brokens.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_categories.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_footer.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_header.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_index.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_links.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_modifies.html XoopsModules/txmlinks/trunk/txmlinks/templates/txmlinks_ratings.html XoopsModules/txmlinks/trunk/txmlinks/xoops_version.php Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/about.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/about.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/about.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,26 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 about.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include 'admin_header.php'; +echo $adminMenu->addNavigation('about.php'); +echo $adminMenu->renderabout('YDRUY5QZQHAHS', false); +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_footer.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_footer.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_footer.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,30 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 admin_footer.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'> + <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a> + <a href='http://www.txmodxoops.org' title='Visit TXMod Xoops' rel='external'> + <img src='../images/txmodxoops_logo.png' alt='TXMod Xoops' /></a></div>"; +echo "<div class='center smallsmall italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_TXMLINKS_MAINTAINEDBY." + <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>"; +xoops_cp_footer(); Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_header.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_header.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/admin_header.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,58 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 admin_header.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ +require_once dirname(dirname(dirname(dirname(__FILE__)))). '/include/cp_header.php'; +$thisdir = dirname(dirname(__FILE__)); +include_once $thisdir.'/include/common.php'; +include_once $thisdir.'/include/functions.php'; + +$thisDirname = $GLOBALS['xoopsModule']->getVar('dirname'); + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'); +//load handlers +$categoriesHandler =& xoops_getModuleHandler('txmlinks_categories', $thisDirname); +$brokensHandler =& xoops_getModuleHandler('txmlinks_brokens', $thisDirname); +$linksHandler =& xoops_getModuleHandler('txmlinks_links', $thisDirname); +$modifiesHandler =& xoops_getModuleHandler('txmlinks_modifies', $thisDirname); +$ratingsHandler =& xoops_getModuleHandler('txmlinks_ratings', $thisDirname); + +$myts =& MyTextSanitizer::getInstance(); +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} + +$xoopsTpl->assign('pathIcon16', $pathIcon16); +$xoopsTpl->assign('pathIcon32', $pathIcon32); +//Load languages +xoops_loadLanguage('admin', $thisDirname); +xoops_loadLanguage('modinfo', $thisDirname); +xoops_loadLanguage('main', $thisDirname); +// Local admin menu class +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); +}else{ + redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); +} +xoops_cp_header(); +$adminMenu = new ModuleAdmin(); \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/brokens.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/brokens.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/brokens.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,151 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 brokens.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include_once 'admin_header.php'; +//It recovered the value of argument op in URL$ +$op = txmlinks_CleanVars($_REQUEST, 'op', 'list', 'string'); +echo $adminMenu->addNavigation('brokens.php'); +switch ($op) +{ + case 'list': + default: + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_BROKENS, 'brokens.php?op=new', 'add'); + echo $adminMenu->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort('report_id'); + $criteria->setOrder('ASC'); + $numrows = $brokensHandler->getCount(); + $brokens_arr = $brokensHandler->getAll($criteria); + + // Table view + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_REPORT_LID."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_SENDER."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_IP."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($brokens_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class='center'>".strip_tags($brokens_arr[$i]->getVar('report_lid'))."</td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($brokens_arr[$i]->getVar('report_sender'),"S")."</td>"; + echo "<td class='center'>".strip_tags($brokens_arr[$i]->getVar('report_ip'))."</td>"; + echo "<td class='center'>".( ($brokens_arr[$i]->getVar('report_status') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($brokens_arr[$i]->getVar('report_waiting') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($brokens_arr[$i]->getVar('report_online') == 1 ) ? _YES : _NO)."</td>"; + + echo "<td class='center width5'> + <a href='brokens.php?op=edit&report_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='brokens.php?op=delete&report_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_REPORT_LID."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_SENDER."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_IP."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_REPORT_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr><tr><td class='errorMsg' colspan='7'>There are no report</td></tr>"; + echo "</table><br /><br />"; + } + + break; + + case 'new': + $adminMenu->addItemButton(_AM_TXMLINKS_BROKENS_LIST, 'brokens.php', 'list'); + echo $adminMenu->renderButton(); + + $obj =& $brokensHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('brokens.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (isset($_REQUEST['report_id'])) { + $obj =& $brokensHandler->get($_REQUEST['report_id']); + } else { + $obj =& $brokensHandler->create(); + } + + // Form save fields + $obj->setVar('report_lid', $_REQUEST['report_lid']); + $obj->setVar('report_sender', $_REQUEST['report_sender']); + $obj->setVar('report_ip', $_REQUEST['report_ip']); + $obj->setVar('report_status', (($_REQUEST['report_status'] == 1) ? '1' : '0')); + $obj->setVar('report_waiting', (($_REQUEST['report_waiting'] == 1) ? '1' : '0')); + $obj->setVar('report_online', (($_REQUEST['report_online'] == 1) ? '1' : '0')); + + if ($brokensHandler->insert($obj)) { + redirect_header('brokens.php?op=list', 2, _AM_TXMLINKS_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case 'edit': + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_BROKENS, 'brokens.php?op=new', 'add'); + $adminMenu->addItemButton(_AM_TXMLINKS_BROKENS_LIST, 'brokens.php', 'list'); + echo $adminMenu->renderButton(); + $obj = $brokensHandler->get($_REQUEST['report_id']); + $form = $obj->getForm(); + $form->display(); + break; + + case 'delete': + $obj =& $brokensHandler->get($_REQUEST['report_id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('brokens.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($brokensHandler->delete($obj)) { + redirect_header('brokens.php', 3, _AM_TXMLINKS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'report_id' => $_REQUEST['report_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TXMLINKS_FORMSUREDEL, $obj->getVar('report_id'))); + } + break; +} +include_once 'admin_footer.php'; +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/categories.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/categories.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/categories.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,165 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 categories.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include_once 'admin_header.php'; +//It recovered the value of argument op in URL$ +$op = txmlinks_CleanVars($_REQUEST, 'op', 'list', 'string'); +echo $adminMenu->addNavigation('categories.php'); +switch ($op) +{ + case 'list': + default: + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_CATEGORIES, 'categories.php?op=new', 'add'); + echo $adminMenu->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_id'); + $criteria->setOrder('ASC'); + $numrows = $categoriesHandler->getCount(); + $categories_arr = $categoriesHandler->getAll($criteria); + + // Table view + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_CAT_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_CAT_DESC."</th> + <th class='center'>"._AM_TXMLINKS_CAT_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_CAT_WEIGHT."</th> + <th class='center'>"._AM_TXMLINKS_CAT_COLOR."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($categories_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class='left'><img src='".TXMLINKS_URL."/images/icons/16/arrow.gif'> ".$categories_arr[$i]->getVar('cat_title')."</td>"; + echo "<td class='center'>".strip_tags($categories_arr[$i]->getVar('cat_desc'))."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/txmlinks/images/categories/".$categories_arr[$i]->getVar('cat_image')."' height='30px' title='cat_image' alt='cat_image'></td>"; + echo "<td class='center'>".strip_tags($categories_arr[$i]->getVar('cat_weight'))."</td>"; + echo "<td class='center'><span style='background-color:".$categories_arr[$i]->getVar('cat_color')."'> </span> -> ".$categories_arr[$i]->getVar('cat_color')."</td>"; + + echo "<td class='center width5'> + <a href='categories.php?op=edit&cat_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='categories.php?op=delete&cat_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_CAT_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_CAT_DESC."</th> + <th class='center'>"._AM_TXMLINKS_CAT_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_CAT_WEIGHT."</th> + <th class='center'>"._AM_TXMLINKS_CAT_COLOR."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr><tr><td class='errorMsg' colspan='7'>There are no cat</td></tr>"; + echo "</table><br /><br />"; + } + + break; + + case 'new': + $adminMenu->addItemButton(_AM_TXMLINKS_CATEGORIES_LIST, 'categories.php', 'list'); + echo $adminMenu->renderButton(); + + $obj =& $categoriesHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('categories.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (isset($_REQUEST['cat_id'])) { + $obj =& $categoriesHandler->get($_REQUEST['cat_id']); + } else { + $obj =& $categoriesHandler->create(); + } + + // Form save fields + $obj->setVar('cat_pid', $_REQUEST['cat_pid']); + $obj->setVar('cat_title', $_REQUEST['cat_title']); + $obj->setVar('cat_desc', $_REQUEST['cat_desc']); + + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploaddir = XOOPS_UPLOAD_PATH.'/txmlinks/images/categories/'; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix('cat_image_'); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header('javascript:history.go(-1)', 3, $errors); + } else { + $obj->setVar('cat_image', $uploader->getSavedFileName()); + } + } else { + $obj->setVar('cat_image', $_REQUEST['cat_image']); + } + + $obj->setVar('cat_weight', $_REQUEST['cat_weight']); + $obj->setVar('cat_color', $_REQUEST['cat_color']); + + if ($categoriesHandler->insert($obj)) { + redirect_header('categories.php?op=list', 2, _AM_TXMLINKS_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case 'edit': + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_CATEGORIES, 'categories.php?op=new', 'add'); + $adminMenu->addItemButton(_AM_TXMLINKS_CATEGORIES_LIST, 'categories.php', 'list'); + echo $adminMenu->renderButton(); + $obj = $categoriesHandler->get($_REQUEST['cat_id']); + $form = $obj->getForm(); + $form->display(); + break; + + case 'delete': + $obj =& $categoriesHandler->get($_REQUEST['cat_id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('categories.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($categoriesHandler->delete($obj)) { + redirect_header('categories.php', 3, _AM_TXMLINKS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'cat_id' => $_REQUEST['cat_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TXMLINKS_FORMSUREDEL, $obj->getVar('cat_id'))); + } + break; +} +include_once 'admin_footer.php'; +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.html =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.html (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.html 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/index.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,50 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 index.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include_once 'admin_header.php'; + //count "total cat" + $count_cat = $categoriesHandler->getCount(); + //count "total report" + $count_report = $brokensHandler->getCount(); + //count "total link" + $count_link = $linksHandler->getCount(); + //count "total request" + $count_request = $modifiesHandler->getCount(); + //count "total rating" + $count_rating = $ratingsHandler->getCount(); + // InfoBox ratings + $adminMenu->addInfoBox(_AM_TXMLINKS_STATISTICS); + // InfoBox cat + $adminMenu->addInfoBoxLine(_AM_TXMLINKS_STATISTICS, _AM_TXMLINKS_THEREARE_CATEGORIES, $count_cat); + // InfoBox report + $adminMenu->addInfoBoxLine(_AM_TXMLINKS_STATISTICS, _AM_TXMLINKS_THEREARE_BROKENS, $count_report); + // InfoBox link + $adminMenu->addInfoBoxLine(_AM_TXMLINKS_STATISTICS, _AM_TXMLINKS_THEREARE_LINKS, $count_link); + // InfoBox request + $adminMenu->addInfoBoxLine(_AM_TXMLINKS_STATISTICS, _AM_TXMLINKS_THEREARE_MODIFIES, $count_request); + // InfoBox rating + $adminMenu->addInfoBoxLine(_AM_TXMLINKS_STATISTICS, _AM_TXMLINKS_THEREARE_RATINGS, $count_rating); + // Render Index + echo $adminMenu->addNavigation('index.php'); + echo $adminMenu->renderIndex(); +include_once 'admin_footer.php'; +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/links.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/links.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/links.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,187 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 links.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include_once 'admin_header.php'; +//It recovered the value of argument op in URL$ +$op = txmlinks_CleanVars($_REQUEST, 'op', 'list', 'string'); +echo $adminMenu->addNavigation('links.php'); +switch ($op) +{ + case 'list': + default: + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_LINKS, 'links.php?op=new', 'add'); + echo $adminMenu->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort('link_id'); + $criteria->setOrder('ASC'); + $numrows = $linksHandler->getCount(); + $links_arr = $linksHandler->getAll($criteria); + + // Table view + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_LINK_CID."</th> + <th class='center'>"._AM_TXMLINKS_LINK_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_URL."</th> + <th class='center'>"._AM_TXMLINKS_LINK_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_SUBMITTER."</th> + <th class='center'>"._AM_TXMLINKS_LINK_DATE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_LINK_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_LINK_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($links_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + $link1 = $categoriesHandler->get($links_arr[$i]->getVar('link_cid')); + $link_categories1 = $link1->getVar('link_title'); + echo "<td class='center'>".$link_categories1."</td>"; + echo "<td class='left'><img src='".TXMLINKS_URL."/images/icons/16/arrow.gif'> ".$links_arr[$i]->getVar('link_title')."</td>"; + echo "<td class='center'>".strip_tags($links_arr[$i]->getVar('link_url'))."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/txmlinks/images/links/".$links_arr[$i]->getVar('link_image')."' height='30px' title='link_image' alt='link_image'></td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($links_arr[$i]->getVar('link_submitter'),"S")."</td>"; + echo "<td class='center'>".formatTimeStamp($links_arr[$i]->getVar('link_date'),"S")."</td>"; + echo "<td class='center'>".( ($links_arr[$i]->getVar('link_status') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($links_arr[$i]->getVar('link_waiting') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($links_arr[$i]->getVar('link_online') == 1 ) ? _YES : _NO)."</td>"; + + echo "<td class='center width5'> + <a href='links.php?op=edit&link_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='links.php?op=delete&link_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_LINK_CID."</th> + <th class='center'>"._AM_TXMLINKS_LINK_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_URL."</th> + <th class='center'>"._AM_TXMLINKS_LINK_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_SUBMITTER."</th> + <th class='center'>"._AM_TXMLINKS_LINK_DATE."</th> + <th class='center'>"._AM_TXMLINKS_LINK_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_LINK_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_LINK_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr><tr><td class='errorMsg' colspan='15'>There are no link</td></tr>"; + echo "</table><br /><br />"; + } + + break; + + case 'new': + $adminMenu->addItemButton(_AM_TXMLINKS_LINKS_LIST, 'links.php', 'list'); + echo $adminMenu->renderButton(); + + $obj =& $linksHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('links.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (isset($_REQUEST['link_id'])) { + $obj =& $linksHandler->get($_REQUEST['link_id']); + } else { + $obj =& $linksHandler->create(); + } + + // Form save fields + $obj->setVar('link_cid', $_REQUEST['link_cid']); + $obj->setVar('link_title', $_REQUEST['link_title']); + $obj->setVar('link_url', $_REQUEST['link_url']); + + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploaddir = XOOPS_UPLOAD_PATH.'/txmlinks/images/links/'; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix('link_image_'); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header('javascript:history.go(-1)', 3, $errors); + } else { + $obj->setVar('link_image', $uploader->getSavedFileName()); + } + } else { + $obj->setVar('link_image', $_REQUEST['link_image']); + } + + $obj->setVar('link_submitter', $_REQUEST['link_submitter']); + $obj->setVar('link_display', (($_REQUEST['link_display'] == 1) ? '1' : '0')); + $obj->setVar('link_date', strtotime($_REQUEST['link_date'])); + $obj->setVar('link_hits', $_REQUEST['link_hits']); + $obj->setVar('link_rating', $_REQUEST['link_rating']); + $obj->setVar('link_votes', $_REQUEST['link_votes']); + $obj->setVar('link_comments', $_REQUEST['link_comments']); + $obj->setVar('link_status', (($_REQUEST['link_status'] == 1) ? '1' : '0')); + $obj->setVar('link_waiting', (($_REQUEST['link_waiting'] == 1) ? '1' : '0')); + $obj->setVar('link_online', (($_REQUEST['link_online'] == 1) ? '1' : '0')); + + if ($linksHandler->insert($obj)) { + redirect_header('links.php?op=list', 2, _AM_TXMLINKS_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case 'edit': + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_LINKS, 'links.php?op=new', 'add'); + $adminMenu->addItemButton(_AM_TXMLINKS_LINKS_LIST, 'links.php', 'list'); + echo $adminMenu->renderButton(); + $obj = $linksHandler->get($_REQUEST['link_id']); + $form = $obj->getForm(); + $form->display(); + break; + + case 'delete': + $obj =& $linksHandler->get($_REQUEST['link_id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('links.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($linksHandler->delete($obj)) { + redirect_header('links.php', 3, _AM_TXMLINKS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'link_id' => $_REQUEST['link_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TXMLINKS_FORMSUREDEL, $obj->getVar('link_id'))); + } + break; +} +include_once 'admin_footer.php'; +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/menu.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/menu.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/menu.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,58 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 menu.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +$dirname = basename( dirname( dirname( __FILE__ ) ) ) ; +$module_handler =& xoops_gethandler('module'); +$xoopsModule =& XoopsModule::getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathIcon32 = $moduleInfo->getInfo('icons32'); +$adminmenu = array(); +$i = 1; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU1; +$adminmenu[$i]['link'] = 'admin/index.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/home.png'; +$i++; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU2; +$adminmenu[$i]['link'] = 'admin/categories.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/category.png'; +$i++; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU3; +$adminmenu[$i]['link'] = 'admin/brokens.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/brokenlink.png'; +$i++; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU4; +$adminmenu[$i]['link'] = 'admin/links.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/addlink.png'; +$i++; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU5; +$adminmenu[$i]['link'] = 'admin/modifies.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/modifiedlink.png'; +$i++; +$adminmenu[$i]['title'] = _MI_TXMLINKS_ADMENU6; +$adminmenu[$i]['link'] = 'admin/ratings.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/stats.png'; +$i++; +$adminmenu[$i]["title"] = _MI_TXMLINKS_ADMENU7; +$adminmenu[$i]['link'] = 'admin/about.php'; +$adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; +unset( $i ); +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/modifies.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/modifies.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/modifies.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,193 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 modifies.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include_once 'admin_header.php'; +//It recovered the value of argument op in URL$ +$op = txmlinks_CleanVars($_REQUEST, 'op', 'list', 'string'); +echo $adminMenu->addNavigation('modifies.php'); +switch ($op) +{ + case 'list': + default: + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_MODIFIES, 'modifies.php?op=new', 'add'); + echo $adminMenu->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort('request_id'); + $criteria->setOrder('ASC'); + $numrows = $modifiesHandler->getCount(); + $modifies_arr = $modifiesHandler->getAll($criteria); + + // Table view + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_REQUEST_CID."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_LID."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_URL."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_DESCRIPTION."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_SUBMITTER."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr>"; + + $class = "odd"; + + foreach (array_keys($modifies_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + $request1 = $categoriesHandler->get($modifies_arr[$i]->getVar('request_cid')); + $request_categories1 = $request1->getVar('request_title'); + echo "<td class='center'>".$request_categories1."</td>"; + + $links =& $linksHandler->get($modifies_arr[$i]->getVar('request_lid')); + $modifies_links = $links->getVar('link_name'); + echo "<td class='center'>".$modifies_links."</td>"; + + $links =& $linksHandler->get($modifies_arr[$i]->getVar('request_lid')); + $modifies_links = $links->getVar('link_title'); + echo "<td class='center'>".$modifies_links."</td>"; + echo "<td class='left'><img src='".TXMLINKS_URL."/images/icons/16/arrow.gif'> ".$modifies_arr[$i]->getVar('request_title')."</td>"; + echo "<td class='center'>".strip_tags($modifies_arr[$i]->getVar('request_url'))."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/txmlinks/images/modifies/".$modifies_arr[$i]->getVar('request_image')."' height='30px' title='request_image' alt='request_image'></td>"; + echo "<td class='center'>".strip_tags($modifies_arr[$i]->getVar('request_description'))."</td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($modifies_arr[$i]->getVar('request_submitter'),"S")."</td>"; + echo "<td class='center'>".( ($modifies_arr[$i]->getVar('request_status') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($modifies_arr[$i]->getVar('request_waiting') == 1 ) ? _YES : _NO)."</td>"; + echo "<td class='center'>".( ($modifies_arr[$i]->getVar('request_online') == 1 ) ? _YES : _NO)."</td>"; + + echo "<td class='center width5'> + <a href='modifies.php?op=edit&request_id=".$i."'><img src=".$pathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='modifies.php?op=delete&request_id=".$i."'><img src=".$pathIcon16."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_TXMLINKS_REQUEST_CID."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_LID."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_TITLE."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_URL."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_IMAGE."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_DESCRIPTION."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_SUBMITTER."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_STATUS."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_WAITING."</th> + <th class='center'>"._AM_TXMLINKS_REQUEST_ONLINE."</th> + <th class='center width5'>"._AM_TXMLINKS_FORMACTION."</th> + </tr><tr><td class='errorMsg' colspan='11'>There are no request</td></tr>"; + echo "</table><br /><br />"; + } + + break; + + case 'new': + $adminMenu->addItemButton(_AM_TXMLINKS_MODIFIES_LIST, 'modifies.php', 'list'); + echo $adminMenu->renderButton(); + + $obj =& $modifiesHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case 'save': + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('modifies.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if (isset($_REQUEST['request_id'])) { + $obj =& $modifiesHandler->get($_REQUEST['request_id']); + } else { + $obj =& $modifiesHandler->create(); + } + + // Form save fields + $obj->setVar('request_cid', $_REQUEST['request_cid']); + $obj->setVar('request_lid', $_REQUEST['request_lid']); + $obj->setVar('request_title', $_REQUEST['request_title']); + $obj->setVar('request_url', $_REQUEST['request_url']); + + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + $uploaddir = XOOPS_UPLOAD_PATH.'/txmlinks/images/modifies/'; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix('request_image_'); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header('javascript:history.go(-1)', 3, $errors); + } else { + $obj->setVar('request_image', $uploader->getSavedFileName()); + } + } else { + $obj->setVar('request_image', $_REQUEST['request_image']); + } + + $obj->setVar('request_description', $_REQUEST['request_description']); + $obj->setVar('request_submitter', $_REQUEST['request_submitter']); + $obj->setVar('request_status', (($_REQUEST['request_status'] == 1) ? '1' : '0')); + $obj->setVar('request_waiting', (($_REQUEST['request_waiting'] == 1) ? '1' : '0')); + $obj->setVar('request_online', (($_REQUEST['request_online'] == 1) ? '1' : '0')); + + if ($modifiesHandler->insert($obj)) { + redirect_header('modifies.php?op=list', 2, _AM_TXMLINKS_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case 'edit': + $adminMenu->addItemButton(_AM_TXMLINKS_ADD_MODIFIES, 'modifies.php?op=new', 'add'); + $adminMenu->addItemButton(_AM_TXMLINKS_MODIFIES_LIST, 'modifies.php', 'list'); + echo $adminMenu->renderButton(); + $obj = $modifiesHandler->get($_REQUEST['request_id']); + $form = $obj->getForm(); + $form->display(); + break; + + case 'delete': + $obj =& $modifiesHandler->get($_REQUEST['request_id']); + if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { + if ( !$GLOBALS['xoopsSecurity']->check() ) { + redirect_header('modifies.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($modifiesHandler->delete($obj)) { + redirect_header('modifies.php', 3, _AM_TXMLINKS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array('ok' => 1, 'request_id' => $_REQUEST['request_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TXMLINKS_FORMSUREDEL, $obj->getVar('request_id'))); + } + break; +} +include_once 'admin_footer.php'; +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/permissions.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/permissions.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/permissions.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,87 @@ +<?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. +*/ +/** + * txmLinks module for xoops + * + * @copyright The TXMod XOOPS Project http://sourceforge.net/projects/thmod/ + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GPL 2.0 or later + * @package txmLinks + * @since 2.5.x + * @author TXMod Xoops <su...@tx...> - <http://www.txmodxoops.org> + * @version $Id: 1.0 permissions.php 11341 Wed 2013/04/03 19:32:01Z Timgno $ + */ + +include 'admin_header.php'; +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; +if( !empty($_POST['submit']) ) +{ + redirect_header( XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/admin/permissions.php' , 1 , _MP_GPERMUPDATED ); +} +echo $adminMenu->addNavigation('permissions.php'); + +$permission = txmlinks_CleanVars($_POST, 'permission', 1, 'int'); +$selected=array('','',''); +$selected[$permission-1]=' selected'; + +echo " +<form method='post' name='fselperm' action='permissions.php'> + <table border=0> + <tr> + <td> + <select name='permission' onChange='javascript: document.fselperm.submit()'> + <option value='1'".$selected[0].">"._AM_TXMLINKS_PERMISSIONS_ACCESS."</option> + <option value='2'".$selected[1].">"._AM_TXMLINKS_PERMISSIONS_SUBMIT."</option> + <option value='3'".$selected[2].">"._AM_TXMLINKS_PERMISSIONS_VIEW."</option> + </select> + </td> + </tr> + </table> +</form>"; + +$module_id = $xoopsModule->getVar('mid'); + + switch($permission) + { + case 1: + $formTitle = _AM_TXMLINKS_PERMISSIONS_ACCESS; + $permName = 'txmlinks_access'; + $permDesc = ''; + break; + case 2: + $formTitle = _AM_TXMLINKS_PERMISSIONS_SUBMIT; + $permName = 'txmlinks_submit'; + $permDesc = ''; + break; + case 3: + $formTitle = _AM_TXMLINKS_PERMISSIONS_VIEW; + $permName = 'txmlinks_view'; + $permDesc = ''; + break; + } + + $permform = new XoopsGroupPermForm($formTitle, $module_id, $permName, $permDesc, 'admin/permissions.php'); + $categories_Handler=& xoops_getModuleHandler('txmlinks_categories', 'txmlinks' ); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_title'); + $criteria->setOrder('ASC'); + $categories_arr = $categories_Handler->getObjects($criteria); + + foreach (array_keys($categories_arr) as $i) + { + $permform->addItem($categories_arr[$i]->getVar('cat_id'), $categories_arr[$i]->getVar('cat_title')); + } + echo $permform->render(); + echo "<br /><br /><br /><br />\n"; + unset ($permform); + +include('admin_footer.php'); +?> \ No newline at end of file Added: XoopsModules/txmlinks/releases/1.0/txmlinks/admin/ratings.php =================================================================== --- XoopsModules/txmlinks/releases/1.0/txmlinks/admin/ratings.php (rev 0) +++ XoopsModules/txmlinks/releases/1.0/txmlinks/admin/ratings.php 2013-04-03 19:55:30 UTC (rev 11342) @@ -0,0 +1,166 @@ +<?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 + w... [truncated message content] |