|
From: Eloi G. <ada...@us...> - 2008-08-21 20:17:43
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2278 Modified Files: index_admin.php index.php Added Files: .project Log Message: Article Manager 4.1.0 --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>Article manager</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.wst.validation.validationbuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.php.core.PHPNature</nature> </natures> </projectDescription> Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** index_admin.php 26 Oct 2007 07:25:38 -0000 1.17 --- index_admin.php 21 Aug 2008 20:17:21 -0000 1.18 *************** *** 1,724 **** ! <?php ! /** ! * This is the index admin-only file for the article module. ! * ! * @version $Id$ ! * ! * @author Eloi George <el...@NO...> ! * @module Article Manager ! */ ! if (!defined('PHPWS_SOURCE_DIR') || !Current_User::allow('article')) { [...1421 lines suppressed...] ! if($status['isDraft']) { ! $title = dgettext('article', 'Editing Rough Draft'); ! $message = dgettext('article', 'This is a rough draft of changes to this article.'); ! } ! /* otherwise its waiting for approval */ ! else { ! $title = dgettext('article', 'Editing Unapproved Article Version'); ! $message = dgettext('article', 'This is a newer version of this article that is awaiting approval.'); ! } ! $message .= "<br />\n". dgettext('article', "If you want to see the changes between this one and the one being displayed, select 'Version History'."); ! /* Reviewer Notes */ ! if (!empty($status['msg'])) ! $message .= "<br /><br />\n". dgettext('article', 'The following Reviewer\'s note is attatched to this version:') ! . '<br />' . PHPWS_Text::parseOutput($status['msg']); ! return $article; ! } ! ! ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** index.php 19 Sep 2007 04:50:37 -0000 1.22 --- index.php 21 Aug 2008 20:17:21 -0000 1.23 *************** *** 1,82 **** ! <?php ! /** ! * This is the index file for the article module. ! * ! * @version $Id$ ! * ! * @author Eloi George <el...@NO...> ! * @module Article Manager ! */ ! if (!defined('PHPWS_SOURCE_DIR')) { ! include '../../config/core/404.html'; ! exit(); ! } ! ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_ModSettings::init(); ! ! /* Process any form button submissions */ ! /* Button format is ARTICLE_vars[tab:command<::key:value><::key:value>...] */ ! if (isset($_REQUEST['ARTICLE_vars'])) ! { ! $key = array_keys($_REQUEST['ARTICLE_vars']); ! $arr = explode('::', $key[0]); ! foreach($arr AS $value) { ! $req = explode(':', $value); ! $_REQUEST[$req[0]] = $req[1]; ! } ! unset($_REQUEST['ARTICLE_vars']); ! } ! ! /* Determine the command to be executed */ ! if (isset($_REQUEST['xmlrpc'])) ! { ! require_once(PHPWS_SOURCE_DIR.'mod/article/inc/xmlrpc.php'); ! } ! ! if (!isset($_REQUEST['op'])) ! { ! if (is_numeric($_REQUEST['id'])) { ! $temp = new PHPWS_Article((int) $_REQUEST['id']); ! Layout::add($temp->view_full()); ! /* Increment the articleview counter */ ! $temp->increment_counter((int) $_REQUEST['id']); ! unset($temp); ! } ! elseif ($_REQUEST['id']=='news' || $_REQUEST['id']=='archives') { ! PHPWS_Core::initModClass('article', 'AM_Lists.php'); ! Layout::add(PHPWS_AM_Lists::list_summaries()); ! } ! return; ! } ! elseif ($_REQUEST['op']=='email') ! { ! $temp = new PHPWS_Article($_REQUEST['id']); ! $temp->mail(); ! unset($temp); ! return; ! } ! elseif ($_REQUEST['op']=='print') ! { ! $temp = new PHPWS_Article((int) $_REQUEST['id']); ! Layout::add($temp->view_full()); ! /* Increment the articleview counter */ ! $temp->increment_counter((int) $_REQUEST['id']); ! $GLOBALS['Layout'] = array('layout' => $GLOBALS['Layout']['layout']); ! unset($GLOBALS['Layout_Plugs']); ! exit(Layout::display()); ! } ! ! /* The rest of this module's functions are off-limits to non-users */ ! elseif (!Current_User::allow('article')) ! { ! $template['TITLE'] = 'Article Manager'; ! $template['CONTENT'] = dgettext('article', 'Members get to do fun stuff! Login or Register today!') . '<br />'; ! $finalContent = PHPWS_Template::process($template, 'layout', 'box.tpl'); ! Layout::add($finalContent); ! return; } ! else ! include(PHPWS_SOURCE_DIR . 'mod/article/index_admin.php'); ! ?> \ No newline at end of file --- 1,88 ---- ! <?php ! /** ! * This is the index file for the article module. ! * ! * @version $Id$ ! * ! * @author Eloi George <el...@NO...> ! * @module Article Manager ! */ ! if (!defined('PHPWS_SOURCE_DIR')) { ! include '../../config/core/404.html'; ! exit(); ! } ! ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_ModSettings::init(); ! ! /* Process any mod-rewrite submissions */ ! if (isset($_GET['var1'])) { ! $_REQUEST['id'] = (int)$_GET['var1']; ! if (isset($_GET['var2'])) ! $_REQUEST['page'] = (int)$_GET['var2']; } ! /* Process any form button submissions */ ! /* Button format is ARTICLE_vars[tab:command<::key:value><::key:value>...] */ ! if (isset($_REQUEST['ARTICLE_vars'])) ! { ! $key = array_keys($_REQUEST['ARTICLE_vars']); ! $arr = explode('::', $key[0]); ! foreach($arr AS $value) { ! $req = explode(':', $value); ! $_REQUEST[$req[0]] = $req[1]; ! } ! unset($_REQUEST['ARTICLE_vars']); ! } ! ! /* Determine the command to be executed */ ! if (isset($_REQUEST['xmlrpc'])) ! { ! require_once(PHPWS_SOURCE_DIR.'mod/article/inc/xmlrpc.php'); ! } ! ! if (!isset($_REQUEST['op'])) ! { ! if (is_numeric($_REQUEST['id'])) { ! $temp = new PHPWS_Article((int) $_REQUEST['id']); ! Layout::add($temp->view_full()); ! /* Increment the articleview counter */ ! $temp->increment_counter((int) $_REQUEST['id']); ! unset($temp); ! } ! elseif ($_REQUEST['id']=='news' || $_REQUEST['id']=='archives') { ! PHPWS_Core::initModClass('article', 'AM_Lists.php'); ! Layout::add(PHPWS_AM_Lists::list_summaries()); ! } ! return; ! } ! elseif ($_REQUEST['op']=='email') ! { ! $temp = new PHPWS_Article($_REQUEST['id']); ! $temp->mail(); ! unset($temp); ! return; ! } ! elseif ($_REQUEST['op']=='print') ! { ! $temp = new PHPWS_Article((int) $_REQUEST['id']); ! Layout::add($temp->view_full()); ! /* Increment the articleview counter */ ! $temp->increment_counter((int) $_REQUEST['id']); ! $GLOBALS['Layout'] = array('layout' => $GLOBALS['Layout']['layout']); ! unset($GLOBALS['Layout_Plugs']); ! exit(Layout::display()); ! } ! ! /* The rest of this module's functions are off-limits to non-users */ ! elseif (!Current_User::allow('article')) ! { ! $template['TITLE'] = 'Article Manager'; ! $template['CONTENT'] = dgettext('article', 'Members get to do fun stuff! Login or Register today!') . '<br />'; ! $finalContent = PHPWS_Template::process($template, 'layout', 'box.tpl'); ! Layout::add($finalContent); ! return; ! } ! else ! include(PHPWS_SOURCE_DIR . 'mod/article/index_admin.php'); ! ?> \ No newline at end of file |