1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Latest batch of global bashing and notice removal, remove unneeded files

This commit is contained in:
e107steved 2009-12-18 20:49:56 +00:00
parent 17b98ac017
commit 716ddc3c58
14 changed files with 106 additions and 228 deletions

View File

@ -9,9 +9,9 @@
* General purpose file
*
* $Source: /cvs_backup/e107_0.8/class2.php,v $
* $Revision: 1.169 $
* $Date: 2009-12-15 11:05:16 $
* $Author: e107coders $
* $Revision: 1.170 $
* $Date: 2009-12-18 20:49:54 $
* $Author: e107steved $
*
*/
//
@ -2126,7 +2126,7 @@ function __autoload($className)
case 'plugin':
array_shift($tmp);
// folder 'includes' is not part of the class name
if (!$tmp[0]) return; // In case we get an empty class part
if (!isset($tmp[0]) || !$tmp[0]) return; // In case we get an empty class part
$tmp[0] = $tmp[0].'/includes';
$filename = e_PLUGIN.implode('/', $tmp).'.php';
//TODO add debug screen Auto-loaded classes - ['plugin: '.$filename.' - '.$className];

View File

@ -1,11 +1,11 @@
<?php
/* $Id: plugin.php,v 1.2 2009-09-03 01:27:27 e107coders Exp $ */
/* $Id: plugin.php,v 1.3 2009-12-18 20:49:54 e107steved Exp $ */
function plugin_shortcode($parm)
function plugin_shortcode($parm = '')
{
global $sql, $tp, $ns;
$tp = e107::getParser();
list($menu,$return) = explode("|",$parm);
list($menu,$return) = explode('|',$parm.'|');
$path = $tp -> toDB(dirname($menu));
$name = $tp -> toDB(basename($menu));
@ -14,5 +14,8 @@ function plugin_shortcode($parm)
{
$path = $menu;
}
/**
* @todo: $mode not defined
*/
return e107::getMenu()->renderMenu($path,$name,$mode,$return);
}

View File

