예제 #1
0
$usxx = Getlmname('*', 'user', "name='" . $_SESSION['usnamese'] . "'");
/*

*****************用于 試用細覽頁的按鈕提交等******************

接收参数 {
	do :
		do = "check_score"  	 //驗證是否有資格申請,用积分申请,json
		do = "confirm_score"  		 //再次确认(积分申请),html、json
		do = "check_application"  	 //驗證是否有資格申請,普通申请,json		
		do = "confirm_application"  		 //再次确认(积分申请),html、json
*/
$do = $_GET['do'];
$aid = $_REQUEST["aid"];
//该活动的id
$mycount = Chengchushiyong('', 'userid=' . $usxx['id'], "shiyongid={$aid}");
$Hdxx = Getlmname('jifen,create_user_id,xianshi,end_time,detail_url,pic_url,shiyongtype,num', 'shiyong', "id={$aid}");
$SYadmin = Getlmname('name', 'user', "id='" . $Hdxx['create_user_id'] . "'");
$SYname = $SYadmin['name'];
switch ($do) {
    //********************************************* 驗證是否有資格申請,用积分申请,json
    case "check_score":
        if ($_SESSION['usnamese'] == "") {
            $arry["id"] = 114;
            //返回代号,未登录:114,
            $arry["msg"] = "操作错误(您还未登录)";
            //返回信息
            echo json_encode($arry);
            exit;
        }
        if ($_SESSION['us_type'] != 1) {
예제 #2
0
파일: v1list.php 프로젝트: kwdwkiss/trial
          <li class="infoList-right">原价:<em><span class="fc_green"><?php 
    echo $row['price'];
    ?>
</span></em>元
         
          </li>
          <li class="infoList-left">
            <label>份数:</label>
            <strong class="fc-red"><?php 
    echo $row['num'];
    ?>
</strong> </li>
          <li class="infoList-right">
            <label>剩余:</label>
            <span class="fc_green"> <?php 
    $Chengchushiyong = Chengchushiyong('user_shiyong', "status in (2,3,4,5,6,-3)", "shiyongid=" . $row['id']);
    echo $row['num'] - $Chengchushiyong;
    ?>
</span> </li>
          <li class="infoList-left">
            <label>红包:</label>
            <em style="color: #ef503b;"><?php 
    if ($row['hongbao'] > 0) {
        echo $row['hongbao'];
        echo '元';
    } else {
        echo '无红包';
    }
    ?>
</em> </li>
          <li class="infoList-right">免审:<em><?php 
예제 #3
0
파일: v1qiang.php 프로젝트: kwdwkiss/trial
            <em class="fc-red"><?php 
    echo $row['num'];
    ?>
</em>份</li>
          <li class="infoList-right">剩余:<em>
		  <?php 
    $Chengchushiyong = Chengchushiyong('user_shiyong', "status in (2,3,4,5,6,-3)", "shiyongid=" . $row['id']);
    echo $cysum = $row['num'] - $Chengchushiyong;
    ?>
</em>份
         
          </li>
          <li class="infoList-left">
            <label>参与:</label>
            <em class="fc-red"><?php 
    $Wennum = Chengchushiyong('user_shiyong', "1=1", "shiyongid=" . $row['id']);
    echo $Wennum;
    ?>
</em>人</li>
          <li class="infoList-right">免审:<em><?php 
    if ($row['jifen'] == 0) {
        ?>
<span class="fc_green">不可用</span><?php 
    } else {
        ?>
 <?php 
        echo $row['jifen'];
    }
    ?>
</em>积分
         
예제 #4
0
$do = $_GET["do"];
$aid = $_REQUEST["aid"];
//的地方用post,所以就用$_REQUEST了。
switch ($do) {
    //********************************************* 订单号提交,返回json
    case "submit_code":
        $ordercode = trim($_POST["ordercode"]);
        //提交的订单号
        if ($_SESSION['usnamese'] == "") {
            $arry['id'] = 114;
            //未登录
            $arry['msg'] = "请先登录再进行操作";
            echo json_encode($arry);
            exit;
        }
        if (Chengchushiyong('user_shiyong', "dingdanhao='" . $ordercode . "'") > 0) {
            $arry['id'] = 0;
            //
            $arry['msg'] = "此单号已经使用过,无法输入";
            echo json_encode($arry);
            exit;
        }
        $row = GetRow("select b.xianshi from user_shiyong as a left join shiyong as b on a.shiyongid=b.id where a.id={$aid}", 1);
        if ($row['xianshi'] == 5) {
            $arry['id'] = 0;
            //
            $arry['msg'] = "活动结束";
            echo json_encode($arry);
            exit;
        }
        $row_sy = Getlmname('*', 'user_shiyong', "id='" . $aid . "' and userid = '" . $usxx['id'] . "' and ( status = 2 or status = 3 )");
예제 #5
0
        $WennumA = Chengchushiyong('user_shiyong', "1=1", "shiyongid=" . $row['id']);
        echo $WennumA;
        ?>
</b></li>
                        	<li>未审人数<b><?php 
        $Wennum = Chengchushiyong('user_shiyong', "status in (1,3,5)", "shiyongid=" . $row['id']);
        echo $Wennum;
        ?>
</b></li>
                        	<li>合格人数<b><?php 
        $Hegenum = Chengchushiyong('user_shiyong', "status=6", "shiyongid=" . $row['id']);
        echo $Hegenum;
        ?>
</b></li>
                        	<li>不合格人数<b><?php 
        $NOHegenum = Chengchushiyong('user_shiyong', "status<0", "shiyongid=" . $row['id']);
        echo $NOHegenum;
        ?>
</b></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="state">
            <?php 
        if ($row['xianshi'] == 1) {
            echo '<div class="btn style1">等待审核</div>';
        } elseif ($row['xianshi'] == 2) {
            echo '<div class="btn style2">审核完成,等待发布</div>';
        } elseif ($row['xianshi'] == 3 && $row['begin_time'] > time()) {
            echo '<div class="btn style2">即将开即</div>';
예제 #6
0
?>
.0</span>
                </li>
                <li>
                    试用品提供商:<span class="num"><?php 
echo $row['nick'];
?>
</span> &nbsp; &nbsp; &nbsp; 旺旺号:<span class="num"><?php 
echo $row['wangwang'];
?>
</span>

                </li>
                <li>
                    商品剩余: <span class="num"><?php 
echo $row['num'] - Chengchushiyong('user_shiyong', "status in (2,3,4,5,6,-2,-3)", "shiyongid=" . $row['syid']);
?>
</span> 件 &nbsp; &nbsp; &nbsp; 已有<span class="num"><?php 
echo $num_sq;
?>
</span>人申请
                </li>
                <li>
                <a class="goshop" target="_blank" href="<?php 
echo $row['detail_url'];
?>
">&nbsp;</a>
                </li>
            </ul>
        </div>
    </div>