echo idjia($qishu['q_uid']);
        ?>
.html" target="_blank"><b><?php 
        echo get_user_name($qishu['q_user']);
        ?>
</b></a></p>
									<p>本次聚购:<?php 
        echo get_user_goods_num($qishu['q_uid'], $qishu['id']);
        ?>
次</p>
									<p>幸运号码:<?php 
        echo $qishu['q_user_code'];
        ?>
</p>
									<p class="w-goods-ratio">回报率:<b class="txt-red"><?php 
        echo (int) $qishu['zongrenshu'] / (int) get_user_goods_num($qishu['q_uid'], $qishu['id']);
        ?>
</b> 倍</p>
								</div>									
						</div>
						</li>	
					<?php 
    }
}
$ln++;
unset($ln);
?>
						
					</ul>
					<a href="javascript:;"><div class="arrows arrows1" arae="right"></div></a>
					<div class="controller-nav">
					<div class="share-getinfo">
						<p class="getinfo-name">幸运获得者:<a class="blue Fb" href="<?php 
echo WEB_PATH;
?>
/uname/<?php 
echo idjia($shaidan['sd_userid']);
?>
" target="_blank"><?php 
echo userid($shaidan['sd_userid'], 'username');
?>
</a></p>
						<p>总共<?php 
echo _cfg('web_name_two');
?>
:<b class="orange"><?php 
echo get_user_goods_num($shaidan['sd_userid'], $shaidan['sd_shopid']);
?>
</b>人次</p>
						<?php 
$jikxiao = get_shop_if_jiexiao($shaidan['sd_shopid']);
?>
						<?php 
if ($jikxiao['q_uid']) {
    ?>
						<p>幸运<?php 
    echo _cfg('web_name_two');
    ?>
码:<?php 
    echo $jikxiao['q_user_code'];
    ?>
	</p>
							</a>
							<p>获得者:<a class="blue Fb" href="<?php 
        echo WEB_PATH;
        ?>
/uname/<?php 
        echo idjia($qishu['q_uid']);
        ?>
" target="_blank"><?php 
        echo get_user_name($qishu['q_user']);
        ?>
</a></p>
							<p><?php 
        echo _cfg('web_name_two');
        ?>
:<em class="orange Fb"><?php 
        echo get_user_goods_num($qishu['q_uid'], $qishu['id']);
        ?>
</em>人次</p>							
						</div>
						<div class="publishC-tit">
							<h3><a href="<?php 
        echo WEB_PATH;
        ?>
/dataserver/<?php 
        echo $qishu['id'];
        ?>
" target="_blank" class="gray01">(第<?php 
        echo $qishu['qishu'];
        ?>
期)<?php 
        echo $qishu['title'];
예제 #4
0
 public function lottery_shop_json()
 {
     if (!isset($_GET['gid'])) {
         echo json_encode(array("error" => '1'));
         return;
         exit;
     }
     $gid = trim($_GET['gid']);
     $times = (int) System::load_sys_config('system', 'goods_end_time');
     if (!$times) {
         $times = 1;
     }
     $db = System::load_sys_class('model');
     $gid = safe_replace($gid);
     $gid = str_ireplace("select", "", $gid);
     $gid = str_ireplace("union", "", $gid);
     $gid = str_ireplace("'", "", $gid);
     $gid = str_ireplace("%27", "", $gid);
     $gid = trim($gid, ',');
     if (!$gid) {
         $info = $db->GetOne("select qishu,xsjx_time,id,thumb,title,q_uid,q_user,q_end_time,money,q_user_code,zongrenshu from `@#_shoplist` where `q_showtime` = 'Y' order by `q_end_time` ASC");
     } else {
         $infos = $db->GetList("select qishu,xsjx_time,id,thumb,title,q_uid,q_user,q_end_time,money,q_user_code,zongrenshu from `@#_shoplist` where `q_showtime` = 'Y' order by `q_end_time` ASC limit 0,4");
         $gid = @explode('_', $gid);
         $info = false;
         foreach ($infos as $infov) {
             if (!in_array($infov['id'], $gid)) {
                 $info = $infov;
                 break;
             }
         }
     }
     if (!$info) {
         echo json_encode(array("error" => '1'));
         return;
         exit;
     }
     if ($info['xsjx_time']) {
         $info['q_end_time'] = $info['q_end_time'] + $times;
     }
     System::load_sys_fun("user");
     $user = unserialize($info['q_user']);
     $user = get_user_name($info['q_uid'], "username");
     $userthumb = get_user_name($info['q_uid'], "img");
     $uid = $info['q_uid'];
     $qishu = $info['qishu'];
     $upload = G_UPLOAD_PATH;
     $q_time = substr($info['q_end_time'], 0, 10);
     if ($q_time <= time()) {
         $db->Query("update `@#_shoplist` SET `q_showtime` = 'N' where `id` = '{$info['id']}' and `q_showtime` = 'Y' and `q_uid` is not null");
         echo json_encode(array("error" => '-1'));
         return;
         exit;
     }
     // 次数
     $cishu = get_user_goods_num($info['q_uid'], $info['id']);
     // 回报率
     $huibao = (int) $info['zongrenshu'] / (int) $cishu;
     $times = $q_time - time();
     // echo json_encode(array("error"=>"0","upload"=>$upload,"thumb"=>$info['thumb'],"id"=>$info['id'],"uid"=>"$uid","title"=>$info['title'],"user"=>$user,"times"=>$times,"money"=>$info['money'],"q_user_code"=>$info['q_user_code'],"cishu"=>$cishu],"huibao"=>$huibao));
     // echo json_encode(array("error"=>"0","upload"=>$upload,"thumb"=>$info['thumb'],"id"=>$info['id'],"uid"=>"$uid","title"=>$info['title'],"user"=>$user,"times"=>$times));
     echo json_encode(array("error" => "0", "upload" => $upload, "qishu" => $qishu, "thumb" => $info['thumb'], "id" => $info['id'], "uid" => "{$uid}", "title" => $info['title'], "user" => $user, "times" => $times, "money" => $info['zongrenshu'], "cishu" => $cishu, "huibao" => $huibao, "q_user_code" => $info['q_user_code']));
     exit;
 }