} $c .= '<div class="main_left"><div class="box1 clearfix">'; $isym = 0; if (isset($_GET['t']) && $_GET['t'] == 'sponsor' && $user_id > 0 && ($udb['isxg'] > 0 || $udb['qx'] == 10)) { require_once 'party_inc_0.php'; } elseif (isset($_GET['t']) && $_GET['t'] == 'edit' && $user_id > 0 && ($user_id == $r_res['uid'] || $udb['isxg'] > 0 || $udb['qx'] == 10)) { require_once 'party_inc_1.php'; } else { $isym = 1; if ($r_res['isgf'] > 0) { $c .= '<div class="hot_pic off">官方活动</div>'; } $c .= '<div class="pic_text2 act_tit"> <a href="active-' . $xqid . '-' . $hdid . '.html"><img src="' . ($r_res['url'] != '' ? $r_res['url'] : 'images/blank.gif" style="background: url(images/pe_d.jpg) no-repeat center;') . '" /></a> <h2>' . $r_res['name'] . '</h2> <p>时间:' . yjl_hd_date($r_res) . '<br /> 地点:' . ($r_res['xqid'] > 0 ? '<a href="square-' . $xqid . '.html">' . $xqdb['name'] . '</a>' : '') . $r_res['address'] . '<p> <div class="bt_act"><a href="#" onclick="$(this).load(\'j/zan.php?id=' . $r_res['hdid'] . '\');return false;"><span class="mn_ico gd"></span><br />' . $r_res['c_zan'] . '</a><a href="#" onclick="$(this).load(\'j/zan.php?id=' . $r_res['hdid'] . '&t=1\');return false;"><span class="mn_ico bd"></span><br />' . $r_res['c_zan1'] . '</a></div> <div class="bt_active">'; if ($user_id > 0) { $isgz = 0; $q_rep = sprintf('select uid from %s where hdid=%s and uid=%s', $yjl_dbprefix . 'hd_fuser', $r_res['hdid'], $user_id); $rep = mysql_query($q_rep) or die(''); if (mysql_num_rows($rep) > 0) { $isgz = 1; } mysql_free_result($rep); $c .= '<div class="bt_active">'; if ($isgz == 0) { if (isset($_GET['gz']) && $_GET['gz'] == 1) { $iSQL = sprintf('insert into %s (uid, hdid, datetime) values (%s, %s, %s)', $yjl_dbprefix . 'hd_fuser', $user_id, $hdid, time());
function yjl_newr_tjhd() { global $xqid, $xqdb, $yjl_dbprefix, $user_id, $udb; $q_res = sprintf('select * from %s where (xqid=%s or xqid=0) and etime>=%s and isgf=1 order by c_zan desc, etime desc limit 3', $yjl_dbprefix . 'hd', $xqid, time()); $res = mysql_query($q_res) or die(mysql_error()); $r_res = mysql_fetch_assoc($res); if (mysql_num_rows($res) > 0) { $c = '<div class="box2"><h3>活动推荐</h3><ul class="list_maybe">'; do { $c .= '<li><a href="active-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '.html"><img src="' . ($r_res['url'] != '' ? $r_res['url'] : 'images/blank.gif" style="background: url(images/pe_d.jpg) no-repeat center;') . '" /></a> <p><a href="active-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '.html">' . $r_res['name'] . '</a> <br /> <span>' . yjl_hd_date($r_res) . '</span> </p>'; if ($user_id > 0) { $isgz = 0; $q_rep = sprintf('select uid from %s where hdid=%s and uid=%s', $yjl_dbprefix . 'hd_fuser', $r_res['hdid'], $user_id); $rep = mysql_query($q_rep) or die(mysql_error()); if (mysql_num_rows($rep) > 0) { $isgz = 1; } mysql_free_result($rep); $c .= '<div class="bt_ltblue">' . ($isgz > 0 ? '' : '<a href="active.php?xqid=' . $r_res['xqid'] . '&id=' . $r_res['hdid'] . '&gz=1">感兴趣</a>'); if ($udb['xqid'] == $xqid || $r_res['xqid'] == 0 || $udb['qx'] > 0) { $iscy = 0; $q_rep = sprintf('select uid from %s where hdid=%s and uid=%s and iscy=0', $yjl_dbprefix . 'hd_user', $r_res['hdid'], $user_id); $rep = mysql_query($q_rep) or die(mysql_error()); if (mysql_num_rows($rep) > 0) { $iscy = 1; } mysql_free_result($rep); if ($iscy == 0) { $c .= '<a href="active.php?xqid=' . $r_res['xqid'] . '&id=' . $r_res['hdid'] . '&j=1">参 加</a>'; } } $c .= '</div>'; } else { $c .= '<div class="bt_ltblue"><a href="login.php?u=' . urlencode('active-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '.html') . '" rel="#overlay_login">感兴趣</a><a href="active.php?xqid=' . $r_res['xqid'] . '&id=' . $r_res['hdid'] . '&j=1">参 加</a></div>'; } $c .= '</li>'; } while ($r_res = mysql_fetch_assoc($res)); $c .= '</ul></div>'; return $c; } mysql_free_result($res); }