language目录,仅仅两个文件
lang_cp.php
此为语言包,修改了一些称呼上的瑕疵
找- 'invite_subject' => '\\1邀请你加入\\2,并成为TA的好友',
复制代码 替换成- 'invite_subject' => '\\1邀请您加入\\2,并成为TA的好友',
复制代码 找- <h3>Hi,我是\\2,在\\3上建立了个人主页,请你也加入并成为我的好友</h3><br>
复制代码 替换- <h3>Hi,我是\\2,在\\3上建立了个人主页,邀请您也加入并成为我的好友</h3><br>
复制代码 找- 'feed_mtag_add' => '{actor} 创建了新群组 {mtags}',
复制代码 上方添加- 'app_invite_subject' => '\\1邀请您加入\\2,一起来玩\\3',
- 'app_invite_massage' => '<table border="0">
- <tr>
- <td valign="top">\\1</td>
- <td valign="top">
- <h3>Hi,我是\\2,在\\3上玩 \\7,邀请您也加入一起玩</h3><br>
- <br>
- 邀请附言:<br>
- \\4
- <br><br>
- <strong>请你点击以下链接,接受好友邀请一起玩\\7:</strong><br>
- <a href="\\5">\\5</a><br>
- <br>
- <strong>如果你拥有\\3上面的账号,请点击以下链接查看我的个人主页:</strong><br>
- <a href="\\6">\\6</a><br>
- </td></tr></table>',
复制代码 找- 'apply_mtag_manager' => '想申请成为 <a href="\\1">\\2</a> 的群主,理由如下:\\3。<a href="\\1">(点击这里进入管理)</a>',
复制代码 替换- 'apply_mtag_manager' => '想申请成为 <a href="\\1" target="_blank">\\2</a> 的群主,理由如下:\\3。<a href="\\1" target="_blank">(点击这里进入管理)</a>',
复制代码 --------------------------------------------华丽的分割线----------------------------------------------------
lang_showmessage.php
找- 'send_result_3' => '未找到相应的邀请记录, 邮件重发失败.',
复制代码 下方添加- 'there_is_no_record_of_invitation_specified' => '您指定的邀请记录不存在',
复制代码 ==============================================
==============================================
==============================================
source/cron目录
cleanfeed.php
找- if($_SCONFIG['feedday'] < 7) $_SCONFIG['feedday'] = 7;
复制代码 替换- if($_SCONFIG['feedday'] < 3) $_SCONFIG['feedday'] = 3;
复制代码 找- $_SGLOBAL['db']->query("DELETE FROM ".tname('feed')." WHERE dateline < '$deltime'");
复制代码 替换- $_SGLOBAL['db']->query("DELETE FROM ".tname('feed')." WHERE uid>'0' AND dateline < '$deltime'");
复制代码 ----------------------------------------华丽的分割线------------------------------------------
source目录 这个目录修改的相对较多
cp_album.php
找- $album = $albums[$_POST['moveto']];
- //更新图片
- updatetable('pic', array('albumid'=>$_POST['moveto']), array('albumid'=>$albumid));
- $_SGLOBAL['db']->query("UPDATE ".tname('album')." SET picnum=picnum+$album[picnum] WHERE albumid='$albumid'");
- //更新封面
- album_update_pic($albumid);
复制代码 替换- $album = $albums[$albumid];
- //更新图片
- updatetable('pic', array('albumid'=>$_POST['moveto']), array('albumid'=>$albumid));
- $_SGLOBAL['db']->query("UPDATE ".tname('album')." SET picnum=picnum+$album[picnum], updatetime='$_SGLOBAL[timestamp]' WHERE albumid='$_POST[moveto]'");
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_blog.php
找- //判断是否发布太快
- $waittime = interval_check('post');
- if($waittime > 0) {
- showmessage('operating_too_fast','',1,array($waittime));
- }
复制代码 下方添加- //接收外部标题
- $blog['subject'] = empty($_GET['subject'])?'':getstr($_GET['subject'], 80, 1, 0);
- $blog['message'] = empty($_GET['message'])?'':getstr($_GET['message'], 5000, 1, 0);
复制代码 找- //添加编辑操作
- if(submitcheck('blogsubmit')) {
复制代码 下方添加- if(empty($blog['blogid'])) $blog = array();
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_common.php
找- ssetcookie('closefeedbox', 1, 3600);//关闭1个小时
复制代码 替换- ssetcookie('closefeedbox', 1);
-
- } elseif($op == 'changetpl') {
-
- $dir = empty($_GET['name'])?'':str_replace('.','', trim($_GET['name']));
- if($dir && file_exists(S_ROOT.'./template/'.$dir.'/style.css')) {
- ssetcookie('mytemplate', $dir, 3600*24*365);//长期有效
- }
- showmessage('do_success', 'space.php?do=feed', 0);
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_credit.php
找- //feed
- feed_add('show', cplang('feed_showcredit'), array(
- 'fusername'=>"<a href="space.php?uid=$fuid">$_POST[fusername]</a>",
- 'credit'=>$showcredit));
复制代码 替换- //实名
- realname_set($fuid, $_POST['fusername']);
- realname_get();
-
- //feed
- feed_add('show', cplang('feed_showcredit'), array(
- 'fusername'=>"<a href="space.php?uid=$fuid">{$_SN[$fuid]}</a>",
- 'credit'=>$showcredit));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_doing.php
找- //通知
- if($updo['uid'] != $_SGLOBAL['supe_uid']) {
- $note = cplang('note_doing_reply', array("space.php?do=doing&doid=$updo[doid]"));
- notification_add($updo['uid'], 'doing', $note);
- }
- $_POST['refer'] = preg_replace("/(#.*?)$/", '', $_POST['refer'])."#dl{$updo[doid]}";
- showmessage('do_success', $_POST['refer'], 0);
复制代码 替换- //通知
- if($updo['uid'] != $_SGLOBAL['supe_uid']) {
- $note = cplang('note_doing_reply', array("space.php?do=doing&doid=$updo[doid]&highlight=$newid"));
- notification_add($updo['uid'], 'doing', $note);
- }
- $_POST['refer'] = preg_replace("/((\#|\&highlight|\-highlight|\.html).*?)$/", '', $_POST['refer']);
- if(strexists($_POST['refer'], '?')) {
- $_POST['refer'] .= "&highlight={$newid}#dl{$updo[doid]}";
- } else {
- $_POST['refer'] .= "-highlight-{$newid}.html#dl{$updo[doid]}";
- }
- showmessage('do_success', $_POST['refer'], 0);
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_invite.php
找- $pay_invite = creditrule('pay', 'invite');
- $get_invite = creditrule('get', 'invite');
- $invite_code = '';
- if(empty($pay_invite)) {
- $invite_code = space_key($space);
- }
复制代码 替换- $pay_invite = creditrule('pay', 'invite');
- $get_invite = creditrule('get', 'invite');
- $appid = empty($_GET['app']) ? 0 : intval($_GET['app']);
- $inviteapp = $invite_code = '';
- if(empty($pay_invite) || $appid) {
- $pay_invite = 0;
- $invite_code = space_key($space, $appid);
- }
复制代码 找替换- $spaceurl,
- ''
- );
- //取出相应的应用
- $appinfo = array();
- if($appid) {
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('myapp')." WHERE appid='$appid'");
- $appinfo = $_SGLOBAL['db']->fetch_array($query);
- if($appinfo) {
- $inviteapp = "&app=$appid";
- $mailvar[6] = $appinfo['appname'];
- } else {
- $appid = 0;
- }
- }
复制代码 找- $mails = array_unique(explode("\n", $_POST['email']));
复制代码 替换- $mails = array_unique(explode(",", $_POST['email']));
复制代码 找- $mailvar[4] = "{$siteurl}invite.php?{$id}{$code}";
复制代码 替换- $mailvar[4] = "{$siteurl}invite.php?{$id}{$code}{$inviteapp}";
复制代码 找- $mailvar[4] = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code";
复制代码 替换- $mailvar[4] = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code{$inviteapp}";
- if($appid) {
- $mailvar[6] = $appinfo['appname'];
- }
复制代码 找- showmessage('send_result_2', '', 1, array(implode(', ', $failingmail)));
复制代码 替换- showmessage('send_result_2', '', 1, array(implode('<br>', $failingmail)));
复制代码 找- showmessage('send_result_3');
- }
- }
复制代码 下方添加- }elseif($_GET['op'] == 'delete') {
-
- $id = $_GET['id'] ? intval($_GET['id']) : 0;
- if(empty($id)) {
- showmessage('there_is_no_record_of_invitation_specified');
- }
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('invite')." WHERE id='$id' AND uid='$_SGLOBAL[supe_uid]'");
- if($value = $_SGLOBAL['db']->fetch_array($query)) {
- if(submitcheck('deletesubmit')) {
- $_SGLOBAL['db']->query("DELETE FROM ".tname('invite')." WHERE id='$id'");
- showmessage('do_success', $_POST['refer']);
- }
- } else {
- showmessage('there_is_no_record_of_invitation_specified');
- }
复制代码 找- $inviteurl = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code";
复制代码 替换- $inviteurl = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code{$inviteapp}";
复制代码 找- $mailvar[4] = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code";
复制代码 替换- $mailvar[4] = "{$siteurl}invite.php?u=$space[uid]&c=$invite_code{$inviteapp}";
复制代码 找- $actives = array('invite'=>' class="active"');
- }
- include template('cp_invite');
- function createmail($mail, $mailvar) {
- global $_SGLOBAL, $_SCONFIG, $space, $_SN;
-
- $mailvar[3] = empty($_POST['saymsg'])?'':getstr($_POST['saymsg'], 500);
- smail(0, $mail, cplang('invite_subject', array($_SN[$space['uid']], $_SCONFIG['sitename'])), cplang('invite_massage', $mailvar));
- }
复制代码 替换- $uri = $_SERVER['REQUEST_URI']?$_SERVER['REQUEST_URI']:($_SERVER['PHP_SELF']?$_SERVER['PHP_SELF']:$_SERVER['SCRIPT_NAME']);
- $uri = substr($uri, 0, strrpos($uri, '/')+1);
- $actives = array('invite'=>' class="active"');
- }
- include template('cp_invite');
- function createmail($mail, $mailvar) {
- global $_SGLOBAL, $_SCONFIG, $space, $_SN, $appinfo;
-
- $mailvar[3] = empty($_POST['saymsg'])?'':getstr($_POST['saymsg'], 500);
- smail(0, $mail, cplang($appinfo ? 'app_invite_subject' : 'invite_subject', array($_SN[$space['uid']], $_SCONFIG['sitename'], $appinfo['appname'])), cplang($appinfo ? 'app_invite_massage' : 'invite_massage', $mailvar));
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_mtag.php
找- $_SGLOBAL['profield'] = array();
复制代码 替换- $fieldarr = $_SGLOBAL['profield'] = array();
复制代码 找- $fields = $_SGLOBAL['profield'];
复制代码 替换- $fields = $_SGLOBAL['profield'];
- //选择已创建的选择性群主
- $existmtag = array();
- if($fieldarr) {
- $query = $_SGLOBAL['db']->query("SELECT field.tagname FROM ".tname('tagspace')." main LEFT JOIN ".tname('mtag')." field ON field.fieldid IN('".implode("','", $fieldarr)."') AND field.tagid=main.tagid WHERE main.uid='$_SGLOBAL[supe_uid]' ORDER BY main.grade DESC");
- while($value = $_SGLOBAL['db']->fetch_array($query)) {
- $existmtag[] = $value['tagname'];
- }
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_pm.php
找- $jumpurl = "space.php?do=pm&subop=view&touid=$touid&daterange=$daterange";
复制代码 删除之
找- showmessage('do_success', "space.php?do=pm&subop=view&touid=$touid&daterange=$daterange");
复制代码 替换- showmessage('do_success', "space.php?do=pm&filter=privatepm");
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_poke.php
找- } else {
- //打招呼
- $list = array();
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('poke')." WHERE uid='$space[uid]' ORDER BY dateline DESC");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- $value['uid'] = $value['fromuid'];
- $value['username'] = $value['fromusername'];
- realname_set($value['uid'], $value['username']);
- $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
- $list[] = $value;
- }
- }
复制代码 替换- } else {
-
- $perpage = 20;
- $page = empty($_GET['page'])?0:intval($_GET['page']);
- if($page<1) $page = 1;
- $start = ($page-1)*$perpage;
- //检查开始数
- ckstart($start, $perpage);
-
- //打招呼
- $list = array();
- $count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('poke')." WHERE uid='$space[uid]'"), 0);
- if($count) {
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('poke')." WHERE uid='$space[uid]' ORDER BY dateline DESC LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- $value['uid'] = $value['fromuid'];
- $value['username'] = $value['fromusername'];
- realname_set($value['uid'], $value['username']);
- $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
- $list[] = $value;
- }
- }
- $multi = multi($count, $perpage, $page, "cp.php?ac=poke");
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
cp_share.php
找- if(!empty($matches[1][0])) {
复制代码 替换- if(1 > preg_match("/\/index_([\w\-]+)\.html/", $link) && !empty($matches[1][0])) {
复制代码 ----------------------------------------华丽的分割线------------------------------------------
do_login.php
找删除之
找- //成为好友
- include_once(S_ROOT.'./source/function_cp.php');
- invite_update($invitearr['id'], $setarr['uid'], $setarr['username'], $invitearr['uid'], $invitearr['username'], $app);
复制代码 下方添加- }
-
- //判断用户是否设置了头像
- $setarr = array();
- $avatar_exists = ckavatar($space['uid']);
- if($avatar_exists) {
- if(!$space['avatar']) {
- $setarr['avatar'] = 1;
- $setarr['updatetime'] = $_SGLOBAL['timestamp'];
- }
- } else {
- if($space['avatar']) {
- $setarr['avatar'] = 0;
- }
- }
- if($setarr) {
- updatetable('space', $setarr, array('uid'=>$space['uid']));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
do_lostpasswd.php
找- uc_user_edit(addslashes($space['username']), $_POST['newpasswd1'], $_POST['newpasswd1'], $space['email'], 1);
- updatetable('spacefield', array('authstr'=>''), array('uid'=>$uid));
复制代码 替换- if(uc_user_edit(addslashes($space['username']), $_POST['newpasswd1'], $_POST['newpasswd1'], $space['email'], 1)>0) {
- updatetable('spacefield', array('authstr'=>''), array('uid'=>$uid));
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_admincp.php
找- //生成站点key
- function mksitekey() {
- global $_SERVER, $_SC, $_SGLOBAL;
复制代码 上方添加- //检查是否操作创始人
- function ckfounder($uid) {
- global $_SC;
-
- $founders = empty($_SC['founder'])?array():explode(',', $_SC['founder']);
- return in_array($uid, $founders);
- }
复制代码 找- 'spacenum' => getcount('space', array()),
复制代码 替换- 'spacenum' => $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('space')." WHERE updatetime>0"), 0),
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_blog.php
找替换- if(!empty($olds['uid'])) {
复制代码 找替换----------------------------------------华丽的分割线------------------------------------------
function_common.php
找替换- global $_SCONFIG, $_SGLOBAL;
复制代码 找- $tpl = "template/$_SC[template]/$name";
复制代码 替换- $tpl = "template/$_SCONFIG[template]/$name";
复制代码 找替换找- @$submktime = filemtime(S_ROOT.'./'.$subfile.'.htm');
复制代码 替换- $tplfile = S_ROOT.'./'.$subfile.'.htm';
- if(!file_exists($tplfile)) {
- $tplfile = str_replace('/'.$_SCONFIG['template'].'/', '/default/', $tplfile);
- }
- @$submktime = filemtime($tplfile);
复制代码 找- if($_SCONFIG['close'] && !checkperm('closeignore')) {
复制代码 替换- if($_SCONFIG['close'] && !ckfounder($_SGLOBAL['supe_uid']) && !checkperm('closeignore')) {
复制代码 找- if((!ipaccess($_SCONFIG['ipaccess']) || ipbanned($_SCONFIG['ipbanned'])) && !checkperm('closeignore')) {
复制代码 替换- if((!ipaccess($_SCONFIG['ipaccess']) || ipbanned($_SCONFIG['ipbanned'])) && !ckfounder($_SGLOBAL['supe_uid']) && !checkperm('closeignore')) {
复制代码 找替换- global $_SGLOBAL, $_SN, $_SCONFIG;
复制代码 找- $feed['title_template'] = str_replace($searchs, $replaces, $feed['title_template']);
复制代码 替换- $feed['title_template'] = mktarget(str_replace($searchs, $replaces, $feed['title_template']));
复制代码 找- $feed['body_template'] = str_replace($searchs, $replaces, $feed['body_template']);
- //icon
- if($feed['appid']) {
- $feed['icon_image'] = "image/icon/{$feed['icon']}.gif";
- } else {
- $feed['icon_image'] = "http://appicon.manyou.com/icons/{$feed['icon']}";
- }
- return $feed;
- }
复制代码 替换- $feed['body_template'] = mktarget(str_replace($searchs, $replaces, $feed['body_template']));
- $feed['body_general'] = mktarget($feed['body_general']);
-
- //icon
- if($feed['appid']) {
- $feed['icon_image'] = "image/icon/{$feed['icon']}.gif";
- } else {
- $feed['icon_image'] = "http://appicon.manyou.com/icons/{$feed['icon']}";
- }
-
- //阅读
- $feed['style'] = $feed['target'] = '';
- if($_SCONFIG['feedread']) {
- $read_feed_ids = empty($_COOKIE['read_feed_ids'])?array():explode(',',$_COOKIE['read_feed_ids']);
- if($read_feed_ids && in_array($feed['feedid'], $read_feed_ids)) {
- $feed['style'] = " class="feedread"";
- } else {
- $feed['style'] = " onclick="readfeed(this, $feed[feedid]);"";
- }
- }
- if($_SCONFIG['feedtargetblank']) {
- $feed['target'] = ' target="_blank"';
- }
-
- return $feed;
- }
- //整理feed的链接
- function mktarget($html) {
- global $_SCONFIG;
-
- if($html && $_SCONFIG['feedtargetblank']) {
- $html = preg_replace("/<a(.+?)href=([\'"]?)([^>\s]+)\\2([^>]*)>/i", '<a target="_blank" \\1 href="\\3" \\4>', $html);
- }
- return $html;
- }
复制代码 页面最后的上方添加- }
- //检查是否操作创始人
- function ckfounder($uid) {
- global $_SC;
-
- $founders = empty($_SC['founder'])?array():explode(',', $_SC['founder']);
- if($uid && $founders) {
- return in_array($uid, $founders);
- } else {
- return false;
- }
- }
- //获取目录
- function sreaddir($dir, $extarr=array()) {
- $dirs = array();
- if($dh = opendir($dir)) {
- while (($file = readdir($dh)) !== false) {
- if(!empty($extarr) && is_array($extarr)) {
- if(in_array(strtolower(fileext($file)), $extarr)) {
- $dirs[] = $file;
- }
- } else if($file != '.' && $file != '..') {
- $dirs[] = $file;
- }
- }
- closedir($dh);
- }
- return $dirs;
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_cp.php
找- function stream_save($strdata, $albumid = 0, $fileext = 'jpg') {
复制代码 替换- function stream_save($strdata, $albumid = 0, $fileext = 'jpg', $name='', $title='', $delsize=0) {
复制代码 找- if($space['attachsize'] + $size > $maxattachsize + $space['addsize']) {
- @unlink($newfilename);
- return false;
- }
- }
-
- //检查是否图片
- if(function_exists('getimagesize') && !@getimagesize($newfilename)) {
- @unlink($newfilename);
- return false;
复制代码 替换- if($space['attachsize'] + $size - $delsize > $maxattachsize + $space['addsize']) {
- @unlink($newfilename);
- return -1;
- }
- }
-
- //检查是否图片
- if(function_exists('getimagesize') && !@getimagesize($newfilename)) {
- @unlink($newfilename);
- return -2;
复制代码 找- $filename = addslashes(substr(strrchr($filepath, '/'), 1));
- $title = '';
复制代码 替换- $filename = addslashes(($name ? $name : substr(strrchr($filepath, '/'), 1)));
- $title = $title;
复制代码 找- return $setarr;
- } else {
- fclose($handle);
- }
- }
- return false;
复制代码 替换- $siteurl = '';
- if(empty($setarr['remote'])) {
- $uri = $_SERVER['REQUEST_URI']?$_SERVER['REQUEST_URI']:($_SERVER['PHP_SELF']?$_SERVER['PHP_SELF']:$_SERVER['SCRIPT_NAME']);
- $siteurl = 'http://'.$_SERVER['HTTP_HOST'].substr($uri, 0, strexists($uri, '/api') ? (strrpos($uri, '/')-3):(strrpos($uri, '/')+1));
- }
- $setarr['filepathall'] = $siteurl.mkpicurl($setarr, 0);
- return $setarr;
- } else {
- fclose($handle);
- }
- }
- return -3;
复制代码 找- //获取目录
- function sreaddir($dir, $extarr=array()) {
- $dirs = array();
- if($dh = opendir($dir)) {
- while (($file = readdir($dh)) !== false) {
- if(!empty($extarr) && is_array($extarr)) {
- if(in_array(strtolower(fileext($file)), $extarr)) {
- $dirs[] = $file;
- }
- } else if($file != '.' && $file != '..') {
- $dirs[] = $file;
- }
- }
- closedir($dh);
- }
- return $dirs;
- }
复制代码 删除之
找- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('friend')." WHERE uid='$uid' AND status='1' ORDER BY num DESC, dateline ASC");
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('friend')." WHERE uid='$uid' AND status='1' ORDER BY num DESC, dateline DESC");
复制代码 找- if($friendstatus < 1) {
- friend_update($uid, $username, $m_uid, $m_username, 'invite');
- //更新积分
- $getcredit = creditrule('get', 'invite');
- if($getcredit) {
- $_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit+$getcredit WHERE uid='$m_uid'");
- }
复制代码 替换- if($friendstatus < 1) {
-
- friend_update($uid, $username, $m_uid, $m_username, 'invite');
-
- //查找邀请记录
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('invite')." WHERE uid='$m_uid' AND fuid='$uid'");
- if($oldinvite = $_SGLOBAL['db']->fetch_array($query)) {
- //已经邀请过
- return false;
- }
-
- //奖励积分
- $getcredit = creditrule('get', 'invite');
- $_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit+$getcredit WHERE uid='$m_uid'");
复制代码 找- $count = getcount('invite', array('uid'=>$m_uid, 'fuid'=>$uid));
- if(!$count) {
- $setarr['uid'] = $m_uid;
- inserttable('invite', $setarr);//插入邀请记录
- }
复制代码 替换- $setarr['uid'] = $m_uid;
- inserttable('invite', $setarr, 0, true);//插入邀请记录
复制代码 找替换- if($touid && $_SCONFIG['sendmailday']) {
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_ftp.php
找- if(!($ftpconnid = sftp_connect())) {
- return 0;
复制代码 替换- if(empty($_SGLOBAL['ftpconnid']) && !($_SGLOBAL['ftpconnid'] = sftp_connect())) {
- return 0;
- } else {
- $ftpconnid = $_SGLOBAL['ftpconnid'];
复制代码 找- runlog('FTP', "Upload '$source' error.", 0);
复制代码 替换- runlog('FTP', "Upload '$source' To '$dest' error.", 0);
复制代码 找- if($ftpconnid = @$func($_SGLOBAL['setting']['ftphost'], $_SGLOBAL['setting']['ftpport'], 20)) {
- if($_SGLOBAL['setting']['timeout'] && function_exists('ftp_set_option')) {
- @ftp_set_option($ftpconnid, FTP_TIMEOUT_SEC, $_SGLOBAL['setting']['timeout']);
复制代码 替换- if($ftpconnid = @$func($_SGLOBAL['setting']['ftphost'], intval($_SGLOBAL['setting']['ftpport']), 20)) {
- if($_SGLOBAL['setting']['ftptimeout'] && function_exists('ftp_set_option')) {
- @ftp_set_option($ftpconnid, FTP_TIMEOUT_SEC, $_SGLOBAL['setting']['ftptimeout']);
复制代码 找- if($_SGLOBAL['setting']['pasv']) {
复制代码 替换- if($_SGLOBAL['setting']['ftppasv']) {
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_space.php
找- $_SGLOBAL['supe_uid'] = $uid;
- $_SGLOBAL['supe_username'] = addslashes($username);
- feed_add('profile', cplang('feed_space_open'));
复制代码 替换- $_uid = $_SGLOBAL['supe_uid'];
- $_username = $_SGLOBAL['supe_username'];
- $_SGLOBAL['supe_uid'] = $uid;
- $_SGLOBAL['supe_username'] = addslashes($username);
- feed_add('profile', cplang('feed_space_open'));
-
- $_SGLOBAL['supe_uid'] = $_uid;
- $_SGLOBAL['supe_username'] = $_username;
复制代码 ----------------------------------------华丽的分割线------------------------------------------
function_template.php
找替换- global $_SGLOBAL, $_SC, $_SCONFIG;
复制代码 找- //read
- $template = sreadfile($tplfile)
复制代码 替换- //read
- if(!file_exists($tplfile)) {
- $tplfile = str_replace('/'.$_SCONFIG['template'].'/', '/default/', $tplfile);
- }
- $template = sreadfile($tplfile)
复制代码 找- global $_SGLOBAL, $_SC;
-
- $tpl = strexists($name,'/')?$name:"template/$_SC[template]/$name";
-
- $_SGLOBAL['sub_tpls'][] = $tpl;
- $file = S_ROOT.'./'.$tpl.'.htm';
- $content = sreadfile($file);
复制代码 替换- global $_SGLOBAL, $_SCONFIG;
-
- $tpl = strexists($name,'/')?$name:"template/$_SCONFIG[template]/$name";
- $tplfile = S_ROOT.'./'.$tpl.'.htm';
-
- $_SGLOBAL['sub_tpls'][] = $tpl;
-
- if(!file_exists($tplfile)) {
- $tplfile = str_replace('/'.$_SCONFIG['template'].'/', '/default/', $tplfile);
- }
- $content = sreadfile($tplfile);
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_album.php
最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_blog.php
找- $gets['orderby'] = empty($_GET['orderby'])?'dateline':(in_array($_GET['orderby'], array('dateline', 'lastpost', 'replynum', 'viewnum'))?$_GET['orderby']:'dateline');
复制代码 替换- $gets['orderby'] = empty($_GET['orderby'])?'dateline':(in_array($_GET['orderby'], array('dateline', 'replynum', 'viewnum'))?$_GET['orderby']:'dateline');
复制代码 最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_doing.php
找- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('doing')." FORCE INDEX (dateline) ORDER BY dateline DESC LIMIT $start,$perpage");
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('doing')." USE INDEX (dateline) ORDER BY dateline DESC LIMIT $start,$perpage");
复制代码 最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_mtag.php
找- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('mtag')." FORCE INDEX(membernum) ORDER BY membernum DESC LIMIT $start,$perpage");
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('mtag')." USE INDEX(membernum) ORDER BY membernum DESC LIMIT $start,$perpage");
复制代码 找- $query = $_SGLOBAL['db']->query("SELECT main.*,field.tagname,field.membernum,field.fieldid FROM ".tname('thread')." main FORCE INDEX(lastpost)
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT main.*,field.tagname,field.membernum,field.fieldid FROM ".tname('thread')." main
- USE INDEX (lastpost)
复制代码 最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_share.php
找- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('share')." FORCE INDEX (dateline) WHERE $wheresql ORDER BY dateline DESC LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $value = mkshare($value);
- $list[] = $value;
- }
- }
- //分页
- $multi = empty($_SCONFIG['networkpage'])?'networkpage':multi($count, $perpage, $page, $theurl."&type=$_GET[type]");
- realname_get();
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('share')." USE INDEX (dateline) WHERE $wheresql ORDER BY dateline DESC LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $value = mkshare($value);
- $list[] = $value;
- }
- }
- //分页
- $multi = empty($_SCONFIG['networkpage'])?'networkpage':multi($count, $perpage, $page, $theurl."&type=$_GET[type]");
- realname_get();
- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_space.php
找- //初始化
- $gets = $list = array();
复制代码 替换- //初始化
- $multi_mode = false;//节约服务器资源,关闭排行榜分页
- $cache_time = 5;//5分钟一更新
- $gets = $list = array();
复制代码 找- //普通浏览模式
- $fuids = array();
复制代码 替换- //普通浏览模式
- $cache_file = '';
- $fuids = array();
复制代码 找- $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='2'";
复制代码 替换- if($multi_mode) {
- $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='2'";
- } else {
- $count = 100;
- $cache_file = S_ROOT.'./data/cache_top_mm.txt';
- }
复制代码 找- $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='1'";
复制代码 替换- if($multi_mode) {
- $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='1'";
- } else {
- $count = 100;
- $cache_file = S_ROOT.'./data/cache_top_gg.txt';
- }
复制代码 找- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
复制代码 替换- if($multi_mode) {
- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
- } else {
- $count = 100;
- $cache_file = S_ROOT.'./data/cache_top_credit.txt';
- }
复制代码 找- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
复制代码 替换- if($multi_mode) {
- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
- } else {
- $count = 100;
- $cache_file = S_ROOT.'./data/cache_top_friendnum.txt';
- }
复制代码 找- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
复制代码 替换- if($multi_mode) {
- $c_sql = "SELECT COUNT(*) FROM ".tname('space');
- } else {
- $count = 100;
- $cache_file = S_ROOT.'./data/cache_top_viewnum.txt';
- }
复制代码 找- $sql = "SELECT main.*, field.* FROM ".tname('space')." main FORCE INDEX (updatetime)
复制代码 替换- $sql = "SELECT main.*, field.* FROM ".tname('space')." main USE INDEX (updatetime)
复制代码 找- $count = empty($_SCONFIG['networkpage'])?1:$_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
- if($count) {
复制代码 替换- $list = array();
- if(empty($count)) {
- $cache_mode = false;
- $count = empty($_SCONFIG['networkpage'])?1:$_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
- $multi = multi($count, $perpage, $page, $theurl."&view=$_GET[view]");
- } else {
- $cache_mode = true;
- $multi = '';
- $start = 0;
- $perpage = $count;
-
- if($cache_file && file_exists($cache_file) && $_SGLOBAL['timestamp'] - @filemtime($cache_file) < $cache_time*60) {
- $list_cache = sreadfile($cache_file);
- $list = unserialize($list_cache);
- }
- }
- if($count && empty($list)) {
复制代码 找- $fuids[] = $value['uid'];
- $list[] = $value;
- }
复制代码 替换- $fuids[] = $value['uid'];
- $list[] = $value;
- }
- if($cache_mode && $cache_file) {
- swritefile($cache_file, serialize($list));
- }
复制代码 找- //分页
- $multi = multi($count, $perpage, $page, $theurl."&view=$_GET[view]");
复制代码 删除之
最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
network_thread.php
找- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('thread')." FORCE INDEX(lastpost)
复制代码 替换- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('thread')." USE INDEX(lastpost)
复制代码 最后的上方添加- $_GET = shtmlspecialchars(sstripslashes($_GET));
复制代码 ----------------------------------------华丽的分割线------------------------------------------
script_common.js
找- function subop(obj){
- var tLeft = obj.offsetLeft;
- var tTop = obj.offsetTop + 38;
- while(obj=obj.offsetParent) {
- tLeft+=obj.offsetLeft;
- tTop+=obj.offsetTop;
- }
- if($('ucmenu').style.display == 'none'){
- $('ucmenu').style.cssText = 'display:block; left:' + tLeft + 'px; top:' + tTop + 'px;';
- }
- else{
- $('ucmenu').style.cssText = 'display:none;';
- }
- }
复制代码 替换- function readfeed(obj, id) {
- if(Cookie.get("read_feed_ids")) {
- var fcookie = Cookie.get("read_feed_ids");
- fcookie = fcookie + ',' + id;
- } else {
- var fcookie = id;
- }
- Cookie.set("read_feed_ids", fcookie, 120);
- obj.className = 'feedread';
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
script_manage.js
找- $('friend_'+uid).innerHTML = "添加当前好友成功了。您可以 <a href="space.php?uid="+uid+"" target="_blank">访问好友的主页</a>";
复制代码 替换- $('friend_'+uid).innerHTML = '<p>你们现在是好友了。</p><p style="margin-top:1em;"><a href="space.php?uid='+uid+'#comment" target="_blank" class="submit">给TA留言</a> <a href="cp.php?ac=poke&op=send&uid='+uid+'" id="a_poke_'+uid+'" onclick="ajaxmenu(event, this.id, 99999, \'\', -1)" class="submit">打个招呼</a></p>';
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_album.php
找- $f_index = 'FORCE INDEX(updatetime)';
复制代码 替换- $f_index = 'USE INDEX(updatetime)';
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_blog.php
space_doing.php
space_share.php
找- $f_index = 'FORCE INDEX(dateline)';
复制代码 替换- $f_index = 'USE INDEX(dateline)';
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_feed.php
找- //网站近况
- if(empty($_GET['view']) && $space['self'] && ($space['friendnum']<$_SCONFIG['showallfriendnum'])) {
- $_GET['view'] = 'all';//默认显示全站
- }
复制代码 下方添加- //默认动态类型
- if($_SCONFIG['my_status'] && $_SCONFIG['feeddefaultfilter'] && empty($_GET['filter'])) {
- $_GET['filter'] = $_SCONFIG['feeddefaultfilter'];
- }
复制代码 找- $f_index = 'FORCE INDEX(dateline)';
复制代码 替换- $f_index = 'USE INDEX(dateline)';
复制代码 找- //过滤
- $appid = empty($_GET['appid'])?0:intval($_GET['appid']);
- if($appid) {
- $wheresql .= " AND appid='$appid'";
- $theurl .= "&appid=$appid";
- }
- $icon = empty($_GET['icon'])?'':trim($_GET['icon']);
- if($icon) {
- $wheresql .= " AND icon='$icon'";
- $theurl .= "&icon=$icon";
- }
复制代码 替换- //过滤
- $appid = empty($_GET['appid'])?0:intval($_GET['appid']);
- if($appid) {
- $wheresql .= " AND appid='$appid'";
- }
- $icon = empty($_GET['icon'])?'':trim($_GET['icon']);
- if($icon) {
- $wheresql .= " AND icon='$icon'";
- }
- $filter = empty($_GET['filter'])?'':trim($_GET['filter']);
- if($filter == 'site') {
- $wheresql .= " AND appid>0";
- } elseif($filter == 'myapp') {
- $wheresql .= " AND appid='0'";
- }
复制代码 找上方添加- //获得个性模板
- $templates = $default_template = array();
- $tpl_dir = sreaddir(S_ROOT.'./template');
- foreach ($tpl_dir as $dir) {
- if(file_exists(S_ROOT.'./template/'.$dir.'/style.css')) {
- $tplicon = file_exists(S_ROOT.'./template/'.$dir.'/image/template.gif')?'template/'.$dir.'/image/template.gif':'image/tlpicon.gif';
- $tplvalue = array('name'=> $dir, 'icon'=>$tplicon);
- if($dir == $_SCONFIG['template']) {
- $default_template = $tplvalue;
- } else {
- $templates[$dir] = $tplvalue;
- }
- }
- }
- $_TPL['templates'] = $templates;
- $_TPL['default_template'] = $default_template;
复制代码 找- $is_myapp = is_numeric($feed['icon'])?1:0;
-
- if($_GET['filter'] == 'site') {
- if($is_myapp) {
- return false;
- }
- } elseif($_GET['filter'] == 'myapp') {
- if(!$is_myapp) {
- return false;
- }
- }
复制代码 删除之
找- if(empty($_GET['filter']) && $is_myapp && empty($_SGLOBAL['my_userapp'][$feed['icon']])) {
复制代码 替换- if(empty($_GET['filter']) && empty($feed['appid']) && empty($_SGLOBAL['my_userapp'][$feed['icon']])) {
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_index.php
找- //留言板
- $walllist = array();
- if(ckprivacy('wall')) {
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('comment')." WHERE id='$space[uid]' AND idtype='uid' ORDER BY dateline DESC LIMIT 0,5");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['authorid'], $value['author']);
- $value['message'] = strlen($value['message'])>500?getstr($value['message'], 500, 0, 0, 0, 0, -1).' ...':$value['message'];
- $walllist[] = $value;
- }
- }
复制代码 替换- //留言板
- $walllist = array();
- $wallnum = 0;
- if(ckprivacy('wall')) {
- $query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('comment')." WHERE id='$space[uid]' AND idtype='uid' ORDER BY dateline DESC LIMIT 0,5");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['authorid'], $value['author']);
- $value['message'] = strlen($value['message'])>500?getstr($value['message'], 500, 0, 0, 0, 0, -1).' ...':$value['message'];
- $walllist[] = $value;
- }
- $wallnum = getcount('comment', array('id'=>$space['uid'], 'idtype'=>'uid'));
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_mtag.php
找- $query = $_SGLOBAL['db']->query("SELECT main.*,field.tagname,field.membernum,field.fieldid FROM ".tname('thread')." main FORCE INDEX(lastpost)
- LEFT JOIN ".tname('mtag')." field ON field.tagid=main.tagid
- WHERE main.tagid IN (".simplode($tagids).")
- ORDER BY main.lastpost DESC
- LIMIT 0,10");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $threadlist[] = $value;
复制代码 替换- if($tagids) {
- $query = $_SGLOBAL['db']->query("SELECT main.*,field.tagname,field.membernum,field.fieldid FROM ".tname('thread')." main
- LEFT JOIN ".tname('mtag')." field ON field.tagid=main.tagid
- WHERE main.tagid IN (".simplode($tagids).")
- ORDER BY main.lastpost DESC
- LIMIT 0,10");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $threadlist[] = $value;
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_tag.php
找- //获取tag关联
- $query = $_SGLOBAL['db']->query("SELECT blog.* FROM ".tname('tagblog')." tb , ".tname('blog')." blog WHERE tb.tagid='$tag[tagid]' AND blog.friend='0' AND blog.blogid=tb.blogid LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username']);
- $list[] = $value;
复制代码 替换- //获取tag关联
- $prinum = 0;
- $query = $_SGLOBAL['db']->query("SELECT blog.* FROM ".tname('tagblog')." tb , ".tname('blog')." blog WHERE tb.tagid='$tag[tagid]' AND blog.blogid=tb.blogid LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- if(empty($value['friend'])) {
- realname_set($value['uid'], $value['username']);
- $list[] = $value;
- } else {
- $prinum++;
- }
复制代码 ----------------------------------------华丽的分割线------------------------------------------
space_thread.php
找- $f_index = 'FORCE INDEX(lastpost)';
复制代码 替换- $f_index = 'USE INDEX (lastpost)';
复制代码 |