Пример #1
0
 $content .= '<div class="title">' . $r_dbc['title'] . '</div><div class="lcontent">' . join('<br/>', $ca) . ($c_log && $r_dbc['closed'] == 0 ? '<br/><br/><form method="post" action="" class="btform_nv">参加人数:<br/><input name="tid" id="formtid" style="width: 90%;" value="' . (isset($cjoin) && $cjoin > 0 ? $cjoin : '1') . '" /><br/><input type="submit" value="' . (isset($cjoin) && $cjoin > 0 ? '修改参加人数" /><br/><input type="submit" value="我要退出这个活动" name="delu" />' : '我要参加这个活动" />') . '<input type="hidden" name="jid" value="1"/></form>' : '') . '</div>';
 $s_a_dbr = sprintf('select a.*, b.power, b.name from %s as a, %s as b where a.cid=%s and a.aid=b.id and a.disp=0 order by a.datetime desc', $dbprefix . 'ccomment', $dbprefix . 'member', $r_dbc['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&amp;id=' . $r_dbr['aid'] . '">' . $r_dbr['name'] . '</a>&nbsp;&nbsp;' . getldate($r_dbr['datetime']) . '<div class="list_c">';
         if ($r_dbr['sid'] > 0) {
             $pr = getpinfo($r_dbr['sid']);
             $content .= '<a href="?m=album&amp;id=' . $r_dbr['sid'] . '"><img src="' . getmthu($pr) . '" alt="" title="' . ($pr['vid'] > 0 ? '[视频]' : '') . $pr['title'] . '" width="70" height="70" class="photo"/></a>';
             $reply_s = 5;
             $s_dbb = 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_dbr['sid'], $reply_s);
             $q_dbb = mysql_query($s_dbb) or die('');
             $r_dbb = mysql_fetch_assoc($q_dbb);
             if (mysql_num_rows($q_dbb) > 0) {
                 $content .= '<div class="reply_d">';
                 $i = 0;
                 $fid = 0;
                 do {
                     if ($i == 0) {
                         $fid = $r_dbb['id'];
                     }
                     $content .= '<div class="reply_v"><a href="?m=user&amp;id=' . $r_dbb['aid'] . '">' . $r_dbb['name'] . '</a>:' . mbookencode($r_dbb['content']) . '<div class="reply_i">- ' . getldate($r_dbb['datetime']) . '</div></div>';
                     $i++;
Пример #2
0
 if ($c_dbt > 0) {
     if ($id == 0) {
         $p_dbt = ceil($c_dbt / $config['pagesize']);
         if ($page > $p_dbt) {
             $page = $p_dbt;
         }
         $s_dbt = sprintf('%s limit %d, %d', $s_a_dbt, ($page - 1) * $config['pagesize'], $config['pagesize']);
         $q_dbt = mysql_query($s_dbt) or die('');
     }
     $r_dbt = mysql_fetch_assoc($q_dbt);
     do {
         unset($cm);
         $content .= '<div class="topic" id="topic-' . $r_dbt['id'] . '"><a href="?m=user&amp;id=' . $r_dbt['aid'] . '">' . $r_dbt['name'] . '</a>&nbsp;&nbsp;' . getldate($r_dbt['datetime']) . '<div class="list_c">';
         switch ($r_dbt['tid']) {
             case 2:
                 $pr = getpinfo($r_dbt['sid']);
                 $content .= '<a href="?m=album&amp;id=' . $r_dbt['sid'] . '"><img src="' . getmthu($pr) . '" alt="" title="' . ($pr['vid'] > 0 ? '[视频]' : '') . $pr['title'] . '" width="70" height="70" class="photo"/></a>';
                 break;
             case 3:
                 $pr = getcinfo($r_dbt['sid'], 'content, closed, cdate, cloc, cpay, title');
                 if ($pr['content'] != '') {
                     $ca[$r_dbt['id']][] = mbookencode($pr['content']);
                 }
                 if ($pr['closed'] == 0) {
                     if ($pr['cdate'] != '') {
                         $ca[$r_dbt['id']][] = '<strong>活动时间:</strong>' . $pr['cdate'];
                     }
                     if ($pr['cloc'] != '') {
                         $ca[$r_dbt['id']][] = '<strong>活动地点:</strong>' . $pr['cloc'];
                     }
                     if ($pr['cpay'] != '') {
Пример #3
0
        $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&amp;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']) . '&nbsp;&nbsp;<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&amp;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&amp;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);
        }
Пример #4
0
                 header('Location:?page=' . $page);
                 exit;
             }
         }
         if ($pa == 9 && $r_dbl['disp'] > 0) {
             $cm[] = '&nbsp;<span class="del_n">已删除</span> <a href="?page=' . $page . '&amp;pid=' . $r_dbl['id'] . '"><img src="images/o_4.gif" alt="" title="恢复"/></a>';
         }
     }
 }
 if (isset($cm)) {
     $content .= '<span class="gmod">' . join('&nbsp; &nbsp;', $cm) . '</span>';
 }
 $content .= ($r_dbl['sticky'] > 0 ? '<img src="images/o_0.gif" alt="" title="置顶留言"/> ' : '') . getalink($r_dbl['aid'], $r_dbl['name']) . '&nbsp;&nbsp;<span class="gdate">' . getldate($r_dbl['datetime']) . '</span></div><div class="list_c">';
 switch ($r_dbl['tid']) {
     case 2:
         $pr = getpinfo($r_dbl['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) {
Пример #5
0
function getpcinfo($r)
{
    global $pa, $c_log, $dbprefix, $config;
    $u = '?m=' . (isset($r['pid']) ? 'album&amp;id=' . $r['pid'] : 'camp&amp;id=' . $r['cid']);
    $c = '<li class="l_list"><a href="?m=user&amp;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[] = '&nbsp;<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[] = '&nbsp; &nbsp; <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[] = '&nbsp;<span class="del_n">已删除</span> <a href="' . $u . '&amp;pid=' . $r['id'] . '"><img src="images/o_4.gif" alt="" title="恢复"/></a>';
        }
    }
    if (isset($cm)) {
        $c .= '<span class="gmod">' . join('&nbsp; &nbsp;', $cm) . '</span>';
    }
    $c .= getalink($r['aid'], $r['name']) . '&nbsp;&nbsp;<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&amp;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&amp;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&amp;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;
}