<?php $q_res = sprintf('select * from %s where xqid=%s', $yjl_dbprefix . 'xq_fx', $xqid); $a_res = mysql_query($q_res) or die(''); $tr_res = mysql_num_rows($a_res); if ($tr_res > 0) { $c .= '<ul class="list_hsmodel clearfix">'; $p_size = 9; $tp_res = ceil($tr_res / $p_size); if ($page > $tp_res) { $page = $tp_res; } $q_l_res = sprintf('%s limit %d, %d', $q_res, ($page - 1) * $p_size, $p_size); $res = mysql_query($q_l_res) or die(''); $r_res = mysql_fetch_assoc($res); do { $c .= '<li><img src="' . ($r_res['url'] != '' ? $r_res['url'] : 'images/blank.gif" style="background: #fff url(images/jl_d.jpg) no-repeat center;') . '" /> <p>' . $r_res['name'] . '<br />' . ($r_res['content'] != '' ? $r_res['content'] : '') . '</p> </li>'; } while ($r_res = mysql_fetch_assoc($res)); mysql_free_result($res); $c .= '</ul>'; if ($tp_res > 1) { $c .= yjl_newhmpage('einfo-' . $xqid . '-style-p[p].html', $page, $tp_res, '', 1); } } mysql_free_result($a_res); if ($user_id > 0 && ($udb['isxg'] > 0 || $udb['qx'] == 10)) { $c .= '<br/><br/> <a href="a_fx.php?id=' . $xqid . '" target="_blank">户型管理</a>'; }
$a[$r_res['qzid']][] = '<a href="faq-c' . $r_res['cid'] . '.html">' . $a_qzca[$r_res['cid']] . '</a>'; if ($c_hd > 0) { if ($user_id > 0 && $uadb[$user_id]['qx'] == 0) { $a[$r_res['qzid']][] = '<a href="#" onclick="$(this).load(\'j/zanqz.php?id=' . $r_res['qzid'] . '\');return false;">赞' . ($r_res['c_zan'] > 0 ? '(' . $r_res['c_zan'] . ')' : '') . '</a>'; } else { if ($r_res['c_zan'] > 0) { $a[$r_res['qzid']][] = '赞(' . $r_res['c_zan'] . ')'; } } } elseif ($user_id > 0 && $uadb[$user_id]['qx'] == 5 && $udb['iszxjl'] > 0 && ($r_res['jluid'] == 0 || $r_res['jluid'] == $user_id)) { $a[$r_res['qzid']][] = '<a href="faq-' . $r_res['qzid'] . '.html">回答</a>'; } $a[$r_res['qzid']][] = '<a href="faq-' . $r_res['qzid'] . '.html">详情</a>'; $c .= '<p class="other">' . (isset($a[$r_res['qzid']]) ? '<span>' . join('|', $a[$r_res['qzid']]) . '</span>' : '') . yjl_wbdate($r_wb['dateline']) . '</p> </div> </li>'; } while ($r_res = mysql_fetch_assoc($res)); mysql_free_result($res); $c .= '</ul>'; //if($tp_res>1)$c.=yjl_newpage($page, $tp_res, 'faq_topic'); if ($tp_res > 1) { $c .= yjl_newhmpage('faq-new-p[p].html', $page, $tp_res, 'faq_topic'); } } mysql_free_result($a_res); $c .= '</div><br /><br />'; } $c .= '</div> </div> <div class="main_right">' . yjl_newr_jlzx() . yjl_newr_jltj() . '</div>'; echo yjl_html($c, 'supervisor');
$page = $tp_rep; } $q_l_rep = sprintf('%s limit %d, %d', $q_rep, ($page - 1) * $p_size, $p_size); $rep = mysql_query($q_l_rep) or die(''); $r_rep = mysql_fetch_assoc($rep); $c .= '<ul class="list_comment">'; do { if (!isset($uadb[$r_rep['uid']])) { $uadb[$r_rep['uid']] = yjl_udb($r_rep['uid']); } $c .= yjl_newwb($r_rep, $ispl, $r_res['tid']); } while ($r_rep = mysql_fetch_assoc($rep)); mysql_free_result($rep); $c .= '</ul>'; if ($tp_rep > 1) { $c .= yjl_newhmpage('active-' . $xqid . '-' . $hdid . '-p[p].html', $page, $tp_rep, 'hdtopic_' . $hdid, 1); } } mysql_free_result($a_rep); $c .= '</div>'; } $c .= '<br /><br /> </div> </div> <div class="main_right"> <div class="box2"> <h4>' . ($r_res['iszz'] > 0 ? '赞助商' : '发起人') . '</h4> <div class="pic_text clearfix">'; if ($r_res['xqid'] > 0) { if ($xqdb['l1id'] > 0) { $q_rep = sprintf('select name from %s where level=1 and id=%s limit 1', $dbprefix . 'common_district', $xqdb['l1id']);
function yjl_qzdf($r_res) { global $uadb, $dbprefix, $yjl_dbprefix, $_GET, $yjl_tpath, $a_qzca, $user_id, $udb, $p_size, $page; $q_rep = sprintf('select a.qztid, b.* from %s as a, %s as b where a.tid=b.tid and a.qzid=%s order by a.datetime desc', $yjl_dbprefix . 'qz_topic', $dbprefix . 'topic', $r_res['qzid']); $a_rep = mysql_query($q_rep) or die(mysql_error()); $tr_rep = mysql_num_rows($a_rep); if ($tr_rep > 0) { $c = '<ul class="list_comment">'; $tp_rep = ceil($tr_rep / $p_size); if ($page > $tp_rep) { $page = $tp_rep; } $q_l_rep = sprintf('%s limit %d, %d', $q_rep, ($page - 1) * $p_size, $p_size); $rep = mysql_query($q_l_rep) or die(mysql_error()); $r_rep = mysql_fetch_assoc($rep); do { if (!isset($uadb[$r_rep['uid']])) { $uadb[$r_rep['uid']] = yjl_udb($r_rep['uid']); } $c .= '<li id="wb_' . $r_rep['tid'] . '"> <div class="left"> <a href="user-' . $r_rep['uid'] . '.html"><img src="' . yjl_face($r_rep['uid'], $uadb[$r_rep['uid']]['face']) . '" /></a>'; if ($uadb[$r_rep['uid']]['qx'] == 5) { $c .= '<div class="m_sp1">监理师</div>'; } $c .= '</div> <div class="right"> <h3><a href="user-' . $r_rep['uid'] . '.html">' . $uadb[$r_rep['uid']]['nc'] . '</a>:'; if ($r_rep['longtextid'] > 0) { $q_reu = sprintf('select `longtext` from %s where id=%s and tid=%s limit 1', $dbprefix . 'topic_longtext', $r_rep['longtextid'], $r_rep['tid']); $reu = mysql_query($q_reu) or die(mysql_error()); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $c .= $r_reu['longtext']; } else { $r_rep['longtextid'] = 0; } mysql_free_result($reu); } if ($r_rep['longtextid'] == 0) { $c .= yjl_wbdecode($r_rep['content']); } $c .= '</h3>'; if ($r_rep['imageid'] != '') { $ai = explode(',', $r_rep['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(mysql_error()); $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_rep['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_rep['videoid'] > 0) { $q_reu = sprintf('select video_url, video_img from %s where id=%s limit 1', $dbprefix . 'topic_video', $r_rep['videoid']); $reu = mysql_query($q_reu) or die(mysql_error()); $r_reu = mysql_fetch_assoc($reu); if (mysql_num_rows($reu) > 0) { $img_a[$r_rep['tid']]['v' . $r_rep['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_rep['tid']])) { $c .= join(' ', $img_a[$r_rep['tid']]); } $c .= '<p class="other">'; if ($user_id > 0 && ($udb['qx'] == 10 || $udb['isxg'] > 0 || $user_id == $r_rep['uid'])) { $c .= '<span><a href="faq.php?id=' . $r_res['qzid'] . '&delhf=' . $r_rep['qztid'] . '" onclick="if(!confirm(\'确认删除?\'))return false;" style="color: #f00;">删除</a></span>'; } $c .= yjl_wbdate($r_rep['dateline']) . '</p></div></li>'; } while ($r_rep = mysql_fetch_assoc($rep)); mysql_free_result($rep); $c .= '</ul>'; if ($tp_rep > 1) { $c .= yjl_newhmpage('faq-' . $r_res['qzid'] . '-p[p].html', $page, $tp_rep, 'faq_topic'); } return $c; } mysql_free_result($a_rep); }