@ -9,9 +9,9 @@
*
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/sitelinks_class.php,v $
* $Revision: 1.26 $
* $Date: 2009-11-23 10:27:43 $
* $Author: e107coders $
* $Revision: 1.27 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
if (!defined('e107_INIT')) { exit; }
@ -314,16 +314,23 @@ class sitelinks
function hilite($link,$enabled='')
/**
* Determine whether link highlighting needs to be active
*
* @param string $link - the full link as stored in the DB
* @param boolean $enabled - TRUE if the link is enabled
*
* @return boolean TRUE if link to be highlighted, FALSE if not
*/
function hilite($link,$enabled = FALSE)
{
global $PLUGINS_DIRECTORY,$tp,$pref;
if(!$enabled){ return FALSE; }
$link = $tp->replaceConstants($link, '', TRUE); // The link saved in the DB
$tmp = explode("?",$link);
$link_qry = (isset($tmp[1])) ? $tmp[1] : "";
$link_slf = (isset($tmp[0])) ? $tmp[0] : "";
$tmp = explode('?',$link);
$link_qry = (isset($tmp[1])) ? $tmp[1] : '';
$link_slf = (isset($tmp[0])) ? $tmp[0] : '';
$link_pge = basename($link_slf);
$link_match = (empty($tmp[0])) ? "": strpos(e_SELF,$tmp[0]); // e_SELF is the actual displayed page
@ -338,7 +345,7 @@ function hilite($link,$enabled='')
// ----------- highlight overriding - set the link matching in the page itself.
if(defined("HILITE"))
if(defined('HILITE'))
{
if(strpos($link,HILITE))
{
@ -435,35 +442,43 @@ function hilite($link,$enabled='')
}
// --------------- highlight for Custom Pages.----------------
// eg. page.php?1
// eg. page.php?1, or page.php?5.7 [2nd parameter is page # within item]
if (strpos($link, "page.php?") !== FALSE && strpos(e_SELF,"/page.php")) {
list($custom,$page) = explode(".",$link_qry);
list($q_custom,$q_page) = explode(".",e_QUERY);
if($custom == $q_custom){
//echo "Link: {$link}, link query: {$link_qry}, e_SELF: ".e_SELF.", link_slf: {$link_slf}, link_pge: {$link_pge}, e_PAGE: ".e_PAGE."<br />";
if (($link_slf == e_HTTP.'page.php') && (e_PAGE == 'page.php'))
{
list($custom,$page) = explode('.',$link_qry.'.');
list($q_custom,$q_page) = explode('.',e_QUERY.'.');
if($custom == $q_custom)
{
return TRUE;
}else{
}
else
{
return FALSE;
}
}
// --------------- highlight default ----------------
if(strpos($link, "?") !== FALSE){
if(strpos($link, '?') !== FALSE)
{
$thelink = str_replace("../", "", $link);
if(!preg_match("/all|item|cat|list/", e_QUERY) && (empty($link) == false) && (strpos(e_SELF, str_replace("../", "",$link)) !== false)){
return true;
}
}
if(!preg_match("/all|item|cat|list/", e_QUERY) && (strpos(e_SELF, str_replace("../", "",$link)) !== false)){
if(!preg_match("/all|item|cat|list/", e_QUERY) && (strpos(e_SELF, str_replace("../", "",$link)) !== false))
{
return true;
}
if((!$link_qry && !e_QUERY) && (empty($link) == FALSE) && (strpos(e_SELF,$link) !== FALSE)){
if((!$link_qry && !e_QUERY) && (empty($link) == FALSE) && (strpos(e_SELF,$link) !== FALSE))
{
return TRUE;
}
if(($link_slf == e_SELF && !link_qry) || (e_QUERY && empty($link) == FALSE && strpos(e_SELF."?".e_QUERY,$link)!== FALSE) ){
if(($link_slf == e_SELF && !link_qry) || (e_QUERY && empty($link) == FALSE && strpos(e_SELF."?".e_QUERY,$link)!== FALSE) )
{
return TRUE;
}

View File

@ -9,9 +9,9 @@
*
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/user_select_class.php,v $
* $Revision: 1.8 $
* $Date: 2009-11-18 01:04:43 $
* $Author: e107coders $
* $Revision: 1.9 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
if (!defined("e_THEME")) {
@ -80,9 +80,10 @@ class user_select {
return $text;
}
function select_form($type, $user_form, $user_value = '', $class_form = false, $class_value = '', $class = false) {
function select_form($type, $user_form, $user_value = '', $class_form = false, $class_value = '', $class = false)
{
global $tp;
$text .= "<script type='text/javascript'>
$text = "<script type='text/javascript'>
<!--
function uc_switch(uctype) {
document.getElementById(uctype).value = '';
@ -176,14 +177,15 @@ class user_select {
$text = "<form action='".e_SELF."?".e_QUERY."' method='POST'>
<table style='width:100%' class='fborder'>
<tr>
<td class='forumheader3' style='text-align: center'><input type='text' name='srch' class='tbox' value='".$tp -> post_toForm($_POST['srch'])."' size='40'>
<td class='forumheader3' style='text-align: center'><input type='text' name='srch' class='tbox' value='".$tp -> post_toForm(varset($_POST['srch'],''))."' size='40'>
<input class='button' type='submit' name='dosrch' class='tbox' value='".US_LAN_6."' /></td>
</tr>
</table>
</form>
";
if ($_POST['dosrch']) {
if (isset($_POST['dosrch']))
{
$userlist = $this -> findusers($_POST['srch']);
if($userlist == FALSE)
{

View File

@ -9,8 +9,8 @@
* Event calendar plugin - large calendar display
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar.php,v $
* $Revision: 1.7 $
* $Date: 2009-11-22 10:11:28 $
* $Revision: 1.8 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
@ -71,7 +71,7 @@ if (e_QUERY)
$qs = explode('.', e_QUERY); // Get date from query
$dateArray = getdate($qs[0]);
}
if (!is_array($dateArray))
if (!isset($dateArray))
{ // Show current month
$dateArray = $ecal_class->cal_date;
}

View File

@ -9,14 +9,19 @@
* Forthcoming events menu handler for event calendar
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/calendar_menu.php,v $
* $Revision: 1.7 $
* $Date: 2009-11-22 10:11:28 $
* $Revision: 1.8 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
if (!defined('e107_INIT')) { exit; }
$e107 = e107::getInstance();
if (!$e107->isInstalled('calendar_menu')) return '';
if (!isset($ecal_class))
{
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$ecal_class = new ecal_class;
}
// See if the page is already in the cache
$cache_tag = 'nq_event_cal_cal';
if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time))
@ -25,11 +30,6 @@ if($cacheData = $e107->ecache->retrieve($cache_tag, $ecal_class->max_cache_time)
return;
}
global $pref;
if (!is_object($ecal_class))
{
require_once(e_PLUGIN.'calendar_menu/ecal_class.php');
$ecal_class = new ecal_class;
}
include_lan(e_PLUGIN.'calendar_menu/languages/'.e_LANGUAGE.'.php');
// Doesn't use shortcodes - rather a specific format for that

View File

@ -9,8 +9,8 @@
* Event calendar - generate lists
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/calendar_menu/ec_pf_page.php,v $
* $Revision: 1.8 $
* $Date: 2009-12-06 10:45:49 $
* $Revision: 1.9 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
/*
@ -40,6 +40,7 @@ $ecal_class = new ecal_class;
e107::getScParser();
require_once(e_PLUGIN.'calendar_menu/calendar_shortcodes.php');
setScVar('event_calendar_shortcodes', 'ecalClass', &$ecal_class); // Give shortcodes a pointer to calendar class
$message = '';
unset($ec_qs);
@ -115,7 +116,7 @@ if (!isset($ec_qs[0]) || !isset($ec_qs[1]))
</tr><tr>
<td class='forumheader3'>".EC_LAN_155."</td>
<td class='forumheader3' style='text_align:center'>";
$cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}',FALSE,$calendar_shortcodes);
$cal_text .= $e107->tp->parseTemplate('{EC_NAV_CATEGORIES=nosubmit}',TRUE);
$cal_text .= "</td>
</tr>";
if (isset($EVENT_CAL_PDF_NAMES) && is_array($EVENT_CAL_PDF_NAMES) && (count($EVENT_CAL_PDF_NAMES) > 1))

View File

@ -1,13 +1,13 @@
<?php
/*
* Copyright (c) e107 Inc 2009 - e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: English_admin_featurebox.php,v 1.5 2009-12-12 16:35:46 secretr Exp $
* $Id: English_admin_featurebox.php,v 1.6 2009-12-18 20:49:55 e107steved Exp $
*
* Featurebox back-end laguage defines
* TODO - cleanup constants not in use
*/
define("FBLAN_01", "Feature Box");
//define("FBLAN_01", "Feature Box");
define("FBLAN_02", "This plugin allows you to display a box above your news items with features / whatever you like in it. The messages can either be revolved randomly or dynamically faded.");
define("FBLAN_03", "Configure feature box");
define("FBLAN_04", "Feature Box plugin has been successfully installed. To add messages and configure, return to the main admin page and click on the feature box icon in the plugin section.");

View File

@ -9,8 +9,8 @@
* PM plugin - main user interface
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm.php,v $
* $Revision: 1.15 $
* $Date: 2009-12-17 22:47:20 $
* $Revision: 1.16 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
@ -20,7 +20,7 @@
*
* @package e107_plugins
* @subpackage pm
* @version $Id: pm.php,v 1.15 2009-12-17 22:47:20 e107steved Exp $;
* @version $Id: pm.php,v 1.16 2009-12-18 20:49:55 e107steved Exp $;
*/
@ -240,19 +240,20 @@ class pm_extended extends private_message
$pm_info['pm_read'] = $now;
$this->pm_mark_read($pmid, $pm_info);
}
$txt .= $this->e107->tp->parseTemplate($PM_SHOW, true);
$txt = $this->e107->tp->parseTemplate($PM_SHOW, true);
$this->e107->ns->tablerender(LAN_PM, $txt);
if (!$comeFrom)
{
if ($pm_info['pm_from'] == USERID) { $comeFrom = 'outbox'; }
}
// Need to show inbox or outbox from start
if ($comeFrom == 'outbox')
{ // Show Outbox
$this->e107->ns->tablerender(LAN_PM." - ".LAN_PM_26, $this->show_outbox($pm_proc_id), 'PM');
$this->e107->ns->tablerender(LAN_PM." - ".LAN_PM_26, $this->show_outbox(), 'PM');
}
else
{ // Show Inbox
$this->e107->ns->tablerender(LAN_PM." - ".LAN_PM_25, $this->show_inbox($pm_proc_id), 'PM');
$this->e107->ns->tablerender(LAN_PM.' - '.LAN_PM_25, $this->show_inbox(), 'PM');
}
}
@ -306,7 +307,7 @@ class pm_extended extends private_message
return LAN_PM_12;
}
$pm_info = pm_getInfo('outbox');
$pm_info = $this->pmManager->pm_getInfo('outbox');
if($pm_info['outbox']['total'] != $_POST['numsent'])
{
return LAN_PM_14;
@ -392,9 +393,9 @@ class pm_extended extends private_message
$totalsize += $_FILES['file_userfile']['size'][$fid];
}
if(intval($this->pmPrefs['pm_limit']) > 0)
if(intval($this->pmPrefs['pm_limits']) > 0)
{
if($this->pmPrefs['pm_limit'] == '1')
if($this->pmPrefs['pm_limits'] == '1')
{
if($pm_info['outbox']['total'] == $pm_info['outbox']['limit'])
{
@ -443,7 +444,7 @@ class pm_extended extends private_message
*/
function pm_user_lookup()
{
global $sql;
$sql = e107::getDb();
$query = "SELECT * FROM #user WHERE user_name REGEXP '^".$_POST['keyword']."' ";
if($sql -> db_Select_gen($query))

View File

@ -9,8 +9,8 @@
* PM plugin - base class API
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_class.php,v $
* $Revision: 1.11 $
* $Date: 2009-12-17 22:47:20 $
* $Revision: 1.12 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
@ -20,7 +20,7 @@
*
* @package e107_plugins
* @subpackage pm
* @version $Id: pm_class.php,v 1.11 2009-12-17 22:47:20 e107steved Exp $;
* @version $Id: pm_class.php,v 1.12 2009-12-18 20:49:55 e107steved Exp $;
*/
if (!defined('e107_INIT')) { exit; }
@ -109,10 +109,12 @@ class private_message
*/
function add($vars)
{
$tp = $this->e107->tp;
$vars['options'] = '';
$pmsize = 0;
$attachlist = '';
$pm_options = '';
$ret = '';
if(isset($vars['receipt']) && $vars['receipt']) {$pm_options .= '+rr+'; }
if(isset($vars['uploaded']))
{
@ -128,8 +130,8 @@ class private_message
}
$pmsize += strlen($vars['pm_message']);
$pm_subject = trim($this->e107->tp->toDB($vars['pm_subject']));
$pm_message = trim($this->e107->tp->toDB($vars['pm_message']));
$pm_subject = trim($tp->toDB($vars['pm_subject']));
$pm_message = trim($tp->toDB($vars['pm_message']));
if (!$pm_subject && !$pm_message && !$attachlist)
{ // Error - no subject, no message body and no uploaded files
@ -161,7 +163,7 @@ class private_message
{
$toclass .= $u['user_name'].", ";
}
if(check_class($pm_prefs['notify_class'], $u['user_class']))
if(check_class($this->pmPrefs['notify_class'], $u['user_class']))
{
$vars['to_info'] = $u;
$this->pm_send_notify($u['user_id'], $vars, $pmid, count($a_list));
@ -182,7 +184,7 @@ class private_message
{
if($pmid = $this->e107->sql->db_Insert('private_msg', "0, '".intval($vars['from_id'])."', '".$tp -> toDB($vars['to_info']['user_id'])."', '".intval($sendtime)."', '0', '{$pm_subject}', '{$pm_message}', '0', '0', '".$tp -> toDB($attachlist)."', '".$tp -> toDB($pm_options)."', '".intval($pmsize)."'"))
{
if(check_class($pm_prefs['notify_class'], $vars['to_info']['user_class']))
if(check_class($this->pmPrefs['notify_class'], $vars['to_info']['user_class']))
{
set_time_limit(30);
$this->pm_send_notify($vars['to_info']['user_id'], $vars, $pmid, count($a_list));
@ -499,11 +501,11 @@ class private_message
$limit = intval($limit);
if ($limit < 2) { $limit = 10; }
$from = intval($from);
if($total_messages = $this->e107->sql->db_Count("private_msg", "(*)", "WHERE pm_to='{$uid}' AND pm_read_del=0"))
if($total_messages = $this->e107->sql->db_Count('private_msg', '(*)', "WHERE pm_to='{$uid}' AND pm_read_del=0"))
{
$qry = "
SELECT pm.*, u.user_image, u.user_name FROM #private_msg AS pm
LEFT JOIN #user AS u ON u.user_id = pm.pm_from
SELECT pm.*, u.user_image, u.user_name FROM `#private_msg` AS pm
LEFT JOIN `#user` AS u ON u.user_id = pm.pm_from
WHERE pm.pm_to='{$uid}' AND pm.pm_read_del=0
ORDER BY pm.pm_sent DESC
LIMIT ".$from.", ".$limit."
@ -511,8 +513,8 @@ class private_message
if($this->e107->sql->db_Select_gen($qry))
{
$ret['messages'] = $this->e107->sql->db_getList();
$ret['total_messages'] = $total_messages;
}
$ret['total_messages'] = $total_messages; // Should always be defined
return $ret;
}
return FALSE;

View File

@ -9,8 +9,8 @@
* Private messenger plugin - default preferences (used if no stored values)
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_default.php,v $
* $Revision: 1.3 $
* $Date: 2009-12-17 22:47:20 $
* $Revision: 1.4 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
@ -22,7 +22,7 @@
*
* @package e107_plugins
* @subpackage pm
* @version $Id: pm_default.php,v 1.3 2009-12-17 22:47:20 e107steved Exp $;
* @version $Id: pm_default.php,v 1.4 2009-12-18 20:49:55 e107steved Exp $;
*/
if (!defined('e107_INIT')) { exit; }
@ -45,7 +45,8 @@ function pm_set_default_prefs()
'attach_size' => 500,
'sendall_class' => e_UC_ADMIN,
'multi_class' => e_UC_ADMIN,
'allow_userclass' => '1'
'allow_userclass' => '1',
'pm_limits' => '0'
);
return $ret;
}

View File

@ -9,8 +9,8 @@
* PM plugin - template file
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_template.php,v $
* $Revision: 1.8 $
* $Date: 2009-12-17 22:47:20 $
* $Revision: 1.9 $
* $Date: 2009-12-18 20:49:55 $
* $Author: e107steved $
*/
@ -20,15 +20,15 @@
*
* @package e107_plugins
* @subpackage pm
* @version $Id: pm_template.php,v 1.8 2009-12-17 22:47:20 e107steved Exp $;
* @version $Id: pm_template.php,v 1.9 2009-12-18 20:49:55 e107steved Exp $;
*/
if (!defined('e107_INIT')) { exit; }
global $sc_style;
global $sc_style; // Needed for the PM_REPLY shortcode!
define('PM_READ_ICON', "<img src='".e_PLUGIN_ABS."/pm/images/read.png' class='icon S16' alt='".LAN_PM_111."' />");
define('PM_UNREAD_ICON', "<img src='".e_PLUGIN_ABS."/pm/images/unread.png' class='icon S16' alt='".LAN_PM_27."' />");
if (!defined('PM_READ_ICON')) define('PM_READ_ICON', "<img src='".e_PLUGIN_ABS."/pm/images/read.png' class='icon S16' alt='".LAN_PM_111."' />");
if (!defined('PM_UNREAD_ICON')) define('PM_UNREAD_ICON', "<img src='".e_PLUGIN_ABS."/pm/images/unread.png' class='icon S16' alt='".LAN_PM_27."' />");
$sc_style['PM_ATTACHMENT_ICON']['pre'] = " ";

View File

@ -1,109 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_update.php,v $
* $Revision: 1.5 $
* $Date: 2009-11-18 01:05:53 $
* $Author: e107coders $
*/
if (!defined('e107_INIT')) { exit; }
set_time_limit(300);
include_lan(e_PLUGIN."pm/languages/admin/".e_LANGUAGE.".php");
$sql->db_Update("plugin", "plugin_name=".ADLAN_PM." WHERE plugin_path='pm'");
require_once(e_HANDLER.'plugin_class.php');
$plugin = new e107plugin;
$sql -> db_Select_gen("
CREATE TABLE ".MPREFIX."private_msg (
pm_id int(10) unsigned NOT NULL auto_increment,
pm_from int(10) unsigned NOT NULL default '0',
pm_to varchar(250) NOT NULL default '',
pm_sent int(10) unsigned NOT NULL default '0',
pm_read int(10) unsigned NOT NULL default '0',
pm_subject text NOT NULL,
pm_text text NOT NULL,
pm_sent_del tinyint(1) unsigned NOT NULL default '0',
pm_read_del tinyint(1) unsigned NOT NULL default '0',
pm_attachments text NOT NULL,
pm_option varchar(250) NOT NULL default '',
pm_size int(10) unsigned NOT NULL default '0',
PRIMARY KEY (pm_id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;");
$sql -> db_Select_gen("
CREATE TABLE ".MPREFIX."private_msg_block (
pm_block_id int(10) unsigned NOT NULL auto_increment,
pm_block_from int(10) unsigned NOT NULL default '0',
pm_block_to int(10) unsigned NOT NULL default '0',
pm_block_datestamp int(10) unsigned NOT NULL default '0',
pm_block_count int(10) unsigned NOT NULL default '0',
PRIMARY KEY (pm_block_id)
) TYPE=MyISAM AUTO_INCREMENT=1 ;");
//$plugin -> manage_plugin_prefs('add', 'plug_sc', 'pm', 'SENDPM'); // Obsolete pref
pm_convert();
function pm_convert()
{
global $sql, $uinfo;
$sql2 =& new db;
$count = 0;
if($sql->db_Select("pm_messages","*"))
{
while($row = $sql->db_Fetch())
{
$from = pm_convert_uid($row['pm_from_user']);
$to = pm_convert_uid($row['pm_to_user']);
$size = strlen($row['pm_message']);
if($sql2->db_Insert("private_msg", "0, '".intval($from)."', '{$to}', '".intval($row['pm_sent_datestamp'])."', '".intval($row['pm_rcv_datestamp'])."', '{$row['pm_subject']}', '{$row['pm_message']}', '0', '0', '', '', '".intval($size)."'"))
{
//Insertion of new PM successful, delete old
$sql2->db_Delete("pm_messages", "pm_id='{$row['pm_id']}'");
$count++;
}
}
}
}
function pm_convert_uid($name)
{
global $uinfo, $tp;
$sqlu =& new db;
$name = trim($name);
if(!array_key_exists($uinfo[$name]))
{
if($sqlu->db_Select("user", "user_id", "user_name LIKE '".$tp -> todb($name, TRUE)."'"))
{
$row = $sqlu->db_Fetch();
$uinfo[$name] = $row['user_id'];
}
else
{
if($sqlu->db_Select("user", "user_id", "user_loginname LIKE '".$tp -> todb($name, TRUE)."'"))
{
$row = $sqlu->db_Fetch();
$uinfo[$name] = $row['user_id'];
}
else
{
return FALSE;
}
}
}
return $uinfo[$name];
}
?>

View File

@ -1,38 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/pm_update_check.php,v $
* $Revision: 1.3 $
* $Date: 2009-11-18 01:05:53 $
* $Author: e107coders $
*/
if (!defined('e107_INIT')) { exit; }
include_lan(e_PLUGIN."pm/languages/admin/".e_LANGUAGE.".php");
$dbupdatep['pm_07'] = LAN_UPDATE_8." .617 ".ADLAN_PM_58." ".LAN_UPDATE_9." .7 ".ADLAN_PM_58;
function update_pm_07($type) {
global $sql, $mySQLdefaultdb;
if ($type == 'do') {
include_once(e_PLUGIN.'pm/pm_update.php');
} else {
if ($sql -> db_Select("plugin", "*", "plugin_path = 'pm_menu' AND plugin_installflag='1'")) {
if ($sql -> db_Count('pm_messages', '(*)')) {
return FALSE;
} else {
return TRUE;
}
} else {
return TRUE;
}
}
}
?>