phpmp-commits Mailing List for phpMyPublications (Page 22)
Status: Pre-Alpha
Brought to you by:
heimidal
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(69) |
May
(1) |
Jun
|
Jul
(53) |
Aug
(27) |
Sep
|
Oct
|
Nov
(35) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(65) |
Mar
|
Apr
(15) |
May
(40) |
Jun
(72) |
Jul
|
Aug
(2) |
Sep
(95) |
Oct
(37) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brian R. <hei...@us...> - 2002-04-23 08:14:58
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv20908 Modified Files: index.php modules.php Log Message: Changed license; added double-include security. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** index.php 10 Apr 2002 21:22:02 -0000 1.14 --- index.php 23 Apr 2002 08:14:54 -0000 1.15 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** modules.php 11 Apr 2002 06:02:37 -0000 1.5 --- modules.php 23 Apr 2002 08:14:54 -0000 1.6 *************** *** 23,27 **** ******************************************************************************* ! This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the --- 23,27 ---- ******************************************************************************* ! This software is provided under the GPL software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the *************** *** 71,77 **** function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1)) { return 0; } else { return 1; } --- 71,78 ---- function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1) || defined('PHPMP_MOD_' . $mod_id)) { return 0; } else { + define('PHPMP_MOD_' . $mod_id, true); return 1; } |
From: Brian R. <hei...@us...> - 2002-04-23 08:14:58
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv20908/modules Modified Files: simple_news.php usercp.php Log Message: Changed license; added double-include security. Index: simple_news.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/simple_news.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** simple_news.php 11 Apr 2002 05:40:15 -0000 1.1 --- simple_news.php 23 Apr 2002 08:14:55 -0000 1.2 *************** *** 1,5 **** <?php ! $file = 'simple_news.php'; // should be set in some tupe of admin panel somewhere in the future --- 1,5 ---- <?php ! $mod_id = 'NEWS'; // should be set in some tupe of admin panel somewhere in the future Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** usercp.php 11 Apr 2002 05:40:15 -0000 1.3 --- usercp.php 23 Apr 2002 08:14:55 -0000 1.4 *************** *** 1,5 **** <? ! $file = 'usercp.php'; class Module { --- 1,5 ---- <? ! $mod_id = 'USERCP'; class Module { *************** *** 8,12 **** function Init() { ! $this->pagetitle = "phpMP :: User Control Panel"; } --- 8,12 ---- function Init() { ! $this->pagetitle = "User Control Panel"; } |
From: Brian R. <hei...@us...> - 2002-04-19 06:36:39
|
Update of /cvsroot/phpmp/phpMP/docs In directory usw-pr-cvs1:/tmp/cvs-serv4284 Added Files: MODULES Log Message: Added MODULES doc. --- NEW FILE: MODULES --- This file is used for reference in order to help you create phpMP modules for yourself. Please do not use this file maliciously. phpMP Modules come in two flavors. The first is a standard, paged module. These are accessed through the modules.php script and follow the following scripting guidelines. The second type of module is a 'blocked' module. These are contained within the right- and left- side block areas and are used for polls, menus, and general information that only takes up a small amount of space. /******************************************************************************** CREATING PAGED MODULES ********************************************************************************/ Let's begin! To start, here is a basic module broken down into a few simple pieces: <? $file = 'sample_module.php'; // File this code is contained in. class Module { // Standard. ALWAYS included. var $pagetitle; //Area for initialization of Module variables. function Init() { // $Module->Init() is auto-called by the module script...use it to initialize stuff. $this->pagetitle = "Sample phpMP Module"; // Sets pagetitle var (duh!). } function MakeContent() { // This creates the actual content displayed on the page. // If you need to call other functions after this one, call them at the end. global $Template; // Makes the $Template class global. $Template->Blocking('BeginBig', array(PAGETITLE => ".:: phpMP :: " . $this->pagetitle . "::.")); // Begins a 'big' middle block. print "This is a test...<br>This is only a test...<br>\n"; // Prints a line. $Template->Blocking('EndBig'); // Ends a 'big' middle block. } } $Module = new Module(); // ALWAYS the last line of actual code in a module // unless you are calling module functions. Without // it, the class is not instantiated. ?> Note that all modules must reside in the modules/ directory within the phpMP root. Alrighty...so. I guess the template object should be explained a bit. A page is currently assembled in the following order: 1. $Template->PrintHeader() - Prints everything up to the left-side menu. 2. $Template->CreateSide('left') - Creates the left-side menu and table. 3. $Template->Blocking('BeginMain') - Begins the main/mid section of the table. Used for main content. If this is not called, most designs will be thrown COMPLETELY out of whack. 4. $Module->MakeContent() - Creates module content. Should contain BeginBig and EndBig statements. 5. $Template->Blocking('EndMain') - Ends the main/mid section of the table. 6. $Template->CreateSide('right') - Creates the left-side menu and table. 7. $Template->PrintFooter() - Prints copyright and any additional info needed. Next I'll explain the DBA class. It is used to access databases. $DBA->connect() - NEVER, EVER CALL THIS FUNCTION!!!!!! $DBA->close() - NEVER, EVER CALL THIS FUNCTION!!!!!! $DBA->query() - Used to execute basic queries from a database. $DBA->num_rows($qid) - Finds the number of rows in specified query ($qid). $DBA->fetch_array($qid) - Fetches an array of values for query ($qid). $DBA->fetch_row($qid) - Fetches a row for query ($qid) in an array. $DBA->affected_rows($qid) - Equiv of mysql_affected_rows($qid). To add a module to the menu and/or modules list, use the following DB row layout: name - Text for link in menu, as of now. unixname - Unix-qualified name of module..only a-z, 0-9, -, and _ chars. active - Set to 1 in order to display in link list or function at all. filename - Filename within modules/ directory. /******************************************************************************** CREATING BLOCKED MODULES ********************************************************************************/ Now we'll move on to blocked modules. These are relatively simple. While not object-oriented, you may create an object which may then be used to gather the required data. A blocked module returns two values (or, at least, only two that are used). These values are: $blockname - Title that is displaye in headerbar of block. $content - The HTML used to produce the main content of the block. The following is an extremely simple example version of a phpMP blocked module: <? $blockname = "Whazzup, " . $MPCONF['USR']['username'] . "!"; $content = "I can't believe you came back!!!!"; ?> As you may have noticed, we introduced a new element into the fray. The $MPCONF array is a multi-dimensional array used to store all configuration variables used within phpMP. This array will be documented soon. Anyhow, once included and called for assembly, this would produce a block resembing this: +----------------------+ | Whazzup, <username>! | +----------------------+ | I can't believe you | | came back!!!! | | | +----------------------+ Pretty simple, huh? To make the block actually appear, you must add a row to the phpmp_blocking table. This is the following format for a typical blocked module row: blockname - Used if $blockname can be static. You may then ommit the $content var. side - Right or Left. Self Explanatory. weight - lowest number comes first i.e. a module with a weight of 1 is displayed above one with a weight of 2. content - If block is COMPLETELY static with no PHP, you may put the $content here. is_php - Set to one if using external file. Set to 0 if content column is set. php_file - Filename of file in modules/ directory i.e. sample_side.php. NOTE: As a general rule of thumb, blocked modules should always have _side appended to the filename in order to not conflict with a paged module of the same name. |
From: Brian R. <hei...@us...> - 2002-04-11 06:30:37
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv7698 Modified Files: modules.php Log Message: Updated module error handling; fixed early session termination. Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** modules.php 11 Apr 2002 05:40:15 -0000 1.4 --- modules.php 11 Apr 2002 06:02:37 -0000 1.5 *************** *** 48,51 **** --- 48,53 ---- var $modulename; + var $_inactive; + var $_exists; function Init() { *************** *** 53,56 **** --- 55,60 ---- $this->modulename = $HTTP_GET_VARS['module']; + $this->_inactive = 0; + $this->_exists = 1; $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "'"); *************** *** 58,64 **** if($num_rows > 0) { $MPCONF['MOD'] = $DBA->fetch_array($query); } if($MPCONF['MOD']['active'] != 1) { ! header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=activemod"); } } --- 62,78 ---- if($num_rows > 0) { $MPCONF['MOD'] = $DBA->fetch_array($query); + } else { + $this->_exists = 0; } if($MPCONF['MOD']['active'] != 1) { ! $this->_inactive = 1; ! } ! } ! ! function DoCheck() { ! if(($this->_inactive == 1) || ($this->_exists != 1)) { ! return 0; ! } else { ! return 1; } } *************** *** 68,74 **** $ModClass->Init(); ! include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); ! $Module->Init(); $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); --- 82,92 ---- $ModClass->Init(); ! $ModCheck = $ModClass->DoCheck(); ! if($ModCheck != 0) { ! include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); ! ! $Module->Init(); ! } $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); *************** *** 78,82 **** $Template->Blocking('BeginMain'); ! $Module->MakeContent(); $Template->Blocking('EndMain'); --- 96,106 ---- $Template->Blocking('BeginMain'); ! if($ModCheck != 0) { ! $Module->MakeContent(); ! } else { ! $Template->Blocking('BeginBig', array(PAGETITLE => 'Module Error' )); ! print "An error occured while trying to process the module. It is either inactive or does not exist."; ! $Template->Blocking('EndBig'); ! } $Template->Blocking('EndMain'); |
From: Brian R. <hei...@us...> - 2002-04-11 06:30:37
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv7698/includes Modified Files: auth.php Log Message: Updated module error handling; fixed early session termination. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** auth.php 11 Apr 2002 05:40:15 -0000 1.8 --- auth.php 11 Apr 2002 06:02:37 -0000 1.9 *************** *** 102,105 **** --- 102,106 ---- $num_rows = $DBA->num_rows($result); if($num_rows > 0) { + $DBA->query('UPDATE ' . $MPCONF['DB']['table_prefix'] . 'sessions SET expiretime="' . $this->cookietime . '" WHERE username = "' . $sess_user . '"'); return $this->FetchUserVars($sess_user); setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); |
From: Brian R. <hei...@us...> - 2002-04-11 06:30:37
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv10957/includes Modified Files: auth.php Log Message: Updated privilege settings and handling of admins. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** auth.php 11 Apr 2002 06:02:37 -0000 1.9 --- auth.php 11 Apr 2002 06:19:11 -0000 1.10 *************** *** 149,154 **** } - $this->privileges = explode(",", $this->UserVars["privileges"]); - return true; --- 149,152 ---- |
From: Brian R. <hei...@us...> - 2002-04-11 06:30:15
|
Update of /cvsroot/phpmp/phpMP/dba/sql In directory usw-pr-cvs1:/tmp/cvs-serv13584 Modified Files: mysql.sql Log Message: OOps... :-P Index: mysql.sql =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/sql/mysql.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mysql.sql 11 Apr 2002 06:23:38 -0000 1.2 --- mysql.sql 11 Apr 2002 06:30:11 -0000 1.3 *************** *** 1,3 **** - Database phpmp running on mysql.sourceforge.net # phpMyAdmin MySQL-Dump # version 2.2.5 --- 1,2 ---- |
From: Brian R. <hei...@us...> - 2002-04-11 06:23:41
|
Update of /cvsroot/phpmp/phpMP/dba/sql In directory usw-pr-cvs1:/tmp/cvs-serv11758/dba/sql Modified Files: mysql.sql Log Message: Updated MySQL Table Structure. Index: mysql.sql =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/sql/mysql.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mysql.sql 10 Apr 2002 21:28:57 -0000 1.1 --- mysql.sql 11 Apr 2002 06:23:38 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + Database phpmp running on mysql.sourceforge.net # phpMyAdmin MySQL-Dump # version 2.2.5 *************** *** 5,9 **** # # Host: mysql.sourceforge.net ! # Generation Time: Apr 10, 2002 at 02:26 PM # Server version: 3.23.36 # PHP Version: 4.0.6 --- 6,10 ---- # # Host: mysql.sourceforge.net ! # Generation Time: Apr 10, 2002 at 11:19 PM # Server version: 3.23.36 # PHP Version: 4.0.6 *************** *** 29,34 **** # - INSERT INTO phpmp_blocking VALUES ('Welcome', 'right', 1, '', 1, 'user_side.php'); INSERT INTO phpmp_blocking VALUES ('Main Menu', 'left', 1, '', 1, 'menu_side.php'); # -------------------------------------------------------- --- 30,35 ---- # INSERT INTO phpmp_blocking VALUES ('Main Menu', 'left', 1, '', 1, 'menu_side.php'); + INSERT INTO phpmp_blocking VALUES ('User', 'right', 1, '', 1, 'user_side.php'); # -------------------------------------------------------- *************** *** 73,80 **** --- 74,103 ---- # + INSERT INTO phpmp_modules VALUES ('News', 'news', 1, 'simple_news.php'); INSERT INTO phpmp_modules VALUES ('User CP', 'usercp', 1, 'usercp.php'); # -------------------------------------------------------- # + # Table structure for table `phpmp_news` + # + + CREATE TABLE phpmp_news ( + id int(11) NOT NULL auto_increment, + news_db varchar(25) NOT NULL default '', + title text NOT NULL, + body text NOT NULL, + date int(11) NOT NULL default '0', + user_id int(11) NOT NULL default '0', + PRIMARY KEY (id) + ) TYPE=MyISAM; + + # + # Dumping data for table `phpmp_news` + # + + INSERT INTO phpmp_news VALUES (1, 'index', 'phpMP Simple News Test', 'This is a simple test of the news posting engine here on phpMP. The news posting engine is a module and can therefore be removed using the Administrative Area. Please do not remove the file before removing the MPLink.', 1018475688, 0); + # -------------------------------------------------------- + + # # Table structure for table `phpmp_sessions` # *************** *** 98,101 **** --- 121,125 ---- CREATE TABLE phpmp_users ( + user_id int(11) NOT NULL auto_increment, username char(24) NOT NULL default '', password char(150) NOT NULL default '', *************** *** 107,112 **** isadmin tinyint(4) NOT NULL default '0', isgod tinyint(4) NOT NULL default '0', ! privs char(255) NOT NULL default '', ! PRIMARY KEY (username) ) TYPE=MyISAM; --- 131,136 ---- isadmin tinyint(4) NOT NULL default '0', isgod tinyint(4) NOT NULL default '0', ! PRIMARY KEY (user_id), ! KEY username (username) ) TYPE=MyISAM; *************** *** 115,117 **** # ! INSERT INTO phpmp_users VALUES ('Anonymous', '', 'Anonymous', 'anonymous@127.0.0.1', '', '', 20020402174305, 0, 0, ''); \ No newline at end of file --- 139,141 ---- # ! INSERT INTO phpmp_users VALUES (1, 'Anonymous', '', 'Anonymous', 'anonymous@127.0.0.1', '', '', 20020402174305, 0, 0); \ No newline at end of file |
From: Brian R. <hei...@us...> - 2002-04-11 05:40:18
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv3388/modules Modified Files: menu_side.php user_side.php usercp.php Added Files: simple_news.php Log Message: Updated more DBA. Added Extremely Basic News module. --- NEW FILE: simple_news.php --- <?php $file = 'simple_news.php'; // should be set in some tupe of admin panel somewhere in the future $news[before] = '<table border="0" width="100%" cellspacing="0" cellpadding=0"><tr><td width="100%">'; $news[after] = '</td></tr><tr><td width="100%" height="1" bgcolor="#000000"></td></tr><tr><td width="100%" align="center"><small><small><i>posted by <b><a href="mailto:{user.email}">{user.name}</a></b> on <b>{post.date}</b></i></small></small>'.'</td></tr></table>'; class Module { function Init() { $this->pagetitle = "phpMP :: Latest News"; } function MakeContent() { global $Template, $DBA, $MPCONF, $news; if (strlen($news_db)==0) {$news_db='index';} $query = $DBA->query('SELECT title, body, date, user_id FROM '.$MPCONF['DB']['table_prefix'].'news WHERE news_db = \''.$news_db.'\' ORDER BY date DESC'.$x_query); $count = $DBA->affected_rows(); for($i = 0; $i < $count; $i++) { list($post[title], $post[body], $post[date], $post[user_id]) = $DBA->fetch_row($query); $trans=array( '{post.date}' => date('l, F j, Y - g:i A',$post[date]), '{user.name}' => $post[user_name], '{user.email}' => $post[user_email]); $news[0] = strtr($news[before], $trans); $news[1] = strtr($news[after], $trans); $Template->Blocking('BeginBig', array(PAGETITLE => $post[title])); echo nl2br($news[0].$post[body].$news[1]); $Template->Blocking('EndBig'); } } } $Module = new Module(); ?> Index: menu_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/menu_side.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** menu_side.php 11 Apr 2002 04:15:39 -0000 1.3 --- menu_side.php 11 Apr 2002 05:40:15 -0000 1.4 *************** *** 12,17 **** $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1'"); ! while($row = @mysql_fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); } --- 12,17 ---- $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1' ORDER BY name"); ! while($row = $DBA->fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); } Index: user_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/user_side.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** user_side.php 8 Apr 2002 22:29:14 -0000 1.6 --- user_side.php 11 Apr 2002 05:40:15 -0000 1.7 *************** *** 2,11 **** $identFile = "user_side.php"; ! global $PHP_SELF; if($MPCONF['USR']['username'] != "Anonymous") { $blockname = "Welcome"; ! $content = "<font size='1'>Welcome back,<br> " . $MPCONF['USR']['username'] . "!</font>"; } else { --- 2,17 ---- $identFile = "user_side.php"; ! global $PHP_SELF, $content; if($MPCONF['USR']['username'] != "Anonymous") { $blockname = "Welcome"; ! $content .= "<font size='1'>Welcome back,<br> " . $MPCONF['USR']['username'] . "!</font><br />"; ! $content .= "<br />"; ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/members/profile.php?action=edit'>Edit User Profile</a></font><br />"; ! ! if($MPCONF['USR']['isadmin'] == 1) { ! $content .= "<font size='1'><a href='" . $MPCONF['GEN']['uri'] . "/admin/index.php'>Administration Area</a></font>"; ! } } else { Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** usercp.php 10 Apr 2002 21:22:02 -0000 1.2 --- usercp.php 11 Apr 2002 05:40:15 -0000 1.3 *************** *** 8,12 **** function Init() { ! $this->pagetitle = "User Control Panel"; } --- 8,12 ---- function Init() { ! $this->pagetitle = "phpMP :: User Control Panel"; } |
From: Brian R. <hei...@us...> - 2002-04-11 05:40:18
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv3388/includes Modified Files: auth.php functions.php template.php Log Message: Updated more DBA. Added Extremely Basic News module. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** auth.php 10 Apr 2002 21:22:02 -0000 1.7 --- auth.php 11 Apr 2002 05:40:15 -0000 1.8 *************** *** 53,57 **** $userinfo = $DBA->query('SELECT * FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE username="' . $sess_user . '"'); ! $this->UserVars = @mysql_fetch_array($userinfo); return $this->UserVars; --- 53,57 ---- $userinfo = $DBA->query('SELECT * FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE username="' . $sess_user . '"'); ! $this->UserVars = $DBA->fetch_array($userinfo); return $this->UserVars; *************** *** 84,89 **** $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='{$HTTP_POST_VARS['username']}' AND password='$enc_password'"); ! if(@mysql_num_rows($result) == 1) { ! $data = @mysql_fetch_array($result); $sess_user = $data['username']; $sesskey = $this->getSessKey(); --- 84,90 ---- $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . "users WHERE username='{$HTTP_POST_VARS['username']}' AND password='$enc_password'"); ! $num_rows = $DBA->num_rows($result); ! if($num_rows > 0) { ! $data = $DBA->fetch_array($result); $sess_user = $data['username']; $sesskey = $this->getSessKey(); *************** *** 99,103 **** $sess_user = $HTTP_COOKIE_VARS[$cookiename]; $result = $DBA->query('SELECT sesskey FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE username = "' . $sess_user . '"'); ! if(@mysql_num_rows($result) == 1) { return $this->FetchUserVars($sess_user); setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); --- 100,105 ---- $sess_user = $HTTP_COOKIE_VARS[$cookiename]; $result = $DBA->query('SELECT sesskey FROM ' . $MPCONF['DB']['table_prefix'] . 'sessions WHERE username = "' . $sess_user . '"'); ! $num_rows = $DBA->num_rows($result); ! if($num_rows > 0) { return $this->FetchUserVars($sess_user); setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); *************** *** 112,119 **** $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE authstring="' . $authstring . '"'); ! if(@mysql_num_rows($result) == 1) { $sess_user = $username; $sesskey = $this->getSessKey(); ! @mysql_query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, username) VALUES('$sesskey', '" . $this->cookietime . "', '$sess_user')"); setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); --- 114,122 ---- $result = $DBA->query('SELECT username FROM ' . $MPCONF['DB']['table_prefix'] . 'users WHERE authstring="' . $authstring . '"'); ! $num_rows = $DBA->num_rows($result); ! if($num_rows > 0) { $sess_user = $username; $sesskey = $this->getSessKey(); ! $DBA->query("INSERT INTO " . $MPCONF['DB']['table_prefix'] . "sessions (sesskey, expiretime, username) VALUES('$sesskey', '" . $this->cookietime . "', '$sess_user')"); setcookie($cookiename, $sess_user, $this->cookietime, $MPCONF['GEN']['uri']); Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** functions.php 10 Apr 2002 21:22:02 -0000 1.7 --- functions.php 11 Apr 2002 05:40:15 -0000 1.8 *************** *** 40,44 **** $sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "config"; $db = $DBA->query($sql); ! while($row = @mysql_fetch_array($db)) { $MPCONF[$row['type']][$row['name']] = $row["value"]; } --- 40,44 ---- $sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "config"; $db = $DBA->query($sql); ! while($row = $DBA->fetch_array($db)) { $MPCONF[$row['type']][$row['name']] = $row["value"]; } Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** template.php 11 Apr 2002 04:15:39 -0000 1.12 --- template.php 11 Apr 2002 05:40:15 -0000 1.13 *************** *** 176,183 **** $this->Blocking('BeginBlock'); - //$DBA->open(); $this->box_sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "blocking WHERE side='" . $side . "' ORDER BY weight"; $data = $DBA->query($this->box_sql); ! while($data_array = @mysql_fetch_array($data)) { $blockname = ""; $content = ""; --- 176,182 ---- $this->Blocking('BeginBlock'); $this->box_sql = "SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "blocking WHERE side='" . $side . "' ORDER BY weight"; $data = $DBA->query($this->box_sql); ! while($data_array = $DBA->fetch_array($data)) { $blockname = ""; $content = ""; *************** *** 190,204 **** $this->CreateBox($blockname, $content); } - //$DBA->close(); $this->Blocking('EndBlock'); } - - function ClosePage() { - global $MPCONF; - - session_close(); - } - } --- 189,195 ---- |
From: Brian R. <hei...@us...> - 2002-04-11 05:40:18
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv3388/dba Modified Files: mysql.dba Log Message: Updated more DBA. Added Extremely Basic News module. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** mysql.dba 11 Apr 2002 04:21:02 -0000 1.11 --- mysql.dba 11 Apr 2002 05:40:15 -0000 1.12 *************** *** 43,46 **** --- 43,48 ---- //PERFORMS QUERIES ON A MYSQL DATABASE. class DBA{ + + var $identLink; function connect() { *************** *** 48,64 **** $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); if (!$db) { return 0; } else { return $db; } } ! function close($db) { ! @mysql_close($db); } function query($query) { global $MPCONF; ! $db = $this->connect(); if (!$db) { $result = 0; --- 50,73 ---- $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); if (!$db) { + $this->connected = 0; return 0; } else { + $this->identLink = $db; return $db; } } ! function close() { ! @mysql_close($this->identLink); ! $this->identLink = 0; } function query($query) { global $MPCONF; ! if($this->identLink == 0) { ! $db = $this->connect(); ! } else { ! $db = $this->identLink; ! } if (!$db) { $result = 0; *************** *** 70,83 **** $result = @mysql_query($query, $db) or die("MySQL Error: ".mysql_error($db)); } - $this->close($db); return $result; } function num_rows($query) { ! return @mysql_num_rows($query); } function fetch_array($query) { return @mysql_fetch_array($query); } } --- 79,121 ---- $result = @mysql_query($query, $db) or die("MySQL Error: ".mysql_error($db)); } return $result; } function num_rows($query) { ! if($this->identLink == 0) { ! $db = $this->connect(); ! } else { ! $db = $this->identLink; ! } ! $num = @mysql_num_rows($query); ! return $num; } function fetch_array($query) { + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } return @mysql_fetch_array($query); + } + + function fetch_row($query) { + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } + $result = @mysql_fetch_row($query); + return $result; + } + + function affected_rows() { + if($this->identLink == 0) { + $db = $this->connect(); + } else { + $db = $this->identLink; + } + return @mysql_affected_rows($db); } } |
From: Brian R. <hei...@us...> - 2002-04-11 05:40:18
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv3388 Modified Files: modules.php Log Message: Updated more DBA. Added Extremely Basic News module. Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** modules.php 11 Apr 2002 03:26:02 -0000 1.3 --- modules.php 11 Apr 2002 05:40:15 -0000 1.4 *************** *** 55,60 **** $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "'"); ! if(@mysql_num_rows($query) == 1) { ! $MPCONF['MOD'] = @mysql_fetch_array($query); } if($MPCONF['MOD']['active'] != 1) { --- 55,61 ---- $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "'"); ! $num_rows = $DBA->num_rows($query); ! if($num_rows > 0) { ! $MPCONF['MOD'] = $DBA->fetch_array($query); } if($MPCONF['MOD']['active'] != 1) { |
From: Brian R. <hei...@us...> - 2002-04-11 04:21:06
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv18974/dba Modified Files: mysql.dba Log Message: Fixed DBA. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** mysql.dba 11 Apr 2002 04:15:39 -0000 1.10 --- mysql.dba 11 Apr 2002 04:21:02 -0000 1.11 *************** *** 44,54 **** class DBA{ ! function connect() { ! if (!$db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password'])) { ! $result = 0; } else { ! $result = 1; } - return $result; } --- 44,55 ---- class DBA{ ! function connect() { ! global $MPCONF, $db; ! $db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password']); ! if (!$db) { ! return 0; } else { ! return $db; } } |
From: Brian R. <hei...@us...> - 2002-04-11 04:15:42
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv17457/modules Modified Files: menu_side.php Log Message: Updated DBA for mySQL. Updated templating procedure. Index: menu_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/menu_side.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** menu_side.php 11 Apr 2002 03:26:02 -0000 1.2 --- menu_side.php 11 Apr 2002 04:15:39 -0000 1.3 *************** *** 12,16 **** $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1' SORT BY name"); while($row = @mysql_fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); --- 12,16 ---- $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1'"); while($row = @mysql_fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); |
From: Brian R. <hei...@us...> - 2002-04-11 04:15:42
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv17457/dba Modified Files: mysql.dba Log Message: Updated DBA for mySQL. Updated templating procedure. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** mysql.dba 10 Apr 2002 21:22:02 -0000 1.9 --- mysql.dba 11 Apr 2002 04:15:39 -0000 1.10 *************** *** 44,50 **** class DBA{ function query($query) { global $MPCONF; ! if (!$db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password'])) { $result = 0; die("db connect error"); --- 44,64 ---- class DBA{ + function connect() { + if (!$db = @mysql_connect($MPCONF['DB']['host'], $MPCONF['DB']['username'], $MPCONF['DB']['password'])) { + $result = 0; + } else { + $result = 1; + } + return $result; + } + + function close($db) { + @mysql_close($db); + } + function query($query) { global $MPCONF; ! $db = $this->connect(); ! if (!$db) { $result = 0; die("db connect error"); *************** *** 52,60 **** else { // Execute query ! @mysql_select_db($MPCONF['DB']['database']); $result = @mysql_query($query, $db) or die("MySQL Error: ".mysql_error($db)); } ! @mysql_close($db); return $result; } } --- 66,82 ---- else { // Execute query ! @mysql_select_db($MPCONF['DB']['database'], $db); $result = @mysql_query($query, $db) or die("MySQL Error: ".mysql_error($db)); } ! $this->close($db); return $result; + } + + function num_rows($query) { + return @mysql_num_rows($query); + } + + function fetch_array($query) { + return @mysql_fetch_array($query); } } |
From: Brian R. <hei...@us...> - 2002-04-11 04:15:42
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv17457/includes Modified Files: template.php Log Message: Updated DBA for mySQL. Updated templating procedure. Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** template.php 11 Apr 2002 03:26:02 -0000 1.11 --- template.php 11 Apr 2002 04:15:39 -0000 1.12 *************** *** 153,160 **** // Additional Note: Blocking() uses the variables set in $TPLVars, which must be present. function Blocking($function, $tpl_array = array()) { ! global $TPLVars; ! //if($this->block_vars_read != 1) { $this->ReadTplConfig('blocking'); ! //} $tpl_array = $this->AssignDefaults($tpl_array); --- 153,162 ---- // Additional Note: Blocking() uses the variables set in $TPLVars, which must be present. function Blocking($function, $tpl_array = array()) { ! global $TPLVars, $rvalue; ! if($this->block_vars_read != 1) { $this->ReadTplConfig('blocking'); ! } ! ! $TPLnew = $TPLVars; $tpl_array = $this->AssignDefaults($tpl_array); *************** *** 162,169 **** while( list($key,$value) = each($tpl_array) ) { $key = '{' . $key . '}'; ! $TPLVars["$function"] = ereg_replace("$key", "$value", $TPLVars["$function"]); } ! echo "{$TPLVars["$function"]}"; } --- 164,171 ---- while( list($key,$value) = each($tpl_array) ) { $key = '{' . $key . '}'; ! $TPLnew[$function] = ereg_replace($key, $value, $TPLnew[$function]); } ! echo $TPLnew[$function]; } |
From: Brian R. <hei...@us...> - 2002-04-11 03:26:05
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv6158/includes Modified Files: template.php Log Message: Attempting to fix title-doubling problem. Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** template.php 10 Apr 2002 21:22:02 -0000 1.10 --- template.php 11 Apr 2002 03:26:02 -0000 1.11 *************** *** 154,160 **** function Blocking($function, $tpl_array = array()) { global $TPLVars; ! if($this->block_vars_read != 1) { $this->ReadTplConfig('blocking'); ! } $tpl_array = $this->AssignDefaults($tpl_array); --- 154,160 ---- function Blocking($function, $tpl_array = array()) { global $TPLVars; ! //if($this->block_vars_read != 1) { $this->ReadTplConfig('blocking'); ! //} $tpl_array = $this->AssignDefaults($tpl_array); |
From: Brian R. <hei...@us...> - 2002-04-11 03:26:05
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv6158 Modified Files: modules.php Log Message: Attempting to fix title-doubling problem. Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** modules.php 10 Apr 2002 21:22:02 -0000 1.2 --- modules.php 11 Apr 2002 03:26:02 -0000 1.3 *************** *** 48,52 **** var $modulename; - var $use_filename; function Init() { --- 48,51 ---- *************** *** 58,64 **** if(@mysql_num_rows($query) == 1) { $MPCONF['MOD'] = @mysql_fetch_array($query); - } - if($MPCONF['MOD']['filename'] == '') { - header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=usemod"); } if($MPCONF['MOD']['active'] != 1) { --- 57,60 ---- |
From: Brian R. <hei...@us...> - 2002-04-11 03:26:05
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv6158/modules Modified Files: menu_side.php Log Message: Attempting to fix title-doubling problem. Index: menu_side.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/menu_side.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** menu_side.php 3 Apr 2002 10:55:24 -0000 1.1 --- menu_side.php 11 Apr 2002 03:26:02 -0000 1.2 *************** *** 12,16 **** $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1'"); while($row = @mysql_fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); --- 12,16 ---- $content .= $MPCONF['TPL']['bullet_html'] . ' <a href="' . $MPCONF['GEN']['uri'] . '/index.php">Home</a><br>' . "\n"; ! $result = $DBA->query("SELECT name,unixname FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE active='1' SORT BY name"); while($row = @mysql_fetch_array($result)) { $content .= makeLink($row['name'], $row['unixname']); |
From: Brian R. <hei...@us...> - 2002-04-10 21:29:02
|
Update of /cvsroot/phpmp/phpMP/dba/sql In directory usw-pr-cvs1:/tmp/cvs-serv21857 Added Files: mysql.sql Log Message: Added MySQL table structure and default data. --- NEW FILE: mysql.sql --- # phpMyAdmin MySQL-Dump # version 2.2.5 # http://phpwizard.net/phpMyAdmin/ # http://phpmyadmin.sourceforge.net/ (download page) # # Host: mysql.sourceforge.net # Generation Time: Apr 10, 2002 at 02:26 PM # Server version: 3.23.36 # PHP Version: 4.0.6 # Database : `phpmp` # -------------------------------------------------------- # # Table structure for table `phpmp_blocking` # CREATE TABLE phpmp_blocking ( blockname varchar(40) NOT NULL default '', side varchar(5) default NULL, weight smallint(3) default NULL, content text NOT NULL, is_php tinyint(4) NOT NULL default '0', php_file varchar(255) NOT NULL default '', KEY side (side) ) TYPE=MyISAM; # # Dumping data for table `phpmp_blocking` # INSERT INTO phpmp_blocking VALUES ('Welcome', 'right', 1, '', 1, 'user_side.php'); INSERT INTO phpmp_blocking VALUES ('Main Menu', 'left', 1, '', 1, 'menu_side.php'); # -------------------------------------------------------- # # Table structure for table `phpmp_config` # CREATE TABLE phpmp_config ( type char(5) NOT NULL default '', name char(255) NOT NULL default '', value char(255) NOT NULL default '' ) TYPE=MyISAM; # # Dumping data for table `phpmp_config` # INSERT INTO phpmp_config VALUES ('TPL', 'tpl_name', 'TealMP'); INSERT INTO phpmp_config VALUES ('GEN', 'address', ''); INSERT INTO phpmp_config VALUES ('GEN', 'uri', ''); INSERT INTO phpmp_config VALUES ('GEN', 'version', '0.9 alpha'); INSERT INTO phpmp_config VALUES ('SES', 'session_length', '3600'); INSERT INTO phpmp_config VALUES ('SES', 'extcookie', 'phpMPextend'); INSERT INTO phpmp_config VALUES ('TPL', 'bullet_html', '•'); INSERT INTO phpmp_config VALUES ('SES', 'normcookie', 'phpMPcookie'); # -------------------------------------------------------- # # Table structure for table `phpmp_modules` # CREATE TABLE phpmp_modules ( name char(40) NOT NULL default '', unixname char(24) NOT NULL default '', active tinyint(1) NOT NULL default '0', filename char(255) NOT NULL default '', PRIMARY KEY (unixname) ) TYPE=MyISAM; # # Dumping data for table `phpmp_modules` # INSERT INTO phpmp_modules VALUES ('User CP', 'usercp', 1, 'usercp.php'); # -------------------------------------------------------- # # Table structure for table `phpmp_sessions` # CREATE TABLE phpmp_sessions ( sesskey varchar(24) NOT NULL default '', expiretime int(11) unsigned NOT NULL default '0', username varchar(24) NOT NULL default '', PRIMARY KEY (sesskey) ) TYPE=MyISAM; # # Dumping data for table `phpmp_sessions` # # -------------------------------------------------------- # # Table structure for table `phpmp_users` # CREATE TABLE phpmp_users ( username char(24) NOT NULL default '', password char(150) NOT NULL default '', realname char(75) NOT NULL default '', email char(75) NOT NULL default '', location char(75) NOT NULL default '', usr_tpl char(255) NOT NULL default '', joindate timestamp(14) NOT NULL, isadmin tinyint(4) NOT NULL default '0', isgod tinyint(4) NOT NULL default '0', privs char(255) NOT NULL default '', PRIMARY KEY (username) ) TYPE=MyISAM; # # Dumping data for table `phpmp_users` # INSERT INTO phpmp_users VALUES ('Anonymous', '', 'Anonymous', 'anonymous@127.0.0.1', '', '', 20020402174305, 0, 0, ''); |
From: Brian R. <hei...@us...> - 2002-04-10 21:22:09
|
Update of /cvsroot/phpmp/phpMP/modules In directory usw-pr-cvs1:/tmp/cvs-serv19300/modules Modified Files: usercp.php Log Message: Updated dev info. Added module error support. Index: usercp.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules/usercp.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** usercp.php 10 Apr 2002 04:38:35 -0000 1.1 --- usercp.php 10 Apr 2002 21:22:02 -0000 1.2 *************** *** 13,17 **** function MakeContent() { global $Template; ! $Template->Blocking('BeginBig', array(PAGETITLE => ".::" . $this->pagetitle . "::.")); print "This is a test...<br>This is only a test...<br>\n"; --- 13,17 ---- function MakeContent() { global $Template; ! $Template->Blocking('BeginBig', array(PAGETITLE => ".:: phpMP :: " . $this->pagetitle . "::.")); print "This is a test...<br>This is only a test...<br>\n"; |
From: Brian R. <hei...@us...> - 2002-04-10 21:22:09
|
Update of /cvsroot/phpmp/phpMP/includes In directory usw-pr-cvs1:/tmp/cvs-serv19300/includes Modified Files: auth.php core.php dba.php functions.php parser.php template.php Log Message: Updated dev info. Added module error support. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** auth.php 8 Apr 2002 22:29:14 -0000 1.6 --- auth.php 10 Apr 2002 21:22:02 -0000 1.7 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/auth.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/auth.php Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** core.php 3 Apr 2002 11:38:18 -0000 1.11 --- core.php 10 Apr 2002 21:22:02 -0000 1.12 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/core.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/core.php Index: dba.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/dba.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** dba.php 1 Apr 2002 09:43:20 -0000 1.4 --- dba.php 10 Apr 2002 21:22:02 -0000 1.5 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/dba.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/dba.php Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** functions.php 3 Apr 2002 08:47:42 -0000 1.6 --- functions.php 10 Apr 2002 21:22:02 -0000 1.7 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/functions.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/functions.php Index: parser.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/parser.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** parser.php 1 Apr 2002 05:58:37 -0000 1.3 --- parser.php 10 Apr 2002 21:22:02 -0000 1.4 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/parser.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/parser.php Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** template.php 9 Apr 2002 22:05:24 -0000 1.9 --- template.php 10 Apr 2002 21:22:02 -0000 1.10 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /includes/template.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /includes/template.php |
From: Brian R. <hei...@us...> - 2002-04-10 21:22:06
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv19300 Modified Files: index.php modules.php Log Message: Updated dev info. Added module error support. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** index.php 9 Apr 2002 22:10:40 -0000 1.13 --- index.php 10 Apr 2002 21:22:02 -0000 1.14 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /index.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /index.php Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** modules.php 10 Apr 2002 04:38:35 -0000 1.1 --- modules.php 10 Apr 2002 21:22:02 -0000 1.2 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /modules.php --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynsond Filename: /modules.php *************** *** 31,35 **** ******************************************************************************/ - // Include The Main Configuration File include("config.php"); --- 31,34 ---- *************** *** 38,47 **** } - // Include The Main Core File include($MPCONF['GEN']['abs_path'] . "/includes/core.php"); global $PHPMP; - // Start phpMP $PHPMP = new PHPMP(); --- 37,44 ---- *************** *** 58,67 **** $this->modulename = $HTTP_GET_VARS['module']; ! $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "' LIMIT 1"); ! if(@mysql_num_rows($query)) { $MPCONF['MOD'] = @mysql_fetch_array($query); ! } else { ! die("Module requested but not found."); ! } } } --- 55,68 ---- $this->modulename = $HTTP_GET_VARS['module']; ! $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "'"); ! if(@mysql_num_rows($query) == 1) { $MPCONF['MOD'] = @mysql_fetch_array($query); ! } ! if($MPCONF['MOD']['filename'] == '') { ! header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=usemod"); ! } ! if($MPCONF['MOD']['active'] != 1) { ! header("Location: " . $MPCONF['GEN']['uri'] . "/error.php?ecode=activemod"); ! } } } *************** *** 74,92 **** $Module->Init(); - // Start The Page $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); ! ! // Display The Left Side $Template->CreateSide('left'); - // Start The Main Section $Template->Blocking('BeginMain'); ! $Module->MakeContent(); - // End The Main Section $Template->Blocking('EndMain'); - // Display The Right Side, If Wanted On Page $Template->CreateSide('right'); --- 75,88 ---- $Module->Init(); $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); ! $Template->CreateSide('left'); $Template->Blocking('BeginMain'); ! $Module->MakeContent(); $Template->Blocking('EndMain'); $Template->CreateSide('right'); |
From: Brian R. <hei...@us...> - 2002-04-10 21:22:06
|
Update of /cvsroot/phpmp/phpMP/dba In directory usw-pr-cvs1:/tmp/cvs-serv19300/dba Modified Files: mysql.dba Log Message: Updated dev info. Added module error support. Index: mysql.dba =================================================================== RCS file: /cvsroot/phpmp/phpMP/dba/mysql.dba,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** mysql.dba 2 Apr 2002 23:35:18 -0000 1.8 --- mysql.dba 10 Apr 2002 21:22:02 -0000 1.9 *************** *** 12,16 **** Lead Programmer: Brian Rose ! Lead Designer: Evan Weatherhead Filename: /dba/mysql.dba --- 12,16 ---- Lead Programmer: Brian Rose ! Lead Designer: Trevor Joynson Filename: /dba/mysql.dba |
From: Brian R. <hei...@us...> - 2002-04-10 04:38:43
|
Update of /cvsroot/phpmp/phpMP In directory usw-pr-cvs1:/tmp/cvs-serv22503 Added Files: modules.php Log Message: Adding a little module support. --- NEW FILE: modules.php --- <? /****************************************************************************** ******************************************************************************* phpMP - The World's Greatest Modular Portal *********************************************** Are you MPowered? Copyright (C) 2002 phpMP Development Group All rights reserved. Lead Programmer: Brian Rose Lead Designer: Evan Weatherhead Filename: /modules.php Usage & Function: Puts together all module content. Create Date: April 9, 2002 $Id: modules.php,v 1.1 2002/04/10 04:38:35 heimidal Exp $ ******************************************************************************* ******************************************************************************* This software is provided under the BSD software license. A copy of the license should have been included with this software, located in the Docs folder. Feel free to redistribute and/or modify it according to the regulations stated in the license. ******************************************************************************* ******************************************************************************/ // Include The Main Configuration File include("config.php"); if(!defined("PHPMP_INSTALLED")) { die('You have not <a href="install.php">installed phpMP</a>. Please do so before attempting to use this software.'); } // Include The Main Core File include($MPCONF['GEN']['abs_path'] . "/includes/core.php"); global $PHPMP; // Start phpMP $PHPMP = new PHPMP(); $PHPMP->Init(); class ModClass { var $modulename; var $use_filename; function Init() { global $MPCONF, $DBA, $HTTP_GET_VARS; $this->modulename = $HTTP_GET_VARS['module']; $query = $DBA->query("SELECT * FROM " . $MPCONF['DB']['table_prefix'] . "modules WHERE unixname='" . $this->modulename . "' LIMIT 1"); if(@mysql_num_rows($query)) { $MPCONF['MOD'] = @mysql_fetch_array($query); } else { die("Module requested but not found."); } } } $ModClass = new ModClass(); $ModClass->Init(); include($MPCONF['GEN']['abs_path'] . '/modules/' . $MPCONF['MOD']['filename']); $Module->Init(); // Start The Page $Template->PrintHeader( array(PAGETITLE => ".::" . $Module->pagetitle . "::.") ); // Display The Left Side $Template->CreateSide('left'); // Start The Main Section $Template->Blocking('BeginMain'); $Module->MakeContent(); // End The Main Section $Template->Blocking('EndMain'); // Display The Right Side, If Wanted On Page $Template->CreateSide('right'); $Template->PrintFooter( array() ); ?> |