phpmp-commits Mailing List for phpMyPublications (Page 13)
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...> - 2003-02-08 09:44:20
|
Update of /cvsroot/phpmp/phpMP/admin In directory sc8-pr-cvs1:/tmp/cvs-serv10859 Modified Files: index.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** index.php 4 Feb 2003 21:43:14 -0000 1.2 --- index.php 8 Feb 2003 09:44:17 -0000 1.3 *************** *** 1 **** ! <?php //This file will house the frameset for the phpMP admin interface. ?> \ No newline at end of file --- 1,5 ---- ! <?php ! ! //This file will house the frameset for the phpMP admin interface. ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:43:32
|
Update of /cvsroot/phpmp/phpMP/languages/french In directory sc8-pr-cvs1:/tmp/cvs-serv10648/languages/french Modified Files: lang_main.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/french/lang_main.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** lang_main.php 4 Feb 2003 21:43:30 -0000 1.6 --- lang_main.php 8 Feb 2003 09:43:29 -0000 1.7 *************** *** 1 **** ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escape single quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Bienvenue chez ' . C_SITE_NAME . '!', 'L_Home' => 'Accueil', 'L_Profile' => 'Profil', 'L_Modules' => 'Modules', 'L_Downloads' => 'Téléchargements', 'L_Username' => 'Nom d\'usager', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'Votre panneau de commande', 'L_E-mail' => 'Courriel', 'L_Password' => 'Mot de passe', 'L_Comfirm' => 'Confirmez', 'L_Real Name' => 'Prénom et Nom', 'L_Location' => 'Location', 'L_Register' => 'Enregistrer', 'L_Welcome' => 'Bienvenue', 'L_Administration_Area' => 'Section Administrative', 'L_Register_a_Username' => 'Enregistrez votre nom d\'usager', // // Below is language used almost specifically for auth. // 'L_Login' => 'Ouvrir session', 'L_Logout' => 'Fermer session', 'L_Account_Activated' => 'Votre compte a été activé. Vous pouvez maintenant ouvrir une session.', 'L_Required_Field' => 'Ceci dénote de l\'information requise pour votre enregistrement', 'L_Register_Finished' => 'Votre enregistrement a été traité. Un courriel expliquant l\'activation de votre compte sera envoyé à l\'adresse soumisse sous peu.', 'L_Forgot_Password' => 'Avez-vous oubliez votre mot de pass?', 'L_Not_logged_in' => 'Veuillez ouvrir une session via votre compte personel.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'Actionné par phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'Tout le contenu de se site est la propriété du propriétaire respectif. Tous droits réservés.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file --- 1,66 ---- ! <?php ! ! class Localization ! { ! ! var $lang; ! ! function Localization() ! { ! ! $this->lang = array( ! ! // ! // General language used throughout site. ! // ! // Note: Always escape single quote characters (') with a backslash (\). ! // ! 'L_Welcome_to_Site' => 'Bienvenue chez ' . C_SITE_NAME . '!', ! 'L_Home' => 'Accueil', ! 'L_Profile' => 'Profil', ! 'L_Modules' => 'Modules', ! 'L_Downloads' => 'Téléchargements', ! 'L_Username' => 'Nom d\'usager', ! 'L_User_CP' => 'User CP', ! 'L_User_Control_Panel' => 'Votre panneau de commande', ! 'L_E-mail' => 'Courriel', ! 'L_Password' => 'Mot de passe', ! 'L_Comfirm' => 'Confirmez', ! 'L_Real Name' => 'Prénom et Nom', ! 'L_Location' => 'Location', ! 'L_Register' => 'Enregistrer', ! 'L_Welcome' => 'Bienvenue', ! ! 'L_Administration_Area' => 'Section Administrative', ! 'L_Register_a_Username' => 'Enregistrez votre nom d\'usager', ! ! ! // ! // Below is language used almost specifically for auth. ! // ! 'L_Login' => 'Ouvrir session', ! 'L_Logout' => 'Fermer session', ! ! 'L_Account_Activated' => 'Votre compte a été activé. Vous pouvez maintenant ouvrir une session.', ! 'L_Required_Field' => 'Ceci dénote de l\'information requise pour votre enregistrement', ! 'L_Register_Finished' => 'Votre enregistrement a été traité. Un courriel expliquant l\'activation de votre compte sera envoyé à l\'adresse soumisse sous peu.', ! 'L_Forgot_Password' => 'Avez-vous oubliez votre mot de pass?', ! 'L_Not_logged_in' => 'Veuillez ouvrir une session via votre compte personel.', ! ! ! // ! // Other various parts of the templates. ! // ! 'L_Powered_by_phpMP' => 'Actionné par phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', ! 'L_Copyright' => 'Tout le contenu de se site est la propriété du propriétaire respectif. Tous droits réservés.' ! ! // It is IMPERATIVE that the last array value entered (usually the copyright) ! // does not end in a comma. ! ! ); ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:43:32
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv10648/includes Modified Files: language.php sessions.php template.php user.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: language.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/language.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** language.php 7 Feb 2003 23:28:50 -0000 1.8 --- language.php 8 Feb 2003 09:43:29 -0000 1.9 *************** *** 1 **** ! <?php class Language { function Language() { defined("U_LANGUAGE") ? define( "C_LANGUAGE", U_LANGUAGE ) : define( "C_LANGUAGE", C_DEFAULT_LANG ); global $Local; include_once( C_PHPMP_ROOT . 'languages/' . C_LANGUAGE . '/lang_main.php' ); $Local = new Localization(); } } ?> \ No newline at end of file --- 1,20 ---- ! <?php ! ! class Language ! { ! ! function Language() ! { ! ! defined("U_LANGUAGE") ? define( "C_LANGUAGE", U_LANGUAGE ) : define( "C_LANGUAGE", C_DEFAULT_LANG ); ! ! global $Local; ! ! include_once( C_PHPMP_ROOT . 'languages/' . C_LANGUAGE . '/lang_main.php' ); ! $Local = new Localization(); ! ! } ! ! } ! ! ?> \ No newline at end of file Index: sessions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/sessions.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** sessions.php 4 Feb 2003 21:43:24 -0000 1.7 --- sessions.php 8 Feb 2003 09:43:29 -0000 1.8 *************** *** 1 **** ! <?php // Session Management. // To be developed by Eric. ?> \ No newline at end of file --- 1,6 ---- ! <?php ! ! // Session Management. ! // To be developed by Eric. ! ! ?> \ No newline at end of file Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** template.php 7 Feb 2003 23:28:51 -0000 1.26 --- template.php 8 Feb 2003 09:43:29 -0000 1.27 *************** *** 1 **** ! <?php // Contains the Template class. // This will utilize a flat-file template system. class Template extends Smarty { // Assigns template constants. // This function should somehow be integrated into constants.php. // Author: Nrian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignConstants() { $this->assign( array( "C_SITE_ADDR" => SITE_ADDR, "C_SITE_NAME" => SITE_NAME, "C_REL_PATH" => REL_PATH, "C_TIME_NOW" => TIME_NOW, "C_TEMPLATE" => TEMPLATE ) ); } // Assigns template vars through lang files. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignLangVars() { global $Local; $this->assign( $Local->lang ); } // Initiates the Template engine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function Template() { ( defined( "U_USR_TPL" ) && ( C_OVERRIDE_USR_TPL == 0 ) ) ? define( "C_TEMPLATE", U_TEMPLATE ) : define( "C_TEMPLATE", C_DEFAULT_TPL ); // Set up the directories for Smarty. $this->template_dir = './templates/' . C_TEMPLATE; $this->compile_dir = './templates/' . C_TEMPLATE . '/compile'; $this->config_dir = './templates/' . C_TEMPLATE . '/configs'; $this->cache_dir = ''; // Turn on compile_check. $this->compile_check = 1; // Switch for caching. $this->caching = false; // Caching does not currently work. Maybe later. } } ?> \ No newline at end of file --- 1,67 ---- ! <?php ! ! // Contains the Template class. ! // This will utilize a flat-file template system. ! ! class Template extends Smarty ! { ! ! // Assigns template constants. ! // This function should somehow be integrated into constants.php. ! // Author: Nrian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function assignConstants() ! { ! ! $this->assign( array( ! ! "C_SITE_ADDR" => SITE_ADDR, ! "C_SITE_NAME" => SITE_NAME, ! "C_REL_PATH" => REL_PATH, ! "C_TIME_NOW" => TIME_NOW, ! "C_TEMPLATE" => TEMPLATE ! ! ) ); ! ! } ! ! // Assigns template vars through lang files. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function assignLangVars() ! { ! ! global $Local; ! ! $this->assign( $Local->lang ); ! ! } ! ! // Initiates the Template engine. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function Template() ! { ! ! ( defined( "U_USR_TPL" ) && ( C_OVERRIDE_USR_TPL == 0 ) ) ? define( "C_TEMPLATE", U_TEMPLATE ) : define( "C_TEMPLATE", C_DEFAULT_TPL ); ! ! // Set up the directories for Smarty. ! $this->template_dir = './templates/' . C_TEMPLATE; ! $this->compile_dir = './templates/' . C_TEMPLATE . '/compile'; ! $this->config_dir = './templates/' . C_TEMPLATE . '/configs'; ! $this->cache_dir = ''; ! ! // Turn on compile_check. ! $this->compile_check = 1; ! ! // Switch for caching. ! $this->caching = false; // Caching does not currently work. Maybe later. ! ! } ! ! } ! ! ?> \ No newline at end of file Index: user.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/user.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** user.php 7 Feb 2003 23:28:51 -0000 1.13 --- user.php 8 Feb 2003 09:43:29 -0000 1.14 *************** *** 1 **** ! <?php class User // Creates a barrier between the Auth class and the outside world. // If user doesn't need to be auth'ed, he isn't. { // Fetches user information/variables from the database. // Author: Brian 'Heimidal' Rose // Accepts: $user (integer). // Returns: boolean. function _snapshot( $user ) { global $DB; $sql = "SELECT * FROM " . DB_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); $qry = $DB->query($sql); if( $DB->numRows( $qry ) < 1 ) { die('User(' . $user . ') not found.'); } else { $user_array = $DB->fetchArray($qry); while( list ($key, $val) = each ($user_array) ) { define( "U_" . strtoupper($key), "$val" ); } return true; } } // Session cleanup routine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function sessionClean() { global $DB; $rand = rand(0,10); if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. { $sql = "DELETE FROM " . DB_SESSIONS_TABLE . " WHERE expiry<" . time(); $DB->query($sql); } } // User initialization function. Does -EVERYTHING- except explicit session cleanup. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function User() { $this->sessionClean(); // Must decide is this is an anonymous user or a registered user. if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. { // We want to use authentication. global $Auth; include_once( C_PHPMP_ROOT . 'includes/auth.php' ); $Auth = new Auth(); // Initializes Auth, which also authenticates the user. $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. } else // We're not going to bother auth'ing the user. { $this->_snapshot('1'); // Gets snapshot of anon user info/vars. } } } ?> \ No newline at end of file --- 1,92 ---- ! <?php ! ! class User // Creates a barrier between the Auth class and the outside world. ! // If user doesn't need to be auth'ed, he isn't. ! { ! ! // Fetches user information/variables from the database. ! // Author: Brian 'Heimidal' Rose ! // Accepts: $user (integer). ! // Returns: boolean. ! function _snapshot( $user ) ! { ! ! global $DB; ! ! $sql = "SELECT * FROM " . DB_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); ! ! $qry = $DB->query($sql); ! ! if( $DB->numRows( $qry ) < 1 ) { ! ! die('User(' . $user . ') not found.'); ! ! } ! else { ! $user_array = $DB->fetchArray($qry); ! ! while( list ($key, $val) = each ($user_array) ) ! { ! define( "U_" . strtoupper($key), "$val" ); ! } ! ! return true; ! } ! } ! ! // Session cleanup routine. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function sessionClean() ! { ! ! global $DB; ! ! $rand = rand(0,10); ! if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. ! { ! ! $sql = "DELETE FROM " . DB_SESSIONS_TABLE . " WHERE expiry<" . time(); ! $DB->query($sql); ! ! } ! ! } ! ! // User initialization function. Does -EVERYTHING- except explicit session cleanup. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function User() ! { ! ! $this->sessionClean(); ! ! // Must decide is this is an anonymous user or a registered user. ! ! if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. ! { ! ! // We want to use authentication. ! ! global $Auth; ! ! include_once( C_PHPMP_ROOT . 'includes/auth.php' ); ! $Auth = new Auth(); // Initializes Auth, which also authenticates the user. ! ! $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. ! ! } ! else // We're not going to bother auth'ing the user. ! { ! ! $this->_snapshot('1'); // Gets snapshot of anon user info/vars. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:43:32
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory sc8-pr-cvs1:/tmp/cvs-serv10648/languages/english Modified Files: lang_main.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/english/lang_main.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** lang_main.php 7 Feb 2003 23:28:53 -0000 1.16 --- lang_main.php 8 Feb 2003 09:43:29 -0000 1.17 *************** *** 1 **** ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escape singe quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', 'L_Home' => 'Home', 'L_Profile' => 'Profile', 'L_Modules' => 'Modules', 'L_Downloads' => 'Downloads', 'L_Username' => 'Username', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'User Control Panel', 'L_E-mail' => 'E-mail', 'L_Password' => 'Password', 'L_Comfirm' => 'Confirm', 'L_Real Name' => 'Real Name', 'L_Location' => 'Location', 'L_Register' => 'Register', 'L_Welcome' => 'Welcome', 'L_Administration_Area' => 'Administration Area', 'L_Register_a_Username' => 'Register a Username', // // Below is language used almost specifically for auth. // 'L_Login' => 'Login', 'L_Logout' => 'Logout', 'L_Account_Activated' => 'Your account has been activated. You may now log in.', 'L_Required_Field' => 'Denotes a Required Field', 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', 'L_Forgot_Password' => 'Forgot Your Password?', 'L_Not_logged_in' => 'You are not logged in.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file --- 1,66 ---- ! <?php ! ! class Localization ! { ! ! var $lang; ! ! function Localization() ! { ! ! $this->lang = array( ! ! // ! // General language used throughout site. ! // ! // Note: Always escape single quote characters (') with a backslash (\). ! // ! 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', ! 'L_Home' => 'Home', ! 'L_Profile' => 'Profile', ! 'L_Modules' => 'Modules', ! 'L_Downloads' => 'Downloads', ! 'L_Username' => 'Username', ! 'L_User_CP' => 'User CP', ! 'L_User_Control_Panel' => 'User Control Panel', ! 'L_E-mail' => 'E-mail', ! 'L_Password' => 'Password', ! 'L_Comfirm' => 'Confirm', ! 'L_Real Name' => 'Real Name', ! 'L_Location' => 'Location', ! 'L_Register' => 'Register', ! 'L_Welcome' => 'Welcome', ! ! 'L_Administration_Area' => 'Administration Area', ! 'L_Register_a_Username' => 'Register a Username', ! ! ! // ! // Below is language used almost specifically for auth. ! // ! 'L_Login' => 'Login', ! 'L_Logout' => 'Logout', ! ! 'L_Account_Activated' => 'Your account has been activated. You may now log in.', ! 'L_Required_Field' => 'Denotes a Required Field', ! 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', ! 'L_Forgot_Password' => 'Forgot Your Password?', ! 'L_Not_logged_in' => 'You are not logged in.', ! ! ! // ! // Other various parts of the templates. ! // ! 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', ! 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' ! ! // It is IMPERATIVE that the last array value entered (usually the copyright) ! // does not end in a comma. ! ! ); ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:43:32
|
Update of /cvsroot/phpmp/phpMP In directory sc8-pr-cvs1:/tmp/cvs-serv10648 Modified Files: index.php modules.php profile.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** index.php 7 Feb 2003 23:28:48 -0000 1.30 --- index.php 8 Feb 2003 09:43:28 -0000 1.31 *************** *** 1 **** ! <html> <body> <?php define("C_PHPMP_ROOT", "./"); include_once( C_PHPMP_ROOT . 'includes/core.php' ); $Core = new Core(); $Core->init(); // For testing purposes, we will now print all of the constants we have declared. print "phpMP Version: " . C_VERSION . '<br>'; print "<br>"; print "Site Name: " . C_SITE_NAME . '<br>'; print "Site Address: " . C_SITE_ADDR . '<br>'; print "Relative Path: " . C_REL_PATH . '<br>'; print "Default Template: " . C_DEFAULT_TPL . '<br>'; print "Default Language: " . C_DEFAULT_LANG . '<br>'; print "The Current Date and Time: " . C_DATE_NOW . '<br>'; print "Current Logged User: " . U_USERNAME . '<br>'; print "<br>"; print "DB Type: " . DB_TYPE . '<br>'; print "DB Host: " . DB_HOST . '<br>'; print "DB Name: " . DB_NAME . '<br>'; print "DB User: " . DB_USER . '<br>'; print "DB Host: " . DB_TABLE_PREFIX . '<br>'; print "<br>"; print "Config Table: " . DB_CONFIG_TABLE . '<br>'; print "Users Table: " . DB_USERS_TABLE . '<br>'; print "Block Table: " . DB_BLOCK_TABLE . '<br>'; print "Modules Table: " . DB_MODULES_TABLE . '<br>'; print "Sessions Table: " . DB_SESSIONS_TABLE . '<br>'; ?> </body> </html> \ No newline at end of file --- 1,45 ---- ! <html> ! <body> ! ! <?php ! ! define("C_PHPMP_ROOT", "./"); ! include_once( C_PHPMP_ROOT . 'includes/core.php' ); ! $Core = new Core(); ! ! $Core->init(); ! ! // For testing purposes, we will now print all of the constants we have declared. ! ! print "phpMP Version: " . C_VERSION . '<br>'; ! ! print "<br>"; ! ! print "Site Name: " . C_SITE_NAME . '<br>'; ! print "Site Address: " . C_SITE_ADDR . '<br>'; ! print "Relative Path: " . C_REL_PATH . '<br>'; ! print "Default Template: " . C_DEFAULT_TPL . '<br>'; ! print "Default Language: " . C_DEFAULT_LANG . '<br>'; ! print "The Current Date and Time: " . C_DATE_NOW . '<br>'; ! print "Current Logged User: " . U_USERNAME . '<br>'; ! ! print "<br>"; ! ! print "DB Type: " . DB_TYPE . '<br>'; ! print "DB Host: " . DB_HOST . '<br>'; ! print "DB Name: " . DB_NAME . '<br>'; ! print "DB User: " . DB_USER . '<br>'; ! print "DB Host: " . DB_TABLE_PREFIX . '<br>'; ! ! print "<br>"; ! ! print "Config Table: " . DB_CONFIG_TABLE . '<br>'; ! print "Users Table: " . DB_USERS_TABLE . '<br>'; ! print "Block Table: " . DB_BLOCK_TABLE . '<br>'; ! print "Modules Table: " . DB_MODULES_TABLE . '<br>'; ! print "Sessions Table: " . DB_SESSIONS_TABLE . '<br>'; ! ! ?> ! ! </body> ! </html> \ No newline at end of file Index: modules.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/modules.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** modules.php 4 Feb 2003 21:43:07 -0000 1.14 --- modules.php 8 Feb 2003 09:43:29 -0000 1.15 *************** *** 1 **** ! <?php // Module handler. ?> \ No newline at end of file --- 1,5 ---- ! <?php ! ! // Module handler. ! ! ?> \ No newline at end of file Index: profile.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/profile.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** profile.php 4 Feb 2003 21:43:08 -0000 1.7 --- profile.php 8 Feb 2003 09:43:29 -0000 1.8 *************** *** 1 **** ! <?php // Profile handlers. // May be combined with other files, like auth.php or something. ?> \ No newline at end of file --- 1,6 ---- ! <?php ! ! // Profile handlers. ! // May be combined with other files, like auth.php or something. ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:39:56
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv9693 Modified Files: auth.php Log Message: Still correctly the problem with the linebreaks. :-\ Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** auth.php 7 Feb 2003 23:28:49 -0000 1.30 --- auth.php 8 Feb 2003 09:39:52 -0000 1.31 *************** *** 1 **** ! <?php class Auth // Authenticates user. Only included if user auth is set to be used. { var $curr_user; var $session_id; function Auth() { global $DB; // Session ID is contained in the URL. if( isset( $_GET['s'] ) ) { define("C_SESSID_LOC", 1); $this->session_id = $_GET['s']; } // We're using the cookie set by the previous session. elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) { define("C_SESSID_LOC", 2); $this->session_id = $_COOKIE[C_COOKIE_NAME]; } // There is no Session ID. We'll have to make one. else { // Create a Session ID for our use. $this->session_id = makeSessionID(); // We must now determine where the session id should be placed. if( U_SESSION_URL == 1 ) { } } $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $this->session_id . " AND expiry<" . time(); $result = $DB->query($sql); $numrows = $DB->numRows($result); if($numrows >= 1) { $sess_data = $DB->fetchArray($result); } else // The session doesn't exist or has expired. { die("Your session has expired."); } if( C_SESSID_LOC == 2 ) // We need to set up the cookie. { // Set up cookie/url procedures and such. } } } ?> \ No newline at end of file --- 1,75 ---- ! <?php ! ! class Auth // Authenticates user. Only included if user auth is set to be used. ! { ! ! var $curr_user; ! var $session_id; ! ! function Auth() ! { ! ! global $DB; ! ! // Session ID is contained in the URL. ! if( isset( $_GET['s'] ) ) ! { ! define("C_SESSID_LOC", 1); ! ! $this->session_id = $_GET['s']; ! ! } ! // We're using the cookie set by the previous session. ! elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) ! { ! ! define("C_SESSID_LOC", 2); ! ! $this->session_id = $_COOKIE[C_COOKIE_NAME]; ! ! } ! // There is no Session ID. We'll have to make one. ! else ! { ! ! // Create a Session ID for our use. ! $this->session_id = makeSessionID(); ! ! // We must now determine where the session id should be placed. ! if( U_SESSION_URL == 1 ) ! { ! } ! ! } ! ! $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $this->session_id . " AND expiry<" . time(); ! $result = $DB->query($sql); ! ! $numrows = $DB->numRows($result); ! ! if($numrows >= 1) ! { ! ! $sess_data = $DB->fetchArray($result); ! ! } ! else // The session doesn't exist or has expired. ! { ! ! die("Your session has expired."); ! ! } ! ! if( C_SESSID_LOC == 2 ) // We need to set up the cookie. ! { ! ! ! // Set up cookie/url procedures and such. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:38:43
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv9403 Modified Files: functions.php Log Message: oops Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** functions.php 8 Feb 2003 09:36:29 -0000 1.22 --- functions.php 8 Feb 2003 09:38:40 -0000 1.23 *************** *** 4,8 **** // Author: Brian 'Heimidal' Rose // Accepts: none. ! // Returns: none. function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); --- 4,9 ---- // Author: Brian 'Heimidal' Rose // Accepts: none. ! // Returns: none. ! function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); |
From: Brian R. <hei...@us...> - 2003-02-08 09:36:59
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv8999 Modified Files: debug.php Log Message: no message Index: debug.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/debug.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** debug.php 4 Feb 2003 21:43:21 -0000 1.2 --- debug.php 8 Feb 2003 09:36:57 -0000 1.3 *************** *** 1 **** ! <?php class Debug { function Debug() { } } ?> \ No newline at end of file --- 1,13 ---- ! <?php ! ! class Debug ! { ! ! function Debug() ! { ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:36:31
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv8909 Modified Files: functions.php Log Message: no message Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** functions.php 8 Feb 2003 09:31:54 -0000 1.21 --- functions.php 8 Feb 2003 09:36:29 -0000 1.22 *************** *** 15,17 **** } ! ?> --- 15,17 ---- } ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-08 09:31:57
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv7815 Modified Files: functions.php mpcode.php Log Message: Fixing this return problem. Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** functions.php 8 Feb 2003 09:16:22 -0000 1.20 --- functions.php 8 Feb 2003 09:31:54 -0000 1.21 *************** *** 1 **** ! <?php // Defines constants whose contents may be questionable. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); } function makeSessionID() { //This function will make a session. } ?> \ No newline at end of file --- 1,17 ---- ! <?php ! ! // Defines constants whose contents may be questionable. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. function createConstants() ! { ! ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); ! } ! ! ! function makeSessionID() ! { ! ! } ! ! ?> Index: mpcode.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/mpcode.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mpcode.php 4 Feb 2003 21:43:23 -0000 1.2 --- mpcode.php 8 Feb 2003 09:31:54 -0000 1.3 *************** *** 1 **** ! <?php // Content parsing functions to be developed here. // These work similarly to BBCode and the like. ?> \ No newline at end of file --- 1,6 ---- ! <?php ! ! // Content parsing functions to be developed here. ! // These work similarly to BBCode and the like. ! ! ?> |
From: Brian R. <hei...@us...> - 2003-02-08 09:16:25
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv4376 Modified Files: functions.php Log Message: Attempt at fixing crappy CR/LF problem. Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** functions.php 7 Feb 2003 23:28:50 -0000 1.19 --- functions.php 8 Feb 2003 09:16:22 -0000 1.20 *************** *** 1 **** ! <?php // Defines constants whose contents may be questionable. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); } function makeSessionID() { } ?> \ No newline at end of file --- 1 ---- ! <?php // Defines constants whose contents may be questionable. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); } function makeSessionID() { //This function will make a session. } ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-07 23:29:27
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv29029/includes Modified Files: auth.php functions.php language.php template.php user.php Log Message: Various updates and code consolidation. Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** auth.php 6 Feb 2003 01:46:50 -0000 1.29 --- auth.php 7 Feb 2003 23:28:49 -0000 1.30 *************** *** 1,62 **** ! <?php ! ! class Auth // Authenticates user. Only included if user auth is set to be used. ! { ! ! var $curr_user; ! var $SESSID; ! ! function Auth() ! { ! ! global $DB; ! ! // Session ID is contained in the URL. ! if( isset( $_GET['SESSID'] ) ) ! { ! define("C_SESSID_LOC", 1); ! ! $session_id = $_GET['SESSID']; ! ! } ! // We're using the cookie set by the previous session. ! elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) ! { ! ! define("C_SESSID_LOC", 2); ! ! $session_id = $_COOKIE[C_COOKIE_NAME]; ! ! } ! ! $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $session_id . " AND expiry<" . time(); ! $result = $DB->query($sql); ! ! $numrows = $DB->numRows($result); ! ! if($numrows >= 1) ! { ! ! $sess_data = $DB->fetchArray($result); ! ! } ! else // The session doesn't exist or has expired. ! { ! ! die("Your session has expired."); ! ! } ! ! if( C_SESSID_LOC == 2 ) // We need to set up the cookie. ! { ! ! ! // Set up cookie/url procedures and such. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file --- 1 ---- ! <?php class Auth // Authenticates user. Only included if user auth is set to be used. { var $curr_user; var $session_id; function Auth() { global $DB; // Session ID is contained in the URL. if( isset( $_GET['s'] ) ) { define("C_SESSID_LOC", 1); $this->session_id = $_GET['s']; } // We're using the cookie set by the previous session. elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) { define("C_SESSID_LOC", 2); $this->session_id = $_COOKIE[C_COOKIE_NAME]; } // There is no Session ID. We'll have to make one. else { // Create a Session ID for our use. $this->session_id = makeSessionID(); // We must now determine where the session id should be placed. if( U_SESSION_URL == 1 ) { } } $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $this->session_id . " AND expiry<" . time(); $result = $DB->query($sql); $numrows = $DB->numRows($result); if($numrows >= 1) { $sess_data = $DB->fetchArray($result); } else // The session doesn't exist or has expired. { die("Your session has expired."); } if( C_SESSID_LOC == 2 ) // We need to set up the cookie. { // Set up cookie/url procedures and such. } } } ?> \ No newline at end of file Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** functions.php 6 Feb 2003 01:50:32 -0000 1.18 --- functions.php 7 Feb 2003 23:28:50 -0000 1.19 *************** *** 1,21 **** ! <?php ! ! // Defines constants whose contents may be questionable. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function createConstants() ! { ! ! if( U_DATE_FORMAT != '' ) ! { ! define( "C_DATE_FORMAT", U_DATE_FORMAT ); ! } ! else ! { ! define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); ! } ! ! } ! ! ?> \ No newline at end of file --- 1 ---- ! <?php // Defines constants whose contents may be questionable. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function createConstants() { ( U_DATE_FORMAT != '' ) ? define( "C_DATE_FORMAT", U_DATE_FORMAT ) : define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); } function makeSessionID() { } ?> \ No newline at end of file Index: language.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/language.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** language.php 4 Feb 2003 21:43:23 -0000 1.7 --- language.php 7 Feb 2003 23:28:50 -0000 1.8 *************** *** 1 **** ! <?php class Language { function Language() { if( defined("U_LANGUAGE") ) { define( "C_LANGUAGE", U_LANGUAGE ); } else { define( "C_LANGUAGE", C_DEFAULT_LANG ); } global $Local; include_once( C_PHPMP_ROOT . 'languages/' . C_LANGUAGE . '/lang_main.php' ); $Local = new Localization(); } } ?> \ No newline at end of file --- 1 ---- ! <?php class Language { function Language() { defined("U_LANGUAGE") ? define( "C_LANGUAGE", U_LANGUAGE ) : define( "C_LANGUAGE", C_DEFAULT_LANG ); global $Local; include_once( C_PHPMP_ROOT . 'languages/' . C_LANGUAGE . '/lang_main.php' ); $Local = new Localization(); } } ?> \ No newline at end of file Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/template.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** template.php 4 Feb 2003 21:43:26 -0000 1.25 --- template.php 7 Feb 2003 23:28:51 -0000 1.26 *************** *** 1 **** ! <?php // Contains the Template class. // This will utilize a flat-file template system. class Template extends Smarty { // Assigns template constants. // This function should somehow be integrated into constants.php. // Author: Nrian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignConstants() { $this->assign( array( "C_SITE_ADDR" => SITE_ADDR, "C_SITE_NAME" => SITE_NAME, "C_REL_PATH" => REL_PATH, "C_TIME_NOW" => TIME_NOW, "C_TEMPLATE" => TEMPLATE ) ); } // Assigns template vars through lang files. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignLangVars() { global $Local; $this->assign( $Local->lang ); } // Initiates the Template engine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function Template() { if( defined( "U_USR_TPL" ) && ( C_OVERRIDE_USR_TPL == 0 ) ) { define( "C_TEMPLATE", U_TEMPLATE ); } else { define( "C_TEMPLATE", C_DEFAULT_TPL ); } // Set up the directories for Smarty. $this->template_dir = './templates/' . C_TEMPLATE; $this->compile_dir = './templates/' . C_TEMPLATE . '/compile'; $this->config_dir = './templates/' . C_TEMPLATE . '/configs'; $this->cache_dir = ''; // Turn on compile_check. $this->compile_check = 1; // Switch for caching. $this->caching = false; // Caching does not currently work. Maybe later. } } ?> \ No newline at end of file --- 1 ---- ! <?php // Contains the Template class. // This will utilize a flat-file template system. class Template extends Smarty { // Assigns template constants. // This function should somehow be integrated into constants.php. // Author: Nrian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignConstants() { $this->assign( array( "C_SITE_ADDR" => SITE_ADDR, "C_SITE_NAME" => SITE_NAME, "C_REL_PATH" => REL_PATH, "C_TIME_NOW" => TIME_NOW, "C_TEMPLATE" => TEMPLATE ) ); } // Assigns template vars through lang files. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function assignLangVars() { global $Local; $this->assign( $Local->lang ); } // Initiates the Template engine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function Template() { ( defined( "U_USR_TPL" ) && ( C_OVERRIDE_USR_TPL == 0 ) ) ? define( "C_TEMPLATE", U_TEMPLATE ) : define( "C_TEMPLATE", C_DEFAULT_TPL ); // Set up the directories for Smarty. $this->template_dir = './templates/' . C_TEMPLATE; $this->compile_dir = './templates/' . C_TEMPLATE . '/compile'; $this->config_dir = './templates/' . C_TEMPLATE . '/configs'; $this->cache_dir = ''; // Turn on compile_check. $this->compile_check = 1; // Switch for caching. $this->caching = false; // Caching does not currently work. Maybe later. } } ?> \ No newline at end of file Index: user.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/user.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** user.php 6 Feb 2003 01:46:50 -0000 1.12 --- user.php 7 Feb 2003 23:28:51 -0000 1.13 *************** *** 1,92 **** ! <?php ! ! class User // Creates a barrier between the Auth class and the outside world. ! // If user doesn't need to be auth'ed, he isn't. ! { ! ! // Fetches user information/variables from the database. ! // Author: Brian 'Heimidal' Rose ! // Accepts: $user (integer). ! // Returns: boolean. ! function _snapshot( $user ) ! { ! ! global $DB; ! ! $sql = "SELECT * FROM " . DB_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); ! ! $qry = $DB->query($sql); ! ! if( $DB->numRows( $qry ) < 1 ) { ! ! return false; ! ! } ! else { ! $user_array = $DB->fetchArray($qry); ! ! while( list ($key, $val) = each ($user_array) ) ! { ! define( "U_" . strtoupper($key), "$val" ); ! } ! ! return true; ! } ! } ! ! // Session cleanup routine. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function sessionClean() ! { ! ! global $DB; ! ! $rand = rand(0,10); ! if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. ! { ! ! $sql = "DELETE FROM " . DB_SESSIONS_TABLE . " WHERE expiry<" . time(); ! $DB->query($sql); ! ! } ! ! } ! ! // User initialization function. Does -EVERYTHING- except explicit session cleanup. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function User() ! { ! ! $this->sessionClean(); ! ! // Must decide is this is an anonymous user or a registered user. ! ! if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. ! { ! ! // We want to use authentication. ! ! global $Auth; ! ! include_once( C_PHPMP_ROOT . 'includes/auth.php' ); ! $Auth = new Auth(); // Initializes Auth, which also authenticates the user. ! ! $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. ! ! } ! else // We're not going to bother auth'ing the user. ! { ! ! $this->_snapshot('1'); // Gets snapshot of anon user info/vars. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file --- 1 ---- ! <?php class User // Creates a barrier between the Auth class and the outside world. // If user doesn't need to be auth'ed, he isn't. { // Fetches user information/variables from the database. // Author: Brian 'Heimidal' Rose // Accepts: $user (integer). // Returns: boolean. function _snapshot( $user ) { global $DB; $sql = "SELECT * FROM " . DB_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); $qry = $DB->query($sql); if( $DB->numRows( $qry ) < 1 ) { die('User(' . $user . ') not found.'); } else { $user_array = $DB->fetchArray($qry); while( list ($key, $val) = each ($user_array) ) { define( "U_" . strtoupper($key), "$val" ); } return true; } } // Session cleanup routine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function sessionClean() { global $DB; $rand = rand(0,10); if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. { $sql = "DELETE FROM " . DB_SESSIONS_TABLE . " WHERE expiry<" . time(); $DB->query($sql); } } // User initialization function. Does -EVERYTHING- except explicit session cleanup. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function User() { $this->sessionClean(); // Must decide is this is an anonymous user or a registered user. if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. { // We want to use authentication. global $Auth; include_once( C_PHPMP_ROOT . 'includes/auth.php' ); $Auth = new Auth(); // Initializes Auth, which also authenticates the user. $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. } else // We're not going to bother auth'ing the user. { $this->_snapshot('1'); // Gets snapshot of anon user info/vars. } } } ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-07 23:29:22
|
Update of /cvsroot/phpmp/phpMP In directory sc8-pr-cvs1:/tmp/cvs-serv29029 Modified Files: index.php Log Message: Various updates and code consolidation. Index: index.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/index.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** index.php 4 Feb 2003 21:43:03 -0000 1.29 --- index.php 7 Feb 2003 23:28:48 -0000 1.30 *************** *** 1 **** ! <html> <body> <?php define("C_PHPMP_ROOT", "./"); include_once( C_PHPMP_ROOT . 'includes/core.php' ); $Core = new Core(); $Core->init(); // For testing purposes, we will now print all of the constants we have declared. print "phpMP Version: " . C_VERSION . '<br>'; print "<br>"; print "Site Name: " . C_SITE_NAME . '<br>'; print "Site Address: " . C_SITE_ADDR . '<br>'; print "Relative Path: " . C_REL_PATH . '<br>'; print "Default Template: " . C_DEFAULT_TPL . '<br>'; print "Default Language: " . C_DEFAULT_LANG . '<br>'; print "The Current Date and Time: " . C_DATE_NOW . '<br>'; print "Current Logged User: " . U_USERNAME . '<br>'; print "<br>"; print "DB Type: " . DB_TYPE . '<br>'; print "DB Host: " . DB_HOST . '<br>'; print "DB Name: " . DB_NAME . '<br>'; print "DB User: " . DB_USER . '<br>'; print "DB Host: " . DB_TABLE_PREFIX . '<br>'; print "<br>"; print "Config Table: " . C_CONFIG_TABLE . '<br>'; print "Users Table: " . C_USERS_TABLE . '<br>'; print "Block Table: " . C_BLOCK_TABLE . '<br>'; print "Modules Table: " . C_MODULES_TABLE . '<br>'; print "Session Table: " . C_SESSIONS_TABLE . '<br>'; ?> </body> </html> \ No newline at end of file --- 1 ---- ! <html> <body> <?php define("C_PHPMP_ROOT", "./"); include_once( C_PHPMP_ROOT . 'includes/core.php' ); $Core = new Core(); $Core->init(); // For testing purposes, we will now print all of the constants we have declared. print "phpMP Version: " . C_VERSION . '<br>'; print "<br>"; print "Site Name: " . C_SITE_NAME . '<br>'; print "Site Address: " . C_SITE_ADDR . '<br>'; print "Relative Path: " . C_REL_PATH . '<br>'; print "Default Template: " . C_DEFAULT_TPL . '<br>'; print "Default Language: " . C_DEFAULT_LANG . '<br>'; print "The Current Date and Time: " . C_DATE_NOW . '<br>'; print "Current Logged User: " . U_USERNAME . '<br>'; print "<br>"; print "DB Type: " . DB_TYPE . '<br>'; print "DB Host: " . DB_HOST . '<br>'; print "DB Name: " . DB_NAME . '<br>'; print "DB User: " . DB_USER . '<br>'; print "DB Host: " . DB_TABLE_PREFIX . '<br>'; print "<br>"; print "Config Table: " . DB_CONFIG_TABLE . '<br>'; print "Users Table: " . DB_USERS_TABLE . '<br>'; print "Block Table: " . DB_BLOCK_TABLE . '<br>'; print "Modules Table: " . DB_MODULES_TABLE . '<br>'; print "Sessions Table: " . DB_SESSIONS_TABLE . '<br>'; ?> </body> </html> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-07 23:28:59
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory sc8-pr-cvs1:/tmp/cvs-serv29029/languages/english Modified Files: lang_main.php Log Message: Various updates and code consolidation. Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/english/lang_main.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** lang_main.php 4 Feb 2003 21:43:29 -0000 1.15 --- lang_main.php 7 Feb 2003 23:28:53 -0000 1.16 *************** *** 1 **** ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escaple singe quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', 'L_Home' => 'Home', 'L_Profile' => 'Profile', 'L_Modules' => 'Modules', 'L_Downloads' => 'Downloads', 'L_Username' => 'Username', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'User Control Panel', 'L_E-mail' => 'E-mail', 'L_Password' => 'Password', 'L_Comfirm' => 'Confirm', 'L_Real Name' => 'Real Name', 'L_Location' => 'Location', 'L_Register' => 'Register', 'L_Welcome' => 'Welcome', 'L_Administration_Area' => 'Administration Area', 'L_Register_a_Username' => 'Register a Username', // // Below is language used almost specifically for auth. // 'L_Login' => 'Login', 'L_Logout' => 'Logout', 'L_Account_Activated' => 'Your account has been activated. You may now log in.', 'L_Required_Field' => 'Denotes a Required Field', 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', 'L_Forgot_Password' => 'Forgot Your Password?', 'L_Not_logged_in' => 'You are not logged in.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file --- 1 ---- ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escape singe quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', 'L_Home' => 'Home', 'L_Profile' => 'Profile', 'L_Modules' => 'Modules', 'L_Downloads' => 'Downloads', 'L_Username' => 'Username', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'User Control Panel', 'L_E-mail' => 'E-mail', 'L_Password' => 'Password', 'L_Comfirm' => 'Confirm', 'L_Real Name' => 'Real Name', 'L_Location' => 'Location', 'L_Register' => 'Register', 'L_Welcome' => 'Welcome', 'L_Administration_Area' => 'Administration Area', 'L_Register_a_Username' => 'Register a Username', // // Below is language used almost specifically for auth. // 'L_Login' => 'Login', 'L_Logout' => 'Logout', 'L_Account_Activated' => 'Your account has been activated. You may now log in.', 'L_Required_Field' => 'Denotes a Required Field', 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', 'L_Forgot_Password' => 'Forgot Your Password?', 'L_Not_logged_in' => 'You are not logged in.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-06 02:11:08
|
Update of /cvsroot/phpmp/phpMP/includes/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv4545 Added Files: function.mailto.php outputfilter.trimwhitespace.php Log Message: Update to Smarty 2.4.0. --- NEW FILE: function.mailto.php --- <?php /* * Smarty plugin * ------------------------------------------------------------- * Type: function * Name: mailto * Version: 1.2 * Date: May 21, 2002 * Author: Monte Ohrt <mo...@is...> * Credits: Jason Sweat (added cc, bcc and subject functionality) * Purpose: automate mailto address link creation, and optionally * encode them. * Input: address = e-mail address * text = (optional) text to display, default is address * encode = (optional) can be one of: * none : no encoding (default) * javascript : encode with javascript * hex : encode with hexidecimal (no javascript) * cc = (optional) address(es) to carbon copy * bcc = (optional) address(es) to blind carbon copy * subject = (optional) e-mail subject * newsgroups = (optional) newsgroup(s) to post to * followupto = (optional) address(es) to follow up to * extra = (optional) extra tags for the href link * * Examples: {mailto address="me...@do..."} * {mailto address="me...@do..." encode="javascript"} * {mailto address="me...@do..." encode="hex"} * {mailto address="me...@do..." subject="Hello to you!"} * {mailto address="me...@do..." cc="yo...@do...,th...@do..."} * {mailto address="me...@do..." extra='class="mailto"'} * ------------------------------------------------------------- */ function smarty_function_mailto($params, &$smarty) { extract($params); if (empty($address)) { $smarty->trigger_error("mailto: missing 'address' parameter"); return; } if (empty($text)) { $text = $address; } // netscape and mozilla do not decode %40 (@) in BCC field (bug?) // so, don't encode it. $mail_parms = array(); if (!empty($cc)) { $mail_parms[] = 'cc='.str_replace('%40','@',rawurlencode($cc)); } if (!empty($bcc)) { $mail_parms[] = 'bcc='.str_replace('%40','@',rawurlencode($bcc)); } if (!empty($subject)) { $mail_parms[] = 'subject='.rawurlencode($subject); } if (!empty($newsgroups)) { $mail_parms[] = 'newsgroups='.rawurlencode($newsgroups); } if (!empty($followupto)) { $mail_parms[] = 'followupto='.str_replace('%40','@',rawurlencode($followupto)); } for ($i=0; $i<count($mail_parms); $i++) { $mail_parm_vals .= (0==$i) ? '?' : '&'; $mail_parm_vals .= $mail_parms[$i]; } $address .= $mail_parm_vals; if (empty($encode)) { $encode = 'none'; } elseif (!in_array($encode,array('javascript','hex','none')) ) { $smarty->trigger_error("mailto: 'encode' parameter must be none, javascript or hex"); return; } if ($encode == 'javascript' ) { $string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');'; for ($x=0; $x < strlen($string); $x++) { $js_encode .= '%' . bin2hex($string[$x]); } return '<SCRIPT language="javascript">eval(unescape(\''.$js_encode.'\'))</SCRIPT>'; } elseif ($encode == 'hex') { preg_match('!^(.*)(\?.*)$!',$address,$match); if(!empty($match[2])) { $smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript."); return; } for ($x=0; $x < strlen($address); $x++) { if(preg_match('!\w!',$address[$x])) { $address_encode .= '%' . bin2hex($address[$x]); } else { $address_encode .= $address[$x]; } } for ($x=0; $x < strlen($text); $x++) { $text_encode .= '&#x' . bin2hex($text[$x]).';'; } return '<a href="mailto:'.$address_encode.'" '.$extra.'>'.$text_encode.'</a>'; } else { // no encoding return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>'; } } /* vim: set expandtab: */ ?> --- NEW FILE: outputfilter.trimwhitespace.php --- <?php /* * Smarty plugin * ------------------------------------------------------------- * File: outputfilter.trimwhitespace.php * Type: outputfilter * Name: trimwhitespace * Version: 1.3 * Date: Jan 25, 2003 * Purpose: trim leading white space and blank lines from * template source after it gets interpreted, cleaning * up code and saving bandwidth. Does not affect * <PRE></PRE> and <SCRIPT></SCRIPT> blocks. * Install: Drop into the plugin directory, call * $smarty->load_filter('output','trimwhitespace'); * from application. * Author: Monte Ohrt <mo...@is...> * Contribs: Lars Noschinski <la...@us...> * ------------------------------------------------------------- */ function smarty_outputfilter_trimwhitespace($source, &$smarty) { // Pull out the script blocks preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match); $_script_blocks = $match[0]; $source = preg_replace("!<script[^>]+>.*?</script>!is", '@@@SMARTY:TRIM:SCRIPT@@@', $source); // Pull out the pre blocks preg_match_all("!<pre>.*?</pre>!is", $source, $match); $_pre_blocks = $match[0]; $source = preg_replace("!<pre>.*?</pre>!is", '@@@SMARTY:TRIM:PRE@@@', $source); // Pull out the textarea blocks preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match); $_textarea_blocks = $match[0]; $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is", '@@@SMARTY:TRIM:TEXTAREA@@@', $source); // remove all leading spaces, tabs and carriage returns NOT // preceeded by a php close tag. $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source)); // replace script blocks foreach($_script_blocks as $curr_block) { $source = preg_replace("!@@@SMARTY:TRIM:SCRIPT@@@!",$curr_block,$source,1); } // replace pre blocks foreach($_pre_blocks as $curr_block) { $source = preg_replace("!@@@SMARTY:TRIM:PRE@@@!",$curr_block,$source,1); } // replace textarea blocks foreach($_textarea_blocks as $curr_block) { $source = preg_replace("!@@@SMARTY:TRIM:TEXTAREA@@@!",$curr_block,$source,1); } return $source; } ?> |
From: Brian R. <hei...@us...> - 2003-02-06 02:09:58
|
Update of /cvsroot/phpmp/phpMP/includes/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv4088/plugins Modified Files: function.counter.php function.cycle.php function.debug.php function.eval.php function.fetch.php function.html_options.php function.html_select_date.php function.html_select_time.php function.math.php function.popup.php function.popup_init.php modifier.debug_print_var.php modifier.escape.php Log Message: Update to Smarty 2.4.0. Index: function.counter.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.counter.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.counter.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.counter.php 6 Feb 2003 02:09:54 -0000 1.2 *************** *** 43,48 **** } ! if ($printval[$name]) ! echo $count[$name]; if (isset($skip)) --- 43,51 ---- } ! if ($printval[$name]) { ! $retval = $count[$name]; ! } else { ! $retval = null; ! } if (isset($skip)) *************** *** 60,63 **** --- 63,69 ---- else $count[$name] += $skipval[$name]; + + return $retval; + } Index: function.cycle.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.cycle.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.cycle.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.cycle.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 87,91 **** if($print) { ! echo $cycle_array[$cycle_vars[$name]['index']]; } --- 87,93 ---- if($print) { ! $retval = $cycle_array[$cycle_vars[$name]['index']]; ! } else { ! $retval = null; } *************** *** 97,100 **** --- 99,104 ---- } } + + return $retval; } Index: function.debug.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.debug.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.debug.php 28 Nov 2002 05:27:53 -0000 1.1 --- function.debug.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 17,21 **** $smarty->assign('_smarty_debug_output',$params['output']); } ! echo $smarty->_generate_debug_output(); } --- 17,21 ---- $smarty->assign('_smarty_debug_output',$params['output']); } ! return $smarty->_generate_debug_output(); } Index: function.eval.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.eval.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.eval.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.eval.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 23,33 **** $this->_compile_template("evaluated template", $var, $source); if (!empty($assign)) { ! ob_start(); ! eval('?>' . $source); ! $this->assign($assign, ob_get_contents()); ! ob_end_clean(); } else { ! eval('?>' . $source); } } --- 23,35 ---- $this->_compile_template("evaluated template", $var, $source); + ob_start(); + eval('?>' . $source); + $contents = ob_get_contents(); + ob_end_clean(); + if (!empty($assign)) { ! $this->assign($assign, $contents); } else { ! return $contents; } } Index: function.fetch.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.fetch.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.fetch.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.fetch.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 14,18 **** if (empty($file)) { ! $smarty->_trigger_plugin_error("parameter 'file' cannot be empty"); return; } --- 14,18 ---- if (empty($file)) { ! $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty"); return; } *************** *** 27,31 **** } if (!$resource_is_secure) { ! $smarty->_trigger_plugin_error("(secure mode) fetch '$file' is not allowed"); return; } --- 27,31 ---- } if (!$resource_is_secure) { ! $smarty->_trigger_fatal_error("[plugin] (secure mode) fetch '$file' is not allowed"); return; } *************** *** 37,41 **** fclose($fp); } else { ! $smarty->_trigger_plugin_error("fetch cannot read file '$file'"); return; } --- 37,41 ---- fclose($fp); } else { ! $smarty->_trigger_fatal_error("[plugin] fetch cannot read file '$file'"); return; } *************** *** 51,59 **** $agent = "Smarty Template Engine ".$smarty->_version; $referer = ""; ! if(!empty($uri_parts['path'])) { ! $uri = $uri_parts['path']; ! } else { ! $uri = '/'; ! } $_is_proxy = false; if(empty($uri_parts['port'])) { --- 51,56 ---- $agent = "Smarty Template Engine ".$smarty->_version; $referer = ""; ! $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; ! $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; $_is_proxy = false; if(empty($uri_parts['port'])) { *************** *** 90,94 **** if(!empty($param_value)) { if(!preg_match('![\w\d-]+: .+!',$param_value)) { ! $smarty->_trigger_plugin_error("invalid header format '".$param_value."'"); return; } else { --- 87,91 ---- if(!empty($param_value)) { if(!preg_match('![\w\d-]+: .+!',$param_value)) { ! $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'"); return; } else { *************** *** 106,110 **** $proxy_port = (int) $param_value; } else { ! $smarty->_trigger_plugin_error("invalid value for attribute '".$param_key."'"); return; } --- 103,107 ---- $proxy_port = (int) $param_value; } else { ! $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); return; } *************** *** 124,133 **** $timeout = (int) $param_value; } else { ! $smarty->_trigger_plugin_error("invalid value for attribute '".$param_key."'"); return; } break; default: ! $smarty->_trigger_plugin_error("unrecognized attribute '".$param_key."'"); return; } --- 121,130 ---- $timeout = (int) $param_value; } else { ! $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); return; } break; default: ! $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'"); return; } *************** *** 141,145 **** if(!$fp) { ! $smarty->_trigger_plugin_error("unable to fetch: $errstr ($errno)"); return; } else { --- 138,142 ---- if(!$fp) { ! $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)"); return; } else { *************** *** 184,188 **** } } else { ! $smarty->_trigger_plugin_error("unable to parse URL, check syntax"); return; } --- 181,185 ---- } } else { ! $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax"); return; } *************** *** 195,199 **** fclose($fp); } else { ! $smarty->_trigger_plugin_error("fetch cannot read file '$file'"); return; } --- 192,196 ---- fclose($fp); } else { ! $smarty->_trigger_fatal_error("[plugin] fetch cannot read file '$file'"); return; } *************** *** 206,210 **** $smarty->assign($params['assign'],$content); } else { ! echo $content; } } --- 203,207 ---- $smarty->assign($params['assign'],$content); } else { ! return $content; } } Index: function.html_options.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.html_options.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** function.html_options.php 28 Nov 2002 05:27:53 -0000 1.2 --- function.html_options.php 6 Feb 2003 02:09:55 -0000 1.3 *************** *** 12,17 **** function smarty_function_html_options($params, &$smarty) { - $print_result = true; - extract($params); --- 12,15 ---- *************** *** 36,51 **** } ! if ($print_result) ! print $html_result; ! else ! return $html_result; } function smarty_function_html_options_optoutput($key, $value, $selected) { if(!is_array($value)) { ! $html_result = "<option label=\"$key\" value=\"$key\""; if (in_array($key, $selected)) $html_result .= " selected=\"selected\""; ! $html_result .= ">$value</option>\n"; } else { $html_result = smarty_function_html_options_optgroup($key, $value, $selected); --- 34,47 ---- } ! return $html_result; } function smarty_function_html_options_optoutput($key, $value, $selected) { if(!is_array($value)) { ! $html_result = '<option label="' . htmlspecialchars($value) . '" value="' . ! htmlspecialchars($key) . '"'; if (in_array($key, $selected)) $html_result .= " selected=\"selected\""; ! $html_result .= '>' . htmlspecialchars($value) . '</option>' . "\n"; } else { $html_result = smarty_function_html_options_optgroup($key, $value, $selected); *************** *** 55,59 **** function smarty_function_html_options_optgroup($key, $values, $selected) { ! $optgroup_html = "<optgroup label=\"$key\">\n"; foreach ($values as $key => $value) { $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected); --- 51,55 ---- function smarty_function_html_options_optgroup($key, $values, $selected) { ! $optgroup_html = '<optgroup label="' . htmlspecialchars($value) . '">' . "\n"; foreach ($values as $key => $value) { $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected); Index: function.html_select_date.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.html_select_date.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.html_select_date.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.html_select_date.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 16,19 **** --- 16,21 ---- * 1.3 added support for choosing format for * month values (Gary Loescher) + * 1.3.1 added support for choosing format for + * day values (Marcus Bointon) * ------------------------------------------------------------- */ *************** *** 33,36 **** --- 35,40 ---- $month_value_format = "%m"; $day_format = "%02d"; + /* Write day values using this format MB */ + $day_value_format = "%d"; $year_as_text = false; /* Display years in reverse order? Ie. 2000,1999,.... */ *************** *** 129,134 **** if ($display_days) { $days = array(); ! for ($i = 1; $i <= 31; $i++) $days[] = sprintf($day_format, $i); $day_result .= '<select name='; --- 133,140 ---- if ($display_days) { $days = array(); ! for ($i = 1; $i <= 31; $i++) { $days[] = sprintf($day_format, $i); + $day_values[] = sprintf($day_value_format, $i); + } $day_result .= '<select name='; *************** *** 149,153 **** $day_result .= '>'."\n"; $day_result .= smarty_function_html_options(array('output' => $days, ! 'values' => range(1, 31), 'selected' => $time[2], 'print_result' => false), --- 155,159 ---- $day_result .= '>'."\n"; $day_result .= smarty_function_html_options(array('output' => $days, ! 'values' => $day_values, 'selected' => $time[2], 'print_result' => false), *************** *** 219,223 **** } ! print $html_result; } --- 225,229 ---- } ! return $html_result; } Index: function.html_select_time.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.html_select_time.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** function.html_select_time.php 28 Nov 2002 05:27:53 -0000 1.2 --- function.html_select_time.php 6 Feb 2003 02:09:55 -0000 1.3 *************** *** 145,149 **** } ! print $html_result; } --- 145,149 ---- } ! return $html_result; } Index: function.math.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.math.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.math.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.math.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 56,60 **** if (empty($params['format'])) { if (empty($params['assign'])) { ! echo $smarty_math_result; } else { $smarty->assign($params['assign'],$smarty_math_result); --- 56,60 ---- if (empty($params['format'])) { if (empty($params['assign'])) { ! return $smarty_math_result; } else { $smarty->assign($params['assign'],$smarty_math_result); Index: function.popup.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.popup.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** function.popup.php 25 Jul 2002 11:06:25 -0000 1.1 --- function.popup.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 20,72 **** if (empty($trigger)) { $trigger = "onMouseOver"; } ! echo $trigger.'="return overlib(\''.str_replace("'","\'",$text).'\''; ! if ($sticky) { echo ",STICKY"; } ! if (!empty($caption)) { echo ",CAPTION,'".str_replace("'","\'",$caption)."'"; } ! if (!empty($fgcolor)) { echo ",FGCOLOR,'$fgcolor'"; } ! if (!empty($bgcolor)) { echo ",BGCOLOR,'$bgcolor'"; } ! if (!empty($textcolor)) { echo ",TEXTCOLOR,'$textcolor'"; } ! if (!empty($capcolor)) { echo ",CAPCOLOR,'$capcolor'"; } ! if (!empty($closecolor)) { echo ",CLOSECOLOR,'$closecolor'"; } ! if (!empty($textfont)) { echo ",TEXTFONT,'$textfont'"; } ! if (!empty($captionfont)) { echo ",CAPTIONFONT,'$captionfont'"; } ! if (!empty($closefont)) { echo ",CLOSEFONT,'$closefont'"; } ! if (!empty($textsize)) { echo ",TEXTSIZE,$textsize"; } ! if (!empty($captionsize)) { echo ",CAPTIONSIZE,$captionsize"; } ! if (!empty($closesize)) { echo ",CLOSESIZE,$closesize"; } ! if (!empty($width)) { echo ",WIDTH,$width"; } ! if (!empty($height)) { echo ",HEIGHT,$height"; } ! if (!empty($left)) { echo ",LEFT"; } ! if (!empty($right)) { echo ",RIGHT"; } ! if (!empty($center)) { echo ",CENTER"; } ! if (!empty($above)) { echo ",ABOVE"; } ! if (!empty($below)) { echo ",BELOW"; } ! if (isset($border)) { echo ",BORDER,$border"; } ! if (isset($offsetx)) { echo ",OFFSETX,$offsetx"; } ! if (isset($offsety)) { echo ",OFFSETY,$offsety"; } ! if (!empty($fgbackground)) { echo ",FGBACKGROUND,'$fgbackground'"; } ! if (!empty($bgbackground)) { echo ",BGBACKGROUND,'$bgbackground'"; } ! if (!empty($closetext)) { echo ",CLOSETEXT,'".str_replace("'","\'",$closetext)."'"; } ! if (!empty($noclose)) { echo ",NOCLOSE"; } ! if (!empty($status)) { echo ",STATUS,'".str_replace("'","\'",$status)."'"; } ! if (!empty($autostatus)) { echo ",AUTOSTATUS"; } ! if (!empty($autostatuscap)) { echo ",AUTOSTATUSCAP"; } ! if (isset($inarray)) { echo ",INARRAY,'$inarray'"; } ! if (isset($caparray)) { echo ",CAPARRAY,'$caparray'"; } ! if (!empty($capicon)) { echo ",CAPICON,'$capicon'"; } ! if (!empty($snapx)) { echo ",SNAPX,$snapx"; } ! if (!empty($snapy)) { echo ",SNAPY,$snapy"; } ! if (isset($fixx)) { echo ",FIXX,$fixx"; } ! if (isset($fixy)) { echo ",FIXY,$fixy"; } ! if (!empty($background)) { echo ",BACKGROUND,'$background'"; } ! if (!empty($padx)) { echo ",PADX,$padx"; } ! if (!empty($pady)) { echo ",PADY,$pady"; } ! if (!empty($fullhtml)) { echo ",FULLHTML"; } ! if (!empty($frame)) { echo ",FRAME,'$frame'"; } ! if (isset($timeout)) { echo ",TIMEOUT,$timeout"; } ! if (!empty($function)) { echo ",FUNCTION,'$function'"; } ! if (isset($delay)) { echo ",DELAY,$delay"; } ! if (!empty($hauto)) { echo ",HAUTO"; } ! if (!empty($vauto)) { echo ",VAUTO"; } ! echo ');" onMouseOut="nd();"'; } --- 20,74 ---- if (empty($trigger)) { $trigger = "onMouseOver"; } ! $retval .= $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\''; ! if ($sticky) { $retval .= ",STICKY"; } ! if (!empty($caption)) { $retval .= ",CAPTION,'".str_replace("'","\'",$caption)."'"; } ! if (!empty($fgcolor)) { $retval .= ",FGCOLOR,'$fgcolor'"; } ! if (!empty($bgcolor)) { $retval .= ",BGCOLOR,'$bgcolor'"; } ! if (!empty($textcolor)) { $retval .= ",TEXTCOLOR,'$textcolor'"; } ! if (!empty($capcolor)) { $retval .= ",CAPCOLOR,'$capcolor'"; } ! if (!empty($closecolor)) { $retval .= ",CLOSECOLOR,'$closecolor'"; } ! if (!empty($textfont)) { $retval .= ",TEXTFONT,'$textfont'"; } ! if (!empty($captionfont)) { $retval .= ",CAPTIONFONT,'$captionfont'"; } ! if (!empty($closefont)) { $retval .= ",CLOSEFONT,'$closefont'"; } ! if (!empty($textsize)) { $retval .= ",TEXTSIZE,$textsize"; } ! if (!empty($captionsize)) { $retval .= ",CAPTIONSIZE,$captionsize"; } ! if (!empty($closesize)) { $retval .= ",CLOSESIZE,$closesize"; } ! if (!empty($width)) { $retval .= ",WIDTH,$width"; } ! if (!empty($height)) { $retval .= ",HEIGHT,$height"; } ! if (!empty($left)) { $retval .= ",LEFT"; } ! if (!empty($right)) { $retval .= ",RIGHT"; } ! if (!empty($center)) { $retval .= ",CENTER"; } ! if (!empty($above)) { $retval .= ",ABOVE"; } ! if (!empty($below)) { $retval .= ",BELOW"; } ! if (isset($border)) { $retval .= ",BORDER,$border"; } ! if (isset($offsetx)) { $retval .= ",OFFSETX,$offsetx"; } ! if (isset($offsety)) { $retval .= ",OFFSETY,$offsety"; } ! if (!empty($fgbackground)) { $retval .= ",FGBACKGROUND,'$fgbackground'"; } ! if (!empty($bgbackground)) { $retval .= ",BGBACKGROUND,'$bgbackground'"; } ! if (!empty($closetext)) { $retval .= ",CLOSETEXT,'".str_replace("'","\'",$closetext)."'"; } ! if (!empty($noclose)) { $retval .= ",NOCLOSE"; } ! if (!empty($status)) { $retval .= ",STATUS,'".str_replace("'","\'",$status)."'"; } ! if (!empty($autostatus)) { $retval .= ",AUTOSTATUS"; } ! if (!empty($autostatuscap)) { $retval .= ",AUTOSTATUSCAP"; } ! if (isset($inarray)) { $retval .= ",INARRAY,'$inarray'"; } ! if (isset($caparray)) { $retval .= ",CAPARRAY,'$caparray'"; } ! if (!empty($capicon)) { $retval .= ",CAPICON,'$capicon'"; } ! if (!empty($snapx)) { $retval .= ",SNAPX,$snapx"; } ! if (!empty($snapy)) { $retval .= ",SNAPY,$snapy"; } ! if (isset($fixx)) { $retval .= ",FIXX,$fixx"; } ! if (isset($fixy)) { $retval .= ",FIXY,$fixy"; } ! if (!empty($background)) { $retval .= ",BACKGROUND,'$background'"; } ! if (!empty($padx)) { $retval .= ",PADX,$padx"; } ! if (!empty($pady)) { $retval .= ",PADY,$pady"; } ! if (!empty($fullhtml)) { $retval .= ",FULLHTML"; } ! if (!empty($frame)) { $retval .= ",FRAME,'$frame'"; } ! if (isset($timeout)) { $retval .= ",TIMEOUT,$timeout"; } ! if (!empty($function)) { $retval .= ",FUNCTION,'$function'"; } ! if (isset($delay)) { $retval .= ",DELAY,$delay"; } ! if (!empty($hauto)) { $retval .= ",HAUTO"; } ! if (!empty($vauto)) { $retval .= ",VAUTO"; } ! $retval .= ');" onMouseOut="nd();"'; ! ! return $retval; } Index: function.popup_init.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/function.popup_init.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** function.popup_init.php 28 Nov 2002 05:27:53 -0000 1.2 --- function.popup_init.php 6 Feb 2003 02:09:55 -0000 1.3 *************** *** 18,23 **** if (!empty($params['src'])) { ! echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n"; ! echo '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>'."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); --- 18,23 ---- if (!empty($params['src'])) { ! return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n" ! . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); Index: modifier.debug_print_var.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/modifier.debug_print_var.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** modifier.debug_print_var.php 28 Nov 2002 05:27:53 -0000 1.2 --- modifier.debug_print_var.php 6 Feb 2003 02:09:55 -0000 1.3 *************** *** 36,40 **** } $results = preg_replace("![\r\t\n]!", " ", $results); ! $results = htmlspecialchars(htmlspecialchars($results)); return $results; } --- 36,40 ---- } $results = preg_replace("![\r\t\n]!", " ", $results); ! $results = htmlspecialchars($results); return $results; } Index: modifier.escape.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/plugins/modifier.escape.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** modifier.escape.php 25 Jul 2002 11:06:25 -0000 1.1 --- modifier.escape.php 6 Feb 2003 02:09:55 -0000 1.2 *************** *** 38,41 **** --- 38,45 ---- return $return; + case 'javascript': + // escape quotes and backslashes and newlines + return str_replace(array('\\','\'',"\r","\n"), array("\\\\", "\\'",'\r','\r'), $string); + default: return $string; |
From: Brian R. <hei...@us...> - 2003-02-06 01:52:51
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv27951 Modified Files: constants.php Log Message: Oops. Wrong statement. Index: constants.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/constants.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** constants.php 6 Feb 2003 01:46:50 -0000 1.15 --- constants.php 6 Feb 2003 01:52:48 -0000 1.16 *************** *** 1,5 **** <?php ! define("C_DATE_NOW", date( U_DATE_FORMAT ) ); define("ACTIVATE_DISABLED", 0); --- 1,5 ---- <?php ! define("C_DATE_NOW", date( C_DATE_FORMAT ) ); define("ACTIVATE_DISABLED", 0); |
From: Brian R. <hei...@us...> - 2003-02-06 01:50:36
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv26625 Modified Files: functions.php Log Message: Oops. Wrong statement. Index: functions.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/functions.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** functions.php 4 Feb 2003 21:43:22 -0000 1.17 --- functions.php 6 Feb 2003 01:50:32 -0000 1.18 *************** *** 1 **** ! <?php // Defines constants whose contents may be questionable. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function createConstants() { if( defined( "U_DATE_FORMAT" ) ) { define( "C_DATE_FORMAT", U_DATE_FORMAT ); } else { define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); } } ?> \ No newline at end of file --- 1,21 ---- ! <?php ! ! // Defines constants whose contents may be questionable. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function createConstants() ! { ! ! if( U_DATE_FORMAT != '' ) ! { ! define( "C_DATE_FORMAT", U_DATE_FORMAT ); ! } ! else ! { ! define( "C_DATE_FORMAT", C_DEFAULT_DATE_FORMAT ); ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-06 01:46:53
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv24805/includes Modified Files: auth.php constants.php core.php user.php Log Message: Fixed an error in constants.php. Changed DB table constants back to DB_ prefix (no longer C_). Index: auth.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/auth.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** auth.php 4 Feb 2003 21:43:19 -0000 1.28 --- auth.php 6 Feb 2003 01:46:50 -0000 1.29 *************** *** 1 **** ! <?php class Auth // Authenticates user. Only included if user auth is set to be used. { var $curr_user; var $SESSID; function Auth() { global $DB; // Session ID is contained in the URL. if( isset( $_GET['SESSID'] ) ) { define("C_SESSID_LOC", 1); $session_id = $_GET['SESSID']; } // We're using the cookie set by the previous session. elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) { define("C_SESSID_LOC", 2); $session_id = $_COOKIE[C_COOKIE_NAME]; } $sql = "SELECT * FROM " . C_SESSIONS_TABLE . " WHERE sessid=" . $session_id . " AND expiry<" . time(); $result = $DB->query($sql); $numrows = $DB->numRows($result); if($numrows >= 1) { $sess_data = $DB->fetchArray($result); } else // The session doesn't exist or has expired. { die("Your session has expired."); } if( C_SESSID_LOC == 2 ) // We need to set up the cookie. { // Set up cookie/url procedures and such. } } } ?> \ No newline at end of file --- 1,62 ---- ! <?php ! ! class Auth // Authenticates user. Only included if user auth is set to be used. ! { ! ! var $curr_user; ! var $SESSID; ! ! function Auth() ! { ! ! global $DB; ! ! // Session ID is contained in the URL. ! if( isset( $_GET['SESSID'] ) ) ! { ! define("C_SESSID_LOC", 1); ! ! $session_id = $_GET['SESSID']; ! ! } ! // We're using the cookie set by the previous session. ! elseif( isset( $_COOKIE[C_COOKIE_NAME] ) ) ! { ! ! define("C_SESSID_LOC", 2); ! ! $session_id = $_COOKIE[C_COOKIE_NAME]; ! ! } ! ! $sql = "SELECT * FROM " . DB_SESSIONS_TABLE . " WHERE sessid=" . $session_id . " AND expiry<" . time(); ! $result = $DB->query($sql); ! ! $numrows = $DB->numRows($result); ! ! if($numrows >= 1) ! { ! ! $sess_data = $DB->fetchArray($result); ! ! } ! else // The session doesn't exist or has expired. ! { ! ! die("Your session has expired."); ! ! } ! ! if( C_SESSID_LOC == 2 ) // We need to set up the cookie. ! { ! ! ! // Set up cookie/url procedures and such. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file Index: constants.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/constants.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** constants.php 4 Feb 2003 21:43:19 -0000 1.14 --- constants.php 6 Feb 2003 01:46:50 -0000 1.15 *************** *** 1 **** ! <?php define("C_DATE_NOW", date( C_DEFAULT_DATE_FORMAT ) ); define("ACTIVATE_DISABLED", 0); define("ACTIVATE_USER", 1); define("ACTIVATE_ADMIN", 2); define("AUTH_LVL_GUEST", 0); // Guest. define("AUTH_LVL_MEM", 1); // Standard Member define("AUTH_LVL_CONTRIB", 2); // Contributor define("AUTH_LVL_MOD", 3); // Moderator define("AUTH_LVL_ADMIN", 4); // Administrator ?> \ No newline at end of file --- 1,15 ---- ! <?php ! ! define("C_DATE_NOW", date( U_DATE_FORMAT ) ); ! ! define("ACTIVATE_DISABLED", 0); ! define("ACTIVATE_USER", 1); ! define("ACTIVATE_ADMIN", 2); ! ! define("AUTH_LVL_GUEST", 0); // Guest. ! define("AUTH_LVL_MEM", 1); // Standard Member ! define("AUTH_LVL_CONTRIB", 2); // Contributor ! define("AUTH_LVL_MOD", 3); // Moderator ! define("AUTH_LVL_ADMIN", 4); // Administrator ! ! ?> \ No newline at end of file Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** core.php 4 Feb 2003 21:43:20 -0000 1.41 --- core.php 6 Feb 2003 01:46:50 -0000 1.42 *************** *** 1 **** ! <?php class Core // Does, literally, everything. { // Initiates configuration from database. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function _initConfig () { define("C_CONFIG_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'config'); define("C_USERS_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'users'); define("C_SESSIONS_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'sessions'); define("C_MODULES_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'modules'); define("C_BLOCK_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'blocks'); global $DB; $result = $DB->query( "SELECT * FROM " . C_CONFIG_TABLE ); // Loop through all config values from DB. // Define each key as its respective value. while( $row = $DB->fetchArray( $result ) ) { define( strtoupper( 'C_' . $row['config_key'] ), $row['config_value'] ); } } // Initiates all core components. // Author: Brian 'Heimidal' Rose // Accepts: $optional_files (string of needed files separated by commas). // Returns: none. function init ( $optional_files = array() ) { include_once( C_PHPMP_ROOT . 'config.php' ); include_once( C_PHPMP_ROOT . 'includes/debug.php' ); $Debug = new Debug(); global $DB; include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' ); $DB = new DB(); $DB->connect(); $this->_initConfig(); // Grab DB-stored config values. include_once(C_PHPMP_ROOT . 'includes/functions.php'); include_once(C_PHPMP_ROOT . 'includes/user.php'); $User = new User(); // Create an instance of User. include_once(C_PHPMP_ROOT . 'includes/language.php'); $Language = new Language(); createConstants(); include_once(C_PHPMP_ROOT . 'includes/constants.php'); include_once(C_PHPMP_ROOT . 'includes/mpcode.php'); // This while() statement will loop through the // $optional_files and include each file. $i = 0; while( $my_file = $optional_files[$i] ) { include_once(C_PHPMP_ROOT . 'includes/' . $my_file . '.php'); $i++; } include_once(C_PHPMP_ROOT . 'includes/Smarty.class.php'); include_once(C_PHPMP_ROOT . 'includes/template.php'); $Template = new Template(); // Create an instance of Template. // Globalize all major class-containing variables. global $Debug, $User, $MPCode, $Template; } } ?> \ No newline at end of file --- 1,86 ---- ! <?php ! ! class Core // Does, literally, everything. ! { ! ! // Initiates configuration from database. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function _initConfig () ! { ! ! define("DB_CONFIG_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'config'); ! define("DB_USERS_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'users'); ! define("DB_SESSIONS_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'sessions'); ! define("DB_MODULES_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'modules'); ! define("DB_BLOCK_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'blocks'); ! ! global $DB; ! ! $result = $DB->query( "SELECT * FROM " . DB_CONFIG_TABLE ); ! ! // Loop through all config values from DB. ! // Define each key as its respective value. ! while( $row = $DB->fetchArray( $result ) ) ! { ! define( strtoupper( 'C_' . $row['config_key'] ), $row['config_value'] ); ! } ! ! } ! ! // Initiates all core components. ! // Author: Brian 'Heimidal' Rose ! // Accepts: $optional_files (string of needed files separated by commas). ! // Returns: none. ! function init ( $optional_files = array() ) ! { ! include_once( C_PHPMP_ROOT . 'config.php' ); ! ! include_once( C_PHPMP_ROOT . 'includes/debug.php' ); ! $Debug = new Debug(); ! ! global $DB; ! ! include_once( C_PHPMP_ROOT . 'dba/' . DB_TYPE . '.dba' ); ! $DB = new DB(); ! $DB->connect(); ! ! $this->_initConfig(); // Grab DB-stored config values. ! ! include_once(C_PHPMP_ROOT . 'includes/functions.php'); ! ! include_once(C_PHPMP_ROOT . 'includes/user.php'); ! $User = new User(); // Create an instance of User. ! ! include_once(C_PHPMP_ROOT . 'includes/language.php'); ! $Language = new Language(); ! ! createConstants(); ! include_once(C_PHPMP_ROOT . 'includes/constants.php'); ! ! include_once(C_PHPMP_ROOT . 'includes/mpcode.php'); ! ! // This while() statement will loop through the ! // $optional_files and include each file. ! $i = 0; ! while( $my_file = $optional_files[$i] ) ! { ! ! include_once(C_PHPMP_ROOT . 'includes/' . $my_file . '.php'); ! $i++; ! ! } ! ! include_once(C_PHPMP_ROOT . 'includes/Smarty.class.php'); ! include_once(C_PHPMP_ROOT . 'includes/template.php'); ! $Template = new Template(); // Create an instance of Template. ! ! // Globalize all major class-containing variables. ! global $Debug, $User, $MPCode, $Template; ! ! } ! ! } ! ! ?> \ No newline at end of file Index: user.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/user.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** user.php 4 Feb 2003 21:43:28 -0000 1.11 --- user.php 6 Feb 2003 01:46:50 -0000 1.12 *************** *** 1 **** ! <?php class User // Creates a barrier between the Auth class and the outside world. // If user doesn't need to be auth'ed, he isn't. { // Fetches user information/variables from the database. // Author: Brian 'Heimidal' Rose // Accepts: $user (integer). // Returns: boolean. function _snapshot( $user ) { global $DB; $sql = "SELECT * FROM " . C_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); $qry = $DB->query($sql); if( $DB->numRows( $qry ) < 1 ) { return false; } else { $user_array = $DB->fetchArray($qry); while( list ($key, $val) = each ($user_array) ) { define( "U_" . strtoupper($key), "$val" ); } return true; } } // Session cleanup routine. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function sessionClean() { global $DB; $rand = rand(0,10); if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. { $sql = "DELETE FROM " . C_SESSIONS_TABLE . " WHERE expiry<" . time(); $DB->query($sql); } } // User initialization function. Does -EVERYTHING- except explicit session cleanup. // Author: Brian 'Heimidal' Rose // Accepts: none. // Returns: none. function User() { $this->sessionClean(); // Must decide is this is an anonymous user or a registered user. if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. { // We want to use authentication. global $Auth; include_once( C_PHPMP_ROOT . 'includes/auth.php' ); $Auth = new Auth(); // Initializes Auth, which also authenticates the user. $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. } else // We're not going to bother auth'ing the user. { $this->_snapshot('1'); // Gets snapshot of anon user info/vars. } } } ?> \ No newline at end of file --- 1,92 ---- ! <?php ! ! class User // Creates a barrier between the Auth class and the outside world. ! // If user doesn't need to be auth'ed, he isn't. ! { ! ! // Fetches user information/variables from the database. ! // Author: Brian 'Heimidal' Rose ! // Accepts: $user (integer). ! // Returns: boolean. ! function _snapshot( $user ) ! { ! ! global $DB; ! ! $sql = "SELECT * FROM " . DB_USERS_TABLE . " WHERE userid=" . $DB->escapeString($user); ! ! $qry = $DB->query($sql); ! ! if( $DB->numRows( $qry ) < 1 ) { ! ! return false; ! ! } ! else { ! $user_array = $DB->fetchArray($qry); ! ! while( list ($key, $val) = each ($user_array) ) ! { ! define( "U_" . strtoupper($key), "$val" ); ! } ! ! return true; ! } ! } ! ! // Session cleanup routine. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function sessionClean() ! { ! ! global $DB; ! ! $rand = rand(0,10); ! if($rand >= 1) // 1:10 chance of session cleanup. This may later become a setting. ! { ! ! $sql = "DELETE FROM " . DB_SESSIONS_TABLE . " WHERE expiry<" . time(); ! $DB->query($sql); ! ! } ! ! } ! ! // User initialization function. Does -EVERYTHING- except explicit session cleanup. ! // Author: Brian 'Heimidal' Rose ! // Accepts: none. ! // Returns: none. ! function User() ! { ! ! $this->sessionClean(); ! ! // Must decide is this is an anonymous user or a registered user. ! ! if( ( C_USE_PORTAL_PERMS == 1 ) || ( defined( P_USE_ADMIN_PERMS ) ) ) // Checks for use_perms setting and makes sure we're not entering the admin area. ! { ! ! // We want to use authentication. ! ! global $Auth; ! ! include_once( C_PHPMP_ROOT . 'includes/auth.php' ); ! $Auth = new Auth(); // Initializes Auth, which also authenticates the user. ! ! $this->_snapshot( $Auth->curr_user ); // Gets snapshot of user info/vars. ! ! } ! else // We're not going to bother auth'ing the user. ! { ! ! $this->_snapshot('1'); // Gets snapshot of anon user info/vars. ! ! } ! ! } ! ! } ! ! ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-06 01:46:53
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv24805/docs Modified Files: Changelog Log Message: Fixed an error in constants.php. Changed DB table constants back to DB_ prefix (no longer C_). Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** Changelog 4 Feb 2003 21:43:15 -0000 1.13 --- Changelog 6 Feb 2003 01:46:49 -0000 1.14 *************** *** 1,2 **** --- 1,8 ---- + 2002-02-05 [Heimidal] + + * Most included files. + Changed DB table to carry a DB_ prefix. + Fixed a mistake I made in constants.php. + 2002-02-03 [Heimidal] *************** *** 4,7 **** --- 10,14 ---- Changed <? to <?php for compatibility. Changed a few config values and such. + 2003-02-03 [Heimidal] |
From: Brian R. <hei...@us...> - 2003-02-06 01:34:59
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv20664 Added Files: NOTES Log Message: Added a small notes file. --- NEW FILE: NOTES --- The following prefixes have been used when declaring constants: DB_ Database-related settings. P_ Per-Page setting. Admin pages declare this to show admin status. U_ User setting. This allows us to differentiate overrides. C_ Configuration setting. Settings that don't belong anywhere else. |
From: Brian R. <hei...@us...> - 2003-02-04 21:44:14
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv30097/includes Modified Files: Smarty.class.php Smarty_Compiler.class.php auth.php constants.php core.php debug.php functions.php language.php mpcode.php sessions.php template.php user.php Log Message: Most all files updated. Forgot a small compatibility issue regarding <? and <?php. Also, deleted some lines at the end of files and changed a few config names. Index: Smarty.class.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/Smarty.class.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Smarty.class.php 28 Nov 2002 05:27:53 -0000 1.3 --- Smarty.class.php 4 Feb 2003 21:43:17 -0000 1.4 *************** *** 1,2054 **** ! <?php ! /* ! * Project: Smarty: the PHP compiling template engine ! * File: Smarty.class.php ! * Author: Monte Ohrt <mo...@is...> ! * Andrei Zmievski <an...@ph...> ! * ! * Version: 2.3.1 ! * Copyright: 2001,2002 ispi of Lincoln, Inc. ! * [...2027 lines suppressed...] ! $_path_array = explode(':',$_ini_include_path); ! } ! } ! foreach ($_path_array as $_include_path) { ! if (@file_exists($_include_path . DIR_SEP . $file_path)) { ! $new_file_path = $_include_path . DIR_SEP . $file_path; ! return true; ! } ! } ! return false; ! } ! ! } ! ! /* vim: set expandtab: */ ! ! ?> --- 1 ---- ! <?php /* * Project: Smarty: the PHP compiling template engine * File: Smarty.class.php * Author: Monte Ohrt <mo...@is...> * Andrei Zmievski <an...@ph...> * * Version: 2.3.1 * Copyright: 2001,2002 ispi of Lincoln, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * For questions, help, comments, discussion, etc., please join the * Smarty mailing list. Send a blank e-mail to * sma...@li... * * You may contact the authors of Smarty by e-mail at: * mo...@is... * an...@ph... * * Or, write to: * Monte Ohrt * Director of Technology, ispi * 237 S. 70th suite 220 * Lincoln, NE 68510 * * The latest version of Smarty can be obtained from: * http://www.phpinsider.com/ * */ // set SMARTY_DIR to absolute path to Smarty library files. // if not defined, include_path will be used. define('DIR_SEP', DIRECTORY_SEPARATOR); if (!defined('SMARTY_DIR')) { define('SMARTY_DIR', dirname(__FILE__) . DIR_SEP); } define('SMARTY_PHP_PASSTHRU', 0); define('SMARTY_PHP_QUOTE', 1); define('SMARTY_PHP_REMOVE', 2); define('SMARTY_PHP_ALLOW', 3); class Smarty { /**************************************************************************/ /* BEGIN SMARTY CONFIGURATION SECTION */ /* Set the following config variables to your liking. */ /**************************************************************************/ // public vars var $template_dir = 'templates'; // name of directory for templates var $compile_dir = 'templates_c'; // name of directory for compiled templates var $config_dir = 'configs'; // directory where config files are located var $plugins_dir = array('plugins'); // plugin directories var $debugging = false; // enable debugging console true/false var $debug_tpl = ''; // path to debug console template // (this gets set in the constructor) var $debugging_ctrl = 'NONE'; // Possible values: // NONE - no debug control allowed // URL - enable debugging when keyword // SMARTY_DEBUG is found in $QUERY_STRING var $global_assign = array( 'HTTP_SERVER_VARS' => array( 'SCRIPT_NAME' ) ); // variables from the GLOBALS array // that are implicitly assigned // to all templates var $undefined = null; // undefined variables in $global_assign will be // created with this value var $autoload_filters = array(); // indicates which filters will be auto-loaded var $compile_check = true; // whether to check for compiling step or not: // This is generally set to false once the // application is entered into production and // initially compiled. Leave set to true // during development. true/false default true. var $force_compile = false; // force templates to compile every time, // overrides cache settings. default false. var $caching = 0; // enable caching. can be one of 0/1/2. // 0 = no caching // 1 = use class cache_lifetime value // 2 = use cache_lifetime in cache file // default = 0. var $cache_dir = 'cache'; // name of directory for template cache files var $cache_lifetime = 3600; // number of seconds cached content will persist. // 0 = always regenerate cache, // -1 = never expires. default is one hour (3600) var $cache_handler_func = null; // function used for cached content. this is // an alternative to using the built-in file // based caching. var $cache_modified_check = false; // respect If-Modified-Since headers on cached content var $default_template_handler_func = ''; // function to handle missing templates var $php_handling = SMARTY_PHP_PASSTHRU; // how smarty handles php tags in the templates // possible values: // SMARTY_PHP_PASSTHRU -> echo tags as is // SMARTY_PHP_QUOTE -> escape tags as entities // SMARTY_PHP_REMOVE -> remove php tags // SMARTY_PHP_ALLOW -> execute php tags // default: SMARTY_PHP_PASSTHRU var $security = false; // enable template security (default false) var $secure_dir = array('templates'); // array of directories considered secure var $security_settings = array( 'PHP_HANDLING' => false, 'IF_FUNCS' => array('array', 'list', 'isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array'), 'INCLUDE_ANY' => false, 'PHP_TAGS' => false, 'MODIFIER_FUNCS' => array('count') ); var $trusted_dir = array(); // directories where trusted templates & php scripts // reside ($security is disabled during their // inclusion/execution). var $left_delimiter = '{'; // template tag delimiters. var $right_delimiter = '}'; var $compiler_class = 'Smarty_Compiler'; // the compiler class used by // Smarty to compile templates var $request_vars_order = "EGPCS"; // the order in which request variables are // registered, similar to variables_order // in php.ini var $compile_id = null; // persistent compile identifier var $use_sub_dirs = true; // use sub dirs for cache and compiled files? // sub directories are more efficient, but // you can set this to false if your PHP environment // does not allow the creation of them. var $default_modifiers = array(); // modifiers to implicitly append to every var // example: array('escape:"htmlall"'); /**************************************************************************/ /* END SMARTY CONFIGURATION SECTION */ /* There should be no need to touch anything below this line. */ /**************************************************************************/ // internal vars var $_error_msg = false; // error messages. true/false var $_tpl_vars = array(); // where assigned template vars are kept var $_smarty_vars = null; // stores run-time $smarty.* vars var $_sections = array(); // keeps track of sections var $_foreach = array(); // keeps track of foreach blocks var $_tag_stack = array(); // keeps track of tag hierarchy var $_conf_obj = null; // configuration object var $_config = array(); // loaded configuration settings var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; // md5 checksum of the string 'Smarty' var $_version = '2.3.1'; // Smarty version number var $_extract = false; // flag for custom functions var $_inclusion_depth = 0; // current template inclusion depth var $_compile_id = null; // for different compiled templates var $_smarty_debug_id = 'SMARTY_DEBUG'; // text in URL to enable debug mode var $_smarty_debug_info = array(); // debugging information for debug console var $_cache_info = array(); // info that makes up a cache file var $_plugins = array( // table keeping track of plugins 'modifier' => array(), 'function' => array(), 'block' => array(), 'compiler' => array(), 'prefilter' => array(), 'postfilter' => array(), 'outputfilter' => array(), 'resource' => array(), 'insert' => array()); /*======================================================================*\ Function: Smarty Purpose: Constructor \*======================================================================*/ function Smarty() { foreach ($this->global_assign as $key => $var_name) { if (is_array($var_name)) { foreach ($var_name as $var) { if (isset($GLOBALS[$key][$var])) { $this->assign($var, $GLOBALS[$key][$var]); } else { $this->assign($var, $this->undefined); } } } else { if (isset($GLOBALS[$var_name])) { $this->assign($var_name, $GLOBALS[$var_name]); } else { $this->assign($var_name, $this->undefined); } } } if(empty($this->debug_tpl)) { // set path to debug template from SMARTY_DIR $this->debug_tpl = 'file:'.SMARTY_DIR.'debug.tpl'; } } /*======================================================================*\ Function: assign() Purpose: assigns values to template variables \*======================================================================*/ function assign($tpl_var, $value = NULL) { if (is_array($tpl_var)){ foreach ($tpl_var as $key => $val) { if ($key != '' && isset($val)) { $this->_tpl_vars[$key] = $val; } } } else { if ($tpl_var != '' && isset($value)) $this->_tpl_vars[$tpl_var] = $value; } $this->_extract = true; } /*======================================================================*\ Function: assign_by_ref() Purpose: assigns values to template variables by reference \*======================================================================*/ function assign_by_ref($tpl_var, &$value) { if ($tpl_var != '' && isset($value)) $this->_tpl_vars[$tpl_var] = &$value; $this->_extract = true; } /*======================================================================*\ Function: append Purpose: appends values to template variables \*======================================================================*/ function append($tpl_var, $value = NULL) { if (is_array($tpl_var)) { foreach ($tpl_var as $key => $val) { if ($key != '') { if(!@is_array($this->_tpl_vars[$key])) { settype($this->_tpl_vars[$key],'array'); } $this->_tpl_vars[$key][] = $val; } } } else { if ($tpl_var != '' && isset($value)) { if(!@is_array($this->_tpl_vars[$tpl_var])) { settype($this->_tpl_vars[$tpl_var],'array'); } $this->_tpl_vars[$tpl_var][] = $value; } } $this->_extract = true; } /*======================================================================*\ Function: append_by_ref Purpose: appends values to template variables by reference \*======================================================================*/ function append_by_ref($tpl_var, &$value) { if ($tpl_var != '' && isset($value)) { if(!@is_array($this->_tpl_vars[$tpl_var])) { settype($this->_tpl_vars[$tpl_var],'array'); } $this->_tpl_vars[$tpl_var][] = &$value; } $this->_extract = true; } /*======================================================================*\ Function: clear_assign() Purpose: clear the given assigned template variable. \*======================================================================*/ function clear_assign($tpl_var) { if (is_array($tpl_var)) foreach ($tpl_var as $curr_var) unset($this->_tpl_vars[$curr_var]); else unset($this->_tpl_vars[$tpl_var]); } /*======================================================================*\ Function: register_function Purpose: Registers custom function to be used in templates \*======================================================================*/ function register_function($function, $function_impl) { $this->_plugins['function'][$function] = array($function_impl, null, null, false); } /*======================================================================*\ Function: unregister_function Purpose: Unregisters custom function \*======================================================================*/ function unregister_function($function) { unset($this->_plugins['function'][$function]); } /*======================================================================*\ Function: register_block Purpose: Registers block function to be used in templates \*======================================================================*/ function register_block($block, $block_impl) { $this->_plugins['block'][$block] = array($block_impl, null, null, false); } /*======================================================================*\ Function: unregister_block Purpose: Unregisters block function \*======================================================================*/ function unregister_block($block) { unset($this->_plugins['block'][$block]); } /*======================================================================*\ Function: register_compiler_function Purpose: Registers compiler function \*======================================================================*/ function register_compiler_function($function, $function_impl) { $this->_plugins['compiler'][$function] = array($function_impl, null, null, false); } /*======================================================================*\ Function: unregister_compiler_function Purpose: Unregisters compiler function \*======================================================================*/ function unregister_compiler_function($function) { unset($this->_plugins['compiler'][$function]); } /*======================================================================*\ Function: register_modifier Purpose: Registers modifier to be used in templates \*======================================================================*/ function register_modifier($modifier, $modifier_impl) { $this->_plugins['modifier'][$modifier] = array($modifier_impl, null, null, false); } /*======================================================================*\ Function: unregister_modifier Purpose: Unregisters modifier \*======================================================================*/ function unregister_modifier($modifier) { unset($this->_plugins['modifier'][$modifier]); } /*======================================================================*\ Function: register_resource Purpose: Registers a resource to fetch a template \*======================================================================*/ function register_resource($type, $functions) { $this->_plugins['resource'][$type] = array((array)$functions, false); } /*======================================================================*\ Function: unregister_resource Purpose: Unregisters a resource \*======================================================================*/ function unregister_resource($type) { unset($this->_plugins['resource'][$type]); } /*======================================================================*\ Function: register_prefilter Purpose: Registers a prefilter function to apply to a template before compiling \*======================================================================*/ function register_prefilter($function) { $this->_plugins['prefilter'][$function] = array($function, null, null, false); } /*======================================================================*\ Function: unregister_prefilter Purpose: Unregisters a prefilter function \*======================================================================*/ function unregister_prefilter($function) { unset($this->_plugins['prefilter'][$function]); } /*======================================================================*\ Function: register_postfilter Purpose: Registers a postfilter function to apply to a compiled template after compilation \*======================================================================*/ function register_postfilter($function) { $this->_plugins['postfilter'][$function] = array($function, null, null, false); } /*======================================================================*\ Function: unregister_postfilter Purpose: Unregisters a postfilter function \*======================================================================*/ function unregister_postfilter($function) { unset($this->_plugins['postfilter'][$function]); } /*======================================================================*\ Function: register_outputfilter Purpose: Registers an output filter function to apply to a template output \*======================================================================*/ function register_outputfilter($function) { $this->_plugins['outputfilter'][$function] = array($function, null, null, false); } /*======================================================================*\ Function: unregister_outputfilter Purpose: Unregisters an outputfilter function \*======================================================================*/ function unregister_outputfilter($function) { unset($this->_plugins['outputfilter'][$function]); } /*======================================================================*\ Function: load_filter() Purpose: load a filter of specified type and name \*======================================================================*/ function load_filter($type, $name) { switch ($type) { case 'output': $this->_load_plugins(array(array($type . 'filter', $name, null, null, false))); break; case 'pre': case 'post': if (!isset($this->_plugins[$type . 'filter'][$name])) $this->_plugins[$type . 'filter'][$name] = false; break; } } /*======================================================================*\ Function: clear_cache() Purpose: clear cached content for the given template and cache id \*======================================================================*/ function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) { if (!isset($compile_id)) $compile_id = $this->compile_id; if (isset($cache_id)) $auto_id = (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id; elseif(isset($compile_id)) $auto_id = $compile_id; else $auto_id = null; if (!empty($this->cache_handler_func)) { $funcname = $this->cache_handler_func; return $funcname('clear', $this, $dummy, $tpl_file, $cache_id, $compile_id); } else { return $this->_rm_auto($this->cache_dir, $tpl_file, $auto_id, $exp_time); } } /*======================================================================*\ Function: clear_all_cache() Purpose: clear the entire contents of cache (all templates) \*======================================================================*/ function clear_all_cache($exp_time = null) { if (!empty($this->cache_handler_func)) { $funcname = $this->cache_handler_func; return $funcname('clear', $this, $dummy); } else { return $this->_rm_auto($this->cache_dir,null,null,$exp_time); } } /*======================================================================*\ Function: is_cached() Purpose: test to see if valid cache exists for this template \*======================================================================*/ function is_cached($tpl_file, $cache_id = null, $compile_id = null) { if (!$this->caching) return false; if (!isset($compile_id)) $compile_id = $this->compile_id; return $this->_read_cache_file($tpl_file, $cache_id, $compile_id, $results); } /*======================================================================*\ Function: clear_all_assign() Purpose: clear all the assigned template variables. \*======================================================================*/ function clear_all_assign() { $this->_tpl_vars = array(); } /*======================================================================*\ Function: clear_compiled_tpl() Purpose: clears compiled version of specified template resource, or all compiled template files if one is not specified. This function is for advanced use only, not normally needed. \*======================================================================*/ function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) { if (!isset($compile_id)) $compile_id = $this->compile_id; return $this->_rm_auto($this->compile_dir, $tpl_file, $compile_id, $exp_time); } /*======================================================================*\ Function: template_exists() Purpose: Checks whether requested template exists. \*======================================================================*/ function template_exists($tpl_file) { return $this->_fetch_template_info($tpl_file, $source, $timestamp, true, true); } /*======================================================================*\ Function: get_template_vars Purpose: Returns an array containing template variables \*======================================================================*/ function &get_template_vars() { return $this->_tpl_vars; } /*======================================================================*\ Function: trigger_error Purpose: trigger Smarty error \*======================================================================*/ function trigger_error($error_msg, $error_type = E_USER_WARNING) { trigger_error("Smarty error: $error_msg", $error_type); } /*======================================================================*\ Function: display() Purpose: executes & displays the template results \*======================================================================*/ function display($tpl_file, $cache_id = null, $compile_id = null) { $this->fetch($tpl_file, $cache_id, $compile_id, true); } /*======================================================================*\ Function: fetch() Purpose: executes & returns or displays the template results \*======================================================================*/ function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) { $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE); if (!$this->debugging && $this->debugging_ctrl == 'URL' && strstr($GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'], $this->_smarty_debug_id)) { $this->debugging = true; } if ($this->debugging) { // capture time for debugging info $debug_start_time = $this->_get_microtime(); $this->_smarty_debug_info[] = array('type' => 'template', 'filename' => $_smarty_tpl_file, 'depth' => 0); $included_tpls_idx = count($this->_smarty_debug_info) - 1; } if (!isset($_smarty_compile_id)) $_smarty_compile_id = $this->compile_id; $this->_compile_id = $_smarty_compile_id; $this->_inclusion_depth = 0; if ($this->caching) { if ($this->_read_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results)) { if (@count($this->_cache_info['insert_tags'])) { $this->_load_plugins($this->_cache_info['insert_tags']); $_smarty_results = $this->_process_cached_inserts($_smarty_results); } if ($_smarty_display) { if ($this->debugging) { // capture time for debugging info $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = $this->_get_microtime() - $debug_start_time; $_smarty_results .= $this->_generate_debug_output(); } if ($this->cache_modified_check) { $last_modified_date = substr($GLOBALS['HTTP_SERVER_VARS']['HTTP_IF_MODIFIED_SINCE'], 0, strpos($GLOBALS['HTTP_SERVER_VARS']['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); $gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT'; if (@count($this->_cache_info['insert_tags']) == 0 && $gmt_mtime == $last_modified_date) { header("HTTP/1.1 304 Not Modified"); } else { header("Last-Modified: ".$gmt_mtime); echo $_smarty_results; } } else { echo $_smarty_results; } error_reporting($_smarty_old_error_level); return true; } else { error_reporting($_smarty_old_error_level); return $_smarty_results; } } else { $this->_cache_info = array(); $this->_cache_info['template'][] = $_smarty_tpl_file; } } extract($this->_tpl_vars); /* Initialize config array. */ $this->_config = array(array('vars' => array(), 'files' => array())); if (count($this->autoload_filters)) $this->_autoload_filters(); $_smarty_compile_path = $this->_get_compile_path($_smarty_tpl_file); // if we just need to display the results, don't perform output // buffering - for speed if ($_smarty_display && !$this->caching && count($this->_plugins['outputfilter']) == 0) { if ($this->_process_template($_smarty_tpl_file, $_smarty_compile_path)) { include($_smarty_compile_path); } } else { ob_start(); if ($this->_process_template($_smarty_tpl_file, $_smarty_compile_path)) { include($_smarty_compile_path); } $_smarty_results = ob_get_contents(); ob_end_clean(); foreach ((array)$this->_plugins['outputfilter'] as $output_filter) { $_smarty_results = $output_filter[0]($_smarty_results, $this); } } if ($this->caching) { $this->_write_cache_file($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_results); $_smarty_results = $this->_process_cached_inserts($_smarty_results); } if ($_smarty_display) { if (isset($_smarty_results)) { echo $_smarty_results; } if ($this->debugging) { // capture time for debugging info $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = ($this->_get_microtime() - $debug_start_time); echo $this->_generate_debug_output(); } error_reporting($_smarty_old_error_level); return; } else { error_reporting($_smarty_old_error_level); if (isset($_smarty_results)) { return $_smarty_results; } } } /*======================================================================*\ Function: _assign_smarty_interface Purpose: assign $smarty interface variable \*======================================================================*/ function _assign_smarty_interface() { if ($this->_smarty_vars !== null) return; $globals_map = array('g' => 'HTTP_GET_VARS', 'p' => 'HTTP_POST_VARS', 'c' => 'HTTP_COOKIE_VARS', 's' => 'HTTP_SERVER_VARS', 'e' => 'HTTP_ENV_VARS'); $smarty = array('request' => array()); foreach (preg_split('!!', strtolower($this->request_vars_order)) as $c) { if (isset($globals_map[$c])) { $smarty['request'] = array_merge($smarty['request'], $GLOBALS[$globals_map[$c]]); } } $smarty['request'] = @array_merge($smarty['request'], $GLOBALS['HTTP_SESSION_VARS']); $this->_smarty_vars = $smarty; } /*======================================================================*\ Function: _generate_debug_output() Purpose: generate debug output \*======================================================================*/ function _generate_debug_output() { // we must force compile the debug template in case the environment // changed between separate applications. $_ldelim_orig = $this->left_delimiter; $_rdelim_orig = $this->right_delimiter; $this->left_delimiter = '{'; $this->right_delimiter = '}'; $_force_compile_orig = $this->force_compile; $this->force_compile = true; $_compile_id_orig = $this->_compile_id; $this->_compile_id = null; $compile_path = $this->_get_compile_path($this->debug_tpl); if ($this->_process_template($this->debug_tpl, $compile_path)) { ob_start(); include($compile_path); $results = ob_get_contents(); ob_end_clean(); } $this->force_compile = $_force_compile_orig; $this->_compile_id = $_compile_id_orig; $this->left_delimiter = $_ldelim_orig; $this->right_delimiter = $_rdelim_orig; return $results; } /*======================================================================*\ Function: _is_trusted() Purpose: determines if a resource is trusted or not \*======================================================================*/ function _is_trusted($resource_type, $resource_name) { $_smarty_trusted = false; if ($resource_type == 'file') { if (!empty($this->trusted_dir)) { // see if template file is within a trusted directory. If so, // disable security during the execution of the template. if (!empty($this->trusted_dir)) { foreach ((array)$this->trusted_dir as $curr_dir) { if (!empty($curr_dir) && is_readable ($curr_dir)) { if (substr(realpath($resource_name),0, strlen(realpath($curr_dir))) == realpath($curr_dir)) { $_smarty_trusted = true; break; } } } } } } else { // resource is not on local file system $resource_func = $this->_plugins['resource'][$resource_type][0][3]; $_smarty_trusted = $resource_func($resource_name, $this); } return $_smarty_trusted; } /*======================================================================*\ Function: _is_secure() Purpose: determines if a resource is secure or not. \*======================================================================*/ function _is_secure($resource_type, $resource_name) { if (!$this->security || $this->security_settings['INCLUDE_ANY']) { return true; } $_smarty_secure = false; if ($resource_type == 'file') { if (!empty($this->secure_dir)) { foreach ((array)$this->secure_dir as $curr_dir) { if ( !empty($curr_dir) && is_readable ($curr_dir)) { if (substr(realpath($resource_name),0, strlen(realpath($curr_dir))) == realpath($curr_dir)) { $_smarty_secure = true; break; } } } } } else { // resource is not on local file system $resource_func = $this->_plugins['resource'][$resource_type][0][2]; $_smarty_secure = $resource_func($resource_name, $_smarty_secure, $this); } return $_smarty_secure; } /*======================================================================*\ Function: _get_php_resource Purpose: Retrieves PHP script resource \*======================================================================*/ function _get_php_resource($resource, &$resource_type, &$php_resource) { $this->_parse_file_path($this->trusted_dir, $resource, $resource_type, $resource_name); /* * Find out if the resource exists. */ if ($resource_type == 'file') { $readable = false; if(@is_file($resource_name)) { $readable = true; } else { // test for file in include_path if($this->_get_include_path($resource_name,$_include_path)) { $readable = true; } } } else if ($resource_type != 'file') { $readable = true; $resource_func = $this->_plugins['resource'][$resource_type][0][0]; $readable = $resource_func($resource_name, $template_source, $this); } /* * Set the error function, depending on which class calls us. */ if (method_exists($this, '_syntax_error')) { $error_func = '_syntax_error'; } else { $error_func = 'trigger_error'; } if ($readable) { if ($this->security) { if (!$this->_is_trusted($resource_type, $resource_name)) { $this->$error_func("(secure mode) '$resource_type:$resource_name' is not trusted"); return false; } } } else { $this->$error_func("'$resource_type: $resource_name' is not readable"); return false; } if ($resource_type == 'file') { $php_resource = $resource_name; } else { $php_resource = $template_source; } return true; } /*======================================================================*\ Function: _process_template() Purpose: \*======================================================================*/ function _process_template($tpl_file, $compile_path) { // test if template needs to be compiled if (!$this->force_compile && file_exists($compile_path)) { if (!$this->compile_check) { // no need to check if the template needs recompiled return true; } else { // get template source and timestamp if (!$this->_fetch_template_info($tpl_file, $template_source, $template_timestamp)) { return false; } if ($template_timestamp <= filemtime($compile_path)) { // template not expired, no recompile return true; } else { // compile template $this->_compile_template($tpl_file, $template_source, $template_compiled); $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } } else { // compiled template does not exist, or forced compile if (!$this->_fetch_template_info($tpl_file, $template_source, $template_timestamp)) { return false; } $this->_compile_template($tpl_file, $template_source, $template_compiled); $this->_write_compiled_template($compile_path, $template_compiled, $template_timestamp); return true; } } /*======================================================================*\ Function: _get_compile_path Purpose: Get the compile path for this template file \*======================================================================*/ function _get_compile_path($tpl_file) { return $this->_get_auto_filename($this->compile_dir, $tpl_file, $this->_compile_id); } /*======================================================================*\ Function: _write_compiled_template Purpose: \*======================================================================*/ function _write_compiled_template($compile_path, $template_compiled, $template_timestamp) { // we save everything into $compile_dir $this->_write_file($compile_path, $template_compiled, true); touch($compile_path, $template_timestamp); return true; } /*======================================================================*\ Function: _parse_file_path Purpose: parse out the type and name from the template resource \*======================================================================*/ function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name) { // split tpl_path by the first colon $_file_path_parts = explode(':', $file_path, 2); if (count($_file_path_parts) == 1) { // no resource type, treat as type "file" $resource_type = 'file'; $resource_name = $_file_path_parts[0]; } else { $resource_type = $_file_path_parts[0]; $resource_name = $_file_path_parts[1]; if ($resource_type != 'file') { $this->_load_resource_plugin($resource_type); } } if ($resource_type == 'file') { if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $resource_name)) { // relative pathname to $file_base_path // use the first directory where the file is found foreach ((array)$file_base_path as $_curr_path) { $_fullpath = $_curr_path . DIR_SEP . $resource_name; if (@is_file($_fullpath)) { $resource_name = $_fullpath; return true; } // didn't find the file, try include_path if($this->_get_include_path($_fullpath, $_include_path)) { $resource_name = $_include_path; return true; } } return false; } } // resource type != file return true; } /*======================================================================*\ Function: _fetch_template_info() Purpose: fetch the template info. Gets timestamp, and source if get_source is true \*======================================================================*/ function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false) { $_return = false; if ($this->_parse_file_path($this->template_dir, $tpl_path, $resource_type, $resource_name)) { switch ($resource_type) { case 'file': if ($get_source) { $template_source = $this->_read_file($resource_name); } $template_timestamp = filemtime($resource_name); $_return = true; break; default: // call resource functions to fetch the template source and timestamp if ($get_source) { $resource_func = $this->_plugins['resource'][$resource_type][0][0]; $_source_return = $resource_func($resource_name, $template_source, $this); } else { $_source_return = true; } $resource_func = $this->_plugins['resource'][$resource_type][0][1]; $_timestamp_return = $resource_func($resource_name, $template_timestamp, $this); $_return = $_source_return && $_timestamp_return; break; } } if (!$_return) { // see if we can get a template with the default template handler if (!empty($this->default_template_handler_func)) { if (!function_exists($this->default_template_handler_func)) { $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist."); $_return = false; } $funcname = $this->default_template_handler_func; $_return = $funcname($resource_type, $resource_name, $template_source, $template_timestamp, $this); } } if (!$_return) { if (!$quiet) { $this->trigger_error("unable to read template resource: \"$tpl_path\""); } } else if ($_return && $this->security && !$this->_is_secure($resource_type, $resource_name)) { if (!$quiet) $this->trigger_error("(secure mode) accessing \"$tpl_path\" is not allowed"); $template_source = null; $template_timestamp = null; return false; } return $_return; } /*======================================================================*\ Function: _compile_template() Purpose: called to compile the templates \*======================================================================*/ function _compile_template($tpl_file, $template_source, &$template_compiled) { require_once SMARTY_DIR.$this->compiler_class . '.class.php'; $smarty_compiler = new $this->compiler_class; $smarty_compiler->template_dir = $this->template_dir; $smarty_compiler->compile_dir = $this->compile_dir; $smarty_compiler->plugins_dir = $this->plugins_dir; $smarty_compiler->config_dir = $this->config_dir; $smarty_compiler->force_compile = $this->force_compile; $smarty_compiler->caching = $this->caching; $smarty_compiler->php_handling = $this->php_handling; $smarty_compiler->left_delimiter = $this->left_delimiter; $smarty_compiler->right_delimiter = $this->right_delimiter; $smarty_compiler->_version = $this->_version; $smarty_compiler->security = $this->security; $smarty_compiler->secure_dir = $this->secure_dir; $smarty_compiler->security_settings = $this->security_settings; $smarty_compiler->trusted_dir = $this->trusted_dir; $smarty_compiler->_plugins = &$this->_plugins; $smarty_compiler->_tpl_vars = &$this->_tpl_vars; $smarty_compiler->default_modifiers = $this->default_modifiers; if ($smarty_compiler->_compile_file($tpl_file, $template_source, $template_compiled)) return true; else { $this->trigger_error($smarty_compiler->_error_msg); return false; } } /*======================================================================*\ Function: _smarty_include() Purpose: called for included templates \*======================================================================*/ function _smarty_include($_smarty_include_tpl_file, $_smarty_include_vars) { if ($this->debugging) { $debug_start_time = $this->_get_microtime(); $this->_smarty_debug_info[] = array('type' => 'template', 'filename' => $_smarty_include_tpl_file, 'depth' => ++$this->_inclusion_depth); $included_tpls_idx = count($this->_smarty_debug_info) - 1; } $this->_tpl_vars = array_merge($this->_tpl_vars, $_smarty_include_vars); extract($this->_tpl_vars); array_unshift($this->_config, $this->_config[0]); $_smarty_compile_path = $this->_get_compile_path($_smarty_include_tpl_file); if ($this->_process_template($_smarty_include_tpl_file, $_smarty_compile_path)) { include($_smarty_compile_path); } array_shift($this->_config); $this->_inclusion_depth--; if ($this->debugging) { // capture time for debugging info $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = $this->_get_microtime() - $debug_start_time; } if ($this->caching) { $this->_cache_info['template'][] = $_smarty_include_tpl_file; } } /*======================================================================*\ Function: _smarty_include_php() Purpose: called for included templates \*======================================================================*/ function _smarty_include_php($_smarty_include_php_file, $_smarty_assign, $_smarty_once) { $this->_get_php_resource($_smarty_include_php_file, $_smarty_resource_type, $_smarty_php_resource); if (!empty($_smarty_assign)) { ob_start(); if ($_smarty_resource_type == 'file') { if($_smarty_once) { include_once($_smarty_php_resource); } else { include($_smarty_php_resource); } } else { eval($_smarty_php_resource); } $this->assign($_smarty_assign, ob_get_contents()); ob_end_clean(); } else { if ($_smarty_resource_type == 'file') { if($_smarty_once) { include_once($_smarty_php_resource); } else { include($_smarty_php_resource); } } else { eval($_smarty_php_resource); } } } /*======================================================================*\ Function: _config_load Purpose: load configuration values \*======================================================================*/ function _config_load($file, $section, $scope) { if(@is_dir($this->config_dir)) { $_config_dir = $this->config_dir; } else { // config_dir not found, try include_path $this->_get_include_path($this->config_dir,$_config_dir); } if ($this->_conf_obj === null) { /* Prepare the configuration object. */ if (!class_exists('Config_File')) require_once SMARTY_DIR.'Config_File.class.php'; $this->_conf_obj = new Config_File($_config_dir); $this->_conf_obj->read_hidden = false; } else { $this->_conf_obj->set_path($_config_dir); } if ($this->debugging) { $debug_start_time = $this->_get_microtime(); } if ($this->caching) { $this->_cache_info['config'][] = $file; } if (!isset($this->_config[0]['files'][$file])) { $this->_config[0]['vars'] = array_merge($this->_config[0]['vars'], $this->_conf_obj->get($file)); $this->_config[0]['files'][$file] = true; } if ($scope == 'parent') { if (count($this->_config) > 0 && !isset($this->_config[1]['files'][$file])) { $this->_config[1]['vars'] = array_merge($this->_config[1]['vars'], $this->_conf_obj->get($file)); $this->_config[1]['files'][$file] = true; } } else if ($scope == 'global') for ($i = 1, $for_max = count($this->_config); $i < $for_max; $i++) { if (!isset($this->_config[$i]['files'][$file])) { $this->_config[$i]['vars'] = array_merge($this->_config[$i]['vars'], $this->_conf_obj->get($file)); $this->_config[$i]['files'][$file] = true; } } if (!empty($section)) { $this->_config[0]['vars'] = array_merge($this->_config[0]['vars'], $this->_conf_obj->get($file, $section)); if ($scope == 'parent') { if (count($this->_config) > 0) $this->_config[1]['vars'] = array_merge($this->_config[1]['vars'], $this->_conf_obj->get($file, $section)); } else if ($scope == 'global') for ($i = 1, $for_max = count($this->_config); $i < $for_max; $i++) $this->_config[$i]['vars'] = array_merge($this->_config[$i]['vars'], $this->_conf_obj->get($file, $section)); } if ($this->debugging) { $debug_start_time = $this->_get_microtime(); $this->_smarty_debug_info[] = array('type' => 'config', 'filename' => $file.' ['.$section.'] '.$scope, 'depth' => $this->_inclusion_depth, 'exec_time' => $this->_get_microtime() - $debug_start_time); } } /*======================================================================*\ Function: _process_cached_inserts Purpose: Replace cached inserts with the actual results \*======================================================================*/ function _process_cached_inserts($results) { preg_match_all('!'.$this->_smarty_md5.'{insert_cache (.*)}'.$this->_smarty_md5.'!Uis', $results, $match); list($cached_inserts, $insert_args) = $match; for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) { if ($this->debugging) { $debug_start_time = $this->_get_microtime(); } $args = unserialize($insert_args[$i]); $name = $args['name']; unset($args['name']); if (isset($args['script'])) { if (!$this->_get_php_resource($this->_dequote($args['script']), $resource_type, $php_resource)) { return false; } if ($resource_type == 'file') { include_once($php_resource); } else { eval($php_resource); } unset($args['script']); } $function_name = $this->_plugins['insert'][$name][0]; $replace = $function_name($args, $this); $results = str_replace($cached_inserts[$i], $replace, $results); if ($this->debugging) { $this->_smarty_debug_info[] = array('type' => 'insert', 'filename' => 'insert_'.$name, 'depth' => $this->_inclusion_depth, 'exec_time' => $this->_get_microtime() - $debug_start_time); } } return $results; } /*======================================================================*\ Function: _run_insert_handler Purpose: Handle insert tags \*======================================================================*/ function _run_insert_handler($args) { if ($this->debugging) { $debug_start_time = $this->_get_microtime(); } if ($this->caching) { $arg_string = serialize($args); $name = $args['name']; if (!isset($this->_cache_info['insert_tags'][$name])) { $this->_cache_info['insert_tags'][$name] = array('insert', $name, $this->_plugins['insert'][$name][1], $this->_plugins['insert'][$name][2], !empty($args['script']) ? true : false); } return $this->_smarty_md5."{insert_cache $arg_string}".$this->_smarty_md5; } else { if (isset($args['script'])) { if (!$this->_get_php_resource($this->_dequote($args['script']), $resource_type, $php_resource)) { return false; } if ($resource_type == 'file') { include_once($php_resource); } else { eval($php_resource); } unset($args['script']); } $function_name = $this->_plugins['insert'][$args['name']][0]; $content = $function_name($args, $this); if ($this->debugging) { $this->_smarty_debug_info[] = array('type' => 'insert', 'filename' => 'insert_'.$args['name'], 'depth' => $this->_inclusion_depth, 'exec_time' => $this->_get_microtime() - $debug_start_time); } if (!empty($args["assign"])) { $this->assign($args["assign"], $content); } else { return $content; } } } /*======================================================================*\ Function: _run_mod_handler Purpose: Handle modifiers \*======================================================================*/ function _run_mod_handler() { $args = func_get_args(); list($modifier_name, $map_array) = array_splice($args, 0, 2); list($func_name, $tpl_file, $tpl_line) = $this->_plugins['modifier'][$modifier_name]; $var = $args[0]; if ($map_array && is_array($var)) { foreach ($var as $key => $val) { $args[0] = $val; $var[$key] = call_user_func_array($func_name, $args); } return $var; } else { return call_user_func_array($func_name, $args); } } /*======================================================================*\ Function: _dequote Purpose: Remove starting and ending quotes from the string \*======================================================================*/ function _dequote($string) { if (($string{0} == "'" || $string{0} == '"') && $string{strlen($string)-1} == $string{0}) return substr($string, 1, -1); else return $string; } /*======================================================================*\ Function: _read_file() Purpose: read in a file from line $start for $lines. read the entire file if $start and $lines are null. \*======================================================================*/ function _read_file($filename, $start=null, $lines=null) { if (!($fd = @fopen($filename, 'r'))) { return false; } flock($fd, LOCK_SH); if ($start == null && $lines == null) { // read the entire file $contents = fread($fd, filesize($filename)); } else { if ( $start > 1 ) { // skip the first lines before $start for ($loop=1; $loop < $start; $loop++) { fgets($fd, 65536); } } if ( $lines == null ) { // read the rest of the file while (!feof($fd)) { $contents .= fgets($fd, 65536); } } else { // read up to $lines lines for ($loop=0; $loop < $lines; $loop++) { $contents .= fgets($fd, 65536); if (feof($fd)) { break; } ... [truncated message content] |
From: Brian R. <hei...@us...> - 2003-02-04 21:44:05
|
Update of /cvsroot/phpmp/phpMP/languages/french In directory sc8-pr-cvs1:/tmp/cvs-serv30097/languages/french Modified Files: lang_main.php Log Message: Most all files updated. Forgot a small compatibility issue regarding <? and <?php. Also, deleted some lines at the end of files and changed a few config names. Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/french/lang_main.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** lang_main.php 5 Dec 2002 00:33:42 -0000 1.5 --- lang_main.php 4 Feb 2003 21:43:30 -0000 1.6 *************** *** 1,66 **** ! <? ! ! class Localization ! { ! ! var $lang; ! ! function Localization() ! { ! ! $this->lang = array( ! ! // ! // General language used throughout site. ! // ! // Note: Always escape single quote characters (') with a backslash (\). ! // ! 'L_Welcome_to_Site' => 'Bienvenue chez ' . C_SITE_NAME . '!', ! 'L_Home' => 'Accueil', ! 'L_Profile' => 'Profil', ! 'L_Modules' => 'Modules', ! 'L_Downloads' => 'Téléchargements', ! 'L_Username' => 'Nom d\'usager', ! 'L_User_CP' => 'User CP', ! 'L_User_Control_Panel' => 'Votre panneau de commande', ! 'L_E-mail' => 'Courriel', ! 'L_Password' => 'Mot de passe', ! 'L_Comfirm' => 'Confirmez', ! 'L_Real Name' => 'Prénom et Nom', ! 'L_Location' => 'Location', ! 'L_Register' => 'Enregistrer', ! 'L_Welcome' => 'Bienvenue', ! ! 'L_Administration_Area' => 'Section Administrative', ! 'L_Register_a_Username' => 'Enregistrez votre nom d\'usager', ! ! ! // ! // Below is language used almost specifically for auth. ! // ! 'L_Login' => 'Ouvrir session', ! 'L_Logout' => 'Fermer session', ! ! 'L_Account_Activated' => 'Votre compte a été activé. Vous pouvez maintenant ouvrir une session.', ! 'L_Required_Field' => 'Ceci dénote de l\'information requise pour votre enregistrement', ! 'L_Register_Finished' => 'Votre enregistrement a été traité. Un courriel expliquant l\'activation de votre compte sera envoyé à l\'adresse soumisse sous peu.', ! 'L_Forgot_Password' => 'Avez-vous oubliez votre mot de pass?', ! 'L_Not_logged_in' => 'Veuillez ouvrir une session via votre compte personel.', ! ! ! // ! // Other various parts of the templates. ! // ! 'L_Powered_by_phpMP' => 'Actionné par phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', ! 'L_Copyright' => 'Tout le contenu de se site est la propriété du propriétaire respectif. Tous droits réservés.' ! ! // It is IMPERATIVE that the last array value entered (usually the copyright) ! // does not end in a comma. ! ! ); ! ! } ! ! } ! ! ?> --- 1 ---- ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escape single quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Bienvenue chez ' . C_SITE_NAME . '!', 'L_Home' => 'Accueil', 'L_Profile' => 'Profil', 'L_Modules' => 'Modules', 'L_Downloads' => 'Téléchargements', 'L_Username' => 'Nom d\'usager', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'Votre panneau de commande', 'L_E-mail' => 'Courriel', 'L_Password' => 'Mot de passe', 'L_Comfirm' => 'Confirmez', 'L_Real Name' => 'Prénom et Nom', 'L_Location' => 'Location', 'L_Register' => 'Enregistrer', 'L_Welcome' => 'Bienvenue', 'L_Administration_Area' => 'Section Administrative', 'L_Register_a_Username' => 'Enregistrez votre nom d\'usager', // // Below is language used almost specifically for auth. // 'L_Login' => 'Ouvrir session', 'L_Logout' => 'Fermer session', 'L_Account_Activated' => 'Votre compte a été activé. Vous pouvez maintenant ouvrir une session.', 'L_Required_Field' => 'Ceci dénote de l\'information requise pour votre enregistrement', 'L_Register_Finished' => 'Votre enregistrement a été traité. Un courriel expliquant l\'activation de votre compte sera envoyé à l\'adresse soumisse sous peu.', 'L_Forgot_Password' => 'Avez-vous oubliez votre mot de pass?', 'L_Not_logged_in' => 'Veuillez ouvrir une session via votre compte personel.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'Actionné par phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'Tout le contenu de se site est la propriété du propriétaire respectif. Tous droits réservés.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-04 21:44:03
|
Update of /cvsroot/phpmp/phpMP/languages/english In directory sc8-pr-cvs1:/tmp/cvs-serv30097/languages/english Modified Files: lang_main.php Log Message: Most all files updated. Forgot a small compatibility issue regarding <? and <?php. Also, deleted some lines at the end of files and changed a few config names. Index: lang_main.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/languages/english/lang_main.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** lang_main.php 5 Dec 2002 00:33:42 -0000 1.14 --- lang_main.php 4 Feb 2003 21:43:29 -0000 1.15 *************** *** 1,66 **** ! <? ! ! class Localization ! { ! ! var $lang; ! ! function Localization() ! { ! ! $this->lang = array( ! ! // ! // General language used throughout site. ! // ! // Note: Always escaple singe quote characters (') with a backslash (\). ! // ! 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', ! 'L_Home' => 'Home', ! 'L_Profile' => 'Profile', ! 'L_Modules' => 'Modules', ! 'L_Downloads' => 'Downloads', ! 'L_Username' => 'Username', ! 'L_User_CP' => 'User CP', ! 'L_User_Control_Panel' => 'User Control Panel', ! 'L_E-mail' => 'E-mail', ! 'L_Password' => 'Password', ! 'L_Comfirm' => 'Confirm', ! 'L_Real Name' => 'Real Name', ! 'L_Location' => 'Location', ! 'L_Register' => 'Register', ! 'L_Welcome' => 'Welcome', ! ! 'L_Administration_Area' => 'Administration Area', ! 'L_Register_a_Username' => 'Register a Username', ! ! ! // ! // Below is language used almost specifically for auth. ! // ! 'L_Login' => 'Login', ! 'L_Logout' => 'Logout', ! ! 'L_Account_Activated' => 'Your account has been activated. You may now log in.', ! 'L_Required_Field' => 'Denotes a Required Field', ! 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', ! 'L_Forgot_Password' => 'Forgot Your Password?', ! 'L_Not_logged_in' => 'You are not logged in.', ! ! ! // ! // Other various parts of the templates. ! // ! 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', ! 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' ! ! // It is IMPERATIVE that the last array value entered (usually the copyright) ! // does not end in a comma. ! ! ); ! ! } ! ! } ! ! ?> --- 1 ---- ! <?php class Localization { var $lang; function Localization() { $this->lang = array( // // General language used throughout site. // // Note: Always escaple singe quote characters (') with a backslash (\). // 'L_Welcome_to_Site' => 'Welcome to ' . C_SITE_NAME . '!', 'L_Home' => 'Home', 'L_Profile' => 'Profile', 'L_Modules' => 'Modules', 'L_Downloads' => 'Downloads', 'L_Username' => 'Username', 'L_User_CP' => 'User CP', 'L_User_Control_Panel' => 'User Control Panel', 'L_E-mail' => 'E-mail', 'L_Password' => 'Password', 'L_Comfirm' => 'Confirm', 'L_Real Name' => 'Real Name', 'L_Location' => 'Location', 'L_Register' => 'Register', 'L_Welcome' => 'Welcome', 'L_Administration_Area' => 'Administration Area', 'L_Register_a_Username' => 'Register a Username', // // Below is language used almost specifically for auth. // 'L_Login' => 'Login', 'L_Logout' => 'Logout', 'L_Account_Activated' => 'Your account has been activated. You may now log in.', 'L_Required_Field' => 'Denotes a Required Field', 'L_Register_Finished' => 'Your registration has been processed. Please check your e-mail for a message explaining how to activate your new account.', 'L_Forgot_Password' => 'Forgot Your Password?', 'L_Not_logged_in' => 'You are not logged in.', // // Other various parts of the templates. // 'L_Powered_by_phpMP' => 'powered by phpMP ' . C_VERSION . ' © 2002 <a href="http://phpmp.sourceforge.net/">phpMP Dev. Group</a>.', 'L_Copyright' => 'All content is property of its respective owner. All rights reserved.' // It is IMPERATIVE that the last array value entered (usually the copyright) // does not end in a comma. ); } } ?> \ No newline at end of file |
From: Brian R. <hei...@us...> - 2003-02-04 21:43:50
|
Update of /cvsroot/phpmp/phpMP/docs In directory sc8-pr-cvs1:/tmp/cvs-serv30097/docs Modified Files: Changelog config.php.sample Log Message: Most all files updated. Forgot a small compatibility issue regarding <? and <?php. Also, deleted some lines at the end of files and changed a few config names. Index: Changelog =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/Changelog,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** Changelog 4 Feb 2003 02:36:14 -0000 1.12 --- Changelog 4 Feb 2003 21:43:15 -0000 1.13 *************** *** 1,2 **** --- 1,7 ---- + 2002-02-03 [Heimidal] + + * Every file I can think of. + Changed <? to <?php for compatibility. + Changed a few config values and such. 2003-02-03 [Heimidal] Index: config.php.sample =================================================================== RCS file: /cvsroot/phpmp/phpMP/docs/config.php.sample,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config.php.sample 2 Dec 2002 00:37:56 -0000 1.1 --- config.php.sample 4 Feb 2003 21:43:16 -0000 1.2 *************** *** 1,3 **** ! <? ## DO NOT ALTER THIS FILE. --- 1,3 ---- ! <?php ## DO NOT ALTER THIS FILE. *************** *** 16,18 **** define( "DB_PASSWD", "passwd" ); ! ?> --- 16,18 ---- define( "DB_PASSWD", "passwd" ); ! ?> \ No newline at end of file |