Example #1
0
            $a_rep = mysql_query($q_rep) or die('');
            $tr_rep = mysql_num_rows($a_rep);
            if ($tr_rep > 0) {
                $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('');
                $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">
Example #2
0
function yjl_hdimgrightc($pdb, $r_res, $page = 1)
{
    global $r_main, $yjl_url, $user_id, $udb, $uadb, $yjl_dbprefix, $dbprefix, $p_size, $iscy;
    $pt = $r_res['name'] . ' 活动照片';
    $c = '<div class="share" onmouseover="$(\'#fx_id\').val(\'' . $pdb['id'] . '\');">' . yjl_fxdiv() . '<input type="hidden" id="fx_url_' . $pdb['id'] . '" value="' . urlencode($yjl_url . 'activeimg-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '-' . $pdb['id'] . '.html') . '"/><input type="hidden" id="fx_title_' . $pdb['id'] . '" value="' . urlencode($pt) . '"/><input type="hidden" id="fx_title0_' . $pdb['id'] . '" value="' . urlencode(@iconv('UTF-8', 'GB2312', $pt)) . '"/></div>';
    $ispl = $iscy > 0 ? 0 : 1;
    $q_rep = sprintf('select b.* from %s as a, %s as b where a.tid=%s and a.replyid=b.tid order by b.dateline desc', $dbprefix . 'topic_reply', $dbprefix . 'topic', $pdb['tid']);
    $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 sprcomt clearfix hover">';
        $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 .= yjl_newwb($r_rep, $ispl, $pdb['tid']);
        } while ($r_rep = mysql_fetch_assoc($rep));
        mysql_free_result($rep);
        $c .= '</ul>';
        if ($tp_rep > 1) {
            $c .= yjl_newhmpage('activeimg-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '-' . $pdb['id'] . '-p[p].html', $page, $tp_rep, 'hd_topic');
        }
    }
    mysql_free_result($a_rep);
    return $c;
}