Browse Source

移除不必要的代码

master
llgoer 1 month ago
parent
commit
1ea9eee90e
5 changed files with 5 additions and 110 deletions
  1. +0
    -8
      src/dede/member_do.php
  2. +1
    -9
      src/dede/member_pmall.php
  3. +3
    -32
      src/include/memberlogin.class.php
  4. +1
    -1
      src/install/sql-dfdata.txt
  5. +0
    -60
      src/install/sql-dftables.txt

+ 0
- 8
src/dede/member_do.php View File

@@ -186,14 +186,6 @@ function __EditUser()
$rs = $dsql->ExecuteNoneQuery2($query);
}
#api{{
if (defined('UC_API') && @include_once DEDEROOT . '/api/uc.func.php') {
$row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='$id' AND `matt`<>10");
$amount = $scores - $row['scores'];
uc_credit_note($row['userid'], $amount);
}
#/aip}}
ShowMsg('成功更改会员资料!', 'member_view.php?id=' . $id);
exit();
}


+ 1
- 9
src/dede/member_pmall.php View File

@@ -30,15 +30,7 @@ if ($action == "post") {
exit();
}
#api{{
if (defined('UC_API') && @include_once DEDEROOT . '/uc_client/client.php') {
uc_pm_send(0, '', $subject, $message);
ShowMsg('短信已成功发送', '-1');
exit;
}
#/aip}}
$rs = $dsql->ExecuteNoneQuery("INSERT INTO #@__member_pms(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');");
$rs = $dsql->ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');");
ShowMsg('短信已成功发送', '-1');
exit();
}


+ 3
- 32
src/include/memberlogin.class.php View File

