[Phpbbkb-checkins] SF.net SVN: phpbbkb: [5] phpBB2/root
Status: Alpha
Brought to you by:
markthedaemon
From: <mar...@us...> - 2006-07-26 21:47:22
|
Revision: 5 Author: markthedaemon Date: 2006-07-26 08:51:44 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpbbkb/?rev=5&view=rev Log Message: ----------- Some of the very first code commits. Please note that a lot of this is subject to change ;) Added Paths: ----------- phpBB2/root/includes/ phpBB2/root/includes/kb_addarticle.php phpBB2/root/includes/kb_viewcategories.php phpBB2/root/kb.php Added: phpBB2/root/includes/kb_addarticle.php =================================================================== --- phpBB2/root/includes/kb_addarticle.php (rev 0) +++ phpBB2/root/includes/kb_addarticle.php 2006-07-26 15:51:44 UTC (rev 5) @@ -0,0 +1,12 @@ +<?php +/** +* +* @package: kb +* @version: $Id: index.php,v 1.1.1.1 2006/02/24 02:28:06 markthedaemon Exp $ +* @copyright: (c) 2006 phpBB Knowledge Base +* @license: http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + + +?> \ No newline at end of file Added: phpBB2/root/includes/kb_viewcategories.php =================================================================== --- phpBB2/root/includes/kb_viewcategories.php (rev 0) +++ phpBB2/root/includes/kb_viewcategories.php 2006-07-26 15:51:44 UTC (rev 5) @@ -0,0 +1,25 @@ +<?php +/** +* +* @package: kb +* @version: $Id: index.php,v 1.1.1.1 2006/02/24 02:28:06 markthedaemon Exp $ +* @copyright: (c) 2006 phpBB Knowledge Base +* @license: http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +if ( !defined('IN_PHPBB') ) +{ + die("Hacking attempt"); + exit; +} + +$sql = 'SELECT kb_category_name, kb_category_id, kb_category_desc + FROM ' . KB_CATEGORY_TABLE; + +if( !($result = $db->sql_query($sql)) ) +{ + message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql); +} + +?> \ No newline at end of file Added: phpBB2/root/kb.php =================================================================== --- phpBB2/root/kb.php (rev 0) +++ phpBB2/root/kb.php 2006-07-26 15:51:44 UTC (rev 5) @@ -0,0 +1,44 @@ +<?php +/** +* +* @package: kb +* @version: $Id: index.php,v 1.1.1.1 2006/02/24 02:28:06 markthedaemon Exp $ +* @copyright: (c) 2006 phpBB Knowledge Base +* @license: http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +define('IN_PHPBB', true); +$phpbb_root_path = './'; +include($phpbb_root_path . 'extension.inc'); +include($phpbb_root_path . 'common.'.$phpEx); + +// +// Start session management +// +$userdata = session_pagestart($user_ip, PAGE_KB); +init_userprefs($userdata); +// +// End session management +// +if( isset($HTTP_GET_VARS['mode']) ) +{ + switch( $HTTP_GET_VARS['mode'] ) + { + case 'add': + include($phpbb_root_path . 'includes/kb_addarticle.'.$phpEx); + exit; + default: + include($phpbb_root_path . 'includes/kb_viewcategories.'.$phpEx); + exit; + } +} +else +{ + include($phpbb_root_path . 'includes/kb_viewcategories.'.$phpEx); + exit; +} + +redirect(append_sid("index.$phpEx", true)); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |