Posted on: 05/14/05 09:45pm
By: Blaine
Posted on: 05/20/05 02:17pm
By: tesn
Posted on: 05/21/05 10:43am
By: Anonymous (SmackDaddy)
Posted on: 05/22/05 12:47am
By: tesn
$message = "<br><font color=black><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b></font>";
Posted on: 05/23/05 12:00pm
By: Anonymous (thud)
Posted on: 05/23/05 03:03pm
By: tesn
Posted on: 05/23/05 04:00pm
By: Blaine
Posted on: 05/25/05 11:27am
By: tesn
Posted on: 10/25/05 11:37am
By: Vapour71
Posted on: 10/25/05 01:37pm
By: Dirk
Posted on: 10/25/05 01:41pm
By: Vapour71
Posted on: 10/25/05 01:54pm
By: jetshack
Posted on: 11/03/05 10:14pm
By: Anonymous (Dave)
Posted on: 11/03/05 10:39pm
By: Anonymous (Dave)
Posted on: 11/03/05 10:45pm
By: Anonymous (Dave)
Posted on: 11/03/05 10:49pm
By: Anonymous (Dave)
Posted on: 11/15/05 04:11pm
By: the Modfather
Posted on: 12/16/05 05:42pm
By: jordydme
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Geeklog 1.3 | // +---------------------------------------------------------------------------+ // | lib-custom.php | // | Your very own custom Geeklog library. | // | | // | This is the file where you should put all of your custom code. When | // | possible you should not alter lib-common.php but, instead, put code here. | // | This will make upgrading to future versions of Geeklog easier for you | // | because you will always be gauranteed that the Geeklog developers will | // | NOT add code to this file. NOTE: we have already gone through the trouble | // | of making sure that we always include this file when lib-common.php is | // | included some place so you will have access to lib-common.php. It | // | follows then that you should not include lib-common.php in this file | // | | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2005 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Blaine Lang - blaine AT portalparts DOT com | // | Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ // // $Id: lib-custom.php,v 1.11.2.1 2005/10/03 09:24:36 dhaun Exp $ // You can use this global variable to print useful messages to the errorlog // using COM_errorLog(). To see an example of how to do this, look in // lib-common.php and see how $_COM_VERBOSE was used throughout the code $_CST_VERBOSE = false; /** * Sample PHP Block function * * this is a sample function used by a PHP block. This will show the rights that * a user has in the "What you have access to" block. * */ function phpblock_showrights() { global $_RIGHTS, $_CST_VERBOSE; if ($_CST_VERBOSE) { COM_errorLog('**** Inside phpblock_showrights in lib-custom.php ****', 1); } $retval .= ' '; for ($i = 0; $i < count($_RIGHTS); $i++) { $retval .= '<li>' . $_RIGHTS[$i] . '</li>' . LB; } if ($_CST_VERBOSE) { COM_errorLog('**** Leaving phpblock_showrights in lib-custom.php ****', 1); } return $retval; } /*** * * Get Bent() * * Php function to tell you how if your site is grossly insecure * **/ function phpblock_getBent() { global $_CONF, $_TABLES; $secure = true; $retval = ''; $secure_msg = 'Could not find any gross insecurities in your site. Do not take this '; $secure_msg .= 'as meaning your site is 100% secure, as no site ever is. I can only '; $secure_msg .= 'check things that should be blatantly obvious.'; $insecure_msg = ''; // we don't have the path to the admin directory, so try to figure it out // from $_CONF['site_admin_url'] $adminurl = $_CONF['site_admin_url']; if (strrpos ($adminurl, '/') == strlen ($adminurl)) { $adminurl = substr ($adminurl, 0, -1); } $pos = strrpos ($adminurl, '/'); if ($pos === false) { // only guessing ... $installdir = $_CONF['path_html'] . 'admin/install'; } else { $installdir = $_CONF['path_html'] . substr ($adminurl, $pos + 1) . '/install'; } if (is_dir ($installdir)) { $insecure_msg .= '<p>You should really remove the install directory <b>' . $installdir .'</b> once you have your site up and running without any errors.'; $insecure_msg .= ' Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.'; $secure = false; } // check to see if any account still has 'password' as its password. $count = DB_query("select count(*) as count from {$_TABLES['users']} where passwd='" . md5('password') . "'"); $A = DB_fetchArray($count); if ( $A['count'] > 0 ) { $secure = false; $insecure_msg .= '<p>You still have not changed the default password from "password" on ' . $A['count'] . ' account(s). '; $insecure_msg .= 'This will allow people to do serious harm to your site!'; } if ($secure) { $retval = $secure_msg; } else { $retval = $insecure_msg; } $retval = wordwrap($retval,20,' ',1); return $retval; } /* Sample Custom Member Functions to create and update Custom Membership registration and profile Note1: Enable CustomRegistration Feature in config.php $_CONF['custom_registration'] = true; // Set to true if you have custom code Note2: This example requries a template file called memberdetail.thtml to be located under the theme_dir/custom directory. Sample is provided under /system with the distribution. Functions have been provided that are called from the Core Geeklog user and admin functions - This works with User Moderation as well - Admin will see the new registration info when checking a members profile only - All other users will see the standard User profile with the optional extended custom information - Customization requires changes to a few of the core template files to add {customfields} variable - See notes below in the custom function about the template changes */ /* Create any new records in additional tables you may have added */ /* Update any fields in the core GL tables for this user as needed */ /* Called when user is first created */ function custom_usercreate($uid) { global $_TABLES; $grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = COM_applyFilter($_POST['cust_fullname']); // Ensure all data is prepared correctly before inserts, quotes may need to be escaped with addslashes() DB_query("INSERT INTO {$_TABLES['localuserinfo']} (uid,grad_year) VALUES ('$uid', '$grad_year')"); DB_query("UPDATE {$_TABLES['users']} SET fullname = '$fullname' WHERE uid='$uid'"); return true; } // Delete user record from custom user info table function custom_userdelete($uid) { global $_TABLES; DB_query("DELETE FROM {$_TABLES['localuserinfo']} WHERE uid='$uid'"); return true; } /* Called from users.php - when user is displaying a member profile */ /* This function can now return any extra fields that need to be shown */ /* Output is then replaced in {customfields) -- This variable needs to be added to your templates */ /* Template: path_layout/users/profile/profile.thtml */ function custom_userdisplay($uid) { global $_CONF,$_TABLES; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td>' . $fullname .'</td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td>' . $grad_year .'</td> </tr>'; return $retval; } /* Function called when editing user profile. */ /* Called from usersettings.php - when user is eding their own profile */ /* and from admin/user.php when admin is editing a member profile */ /* This function can now return any extra fields that need to be shown for editing */ /* Output is then replaced in {customfields} -- This variable needs to be added to your templates */ /* User: path_layout/preferences/profile.thtml and Admin: path_layout/admin/user/edituser.thtml */ /* This example shows adding the Cookie Timeout setting and extra text field */ /* As noted: You need to add the {customfields} template variable. */ /* For the edituser.thtml - maybe it would be added about the {group_edit} variable. */ function custom_useredit($uid) { global $_TABLES,$_CONF; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td><input type="text" name="cust_fullname" size="50" value="' . $fullname .'"></td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td><input type="text" name="cust_gradyear" size="5" maxlength="4" value="' . $grad_year .'"></td> </tr>'; $retval .= '<tr><td colspan="2"><hr></td></tr>'; return $retval; } /* Function called when saving the user profile. */ /* This function can now update any extra fields */ function custom_usersave($uid) { global $_TABLES; $grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = COM_applyFilter($_POST['fullname']); DB_query("UPDATE {$_TABLES['users']} SET fullname='$fullname' WHERE uid='$uid'"); if ($grad_year > 0) { DB_query("UPDATE {$_TABLES['localuserinfo']} SET grad_year='$grad_year' WHERE uid='$uid'"); } } /** * Main Form used for Custom membership when member is registering * * Note: Requires a file custom/memberdetail.thtml in every theme that is * installed on the site! * * @param string $msg an error message to display or the word 'new' * @return string HTML for the registration form * */ function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty($msg)) { $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = '<input type="submit" value="Register Now!">'; $passwd_input = ""; $message = "<br><font color=black><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b></font>"; $A=array(); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', "Valid email address"); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('GRADYEAR', "Graduation Year"); $user_templates->set_var('GRADYEAR_HELP', "That big year!"); $user_templates->set_var('grad_year', ""); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); $user_templates->set_var('endblock', COM_endBlock()); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Check if it's okay to create a new user. * * Geeklog is about to create a new user with the given username and email * address. This is the custom code's last chance to prevent that, * e.g. to check if all required data has been entered. * * @param string $username username that Geeklog would use for the new user* @param string $email email address of that user * @return string an error message or an empty string for "OK" * */ function custom_usercheck ($username, $email) { $msg = ''; // Example, check that the full name has been entered // and complain if it's missing if (empty ($_POST['fullname'])) { $msg = 'Please enter your full name!'; } return $msg; } /** * Custom function to retrieve and return a formatted list of blocks * Can be used when calling COM_siteHeader or COM_SiteFooter * Example: * 1: Setup an array of blocks to display * 2: Call COM_siteHeader or COM_siteFooter * * $myblocks = array ('site_menu','site_news','poll_block'); * COM_siteHeader( array('COM_showCustomBlocks',$myblocks) ) ; * COM_siteFooter( true, array('COM_showCustomBlocks',$myblocks)); * @param array $showblocks An array of block names to retrieve and format * @return string Formated HTML containing site footer and optionally right blocks */ function custom_showBlocks($showblocks) { global $_CONF, $_TABLES; $retval = ''; foreach($showblocks as $block) { $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help FROM {$_TABLES['blocks']} WHERE name='$block'"; $result = DB_query($sql); if (DB_numRows($result) == 1) { $A = DB_fetchArray($result); $retval .= COM_formatBlock($A); } } return $retval; } /** * This is an example of a custom email function. When this function is NOT * commented out, Geeklog would send all emails through this function * instead of sending them through COM_mail in lib-common.php. * * This is basically a re-implementation of the way emails were sent * prior to Geeklog 1.3.9 (Geeklog uses PEAR::Mail as of version 1.3.9). * */ /* function CUSTOM_mail($to, $subject, $message, $from = '', $html = false, $priority = 0) { global $_CONF, $LANG_CHARSET; if (empty ($LANG_CHARSET)) { $charset = $_CONF['default_charset']; if (empty ($charset)) { $charset = 'iso-8859-1'; } } else { $charset = $LANG_CHARSET; } if (empty ($from)) { $from = $_CONF['site_name'] . ' <' . $_CONF['site_mail'] . '>'; } $headers = 'From: ' . $from . "rn" . 'X-Mailer: Geeklog ' . VERSION . "rn"; if ($priority > 0) { $headers .= 'X-Priority: ' . $priority . "rn"; } if ($html) { $headers .= "Content-Type: text/html; charset={$charset}rn" . 'Content-Transfer-Encoding: 8bit'; } else { $headers .= "Content-Type: text/plain; charset={$charset}"; } return mail ($to, $subject, $message, $headers); } */ /** * This is an example of a function that returns menu entries to be used for * the 'custom' entry in $_CONF['menu_elements'] (see config.php). * */ /* function CUSTOM_menuEntries () { global $_CONF, $_USER; $myentries = array (); // Sample link #1: Link to Gallery $myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/', 'label' => 'Gallery'); // Sample link #2: Link to the Personal Calendar - only visible for // logged-in users if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) { $myentries[] = array ('url' => $_CONF['site_url'] . '/calendar.php?mode=personal', 'label' => 'My Calendar'); } return $myentries; } */ ?>
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Geeklog 1.3 | // +---------------------------------------------------------------------------+ // | lib-database.php | // | | // | Geeklog database library. | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2004 by the following authors: | // | | // | Authors: Tony Bibbs, tony@tonybibbs.com | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ // // $Id: lib-database.php,v 1.33 2004/11/20 17:55:07 dhaun Exp $ /** * This is the high-level database layer for Geeklog (for the low-level stuff, * see the system/databases directory). * * NOTE: As of Geeklog 1.3.5 you should not have to edit this file any more. */ // +---------------------------------------------------------------------------+ // | Table definitions, these are used by the install program to create the | // | database schema. If you don't like the tables names, change them PRIOR | // | to running the install after running the install program DO NOT TOUCH | // | these. You have been warned! Also, these variables are used in the core | // | Geeklog code | // +---------------------------------------------------------------------------+ $_TABLES['access'] = $_DB_table_prefix . 'access'; $_TABLES['article_images'] = $_DB_table_prefix . 'article_images'; $_TABLES['blocks'] = $_DB_table_prefix . 'blocks'; $_TABLES['commentcodes'] = $_DB_table_prefix . 'commentcodes'; $_TABLES['commentmodes'] = $_DB_table_prefix . 'commentmodes'; $_TABLES['comments'] = $_DB_table_prefix . 'comments'; $_TABLES['cookiecodes'] = $_DB_table_prefix . 'cookiecodes'; $_TABLES['dateformats'] = $_DB_table_prefix . 'dateformats'; $_TABLES['events'] = $_DB_table_prefix . 'events'; $_TABLES['eventsubmission'] = $_DB_table_prefix . 'eventsubmission'; $_TABLES['featurecodes'] = $_DB_table_prefix . 'featurecodes'; $_TABLES['features'] = $_DB_table_prefix . 'features'; $_TABLES['frontpagecodes'] = $_DB_table_prefix . 'frontpagecodes'; $_TABLES['group_assignments'] = $_DB_table_prefix . 'group_assignments'; $_TABLES['groups'] = $_DB_table_prefix . 'groups'; $_TABLES['links'] = $_DB_table_prefix . 'links'; $_TABLES['linksubmission'] = $_DB_table_prefix . 'linksubmission'; $_TABLES['maillist'] = $_DB_table_prefix . 'maillist'; $_TABLES['personal_events'] = $_DB_table_prefix . 'personal_events'; $_TABLES['plugins'] = $_DB_table_prefix . 'plugins'; $_TABLES['pollanswers'] = $_DB_table_prefix . 'pollanswers'; $_TABLES['pollquestions'] = $_DB_table_prefix . 'pollquestions'; $_TABLES['pollvoters'] = $_DB_table_prefix . 'pollvoters'; $_TABLES['postmodes'] = $_DB_table_prefix . 'postmodes'; $_TABLES['sessions'] = $_DB_table_prefix . 'sessions'; $_TABLES['sortcodes'] = $_DB_table_prefix . 'sortcodes'; $_TABLES['speedlimit'] = $_DB_table_prefix . 'speedlimit'; $_TABLES['statuscodes'] = $_DB_table_prefix . 'statuscodes'; $_TABLES['stories'] = $_DB_table_prefix . 'stories'; $_TABLES['storysubmission'] = $_DB_table_prefix . 'storysubmission'; $_TABLES['syndication'] = $_DB_table_prefix . 'syndication'; $_TABLES['topics'] = $_DB_table_prefix . 'topics'; $_TABLES['tzcodes'] = $_DB_table_prefix . 'tzcodes'; $_TABLES['usercomment'] = $_DB_table_prefix . 'usercomment'; $_TABLES['userindex'] = $_DB_table_prefix . 'userindex'; $_TABLES['userinfo'] = $_DB_table_prefix . 'userinfo'; $_TABLES['userprefs'] = $_DB_table_prefix . 'userprefs'; $_TABLES['users'] = $_DB_table_prefix . 'users'; $_TABLES['vars'] = $_DB_table_prefix . 'vars'; $_TABLES['localuserinfo'] = $_DB_table_prefix . 'localuserinfo'; // the static pages plugin has become an integral part of Geeklog anyway ... $_TABLES['staticpage'] = $_DB_table_prefix . 'staticpage'; // ditto for spamx $_TABLES['spamx'] = $_DB_table_prefix . 'spamx'; // these tables aren't used by Geeklog any more, but the table names are needed // when upgrading from old versions $_TABLES['commentspeedlimit'] = $_DB_table_prefix . 'commentspeedlimit'; $_TABLES['submitspeedlimit'] = $_DB_table_prefix . 'submitspeedlimit'; $_TABLES['userevent'] = $_DB_table_prefix . 'userevent'; // +---------------------------------------------------------------------------+ // | DO NOT TOUCH ANYTHING BELOW HERE | // +---------------------------------------------------------------------------+ if (eregi ('lib-database.php', $HTTP_SERVER_VARS['PHP_SELF'])) { die ('This file can not be used on its own.'); } /** * Include appropriate DBMS object * */ require_once($_CONF['path_system'] . 'databases/'. $_DB_dbms . '.class.php'); // Instantiate the database object $_DB = new database($_DB_host,$_DB_name,$_DB_user,$_DB_pass,'COM_errorLog'); // +---------------------------------------------------------------------------+ // | These are the library functions. In all cases they turn around and make | // | calls to the DBMS specific functions. These ARE to be used directly in | // | the code...do NOT use the $_DB methods directly // +---------------------------------------------------------------------------+ /** * Turns debug mode on for the database library * * Setting this to true will cause the database code to print out * various debug messages. Setting it to false will supress the * messages (is false by default). NOTE: Gl developers have put many * useful debug messages into the mysql implementation of this. If * you are using something other than MySQL and if the GL team did * not write it then you may or may not get something useful by turning * this on. * * @param boolean $flag true or false * */ function DB_setdebug($flag) { global $_DB; $_DB->setVerbose($flag); } /** * Executes a query on the db server * * This executes the passed SQL and returns the recordset or errors out * * @param string $sql SQL to be executed * @param int $ignore_errors If 1 this function supresses any error messages * @return object Returns results from query * */ function DB_query($sql, $ignore_errors=0) { global $_DB; return $_DB->dbQuery($sql,$ignore_errors); } /** * Saves information to the database * * This will use a REPLACE INTO to save a record into the * database. NOTE: this function is going to change in the near future * to remove dependency of REPLACE INTO. Please use DB_query if you can * * @param string $table The table to save to * @param string $fields Comma demlimited list of fields to save * @param string $values Values to save to the database table * @param string $return_page URL to send user to when done * */ function DB_save($table,$fields,$values,$return_page='') { global $_DB,$_TABLES,$_CONF; $_DB->dbSave($table,$fields,$values); if (!empty($return_page)) { print COM_refresh("$return_page"); } } /** * Deletes data from the database * * This will delete some data from the given table where id = value * * @param string $table Table to delete data from * @param array|string $id field name(s) to use in where clause * @param array|string $value value(s) to use in where clause * @param string $return_page page to send user to when done * */ function DB_delete($table,$id,$value,$return_page='') { global $_DB,$_TABLES,$_CONF; $_DB->dbDelete($table,$id,$value); if (!empty($return_page)) { print COM_refresh("$return_page"); } } /** * Gets a single item from the database * * @param string $table Table to get item from * @param string $what field name to get * @param string $selection Where clause to use in SQL * @return mixed Returns value sought * */ function DB_getItem($table,$what,$selection='') { if (!empty($selection)) { $result = DB_query("SELECT $what FROM $table WHERE $selection"); } else { $result = DB_query("SELECT $what FROM $table"); } $ITEM = DB_fetchArray($result, true); return $ITEM[0]; } /** * Changes records in a table * * This will change the data in the given table that meet the given criteria and will * redirect user to another page if told to do so * * @param string $table Table to perform change on * @param string $item_to_set field name to set * @param string $value_to_set Value to set abovle field to * @param array|string $id field name(s) to use in where clause * @param array|string $value Value(s) to use in where clause * @param string $return_page page to send user to when done with change * @param boolean $supress_quotes whether or not to use single quotes in where clause * */ function DB_change($table,$item_to_set,$value_to_set,$id='',$value='',$return_page='',$supress_quotes=false) { global $_DB,$_TABLES,$_CONF; $_DB->dbChange($table,$item_to_set,$value_to_set,$id,$value,$supress_quotes); if (!empty($return_page)) { print COM_refresh("$return_page"); } } /** * Count records in a table * * This will return the number of records which meet the given criteria in the * given table. * * @param string $table Table to perform count on * @param array|string $id field name(s) to use in where clause * @param array|string $value Value(s) to use in where clause * @return int Returns row count from generated SQL * */ function DB_count($table,$id='',$value='') { global $_DB; return $_DB->dbCount($table,$id,$value); } /** * Copies a record from one table to another (can be the same table) * * This will use a REPLACE INTO...SELECT FROM to copy a record from one table * to another table. They can be the same table. * * @param string $table Table to insert record into * @param string $fields Comma delmited list of fields to copy over * @param string $values Values to store in database field * @param string $tablefrom Table to get record from * @param array|string $id Field name(s) to use in where clause * @param array|string $value Value(s) to use in where clause * @param string $return_page Page to send user to when done * */ function DB_copy($table,$fields,$values,$tablefrom,$id,$value,$return_page='') { global $_DB,$_TABLES,$_CONF; $_DB->dbCopy($table,$fields,$values,$tablefrom,$id,$value); if (!empty($return_page)) { print COM_refresh("$return_page"); } } /** * Retrieves the number of rows in a recordset * * This returns the number of rows in a recordset * * @param object $recordset The recordset to operate one * @return int Returns number of rows returned by a previously executed query * */ function DB_numRows($recordset) { global $_DB; return $_DB->dbNumRows($recordset); } /** * Retrieves the contents of a field * * This returns the contents of a field from a result set * * @param object $recordset The recordset to operate on * @param int $row row to get data from * @param string $field field to return * @return (depends on the contents of the field) * */ function DB_result($recordset,$row,$field) { global $_DB; return $_DB->dbResult($recordset,$row,$field); } /** * Retrieves the number of fields in a recordset * * This returns the number of fields in a recordset * * @param object $recordset The recordset to operate on * @return int Returns the number fields in a result set * */ function DB_numFields($recordset) { global $_DB; return $_DB->dbNumFields($recordset); } /** * Retrieves returns the field name for a field * * Returns the field name for a given field number * * @param object $recordset The recordset to operate on * @param int $fnumber field number to return the name of * @return string Returns name of specified field * */ function DB_fieldName($recordset,$fnumber) { global $_DB; return $_DB->dbFieldName($recordset,$fnumber); } /** * Retrieves returns the number of effected rows for last query * * Retrieves returns the number of effected rows for last query * * @param object $recordset The recordset to operate on * @return int returns numbe of rows affected by previously executed query * */ function DB_affectedRows($recordset) { global $_DB; return $_DB->dbAffectedRows($recordset); } /** * Retrieves record from a recordset * * Gets the next record in a recordset and returns in array * * @param object $recordset The recordset to operate on * @param boolean $both get both assoc and numeric indices * @return Array Returns data for a record in an array * */ function DB_fetchArray($recordset, $both = true) { global $_DB; return $_DB->dbFetchArray($recordset, $both); } /** * Returns the last ID inserted * * Returns the last auto_increment ID generated * * @param resources $link_identifier identifier for opened link * @return int Returns the last ID auto-generated * */ function DB_insertId($link_identifier = '') { global $_DB; return $_DB->dbInsertId($link_identifier); } /** * returns a database error string * * Returns an database error message * * @return string Returns database error message * */ function DB_error() { global $_DB; return $_DB->dbError(); } /** * Creates database structures for fresh installation * * This may not be used by Geeklog currently * * @return boolean returns true on success otherwise false * */ function DB_createDatabaseStructures() { global $_DB; return $_DB->dbCreateStructures(); } /** * Executes the sql upgrade script(s) * * @param string $current_gl_version version of geeklog to upgrade from * @return boolean returns true on success otherwise false * */ function DB_doDatabaseUpgrade($current_gl_version) { global $_DB; return $_DB->dbDoDatabaseUpgrade($current_gl_version); } ?>
Posted on: 12/16/05 10:17pm
By: Blaine
Posted on: 12/17/05 02:36pm
By: jordydme
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Geeklog 1.3 | // +---------------------------------------------------------------------------+ // | users.php | // | | // | User authentication module. | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2004 by the following authors: | // | | // | Authors: Tony Bibbs - tony@tonybibbs.com | // | Mark Limburg - mlimburg@users.sourceforge.net | // | Jason Whittenburg - jwhitten@securitygeeks.com | // | Dirk Haun - dirk@haun-online.de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ // // $Id: users.php,v 1.93.2.4 2005/10/03 09:24:36 dhaun Exp $ /** * This file handles user authentication * * @author Tony Bibbs <tony@tonybibbs.com> * @author Mark Limburg <mlimburg@users.sourceforge.net> * @author Jason Whittenburg * */ /** * Geeklog common function library */ require_once ('lib-common.php'); require_once ($_CONF['path_system'] . 'lib-user.php'); $VERBOSE = false; // Uncomment the line below if you need to debug the HTTP variables being passed // to the script. This will sometimes cause errors but it will allow you to see // the data being passed in a POST operation // echo COM_debug($HTTP_POST_VARS); /** * Shows a profile for a user * * This grabs the user profile for a given user and displays it * * @param int $user User ID of profile to get * @param int $msg Message to display (if != 0) * @return string HTML for user profile page * */ function userprofile ($user, $msg = 0) { global $_CONF, $_TABLES, $_USER, $LANG01, $LANG04, $LANG_LOGIN; $retval = ''; if (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) || ($_CONF['profileloginrequired'] == 1))) { $retval .= COM_siteHeader ('menu'); $retval .= COM_startBlock ($LANG_LOGIN[1], '', COM_getBlockTemplate ('_msg_block', 'header')); $login = new Template($_CONF['path_layout'] . 'submit'); $login->set_file (array ('login'=>'submitloginrequired.thtml')); $login->set_var ('login_message', $LANG_LOGIN[2]); $login->set_var ('site_url', $_CONF['site_url']); $login->set_var ('lang_login', $LANG_LOGIN[3]); $login->set_var ('lang_newuser', $LANG_LOGIN[4]); $login->parse ('output', 'login'); $retval .= $login->finish ($login->get_var('output')); $retval .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); $retval .= COM_siteFooter (); return $retval; } $result = DB_query("SELECT username,fullname,regdate,homepage,about,location,pgpkey,photo FROM {$_TABLES['userinfo']},{$_TABLES["users"]} WHERE {$_TABLES['userinfo']}.uid = {$_TABLES['users']}.uid AND {$_TABLES['users']}.uid = $user"); $nrows = DB_numRows($result); if ($nrows == 0) { // no such user return COM_refresh ($_CONF['site_url'] . '/index.php'); } $A = DB_fetchArray($result); $retval .= COM_siteHeader ('menu', $LANG04[1] . ' ' . $A['username']); if ($msg > 0) { $retval .= COM_showMessage ($msg); } // format date/time to user preference $curtime = COM_getUserDateTimeFormat($A["regdate"]); $A['regdate'] = $curtime[0]; $user_templates = new Template($_CONF['path_layout'] . 'users'); $user_templates->set_file(array('profile'=>'profile.thtml','row'=>'commentrow.thtml','strow'=>'storyrow.thtml')); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block_userprofile', COM_startBlock($LANG04[1] . ' ' . $A['username'])); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('username', $A['username']); if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) { if (strstr ($_CONF['path_images'], $_CONF['path_html'])) { $imgpath = substr ($_CONF['path_images'], strlen ($_CONF['path_html'])); $user_templates->set_var ('user_photo', '<img src="' . $_CONF['site_url'] . '/' . $imgpath . 'userphotos/' . $A['photo'] . '" alt="">'); } else { $user_templates->set_var ('user_photo', '<img src="' . $_CONF['site_url'] . '/getimage.php?mode=userphotos&image=' . $A['photo'] . '" alt="">'); } } else { $user_templates->set_var('user_photo',''); } $user_templates->set_var('user_fullname', $A['fullname']); $user_templates->set_var('lang_membersince', $LANG04[67]); $user_templates->set_var('user_regdate', $A['regdate']); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('user_id', $user); $user_templates->set_var('lang_sendemail', $LANG04[81]); $user_templates->set_var('lang_homepage', $LANG04[6]); $user_templates->set_var('user_homepage', COM_killJS ($A['homepage'])); $user_templates->set_var('lang_location', $LANG04[106]); $user_templates->set_var('user_location', $A['location']); $user_templates->set_var('lang_bio', $LANG04[7]); $user_templates->set_var('user_bio', nl2br(stripslashes($A['about']))); $user_templates->set_var('lang_pgpkey', $LANG04[8]); $user_templates->set_var('user_pgp', nl2br($A['pgpkey'])); $user_templates->set_var('start_block_last10stories', COM_startBlock($LANG04[82] . ' ' . $A['username'])); $user_templates->set_var('start_block_last10comments', COM_startBlock($LANG04[10] . ' ' . $A['username'])); $user_templates->set_var('start_block_postingstats', COM_startBlock($LANG04[83] . ' ' . $A['username'])); // for alternative layouts: use these as headlines instead of block titles $user_templates->set_var('headline_last10stories', $LANG04[82]); $user_templates->set_var('headline_last10comments', $LANG04[10]); $user_templates->set_var('headline_postingstats', $LANG04[83]); $result = DB_query ("SELECT tid FROM {$_TABLES['topics']}" . COM_getPermSQL ()); $nrows = DB_numRows ($result); $tids = array (); for ($i = 0; $i < $nrows; $i++) { $T = DB_fetchArray ($result); $tids[] = $T['tid']; } $topics = "'" . implode ("','", $tids) . "'"; // list of last 10 stories by this user if (sizeof ($tids) > 0) { $sql = "SELECT sid,title,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW()) AND (tid IN ($topics))" . COM_getPermSQL ('AND'); $sql .= " ORDER BY unixdate DESC LIMIT 10"; $result = DB_query($sql); $nrows = DB_numRows($result); } else { $nrows = 0; } if ($nrows > 0) { for ($i = 1; $i <= $nrows; $i++) { $C = DB_fetchArray($result); $user_templates->set_var('row_number', $i . '.'); $articleUrl = COM_buildUrl ($_CONF['site_url'] . '/article.php?story=' . $C['sid']); $user_templates->set_var ('article_url', $articleUrl); $user_templates->set_var ('story_begin_href', '<a href="' . $articleUrl . '">'); $C['title'] = str_replace ('$', '$', $C['title']); $user_templates->set_var('story_title', stripslashes($C['title'])); $user_templates->set_var('story_end_href', '</a>'); $storytime = COM_getUserDateTimeFormat($C['unixdate']); $user_templates->set_var('story_date', $storytime[0]); $user_templates->parse('story_row','strow',true); } } else { $user_templates->set_var('story_row','<tr><td>' . $LANG01[37] . '</td></tr>'); } // list of last 10 comments by this user $sidArray = array(); if (sizeof ($tids) > 0) { // first, get a list of all stories the current visitor has access to $sql = "SELECT sid FROM {$_TABLES['stories']} WHERE (draft_flag = 0) AND (date <= NOW()) AND (tid IN ($topics))" . COM_getPermSQL ('AND'); $result = DB_query($sql); $numsids = DB_numRows($result); for ($i = 1; $i <= $numsids; $i++) { $S = DB_fetchArray ($result); $sidArray[] = $S['sid']; } } // add all polls the current visitor has access to $sql = "SELECT qid FROM {$_TABLES['pollquestions']}" . COM_getPermSQL (); $result = DB_query($sql); $numqids = DB_numRows($result); for ($i = 1; $i <= $numqids; $i++) { $Q = DB_fetchArray ($result); $sidArray[] = $Q['qid']; } $sidList = implode("', '",$sidArray); $sidList = "'$sidList'"; // then, find all comments by the user in those stories and polls $sql = "SELECT sid,title,cid,UNIX_TIMESTAMP(date) AS unixdate FROM {$_TABLES['comments']} WHERE (uid = $user)"; // SQL NOTE: Using a HAVING clause is usually faster than a where if the // field is part of the select // if (!empty ($sidList)) { // $sql .= " AND (sid in ($sidList))"; // } if (!empty ($sidList)) { $sql .= " HAVING sid in ($sidList)"; } $sql .= " ORDER BY unixdate DESC LIMIT 10"; $result = DB_query($sql); $nrows = DB_numRows($result); if ($nrows > 0) { for ($i = 1; $i <= $nrows; $i++) { $C = DB_fetchArray($result); $user_templates->set_var('row_number', $i . '.'); $user_templates->set_var ('comment_begin_href', '<a href="' . $_CONF['site_url'] . '/comment.php?mode=view&cid=' . $C['cid']. '">'); $C['title'] = str_replace('$','$',$C['title']); $user_templates->set_var('comment_title', stripslashes($C['title'])); $user_templates->set_var('comment_end_href', '</a>'); $commenttime = COM_getUserDateTimeFormat($C['unixdate']); $user_templates->set_var('comment_date', $commenttime[0]); $user_templates->parse('comment_row','row',true); } } else { $user_templates->set_var('comment_row','<tr><td>' . $LANG01[29] . '</td></tr>'); } // posting stats for this user $user_templates->set_var ('lang_number_stories', $LANG04[84]); $sql = "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE (uid = $user) AND (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND'); $result = DB_query($sql); $N = DB_fetchArray ($result); $user_templates->set_var('number_stories', $N['count']); $user_templates->set_var ('lang_number_comments', $LANG04[85]); $sql = "SELECT count(*) AS count FROM {$_TABLES['comments']} WHERE (uid = $user)"; if (!empty ($sidList)) { $sql .= " AND (sid in ($sidList))"; } $result = DB_query($sql); $N = DB_fetchArray ($result); $user_templates->set_var('number_comments', $N['count']); $user_templates->set_var ('lang_all_postings_by', $LANG04[86] . ' ' . $A['username']); // Call custom registration function if enabled and exists if ($_CONF['custom_registration'] AND (function_exists(custom_userdisplay)) ) { $user_templates->set_var ('customfields', custom_userdisplay($user) ); } PLG_profileVariablesDisplay ($user, $user_templates); $user_templates->parse('output', 'profile'); $retval .= $user_templates->finish($user_templates->get_var('output')); $retval .= PLG_profileBlocksDisplay ($user); $retval .= COM_siteFooter (); return $retval; } /** * Emails password to a user * * This will email the given user their password. * * @param string $username Username for which to get and email password * @param int $msg Message number of message to show when done * @return string Optionally returns the HTML for the default form if the user info can't be found * */ function emailpassword ($username, $msg = 0) { global $_CONF, $_TABLES, $LANG04; $retval = ''; $username = addslashes ($username); $result = DB_query ("SELECT uid,email FROM {$_TABLES['users']} WHERE username = '$username'"); $nrows = DB_numRows ($result); if ($nrows == 1) { $A = DB_fetchArray ($result); if (($_CONF['usersubmission'] == 1) && USER_isQueued ($A['uid'])) { return COM_refresh ($_CONF['site_url'] . '/index.php?msg=48'); } USER_createAndSendPassword ($username, $A['email']); if ($msg) { $retval = COM_refresh ("{$_CONF['site_url']}/index.php?msg=$msg"); } else { $retval = COM_refresh ("{$_CONF['site_url']}/index.php"); } } else { $retval = COM_siteHeader ('menu', $LANG04[17]) . defaultform ($LANG04[17]) . COM_siteFooter (); } return $retval; } /** * User request for a new password - send email with a link and request id * * @param username string name of user who requested the new password * @param msg int index of message to display (if any) * @return string form or meta redirect * */ function requestpassword ($username, $msg = 0) { global $_CONF, $_TABLES, $LANG04; $result = DB_query ("SELECT uid,email,passwd FROM {$_TABLES['users']} WHERE username = '$username'"); $nrows = DB_numRows ($result); if ($nrows == 1) { $A = DB_fetchArray ($result); if (($_CONF['usersubmission'] == 1) && ($A['passwd'] == md5 (''))) { return COM_refresh ($_CONF['site_url'] . '/index.php?msg=48'); } $reqid = substr (md5 (uniqid (rand (), 1)), 1, 16); DB_change ($_TABLES['users'], 'pwrequestid', "$reqid", 'username', $username); $mailtext = sprintf ($LANG04[88], $username); $mailtext .= $_CONF['site_url'] . '/users.php?mode=newpwd&uid=' . $A['uid'] . '&rid=' . $reqid . "nn"; $mailtext .= $LANG04[89]; $mailtext .= "{$_CONF["site_name"]}n"; $mailtext .= "{$_CONF['site_url']}n"; $subject = $_CONF['site_name'] . ': ' . $LANG04[16]; COM_mail ($A['email'], $subject, $mailtext); if ($msg) { $retval .= COM_refresh ($_CONF['site_url'] . "/index.php?msg=$msg"); } else { $retval .= COM_refresh ($_CONF['site_url'] . '/index.php'); } COM_updateSpeedlimit ('password'); } else { $retval .= COM_siteHeader ('menu') . defaultform ($LANG04[17]) . COM_siteFooter (); } return $retval; } /** * Display a form where the user can enter a new password. * * @param uid int user id * @param requestid string request id for password change * @return string new password form * */ function newpasswordform ($uid, $requestid) { global $_CONF, $_TABLES, $LANG04; $pwform = new Template ($_CONF['path_layout'] . 'users'); $pwform->set_file (array ('newpw' => 'newpassword.thtml')); $pwform->set_var ('site_url', $_CONF['site_url']); $pwform->set_var ('layout_url', $_CONF['layout_url']); $pwform->set_var ('user_id', $uid); $pwform->set_var ('user_name', DB_getItem ($_TABLES['users'], 'username', "uid = '{$uid}'")); $pwform->set_var ('request_id', $requestid); $pwform->set_var ('lang_explain', $LANG04[90]); $pwform->set_var ('lang_username', $LANG04[2]); $pwform->set_var ('lang_newpassword', $LANG04[4]); $pwform->set_var ('lang_setnewpwd', $LANG04[91]); $retval = COM_startBlock ($LANG04[92]); $retval .= $pwform->finish ($pwform->parse ('output', 'newpw')); $retval .= COM_endBlock (); return $retval; } /** * Send an email notification when a new user registers with the site. * * @param username string User name of the new user * @param email string Email address of the new user * @param uid int User id of the new user * @param queued bool true = user was added to user submission queue * */ function sendNotification ($username, $email, $uid, $queued = false) { global $_CONF, $_TABLES, $LANG01, $LANG04, $LANG08, $LANG28, $LANG29; $mailbody = "$LANG04[2]: $usernamen" . "$LANG04[5]: $emailn" . "$LANG28[14]: " . strftime ($_CONF['date']) . "nn"; if ($queued) { $mailbody .= "$LANG01[10] <{$_CONF['site_admin_url']}/moderation.php>nn"; } else { $mailbody .= "$LANG29[4] <{$_CONF['site_url']}/users.php?mode=profile&uid={$uid}>nn"; } $mailbody .= "n------------------------------n"; $mailbody .= "n$LANG08[34]n"; $mailbody .= "n------------------------------n"; $mailsubject = $_CONF['site_name'] . ' ' . $LANG29[40]; COM_mail ($_CONF['site_mail'], $mailsubject, $mailbody); } /** * Creates a user * * Creates a user with the give username and email address * * @param string $username username to create user for * @param string $email email address to assign to user * @return string HTML for the form again if error occurs, otherwise nothing. * */ function createuser($username,$email) { global $_CONF, $_TABLES, $LANG01, $LANG04; $username = trim ($username); $email = trim ($email); if (COM_isEmail ($email) && !empty ($username)) { $ucount = DB_count ($_TABLES['users'], 'username', addslashes ($username)); $ecount = DB_count ($_TABLES['users'], 'email', addslashes ($email)); if ($ucount == 0 AND $ecount == 0) { // For Geeklog, it would be okay to create this user now. But check // with a custom userform first, if one exists. if ($_CONF['custom_registration'] && function_exists ('custom_usercheck')) { $msg = custom_usercheck ($username, $email); if (!empty ($msg)) { // no, it's not okay with the custom userform $retval = COM_siteHeader ('menu') . custom_userform ($msg) . COM_siteFooter (); return $retval; } } $uid = USER_createAccount ($username, $email); $queueUser = USER_isQueued ($uid); if ($queueUser) { $msg = 48; } else { emailpassword ($username, 1); $msg = 1; } if (isset ($_CONF['notification']) && in_array ('user', $_CONF['notification'])) { sendNotification ($username, $email, $uid, $queueUser); } return COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $msg); } else { $retval .= COM_siteHeader ('Menu'); if ($_CONF['custom_registration'] && function_exists ('custom_userform')) { $retval .= custom_userform ($LANG04[19]); } else { $retval .= newuserform ($LANG04[19]); } $retval .= COM_siteFooter (); } } else { if (empty ($username)) { $msg = $LANG01[32]; // invalid username } else { $msg = $LANG04[18]; // invalid email address } $retval .= COM_siteHeader ('menu'); if ($_CONF['custom_registration'] && function_exists(custom_userform)) { $retval .= custom_userform ($msg); } else { $retval .= newuserform ($msg); } $retval .= COM_siteFooter(); } return $retval; } /** * Shows the user login form after failed attempts to either login or access a page * requiring login. * * @return string HTML for login form * */ function loginform ($hide_forgotpw_link = false) { global $_CONF, $LANG04; $retval = ''; $user_templates = new Template ($_CONF['path_layout'] . 'users'); $user_templates->set_file('login', 'loginform.thtml'); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block_loginagain', COM_startBlock($LANG04[65])); $user_templates->set_var('lang_message', $LANG04[66]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_password', $LANG04[4]); if ($hide_forgotpw_link) { $user_templates->set_var('lang_forgetpassword', ''); } else { $user_templates->set_var('lang_forgetpassword', $LANG04[25]); } $user_templates->set_var('lang_login', $LANG04[80]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->parse('output', 'login'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Shows the user registration form * * @param int $msg message number to show * @param string $referrer page to send user to after registration * @return string HTML for user registration page */ function newuserform($msg = '') { global $LANG04, $_CONF; $retval = ''; if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $user_templates = new Template($_CONF['path_layout'] . 'users'); $user_templates->set_file('regform','registrationform.thtml'); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block', COM_startBlock($LANG04[22])); $user_templates->set_var('lang_instructions', $LANG04[23]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_warning', $LANG04[24]); $user_templates->set_var('lang_register', $LANG04[27]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->parse('output', 'regform'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Shows the password retrieval form * * @return string HTML for form used to retrieve user's password * */ function getpasswordform() { global $_CONF, $LANG04; $retval = ''; $user_templates = new Template($_CONF['path_layout'] . 'users'); $user_templates->set_file('form', 'getpasswordform.thtml'); $user_templates->set_var('site_url', $_CONF['site_url']); $user_templates->set_var('start_block_forgetpassword', COM_startBlock($LANG04[25])); $user_templates->set_var('lang_instructions', $LANG04[26]); $user_templates->set_var('lang_username', $LANG04[2]); $user_templates->set_var('lang_email', $LANG04[5]); $user_templates->set_var('lang_emailpassword', $LANG04[28]); $user_templates->set_var('end_block', COM_endBlock()); $user_templates->parse('output', 'form'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Shows user their account info form * * @param string $msg message to display if one is needed * @return string HTML for form * */ function defaultform ($msg) { global $LANG04; $retval = ''; if (!empty ($msg)) { $retval .= COM_startBlock ($LANG04[21], '', COM_getBlockTemplate ('_msg_block', 'header')) . $msg . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } $retval .= loginform (true); $retval .= newuserform (); $retval .= getpasswordform (); return $retval; } // MAIN if (isset ($HTTP_POST_VARS['mode'])) { $mode = $HTTP_POST_VARS['mode']; } elseif (isset ($HTTP_GET_VARS['mode'])) { $mode = $HTTP_GET_VARS['mode']; } else { $mode = ""; } $display = ''; switch ($mode) { case 'logout': if (!empty ($_USER['uid']) AND $_USER['uid'] > 1) { SESS_endUserSession ($_USER['uid']); PLG_logoutUser ($_USER['uid']); } setcookie ($_CONF['cookie_session'], '', time() - 10000, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); setcookie ($_CONF['cookie_name'], '', time() - 10000, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); $display = COM_refresh($_CONF['site_url'] . '/index.php?msg=8'); break; case 'profile': $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true); if (is_numeric ($uid) && ($uid > 0)) { $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true); $display .= userprofile ($uid, $msg); } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); } break; case 'user': $username = COM_applyFilter ($HTTP_GET_VARS['username']); if (!empty ($username)) { $username = addslashes ($username); $uid = DB_getItem ($_TABLES['users'], 'uid', "username = '$username'"); if ($uid > 1) { $display .= userprofile ($uid); } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); } } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); } break; case 'create': $display .= createuser (COM_applyFilter ($HTTP_POST_VARS['username']), COM_applyFilter ($HTTP_POST_VARS['email'])); break; case 'getpassword': $display .= COM_siteHeader ('menu'); if ($_CONF['passwordspeedlimit'] == 0) { $_CONF['passwordspeedlimit'] = 300; // 5 minutes } COM_clearSpeedlimit ($_CONF['passwordspeedlimit'], 'password'); $last = COM_checkSpeedlimit ('password'); if ($last > 0) { $display .= COM_startBlock ($LANG12[26], '', COM_getBlockTemplate ('_msg_block', 'header')) . sprintf ($LANG04[93], $last, $_CONF['passwordspeedlimit']) . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')); } else { $display .= getpasswordform (); } $display .= COM_siteFooter (); break; case 'newpwd': $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true); $reqid = COM_applyFilter ($HTTP_GET_VARS['rid']); if (!empty ($uid) && is_numeric ($uid) && ($uid > 0) && !empty ($reqid) && (strlen ($reqid) == 16)) { $valid = DB_count ($_TABLES['users'], array ('uid', 'pwrequestid'), array ($uid, $reqid)); if ($valid == 1) { $display .= COM_siteHeader ('menu'); $display .= newpasswordform ($uid, $reqid); $display .= COM_siteFooter (); } else { // request invalid or expired $display .= COM_siteHeader ('menu'); $display .= COM_showMessage (54); $display .= getpasswordform (); $display .= COM_siteFooter (); } } else { // this request doesn't make sense - ignore it $display = COM_refresh ($_CONF['site_url']); } break; case 'setnewpwd': if (empty ($HTTP_POST_VARS['passwd'])) { $display = COM_refresh ($_CONF['site_url'] . '/users.php?mode=newpwd&uid=' . $HTTP_POST_VARS['uid'] . '&rid=' . $HTTP_POST_VARS['rid']); } else { $uid = COM_applyFilter ($HTTP_POST_VARS['uid'], true); $reqid = COM_applyFilter ($HTTP_POST_VARS['rid']); if (!empty ($uid) && is_numeric ($uid) && ($uid > 0) && !empty ($reqid) && (strlen ($reqid) == 16)) { $valid = DB_count ($_TABLES['users'], array ('uid', 'pwrequestid'), array ($uid, $reqid)); if ($valid == 1) { $passwd = md5 ($HTTP_POST_VARS['passwd']); DB_change ($_TABLES['users'], 'passwd', "$passwd", "uid", $uid); DB_delete ($_TABLES['sessions'], 'uid', $uid); DB_change ($_TABLES['users'], 'pwrequestid', "NULL", 'username', $username); $display = COM_refresh ($_CONF['site_url'] . '/users.php?msg=53'); } else { // request invalid or expired $display .= COM_siteHeader ('menu'); $display .= COM_showMessage (54); $display .= getpasswordform (); $display .= COM_siteFooter (); } } else { // this request doesn't make sense - ignore it $display = COM_refresh ($_CONF['site_url']); } } break; case 'emailpasswd': if ($_CONF['passwordspeedlimit'] == 0) { $_CONF['passwordspeedlimit'] = 300; // 5 minutes } COM_clearSpeedlimit ($_CONF['passwordspeedlimit'], 'password'); $last = COM_checkSpeedlimit ('password'); if ($last > 0) { $display .= COM_siteHeader ('menu') . COM_startBlock ($LANG12[26], '', COM_getBlockTemplate ('_msg_block', 'header')) . sprintf ($LANG04[93], $last, $_CONF['passwordspeedlimit']) . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')) . COM_siteFooter (); } else { $username = COM_applyFilter ($HTTP_POST_VARS['username']); $email = COM_applyFilter ($HTTP_POST_VARS['email']); if (empty ($username) && !empty ($email)) { $username = DB_getItem ($_TABLES['users'], 'username', "email = '$email'"); } if (!empty ($username)) { $display .= requestpassword ($username, 55); } else { $display = COM_refresh ($_CONF['site_url'] . '/users.php?mode=getpassword'); } } break; case 'new': $display .= COM_siteHeader ('menu', $LANG04[22]); // Call custom registration and account record create function // if enabled and exists if ($_CONF['custom_registration'] AND (function_exists('custom_userform'))) { $display .= custom_userform('new'); } else { $display .= newuserform(); } $display .= COM_siteFooter(); break; default: // prevent dictionary attacks on passwords if (!isset ($_CONF['login_speedlimit'])) { $_CONF['login_speedlimit'] = 300; } if (!isset ($_CONF['login_attempts'])) { $_CONF['login_attempts'] = 3; } COM_clearSpeedlimit ($_CONF['login_speedlimit'], 'login'); if (COM_checkSpeedlimit ('login', $_CONF['login_attempts']) > 0) { if (empty ($LANG04[112])) { $LANG04[112] = 'You have exceeded the number of allowed login attempts. Please try again later.'; } $retval .= COM_siteHeader () . COM_startBlock ($LANG12[26], '', COM_getBlockTemplate ('_msg_block', 'header')) . $LANG04[112] . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')) . COM_siteFooter (); echo $retval; exit(); } if (isset ($HTTP_POST_VARS['loginname'])) { $loginname = COM_applyFilter ($HTTP_POST_VARS['loginname']); } else { $loginname = COM_applyFilter ($HTTP_GET_VARS['loginname']); } if (isset ($HTTP_POST_VARS['passwd'])) { $passwd = COM_applyFilter ($HTTP_POST_VARS['passwd']); } if (!empty($loginname) && !empty($passwd)) { $mypasswd = COM_getPassword($loginname); } else { srand((double)microtime()*1000000); $mypasswd = rand(); } if (!empty ($passwd) && !empty ($mypasswd) && ($mypasswd == md5($passwd))) { DB_change($_TABLES['users'],'pwrequestid',"NULL",'username',$loginname); $userdata = SESS_getUserData($loginname); $_USER=$userdata; $sessid = SESS_newSession($_USER['uid'], $HTTP_SERVER_VARS['REMOTE_ADDR'], $_CONF['session_cookie_timeout'], $_CONF['cookie_ip']); SESS_setSessionCookie($sessid, $_CONF['session_cookie_timeout'], $_CONF['cookie_session'], $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); PLG_loginUser ($_USER['uid']); // Now that we handled session cookies, handle longterm cookie if (!isset($HTTP_COOKIE_VARS[$_CONF['cookie_name']]) || !isset($HTTP_COOKIE_VARS['password'])) { // Either their cookie expired or they are new $cooktime = COM_getUserCookieTimeout(); if ($VERBOSE) { COM_errorLog("Trying to set permanent cookie with time of $cooktime",1); } if ($cooktime > 0) { // They want their cookie to persist for some amount of time so set it now if ($VERBOSE) { COM_errorLog('Trying to set permanent cookie',1); } setcookie ($_CONF['cookie_name'], $_USER['uid'], time() + $cooktime, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); setcookie ($_CONF['cookie_password'], md5 ($passwd), time() + $cooktime, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); } } else { $userid = $HTTP_COOKIE_VARS[$_CONF['cookie_name']]; if (empty ($userid) || ($userid == 'deleted')) { unset ($userid); } else { if ($VERBOSE) { COM_errorLog('NOW trying to set permanent cookie',1); COM_errorLog('Got '.$userid.' from perm cookie in users.php',1); } if ($userid) { $user_logged_in = 1; // Create new session $userdata = SESS_getUserDataFromId($userid); $_USER = $userdata; if ($VERBOSE) { COM_errorLog('Got '.$_USER['username'].' for the username in user.php',1); } } } } // Now that we have users data see if their theme cookie is set. // If not set it setcookie ($_CONF['cookie_theme'], $_USER['theme'], time() + 31536000, $_CONF['cookie_path'], $_CONF['cookiedomain'], $_CONF['cookiesecure']); if (!empty ($HTTP_SERVER_VARS['HTTP_REFERER']) && (strstr ($HTTP_SERVER_VARS['HTTP_REFERER'], '/users.php') === false)) { $indexMsg = $_CONF['site_url'] . '/index.php?msg='; if (substr ($HTTP_SERVER_VARS['HTTP_REFERER'], 0, strlen ($indexMsg)) == $indexMsg) { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); } else { $display .= COM_refresh ($HTTP_SERVER_VARS['HTTP_REFERER']); } } else { $display .= COM_refresh ($_CONF['site_url'] . '/index.php'); } } else { // On failed login attempt, update speed limit COM_updateSpeedlimit ('login'); $display .= COM_siteHeader('menu'); if (isset ($HTTP_POST_VARS['msg'])) { $msg = $HTTP_POST_VARS['msg']; } else if (isset ($HTTP_GET_VARS['msg'])) { $msg = $HTTP_GET_VARS['msg']; } else { $msg = 0; } if ($msg > 0) { $display .= COM_showMessage($msg); } switch ($mode) { case 'create': // Got bad account info from registration process, show error // message and display form again if ($_CONF['custom_registration'] AND (function_exists(custom_userform))) { $display .= custom_userform ('new'); } else { $display .= newuserform (); } break; default: // check to see if this was the last allowed attempt if (!isset ($_CONF['login_attempts'])) { $_CONF['login_attempts'] = 3; } if (COM_checkSpeedlimit ('login', $_CONF['login_attempts']) > 0) { if (empty ($LANG04[112])) { $LANG04[112] = 'You have exceeded the number of allowed login attempts. Please try again later.'; } $retval .= COM_siteHeader () . COM_startBlock ($LANG12[26], '', COM_getBlockTemplate ('_msg_block', 'header')) . $LANG04[112] . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer')) . COM_siteFooter (); echo $retval; exit (); } else { // Show login form $display .= loginform(); } break; } $display .= COM_siteFooter(); } break; } echo $display; ?>
Posted on: 12/22/05 06:33pm
By: jordydme
Posted on: 12/22/05 07:40pm
By: jordydme
Posted on: 12/22/05 08:25pm
By: Blaine
Posted on: 12/23/05 12:57am
By: Anonymous (Turner)
Posted on: 12/23/05 12:42pm
By: jordydme
Date: April 15, 2005 Author: Blaine Lang - blaine@portalparts.com www.portalparts.com Geeklog Custom Membership example with all needed code included. This example will prompt a new user for additional fields when registering. User Full Name and Graduation year The Full Name is already a field that is maintained by Geeklog but not prompted for at registration time. The Graduation Year is not and we will setup a new table to store this extra information. Any new information should be maintained in a separate table and don't re-use or extend Core Geeklog tables. Using the Custom Registration Feature requires some PHP and MySQL skills. This example in addition to the notes and example functions in lib-custom should be sufficient to guide you in adding additional fields. <<<<<<<<<<<<<<>>>>>>>>>>>>> Steps to install 1) Create the new table that is used for the extra user info. In this case, there is only the one new field "grad_year". Assuming your Geeklog Database prefix is 'gl_' execute the following SQL. If you have phpMyAdmin - select the database and enter the SQL below. CREATE TABLE `gl_localuserinfo` ( `uid` mediumint(8) NOT NULL default '0', `grad_year` varchar(4) NOT NULL default '', KEY `uid` (`uid`) ) TYPE=MyISAM; 2) Tell Geeklog about your new database. Add the following line to system/lib-database after the other database table defintions. $_TABLES['localuserinfo'] = $_DB_table_prefix . 'localuserinfo'; 3) Replace the example custom user-registration functions in system/lib-custom with the ones in the included file. 4) Update your theme templates - See the files under the included "themefiles" directory 4.1) Add a new directory called "custom" to your theme(s) directory Add the template memberdetail.thtml to this custom folder. Example: layout/professional/custom/memberdetail.thtml 4.2) Update the User Profile templates to include the custom fields In the included archive - under themefiles, there is a "users" and "preferences" folder. They each contain one template that needs to replace the file already in the corresponding Theme directory. Note: These updated template files don't include the PGP Key field for the user profile - as it's most likly not wanted anyways. Add it from the existing one if required. Edit the HTML as required in these template files 5) Enable the custom Registration mode. Edit the Geeklog main config.php $_CONF['custom_registration'] = true; // Set to true if you have custom code Thats it - enjoy, Blaine
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Geeklog 1.3 | // +---------------------------------------------------------------------------+ // | lib-custom.php | // | Your very own custom Geeklog library. | // | | // | This is the file where you should put all of your custom code. When | // | possible you should not alter lib-common.php but, instead, put code here. | // | This will make upgrading to future versions of Geeklog easier for you | // | because you will always be gauranteed that the Geeklog developers will | // | NOT add code to this file. NOTE: we have already gone through the trouble | // | of making sure that we always include this file when lib-common.php is | // | included some place so you will have access to lib-common.php. It | // | follows then that you should not include lib-common.php in this file | // | | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2005 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Blaine Lang - blaine AT portalparts DOT com | // | Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ // // $Id: lib-custom.php,v 1.11.2.1 2005/10/03 09:24:36 dhaun Exp $ // You can use this global variable to print useful messages to the errorlog // using COM_errorLog(). To see an example of how to do this, look in // lib-common.php and see how $_COM_VERBOSE was used throughout the code $_CST_VERBOSE = false; /** * Sample PHP Block function * * this is a sample function used by a PHP block. This will show the rights that * a user has in the "What you have access to" block. * */ function phpblock_showrights() { global $_RIGHTS, $_CST_VERBOSE; if ($_CST_VERBOSE) { COM_errorLog('**** Inside phpblock_showrights in lib-custom.php ****', 1); } $retval .= ' '; for ($i = 0; $i < count($_RIGHTS); $i++) { $retval .= '<li>' . $_RIGHTS[$i] . '</li>' . LB; } if ($_CST_VERBOSE) { COM_errorLog('**** Leaving phpblock_showrights in lib-custom.php ****', 1); } return $retval; } /*** * * Get Bent() * * Php function to tell you how if your site is grossly insecure * **/ function phpblock_getBent() { global $_CONF, $_TABLES; $secure = true; $retval = ''; $secure_msg = 'Could not find any gross insecurities in your site. Do not take this '; $secure_msg .= 'as meaning your site is 100% secure, as no site ever is. I can only '; $secure_msg .= 'check things that should be blatantly obvious.'; $insecure_msg = ''; // we don't have the path to the admin directory, so try to figure it out // from $_CONF['site_admin_url'] $adminurl = $_CONF['site_admin_url']; if (strrpos ($adminurl, '/') == strlen ($adminurl)) { $adminurl = substr ($adminurl, 0, -1); } $pos = strrpos ($adminurl, '/'); if ($pos === false) { // only guessing ... $installdir = $_CONF['path_html'] . 'admin/install'; } else { $installdir = $_CONF['path_html'] . substr ($adminurl, $pos + 1) . '/install'; } if (is_dir ($installdir)) { $insecure_msg .= '<p>You should really remove the install directory <b>' . $installdir .'</b> once you have your site up and running without any errors.'; $insecure_msg .= ' Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.'; $secure = false; } // check to see if any account still has 'password' as its password. $count = DB_query("select count(*) as count from {$_TABLES['users']} where passwd='" . md5('password') . "'"); $A = DB_fetchArray($count); if ( $A['count'] > 0 ) { $secure = false; $insecure_msg .= '<p>You still have not changed the default password from "password" on ' . $A['count'] . ' account(s). '; $insecure_msg .= 'This will allow people to do serious harm to your site!'; } if ($secure) { $retval = $secure_msg; } else { $retval = $insecure_msg; } $retval = wordwrap($retval,20,' ',1); return $retval; } /* Create any new records in additional tables you may have added */ /* Update any fields in the core GL tables for this user as needed */ /* Called when user is first created */ function custom_usercreate($uid) { global $_TABLES; $grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = COM_applyFilter($_POST['cust_fullname']); // Ensure all data is prepared correctly before inserts, quotes may need to be escaped with addslashes() DB_query("INSERT INTO {$_TABLES['localuserinfo']} (uid,grad_year) VALUES ('$uid', '$grad_year')"); DB_query("UPDATE {$_TABLES['users']} SET fullname = '$fullname' WHERE uid='$uid'"); return true; } // Delete user record from custom user info table function custom_userdelete($uid) { global $_TABLES; DB_query("DELETE FROM {$_TABLES['localuserinfo']} WHERE uid='$uid'"); return true; } /* Called from users.php - when user is displaying a member profile */ /* This function will return any extra fields that need to be shown */ /* Output is then replaced in {customfields) -- This variable needs to be added to your templates */ /* Template: path_layout/users/profile/profile.thtml */ function custom_userdisplay($uid) { global $_CONF,$_TABLES; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td>' . $fullname .'</td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td>' . $grad_year .'</td> </tr>'; return $retval; } /* Function called when editing user profile. */ /* Called from usersettings.php - when user is eding their own profile */ /* and from admin/user.php when admin is editing a member profile */ /* This function will return any extra fields that need to be shown for editing */ /* Output is then replaced in {customfields} -- This variable needs to be added to your templates */ /* User: path_layout/preferences/profile.thtml and Admin: path_layout/admin/user/edituser.thtml */ function custom_useredit($uid) { global $_TABLES,$_CONF; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td><input type="text" name="cust_fullname" size="50" value="' . $fullname .'"></td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td><input type="text" name="cust_gradyear" size="5" maxlength="4" value="' . $grad_year .'"></td> </tr>'; $retval .= '<tr><td colspan="2"><hr></td></tr>'; return $retval; } /* Function called when saving the user profile. */ function custom_usersave($uid) { global $_TABLES; $grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = COM_applyFilter($_POST['fullname']); DB_query("UPDATE {$_TABLES['users']} SET fullname='$fullname' WHERE uid='$uid'"); if ($grad_year > 0) { DB_query("UPDATE {$_TABLES['localuserinfo']} SET grad_year='$grad_year' WHERE uid='$uid'"); } } /* Main Form used for Custom membership when member is registering */ function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty($msg)) { $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = '<input type="submit" value="Register Now!">'; $passwd_input = ""; $message = "<br><font color=black><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b></font>"; $A=array(); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', "Valid email address"); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('GRADYEAR', "Graduation Year"); $user_templates->set_var('GRADYEAR_HELP', "That big year!"); $user_templates->set_var('grad_year', ""); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); $user_templates->set_var('endblock', COM_endBlock()); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Check if it's okay to create a new user. * * Geeklog is about to create a new user with the given username and email * address. This is the custom code's last chance to prevent that, * e.g. to check if all required data has been entered. * * @param string $username username that Geeklog would use for the new user* @param string $email email address of that user * @return string an error message or an empty string for "OK" * */ function custom_usercheck ($username, $email) { $msg = ''; // Example, check that the full name has been entered // and complain if it's missing if (empty ($_POST['fullname'])) { $msg = 'Please enter your full name!'; } return $msg; } /** * Custom function to retrieve and return a formatted list of blocks * Can be used when calling COM_siteHeader or COM_SiteFooter * Example: * 1: Setup an array of blocks to display * 2: Call COM_siteHeader or COM_siteFooter * * $myblocks = array ('site_menu','site_news','poll_block'); * COM_siteHeader( array('COM_showCustomBlocks',$myblocks) ) ; * COM_siteFooter( true, array('COM_showCustomBlocks',$myblocks)); * @param array $showblocks An array of block names to retrieve and format * @return string Formated HTML containing site footer and optionally right blocks */ function custom_showBlocks($showblocks) { global $_CONF, $_TABLES; $retval = ''; foreach($showblocks as $block) { $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help FROM {$_TABLES['blocks']} WHERE name='$block'"; $result = DB_query($sql); if (DB_numRows($result) == 1) { $A = DB_fetchArray($result); $retval .= COM_formatBlock($A); } } return $retval; } /** * This is an example of a custom email function. When this function is NOT * commented out, Geeklog would send all emails through this function * instead of sending them through COM_mail in lib-common.php. * * This is basically a re-implementation of the way emails were sent * prior to Geeklog 1.3.9 (Geeklog uses PEAR::Mail as of version 1.3.9). * */ /* function CUSTOM_mail($to, $subject, $message, $from = '', $html = false, $priority = 0) { global $_CONF, $LANG_CHARSET; if (empty ($LANG_CHARSET)) { $charset = $_CONF['default_charset']; if (empty ($charset)) { $charset = 'iso-8859-1'; } } else { $charset = $LANG_CHARSET; } if (empty ($from)) { $from = $_CONF['site_name'] . ' <' . $_CONF['site_mail'] . '>'; } $headers = 'From: ' . $from . "rn" . 'X-Mailer: Geeklog ' . VERSION . "rn"; if ($priority > 0) { $headers .= 'X-Priority: ' . $priority . "rn"; } if ($html) { $headers .= "Content-Type: text/html; charset={$charset}rn" . 'Content-Transfer-Encoding: 8bit'; } else { $headers .= "Content-Type: text/plain; charset={$charset}"; } return mail ($to, $subject, $message, $headers); } */ /** * This is an example of a function that returns menu entries to be used for * the 'custom' entry in $_CONF['menu_elements'] (see config.php). * */ /* function CUSTOM_menuEntries () { global $_CONF, $_USER; $myentries = array (); // Sample link #1: Link to Gallery $myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/', 'label' => 'Gallery'); // Sample link #2: Link to the Personal Calendar - only visible for // logged-in users if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) { $myentries[] = array ('url' => $_CONF['site_url'] . '/calendar.php?mode=personal', 'label' => 'My Calendar'); } return $myentries; } */ ?>
{start_block_userprofile} <table border="0" cellspacing="0" cellpadding="3"> <tr valign="top"> <td align="right"><b>{lang_username}:</b></td> <td>{username} ({user_fullname})<br> {user_photo}</td> </tr> <tr valign="top"> <td align="right"><b>{lang_membersince}:</b></td> <td>{user_regdate}</td> </tr> <tr valign="top"> <td align="right"><b>{lang_email}:</b></td> <td><a href="{site_url}/profiles.php?uid={user_id}">{lang_sendemail}</a></td> </tr> <tr valign="top"> <td align="right"><b>{lang_homepage}:</b></td> <td><a href="{user_homepage}">{user_homepage}</a></td> </tr> <tr valign="top"> <td align="right"><b>{lang_location}:</b></td> <td>{user_location}</td> </tr> {customfields} <tr valign="top"> <td align="right"><b>{lang_bio}:</b></td> <td>{user_bio}</td> </tr> </table> {end_block} {start_block_last10stories} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <table border="0" cellspacing="0" cellpadding="3"> {story_row} </table> </td> </tr> </table> {end_block} {start_block_last10comments} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <table border="0" cellspacing="0" cellpadding="3"> {comment_row} </table> </td> </tr> </table> {end_block} {start_block_postingstats} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td> <table border="0" cellspacing="0" cellpadding="3" width="100%"> <tr> <td>{lang_number_stories}</td> <td>{number_stories}</td> </tr> <tr> <td>{lang_number_comments}</td> <td>{number_comments}</td> </tr> <tr> <td colspan="2"><a href="{site_url}/search.php?query=&datestart=&dateend=&topic=0&type=all&author={user_id}&mode=search">{lang_all_postings_by}</a></td> </tr> </table> </td> </tr> </table> {end_block}
{start_block_profile} <form action="{site_url}/usersettings.php" method="POST" {enctype}> <table border="0" cellspacing="0" cellpadding="3"> {username_option} <tr valign="top"> <td align="right"><b>{lang_fullname}</b><br> <small>{lang_fullname_text}</small></td> <td><input type="text" name="fullname" size="60" maxlength="80" value="{fullname_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_password}</b><br> <small>{lang_password_text}</small></td> <td><input type="password" name="passwd" size="32" maxlength="32" value="{password_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_cooktime}</b><br> <small>{lang_cooktime_text}</small></td> <td>{cooktime_selector}</td> </tr> <tr valign="top"> <td align="right"><b>{lang_email}</b><br> <small>{lang_email_text}</small></td> <td><input type="text" name="email" size="60" maxlength="96" value="{email_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_homepage}</b><br> <small>{lang_homepage_text}</small></td> <td><input type="text" name="homepage" size="60" maxlength="96" value="{homepage_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_location}</b><br> <small>{lang_location_text}</small></td> <td><input type="text" name="location" size="60" maxlength="96" value="{location_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_signature}</b><br> <small>{lang_signature_text}</small></td> <td><textarea name="sig" cols="60" rows="4">{signature_value}
-- MySQL dump 9.11 -- -- Host: localhost Database: nameof_database -- ------------------------------------------------------ -- Server version 4.0.25-standard -- -- Table structure for table `gl_access` -- CREATE TABLE `gl_access` ( `acc_ft_id` mediumint(8) NOT NULL default '0', `acc_grp_id` mediumint(8) NOT NULL default '0', PRIMARY KEY (`acc_ft_id`,`acc_grp_id`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_access` -- INSERT INTO `gl_access` VALUES (1,3); INSERT INTO `gl_access` VALUES (2,3); INSERT INTO `gl_access` VALUES (3,5); INSERT INTO `gl_access` VALUES (4,5); INSERT INTO `gl_access` VALUES (5,9); INSERT INTO `gl_access` VALUES (5,11); INSERT INTO `gl_access` VALUES (6,9); INSERT INTO `gl_access` VALUES (6,11); INSERT INTO `gl_access` VALUES (7,12); INSERT INTO `gl_access` VALUES (8,7); INSERT INTO `gl_access` VALUES (9,7); INSERT INTO `gl_access` VALUES (10,4); INSERT INTO `gl_access` VALUES (11,6); INSERT INTO `gl_access` VALUES (12,8); INSERT INTO `gl_access` VALUES (13,10); INSERT INTO `gl_access` VALUES (14,11); INSERT INTO `gl_access` VALUES (15,11); INSERT INTO `gl_access` VALUES (16,4); INSERT INTO `gl_access` VALUES (17,14); INSERT INTO `gl_access` VALUES (18,14); INSERT INTO `gl_access` VALUES (23,15); -- -- Table structure for table `gl_article_images` -- CREATE TABLE `gl_article_images` ( `ai_sid` varchar(40) NOT NULL default '', `ai_img_num` tinyint(2) unsigned NOT NULL default '0', `ai_filename` varchar(128) NOT NULL default '', PRIMARY KEY (`ai_sid`,`ai_img_num`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_article_images` -- -- -- Table structure for table `gl_blocks` -- CREATE TABLE `gl_blocks` ( `bid` smallint(5) unsigned NOT NULL auto_increment, `is_enabled` tinyint(1) unsigned NOT NULL default '1', `name` varchar(48) NOT NULL default '', `type` varchar(20) NOT NULL default 'normal', `title` varchar(48) default NULL, `tid` varchar(20) NOT NULL default 'All', `blockorder` smallint(5) unsigned NOT NULL default '1', `content` text, `rdfurl` varchar(255) default NULL, `rdfupdated` datetime NOT NULL default '0000-00-00 00:00:00', `onleft` tinyint(3) unsigned NOT NULL default '1', `phpblockfn` varchar(64) default '', `help` varchar(128) default '', `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', PRIMARY KEY (`bid`), KEY `blocks_bid` (`bid`), KEY `blocks_is_enabled` (`is_enabled`), KEY `blocks_tid` (`tid`), KEY `blocks_type` (`type`), KEY `blocks_name` (`name`), KEY `blocks_onleft` (`onleft`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_blocks` -- INSERT INTO `gl_blocks` VALUES (1,1,'user_block','gldefault','User Functions','all',2,'','','0000-00-00 00:00:00',1,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (2,1,'admin_block','gldefault','Admins Only','all',1,'','','0000-00-00 00:00:00',1,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (3,1,'section_block','gldefault','Topics','all',0,'','','0000-00-00 00:00:00',1,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (4,1,'poll_block','gldefault','Poll','all',2,'','','0000-00-00 00:00:00',0,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (5,1,'events_block','gldefault','Events','all',4,'','','0000-00-00 00:00:00',1,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (6,1,'whats_new_block','gldefault','What\'s New','all',3,'','','0000-00-00 00:00:00',0,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (7,1,'first_block','normal','About GeekLog','homeonly',1,'<p><b>Welcome to GeekLog!</b><p>If you\'re already familiar with GeekLog - and especially if you\'re not: There have been many improvements to GeekLog since earlier versions that you might want to read up on. Please read the <a href=\"docs/changes.html\">release notes</a>. If you need help, please see the <a href=\"docs/support.html\">support options</a>.','','0000-00-00 00:00:00',0,'','',4,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (8,1,'whosonline_block','phpblock','Who\'s Online','all',0,'','','0000-00-00 00:00:00',0,'phpblock_whosonline','',4,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (9,1,'older_stories','gldefault','Older Stories','all',5,'','','0000-00-00 00:00:00',1,'','',1,2,3,3,2,2); INSERT INTO `gl_blocks` VALUES (10,1,'security_check','phpblock','Are you secure?','homeonly',3,'','','0000-00-00 00:00:00',1,'phpblock_getBent','',1,2,3,3,0,0); INSERT INTO `gl_blocks` VALUES (11,1,'latestphpbbposts','phpblock','Latest Forum Posts','all',0,NULL,NULL,'0000-00-00 00:00:00',0,'phpblock_phpbbbridge_newtopics','',2,2,3,3,2,2); -- -- Table structure for table `gl_commentcodes` -- CREATE TABLE `gl_commentcodes` ( `code` tinyint(4) NOT NULL default '0', `name` varchar(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_commentcodes` -- INSERT INTO `gl_commentcodes` VALUES (0,'Comments Enabled'); INSERT INTO `gl_commentcodes` VALUES (-1,'Comments Disabled'); -- -- Table structure for table `gl_commentmodes` -- CREATE TABLE `gl_commentmodes` ( `mode` varchar(10) NOT NULL default '', `name` varchar(32) default NULL, PRIMARY KEY (`mode`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_commentmodes` -- INSERT INTO `gl_commentmodes` VALUES ('flat','Flat'); INSERT INTO `gl_commentmodes` VALUES ('nested','Nested'); INSERT INTO `gl_commentmodes` VALUES ('threaded','Threaded'); INSERT INTO `gl_commentmodes` VALUES ('nocomment','No Comments'); -- -- Table structure for table `gl_comments` -- CREATE TABLE `gl_comments` ( `cid` int(10) unsigned NOT NULL auto_increment, `type` varchar(30) NOT NULL default 'article', `sid` varchar(40) NOT NULL default '', `date` datetime default NULL, `title` varchar(128) default NULL, `comment` text, `score` tinyint(4) NOT NULL default '0', `reason` tinyint(4) NOT NULL default '0', `pid` int(10) unsigned NOT NULL default '0', `lft` mediumint(10) unsigned NOT NULL default '0', `rht` mediumint(10) unsigned NOT NULL default '0', `indent` mediumint(10) unsigned NOT NULL default '0', `uid` mediumint(8) NOT NULL default '1', `ipaddress` varchar(15) NOT NULL default '', PRIMARY KEY (`cid`), KEY `comments_sid` (`sid`), KEY `comments_uid` (`uid`), KEY `comments_lft` (`lft`), KEY `comments_rht` (`rht`), KEY `comments_date` (`date`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_comments` -- -- -- Table structure for table `gl_cookiecodes` -- CREATE TABLE `gl_cookiecodes` ( `cc_value` int(8) unsigned NOT NULL default '0', `cc_descr` varchar(20) NOT NULL default '', PRIMARY KEY (`cc_value`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_cookiecodes` -- INSERT INTO `gl_cookiecodes` VALUES (0,'(don\'t)'); INSERT INTO `gl_cookiecodes` VALUES (3600,'1 Hour'); INSERT INTO `gl_cookiecodes` VALUES (7200,'2 Hours'); INSERT INTO `gl_cookiecodes` VALUES (10800,'3 Hours'); INSERT INTO `gl_cookiecodes` VALUES (28800,'8 Hours'); INSERT INTO `gl_cookiecodes` VALUES (86400,'1 Day'); INSERT INTO `gl_cookiecodes` VALUES (604800,'1 Week'); INSERT INTO `gl_cookiecodes` VALUES (2678400,'1 Month'); -- -- Table structure for table `gl_dateformats` -- CREATE TABLE `gl_dateformats` ( `dfid` tinyint(4) NOT NULL default '0', `format` varchar(32) default NULL, `description` varchar(64) default NULL, PRIMARY KEY (`dfid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_dateformats` -- INSERT INTO `gl_dateformats` VALUES (0,'','System Default'); INSERT INTO `gl_dateformats` VALUES (1,'%A %B %d, %Y @%I:%M%p','Sunday March 21, 1999 @10:00PM'); INSERT INTO `gl_dateformats` VALUES (2,'%A %b %d, %Y @%H:%M','Sunday March 21, 1999 @22:00'); INSERT INTO `gl_dateformats` VALUES (4,'%A %b %d @%H:%M','Sunday March 21 @22:00'); INSERT INTO `gl_dateformats` VALUES (5,'%H:%M %d %B %Y','22:00 21 March 1999'); INSERT INTO `gl_dateformats` VALUES (6,'%H:%M %A %d %B %Y','22:00 Sunday 21 March 1999'); INSERT INTO `gl_dateformats` VALUES (7,'%I:%M%p - %A %B %d %Y','10:00PM -- Sunday March 21 1999'); INSERT INTO `gl_dateformats` VALUES (8,'%a %B %d, %I:%M%p','Sun March 21, 10:00PM'); INSERT INTO `gl_dateformats` VALUES (9,'%a %B %d, %H:%M','Sun March 21, 22:00'); INSERT INTO `gl_dateformats` VALUES (10,'%m-%d-%y %H:%M','3-21-99 22:00'); INSERT INTO `gl_dateformats` VALUES (11,'%d-%m-%y %H:%M','21-3-99 22:00'); INSERT INTO `gl_dateformats` VALUES (12,'%m-%d-%y %I:%M%p','3-21-99 10:00PM'); INSERT INTO `gl_dateformats` VALUES (13,'%I:%M%p %B %D, %Y','10:00PM March 21st, 1999'); INSERT INTO `gl_dateformats` VALUES (14,'%a %b %d, \'%y %I:%M%p','Sun Mar 21, \'99 10:00PM'); INSERT INTO `gl_dateformats` VALUES (15,'Day %j, %I ish','Day 80, 10 ish'); INSERT INTO `gl_dateformats` VALUES (16,'%y-%m-%d %I:%M','99-03-21 10:00'); INSERT INTO `gl_dateformats` VALUES (17,'%d/%m/%y %H:%M','21/03/99 22:00'); INSERT INTO `gl_dateformats` VALUES (18,'%a %d %b %I:%M%p','Sun 21 Mar 10:00PM'); -- -- Table structure for table `gl_events` -- CREATE TABLE `gl_events` ( `eid` varchar(20) NOT NULL default '', `title` varchar(128) default NULL, `description` text, `datestart` date default NULL, `dateend` date default NULL, `url` varchar(255) default NULL, `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', `address1` varchar(40) default NULL, `address2` varchar(40) default NULL, `city` varchar(60) default NULL, `state` char(2) default NULL, `zipcode` varchar(5) default NULL, `allday` tinyint(1) NOT NULL default '0', `event_type` varchar(40) NOT NULL default '', `location` varchar(128) default NULL, `timestart` time default NULL, `timeend` time default NULL, PRIMARY KEY (`eid`), KEY `events_eid` (`eid`), KEY `events_event_type` (`event_type`), KEY `events_datestart` (`datestart`), KEY `events_dateend` (`dateend`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_events` -- -- -- Table structure for table `gl_eventsubmission` -- CREATE TABLE `gl_eventsubmission` ( `eid` varchar(20) NOT NULL default '', `title` varchar(128) default NULL, `description` text, `location` varchar(128) default NULL, `datestart` date default NULL, `dateend` date default NULL, `url` varchar(255) default NULL, `allday` tinyint(1) NOT NULL default '0', `zipcode` varchar(5) default NULL, `state` char(2) default NULL, `city` varchar(60) default NULL, `address2` varchar(40) default NULL, `address1` varchar(40) default NULL, `event_type` varchar(40) NOT NULL default '', `timestart` time default NULL, `timeend` time default NULL, PRIMARY KEY (`eid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_eventsubmission` -- INSERT INTO `gl_eventsubmission` VALUES ('2004100114064662','Test event','test','Test','2004-10-02','2004-10-03','http://www.tonybibbs.com/',0,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL); -- -- Table structure for table `gl_featurecodes` -- CREATE TABLE `gl_featurecodes` ( `code` tinyint(4) NOT NULL default '0', `name` varchar(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_featurecodes` -- INSERT INTO `gl_featurecodes` VALUES (0,'Not Featured'); INSERT INTO `gl_featurecodes` VALUES (1,'Featured'); -- -- Table structure for table `gl_features` -- CREATE TABLE `gl_features` ( `ft_id` mediumint(8) NOT NULL auto_increment, `ft_name` varchar(20) NOT NULL default '', `ft_descr` varchar(255) NOT NULL default '', `ft_gl_core` tinyint(1) NOT NULL default '0', PRIMARY KEY (`ft_id`), KEY `ft_name` (`ft_name`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_features` -- INSERT INTO `gl_features` VALUES (1,'story.edit','Access to story editor',1); INSERT INTO `gl_features` VALUES (2,'story.moderate','Ablility to moderate pending stories',1); INSERT INTO `gl_features` VALUES (3,'link.moderate','Ablility to moderate pending links',1); INSERT INTO `gl_features` VALUES (4,'link.edit','Access to link editor',1); INSERT INTO `gl_features` VALUES (5,'user.edit','Access to user editor',1); INSERT INTO `gl_features` VALUES (6,'user.delete','Ablility to delete a user',1); INSERT INTO `gl_features` VALUES (7,'user.mail','Ablility to send email to members',1); INSERT INTO `gl_features` VALUES (8,'event.moderate','Ablility to moderate pending events',1); INSERT INTO `gl_features` VALUES (9,'event.edit','Access to event editor',1); INSERT INTO `gl_features` VALUES (10,'block.edit','Access to block editor',1); INSERT INTO `gl_features` VALUES (11,'topic.edit','Access to topic editor',1); INSERT INTO `gl_features` VALUES (12,'poll.edit','Access to poll editor',1); INSERT INTO `gl_features` VALUES (13,'plugin.edit','Access to plugin editor',1); INSERT INTO `gl_features` VALUES (14,'group.edit','Ability to edit groups',1); INSERT INTO `gl_features` VALUES (15,'group.delete','Ability to delete groups',1); INSERT INTO `gl_features` VALUES (16,'block.delete','Ability to delete a block',1); INSERT INTO `gl_features` VALUES (17,'staticpages.edit','Ability to edit a static page',0); INSERT INTO `gl_features` VALUES (18,'staticpages.delete','Ability to delete static pages',0); INSERT INTO `gl_features` VALUES (19,'story.submit','May skip the story submission queue',1); INSERT INTO `gl_features` VALUES (20,'link.submit','May skip the link submission queue',1); INSERT INTO `gl_features` VALUES (21,'event.submit','May skip the event submission queue',1); INSERT INTO `gl_features` VALUES (22,'staticpages.PHP','Ability use PHP in static pages',0); INSERT INTO `gl_features` VALUES (23,'spamx.admin','spamx Admin',0); -- -- Table structure for table `gl_frontpagecodes` -- CREATE TABLE `gl_frontpagecodes` ( `code` tinyint(4) NOT NULL default '0', `name` varchar(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_frontpagecodes` -- INSERT INTO `gl_frontpagecodes` VALUES (0,'Show Only in Topic'); INSERT INTO `gl_frontpagecodes` VALUES (1,'Show on Front Page'); -- -- Table structure for table `gl_group_assignments` -- CREATE TABLE `gl_group_assignments` ( `ug_main_grp_id` mediumint(8) NOT NULL default '0', `ug_uid` mediumint(8) unsigned default NULL, `ug_grp_id` mediumint(8) unsigned default NULL, KEY `group_assignments_ug_main_grp_id` (`ug_main_grp_id`), KEY `ug_main_grp_id` (`ug_main_grp_id`), KEY `group_assignments_ug_uid` (`ug_uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_group_assignments` -- INSERT INTO `gl_group_assignments` VALUES (2,1,NULL); INSERT INTO `gl_group_assignments` VALUES (2,NULL,1); INSERT INTO `gl_group_assignments` VALUES (3,NULL,1); INSERT INTO `gl_group_assignments` VALUES (4,NULL,1); INSERT INTO `gl_group_assignments` VALUES (5,NULL,1); INSERT INTO `gl_group_assignments` VALUES (6,NULL,1); INSERT INTO `gl_group_assignments` VALUES (7,NULL,1); INSERT INTO `gl_group_assignments` VALUES (8,NULL,1); INSERT INTO `gl_group_assignments` VALUES (9,NULL,1); INSERT INTO `gl_group_assignments` VALUES (10,NULL,1); INSERT INTO `gl_group_assignments` VALUES (11,NULL,1); INSERT INTO `gl_group_assignments` VALUES (13,2,NULL); INSERT INTO `gl_group_assignments` VALUES (12,2,NULL); INSERT INTO `gl_group_assignments` VALUES (11,2,NULL); INSERT INTO `gl_group_assignments` VALUES (2,NULL,12); INSERT INTO `gl_group_assignments` VALUES (2,NULL,10); INSERT INTO `gl_group_assignments` VALUES (2,NULL,9); INSERT INTO `gl_group_assignments` VALUES (2,NULL,8); INSERT INTO `gl_group_assignments` VALUES (2,NULL,7); INSERT INTO `gl_group_assignments` VALUES (2,NULL,6); INSERT INTO `gl_group_assignments` VALUES (2,NULL,5); INSERT INTO `gl_group_assignments` VALUES (2,NULL,4); INSERT INTO `gl_group_assignments` VALUES (2,NULL,3); INSERT INTO `gl_group_assignments` VALUES (12,NULL,1); INSERT INTO `gl_group_assignments` VALUES (9,NULL,11); INSERT INTO `gl_group_assignments` VALUES (2,NULL,11); INSERT INTO `gl_group_assignments` VALUES (2,3,NULL); INSERT INTO `gl_group_assignments` VALUES (3,3,NULL); INSERT INTO `gl_group_assignments` VALUES (5,3,NULL); INSERT INTO `gl_group_assignments` VALUES (7,3,NULL); INSERT INTO `gl_group_assignments` VALUES (13,3,NULL); INSERT INTO `gl_group_assignments` VALUES (10,2,NULL); INSERT INTO `gl_group_assignments` VALUES (9,2,NULL); INSERT INTO `gl_group_assignments` VALUES (8,2,NULL); INSERT INTO `gl_group_assignments` VALUES (7,2,NULL); INSERT INTO `gl_group_assignments` VALUES (6,2,NULL); INSERT INTO `gl_group_assignments` VALUES (5,2,NULL); INSERT INTO `gl_group_assignments` VALUES (4,2,NULL); INSERT INTO `gl_group_assignments` VALUES (3,2,NULL); INSERT INTO `gl_group_assignments` VALUES (2,2,NULL); INSERT INTO `gl_group_assignments` VALUES (1,2,NULL); INSERT INTO `gl_group_assignments` VALUES (14,NULL,1); INSERT INTO `gl_group_assignments` VALUES (15,NULL,1); INSERT INTO `gl_group_assignments` VALUES (2,5,NULL); INSERT INTO `gl_group_assignments` VALUES (13,5,NULL); -- -- Table structure for table `gl_groups` -- CREATE TABLE `gl_groups` ( `grp_id` mediumint(8) NOT NULL auto_increment, `grp_name` varchar(50) NOT NULL default '', `grp_descr` varchar(255) NOT NULL default '', `grp_gl_core` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`grp_id`), KEY `grp_name` (`grp_name`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_groups` -- INSERT INTO `gl_groups` VALUES (1,'Root','Has full access to the site',1); INSERT INTO `gl_groups` VALUES (2,'All Users','Group that a typical user is added to',1); INSERT INTO `gl_groups` VALUES (3,'Story Admin','Has full access to story features',1); INSERT INTO `gl_groups` VALUES (4,'Block Admin','Has full access to block features',1); INSERT INTO `gl_groups` VALUES (5,'Link Admin','Has full access to link features',1); INSERT INTO `gl_groups` VALUES (6,'Topic Admin','Has full access to topic features',1); INSERT INTO `gl_groups` VALUES (7,'Event Admin','Has full access to event features',1); INSERT INTO `gl_groups` VALUES (8,'Poll Admin','Has full access to poll features',1); INSERT INTO `gl_groups` VALUES (9,'User Admin','Has full access to user features',1); INSERT INTO `gl_groups` VALUES (10,'Plugin Admin','Has full access to plugin features',1); INSERT INTO `gl_groups` VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1); INSERT INTO `gl_groups` VALUES (12,'Mail Admin','Can Use Mail Utility',1); INSERT INTO `gl_groups` VALUES (13,'Logged-in Users','All Registered Members',1); INSERT INTO `gl_groups` VALUES (14,'Static Page Admin','Can administer static pages',0); INSERT INTO `gl_groups` VALUES (15,'spamx Admin','Users in this group can administer the Spam-X plugin',0); -- -- Table structure for table `gl_links` -- CREATE TABLE `gl_links` ( `lid` varchar(20) NOT NULL default '', `category` varchar(32) default NULL, `url` varchar(255) default NULL, `description` text, `title` varchar(96) default NULL, `hits` int(11) NOT NULL default '0', `date` datetime default NULL, `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', PRIMARY KEY (`lid`), KEY `links_lid` (`lid`), KEY `links_category` (`category`), KEY `links_date` (`date`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_links` -- INSERT INTO `gl_links` VALUES ('20040119095147683','Geeklog Sites','http://www.geeklog.net','All you ever need to know about GeekLog - and more ...','Geeklog Project Homepage',42,NULL,5,2,3,3,2,2); -- -- Table structure for table `gl_linksubmission` -- CREATE TABLE `gl_linksubmission` ( `lid` varchar(20) NOT NULL default '', `category` varchar(32) default NULL, `url` varchar(255) default NULL, `description` text, `title` varchar(96) default NULL, `hits` int(11) default NULL, `date` datetime default NULL, PRIMARY KEY (`lid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_linksubmission` -- -- -- Table structure for table `gl_localuserinfo` -- CREATE TABLE `gl_localuserinfo` ( `uid` mediumint(8) NOT NULL default '0', `grad_year` varchar(4) NOT NULL default '', KEY `uid` (`uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_localuserinfo` -- INSERT INTO `gl_localuserinfo` VALUES (5,'87'); -- -- Table structure for table `gl_maillist` -- CREATE TABLE `gl_maillist` ( `code` int(1) NOT NULL default '0', `name` char(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_maillist` -- INSERT INTO `gl_maillist` VALUES (0,'Don\'t Email'); INSERT INTO `gl_maillist` VALUES (1,'Email Headlines Each Night'); -- -- Table structure for table `gl_personal_events` -- CREATE TABLE `gl_personal_events` ( `eid` varchar(20) NOT NULL default '', `title` varchar(128) default NULL, `event_type` varchar(40) NOT NULL default '', `datestart` date default NULL, `dateend` date default NULL, `address1` varchar(40) default NULL, `address2` varchar(40) default NULL, `city` varchar(60) default NULL, `state` char(2) default NULL, `zipcode` varchar(5) default NULL, `allday` tinyint(1) NOT NULL default '0', `url` varchar(255) default NULL, `description` text, `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', `uid` mediumint(8) NOT NULL default '0', `location` varchar(128) default NULL, `timestart` time default NULL, `timeend` time default NULL, PRIMARY KEY (`eid`,`uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_personal_events` -- -- -- Table structure for table `gl_plugins` -- CREATE TABLE `gl_plugins` ( `pi_name` varchar(30) NOT NULL default '', `pi_version` varchar(20) NOT NULL default '', `pi_gl_version` varchar(20) NOT NULL default '', `pi_enabled` tinyint(3) unsigned NOT NULL default '1', `pi_homepage` varchar(128) NOT NULL default '', PRIMARY KEY (`pi_name`), KEY `plugins_enabled` (`pi_enabled`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_plugins` -- INSERT INTO `gl_plugins` VALUES ('staticpages','1.4.1','1.3.10',1,'http://www.tonybibbs.com'); INSERT INTO `gl_plugins` VALUES ('spamx','1.0.2','1.3.10',1,'http://www.pigstye.net/gplugs/staticpages/index.php/spamx'); INSERT INTO `gl_plugins` VALUES ('phpbbbridge','104','1.3.10',1,'http://demo.dogcows.net/'); -- -- Table structure for table `gl_pollanswers` -- CREATE TABLE `gl_pollanswers` ( `qid` varchar(20) NOT NULL default '', `aid` tinyint(3) unsigned NOT NULL default '0', `answer` varchar(255) default NULL, `votes` mediumint(8) unsigned default NULL, PRIMARY KEY (`qid`,`aid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_pollanswers` -- INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',1,'Professional theme',0); INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',2,'Spam-X plugin included',0); INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',3,'Story Archive feature',0); INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',4,'Clickable links in text mode',0); INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',5,'Autolinks / Autotags',0); INSERT INTO `gl_pollanswers` VALUES ('geeklogfeaturepoll',6,'Other',0); -- -- Table structure for table `gl_pollquestions` -- CREATE TABLE `gl_pollquestions` ( `qid` varchar(20) NOT NULL default '', `question` varchar(255) default NULL, `voters` mediumint(8) unsigned default NULL, `date` datetime default NULL, `display` tinyint(4) NOT NULL default '0', `commentcode` tinyint(4) NOT NULL default '0', `statuscode` tinyint(4) NOT NULL default '0', `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', PRIMARY KEY (`qid`), KEY `pollquestions_qid` (`qid`), KEY `pollquestions_display` (`display`), KEY `pollquestions_commentcode` (`commentcode`), KEY `pollquestions_statuscode` (`statuscode`), KEY `pollquestions_date` (`date`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_pollquestions` -- INSERT INTO `gl_pollquestions` VALUES ('geeklogfeaturepoll','What is the best new feature of Geeklog?',0,'2004-01-01 12:43:20',1,0,0,8,2,3,3,2,2); -- -- Table structure for table `gl_pollvoters` -- CREATE TABLE `gl_pollvoters` ( `id` int(10) unsigned NOT NULL auto_increment, `qid` varchar(20) NOT NULL default '', `ipaddress` varchar(15) NOT NULL default '', `date` int(10) unsigned default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_pollvoters` -- -- -- Table structure for table `gl_postmodes` -- CREATE TABLE `gl_postmodes` ( `code` char(10) NOT NULL default '', `name` char(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_postmodes` -- INSERT INTO `gl_postmodes` VALUES ('plaintext','Plain Old Text'); INSERT INTO `gl_postmodes` VALUES ('html','HTML Formatted'); -- -- Table structure for table `gl_sessions` -- CREATE TABLE `gl_sessions` ( `sess_id` int(10) unsigned NOT NULL default '0', `start_time` int(10) unsigned NOT NULL default '0', `remote_ip` varchar(15) NOT NULL default '', `uid` mediumint(8) NOT NULL default '1', `md5_sess_id` varchar(128) default NULL, PRIMARY KEY (`sess_id`), KEY `sess_id` (`sess_id`), KEY `start_time` (`start_time`), KEY `remote_ip` (`remote_ip`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_sessions` -- INSERT INTO `gl_sessions` VALUES (760927543,1134853739,'69.86.253.20',2,NULL); -- -- Table structure for table `gl_sortcodes` -- CREATE TABLE `gl_sortcodes` ( `code` char(4) NOT NULL default '0', `name` char(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_sortcodes` -- INSERT INTO `gl_sortcodes` VALUES ('ASC','Oldest First'); INSERT INTO `gl_sortcodes` VALUES ('DESC','Newest First'); -- -- Table structure for table `gl_spamx` -- CREATE TABLE `gl_spamx` ( `name` varchar(20) NOT NULL default '', `value` varchar(255) NOT NULL default '', KEY `spamx_name` (`name`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_spamx` -- -- -- Table structure for table `gl_speedlimit` -- CREATE TABLE `gl_speedlimit` ( `id` int(10) unsigned NOT NULL auto_increment, `ipaddress` varchar(15) NOT NULL default '', `date` int(10) unsigned default NULL, `type` varchar(30) NOT NULL default 'submit', PRIMARY KEY (`id`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_speedlimit` -- INSERT INTO `gl_speedlimit` VALUES (13,'69.86.253.20',1134853712,'login'); -- -- Table structure for table `gl_staticpage` -- CREATE TABLE `gl_staticpage` ( `sp_id` varchar(40) NOT NULL default '', `sp_uid` mediumint(8) NOT NULL default '1', `sp_title` varchar(128) NOT NULL default '', `sp_content` text NOT NULL, `sp_hits` mediumint(8) unsigned NOT NULL default '0', `sp_date` datetime NOT NULL default '0000-00-00 00:00:00', `sp_format` varchar(20) NOT NULL default '', `sp_onmenu` tinyint(1) unsigned NOT NULL default '0', `sp_label` varchar(64) default NULL, `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '2', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', `sp_centerblock` tinyint(1) unsigned NOT NULL default '0', `sp_tid` varchar(20) NOT NULL default 'none', `sp_where` tinyint(1) unsigned NOT NULL default '1', `sp_php` tinyint(1) unsigned NOT NULL default '0', `sp_nf` tinyint(1) unsigned default '0', `sp_inblock` tinyint(1) unsigned default '1', PRIMARY KEY (`sp_id`), KEY `staticpage_sp_uid` (`sp_uid`), KEY `staticpage_sp_date` (`sp_date`), KEY `staticpage_sp_onmenu` (`sp_onmenu`), KEY `staticpage_sp_centerblock` (`sp_centerblock`), KEY `staticpage_sp_tid` (`sp_tid`), KEY `staticpage_sp_where` (`sp_where`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_staticpage` -- -- -- Table structure for table `gl_statuscodes` -- CREATE TABLE `gl_statuscodes` ( `code` int(1) NOT NULL default '0', `name` char(32) default NULL, PRIMARY KEY (`code`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_statuscodes` -- INSERT INTO `gl_statuscodes` VALUES (1,'Refreshing'); INSERT INTO `gl_statuscodes` VALUES (0,'Normal'); INSERT INTO `gl_statuscodes` VALUES (10,'Archive'); -- -- Table structure for table `gl_stories` -- CREATE TABLE `gl_stories` ( `sid` varchar(40) NOT NULL default '', `uid` mediumint(8) NOT NULL default '1', `draft_flag` tinyint(3) unsigned default '0', `tid` varchar(20) NOT NULL default 'General', `date` datetime default NULL, `title` varchar(128) default NULL, `introtext` text, `bodytext` text, `hits` mediumint(8) unsigned NOT NULL default '0', `numemails` mediumint(8) unsigned NOT NULL default '0', `comments` mediumint(8) unsigned NOT NULL default '0', `related` text, `featured` tinyint(3) unsigned NOT NULL default '0', `show_topic_icon` tinyint(1) unsigned NOT NULL default '1', `commentcode` tinyint(4) NOT NULL default '0', `statuscode` tinyint(4) NOT NULL default '0', `expire` datetime NOT NULL default '0000-00-00 00:00:00', `postmode` varchar(10) NOT NULL default 'html', `frontpage` tinyint(3) unsigned default '1', `owner_id` mediumint(8) NOT NULL default '1', `group_id` mediumint(8) NOT NULL default '2', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', PRIMARY KEY (`sid`), KEY `stories_sid` (`sid`), KEY `stories_tid` (`tid`), KEY `stories_uid` (`uid`), KEY `stories_featured` (`featured`), KEY `stories_hits` (`hits`), KEY `stories_statuscode` (`statuscode`), KEY `stories_expire` (`expire`), KEY `stories_date` (`date`), KEY `stories_frontpage` (`frontpage`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_stories` -- INSERT INTO `gl_stories` VALUES ('20040101093000103',2,0,'GeekLog','2004-01-01 09:30:00','Welcome to Geeklog!','<p>Welcome This site portion of the site is not opererational at this time.','',101,1,0,'',1,1,0,0,'1999-11-30 12:00:52','html',1,2,3,3,3,2,2); -- -- Table structure for table `gl_storysubmission` -- CREATE TABLE `gl_storysubmission` ( `sid` varchar(20) NOT NULL default '', `uid` mediumint(8) NOT NULL default '1', `tid` varchar(20) NOT NULL default 'General', `title` varchar(128) default NULL, `introtext` text, `date` datetime default NULL, `postmode` varchar(10) NOT NULL default 'html', PRIMARY KEY (`sid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_storysubmission` -- INSERT INTO `gl_storysubmission` VALUES ('20040101120556538',2,'GeekLog','Are you secure?','<p>This is a reminder to secure your site once you have Geeklog up and running. What you should do:</p>\r\r<ol>\r<li>Change the default password for all Admin accounts.</li>\r<li>Remove the install directory (you won\'t need it any more).</li>\r</ol>','2004-01-01 12:05:56','html'); -- -- Table structure for table `gl_syndication` -- CREATE TABLE `gl_syndication` ( `fid` int(10) unsigned NOT NULL auto_increment, `type` varchar(30) NOT NULL default 'geeklog', `topic` varchar(48) NOT NULL default '::all', `format` varchar(20) NOT NULL default 'rss', `limits` varchar(5) NOT NULL default '10', `content_length` smallint(5) unsigned NOT NULL default '0', `title` varchar(40) NOT NULL default '', `description` text, `filename` varchar(40) NOT NULL default 'geeklog.rdf', `charset` varchar(20) NOT NULL default 'UTF-8', `language` varchar(20) NOT NULL default 'en-gb', `is_enabled` tinyint(1) unsigned NOT NULL default '1', `updated` datetime NOT NULL default '0000-00-00 00:00:00', `update_info` text, PRIMARY KEY (`fid`), KEY `syndication_type` (`type`), KEY `syndication_topic` (`topic`), KEY `syndication_is_enabled` (`is_enabled`), KEY `syndication_updated` (`updated`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_syndication` -- INSERT INTO `gl_syndication` VALUES (1,'geeklog','::all','rss','10',0,'Geeklog Site','Another Nifty Geeklog Site','geeklog.rdf','UTF-8','en-gb',1,'2005-12-04 22:35:22','20040101093000103'); -- -- Table structure for table `gl_topics` -- CREATE TABLE `gl_topics` ( `tid` varchar(20) NOT NULL default '', `topic` varchar(48) default NULL, `imageurl` varchar(255) default NULL, `sortnum` tinyint(3) default NULL, `limitnews` tinyint(3) default NULL, `is_default` tinyint(1) unsigned NOT NULL default '0', `archive_flag` tinyint(1) unsigned NOT NULL default '0', `group_id` mediumint(8) unsigned NOT NULL default '1', `owner_id` mediumint(8) unsigned NOT NULL default '1', `perm_owner` tinyint(1) unsigned NOT NULL default '3', `perm_group` tinyint(1) unsigned NOT NULL default '3', `perm_members` tinyint(1) unsigned NOT NULL default '2', `perm_anon` tinyint(1) unsigned NOT NULL default '2', PRIMARY KEY (`tid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_topics` -- INSERT INTO `gl_topics` VALUES ('General','General News','/images/topics/topic_news.gif',1,10,0,0,6,2,3,2,2,2); INSERT INTO `gl_topics` VALUES ('GeekLog','GeekLog','/images/topics/topic_gl.gif',2,10,0,0,6,2,3,2,2,2); -- -- Table structure for table `gl_tzcodes` -- CREATE TABLE `gl_tzcodes` ( `tz` char(3) NOT NULL default '', `offset` int(1) default NULL, `description` varchar(64) default NULL, PRIMARY KEY (`tz`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_tzcodes` -- INSERT INTO `gl_tzcodes` VALUES ('ndt',-9000,'Newfoundland Daylight'); INSERT INTO `gl_tzcodes` VALUES ('adt',-10800,'Atlantic Daylight'); INSERT INTO `gl_tzcodes` VALUES ('edt',-14400,'Eastern Daylight'); INSERT INTO `gl_tzcodes` VALUES ('cdt',-18000,'Central Daylight'); INSERT INTO `gl_tzcodes` VALUES ('mdt',-21600,'Mountain Daylight'); INSERT INTO `gl_tzcodes` VALUES ('pdt',-25200,'Pacific Daylight'); INSERT INTO `gl_tzcodes` VALUES ('ydt',-28800,'Yukon Daylight'); INSERT INTO `gl_tzcodes` VALUES ('hdt',-32400,'Hawaii Daylight'); INSERT INTO `gl_tzcodes` VALUES ('bst',3600,'British Summer'); INSERT INTO `gl_tzcodes` VALUES ('mes',7200,'Middle European Summer'); INSERT INTO `gl_tzcodes` VALUES ('sst',7200,'Swedish Summer'); INSERT INTO `gl_tzcodes` VALUES ('fst',7200,'French Summer'); INSERT INTO `gl_tzcodes` VALUES ('wad',28800,'West Australian Daylight'); INSERT INTO `gl_tzcodes` VALUES ('cad',37800,'Central Australian Daylight'); INSERT INTO `gl_tzcodes` VALUES ('ead',39600,'Eastern Australian Daylight'); INSERT INTO `gl_tzcodes` VALUES ('nzd',46800,'New Zealand Daylight'); INSERT INTO `gl_tzcodes` VALUES ('gmt',0,'Greenwich Mean'); INSERT INTO `gl_tzcodes` VALUES ('utc',0,'Universal (Coordinated)'); INSERT INTO `gl_tzcodes` VALUES ('wet',0,'Western European'); INSERT INTO `gl_tzcodes` VALUES ('wat',-3600,'West Africa'); INSERT INTO `gl_tzcodes` VALUES ('at',-7200,'Azores'); INSERT INTO `gl_tzcodes` VALUES ('gst',-10800,'Greenland Standard'); INSERT INTO `gl_tzcodes` VALUES ('nft',-12600,'Newfoundland'); INSERT INTO `gl_tzcodes` VALUES ('nst',-12600,'Newfoundland Standard'); INSERT INTO `gl_tzcodes` VALUES ('ast',-14400,'Atlantic Standard'); INSERT INTO `gl_tzcodes` VALUES ('est',-18000,'Eastern Standard'); INSERT INTO `gl_tzcodes` VALUES ('cst',-21600,'Central Standard'); INSERT INTO `gl_tzcodes` VALUES ('mst',-25200,'Mountain Standard'); INSERT INTO `gl_tzcodes` VALUES ('pst',-28800,'Pacific Standard'); INSERT INTO `gl_tzcodes` VALUES ('yst',-32400,'Yukon Standard'); INSERT INTO `gl_tzcodes` VALUES ('hst',-36000,'Hawaii Standard'); INSERT INTO `gl_tzcodes` VALUES ('cat',-36000,'Central Alaska'); INSERT INTO `gl_tzcodes` VALUES ('ahs',-36000,'Alaska-Hawaii Standard'); INSERT INTO `gl_tzcodes` VALUES ('nt',-39600,'Nome'); INSERT INTO `gl_tzcodes` VALUES ('idl',-43200,'International Date Line West'); INSERT INTO `gl_tzcodes` VALUES ('cet',3600,'Central European'); INSERT INTO `gl_tzcodes` VALUES ('met',3600,'Middle European'); INSERT INTO `gl_tzcodes` VALUES ('mew',3600,'Middle European Winter'); INSERT INTO `gl_tzcodes` VALUES ('swt',3600,'Swedish Winter'); INSERT INTO `gl_tzcodes` VALUES ('fwt',3600,'French Winter'); INSERT INTO `gl_tzcodes` VALUES ('eet',7200,'Eastern Europe, USSR Zone 1'); INSERT INTO `gl_tzcodes` VALUES ('bt',10800,'Baghdad, USSR Zone 2'); INSERT INTO `gl_tzcodes` VALUES ('it',12600,'Iran'); INSERT INTO `gl_tzcodes` VALUES ('zp4',14400,'USSR Zone 3'); INSERT INTO `gl_tzcodes` VALUES ('zp5',18000,'USSR Zone 4'); INSERT INTO `gl_tzcodes` VALUES ('ist',19800,'Indian Standard'); INSERT INTO `gl_tzcodes` VALUES ('zp6',21600,'USSR Zone 5'); INSERT INTO `gl_tzcodes` VALUES ('was',25200,'West Australian Standard'); INSERT INTO `gl_tzcodes` VALUES ('jt',27000,'Java (3pm in Cronusland!)'); INSERT INTO `gl_tzcodes` VALUES ('cct',28800,'China Coast, USSR Zone 7'); INSERT INTO `gl_tzcodes` VALUES ('jst',32400,'Japan Standard, USSR Zone 8'); INSERT INTO `gl_tzcodes` VALUES ('cas',34200,'Central Australian Standard'); INSERT INTO `gl_tzcodes` VALUES ('eas',36000,'Eastern Australian Standard'); INSERT INTO `gl_tzcodes` VALUES ('nzt',43200,'New Zealand'); INSERT INTO `gl_tzcodes` VALUES ('nzs',43200,'New Zealand Standard'); INSERT INTO `gl_tzcodes` VALUES ('id2',43200,'International Date Line East'); INSERT INTO `gl_tzcodes` VALUES ('idt',10800,'Israel Daylight'); INSERT INTO `gl_tzcodes` VALUES ('iss',7200,'Israel Standard'); -- -- Table structure for table `gl_usercomment` -- CREATE TABLE `gl_usercomment` ( `uid` mediumint(8) NOT NULL default '1', `commentmode` varchar(10) NOT NULL default 'threaded', `commentorder` varchar(4) NOT NULL default 'ASC', `commentlimit` mediumint(8) unsigned NOT NULL default '100', PRIMARY KEY (`uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_usercomment` -- INSERT INTO `gl_usercomment` VALUES (1,'nested','ASC',100); INSERT INTO `gl_usercomment` VALUES (2,'threaded','ASC',100); INSERT INTO `gl_usercomment` VALUES (3,'threaded','ASC',100); INSERT INTO `gl_usercomment` VALUES (5,'threaded','ASC',100); -- -- Table structure for table `gl_userindex` -- CREATE TABLE `gl_userindex` ( `uid` mediumint(8) NOT NULL default '1', `tids` varchar(255) NOT NULL default '', `etids` varchar(255) NOT NULL default '', `aids` varchar(255) NOT NULL default '', `boxes` varchar(255) NOT NULL default '', `noboxes` tinyint(4) NOT NULL default '0', `maxstories` tinyint(4) default NULL, PRIMARY KEY (`uid`), KEY `userindex_uid` (`uid`), KEY `userindex_noboxes` (`noboxes`), KEY `userindex_maxstories` (`maxstories`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_userindex` -- INSERT INTO `gl_userindex` VALUES (1,'','-','','',0,NULL); INSERT INTO `gl_userindex` VALUES (2,'','','','',0,NULL); INSERT INTO `gl_userindex` VALUES (3,'','','','',0,NULL); INSERT INTO `gl_userindex` VALUES (5,'','-','','',0,NULL); -- -- Table structure for table `gl_userinfo` -- CREATE TABLE `gl_userinfo` ( `uid` mediumint(8) NOT NULL default '1', `about` text, `location` varchar(96) NOT NULL default '', `pgpkey` text, `userspace` varchar(255) NOT NULL default '', `tokens` tinyint(3) unsigned NOT NULL default '0', `totalcomments` mediumint(9) NOT NULL default '0', `lastgranted` int(10) unsigned NOT NULL default '0', `lastlogin` varchar(10) NOT NULL default '0', PRIMARY KEY (`uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_userinfo` -- INSERT INTO `gl_userinfo` VALUES (1,NULL,'',NULL,'',0,0,0,'0'); INSERT INTO `gl_userinfo` VALUES (2,NULL,'',NULL,'',0,0,0,'1134853725'); INSERT INTO `gl_userinfo` VALUES (3,NULL,'',NULL,'',0,0,0,'1133757433'); INSERT INTO `gl_userinfo` VALUES (5,'','','','',0,0,0,'1133818193'); -- -- Table structure for table `gl_userprefs` -- CREATE TABLE `gl_userprefs` ( `uid` mediumint(8) NOT NULL default '1', `noicons` tinyint(3) unsigned NOT NULL default '0', `willing` tinyint(3) unsigned NOT NULL default '1', `dfid` tinyint(3) unsigned NOT NULL default '0', `tzid` char(3) NOT NULL default 'edt', `emailstories` tinyint(4) NOT NULL default '1', `emailfromadmin` tinyint(1) NOT NULL default '1', `emailfromuser` tinyint(1) NOT NULL default '1', `showonline` tinyint(1) NOT NULL default '1', PRIMARY KEY (`uid`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_userprefs` -- INSERT INTO `gl_userprefs` VALUES (1,0,0,0,'',0,1,1,1); INSERT INTO `gl_userprefs` VALUES (2,0,1,0,'edt',1,1,1,1); INSERT INTO `gl_userprefs` VALUES (3,0,1,0,'edt',1,1,1,1); INSERT INTO `gl_userprefs` VALUES (5,0,1,0,'edt',1,1,1,1); -- -- Table structure for table `gl_users` -- CREATE TABLE `gl_users` ( `uid` mediumint(8) NOT NULL auto_increment, `username` varchar(16) NOT NULL default '', `fullname` varchar(80) default NULL, `passwd` varchar(32) NOT NULL default '', `email` varchar(96) default NULL, `homepage` varchar(96) default NULL, `sig` varchar(160) NOT NULL default '', `regdate` datetime NOT NULL default '0000-00-00 00:00:00', `photo` varchar(128) default NULL, `cookietimeout` int(8) unsigned default '28800', `theme` varchar(64) default NULL, `language` varchar(64) default NULL, `pwrequestid` varchar(16) default NULL, PRIMARY KEY (`uid`), KEY `LOGIN` (`uid`,`passwd`,`username`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_users` -- INSERT INTO `gl_users` VALUES (1,'Anonymous','Anonymous','',NULL,NULL,'','2004-01-01 00:00:01',NULL,0,NULL,NULL,NULL); INSERT INTO `gl_users` VALUES (2,'Admin','Geeklog SuperUser','xxxx','root@localhost','http://www.geeklog.net','','2004-01-01 00:00:02',NULL,28800,NULL,NULL,'NULL'); INSERT INTO `gl_users` VALUES (3,'Moderator','Moderator','xxxx','moderator','http://www.geeklog.net','','2004-01-01 00:00:03',NULL,28800,NULL,NULL,'xxxxx'); INSERT INTO `gl_users` VALUES (5,'xxx','xxxk','34a83a90304cf74975873c86dd047294','xxx','','','2005-12-05 15:29:12','',28800,NULL,NULL,'xxxx3'); -- -- Table structure for table `gl_vars` -- CREATE TABLE `gl_vars` ( `name` varchar(20) NOT NULL default '', `value` varchar(128) default NULL, PRIMARY KEY (`name`) ) TYPE=MyISAM; -- -- Dumping data for table `gl_vars` -- INSERT INTO `gl_vars` VALUES ('totalhits','249'); INSERT INTO `gl_vars` VALUES ('lastemailedstories',''); -- -- Table structure for table `phpbb_auth_access` -- CREATE TABLE `phpbb_auth_access` ( `group_id` mediumint(8) NOT NULL default '0', `forum_id` smallint(5) unsigned NOT NULL default '0', `auth_view` tinyint(1) NOT NULL default '0', `auth_read` tinyint(1) NOT NULL default '0', `auth_post` tinyint(1) NOT NULL default '0', `auth_reply` tinyint(1) NOT NULL default '0', `auth_edit` tinyint(1) NOT NULL default '0', `auth_delete` tinyint(1) NOT NULL default '0', `auth_sticky` tinyint(1) NOT NULL default '0', `auth_announce` tinyint(1) NOT NULL default '0', `auth_vote` tinyint(1) NOT NULL default '0', `auth_pollcreate` tinyint(1) NOT NULL default '0', `auth_attachments` tinyint(1) NOT NULL default '0', `auth_mod` tinyint(1) NOT NULL default '0', KEY `group_id` (`group_id`), KEY `forum_id` (`forum_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_auth_access` -- -- -- Table structure for table `phpbb_banlist` -- CREATE TABLE `phpbb_banlist` ( `ban_id` mediumint(8) unsigned NOT NULL auto_increment, `ban_userid` mediumint(8) NOT NULL default '0', `ban_ip` varchar(8) NOT NULL default '', `ban_email` varchar(255) default NULL, PRIMARY KEY (`ban_id`), KEY `ban_ip_user_id` (`ban_ip`,`ban_userid`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_banlist` -- -- -- Table structure for table `phpbb_categories` -- CREATE TABLE `phpbb_categories` ( `cat_id` mediumint(8) unsigned NOT NULL auto_increment, `cat_title` varchar(100) default NULL, `cat_order` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_order` (`cat_order`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_categories` -- INSERT INTO `phpbb_categories` VALUES (1,'Test category 1',10); -- -- Table structure for table `phpbb_config` -- CREATE TABLE `phpbb_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_config` -- INSERT INTO `phpbb_config` VALUES ('config_id','1'); INSERT INTO `phpbb_config` VALUES ('board_disable','0'); INSERT INTO `phpbb_config` VALUES ('sitename','yourdomain.com'); INSERT INTO `phpbb_config` VALUES ('site_desc','A _little_ text to describe your forum'); INSERT INTO `phpbb_config` VALUES ('cookie_name','phpbb2mysql'); INSERT INTO `phpbb_config` VALUES ('cookie_path','/'); INSERT INTO `phpbb_config` VALUES ('cookie_domain',''); INSERT INTO `phpbb_config` VALUES ('cookie_secure','0'); INSERT INTO `phpbb_config` VALUES ('session_length','3600'); INSERT INTO `phpbb_config` VALUES ('allow_html','0'); INSERT INTO `phpbb_config` VALUES ('allow_html_tags','b,i,u,pre'); INSERT INTO `phpbb_config` VALUES ('allow_bbcode','1'); INSERT INTO `phpbb_config` VALUES ('allow_smilies','1'); INSERT INTO `phpbb_config` VALUES ('allow_sig','1'); INSERT INTO `phpbb_config` VALUES ('allow_namechange','0'); INSERT INTO `phpbb_config` VALUES ('allow_theme_create','0'); INSERT INTO `phpbb_config` VALUES ('allow_avatar_local','0'); INSERT INTO `phpbb_config` VALUES ('allow_avatar_remote','0'); INSERT INTO `phpbb_config` VALUES ('allow_avatar_upload','0'); INSERT INTO `phpbb_config` VALUES ('enable_confirm','0'); INSERT INTO `phpbb_config` VALUES ('allow_autologin','1'); INSERT INTO `phpbb_config` VALUES ('max_autologin_time','0'); INSERT INTO `phpbb_config` VALUES ('override_user_style','0'); INSERT INTO `phpbb_config` VALUES ('posts_per_page','15'); INSERT INTO `phpbb_config` VALUES ('topics_per_page','50'); INSERT INTO `phpbb_config` VALUES ('hot_threshold','25'); INSERT INTO `phpbb_config` VALUES ('max_poll_options','10'); INSERT INTO `phpbb_config` VALUES ('max_sig_chars','255'); INSERT INTO `phpbb_config` VALUES ('max_inbox_privmsgs','50'); INSERT INTO `phpbb_config` VALUES ('max_sentbox_privmsgs','25'); INSERT INTO `phpbb_config` VALUES ('max_savebox_privmsgs','50'); INSERT INTO `phpbb_config` VALUES ('board_email_sig','Thanks, The Management'); INSERT INTO `phpbb_config` VALUES ('board_email','webmaster@omegateencamp.org'); INSERT INTO `phpbb_config` VALUES ('smtp_delivery','0'); INSERT INTO `phpbb_config` VALUES ('smtp_host',''); INSERT INTO `phpbb_config` VALUES ('smtp_username',''); INSERT INTO `phpbb_config` VALUES ('smtp_password',''); INSERT INTO `phpbb_config` VALUES ('sendmail_fix','0'); INSERT INTO `phpbb_config` VALUES ('require_activation','0'); INSERT INTO `phpbb_config` VALUES ('flood_interval','15'); INSERT INTO `phpbb_config` VALUES ('board_email_form','0'); INSERT INTO `phpbb_config` VALUES ('avatar_filesize','6144'); INSERT INTO `phpbb_config` VALUES ('avatar_max_width','80'); INSERT INTO `phpbb_config` VALUES ('avatar_max_height','80'); INSERT INTO `phpbb_config` VALUES ('avatar_path','images/avatars'); INSERT INTO `phpbb_config` VALUES ('avatar_gallery_path','images/avatars/gallery'); INSERT INTO `phpbb_config` VALUES ('smilies_path','images/smiles'); INSERT INTO `phpbb_config` VALUES ('default_style','1'); INSERT INTO `phpbb_config` VALUES ('default_dateformat','D M d, Y g:i a'); INSERT INTO `phpbb_config` VALUES ('board_timezone','0'); INSERT INTO `phpbb_config` VALUES ('prune_enable','1'); INSERT INTO `phpbb_config` VALUES ('privmsg_disable','0'); INSERT INTO `phpbb_config` VALUES ('gzip_compress','0'); INSERT INTO `phpbb_config` VALUES ('coppa_fax',''); INSERT INTO `phpbb_config` VALUES ('coppa_mail',''); INSERT INTO `phpbb_config` VALUES ('record_online_users','1'); INSERT INTO `phpbb_config` VALUES ('record_online_date','1133791815'); INSERT INTO `phpbb_config` VALUES ('server_name','omegateencamp.org'); INSERT INTO `phpbb_config` VALUES ('server_port','80'); INSERT INTO `phpbb_config` VALUES ('script_path','/phpBB2/'); INSERT INTO `phpbb_config` VALUES ('version','.0.18'); INSERT INTO `phpbb_config` VALUES ('board_startdate','1133791349'); INSERT INTO `phpbb_config` VALUES ('default_lang','english'); INSERT INTO `phpbb_config` VALUES ('allow_login_for_profile','1'); -- -- Table structure for table `phpbb_confirm` -- CREATE TABLE `phpbb_confirm` ( `confirm_id` char(32) NOT NULL default '', `session_id` char(32) NOT NULL default '', `code` char(6) NOT NULL default '', PRIMARY KEY (`session_id`,`confirm_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_confirm` -- -- -- Table structure for table `phpbb_disallow` -- CREATE TABLE `phpbb_disallow` ( `disallow_id` mediumint(8) unsigned NOT NULL auto_increment, `disallow_username` varchar(25) NOT NULL default '', PRIMARY KEY (`disallow_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_disallow` -- -- -- Table structure for table `phpbb_forum_prune` -- CREATE TABLE `phpbb_forum_prune` ( `prune_id` mediumint(8) unsigned NOT NULL auto_increment, `forum_id` smallint(5) unsigned NOT NULL default '0', `prune_days` smallint(5) unsigned NOT NULL default '0', `prune_freq` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`prune_id`), KEY `forum_id` (`forum_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_forum_prune` -- -- -- Table structure for table `phpbb_forums` -- CREATE TABLE `phpbb_forums` ( `forum_id` smallint(5) unsigned NOT NULL default '0', `cat_id` mediumint(8) unsigned NOT NULL default '0', `forum_name` varchar(150) default NULL, `forum_desc` text, `forum_status` tinyint(4) NOT NULL default '0', `forum_order` mediumint(8) unsigned NOT NULL default '1', `forum_posts` mediumint(8) unsigned NOT NULL default '0', `forum_topics` mediumint(8) unsigned NOT NULL default '0', `forum_last_post_id` mediumint(8) unsigned NOT NULL default '0', `prune_next` int(11) default NULL, `prune_enable` tinyint(1) NOT NULL default '0', `auth_view` tinyint(2) NOT NULL default '0', `auth_read` tinyint(2) NOT NULL default '0', `auth_post` tinyint(2) NOT NULL default '0', `auth_reply` tinyint(2) NOT NULL default '0', `auth_edit` tinyint(2) NOT NULL default '0', `auth_delete` tinyint(2) NOT NULL default '0', `auth_sticky` tinyint(2) NOT NULL default '0', `auth_announce` tinyint(2) NOT NULL default '0', `auth_vote` tinyint(2) NOT NULL default '0', `auth_pollcreate` tinyint(2) NOT NULL default '0', `auth_attachments` tinyint(2) NOT NULL default '0', PRIMARY KEY (`forum_id`), KEY `forums_order` (`forum_order`), KEY `cat_id` (`cat_id`), KEY `forum_last_post_id` (`forum_last_post_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_forums` -- INSERT INTO `phpbb_forums` VALUES (1,1,'Test Forum 1','This is just a test forum.',0,10,1,1,1,NULL,0,0,0,0,0,1,1,3,3,1,1,3); -- -- Table structure for table `phpbb_groups` -- CREATE TABLE `phpbb_groups` ( `group_id` mediumint(8) NOT NULL auto_increment, `group_type` tinyint(4) NOT NULL default '1', `group_name` varchar(40) NOT NULL default '', `group_description` varchar(255) NOT NULL default '', `group_moderator` mediumint(8) NOT NULL default '0', `group_single_user` tinyint(1) NOT NULL default '1', PRIMARY KEY (`group_id`), KEY `group_single_user` (`group_single_user`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_groups` -- INSERT INTO `phpbb_groups` VALUES (1,1,'Anonymous','Personal User',0,1); INSERT INTO `phpbb_groups` VALUES (2,1,'Admin','Personal User',0,1); INSERT INTO `phpbb_groups` VALUES (3,1,'','Personal User',0,1); INSERT INTO `phpbb_groups` VALUES (5,1,'','Personal User',0,1); -- -- Table structure for table `phpbb_posts` -- CREATE TABLE `phpbb_posts` ( `post_id` mediumint(8) unsigned NOT NULL auto_increment, `topic_id` mediumint(8) unsigned NOT NULL default '0', `forum_id` smallint(5) unsigned NOT NULL default '0', `poster_id` mediumint(8) NOT NULL default '0', `post_time` int(11) NOT NULL default '0', `poster_ip` varchar(8) NOT NULL default '', `post_username` varchar(25) default NULL, `enable_bbcode` tinyint(1) NOT NULL default '1', `enable_html` tinyint(1) NOT NULL default '0', `enable_smilies` tinyint(1) NOT NULL default '1', `enable_sig` tinyint(1) NOT NULL default '1', `post_edit_time` int(11) default NULL, `post_edit_count` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`post_id`), KEY `forum_id` (`forum_id`), KEY `topic_id` (`topic_id`), KEY `poster_id` (`poster_id`), KEY `post_time` (`post_time`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_posts` -- INSERT INTO `phpbb_posts` VALUES (1,1,1,2,972086460,'7F000001',NULL,1,0,1,1,NULL,0); -- -- Table structure for table `phpbb_posts_text` -- CREATE TABLE `phpbb_posts_text` ( `post_id` mediumint(8) unsigned NOT NULL default '0', `bbcode_uid` varchar(10) NOT NULL default '', `post_subject` varchar(60) default NULL, `post_text` text, PRIMARY KEY (`post_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_posts_text` -- INSERT INTO `phpbb_posts_text` VALUES (1,'',NULL,'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!'); -- -- Table structure for table `phpbb_privmsgs` -- CREATE TABLE `phpbb_privmsgs` ( `privmsgs_id` mediumint(8) unsigned NOT NULL auto_increment, `privmsgs_type` tinyint(4) NOT NULL default '0', `privmsgs_subject` varchar(255) NOT NULL default '0', `privmsgs_from_userid` mediumint(8) NOT NULL default '0', `privmsgs_to_userid` mediumint(8) NOT NULL default '0', `privmsgs_date` int(11) NOT NULL default '0', `privmsgs_ip` varchar(8) NOT NULL default '', `privmsgs_enable_bbcode` tinyint(1) NOT NULL default '1', `privmsgs_enable_html` tinyint(1) NOT NULL default '0', `privmsgs_enable_smilies` tinyint(1) NOT NULL default '1', `privmsgs_attach_sig` tinyint(1) NOT NULL default '1', PRIMARY KEY (`privmsgs_id`), KEY `privmsgs_from_userid` (`privmsgs_from_userid`), KEY `privmsgs_to_userid` (`privmsgs_to_userid`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_privmsgs` -- -- -- Table structure for table `phpbb_privmsgs_text` -- CREATE TABLE `phpbb_privmsgs_text` ( `privmsgs_text_id` mediumint(8) unsigned NOT NULL default '0', `privmsgs_bbcode_uid` varchar(10) NOT NULL default '0', `privmsgs_text` text, PRIMARY KEY (`privmsgs_text_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_privmsgs_text` -- -- -- Table structure for table `phpbb_ranks` -- CREATE TABLE `phpbb_ranks` ( `rank_id` smallint(5) unsigned NOT NULL auto_increment, `rank_title` varchar(50) NOT NULL default '', `rank_min` mediumint(8) NOT NULL default '0', `rank_special` tinyint(1) default '0', `rank_image` varchar(255) default NULL, PRIMARY KEY (`rank_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_ranks` -- INSERT INTO `phpbb_ranks` VALUES (1,'Site Admin',-1,1,NULL); -- -- Table structure for table `phpbb_search_results` -- CREATE TABLE `phpbb_search_results` ( `search_id` int(11) unsigned NOT NULL default '0', `session_id` varchar(32) NOT NULL default '', `search_array` text NOT NULL, PRIMARY KEY (`search_id`), KEY `session_id` (`session_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_search_results` -- INSERT INTO `phpbb_search_results` VALUES (1526261669,'328769abf50e0011e5bd7b254f92dcee','a:7:{s:14:\"search_results\";s:1:\"1\";s:17:\"total_match_count\";i:1;s:12:\"split_search\";N;s:7:\"sort_by\";i:0;s:8:\"sort_dir\";s:4:\"DESC\";s:12:\"show_results\";s:5:\"posts\";s:12:\"return_chars\";i:200;}'); -- -- Table structure for table `phpbb_search_wordlist` -- CREATE TABLE `phpbb_search_wordlist` ( `word_text` varchar(50) binary NOT NULL default '', `word_id` mediumint(8) unsigned NOT NULL auto_increment, `word_common` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`word_text`), KEY `word_id` (`word_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_search_wordlist` -- INSERT INTO `phpbb_search_wordlist` VALUES ('example',1,0); INSERT INTO `phpbb_search_wordlist` VALUES ('post',2,0); INSERT INTO `phpbb_search_wordlist` VALUES ('phpbb',3,0); INSERT INTO `phpbb_search_wordlist` VALUES ('installation',4,0); INSERT INTO `phpbb_search_wordlist` VALUES ('delete',5,0); INSERT INTO `phpbb_search_wordlist` VALUES ('topic',6,0); INSERT INTO `phpbb_search_wordlist` VALUES ('forum',7,0); INSERT INTO `phpbb_search_wordlist` VALUES ('since',8,0); INSERT INTO `phpbb_search_wordlist` VALUES ('everything',9,0); INSERT INTO `phpbb_search_wordlist` VALUES ('seems',10,0); INSERT INTO `phpbb_search_wordlist` VALUES ('working',11,0); INSERT INTO `phpbb_search_wordlist` VALUES ('welcome',12,0); -- -- Table structure for table `phpbb_search_wordmatch` -- CREATE TABLE `phpbb_search_wordmatch` ( `post_id` mediumint(8) unsigned NOT NULL default '0', `word_id` mediumint(8) unsigned NOT NULL default '0', `title_match` tinyint(1) NOT NULL default '0', KEY `post_id` (`post_id`), KEY `word_id` (`word_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_search_wordmatch` -- INSERT INTO `phpbb_search_wordmatch` VALUES (1,1,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,2,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,3,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,4,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,5,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,6,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,7,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,8,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,9,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,10,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,11,0); INSERT INTO `phpbb_search_wordmatch` VALUES (1,12,1); INSERT INTO `phpbb_search_wordmatch` VALUES (1,3,1); -- -- Table structure for table `phpbb_sessions` -- CREATE TABLE `phpbb_sessions` ( `session_id` char(32) NOT NULL default '', `session_user_id` mediumint(8) NOT NULL default '0', `session_start` int(11) NOT NULL default '0', `session_time` int(11) NOT NULL default '0', `session_ip` char(8) NOT NULL default '0', `session_page` int(11) NOT NULL default '0', `session_logged_in` tinyint(1) NOT NULL default '0', `session_admin` tinyint(2) NOT NULL default '0', PRIMARY KEY (`session_id`), KEY `session_user_id` (`session_user_id`), KEY `session_id_ip_user_id` (`session_id`,`session_ip`,`session_user_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_sessions` -- INSERT INTO `phpbb_sessions` VALUES ('fe5e98e6e77622839cadcca85f0cfbb4',2,1134853725,1134853725,'4556fd14',0,1,0); -- -- Table structure for table `phpbb_sessions_keys` -- CREATE TABLE `phpbb_sessions_keys` ( `key_id` varchar(32) NOT NULL default '0', `user_id` mediumint(8) NOT NULL default '0', `last_ip` varchar(8) NOT NULL default '0', `last_login` int(11) NOT NULL default '0', PRIMARY KEY (`key_id`,`user_id`), KEY `last_login` (`last_login`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_sessions_keys` -- -- -- Table structure for table `phpbb_smilies` -- CREATE TABLE `phpbb_smilies` ( `smilies_id` smallint(5) unsigned NOT NULL auto_increment, `code` varchar(50) default NULL, `smile_url` varchar(100) default NULL, `emoticon` varchar(75) default NULL, PRIMARY KEY (`smilies_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_smilies` -- INSERT INTO `phpbb_smilies` VALUES (1,'','icon_biggrin.gif','Very Happy'); INSERT INTO `phpbb_smilies` VALUES (2,':-D','icon_biggrin.gif','Very Happy'); INSERT INTO `phpbb_smilies` VALUES (3,':grin:','icon_biggrin.gif','Very Happy'); INSERT INTO `phpbb_smilies` VALUES (4,'','icon_smile.gif','Smile'); INSERT INTO `phpbb_smilies` VALUES (5,':-)','icon_smile.gif','Smile'); INSERT INTO `phpbb_smilies` VALUES (6,':smile:','icon_smile.gif','Smile'); INSERT INTO `phpbb_smilies` VALUES (7,'','icon_sad.gif','Sad'); INSERT INTO `phpbb_smilies` VALUES (8,':-(','icon_sad.gif','Sad'); INSERT INTO `phpbb_smilies` VALUES (9,':sad:','icon_sad.gif','Sad'); INSERT INTO `phpbb_smilies` VALUES (10,'','icon_surprised.gif','Surprised'); INSERT INTO `phpbb_smilies` VALUES (11,':-o','icon_surprised.gif','Surprised'); INSERT INTO `phpbb_smilies` VALUES (12,':eek:','icon_surprised.gif','Surprised'); INSERT INTO `phpbb_smilies` VALUES (13,':shock:','icon_eek.gif','Shocked'); INSERT INTO `phpbb_smilies` VALUES (14,'','icon_confused.gif','Confused'); INSERT INTO `phpbb_smilies` VALUES (15,':-?','icon_confused.gif','Confused'); INSERT INTO `phpbb_smilies` VALUES (16,'??:','icon_confused.gif','Confused'); INSERT INTO `phpbb_smilies` VALUES (17,'8)','icon_cool.gif','Cool'); INSERT INTO `phpbb_smilies` VALUES (18,'8-)','icon_cool.gif','Cool'); INSERT INTO `phpbb_smilies` VALUES (19,':cool:','icon_cool.gif','Cool'); INSERT INTO `phpbb_smilies` VALUES (20,'','icon_lol.gif','Laughing'); INSERT INTO `phpbb_smilies` VALUES (21,'','icon_mad.gif','Mad'); INSERT INTO `phpbb_smilies` VALUES (22,':-x','icon_mad.gif','Mad'); INSERT INTO `phpbb_smilies` VALUES (23,':mad:','icon_mad.gif','Mad'); INSERT INTO `phpbb_smilies` VALUES (24,'','icon_razz.gif','Razz'); INSERT INTO `phpbb_smilies` VALUES (25,':-P','icon_razz.gif','Razz'); INSERT INTO `phpbb_smilies` VALUES (26,':razz:','icon_razz.gif','Razz'); INSERT INTO `phpbb_smilies` VALUES (27,'','icon_redface.gif','Embarassed'); INSERT INTO `phpbb_smilies` VALUES (28,'','icon_cry.gif','Crying or Very sad'); INSERT INTO `phpbb_smilies` VALUES (29,'','icon_evil.gif','Evil or Very Mad'); INSERT INTO `phpbb_smilies` VALUES (30,'','icon_twisted.gif','Twisted Evil'); INSERT INTO `phpbb_smilies` VALUES (31,'','icon_rolleyes.gif','Rolling Eyes'); INSERT INTO `phpbb_smilies` VALUES (32,':wink:','icon_wink.gif','Wink'); INSERT INTO `phpbb_smilies` VALUES (33,'','icon_wink.gif','Wink'); INSERT INTO `phpbb_smilies` VALUES (34,';-)','icon_wink.gif','Wink'); INSERT INTO `phpbb_smilies` VALUES (35,'','icon_exclaim.gif','Exclamation'); INSERT INTO `phpbb_smilies` VALUES (36,':','icon_question.gif','Question'); INSERT INTO `phpbb_smilies` VALUES (37,'','icon_idea.gif','Idea'); INSERT INTO `phpbb_smilies` VALUES (38,'','icon_arrow.gif','Arrow'); INSERT INTO `phpbb_smilies` VALUES (39,'','icon_neutral.gif','Neutral'); INSERT INTO `phpbb_smilies` VALUES (40,':-|','icon_neutral.gif','Neutral'); INSERT INTO `phpbb_smilies` VALUES (41,':neutral:','icon_neutral.gif','Neutral'); INSERT INTO `phpbb_smilies` VALUES (42,'','icon_mrgreen.gif','Mr. Green'); -- -- Table structure for table `phpbb_themes` -- CREATE TABLE `phpbb_themes` ( `themes_id` mediumint(8) unsigned NOT NULL auto_increment, `template_name` varchar(30) NOT NULL default '', `style_name` varchar(30) NOT NULL default '', `head_stylesheet` varchar(100) default NULL, `body_background` varchar(100) default NULL, `body_bgcolor` varchar(6) default NULL, `body_text` varchar(6) default NULL, `body_link` varchar(6) default NULL, `body_vlink` varchar(6) default NULL, `body_alink` varchar(6) default NULL, `body_hlink` varchar(6) default NULL, `tr_color1` varchar(6) default NULL, `tr_color2` varchar(6) default NULL, `tr_color3` varchar(6) default NULL, `tr_class1` varchar(25) default NULL, `tr_class2` varchar(25) default NULL, `tr_class3` varchar(25) default NULL, `th_color1` varchar(6) default NULL, `th_color2` varchar(6) default NULL, `th_color3` varchar(6) default NULL, `th_class1` varchar(25) default NULL, `th_class2` varchar(25) default NULL, `th_class3` varchar(25) default NULL, `td_color1` varchar(6) default NULL, `td_color2` varchar(6) default NULL, `td_color3` varchar(6) default NULL, `td_class1` varchar(25) default NULL, `td_class2` varchar(25) default NULL, `td_class3` varchar(25) default NULL, `fontface1` varchar(50) default NULL, `fontface2` varchar(50) default NULL, `fontface3` varchar(50) default NULL, `fontsize1` tinyint(4) default NULL, `fontsize2` tinyint(4) default NULL, `fontsize3` tinyint(4) default NULL, `fontcolor1` varchar(6) default NULL, `fontcolor2` varchar(6) default NULL, `fontcolor3` varchar(6) default NULL, `span_class1` varchar(25) default NULL, `span_class2` varchar(25) default NULL, `span_class3` varchar(25) default NULL, `img_size_poll` smallint(5) unsigned default NULL, `img_size_privmsg` smallint(5) unsigned default NULL, PRIMARY KEY (`themes_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_themes` -- INSERT INTO `phpbb_themes` VALUES (1,'subSilver','subSilver','subSilver.css','','E5E5E5','000000','0000FF','800080','FF0000','008000','EFEFEF','DEE3E7','D1D7DC','','','','98AAB1','002277','FFFFFF','cellpic1.gif','cellpic3.gif','cellpic2.jpg','FAFAFA','FFFFFF','','row1','row2','','Verdana, Arial, Helvetica, sans-serif','Trebuchet MS','Courier, \'Courier New\', sans-serif',11,12,12,'444444','006600','FFA34F','','','',NULL,NULL); -- -- Table structure for table `phpbb_themes_name` -- CREATE TABLE `phpbb_themes_name` ( `themes_id` smallint(5) unsigned NOT NULL default '0', `tr_color1_name` char(50) default NULL, `tr_color2_name` char(50) default NULL, `tr_color3_name` char(50) default NULL, `tr_class1_name` char(50) default NULL, `tr_class2_name` char(50) default NULL, `tr_class3_name` char(50) default NULL, `th_color1_name` char(50) default NULL, `th_color2_name` char(50) default NULL, `th_color3_name` char(50) default NULL, `th_class1_name` char(50) default NULL, `th_class2_name` char(50) default NULL, `th_class3_name` char(50) default NULL, `td_color1_name` char(50) default NULL, `td_color2_name` char(50) default NULL, `td_color3_name` char(50) default NULL, `td_class1_name` char(50) default NULL, `td_class2_name` char(50) default NULL, `td_class3_name` char(50) default NULL, `fontface1_name` char(50) default NULL, `fontface2_name` char(50) default NULL, `fontface3_name` char(50) default NULL, `fontsize1_name` char(50) default NULL, `fontsize2_name` char(50) default NULL, `fontsize3_name` char(50) default NULL, `fontcolor1_name` char(50) default NULL, `fontcolor2_name` char(50) default NULL, `fontcolor3_name` char(50) default NULL, `span_class1_name` char(50) default NULL, `span_class2_name` char(50) default NULL, `span_class3_name` char(50) default NULL, PRIMARY KEY (`themes_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_themes_name` -- INSERT INTO `phpbb_themes_name` VALUES (1,'The lightest row colour','The medium row color','The darkest row colour','','','','Border round the whole page','Outer table border','Inner table border','Silver gradient picture','Blue gradient picture','Fade-out gradient on index','Background for quote boxes','All white areas','','Background for topic posts','2nd background for topic posts','','Main fonts','Additional topic title font','Form fonts','Smallest font size','Medium font size','Normal font size (post body etc)','Quote & copyright text','Code text colour','Main table header text colour','','',''); -- -- Table structure for table `phpbb_topics` -- CREATE TABLE `phpbb_topics` ( `topic_id` mediumint(8) unsigned NOT NULL auto_increment, `forum_id` smallint(8) unsigned NOT NULL default '0', `topic_title` char(60) NOT NULL default '', `topic_poster` mediumint(8) NOT NULL default '0', `topic_time` int(11) NOT NULL default '0', `topic_views` mediumint(8) unsigned NOT NULL default '0', `topic_replies` mediumint(8) unsigned NOT NULL default '0', `topic_status` tinyint(3) NOT NULL default '0', `topic_vote` tinyint(1) NOT NULL default '0', `topic_type` tinyint(3) NOT NULL default '0', `topic_first_post_id` mediumint(8) unsigned NOT NULL default '0', `topic_last_post_id` mediumint(8) unsigned NOT NULL default '0', `topic_moved_id` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`topic_id`), KEY `forum_id` (`forum_id`), KEY `topic_moved_id` (`topic_moved_id`), KEY `topic_status` (`topic_status`), KEY `topic_type` (`topic_type`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_topics` -- INSERT INTO `phpbb_topics` VALUES (1,1,'Welcome to phpBB 2',2,972086460,13,0,0,0,0,1,1,0); -- -- Table structure for table `phpbb_topics_watch` -- CREATE TABLE `phpbb_topics_watch` ( `topic_id` mediumint(8) unsigned NOT NULL default '0', `user_id` mediumint(8) NOT NULL default '0', `notify_status` tinyint(1) NOT NULL default '0', KEY `topic_id` (`topic_id`), KEY `user_id` (`user_id`), KEY `notify_status` (`notify_status`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_topics_watch` -- -- -- Table structure for table `phpbb_user_group` -- CREATE TABLE `phpbb_user_group` ( `group_id` mediumint(8) NOT NULL default '0', `user_id` mediumint(8) NOT NULL default '0', `user_pending` tinyint(1) default NULL, KEY `group_id` (`group_id`), KEY `user_id` (`user_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_user_group` -- INSERT INTO `phpbb_user_group` VALUES (1,-1,0); INSERT INTO `phpbb_user_group` VALUES (2,2,0); INSERT INTO `phpbb_user_group` VALUES (3,3,0); INSERT INTO `phpbb_user_group` VALUES (5,5,0); -- -- Table structure for table `phpbb_users` -- CREATE TABLE `phpbb_users` ( `user_id` mediumint(8) NOT NULL default '0', `user_active` tinyint(1) default '1', `username` varchar(25) NOT NULL default '', `user_password` varchar(32) NOT NULL default '', `user_session_time` int(11) NOT NULL default '0', `user_session_page` smallint(5) NOT NULL default '0', `user_lastvisit` int(11) NOT NULL default '0', `user_regdate` int(11) NOT NULL default '0', `user_level` tinyint(4) default '0', `user_posts` mediumint(8) unsigned NOT NULL default '0', `user_timezone` decimal(5,2) NOT NULL default '0.00', `user_style` tinyint(4) default NULL, `user_lang` varchar(255) default NULL, `user_dateformat` varchar(14) NOT NULL default 'd M Y H:i', `user_new_privmsg` smallint(5) unsigned NOT NULL default '0', `user_unread_privmsg` smallint(5) unsigned NOT NULL default '0', `user_last_privmsg` int(11) NOT NULL default '0', `user_emailtime` int(11) default NULL, `user_viewemail` tinyint(1) default NULL, `user_attachsig` tinyint(1) default NULL, `user_allowhtml` tinyint(1) default '1', `user_allowbbcode` tinyint(1) default '1', `user_allowsmile` tinyint(1) default '1', `user_allowavatar` tinyint(1) NOT NULL default '1', `user_allow_pm` tinyint(1) NOT NULL default '1', `user_allow_viewonline` tinyint(1) NOT NULL default '1', `user_notify` tinyint(1) NOT NULL default '1', `user_notify_pm` tinyint(1) NOT NULL default '0', `user_popup_pm` tinyint(1) NOT NULL default '0', `user_rank` int(11) default '0', `user_avatar` varchar(100) default NULL, `user_avatar_type` tinyint(4) NOT NULL default '0', `user_email` varchar(255) default NULL, `user_icq` varchar(15) default NULL, `user_website` varchar(100) default NULL, `user_from` varchar(100) default NULL, `user_sig` text, `user_sig_bbcode_uid` varchar(10) default NULL, `user_aim` varchar(255) default NULL, `user_yim` varchar(255) default NULL, `user_msnm` varchar(255) default NULL, `user_occ` varchar(100) default NULL, `user_interests` varchar(255) default NULL, `user_actkey` varchar(32) default NULL, `user_newpasswd` varchar(32) default NULL, PRIMARY KEY (`user_id`), KEY `user_session_time` (`user_session_time`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_users` -- INSERT INTO `phpbb_users` VALUES (-1,0,'Anonymous','',0,0,0,1133791349,0,0,'0.00',NULL,'','',0,0,0,NULL,0,0,1,1,1,1,0,1,0,1,0,NULL,'',0,'','','','','',NULL,'','','','','','',''); INSERT INTO `phpbb_users` VALUES (2,1,'Admin','ec130918e28b783c8689fd1ec51f73a9',1134853725,0,1134768991,1072936802,1,1,'0.00',1,'english','d M Y h:i a',0,0,0,NULL,0,0,0,1,1,1,1,1,0,1,1,1,'',0,'root@localhost','','http://www.geeklog.net','','',NULL,'','','','','','',''); INSERT INTO `phpbb_users` VALUES (3,1,'Moderator','ec130918e28b783c8689fd1ec51f73a9',0,0,0,1072936803,0,0,'0.00',1,'english','D M d, Y g:i a',0,0,0,NULL,0,1,0,1,1,1,1,1,0,0,1,0,'',0,'moderator','','http://www.geeklog.net','','','','','','','','','',NULL); INSERT INTO `phpbb_users` VALUES (5,1,'jordydme','34a83a90304cf74975873c86dd047294',1133821203,0,1133818193,1133818152,0,0,'0.00',1,'english','D M d, Y g:i a',0,0,0,NULL,0,1,0,1,1,1,1,1,0,0,1,0,'',0,'jordandick@earthlink.net','','','','','','','','','','','',NULL); -- -- Table structure for table `phpbb_vote_desc` -- CREATE TABLE `phpbb_vote_desc` ( `vote_id` mediumint(8) unsigned NOT NULL auto_increment, `topic_id` mediumint(8) unsigned NOT NULL default '0', `vote_text` text NOT NULL, `vote_start` int(11) NOT NULL default '0', `vote_length` int(11) NOT NULL default '0', PRIMARY KEY (`vote_id`), KEY `topic_id` (`topic_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_vote_desc` -- -- -- Table structure for table `phpbb_vote_results` -- CREATE TABLE `phpbb_vote_results` ( `vote_id` mediumint(8) unsigned NOT NULL default '0', `vote_option_id` tinyint(4) unsigned NOT NULL default '0', `vote_option_text` varchar(255) NOT NULL default '', `vote_result` int(11) NOT NULL default '0', KEY `vote_option_id` (`vote_option_id`), KEY `vote_id` (`vote_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_vote_results` -- -- -- Table structure for table `phpbb_vote_voters` -- CREATE TABLE `phpbb_vote_voters` ( `vote_id` mediumint(8) unsigned NOT NULL default '0', `vote_user_id` mediumint(8) NOT NULL default '0', `vote_user_ip` char(8) NOT NULL default '', KEY `vote_id` (`vote_id`), KEY `vote_user_id` (`vote_user_id`), KEY `vote_user_ip` (`vote_user_ip`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_vote_voters` -- -- -- Table structure for table `phpbb_words` -- CREATE TABLE `phpbb_words` ( `word_id` mediumint(8) unsigned NOT NULL auto_increment, `word` char(100) NOT NULL default '', `replacement` char(100) NOT NULL default '', PRIMARY KEY (`word_id`) ) TYPE=MyISAM; -- -- Dumping data for table `phpbb_words` --
Posted on: 12/23/05 01:44pm
By: Anonymous (Turner)
<tr valign="top"> <td align="right"><b>{lang_fullname}</b><br> <small>{lang_fullname_text}</small></td> <td><input type="text" name="fullname" size="60" maxlength="80" value="{fullname_value}"></td> </tr> {customfields}
function custom_usercreate($uid) { global $_TABLES; $grad_year = addslashes(COM_applyFilter($_POST['cust_gradyear'],true)); $fullname = addslashes(COM_applyFilter($_POST['cust_fullname']));
Posted on: 12/23/05 02:14pm
By: jordydme
Parse error: syntax error, unexpected ';' in /home/jordydme/geeklog_data/system/lib-custom.php on line 148
Posted on: 12/23/05 02:32pm
By: Turner
Posted on: 12/23/05 02:48pm
By: jordydme
<?php /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | Geeklog 1.3 | // +---------------------------------------------------------------------------+ // | lib-custom.php | // | Your very own custom Geeklog library. | // | | // | This is the file where you should put all of your custom code. When | // | possible you should not alter lib-common.php but, instead, put code here. | // | This will make upgrading to future versions of Geeklog easier for you | // | because you will always be gauranteed that the Geeklog developers will | // | NOT add code to this file. NOTE: we have already gone through the trouble | // | of making sure that we always include this file when lib-common.php is | // | included some place so you will have access to lib-common.php. It | // | follows then that you should not include lib-common.php in this file | // | | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2005 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Blaine Lang - blaine AT portalparts DOT com | // | Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ // // $Id: lib-custom.php,v 1.11.2.1 2005/10/03 09:24:36 dhaun Exp $ // You can use this global variable to print useful messages to the errorlog // using COM_errorLog(). To see an example of how to do this, look in // lib-common.php and see how $_COM_VERBOSE was used throughout the code $_CST_VERBOSE = false; /** * Sample PHP Block function * * this is a sample function used by a PHP block. This will show the rights that * a user has in the "What you have access to" block. * */ function phpblock_showrights() { global $_RIGHTS, $_CST_VERBOSE; if ($_CST_VERBOSE) { COM_errorLog('**** Inside phpblock_showrights in lib-custom.php ****', 1); } $retval .= ' '; for ($i = 0; $i < count($_RIGHTS); $i++) { $retval .= '<li>' . $_RIGHTS[$i] . '</li>' . LB; } if ($_CST_VERBOSE) { COM_errorLog('**** Leaving phpblock_showrights in lib-custom.php ****', 1); } return $retval; } /*** * * Get Bent() * * Php function to tell you how if your site is grossly insecure * **/ function phpblock_getBent() { global $_CONF, $_TABLES; $secure = true; $retval = ''; $secure_msg = 'Could not find any gross insecurities in your site. Do not take this '; $secure_msg .= 'as meaning your site is 100% secure, as no site ever is. I can only '; $secure_msg .= 'check things that should be blatantly obvious.'; $insecure_msg = ''; // we don't have the path to the admin directory, so try to figure it out // from $_CONF['site_admin_url'] $adminurl = $_CONF['site_admin_url']; if (strrpos ($adminurl, '/') == strlen ($adminurl)) { $adminurl = substr ($adminurl, 0, -1); } $pos = strrpos ($adminurl, '/'); if ($pos === false) { // only guessing ... $installdir = $_CONF['path_html'] . 'admin/install'; } else { $installdir = $_CONF['path_html'] . substr ($adminurl, $pos + 1) . '/install'; } if (is_dir ($installdir)) { $insecure_msg .= '<p>You should really remove the install directory <b>' . $installdir .'</b> once you have your site up and running without any errors.'; $insecure_msg .= ' Keeping it around would allow malicious users the ability to destroy your current install, take over your site, or retrieve sensitive information.'; $secure = false; } // check to see if any account still has 'password' as its password. $count = DB_query("select count(*) as count from {$_TABLES['users']} where passwd='" . md5('password') . "'"); $A = DB_fetchArray($count); if ( $A['count'] > 0 ) { $secure = false; $insecure_msg .= '<p>You still have not changed the default password from "password" on ' . $A['count'] . ' account(s). '; $insecure_msg .= 'This will allow people to do serious harm to your site!'; } if ($secure) { $retval = $secure_msg; } else { $retval = $insecure_msg; } $retval = wordwrap($retval,20,' ',1); return $retval; } /* Create any new records in additional tables you may have added */ /* Update any fields in the core GL tables for this user as needed */ /* Called when user is first created */ function custom_usercreate($uid) { global $_TABLES; $grad_year = addslashes(COM_applyFilter($_POST['cust_gradyear'],true)); $fullname = addslashes(COM_applyFilter($_POST['cust_fullname'])); // Ensure all data is prepared correctly before inserts, quotes may need to be escaped with addslashes() DB_query("INSERT INTO {$_TABLES['localuserinfo']} (uid,grad_year) VALUES ('$uid', '$grad_year')"); DB_query("UPDATE {$_TABLES['users']} SET fullname = '$fullname' WHERE uid='$uid'"); return true; } // Delete user record from custom user info table function custom_userdelete($uid) { global $_TABLES; DB_query("DELETE FROM {$_TABLES['localuserinfo']} WHERE uid='$uid'"); return true; } /* Called from users.php - when user is displaying a member profile */ /* This function will return any extra fields that need to be shown */ /* Output is then replaced in {customfields) -- This variable needs to be added to your templates */ /* Template: path_layout/users/profile/profile.thtml */ function custom_userdisplay($uid) { global $_CONF,$_TABLES; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td>' . $fullname .'</td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td>' . $grad_year .'</td> </tr>'; return $retval; } /* Function called when editing user profile. */ /* Called from usersettings.php - when user is eding their own profile */ /* and from admin/user.php when admin is editing a member profile */ /* This function will return any extra fields that need to be shown for editing */ /* Output is then replaced in {customfields} -- This variable needs to be added to your templates */ /* User: path_layout/preferences/profile.thtml and Admin: path_layout/admin/user/edituser.thtml */ function custom_useredit($uid) { global $_TABLES,$_CONF; $grad_year = DB_getItem($_TABLES['localuserinfo'], "grad_year", "uid='$uid'"); $fullname = DB_getItem($_TABLES['users'], "fullname", "uid='$uid'"); $retval .= '<tr> <td align="right"><b>Full Name:</b></td> <td><input type="text" name="cust_fullname" size="50" value="' . $fullname .'"></td> </tr>'; $retval .= '<tr> <td align="right"><b>Graduation Year:</b></td> <td><input type="text" name="cust_gradyear" size="5" maxlength="4" value="' . $grad_year .'"></td> </tr>'; $retval .= '<tr><td colspan="2"><hr></td></tr>'; return $retval; } /* Function called when saving the user profile. */ function custom_usersave($uid) { global $_TABLES; $grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = COM_applyFilter($_POST['fullname']); DB_query("UPDATE {$_TABLES['users']} SET fullname='$fullname' WHERE uid='$uid'"); if ($grad_year > 0) { DB_query("UPDATE {$_TABLES['localuserinfo']} SET grad_year='$grad_year' WHERE uid='$uid'"); } } /* Main Form used for Custom membership when member is registering */ function custom_userform($uid="",$msg="") { global $_CONF,$_TABLES, $LANG04; if (!empty($msg)) { $retval .= COM_startBlock($LANG04[21]) . $msg . COM_endBlock(); } $post_url = $_CONF['site_url']."/users.php"; $postmode = "create"; $submitbutton = '<input type="submit" value="Register Now!">'; $passwd_input = ""; $message = "<br><font color=black><b>Please complete the application below. Once you have completed the application, click the Submit button and the application will be processed immediately.</b></font>"; $A=array(); $user_templates = new Template ($_CONF['path_layout'] . 'custom'); $user_templates->set_file('memberdetail', 'memberdetail.thtml'); $user_templates->set_var('layout_url', $_CONF['layout_url']); $user_templates->set_var('post_url', $post_url); $user_templates->set_var('startblock', COM_startBlock("Custom Registration Example")); $user_templates->set_var('message', $message); $user_templates->set_var('USERNAME', "Username"); $user_templates->set_var('USERNAME_HELP', "Name to be used when accessing this site"); $user_templates->set_var('username', $A['username']); $user_templates->set_var('passwd_input', $passwd_input); $user_templates->set_var('EMAIL', "Email Address"); $user_templates->set_var('EMAIL_HELP', "Valid email address"); $user_templates->set_var('email', $A['email']); $user_templates->set_var('FULLNAME', "Full Name"); $user_templates->set_var('FULLNAME_HELP', "First and Last Name"); $user_templates->set_var('fullname', $A['fullname']); $user_templates->set_var('GRADYEAR', "Graduation Year"); $user_templates->set_var('GRADYEAR_HELP', "That big year!"); $user_templates->set_var('grad_year', ""); $user_templates->set_var('user_id', $user); $user_templates->set_var('postmode', $postmode); $user_templates->set_var('submitbutton', $submitbutton); $user_templates->set_var('endblock', COM_endBlock()); $user_templates->parse('output', 'memberdetail'); $retval .= $user_templates->finish($user_templates->get_var('output')); return $retval; } /** * Check if it's okay to create a new user. * * Geeklog is about to create a new user with the given username and email * address. This is the custom code's last chance to prevent that, * e.g. to check if all required data has been entered. * * @param string $username username that Geeklog would use for the new user* @param string $email email address of that user * @return string an error message or an empty string for "OK" * */ function custom_usercheck ($username, $email) { $msg = ''; // Example, check that the full name has been entered // and complain if it's missing if (empty ($_POST['fullname'])) { $msg = 'Please enter your full name!'; } return $msg; } /** * Custom function to retrieve and return a formatted list of blocks * Can be used when calling COM_siteHeader or COM_SiteFooter * Example: * 1: Setup an array of blocks to display * 2: Call COM_siteHeader or COM_siteFooter * * $myblocks = array ('site_menu','site_news','poll_block'); * COM_siteHeader( array('COM_showCustomBlocks',$myblocks) ) ; * COM_siteFooter( true, array('COM_showCustomBlocks',$myblocks)); * @param array $showblocks An array of block names to retrieve and format * @return string Formated HTML containing site footer and optionally right blocks */ function custom_showBlocks($showblocks) { global $_CONF, $_TABLES; $retval = ''; foreach($showblocks as $block) { $sql = "SELECT bid, name,type,title,content,rdfurl,phpblockfn,help FROM {$_TABLES['blocks']} WHERE name='$block'"; $result = DB_query($sql); if (DB_numRows($result) == 1) { $A = DB_fetchArray($result); $retval .= COM_formatBlock($A); } } return $retval; } /** * This is an example of a custom email function. When this function is NOT * commented out, Geeklog would send all emails through this function * instead of sending them through COM_mail in lib-common.php. * * This is basically a re-implementation of the way emails were sent * prior to Geeklog 1.3.9 (Geeklog uses PEAR::Mail as of version 1.3.9). * */ /* function CUSTOM_mail($to, $subject, $message, $from = '', $html = false, $priority = 0) { global $_CONF, $LANG_CHARSET; if (empty ($LANG_CHARSET)) { $charset = $_CONF['default_charset']; if (empty ($charset)) { $charset = 'iso-8859-1'; } } else { $charset = $LANG_CHARSET; } if (empty ($from)) { $from = $_CONF['site_name'] . ' <' . $_CONF['site_mail'] . '>'; } $headers = 'From: ' . $from . "\r\n" . 'X-Mailer: Geeklog ' . VERSION . "\r\n"; if ($priority > 0) { $headers .= 'X-Priority: ' . $priority . "\r\n"; } if ($html) { $headers .= "Content-Type: text/html; charset={$charset}\r\n" . 'Content-Transfer-Encoding: 8bit'; } else { $headers .= "Content-Type: text/plain; charset={$charset}"; } return mail ($to, $subject, $message, $headers); } */ /** * This is an example of a function that returns menu entries to be used for * the 'custom' entry in $_CONF['menu_elements'] (see config.php). * */ /* function CUSTOM_menuEntries () { global $_CONF, $_USER; $myentries = array (); // Sample link #1: Link to Gallery $myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/', 'label' => 'Gallery'); // Sample link #2: Link to the Personal Calendar - only visible for // logged-in users if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) { $myentries[] = array ('url' => $_CONF['site_url'] . '/calendar.php?mode=personal', 'label' => 'My Calendar'); } return $myentries; } */ ?>
{start_block_profile} <form action="{site_url}/usersettings.php" method="POST" {enctype}> <table border="0" cellspacing="0" cellpadding="3"> {username_option} <tr valign="top"> <td align="right"><b>{lang_fullname}</b><br> <small>{lang_fullname_text}</small></td> <td><input type="text" name="fullname" size="60" maxlength="80" value="{fullname_value}"></td> </tr> {customfields} <tr valign="top"> <td align="right"><b>{lang_password}</b><br> <small>{lang_password_text}</small></td> <td><input type="password" name="passwd" size="32" maxlength="32" value="{password_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_cooktime}</b><br> <small>{lang_cooktime_text}</small></td> <td>{cooktime_selector}</td> </tr> <tr valign="top"> <td align="right"><b>{lang_email}</b><br> <small>{lang_email_text}</small></td> <td><input type="text" name="email" size="60" maxlength="96" value="{email_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_homepage}</b><br> <small>{lang_homepage_text}</small></td> <td><input type="text" name="homepage" size="60" maxlength="96" value="{homepage_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_location}</b><br> <small>{lang_location_text}</small></td> <td><input type="text" name="location" size="60" maxlength="96" value="{location_value}"></td> </tr> <tr valign="top"> <td align="right"><b>{lang_signature}</b><br> <small>{lang_signature_text}</small></td> <td><textarea name="sig" cols="60" rows="4">{signature_value}</textarea></td> </tr> {userphoto_option} <tr valign="top"> <td align="right"><b>{lang_about}</b><br> <small>{lang_about_text}</small></td> <td><textarea name="about" cols="60" rows="6">{about_value}</textarea></td> </tr> {customfields} <tr valign="top"> <td align="center" colspan="2"> <input type="hidden" name="uid" value="{uid_value}"> <input type="hidden" name="mode" value="saveuser"> <input type="hidden" name="username" value="{username_value}"> <input type="submit" value="{lang_submit}"> </td> </tr> </table> </form> {end_block} {delete_account_option}
Posted on: 12/23/05 03:02pm
By: Turner
$grad_year = COM_applyFilter($_POST['cust_gradyear'],true); $fullname = addslashes(COM_applyFilter($_POST['fullname']));
Posted on: 12/23/05 03:14pm
By: jordydme
Posted on: 12/23/05 04:35pm
By: samstone
Posted on: 12/23/05 04:48pm
By: jordydme
Posted on: 12/23/05 05:21pm
By: samstone
Posted on: 12/23/05 06:14pm
By: jordydme
Posted on: 12/23/05 06:39pm
By: Blaine
Posted on: 12/23/05 09:26pm
By: jordydme
Posted on: 12/23/05 09:36pm
By: Blaine
Posted on: 12/23/05 09:48pm
By: jordydme
Posted on: 12/27/05 03:34pm
By: tesn
Posted on: 12/27/05 10:05pm
By: Anonymous (Jordy)
Posted on: 01/06/06 06:32pm
By: Anonymous (jnordquist)
Posted on: 02/10/06 02:13am
By: Anonymous (Toby)
function custom_userform($uid="",$msg="")
function custom_userform($msg)
Posted on: 02/10/06 02:23am
By: jordydme
Posted on: 06/25/06 08:31pm
By: Frlitz
Posted on: 06/30/06 01:54pm
By: Dirk
Posted on: 08/26/06 05:59am
By: Anonymous (Ancona5)
Posted on: 09/04/06 11:48am
By: gtgillis
if ( stristr( $email, '@mistacronks.com' ) ){ $msg = 'Due to the number of spam accounts created using this domain, we dont accept registration from <b>mistacronks.com</b>. If you would still like to sign up, either use a different email address or contact us. We apologize for any inconvenience.'; COM_mail ("myemailaddress@mysite.com", "Email Address from mistacronks.com","nRegistration from mistacronks.com attempted", "DO_NOT_REPLY@mysite.net"); }
Posted on: 11/12/06 03:39pm
By: JRGilliam
Posted on: 11/15/06 08:17pm
By: Anonymous (Will)
Posted on: 11/15/06 09:24pm
By: Anonymous (Jordy)
Posted on: 11/15/06 09:51pm
By: Anonymous (Will)
Posted on: 02/07/07 08:02am
By: Anonymous (Eddy)
Posted on: 11/30/07 05:34am
By: geegee1
Posted on: 04/17/08 04:37pm
By: slug
Posted on: 05/28/08 02:00pm
By: luizcruz
These are Blaine's instructions below:
Posted on: 05/11/09 01:46am
By: Anonymous (schneider)
Posted on: 05/11/09 01:56am
By: Dirk
I want to put a random letter/number gen checker on my registration page to stop spam log ins how do I go about this? I assume it can be done since it's on this site... (any plugins which may help in the long run?)
Posted on: 05/23/09 01:14am
By: Anonymous (Rob)
Posted on: 05/23/09 02:43am
By: Dirk
Where can I find an example of the code to insert into my webpage to run geeklog?
Posted on: 06/11/10 09:41am
By: Anonymous (Paul Lowe)
Posted on: 06/11/10 09:47am
By: gtgillis
I'm very new to all this, so possibly a silly question but what exactly does Geeklog do?
Posted on: 07/07/11 02:23am
By: Anonymous (janny)