} if ($pa > 0) { $js_c .= ' $("img[name=\'del_list_img\']").click(function(){ if(confirm(\'确认要删除?\'))location.href=\'?m=album&id=' . $r_dbp['id'] . '&did=\'+$(this).data(\'id\'); });'; $cm[] = ' <img src="images/o_2.gif" alt="" title="删除" name="' . ($pa == 9 ? 'del_list_img' : 'hs_cbt') . '" data-id="' . ($pa == 9 ? '0' : 'l_0|del_0') . '" class="f_link"/>'; } if ($pa == 9 && $r_dbp['disp'] > 0) { $cm[] = ' <span class="del_n">已删除</span> <a href="?m=album&id=' . $r_dbp['id'] . '&pid=0"><img src="images/o_4.gif" alt="" title="恢复"/></a>'; } } if (isset($cm)) { $content .= '<span class="gmod">' . join(' ', $cm) . '</span>'; } $content .= $t . ' <span class="gdate">' . getalink($r_dbp['aid'], $r_dbp['name']) . ', ' . getldate($r_dbp['datetime']) . '</span></div>'; $eb = 3; $js_c .= ' var i0=' . $eb . '; var i1=' . $eb . '; $("#pr_b0").click(function(){ if($("div[rel=\'pr_a\']:last img").attr(\'src\').match(\'images/r_al.gif\')){ }else{ if($("div[rel=\'pr_a1\']").length>0){ $("div[rel=\'pr_a1\']:first").show(500); $("div[rel=\'pr_a1\']:first").attr(\'rel\', \'pr_a\'); }else{ $("div[rel=\'pr_a\']:last").after(\'<div class="pr_ld_img" rel="pr_a" style="display: none;background-image: url(images/loading.gif);"></div>\'); $("div[rel=\'pr_a\']:last").show(500); $("div[rel=\'pr_a\']:last").load(\'j_photo.php?i=' . $r_dbp['id'] . '&s=\'+i0, function(){ $("div[rel=\'pr_a\']:last").css(\'background-image\', \'\');
exit; } else { $title .= '班级活动'; $s_a_dbc = sprintf('select a.*, b.name from %s as a, %s as b where a.aid=b.id and a.disp=0 order by a.closed, a.sticky desc, a.datetime desc', $dbprefix . 'camp', $dbprefix . 'member'); $q_a_dbc = mysql_query($s_a_dbc) or die(''); $c_dbc = mysql_num_rows($q_a_dbc); if ($c_dbc > 0) { $p_dbc = ceil($c_dbc / $config['pagesize']); if ($page > $p_dbc) { $page = $p_dbc; } $s_dbc = sprintf('%s limit %d, %d', $s_a_dbc, ($page - 1) * $config['pagesize'], $config['pagesize']); $q_dbc = mysql_query($s_dbc) or die(''); $r_dbc = mysql_fetch_assoc($q_dbc); do { $ca[$r_dbc['id']][] = '发起人:<a href="?m=user&id=' . $r_dbc['aid'] . '">' . $r_dbc['name'] . '</a>, ' . ($r_dbc['closed'] > 0 ? '已结束' : getldate($r_dbc['datetime'])); if ($r_dbc['content'] != '') { $ca[$r_dbc['id']][] = gbookencode($r_dbc['content']) . '<br/>'; } if ($r_dbc['closed'] == 0) { if ($r_dbc['cdate'] != '') { $ca[$r_dbc['id']][] = '<strong>活动时间:</strong>' . $r_dbc['cdate']; } if ($r_dbc['cloc'] != '') { $ca[$r_dbc['id']][] = '<strong>活动地点:</strong>' . $r_dbc['cloc']; } if ($r_dbc['cpay'] != '') { $ca[$r_dbc['id']][] = '<strong>活动费用:</strong>' . $r_dbc['cpay']; } $s_dbu = sprintf('select sum(tid) as ctid from %s where cid=%s', $dbprefix . 'cuser', $r_dbc['id']); $q_dbu = mysql_query($s_dbu) or die('');
} } closedir($path_id); $content .= '<div class="title">上传文件管理</div><div class="lcontent"><div class="file_list" style="background-image: url(images/file_fo.gif);"><b>' . $path . '</b></div><br/>'; if ($pm != '') { $content .= '<div class="file_list" style="background-image: url(images/o_0.gif);"><a href="?m=setting&t=file&p=' . $up . '">../</a></div>'; } if (isset($file_a) && count($file_a) > 0) { $js_c .= ' $("img[name=\'del_img\']").click(function(){ if(confirm(\'确认要删除?\'))location.href=\'?m=setting&t=file&p=' . $pm . '&did=\'+$(this).data(\'id\'); });'; rsort($file_a); foreach ($file_a as $v) { if ($v[2] > 0) { $content .= '<div class="file_list" style="background-image: url(images/file_fc.gif);"><a href="?m=setting&t=file&p=' . $pm . $v[1] . '">' . $v[1] . '/</a></div>'; } else { $fid = md5($v[1]); if (isset($_GET['did']) && $_GET['did'] == $fid) { unlink($path . $v[1]); header('Location:./?m=setting&t=file&p=' . $pm); exit; } $content .= '<div class="file_list" style="background-image: url(images/file_ff.gif);"><a href="' . $path . $v[1] . '">' . $v[1] . '</a> - ' . getldate($v[0]) . ' <img src="images/o_2.gif" alt="" title="删除" name="del_img" data-id="' . $fid . '" class="f_link"/></div>'; } } } else { $content .= '<br/>当前目录没有文件'; } $content .= '</div>'; }
} else { $title .= ' - 收件箱'; $s_a_dbg = sprintf('select a.*, b.name from %s as a, %s as b where a.tid=%s and a.aid=b.id order by a.datetime desc', $dbprefix . 'message', $dbprefix . 'member', $_SESSION[$config['u_hash']]); $q_a_dbg = mysql_query($s_a_dbg) or die(''); $c_dbg = mysql_num_rows($q_a_dbg); if ($c_dbg > 0) { $p_dbg = ceil($c_dbg / $config['pagesize']); if ($page > $p_dbg) { $page = $p_dbg; } $s_dbg = sprintf('%s limit %d, %d', $s_a_dbg, ($page - 1) * $config['pagesize'], $config['pagesize']); $q_dbg = mysql_query($s_dbg) or die(''); $r_dbg = mysql_fetch_assoc($q_dbg); $content .= '<div class="title">收件箱</div>'; do { $content .= '<div class="topic" id="topic-' . $r_dbg['id'] . '"><a href="?m=message&id=' . $r_dbg['aid'] . '#msg-' . $r_dbg['id'] . '">' . $r_dbg['name'] . '</a> 致 我' . ($r_dbg['readed'] > 0 ? ' <img src="../images/new.gif" alt="" title="新消息"/>' : '') . ' ' . getldate($r_dbg['datetime']) . '<div class="list_c">' . mbookencode($r_dbg['content']) . '</div></div>'; if ($r_dbg['readed'] > 0) { $u_db = sprintf('update %s set readed=0 where id=%s', $dbprefix . 'message', $r_dbg['id']); $result = mysql_query($u_db) or die(''); } } while ($r_dbg = mysql_fetch_assoc($q_dbg)); mysql_free_result($q_dbg); if ($p_dbg > 1) { $content .= getpage($page, $p_dbg); } } else { $content .= '<div class="title">短消息</div><div class="lcontent">没有短消息</div>'; } mysql_free_result($q_a_dbg); } } else {
$q_dbr = mysql_query($s_dbr) or die(''); if ($r_dbl['tid'] == 0 && $p_dbr > 1) { $content .= '<span class="plist_' . $r_dbl['id'] . '" id="plist_' . $r_dbl['id'] . '_1">'; } } $r_dbr = mysql_fetch_assoc($q_dbr); do { $ei = $r_dbl['tid'] == 0 && $c_log && ($pa > $r_dbr['power'] || $_SESSION[$config['u_hash']] == $r_dbr['aid']) ? ' <img src="images/o_3.gif" alt="" title="编辑" name="hs_cbt" data-id="l_' . $r_dbr['id'] . '|h_' . $r_dbr['id'] . '" class="f_link"/>' : ''; $content .= '<div class="reply_v"><div id="l_' . $r_dbr['id'] . '">' . getalink($r_dbr['aid'], $r_dbr['name'], 1) . ':' . getaco($r_dbr['content'], $r_dbr['id'], 1) . '</div>'; if ($ei != '') { $content .= getcform($r_dbr['id'], $r_dbr['content']); } if ($r_dbl['tid'] == 0 && $c_log && $pa > 0 && $pa < 9) { $content .= '<form method="post" action="" class="btform" id="del_' . $r_dbr['id'] . '" style="display: none;"><table><tr><td>删除理由:</td><td><input name="rtext" size="32" class="bt_input" rel="删除理由" /></td></tr><tr><td colspan="2"><input type="submit" value="删除" class="button" /> <input value="取消" class="button" type="button" name="h_cbt" data-id="del_' . $r_dbr['id'] . '"/><input type="hidden" name="did" value="' . $r_dbr['id'] . '" /></td></tr></table></form>'; } $content .= '<div class="reply_i">- ' . getldate($r_dbr['datetime']) . $ei; if ($r_dbl['tid'] == 0 && $c_log) { if ($pa > 0) { $content .= ' <img src="images/o_2.gif" alt="" title="删除" name="' . ($pa == 9 ? 'del_list_img' : 's_cbt') . '" data-id="' . ($pa == 9 ? '' : 'del_') . $r_dbr['id'] . '" class="f_link"/>'; } if ($pa == 9 && $r_dbr['disp'] > 0) { $content .= ' <span class="del_n">已删除</span> <a href="?page=' . $page . '&pid=' . $r_dbr['id'] . '"><img src="images/o_4.gif" alt="" title="恢复"/></a>'; } } $content .= '</div></div>'; } while ($r_dbr = mysql_fetch_assoc($q_dbr)); if ($r_dbl['tid'] > 1) { $content .= '<a href="?m=' . ($r_dbl['tid'] > 2 ? 'camp' : 'album') . '&id=' . $r_dbl['sid'] . '">更多留言</a>'; } else { mysql_free_result($q_dbr); if ($p_dbr > 1) {
if ($id > 0 && $is_comment > 0 || $c_dbr > 0) { $content .= '<div class="reply_d">'; } if ($c_dbr > 0) { if ($id == 0 && $r_dbt['tid'] < 2) { $s_dbr = sprintf('%s limit %d', $s_a_dbr, $reply_s); $q_dbr = mysql_query($s_dbr) or die(''); } $r_dbr = mysql_fetch_assoc($q_dbr); $i = 0; $fid = 0; do { if ($i == 0) { $fid = $r_dbr['id']; } $content .= '<div class="reply_v" id="reply-' . $r_dbr['id'] . '"><a href="?m=user&id=' . $r_dbr['aid'] . '">' . $r_dbr['name'] . '</a>:' . ($id > 0 ? mbookencode($r_dbr['content']) : getmco($r_dbr['content'], $r_dbt['id'], $r_dbr['id'], 1)) . '<div class="reply_i">- ' . getldate($r_dbr['datetime']) . '</div></div>'; $i++; } while ($r_dbr = mysql_fetch_assoc($q_dbr)); if ($id == 0) { if ($r_dbt['tid'] > 1) { $content .= '<div class="reply_v"><a href="?m=' . ($r_dbt['tid'] > 2 ? 'camp' : 'album') . '&id=' . $r_dbt['sid'] . '#topic-' . $fid . '">更多评论</a></div>'; } else { mysql_free_result($q_dbr); if ($is_comment > 0) { $a_ci[$r_dbt['id']][] = '<a href="?m=list&id=' . $r_dbt['id'] . '#reply">发表回复</a>'; } if ($c_dbr > $reply_s) { $a_ci[$r_dbt['id']][] = '<a href="?m=list&id=' . $r_dbt['id'] . '">更多回复</a>'; } if (isset($a_ci[$r_dbt['id']])) { $content .= '<div class="reply_v">' . join(' | ', $a_ci[$r_dbt['id']]) . '</div>';
} $s_dba = sprintf('%s limit %d, %d', $s_a_dba, ($page - 1) * $config['pagesize'], $config['pagesize']); $q_dba = mysql_query($s_dba) or die(''); $r_dba = mysql_fetch_assoc($q_dba); $js_c .= ' $("img[name=\'del\']").click(function(){ if(confirm(\'确认要删除?\'))location.href=\'?m=setting&t=adminop&did=\'+$(this).data(\'id\'); });'; do { if (isset($_GET['did']) && $_GET['did'] == $r_dba['id']) { $d_db = sprintf('delete from %s where id=%s', $dbprefix . 'adminop', $r_dba['id']); $result = mysql_query($d_db) or die(''); header('Location:./?m=setting&t=adminop'); exit; } else { $content .= '<li class="l_list"><a href="?m=user&id=' . $r_dba['aid'] . '"><img src="avator.php?id=' . $r_dba['aid'] . '" alt="" title="' . $r_dba['name'] . '" class="photo" width="55" height="55"/></a><div class="list_r"><div class="list_title"><span class="gmod"><img src="images/o_2.gif" alt="" title="删除" name="del" data-id="' . $r_dba['id'] . '" class="f_link"/></span>' . getalink($r_dba['aid'], $r_dba['name']) . ' <span class="gdate">' . getldate($r_dba['datetime']) . '</span></div><div class="list_c">'; switch ($r_dba['tid']) { case 1: $pr = getpinfo($r_dba['sid']); $content .= '<a href="?m=album&id=' . $r_dba['sid'] . '"><img src="' . getthu($pr) . '" alt="" title="' . $pr['title'] . '" width="70" height="70" class="al_t"/></a><br/>'; break; case 2: $pr = getcinfo($r_dba['sid'], 'title'); $content .= '<a href="?m=camp&id=' . $r_dba['sid'] . '">' . $pr['title'] . '</a><br/><br/>'; break; } $content .= gbookencode($r_dba['content']) . '</div></div></li>'; } } while ($r_dba = mysql_fetch_assoc($q_dba)); mysql_free_result($q_dba); $content .= '</ul>';
} if ($r_dbc['cloc'] != '') { $ca[$r_dbc['id']][] = '<strong>活动地点:</strong>' . $r_dbc['cloc']; } if ($r_dbc['cpay'] != '') { $ca[$r_dbc['id']][] = '<strong>活动费用:</strong>' . $r_dbc['cpay']; } $s_dbu = sprintf('select sum(tid) as ctid from %s where cid=%s', $dbprefix . 'cuser', $r_dbc['id']); $q_dbu = mysql_query($s_dbu) or die(''); $r_dbu = mysql_fetch_assoc($q_dbu); if (mysql_num_rows($q_dbu) > 0 && $r_dbu['ctid'] > 0) { $ca[$r_dbc['id']][] = '<strong>已报名人数:</strong> ' . $r_dbu['ctid'] . ' 人'; } mysql_free_result($q_dbu); } $content .= '<li><div class="title"><a href="?m=camp&id=' . $r_dbc['id'] . '">' . $r_dbc['title'] . '</a> <span class="gdate">' . ($r_dbc['closed'] > 0 ? '已结束' : '发起人:' . getalink($r_dbc['aid'], $r_dbc['name']) . ', ' . getldate($r_dbc['datetime'])) . ($r_dbc['disp'] > 0 ? ' <span class="del_n">已删除</span>' : '') . '</span></div>' . (isset($ca[$r_dbc['id']]) ? '<div class="lcontent">' . join('<br/>', $ca[$r_dbc['id']]) . '</div>' : '') . '</li>'; } while ($r_dbc = mysql_fetch_assoc($q_dbc)); mysql_free_result($q_dbc); $content .= '</ul>'; if ($p_dbc > 1) { $content .= getpage($page, $p_dbc); } } else { $content .= '<li><div class="title">班级活动</div><div class="lcontent">没有活动</div></li></ul>'; } mysql_free_result($q_a_dbc); if ($c_log) { $content .= '<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script><div class="title">发起活动</div><div class="lcontent"><form method="post" action="" class="btform" id="camform"><table><tr><td>活动名称:</td><td><input name="title" size="32" class="bt_input" rel="活动名称" /></td></tr><tr><td>活动时间:</td><td><input name="cdate" size="32" /></td></tr><tr><td>活动地点:</td><td><input name="cloc" title="准确填写详细住址后可以在地图上显示" id="formloc" size="32" /><span name="s_cbt" data-id="map_tr" class="mlink f_link">从地图上选取</span></td></tr><tr id="map_tr" style="display: none;"><td></td><td>操作方法:左键按住移动,滚轮放大缩小,左键单击选取地点 <span name="h_cbt" data-id="map_tr" class="mlink f_link">关闭地图</span><div style="width: 400px;height: 300px;border:1px solid #999;" id="map_container"></div></td></tr><tr><td>活动费用:</td><td><input name="cpay" size="32" /></td></tr></table><div class="formline"><textarea name="rinfo" cols="50" rows="5"></textarea></div><div class="formline"><input type="submit" value="发布" class="button" /> <input type="reset" value="取消" class="button" /></div></form></div>'; $js_c .= ' var map=new BMap.Map(\'map_container\'); var opts={type: BMAP_NAVIGATION_CONTROL_SMALL}
function getpcinfo($r) { global $pa, $c_log, $dbprefix, $config; $u = '?m=' . (isset($r['pid']) ? 'album&id=' . $r['pid'] : 'camp&id=' . $r['cid']); $c = '<li class="l_list"><a href="?m=user&id=' . $r['aid'] . '"><img src="avator.php?id=' . $r['aid'] . '" alt="" title="' . $r['name'] . '" class="photo" width="55" height="55"/></a><div class="list_r"><div class="list_title">'; if ($c_log && (!isset($r['sid']) || $r['sid'] == 0)) { if ($pa > $r['power'] || $_SESSION[$config['u_hash']] == $r['aid']) { $cm[] = ' <img src="images/o_3.gif" alt="" title="编辑" name="hs_cbt" data-id="l_' . $r['id'] . '|h_' . $r['id'] . '" class="f_link"/>'; } if ($pa > 0) { $cm[] = ' <img src="images/o_2.gif" alt="" title="删除" name="' . ($pa == 9 ? 'del_list_img' : 's_cbt') . '" data-id="' . ($pa == 9 ? '' : 'del_') . $r['id'] . '" class="f_link"/>'; } if ($pa == 9 && $r['disp'] > 0) { $cm[] = ' <span class="del_n">已删除</span> <a href="' . $u . '&pid=' . $r['id'] . '"><img src="images/o_4.gif" alt="" title="恢复"/></a>'; } } if (isset($cm)) { $c .= '<span class="gmod">' . join(' ', $cm) . '</span>'; } $c .= getalink($r['aid'], $r['name']) . ' <span class="gdate">' . getldate($r['datetime']) . '</span></div><div class="list_c">'; if ($c_log && $pa > 0 && $pa < 9 && (!isset($r['sid']) || $r['sid'] == 0)) { $c .= '<form method="post" action="" class="btform" id="del_' . $r['id'] . '" style="display: none;"><table><tr><td>删除理由:</td><td><input name="rtext" size="32" class="bt_input" rel="删除理由" /></td></tr><tr><td colspan="2"><input type="submit" value="删除" class="button" /> <input value="取消" class="button" type="button" name="h_cbt" data-id="del_' . $r['id'] . '"/><input type="hidden" name="did" value="' . $r['id'] . '" /></td></tr></table></form>'; } $c .= '<div id="l_' . $r['id'] . '">'; if (isset($r['sid']) && $r['sid'] > 0) { $pr = getpinfo($r['sid']); $u = $pr['url']; if ($pr['upload'] == 0) { $tb_i = ''; if (strstr($u, '[/]')) { $a_u = explode('[/]', $u); $l_u = count($a_u) - 1; $t_u = $a_u[$l_u]; if (trim($t_u) != '' && strstr(trim($t_u), '://')) { $tb_i = trim($t_u); unset($a_u[$l_u]); } $u = join('[/]', $a_u); } } if ($pr['vid'] > 0) { $c .= '<img src="' . getthu($pr) . '" width="70" height="70" class="f_link video_slink al_t" alt="" title="观看视频" data-id="' . $r['id'] . '"/><div id="video_div_' . $r['id'] . '"></div><textarea id="video_text_' . $r['id'] . '" style="display: none;">' . htmlspecialchars($u, ENT_QUOTES) . '</textarea><a href="?m=album&id=' . $r['sid'] . '">' . ($pr['title'] != '' ? $pr['title'] : '视频 #' . $pr['id']) . '</a>'; } else { $c .= '<img src="' . getthu($pr) . '" alt="" title="点击查看原图" width="70" height="70" class="f_link img_lb al_t" data-img="' . ($config['slink'] > 0 || $pr['upload'] == 0 ? ($pr['upload'] > 0 ? 'file/' : '') . $u : 'img.php?id=' . $pr['id']) . '"/><br/><a href="?m=album&id=' . $r['sid'] . '">' . ($pr['title'] != '' ? $pr['title'] : '照片 #' . $pr['id']) . '</a>'; } $reply_s = 5; $s_dbr = sprintf('select a.id, a.aid, a.content, a.datetime, b.name from %s as a, %s as b where a.pid=%s and a.aid=b.id and a.disp=0 order by a.datetime desc limit %d', $dbprefix . 'pcomment', $dbprefix . 'member', $r['sid'], $reply_s); $q_dbr = mysql_query($s_dbr) or die(''); $r_dbr = mysql_fetch_assoc($q_dbr); if (mysql_num_rows($q_dbr) > 0) { $c .= '<div id="reply_v_' . $r['id'] . '" class="reply_d">'; do { $c .= '<div class="reply_v"><div id="l_' . $r_dbr['id'] . '">' . getalink($r_dbr['aid'], $r_dbr['name'], 1) . ':' . getaco($r_dbr['content'], $r_dbr['id'], 1) . '</div><div class="reply_i">- ' . getldate($r_dbr['datetime']) . '</div></div>'; } while ($r_dbr = mysql_fetch_assoc($q_dbr)); $c .= '<a href="?m=album&id=' . $r['sid'] . '">更多留言</a></div>'; } mysql_free_result($q_dbr); } else { $c .= getaco($r['content'], $r['id']); } $c .= '</div>'; if ($c_log && ($pa > $r['power'] || $_SESSION[$config['u_hash']] == $r['aid']) && (!isset($r['sid']) || $r['sid'] == 0)) { $c .= getcform($r['id'], $r['content']); } $c .= '</div></div></li>'; return $c; }
$q_a_dbg = mysql_query($s_a_dbg) or die(''); $c_dbg = mysql_num_rows($q_a_dbg); if ($c_dbg > 0) { $p_dbg = ceil($c_dbg / $config['pagesize']); if ($page > $p_dbg) { $page = $p_dbg; } $s_dbg = sprintf('%s limit %d, %d', $s_a_dbg, ($page - 1) * $config['pagesize'], $config['pagesize']); $q_dbg = mysql_query($s_dbg) or die(''); $r_dbg = mysql_fetch_assoc($q_dbg); $js_c .= ' $("img[name=\'del_img\']").click(function(){ if(confirm(\'确认要删除?\'))location.href=\'?m=message&did=\'+$(this).data(\'id\'); });'; do { $content .= '<li class="l_list"><a href="?m=user&id=' . $r_dbg['aid'] . '"><img src="avator.php?id=' . $r_dbg['aid'] . '" alt="" title="' . $r_dbg['name'] . '" class="photo" width="55" height="55"/></a><div class="list_r"><div class="list_title"><span class="gmod"><img src="images/o_2.gif" alt="" title="删除" name="del_img" data-id="' . $r_dbg['id'] . '" class="f_link"/></span><a href="?m=message&id=' . $r_dbg['aid'] . '#m' . $r_dbg['id'] . '">' . $r_dbg['name'] . ' 致 我</a>' . ($r_dbg['readed'] > 0 ? ' <img src="images/new.gif" alt="" title="新消息"/>' : '') . ' <span class="gdate">' . getldate($r_dbg['datetime']) . '</span></div><div class="list_c">' . gbookencode($r_dbg['content']) . '</div></div></li>'; if ($r_dbg['readed'] > 0) { $u_db = sprintf('update %s set readed=0 where id=%s', $dbprefix . 'message', $r_dbg['id']); $result = mysql_query($u_db) or die(''); } } while ($r_dbg = mysql_fetch_assoc($q_dbg)); mysql_free_result($q_dbg); $content .= '</ul>'; if ($p_dbg > 1) { $content .= getpage($page, $p_dbg); } } else { $content .= '<li><div class="gcontent">没有短消息</div></li></ul>'; } mysql_free_result($q_a_dbg); }
$c_dbt = mysql_num_rows($q_a_dbt); if ($c_dbt > 0) { $p_dbt = ceil($c_dbt / $reply_s); if ($page > $p_dbt) { $page = $p_dbt; } $s_dbt = sprintf('%s limit %d, %d', $s_a_dbt, ($page - 1) * $reply_s, $reply_s); $q_dbt = mysql_query($s_dbt) or die(''); $r_dbt = mysql_fetch_assoc($q_dbt); do { $ei = $c_log && ($pa > $r_dbt['power'] || $_SESSION[$config['u_hash']] == $r_dbt['aid']) ? ' <img src="images/o_3.gif" alt="" title="编辑" onclick="$(\'#l_' . $r_dbt['id'] . '\').slideUp(500);$(\'#h_' . $r_dbt['id'] . '\').slideDown(500);" class="f_link"/>' : ''; echo '<div class="reply_v"><div id="l_' . $r_dbt['id'] . '">' . getalink($r_dbt['aid'], $r_dbt['name'], 1) . ':' . getaco($r_dbt['content'], $r_dbt['id'], 1) . '</div>' . ($ei != '' ? '<form method="post" action="" id="h_' . $r_dbt['id'] . '" style="display: none;" onsubmit="return chkform(\'h_' . $r_dbt['id'] . '\');"><div class="formline"><textarea name="rinfo" id="forminfo' . $r_dbt['id'] . '" class="bt_input" rel="留言内容" rows="4">' . $r_dbt['content'] . '</textarea>' . getsync_c($ar) . '</div><div class="formline"><input type="submit" value="修改" class="button" /> <input value="取消" class="button" type="button" onclick="$(\'#h_' . $r_dbt['id'] . '\').slideUp(500);$(\'#l_' . $r_dbt['id'] . '\').slideDown(500);"/><input type="hidden" name="id" value="' . $r_dbt['id'] . '" /></div></form>' : ''); if ($c_log && $pa > 0 && $pa < 9) { echo '<form method="post" action="" onsubmit="return chkform(\'del_' . $r_dbt['id'] . '\');" id="del_' . $r_dbt['id'] . '" style="display: none;"><table><tr><td>删除理由:</td><td><input name="rtext" size="32" class="bt_input" rel="删除理由" /></td></tr><tr><td colspan="2"><input type="submit" value="删除" class="button" /> <input value="取消" class="button" type="button" onclick="$(\'#del_' . $r_dbt['id'] . '\').slideUp(500);"/><input type="hidden" name="did" value="' . $r_dbt['id'] . '" /></td></tr></table></form>'; } echo '<div class="reply_i">- ' . getldate($r_dbt['datetime']) . $ei; if ($c_log) { if ($pa > 0) { echo ' <img src="images/o_2.gif" alt="" title="删除" onclick="' . ($pa == 9 ? 'if(confirm(\'确认要删除?\'))location.href=\'?page=' . $dpage . '&did=' . $r_dbt['id'] . '\';' : '$(\'#del_' . $r_dbt['id'] . '\').slideDown(500);') . '" class="f_link"/>'; } if ($pa == 9 && $r_dbt['disp'] > 0) { echo ' <span class="del_n">已删除</span> <a href="?page=' . $dpage . '&pid=' . $r_dbt['id'] . '"><img src="images/o_4.gif" alt="" title="恢复"/></a>'; } } echo '</div></div>'; } while ($r_dbt = mysql_fetch_assoc($q_dbt)); mysql_free_result($q_dbt); if ($p_dbt > 1) { for ($i = 1; $i <= $p_dbt; $i++) { echo ($i != $page ? '<span onclick="ld(' . $r . ', ' . $i . ', \'j_topic.php?i=' . $r . '&p=' . $i . '&e=' . $dpage . '\');" class="mlink f_link">' . $i . '</span>' : $i) . ' '; }
if ($c_log) { $cr = getuinfo($r_dbu, 1); $content .= $cr . ($cr != '' ? '<br/>' : ''); if ($r_dbu['jaid'] > 0) { $jadb = getainfo($r_dbu['jaid'], 'name'); $content .= '邀请人:<a href="?m=user&id=' . $jadb['id'] . '">' . $jadb['name'] . '</a><br/>'; } } $content .= '最后访问:' . ($r_dbu['visitdate'] > 0 ? date('Y-n-j H:i', $r_dbu['visitdate']) : '从未') . (isset($l_ip) ? '<br/>最后IP:' . ($config['ip'] != '' ? str_replace('[ip]', $l_ip, $config['ip']) : $l_ip) : '') . ($r_dbu['visit'] > 0 ? '<br/>访问次数:' . $r_dbu['visit'] : '') . (isset($a_sync_i) ? '<br/>' . join(' ', $a_sync_i) . '<br/><br/>' : '') . (isset($a_sync_v) ? join('', $a_sync_v) : '') . '</div></div>'; $s_dbt = sprintf('select content, datetime from %s where aid=%s and disp=0 and tid=0 and mid=0 order by datetime desc limit 5', $dbprefix . 'topic', $r_dbu['id']); $q_dbt = mysql_query($s_dbt) or die(''); $r_dbt = mysql_fetch_assoc($q_dbt); if (mysql_num_rows($q_dbt) > 0) { $content .= '<br/><div class="title">最近留言</div><br/><ul class="clist">'; do { $content .= '<li class="l_list"><img src="avator.php?id=' . $r_dbu['id'] . '" alt="" title="' . $r_dbu['name'] . '" class="photo" width="55" height="55"/><div class="list_r"><div class="list_title"><span class="gdate">' . getldate($r_dbt['datetime']) . '</span></div><div class="list_c">' . gbookencode($r_dbt['content']) . '</div></div></li>'; } while ($r_dbt = mysql_fetch_assoc($q_dbt)); $content .= '</ul>'; } mysql_free_result($q_dbt); $s_dbp = sprintf('select id, title, url, vid, upload, disp from %s where aid=%s and disp=0 order by datetime desc limit 10', $dbprefix . 'photo', $r_dbu['id']); $q_dbp = mysql_query($s_dbp) or die(''); $r_dbp = mysql_fetch_assoc($q_dbp); if (mysql_num_rows($q_dbp) > 0) { $content .= '<br/><div class="title">最近照片视频</div><div class="gcontent">'; do { $content .= '<div class="al_list"><a href="?m=album&id=' . $r_dbp['id'] . '"><img src="' . getthu($r_dbp) . '" width="70" height="70" class="' . ($r_dbp['disp'] > 0 ? 'del_' : '') . 'al_t" alt="" title="' . ($r_dbp['vid'] > 0 ? '[视频]' : '') . ($r_dbp['title'] != '' ? $r_dbp['title'] : '') . '"/></a></div>'; } while ($r_dbp = mysql_fetch_assoc($q_dbp)); $content .= '<div class="extr"></div><a href="?m=album&user='******'id'] . '">查看全部…</a></div>'; } mysql_free_result($q_dbp);
mysql_free_result($q_dbc); } $content .= '</div>'; $s_a_dbr = sprintf('select a.id, a.aid, a.content, a.datetime, b.name from %s as a, %s as b where a.pid=%s and a.aid=b.id and a.disp=0 order by a.datetime desc', $dbprefix . 'pcomment', $dbprefix . 'member', $r_dbp['id']); $q_a_dbr = mysql_query($s_a_dbr) or die(''); $c_dbr = mysql_num_rows($q_a_dbr); if ($c_dbr > 0) { $p_dbr = ceil($c_dbr / $config['pagesize']); if ($page > $p_dbr) { $page = $p_dbr; } $s_dbr = sprintf('%s limit %d, %d', $s_a_dbr, ($page - 1) * $config['pagesize'], $config['pagesize']); $q_dbr = mysql_query($s_dbr) or die(''); $r_dbr = mysql_fetch_assoc($q_dbr); do { $content .= '<div class="topic" id="topic-' . $r_dbr['id'] . '"><a href="?m=user&id=' . $r_dbr['aid'] . '">' . $r_dbr['name'] . '</a> ' . getldate($r_dbr['datetime']) . '<div class="list_c">' . mbookencode($r_dbr['content']) . '</div></div>'; } while ($r_dbr = mysql_fetch_assoc($q_dbr)); mysql_free_result($q_dbr); } mysql_free_result($q_a_dbr); if (isset($p_dbr) && $p_dbr > 1) { $content .= getpage($page, $p_dbt); } if ($c_log) { $content .= '<div class="title">发表评论</div><div class="lcontent"><form method="post" action="" class="btform" id="lyform"><textarea name="rinfo" id="forminfor0" rows="4" style="width: 95%" class="bt_input" rel="内容"></textarea><br/><input type="submit" value="发表评论" /></form></div>'; } } } else { header('Location:./'); exit; }