Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] 我的80RE模板竞价排名为什么空白

[复制链接]
sanant 发表于 2009-5-25 12:44:45 | 显示全部楼层 |阅读模式
本帖最后由 sanant 于 2009-6-3 21:34 编辑

80RE的模板经过自己小修改,已经差不多了,现在就只有一个问题,就是竞价排名是空白页面。在论坛上查过,有说是network_index.htm的,有说是network_space.htm的,也有说是space_index.htm的,但都没有效果,实在没有办法了,请大家帮帮忙。看毛病到底在哪里。大家用80RE模板的时候出现这个问题了吗。以下是具体页面:
http://www.ma-yi.cn/network.php?ac=space&view=show

蚂蚁窝谢谢大家了!!!
changfei2008 发表于 2009-5-25 16:54:21 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

杨涛@小点 发表于 2009-5-26 10:28:05 | 显示全部楼层
回复

使用道具 举报

Jetlin_Yuan 发表于 2009-5-28 11:20:07 | 显示全部楼层
我清楚你问题,刚刚修改过 ,还没解决的你可以找我,22918003
回复

使用道具 举报

 楼主| sanant 发表于 2009-6-3 21:34:17 | 显示全部楼层
自己已经解决,是source/network_space.php的事情。
我已经更改了,需要的朋友备份好自己的后试着替换下。
没有安装学校和工作信息的朋友请把中间相关代码删除掉。

  1. <?php
  2. /*
  3. [UCenter Home] (C) 2007-2008 Comsenz Inc.
  4. $Id: network_space.php 10953 2009-01-12 02:55:37Z liguode $
  5. */
  6. if(!defined('IN_UCHOME')) {
  7. exit('Access Denied');
  8. }
  9. @include_once(S_ROOT.'./data/data_profield.php');
  10. @include_once(S_ROOT.'./data/data_profilefield.php');
  11. $fields = empty($_SGLOBAL['profilefield'])?array()_SGLOBAL['profilefield'];

  12. //初始化
  13. $multi_mode = false;//节约服务器资源,关闭排行榜分页
  14. $cache_time = 5;//5分钟一更新
  15. $gets = $list = array();
  16. $multi = '';
  17. if(!empty($_GET['searchmode'])) {

  18. $now_pos = -1;

  19. //判断是否搜索太快
  20. $waittime = interval_check('search');
  21. if($waittime > 0) {
  22.   showmessage('search_short_interval');
  23. }
  24. $gets['username'] =  empty($_GET['username'])?'':stripsearchkey($_GET['username']);
  25. $gets['name'] =  empty($_GET['name'])?'':stripsearchkey($_GET['name']);
  26. $gets['fieldid'] = empty($_GET['fieldid'])?'':intval($_GET['fieldid']);
  27. if($gets['fieldid'] && !empty($_SGLOBAL['profield'][$gets['fieldid']])) {
  28.   $gets['fieldname'] = empty($_GET['fieldname'])?'':stripsearchkey($_GET['fieldname']);
  29. } else {
  30.   $gets['fieldid'] = $gets['fieldname'] = '';
  31. }
  32. $gets['tagid'] = empty($_GET['tagid'])?'':intval($_GET['tagid']);
  33. $gets['blood'] = empty($_GET['blood'])?'':stripsearchkey($_GET['blood']);
  34. $gets['birthprovince'] = empty($_GET['birthprovince'])?'':stripsearchkey($_GET['birthprovince']);
  35. $gets['birthcity'] = empty($_GET['birthcity'])?'':stripsearchkey($_GET['birthcity']);
  36. $gets['resideprovince'] = empty($_GET['resideprovince'])?'':stripsearchkey($_GET['resideprovince']);
  37. $gets['residecity'] = empty($_GET['residecity'])?'':stripsearchkey($_GET['residecity']);
  38. //工作信息搜索开始
  39.         $gets['company_name'] = empty($_GET['company_name'])?'':stripsearchkey($_GET['company_name']);
  40.         $gets['industry_name'] = empty($_GET['industry_name'])?'':stripsearchkey($_GET['industry_name']);
  41.         $gets['position_name'] = empty($_GET['position_name'])?'':stripsearchkey($_GET['position_name']);
  42. //工作信息搜索结束
  43. //学校信息搜索开始
  44. $gets['univs_name'] = empty($_GET['univs_name'])?'':stripsearchkey($_GET['univs_name']);
  45. $gets['univs_year'] = empty($_GET['univs_year'])?'':stripsearchkey($_GET['univs_year']);
  46. $gets['univs_degree'] = empty($_GET['univs_degree'])?'':stripsearchkey($_GET['univs_degree']);
  47. $gets['univs_department'] = empty($_GET['univs_department'])?'':stripsearchkey($_GET['univs_department']);
  48. $gets['highschool'] = empty($_GET['highschool'])?'':stripsearchkey($_GET['highschool']);
  49. $gets['highschool_year'] = empty($_GET['highschool_year'])?'':stripsearchkey($_GET['highschool_year']);
  50. $gets['juniorhighSchool'] = empty($_GET['juniorhighSchool'])?'':stripsearchkey($_GET['juniorhighSchool']);
  51. $gets['juniorhighSchool_year'] = empty($_GET['juniorhighSchool_year'])?'':stripsearchkey($_GET['juniorhighSchool_year']);
  52. $gets['elementarySchool'] = empty($_GET['elementarySchool'])?'':stripsearchkey($_GET['elementarySchool']);
  53. $gets['elementarySchool_year'] = empty($_GET['elementarySchool_year'])?'':stripsearchkey($_GET['elementarySchool_year']);
  54. //学校信息搜索结束
  55. $gets['birthyear'] = empty($_GET['birthyear'])?'':intval($_GET['birthyear']);
  56. $gets['birthmonth'] = empty($_GET['birthmonth'])?'':intval($_GET['birthmonth']);
  57. $gets['birthday'] = empty($_GET['birthday'])?'':intval($_GET['birthday']);
  58. $gets['sex'] = empty($_GET['sex'])?'':intval($_GET['sex']);
  59. $gets['marry'] = empty($_GET['marry'])?'':intval($_GET['marry']);
  60. $gets['qq'] = empty($_GET['qq'])?'':stripsearchkey($_GET['qq']);
  61. $gets['msn'] = empty($_GET['msn'])?'':stripsearchkey($_GET['msn']);

  62. $gets['startage'] = empty($_GET['startage'])?'':intval($_GET['startage']);
  63. $gets['endage'] = empty($_GET['endage'])?'':intval($_GET['endage']);

  64. //搜索积分/不扣积分
  65. //cksearchcredit($ac);

  66. //开始搜索
  67. $wherearr = array();
  68. foreach (array('sex', 'birthyear', 'birthmonth', 'birthday', 'marry', 'blood', 'birthprovince', 'birthcity', 'resideprovince', 'residecity', 'qq', 'msn','company_name','industry_name','position_name') as $value) {
  69.   if($gets[$value]) {
  70.    $wherearr[] = "spacefield.$value='$gets[$value]'";
  71.   }
  72. }

  73. if(empty($gets['birthyear'])) {
  74.   $startage = $endage = 0;
  75.   //转换成实际的年份
  76.   if($gets['endage']) {
  77.    $startage = sgmdate('Y') - $gets['endage'];
  78.   }
  79.   if($gets['startage']) {
  80.    $endage = sgmdate('Y') - $gets['startage'];
  81.   }
  82.   if($startage && $endage && $endage > $startage) {
  83.    $wherearr[] = '(spacefield.birthyear>='.$startage.' AND spacefield.birthyear<='.$endage.')';
  84.   } else if($startage && empty($endage)) {
  85.    $wherearr[] = 'spacefield.birthyear>='.$startage;
  86.   } else if(empty($startage) && $endage) {
  87.    $wherearr[] = 'spacefield.birthyear<='.$endage;
  88.   }
  89. }
  90. //自定义
  91. foreach ($fields as $fkey => $fvalue) {
  92.   if($fvalue['allowsearch']) {
  93.    $gets['field_'.$fkey] = empty($_GET['field_'.$fkey])?'':stripsearchkey($_GET['field_'.$fkey]);
  94.    if($gets['field_'.$fkey]) {
  95.     $wherearr[] = "spacefield.field_$fkey LIKE '%".$gets['field_'.$fkey]."%'";
  96.    }
  97.   }
  98. }

  99. $next = true;
  100. if($gets['tagid']) {
  101.   $tagid = $gets['tagid'];
  102. } elseif($gets['fieldid'] && $gets['fieldname']) {
  103.   $tagid = getcount('mtag', array('tagname'=>$gets['fieldname'], 'fieldid'=>$gets['fieldid']), 'tagid');
  104.   if(empty($tagid)) {
  105.    $next = false;
  106.   }
  107. }
  108. if($next) {
  109.   $selectsql = $fromsql = '';
  110.   if($tagid) {
  111.    $selectsql = "tagspace.uid, tagspace.username";
  112.    $wherearr[] = "tagspace.uid = spacefield.uid";
  113.    $wherearr[] = "tagspace.tagid = '$tagid'";
  114.    $fromsql .= ','.tname('tagspace').' tagspace';
  115.   }
  116.   if($gets['username'] || $gets['name']) {
  117.    $selectsql = "space.*";
  118.    $wherearr[] = "space.uid = spacefield.uid";
  119.    if($gets['username']) {
  120.     $wherearr[] = "space.username LIKE '%$gets[username]%'";
  121.    }
  122.    if($gets['name']) {
  123.     $wherearr[] = "space.name LIKE '%$gets[name]%'";
  124.    }
  125.    $fromsql .= ','.tname('space').' space';
  126.   }
  127.   if(empty($selectsql)) {
  128.    $selectsql = "space.*";
  129.    $wherearr[] = "space.uid = spacefield.uid";
  130.    $fromsql .= ','.tname('space').' space';
  131.   }
  132.   if(empty($wherearr)) {
  133.    showmessage('set_the_correct_search_content');
  134.   }
  135.   
  136.   $wheresql = implode(' AND ', $wherearr);
  137.   $sql = "SELECT $selectsql, spacefield.* FROM ".tname('spacefield')." spacefield $fromsql WHERE $wheresql";
  138.   
  139.   $fuids = array();
  140.   $count = 0;
  141.   $query = $_SGLOBAL['db']->query($sql.' LIMIT 0, 100');//最多100条
  142.   while ($value = $_SGLOBAL['db']->fetch_array($query)) {
  143.    realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
  144.    $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
  145.    $fuids[] = $value['uid'];
  146.    $list[] = $value;
  147.   }
  148.   
  149.   //在线状态
  150.   $ols = array();
  151.   if($fuids) {
  152.    $query = $_SGLOBAL['db']->query("SELECT uid, lastactivity FROM ".tname('session')." WHERE uid IN (".simplode($fuids).")");
  153.    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
  154.     $ols[$value['uid']] = $value['lastactivity'];
  155.    }
  156.   }
  157.   
  158.   //更新最后操作时间
  159.   if($_SGLOBAL['supe_uid']) {
  160.    $_SGLOBAL['db']->query("UPDATE ".tname('space')." SET lastsearch='$_SGLOBAL[timestamp]' WHERE uid='$_SGLOBAL[supe_uid]'");
  161.   }
  162. }

  163. } else {
  164. //分页
  165. $perpage = 20;
  166. $page = empty($_GET['page'])?1:intval($_GET['page']);
  167. if($page<1) $page=1;
  168. $start = ($page-1)*$perpage;
  169. if(empty($_SCONFIG['networkpage'])) $start = 0;

  170. //检查开始数
  171. ckstart($start, $perpage);
  172. //普通浏览模式
  173. $cache_file = '';
  174. $fuids = array();
  175. $count = 0;
  176. $now_pos = 0;

  177. if ($_GET['view'] == 'show') {
  178.   $c_sql = "SELECT COUNT(*) FROM ".tname('show');
  179.   $sql = "SELECT space.*, field.*, main.* FROM ".tname('show')." main
  180.    LEFT JOIN ".tname('space')." space ON space.uid=main.uid
  181.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid
  182.    ORDER BY main.credit DESC";
  183.   
  184.   //清理
  185.   if(substr($_SGLOBAL['timestamp'], -1) == '0') {
  186.    $_SGLOBAL['db']->query("DELETE FROM ".tname('show')." WHERE credit<1");//清理小于1的数据
  187.   }
  188.   
  189.   //我的竞价积分
  190.   $space['showcredit'] = getcount('show', array('uid'=>$space['uid']), 'credit');
  191.   $space['showcredit'] = intval($space['showcredit']);
  192.   
  193.   //我的位置
  194.   $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('show')." WHERE credit>'$space[showcredit]'"), 0);
  195.   $now_pos++;
  196.   
  197. } elseif ($_GET['view'] == 'mm') {
  198.   if($multi_mode) {
  199.    $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='2'";
  200.   } else {
  201.    $count = 100;
  202.    $cache_file = S_ROOT.'./data/cache_top_mm.txt';
  203.   }
  204.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main, ".tname('spacefield')." field
  205.    WHERE field.sex='2' AND field.uid=main.uid
  206.    ORDER BY main.viewnum DESC";
  207.   
  208.   //我的位置
  209.   if($space['sex']==2) {
  210.    $pos_sql = "SELECT COUNT(*) FROM ".tname('space')." s, ".tname('spacefield')." f WHERE f.uid=s.uid AND f.sex='2' AND s.viewnum>'$space[viewnum]'";
  211.    $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($pos_sql), 0);
  212.    $now_pos++;
  213.   } else {
  214.    $now_pos = -1;
  215.   }
  216.    
  217. } elseif ($_GET['view'] == 'gg') {
  218.   if($multi_mode) {
  219.    $c_sql = "SELECT COUNT(*) FROM ".tname('spacefield')." WHERE sex='1'";
  220.   } else {
  221.    $count = 100;
  222.    $cache_file = S_ROOT.'./data/cache_top_gg.txt';
  223.   }
  224.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main, ".tname('spacefield')." field
  225.    WHERE field.sex='1' AND field.uid=main.uid
  226.    ORDER BY main.viewnum DESC";
  227.   
  228.   //我的位置
  229.   if($space['sex']==1) {
  230.    $pos_sql = "SELECT COUNT(*) FROM ".tname('space')." s, ".tname('spacefield')." f WHERE f.uid=s.uid AND f.sex='1' AND s.viewnum>'$space[viewnum]'";
  231.    $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($pos_sql), 0);
  232.    $now_pos++;
  233.   } else {
  234.    $now_pos = -1;
  235.   }
  236.   
  237. } elseif ($_GET['view'] == 'credit') {
  238.   if($multi_mode) {
  239.    $c_sql = "SELECT COUNT(*) FROM ".tname('space');
  240.   } else {
  241.    $count = 100;
  242.    $cache_file = S_ROOT.'./data/cache_top_credit.txt';
  243.   }
  244.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main
  245.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid
  246.    ORDER BY main.credit DESC";
  247.   
  248.   //我的位置
  249.   $pos_sql = "SELECT COUNT(*) FROM ".tname('space')." s WHERE s.credit>'$space[credit]'";
  250.   $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($pos_sql), 0);
  251.   $now_pos++;
  252.   
  253. } elseif ($_GET['view'] == 'friendnum') {
  254.   if($multi_mode) {
  255.    $c_sql = "SELECT COUNT(*) FROM ".tname('space');
  256.   } else {
  257.    $count = 100;
  258.    $cache_file = S_ROOT.'./data/cache_top_friendnum.txt';
  259.   }
  260.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main
  261.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid
  262.    ORDER BY main.friendnum DESC";
  263.   
  264.   //我的位置
  265.   $pos_sql = "SELECT COUNT(*) FROM ".tname('space')." s WHERE s.friendnum>'$space[friendnum]'";
  266.   $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($pos_sql), 0);
  267.   $now_pos++;
  268.   
  269. } elseif ($_GET['view'] == 'viewnum') {
  270.   if($multi_mode) {
  271.    $c_sql = "SELECT COUNT(*) FROM ".tname('space');
  272.   } else {
  273.    $count = 100;
  274.    $cache_file = S_ROOT.'./data/cache_top_viewnum.txt';
  275.   }
  276.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main
  277.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid
  278.    ORDER BY main.viewnum DESC";
  279.   
  280.   //我的位置
  281.   $pos_sql = "SELECT COUNT(*) FROM ".tname('space')." s WHERE s.viewnum>'$space[viewnum]'";
  282.   $now_pos = $_SGLOBAL['db']->result($_SGLOBAL['db']->query($pos_sql), 0);
  283.   $now_pos++;
  284.   
  285. } elseif ($_GET['view'] == 'online') {
  286.   $c_sql = "SELECT COUNT(*) FROM ".tname('session');
  287.   $sql = "SELECT field.*, space.*, main.*
  288.    FROM ".tname('session')." main
  289.    LEFT JOIN ".tname('space')." space ON space.uid=main.uid
  290.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid";
  291.   $now_pos = -1;
  292. } else {
  293.   $c_sql = "SELECT COUNT(*) FROM ".tname('space');
  294.   $sql = "SELECT main.*, field.* FROM ".tname('space')." main USE INDEX (updatetime)
  295.    LEFT JOIN ".tname('spacefield')." field ON field.uid=main.uid
  296.    ORDER BY main.updatetime DESC";
  297.   $_GET['view'] = 'all';
  298.   
  299.   $now_pos = -1;
  300. }

  301. $list = array();
  302. if(empty($count)) {
  303.   $cache_mode = false;
  304.   $count = empty($_SCONFIG['networkpage'])?1_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
  305.   $multi = multi($count, $perpage, $page, $theurl."&view=$_GET[view]");
  306. } else {
  307.   $cache_mode = true;
  308.   $multi = '';
  309.   $start = 0;
  310.   $perpage = $count;
  311.   
  312.   if($cache_file && file_exists($cache_file) && $_SGLOBAL['timestamp'] - @filemtime($cache_file) < $cache_time*60) {
  313.    $list_cache = sreadfile($cache_file);
  314.    $list = unserialize($list_cache);
  315.   }
  316. }
  317. if($count && empty($list)) {
  318.   $query = $_SGLOBAL['db']->query("$sql LIMIT $start,$perpage");
  319.   while ($value = $_SGLOBAL['db']->fetch_array($query)) {
  320.    realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
  321.    $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
  322.    $fuids[] = $value['uid'];
  323.    $list[] = $value;
  324.   }
  325.   if($cache_mode && $cache_file) {
  326.    swritefile($cache_file, serialize($list));
  327.   }
  328. }

  329. //在线状态
  330. $ols = array();
  331. if($fuids) {
  332.   $query = $_SGLOBAL['db']->query("SELECT uid, lastactivity FROM ".tname('session')." WHERE uid IN (".simplode($fuids).")");
  333.   while ($value = $_SGLOBAL['db']->fetch_array($query)) {
  334.    $ols[$value['uid']] = $value['lastactivity'];
  335.   }
  336. }

  337. $sub_actives = array($_GET['view'] => ' class="current"');

  338. }
  339. //页面显示
  340. //性别
  341. $sexarr = array($gets['sex']=>' selected');
  342. //生日:年
  343. $birthyeayhtml = '';
  344. $nowy = sgmdate('Y');
  345. for ($i=1; $i<80; $i++) {
  346. $they = $nowy - $i;
  347. $selectstr = $they == $gets['birthyear']?' selected':'';
  348. $birthyeayhtml .= "$they";
  349. }
  350. //生日:月
  351. $birthmonthhtml = '';
  352. for ($i=1; $i<13; $i++) {
  353. $selectstr = $i == $gets['birthmonth']?' selected':'';
  354. $birthmonthhtml .= "$i";
  355. }
  356. //生日:日
  357. $birthdayhtml = '';
  358. for ($i=1; $i<32; $i++) {
  359. $selectstr = $i == $gets['birthday']?' selected':'';
  360. $birthdayhtml .= "$i";
  361. }
  362. //血型
  363. $bloodhtml = '';
  364. foreach (array('A','B','O','AB') as $value) {
  365. $selectstr = $value == $gets['blood']?' selected':'';
  366. $bloodhtml .= "$value";
  367. }
  368. //婚姻
  369. $marryarr = array($gets['marry']=>' selected');
  370. //群组
  371. $fieldids = array($gets['fieldid']=>' selected');
  372. //自定义
  373. foreach ($fields as $fkey => $fvalue) {
  374. if($fvalue['allowsearch']) {
  375.   if($fvalue['formtype'] == 'text') {
  376.    $fvalue['html'] = '';
  377.   } else {
  378.    $fvalue['html'] = "---";
  379.    $optionarr = explode("\n", $fvalue['choice']);
  380.    foreach ($optionarr as $ov) {
  381.     $ov = trim($ov);
  382.     if($ov) {
  383.      $selectstr = $gets["field_$fkey"]==$ov?' selected':'';
  384.      $fvalue['html'] .= "$ov";
  385.     }
  386.    }
  387.    $fvalue['html'] .= "";
  388.   }
  389.   $fields[$fkey] = $fvalue;
  390. } else {
  391.   unset($fields[$fkey]);
  392. }
  393. }
  394. realname_get();
  395. $_GET = shtmlspecialchars(sstripslashes($_GET));
  396. ?>
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-15 12:40 , Processed in 0.042099 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表