From: <txm...@us...> - 2012-01-31 19:29:35
|
Revision: 8853 http://xoops.svn.sourceforge.net/xoops/?rev=8853&view=rev Author: txmodxoops Date: 2012-01-31 19:29:25 +0000 (Tue, 31 Jan 2012) Log Message: ----------- Alpha 1 Recreated from zero with TDMCreate module Added Paths: ----------- XoopsModules/AMS - Article Management System/branches/timgno/ams/ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/about.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_footer.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_header.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/article.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/audience.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/files.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/link.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/menu.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/permissions.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/rating.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/setting.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/spotlight.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/text.php XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/topics.php XoopsModules/AMS - Article Management System/branches/timgno/ams/article.php XoopsModules/AMS - Article Management System/branches/timgno/ams/audience.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/ XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_article.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_audience.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_files.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_link.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_rating.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_setting.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_spotlight.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_text.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/blocks_topics.php XoopsModules/AMS - Article Management System/branches/timgno/ams/blocks/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_article.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_audience.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_files.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_link.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_rating.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_setting.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_spotlight.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_text.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/ams_topics.php XoopsModules/AMS - Article Management System/branches/timgno/ams/class/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/css/ XoopsModules/AMS - Article Management System/branches/timgno/ams/css/admin.css XoopsModules/AMS - Article Management System/branches/timgno/ams/css/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/css/style.css XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/ XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/changelog.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/credits.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/install.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/lang_diff.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/licence.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/docs/readme.txt XoopsModules/AMS - Article Management System/branches/timgno/ams/files.php XoopsModules/AMS - Article Management System/branches/timgno/ams/header.php XoopsModules/AMS - Article Management System/branches/timgno/ams/images/ XoopsModules/AMS - Article Management System/branches/timgno/ams/images/ams_slogo.png XoopsModules/AMS - Article Management System/branches/timgno/ams/images/icons/ XoopsModules/AMS - Article Management System/branches/timgno/ams/images/icons/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/images/icons/off.png XoopsModules/AMS - Article Management System/branches/timgno/ams/images/icons/on.png XoopsModules/AMS - Article Management System/branches/timgno/ams/images/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/images/menu/ XoopsModules/AMS - Article Management System/branches/timgno/ams/images/menu/bg.png XoopsModules/AMS - Article Management System/branches/timgno/ams/images/menu/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/images/menu/left_both.png XoopsModules/AMS - Article Management System/branches/timgno/ams/images/menu/right_both.png XoopsModules/AMS - Article Management System/branches/timgno/ams/include/ XoopsModules/AMS - Article Management System/branches/timgno/ams/include/configs.php XoopsModules/AMS - Article Management System/branches/timgno/ams/include/functions.php XoopsModules/AMS - Article Management System/branches/timgno/ams/include/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/include/install.php XoopsModules/AMS - Article Management System/branches/timgno/ams/index.php XoopsModules/AMS - Article Management System/branches/timgno/ams/language/ XoopsModules/AMS - Article Management System/branches/timgno/ams/language/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/ XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/admin.php XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/blocks.php XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/help/ XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/help/help.html XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/help/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/main.php XoopsModules/AMS - Article Management System/branches/timgno/ams/language/italian/modinfo.php XoopsModules/AMS - Article Management System/branches/timgno/ams/link.php XoopsModules/AMS - Article Management System/branches/timgno/ams/rating.php XoopsModules/AMS - Article Management System/branches/timgno/ams/setting.php XoopsModules/AMS - Article Management System/branches/timgno/ams/spotlight.php XoopsModules/AMS - Article Management System/branches/timgno/ams/sql/ XoopsModules/AMS - Article Management System/branches/timgno/ams/sql/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/sql/mysql.sql XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/admin/ XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/admin/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_article.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_audience.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_files.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_footer.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_header.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_link.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_rating.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_setting.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_spotlight.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_text.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/ams_topics.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_article_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_article_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_article_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_audience_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_audience_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_audience_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_files_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_files_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_files_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_link_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_link_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_link_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_rating_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_rating_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_rating_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_setting_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_setting_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_setting_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_spotlight_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_spotlight_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_spotlight_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_text_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_text_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_text_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_topics_block_day.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_topics_block_random.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/ams_topics_block_recent.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/blocks/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/templates/index.html XoopsModules/AMS - Article Management System/branches/timgno/ams/text.php XoopsModules/AMS - Article Management System/branches/timgno/ams/topics.php XoopsModules/AMS - Article Management System/branches/timgno/ams/xoops_version.php Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/about.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/about.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/about.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,43 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +$aboutAdmin = new ModuleAdmin(); +echo $aboutAdmin->addNavigation("about.php"); +echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); +include "admin_footer.php"; \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_footer.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_footer.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_footer.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,41 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +global $pathImageAdmin; +echo "<div align=\"center\"><a href=\"http://www.xoops.org\" target=\"_blank\"><img src='" . $pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center smallsmall italic pad5'><strong>" . $xoopsModule->getVar("name") . "</strong> "._AM_AMS_MAINTAINEDBY." <a class='tooltip' rel='external' href='http://www.xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"; + xoops_cp_footer(); Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_header.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_header.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/admin_header.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,107 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/mainfile.php"; +include_once XOOPS_ROOT_PATH."/include/cp_functions.php"; +include_once(XOOPS_ROOT_PATH."/class/xoopsmodule.php"); +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +include_once XOOPS_ROOT_PATH."/class/tree.php"; +include_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +include_once XOOPS_ROOT_PATH."/class/pagenav.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsform/grouppermform.php"; +include_once "../include/functions.php"; + +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globlang = $GLOBALS['xoopsConfig']['language']; + +if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ + include_once $pathDir.'/language/'.$globlang.'/main.php'; + }else{ + include_once $pathDir.'/language/english/main.php'; + } + +if ( file_exists($pathDir.'/moduleadmin.php')){ + include_once $pathDir.'/moduleadmin.php'; + //return true; + }else{ + xoops_cp_header(); + echo xoops_error(_AM_AMS_MODULEADMIN_MISSING); + xoops_cp_footer(); + //return false; + } +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); +$articleHandler=& xoops_getModuleHandler('ams_article', $dirname ); +$filesHandler=& xoops_getModuleHandler('ams_files', $dirname ); +$textHandler=& xoops_getModuleHandler('ams_text', $dirname ); +$topicsHandler=& xoops_getModuleHandler('ams_topics', $dirname ); +$linkHandler=& xoops_getModuleHandler('ams_link', $dirname ); +$ratingHandler=& xoops_getModuleHandler('ams_rating', $dirname ); +$audienceHandler=& xoops_getModuleHandler('ams_audience', $dirname ); +$spotlightHandler=& xoops_getModuleHandler('ams_spotlight', $dirname ); +$settingHandler=& xoops_getModuleHandler('ams_setting', $dirname ); + +$myts =& MyTextSanitizer::getInstance(); + +if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); +} + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); + +$style_admin = "../css/admin.css"; + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/article.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/article.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/article.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,245 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = ams_CleanVars($_REQUEST, 'op', 'list_article', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$article_waiting = $articleHandler->getCount($criteria); +$status_menu = ams_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_article": + $article_admin = new ModuleAdmin(); + echo $article_admin->addNavigation('article.php'); + if ($status_menu == 1){ + $article_admin->addItemButton(_AM_AMS_ARTICLENEW, 'article.php?op=new_article', 'add'); + }else{ + $article_admin->addItemButton(_AM_AMS_ARTICLE_LIST, 'article.php?op=list_article', 'list'); + $article_admin->addItemButton(_AM_AMS_ARTICLENEW, 'article.php?op=new_article', 'add'); + } + echo $article_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("article_storyid"); + $criteria->setOrder("ASC"); + $numrows = $articleHandler->getCount(); + $article_arr = $articleHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_AMS_ARTICLE_TITLE."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_CREATED."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_PUBLISHED."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_EXPIRED."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_HOSTNAME."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_NOHTML."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_NOSMILEY."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_COUNTER."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_TOPICID."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_IHOME."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_NOTIFYPUB."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_STORY_TYPE."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_TOPICDISPLAY."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_TOPICALIGN."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_COMMENTS."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_RATING."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_BANNER."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_AUDIENCEID."</th> + <th align=\"center\">"._AM_AMS_ARTICLE_ONLINE."</th> + <th align=\"center\" width=\"10%\">"._AM_AMS_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($article_arr) as $i) + { + if ( $article_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$article_arr[$i]->getVar("article_title")."</td>"; + echo "<td align='center'>".formatTimeStamp($article_arr[$i]->getVar("article_created"),"S")."</td>"; + echo "<td align='center'>".formatTimeStamp($article_arr[$i]->getVar("article_published"),"S")."</td>"; + echo "<td align='center'>".formatTimeStamp($article_arr[$i]->getVar("article_expired"),"S")."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_hostname")."</td>"; + + $verif_article_nohtml = ( $article_arr[$i]->getVar("article_nohtml") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_nohtml."</td>"; + + $verif_article_nosmiley = ( $article_arr[$i]->getVar("article_nosmiley") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_nosmiley."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_counter")."</td>"; + + $verif_article_ihome = ( $article_arr[$i]->getVar("article_ihome") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_ihome."</td>"; + + $verif_article_notifypub = ( $article_arr[$i]->getVar("article_notifypub") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_notifypub."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_story_type")."</td>"; + + $verif_article_topicdisplay = ( $article_arr[$i]->getVar("article_topicdisplay") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_topicdisplay."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_topicalign")."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_comments")."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_rating")."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_banner")."</td>"; + echo "<td align='center'>".$article_arr[$i]->getVar("article_audienceid")."</td>"; + + $verif_article_online = ( $article_arr[$i]->getVar("article_online") == 1 ) ? _YES : _NO; + echo "<td align='center'>".$verif_article_online."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"article.php?op=edit_article&article_storyid=".$article_arr[$i]->getVar("article_storyid")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"article.php?op=delete_article&article_storyid=".$article_arr[$i]->getVar("article_storyid")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $articleHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_article": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("article.php"); + $member_admin->addItemButton(_AM_AMS_ARTICLE_LIST, 'article.php?op=list_article', 'list'); + echo $member_admin->renderButton(); + + $obj =& $articleHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_article": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("article.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["article_storyid"])) { + $obj =& $articleHandler->get($_REQUEST["article_storyid"]); + } else { + $obj =& $articleHandler->create(); + } + //Form article_title + $obj->setVar("article_title", $_REQUEST["article_title"]); + //Form article_created + $obj->setVar("article_created", ams_convertDate($_REQUEST["article_created"])); + //Form article_published + $obj->setVar("article_published", ams_convertDate($_REQUEST["article_published"])); + //Form article_expired + $obj->setVar("article_expired", ams_convertDate($_REQUEST["article_expired"])); + //Form article_hostname + $obj->setVar("article_hostname", $_REQUEST["article_hostname"]); + //Form article_nohtml + $verif_article_nohtml = ($_REQUEST["article_nohtml"] == 1) ? "1" : "0"; + $obj->setVar("article_nohtml", $verif_article_nohtml); + //Form article_nosmiley + $verif_article_nosmiley = ($_REQUEST["article_nosmiley"] == 1) ? "1" : "0"; + $obj->setVar("article_nosmiley", $verif_article_nosmiley); + //Form article_counter + $obj->setVar("article_counter", $_REQUEST["article_counter"]); + //Form article_topicid + $obj->setVar("article_topicid", $_REQUEST["article_topicid"]); + //Form article_ihome + $verif_article_ihome = ($_REQUEST["article_ihome"] == 1) ? "1" : "0"; + $obj->setVar("article_ihome", $verif_article_ihome); + //Form article_notifypub + $verif_article_notifypub = ($_REQUEST["article_notifypub"] == 1) ? "1" : "0"; + $obj->setVar("article_notifypub", $verif_article_notifypub); + //Form article_story_type + $obj->setVar("article_story_type", $_REQUEST["article_story_type"]); + //Form article_topicdisplay + $verif_article_topicdisplay = ($_REQUEST["article_topicdisplay"] == 1) ? "1" : "0"; + $obj->setVar("article_topicdisplay", $verif_article_topicdisplay); + //Form article_topicalign + $obj->setVar("article_topicalign", $_REQUEST["article_topicalign"]); + //Form article_comments + $obj->setVar("article_comments", $_REQUEST["article_comments"]); + //Form article_rating + $obj->setVar("article_rating", $_REQUEST["article_rating"]); + //Form article_banner + $obj->setVar("article_banner", $_REQUEST["article_banner"]); + //Form article_audienceid + $obj->setVar("article_audienceid", $_REQUEST["article_audienceid"]); + //Form article_online + $verif_article_online = ($_REQUEST["article_online"] == 1) ? "1" : "0"; + $obj->setVar("article_online", $verif_article_online); + + + if ($articleHandler->insert($obj)) { + redirect_header("article.php?op=list_article", 2, _AM_AMS_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_article": + $obj = $articleHandler->get($_REQUEST["article_storyid"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_article": + $obj =& $articleHandler->get($_REQUEST["article_storyid"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("article.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($articleHandler->delete($obj)) { + redirect_header("article.php", 3, _AM_AMS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "article_storyid" => $_REQUEST["article_storyid"], "op" => "delete_article"), $_SERVER["REQUEST_URI"], sprintf(_AM_AMS_FORMSUREDEL, $obj->getVar("article"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/audience.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/audience.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/audience.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,156 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = ams_CleanVars($_REQUEST, 'op', 'list_audience', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$audience_waiting = $audienceHandler->getCount($criteria); +$status_menu = ams_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_audience": + $audience_admin = new ModuleAdmin(); + echo $audience_admin->addNavigation('audience.php'); + if ($status_menu == 1){ + $audience_admin->addItemButton(_AM_AMS_AUDIENCENEW, 'audience.php?op=new_audience', 'add'); + }else{ + $audience_admin->addItemButton(_AM_AMS_AUDIENCE_LIST, 'audience.php?op=list_audience', 'list'); + $audience_admin->addItemButton(_AM_AMS_AUDIENCENEW, 'audience.php?op=new_audience', 'add'); + } + echo $audience_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("audience_id"); + $criteria->setOrder("ASC"); + $numrows = $audienceHandler->getCount(); + $audience_arr = $audienceHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_AMS_AUDIENCE_AUDIENCE."</th> + <th align=\"center\" width=\"10%\">"._AM_AMS_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($audience_arr) as $i) + { + if ( $audience_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$audience_arr[$i]->getVar("audience_audience")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"audience.php?op=edit_audience&audience_id=".$audience_arr[$i]->getVar("audience_id")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"audience.php?op=delete_audience&audience_id=".$audience_arr[$i]->getVar("audience_id")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $audienceHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_audience": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("audience.php"); + $member_admin->addItemButton(_AM_AMS_AUDIENCE_LIST, 'audience.php?op=list_audience', 'list'); + echo $member_admin->renderButton(); + + $obj =& $audienceHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_audience": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("audience.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["audience_id"])) { + $obj =& $audienceHandler->get($_REQUEST["audience_id"]); + } else { + $obj =& $audienceHandler->create(); + } + //Form audience_audience + $obj->setVar("audience_audience", $_REQUEST["audience_audience"]); + + + if ($audienceHandler->insert($obj)) { + redirect_header("audience.php?op=list_audience", 2, _AM_AMS_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_audience": + $obj = $audienceHandler->get($_REQUEST["audience_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_audience": + $obj =& $audienceHandler->get($_REQUEST["audience_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("audience.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($audienceHandler->delete($obj)) { + redirect_header("audience.php", 3, _AM_AMS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "audience_id" => $_REQUEST["audience_id"], "op" => "delete_audience"), $_SERVER["REQUEST_URI"], sprintf(_AM_AMS_FORMSUREDEL, $obj->getVar("audience"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/files.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/files.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/files.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,175 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = ams_CleanVars($_REQUEST, 'op', 'list_files', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$files_waiting = $filesHandler->getCount($criteria); +$status_menu = ams_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_files": + $files_admin = new ModuleAdmin(); + echo $files_admin->addNavigation('files.php'); + if ($status_menu == 1){ + $files_admin->addItemButton(_AM_AMS_FILESNEW, 'files.php?op=new_files', 'add'); + }else{ + $files_admin->addItemButton(_AM_AMS_FILES_LIST, 'files.php?op=list_files', 'list'); + $files_admin->addItemButton(_AM_AMS_FILESNEW, 'files.php?op=new_files', 'add'); + } + echo $files_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("files_id"); + $criteria->setOrder("ASC"); + $numrows = $filesHandler->getCount(); + $files_arr = $filesHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_AMS_FILES_REALNAME."</th> + <th align=\"center\">"._AM_AMS_FILES_STORYID."</th> + <th align=\"center\">"._AM_AMS_FILES_DATE."</th> + <th align=\"center\">"._AM_AMS_FILES_MIMETYPE."</th> + <th align=\"center\">"._AM_AMS_FILES_DOWNLOADNAME."</th> + <th align=\"center\">"._AM_AMS_FILES_COUNTER."</th> + <th align=\"center\" width=\"10%\">"._AM_AMS_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($files_arr) as $i) + { + if ( $files_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$files_arr[$i]->getVar("files_realname")."</td>"; + echo "<td align='center'>".formatTimeStamp($files_arr[$i]->getVar("files_date"),"S")."</td>"; + echo "<td align='center'>".$files_arr[$i]->getVar("files_mimetype")."</td>"; + echo "<td align='center'>".$files_arr[$i]->getVar("files_downloadname")."</td>"; + echo "<td align='center'>".$files_arr[$i]->getVar("files_counter")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"files.php?op=edit_files&files_id=".$files_arr[$i]->getVar("files_id")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"files.php?op=delete_files&files_id=".$files_arr[$i]->getVar("files_id")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $filesHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_files": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("files.php"); + $member_admin->addItemButton(_AM_AMS_FILES_LIST, 'files.php?op=list_files', 'list'); + echo $member_admin->renderButton(); + + $obj =& $filesHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_files": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("files.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["files_id"])) { + $obj =& $filesHandler->get($_REQUEST["files_id"]); + } else { + $obj =& $filesHandler->create(); + } + //Form files_realname + $obj->setVar("files_realname", $_REQUEST["files_realname"]); + //Form files_storyid + $obj->setVar("files_storyid", $_REQUEST["files_storyid"]); + //Form files_date + $obj->setVar("files_date", ams_convertDate($_REQUEST["files_date"])); + //Form files_mimetype + $obj->setVar("files_mimetype", $_REQUEST["files_mimetype"]); + //Form files_downloadname + $obj->setVar("files_downloadname", $_REQUEST["files_downloadname"]); + //Form files_counter + $obj->setVar("files_counter", $_REQUEST["files_counter"]); + + + if ($filesHandler->insert($obj)) { + redirect_header("files.php?op=list_files", 2, _AM_AMS_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + break; + + case "edit_files": + $obj = $filesHandler->get($_REQUEST["files_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_files": + $obj =& $filesHandler->get($_REQUEST["files_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("files.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($filesHandler->delete($obj)) { + redirect_header("files.php", 3, _AM_AMS_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "files_id" => $_REQUEST["files_id"], "op" => "delete_files"), $_SERVER["REQUEST_URI"], sprintf(_AM_AMS_FORMSUREDEL, $obj->getVar("files"))); + } + break; + +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.html =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.html (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.html 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/index.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,72 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + //account "total" + $count_article = $articleHandler->getCount(); + //account "total" + $count_files = $filesHandler->getCount(); + //account "total" + $count_text = $textHandler->getCount(); + //account "total" + $count_topics = $topicsHandler->getCount(); + //account "total" + $count_link = $linkHandler->getCount(); + //account "total" + $count_rating = $ratingHandler->getCount(); + //account "total" + $count_audience = $audienceHandler->getCount(); + //account "total" + $count_spotlight = $spotlightHandler->getCount(); + //account "total" + $count_setting = $settingHandler->getCount(); + $indexAdmin->addInfoBox(_MI_AMS_STATISTICS); + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_ARTICLE, $count_article) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_FILES, $count_files) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_TEXT, $count_text) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_TOPICS, $count_topics) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_LINK, $count_link) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_RATING, $count_rating) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_AUDIENCE, $count_audience) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_SPOTLIGHT, $count_spotlight) ; + $indexAdmin->addInfoBoxLine(_MI_AMS_STATISTICS,_AM_AMS_THEREARE_SETTING, $count_setting) ; + echo $indexAdmin->addNavigation("index.php"); + echo $indexAdmin->renderIndex(); +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/link.php =================================================================== --- XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/link.php (rev 0) +++ XoopsModules/AMS - Article Management System/branches/timgno/ams/admin/link.php 2012-01-31 19:29:25 UTC (rev 8853) @@ -0,0 +1,175 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * - Revision By TXMod Xoops (http://www.txmodxoops.org) + * **************************************************************************** + * AMS - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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. See the + * GNU General Public License for more details. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package ams + * @author TXMod Xoops (in...@tx...) + * + * Version : 3.01 Sat 2012/01/14 6:36:53 : Timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; + +//It retrieves the value of the argument in op URL$ +$op = ams_CleanVars($_REQUEST, 'op', 'list_link', 'string'); +// counts the number of uncommitted gets +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('status', 0)); +$link_waiting = $linkHandler->getCount($criteria); +$status_menu = ams_CleanVars($_REQUEST, 'status_display', 1, 'int'); + +switch ($op) { +default: + case "list_link": + $link_admin = new ModuleAdmin(); + echo $link_admin->addNavigation('link.php'); + if ($status_menu == 1){ + $link_admin->addItemButton(_AM_AMS_LINKNEW, 'link.php?op=new_link', 'add'); + }else{ + $link_admin->addItemButton(_AM_AMS_LINK_LIST, 'link.php?op=list_link', 'list'); + $link_admin->addItemButton(_AM_AMS_LINKNEW, 'link.php?op=new_link', 'add'); + } + echo $link_admin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("link_id"); + $criteria->setOrder("ASC"); + $numrows = $linkHandler->getCount(); + $link_arr = $linkHandler->getall($criteria); + + //Table view + if ($numrows>0) + { + echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> + <tr> + <th align=\"center\">"._AM_AMS_LINK_STORYID."</th> + <th align=\"center\">"._AM_AMS_LINK_MODULE."</th> + <th align=\"center\">"._AM_AMS_LINK_LINK."</th> + <th align=\"center\">"._AM_AMS_LINK_TITLE."</th> + <th align=\"center\">"._AM_AMS_LINK_COUNTER."</th> + <th align=\"center\">"._AM_AMS_LINK_POSITION."</th> + <th align=\"center\" width=\"10%\">"._AM_AMS_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($link_arr) as $i) + { + if ( $link_arr[$i]->getVar("topic_pid") == 0) + { + echo "<tr class=\"".$class."\">"; + $class = ($class == "even") ? "odd" : "even";echo "<td align='center'>".$link_arr[$i]->getVar("link_module")."</td>"; + echo "<td align='center'>".$link_arr[$i]->getVar("link_link")."</td>"; + echo "<td align='center'>".$link_arr[$i]->getVar("link_title")."</td>"; + echo "<td align='center'>".$link_arr[$i]->getVar("link_counter")."</td>"; + echo "<td align='center'>".$link_arr[$i]->getVar("link_position")."</td>"; + + echo "<td align=\"center\" width=\"10%\"> + <a href=\"link.php?op=edit_link&link_id=".$link_arr[$i]->getVar("link_id")."\"><img src=".$pathImageIcon."/edit.png alt=\""._EDIT."\" title=\""._EDIT."\"></a> + <a href=\"link.php?op=delete_link&link_id=".$link_arr[$i]->getVar("link_id")."\"><img src=".$pathImageIcon."/delete.png alt=\""._DELETE."\" title=\""._DELETE."\"></a> + </td>"; + echo "</tr>"; + } + } + echo "</table><br><br>"; + } + + // Form display + //$obj =& $linkHandler->create(); + //$form = $obj->getForm(); + //$form->display(); + break; + + case "new_link": + $member_admin = new ModuleAdmin(); + echo $member_admin->addNavigation("link.php"); + $member_admin->addItemButton(_AM_AMS_LINK_LIST, 'link.php?op=list_link', 'list'); + echo $member_admin->renderButton(); + + $obj =& $linkHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_link": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("link.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["link_id"])) { + $obj =& $linkHandler->get($_REQUEST["link_id"]); + } else { + $obj =& $linkHandler->create(); + } + //Form link_storyid + $obj->setVar("link_storyid", $_REQUEST["link_storyid"]); + //Form link_module + $obj->setVar("link_module", $_REQUEST["link_module"]); + //Form link_link + $obj->setVar("link_link", $_REQUEST["link_link"]); + //Form link_title + $obj->setVar("link_title", $_REQUEST["link_title"]); + //Form link_counter + $obj->setVar("link_counter", $_REQUEST["link_counter"]); + //Form link_position + $obj->setVar("link_position", $_REQUEST["link_position"]); + + + if ($linkHandler->insert($obj)) { + redirect_header("link.php?op=list_link", 2, _AM_AMS_FORMOK); + } + //include_once("../include/forms.php"); + echo $obj->getHtmlErrors... [truncated message content] |