$c = ''; $page = isset($_GET['p']) && intval($_GET['p']) > 0 ? intval($_GET['p']) : 1; $hdid = isset($_GET['id']) && intval($_GET['id']) > 0 ? intval($_GET['id']) : 1; $q_res = sprintf('select * from %s where hdid=%s', $yjl_dbprefix . 'hd', $hdid); $res = mysql_query($q_res) or die(''); $r_res = mysql_fetch_assoc($res); if (mysql_num_rows($res) > 0) { if ($r_res['xqid'] > 0 && $r_res['xqid'] != $xqid) { echo '<script type="text/javascript">location.href=\'activeimg-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '.html\';</script>'; exit; } if (!isset($uadb[$r_res['uid']])) { $uadb[$r_res['uid']] = yjl_udb($r_res['uid']); } if ($r_res['jluid'] > 0 && !isset($uadb[$r_res['jluid']])) { $uadb[$r_res['jluid']] = yjl_udb($r_res['jluid']); } $page_title .= ' ' . $r_res['name'] . ' 活动照片'; $iscy = 0; $ispz = 0; if ($user_id > 0) { $q_rep = sprintf('select iscy from %s where uid=%s and hdid=%s limit 1', $yjl_dbprefix . 'hd_user', $user_id, $hdid); $rep = mysql_query($q_rep) or die(''); $r_rep = mysql_fetch_assoc($rep); if (mysql_num_rows($rep) > 0) { if ($r_rep['iscy'] == 0) { $iscy = 1; } else { $ispz = 1; } }
require_once 'config.php'; require_once $yjl_tpath . 'setting/settings.php'; require_once 'function.php'; $f = 'follow.php'; if ($udb['uid'] > 0) { if ($udb['iswc'] != 1 && ($udb['qx'] == 5 || $udb['qx'] == 6) || $udb['isnc'] == 0) { echo '<script type="text/javascript">location.href=\'./\';</script>'; exit; } } else { echo '<script type="text/javascript">location.href=\'login.php\';</script>'; exit; } $cuid = isset($_GET['id']) && intval($_GET['id']) > 0 ? intval($_GET['id']) : $udb['uid']; if ($cuid != $udb['uid']) { $cudb = yjl_udb($cuid); if ($cudb['uid'] == 0) { echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>'; exit; } $uadb[$cuid] = $cudb; } if ($xqid == 0 && $uadb[$cuid]['xqid'] > 0) { $xqid = $uadb[$cuid]['xqid']; } if ($xqid > 0) { $q_res = sprintf('select * from %s where xqid=%s and iskf=1 limit 1', $yjl_dbprefix . 'xq', $xqid); $res = mysql_query($q_res) or die(''); $r_res = mysql_fetch_assoc($res); if (mysql_num_rows($res) > 0) { $xqdb = $r_res;
$isgl = 2; } elseif ($udb['isxg'] > 0) { $isgl = 1; } } if ($isgl == 0) { exit; } $f = 'a_uinfo.php'; $esid = md5($f); $c = isset($t_m) ? yjl_getMsg($t_m) : ''; $id = isset($_GET['id']) && intval($_GET['id']) > 0 ? intval($_GET['id']) : 1; if ($id == $udb['uid']) { $adb = $udb; } else { $adb = yjl_udb($id); } if ($adb['uid'] > 0) { $c .= '<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">'; if ($adb['qx'] == 10) { $c .= '管理员'; } elseif ($adb['qx'] == 5 || $adb['qx'] == 6) { $c .= $a_tsgz[$adb['qx']][$adb['gzfl']]; } else { $c .= '业主'; } $c .= ':' . ($adb['nc'] != '' ? $adb['nc'] : $adb['email']) . '</td></tr><tr class="altbg1"><td>' . ($adb['qx'] == 5 || $adb['qx'] == 6 ? '真实姓名' : '昵称') . ':</td><td>' . $adb['nc'] . '</td></tr> <tr class="altbg2"><td>性别:</td><td>'; if ($adb['gender'] == 1) { $c .= '男'; } elseif ($adb['gender'] == 2) {
} while ($r_rep = mysql_fetch_assoc($rep)); } mysql_free_result($rep); $c .= '</div></div>'; $c .= '<div class="overlay" id="overlay_usercy"> <h3>活动成员</h3> <div class="overlay_cont" style="height: 300px;overflow: auto;">'; $q_rep = sprintf('select huid, name, lxfs, email, xqname, uid from %s where hdid=%s and iscy=0 order by datetime desc, uid', $yjl_dbprefix . 'hd_user', $hdid); $rep = mysql_query($q_rep) or die(''); $r_rep = mysql_fetch_assoc($rep); $c_rep = mysql_num_rows($rep); if (mysql_num_rows($rep) > 0) { do { if ($r_rep['uid'] > 0) { if (!isset($uadb[$r_rep['uid']])) { $uadb[$r_rep['uid']] = yjl_udb($r_rep['uid']); } if ($uadb[$r_rep['uid']]['uid'] == 0) { $r_rep['uid'] = 0; } } $xqname = $r_rep['xqname']; if ($r_rep['uid'] > 0 && $uadb[$r_rep['uid']]['xqid'] > 0) { if (!isset($a_xqname[$uadb[$r_rep['uid']]['xqid']])) { if ($uadb[$r_rep['uid']]['xqid'] == $xqid && $xqid > 0) { $a_xqname[$uadb[$r_rep['uid']]['xqid']] = $xqdb['name']; } else { $q_reu = sprintf('select name from %s where xqid=%s limit 1', $yjl_dbprefix . 'xq', $uadb[$r_rep['uid']]['xqid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) {
function yjl_homeqz($r_res) { global $yjl_dbprefix, $dbprefix, $uadb, $yjl_tpath, $a_qzca; $c_hd = 0; $q_reu = sprintf('select b.* from %s as a, %s as b where a.qzid=%s and a.tid=b.tid and a.uid<>%s order by a.datetime desc limit 1', $yjl_dbprefix . 'qz_topic', $dbprefix . 'topic', $r_res['qzid'], $r_res['uid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $c_hd = 1; $r_wb = $r_reu; $r_zf[$r_wb['tid']] = $r_res; if (!isset($uadb[$r_reu['uid']])) { $uadb[$r_reu['uid']] = yjl_udb($r_reu['uid']); } } else { $r_wb = $r_res; } mysql_free_result($reu); $c = '<li id="wb_' . $r_wb['tid'] . '"><div class="left"> <a href="user-' . $r_wb['uid'] . '.html"><img src="' . yjl_face($r_wb['uid'], $uadb[$r_wb['uid']]['face']) . '" /></a> <div class="m_sp1">监理师</div> </div><div class="right"> <h3><a href="#"><a href="user-' . $r_wb['uid'] . '.html">' . yjl_substrs($uadb[$r_wb['uid']]['nc']) . '</a></a>:'; if ($r_wb['longtextid'] > 0) { $q_reu = sprintf('select `longtext` from %s where id=%s and tid=%s limit 1', $dbprefix . 'topic_longtext', $r_wb['longtextid'], $r_wb['tid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $c .= $r_reu['longtext']; } else { $r_wb['longtextid'] = 0; } mysql_free_result($reu); } if ($r_wb['longtextid'] == 0) { $c .= yjl_wbdecode($r_wb['content']); } $c .= '</h3>'; if ($r_wb['imageid'] != '') { $ai = explode(',', $r_wb['imageid']); foreach ($ai as $v) { $q_reu = sprintf('select photo, width, height from %s where id=%s limit 1', $dbprefix . 'topic_image', $v); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $ou = str_replace('./', '', $r_reu['photo']); $bu = str_replace('_o.jpg', '_s.jpg', $ou); $img_a[$r_wb['tid']][$v] = '<a href="#" onclick="openimg(\'' . $yjl_tpath . $ou . '\', ' . $r_reu['width'] . ', ' . $r_reu['height'] . ');return false;" title="点击查看大图"><img src="' . $yjl_tpath . $bu . '" alt=""/></a>'; } mysql_free_result($reu); } } if ($r_wb['videoid'] > 0) { $q_reu = sprintf('select video_url, video_img from %s where id=%s limit 1', $dbprefix . 'topic_video', $r_wb['videoid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $img_a[$r_wb['tid']]['v' . $r_wb['videoid']] = '<a href="' . $r_reu['video_url'] . '" target="_blank" title="点击查看视频"><img src="images/blank.gif" style="background: #fff url(' . ($r_reu['video_img'] != '' ? $yjl_tpath . str_replace('./', '', $r_reu['video_img']) : 'images/vi_d.jpg') . ') no-repeat center;" alt=""/></a>'; } mysql_free_result($reu); } if (isset($img_a[$r_wb['tid']])) { $c .= join(' ', $img_a[$r_wb['tid']]); } if (isset($r_zf[$r_wb['tid']])) { $r_z = $r_zf[$r_wb['tid']]; $c .= '<div class="active_bg"></div><div class="active clearfix"><h3><a href="user-' . $r_z['uid'] . '.html">' . $uadb[$r_z['uid']]['nc'] . '</a>:'; if ($r_z['longtextid'] > 0) { $q_reu = sprintf('select `longtext` from %s where id=%s and tid=%s limit 1', $dbprefix . 'topic_longtext', $r_z['longtextid'], $r_z['tid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $c .= $r_reu['longtext']; } else { $r_z['longtextid'] = 0; } mysql_free_result($reu); } if ($r_z['longtextid'] == 0) { $c .= yjl_wbdecode($r_z['content']); } $c .= '</h3>'; if ($r_z['imageid'] != '') { $ai = explode(',', $r_z['imageid']); foreach ($ai as $v) { $q_reu = sprintf('select photo, width, height from %s where id=%s limit 1', $dbprefix . 'topic_image', $v); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $ou = str_replace('./', '', $r_reu['photo']); $bu = str_replace('_o.jpg', '_s.jpg', $ou); $img_a[$r_z['tid']][$v] = '<a href="#" onclick="openimg(\'' . $yjl_tpath . $ou . '\', ' . $r_reu['width'] . ', ' . $r_reu['height'] . ');return false;" title="点击查看大图"><img src="' . $yjl_tpath . $bu . '" alt=""/></a>'; } mysql_free_result($reu); } } if ($r_z['videoid'] > 0) { $q_reu = sprintf('select video_url, video_img from %s where id=%s limit 1', $dbprefix . 'topic_video', $r_z['videoid']); $reu = mysql_query($q_reu) or die(''); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $img_a[$r_z['tid']]['v' . $r_z['videoid']] = '<a href="' . $r_reu['video_url'] . '" target="_blank" title="点击查看视频"><img src="images/blank.gif" style="background: #fff url(' . ($r_reu['video_img'] != '' ? $yjl_tpath . str_replace('./', '', $r_reu['video_img']) : 'images/vi_d.jpg') . ') no-repeat center;" alt=""/></a>'; } mysql_free_result($reu); } if (isset($img_a[$r_z['tid']])) { $c .= join(' ', $img_a[$r_z['tid']]); } $c .= '<p class="other">' . yjl_wbdate($r_z['dateline']) . '</p></div>'; } $c .= '<p class="other">'; $a[$r_res['qzid']][] = '<a href="faq-c' . $r_res['cid'] . '.html">' . $a_qzca[$r_res['cid']] . '</a>'; if ($r_res['c_zan'] > 0) { $a[$r_res['qzid']][] = ' 赞(' . $r_res['c_zan'] . ')'; } $a[$r_res['qzid']][] = '<a href="faq-' . $r_res['qzid'] . '.html">详情</a>'; $c .= (isset($a[$r_res['qzid']]) ? '<span>' . join(' |', $a[$r_res['qzid']]) : '') . '</span>'; $c .= yjl_wbdate($r_wb['dateline']); $c .= '</p></div></li>'; return $c; }