* 请勿出售本程序或其修改版,请勿利用本程序或其修改版进行任何商业活动。 */ session_start(); require_once 'config.php'; require_once 'function.php'; $c_log = chklog(); if ($config['open'] == 0 || $c_log) { $i = isset($_GET['i']) && intval($_GET['i']) > 0 ? intval($_GET['i']) : 1; $t = isset($_GET['t']) && intval($_GET['t']) > 0 ? intval($_GET['t']) : 0; $s = isset($_GET['s']) && intval($_GET['s']) > 0 ? intval($_GET['s']) : 0; $s_dbp = sprintf('select id from %s where id=%s limit 1', $dbprefix . 'photo', $i); $q_dbp = mysql_query($s_dbp) or die(''); $r_dbp = mysql_fetch_assoc($q_dbp); if (mysql_num_rows($q_dbp) > 0) { if ($t > 0) { $qdb = '>' . $r_dbp['id'] . ' order by datetime'; } else { $qdb = '<' . $r_dbp['id'] . ' order by datetime desc'; } $s_dbn = sprintf('select id, title, url, vid, upload from %s where %sid%s limit %d, 1', $dbprefix . 'photo', $cdb, $qdb, $s); $q_dbn = mysql_query($s_dbn) or die(''); $r_dbn = mysql_fetch_assoc($q_dbn); if (mysql_num_rows($q_dbn) > 0) { echo '<a href="?m=album&id=' . $r_dbn['id'] . $u_l . '"><img src="' . getthu($r_dbn) . '" alt="" title="' . $r_dbn['title'] . '" class="pr_img" width="70" height="70" /></a>'; } else { echo '<img src="images/' . ($t > 0 ? 'l_al.gif" alt="" title="这是最后一张' : 'r_al.gif" alt="" title="这是第一张') . '" class="pr_img" width="70" height="70" />'; } mysql_free_result($q_dbn); } mysql_free_result($q_dbp); }
} $content .= '<div class="extr"></div></div>'; } } mysql_free_result($q_dbc); $vdb = $config['veri'] > 0 ? '' : ' where status=0'; $s_dbu = sprintf('select id, name from %s%s', $dbprefix . 'member', $vdb); $q_dbu = mysql_query($s_dbu) or die(''); $r_dbu = mysql_fetch_assoc($q_dbu); if (mysql_num_rows($q_dbu) > 0) { do { $s_dbp = sprintf('select id, title, url, vid, upload, datetime from %s where aid=%s and disp=0 order by datetime desc limit 1', $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) { $cu_list[] = array($r_dbp['datetime'], '<div class="al_list"><a href="?m=album&user='******'id'] . '"><img src="' . getthu($r_dbp) . '" width="70" height="70" class="cp_t" alt="" title="' . $r_dbu['name'] . '"/></a></div>'); } mysql_free_result($q_dbp); } while ($r_dbu = mysql_fetch_assoc($q_dbu)); if (isset($cu_list) && count($cu_list) > 0) { rsort($cu_list); $content .= '<br/><div class="title">班级成员</div><div class="gcontent">'; foreach ($cu_list as $v) { $content .= $v[1]; } $content .= '<div class="extr"></div></div>'; } } mysql_free_result($q_dbu); } $t_form = $config['upload'] > 0 ? 2 : 3;
$r_dbc = mysql_fetch_assoc($q_dbc); if (mysql_num_rows($q_dbc) > 0) { $content .= '<li>最新活动<ol>'; do { $content .= '<li><a href="?m=camp&id=' . $r_dbc['id'] . '" title="' . $r_dbc['title'] . '">' . substrs($r_dbc['title']) . '</a></li>'; } while ($r_dbc = mysql_fetch_assoc($q_dbc)); $content .= '<li><a href="?m=camp">更多……</a></li></ol></li>'; } mysql_free_result($q_dbc); $s_dbp = sprintf('select id, title, url, vid, upload from %s where disp=0 order by datetime desc limit 3', $dbprefix . 'photo'); $q_dbp = mysql_query($s_dbp) or die(''); $r_dbp = mysql_fetch_assoc($q_dbp); if (mysql_num_rows($q_dbp) > 0) { $content .= '<li>最新照片、视频<ol>'; do { $content .= '<li><a href="?m=album&id=' . $r_dbp['id'] . '"><img src="' . getthu($r_dbp) . '" width="70" height="70" class="al_t" alt="" title="' . ($r_dbp['vid'] > 0 ? '[视频]' : '') . $r_dbp['title'] . '"/></a></li>'; } while ($r_dbp = mysql_fetch_assoc($q_dbp)); $content .= '<li><a href="?m=album">更多……</a></li></ol></li>'; } mysql_free_result($q_dbp); $s_dbo = sprintf('select a.aid, b.name from %s as a, %s as b where a.online=1 and a.aid=b.id order by a.datetime desc limit 10', $dbprefix . 'online', $dbprefix . 'member'); $q_dbo = mysql_query($s_dbo) or die(''); $r_dbo = mysql_fetch_assoc($q_dbo); if (mysql_num_rows($q_dbo) > 0) { $content .= '<li>当前在线<ol>'; do { $content .= '<li>' . getalink($r_dbo['aid'], $r_dbo['name'], 2) . '</li>'; } while ($r_dbo = mysql_fetch_assoc($q_dbo)); $content .= '</ol></li>'; } mysql_free_result($q_dbo);
$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 ($p_dba > 1) { $content .= getpage($page, $p_dba); } } else {
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; }
$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); } else { header('Location:./'); exit; } mysql_free_result($q_dbu); } elseif (isset($_GET['t']) && $_GET['t'] == 'map') { $content .= '<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script><div class="title">班级成员 <span class="gdate"><a href="?m=user">列表模式</a></span></div>'; $js_c .= ' var p=$(\'#jz_div\').offset(); $(\'#map_container\').show(); $(\'#map_container\').css({\'top\':p.top+\'px\', \'left\':p.left+\'px\'});