@@ -59,24 +59,6 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = TRUE)
return 'ok';
}
/**
* 保存一则消息记录
*
* @access public
* @param string $mid 用户MID
* @param string $mid 用户ID
* @param string $msg 保存消息
* @return string
*/
function PutSnsMsg($mid, $userid, $msg)
{
global $dsql;
$msg = addslashes($msg);
$query = "INSERT INTO `#@__member_snsmsg`(`mid`, `userid`, `sendtime`, `msg`) VALUES('$mid', '$userid', '" . time() . "', '$msg'); ";
$rs = $dsql->ExecuteNoneQuery($query);
return $rs;
}
/**
* 检查用户是否被禁言
*
@@ -160,26 +142,15 @@ class MemberLogin
if ($cache) {
$this->fields = GetCache($this->memberCache, $this->M_ID);
if (empty($this->fields)) {
$this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
$this->fields = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$this->M_ID}' ");
} else {
$formcache = TRUE;
}
} else {
$this->fields = $dsql->GetOne("Select * From `#@__member` where mid='{$this->M_ID}' ");
$this->fields = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$this->M_ID}' ");
}
if (is_array($this->fields)) {
#api{{
if (defined('UC_API') && @include_once DEDEROOT . '/uc_client/client.php') {
if ($data = uc_get_user($this->fields['userid'])) {
if (uc_check_avatar($data[0]) && !strstr($this->fields['face'], UC_API)) {
$this->fields['face'] = UC_API . '/avatar.php?uid=' . $data[0] . '&size=middle';
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET `face`='" . $this->fields['face'] . "' WHERE `mid`='{$this->M_ID}'");
}
}
}
#/aip}}
//间隔一小时更新一次用户登录时间
if (time() - $this->M_LoginTime > 3600) {
$dsql->ExecuteNoneQuery("update `#@__member` set logintime='" . time() . "',loginip='" . GetIP() . "' where mid='" . $this->fields['mid'] . "';");
@@ -193,7 +164,7 @@ class MemberLogin
$this->M_Face = $this->fields['face'];
$this->M_Rank = $this->fields['rank'];
$this->M_Spacesta = $this->fields['spacesta'];
$sql = "Select titles From #@__scores where integral<={$this->fields['scores']} order by integral desc";
$sql = "SELECT titles From `#@__scores` WHERE integral<={$this->fields['scores']} ORDER BY integral DESC";
$scrow = $dsql->GetOne($sql);
$this->fields['honor'] = $scrow['titles'];
$this->M_Honor = $this->fields['honor'];


+ 1
- 1
src/install/sql-dfdata.txt View File

@@ -1,5 +1,5 @@
INSERT INTO `#@__admintype` VALUES('1','信息发布员','1','t_AccList a_AccNew a_AccList a_MyList a_MyEdit a_MyDel sys_MdPwd sys_Feedback sys_MyUpload plus_留言簿模块 '),
('5','频道管理员','1','t_AccList t_AccNew t_AccEdit t_AccDel a_AccNew a_AccList a_AccEdit a_AccDel a_AccCheck a_MyList a_MyEdit a_MyDel a_MyCheck co_AddNote co_EditNote co_PlayNote co_ListNote co_ViewNote spec_New spec_List spec_Edit sys_MdPwd sys_Log sys_ArcTj sys_Source sys_Writer sys_Keyword sys_MakeHtml sys_Feedback sys_Upload sys_MyUpload member_List member_Edit plus_站内新闻发布 plus_友情链接模块 plus_留言簿模块 plus_投票模块 plus_广告管理 '),
('5','频道管理员','1','t_AccList t_AccNew t_AccEdit t_AccDel a_AccNew a_AccList a_AccEdit a_AccDel a_AccCheck a_MyList a_MyEdit a_MyDel a_MyCheck spec_New spec_List spec_Edit sys_MdPwd sys_Log sys_ArcTj sys_Source sys_Writer sys_Keyword sys_MakeHtml sys_Feedback sys_Upload sys_MyUpload member_List member_Edit plus_站内新闻发布 plus_友情链接模块 plus_留言簿模块 plus_投票模块 plus_广告管理 '),
('10','超级管理员','1','admin_AllowAll ');
INSERT INTO `#@__arcatt` VALUES('5','s','滚动'),


+ 0
- 60
src/install/sql-dftables.txt View File

@@ -326,48 +326,6 @@ CREATE TABLE `#@__channeltype` (
KEY `nid` (`nid`,`isshow`,`arcsta`,`sendrank`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__co_htmls`;
CREATE TABLE `#@__co_htmls` (
`aid` mediumint(8) unsigned NOT NULL auto_increment,
`nid` mediumint(8) unsigned NOT NULL default '0',
`typeid` smallint(5) unsigned NOT NULL default '0',
`title` varchar(60) NOT NULL default '',
`litpic` varchar(100) NOT NULL default '',
`url` varchar(100) NOT NULL default '',
`dtime` int(10) unsigned NOT NULL default '0',
`isdown` tinyint(1) unsigned NOT NULL default '0',
`isexport` tinyint(1) NOT NULL default '0',
`result` mediumtext,
PRIMARY KEY (`aid`),
KEY `nid` (`nid`),
KEY `typeid` (`typeid`,`title`,`url`,`dtime`,`isdown`,`isexport`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__co_mediaurls`;
CREATE TABLE `#@__co_mediaurls` (
`nid` mediumint(8) unsigned NOT NULL default '0',
`hash` char(32) NOT NULL default '',
`tofile` char(60) NOT NULL default '',
KEY `hash` (`hash`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__co_note`;
CREATE TABLE `#@__co_note` (
`nid` mediumint(8) unsigned NOT NULL auto_increment,
`channelid` smallint(5) unsigned NOT NULL default '0',
`notename` varchar(50) NOT NULL default '',
`sourcelang` varchar(10) NOT NULL default 'gb2312',
`uptime` int(10) unsigned NOT NULL default '0',
`cotime` int(10) unsigned NOT NULL default '0',
`pnum` smallint(5) unsigned NOT NULL default '0',
`isok` tinyint(1) unsigned NOT NULL default '0',
`usemore` tinyint(1) unsigned NOT NULL default '0',
`listconfig` text,
`itemconfig` text,
PRIMARY KEY (`nid`),
KEY `isok` (`isok`,`channelid`,`cotime`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__co_onepage`;
CREATE TABLE `#@__co_onepage` (
`id` int(11) NOT NULL auto_increment,
@@ -380,14 +338,6 @@ CREATE TABLE `#@__co_onepage` (
KEY `url` (`url`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__co_urls`;
CREATE TABLE `#@__co_urls` (
`id` int(10) unsigned NOT NULL auto_increment,
`hash` varchar(32) NOT NULL default '',
`nid` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__diyforms`;
CREATE TABLE `#@__diyforms` (
`diyid` int(10) unsigned NOT NULL auto_increment,
@@ -663,16 +613,6 @@ CREATE TABLE `#@__member_pms` (
KEY `sendtime` (`sendtime`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__member_snsmsg`;
CREATE TABLE `#@__member_snsmsg` (
`id` int(10) unsigned NOT NULL auto_increment,
`mid` mediumint(8) unsigned NOT NULL default '0',
`userid` varchar(20) NOT NULL,
`sendtime` int(10) unsigned NOT NULL default '0',
`msg` varchar(250) NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
DROP TABLE IF EXISTS `#@__member_space`;
CREATE TABLE `#@__member_space` (
`mid` mediumint(8) unsigned NOT NULL default '0',


Loading…
Cancel
Save