Example #1
0
function member($id)
{
    if ($id > 0) {
        $sql = "select * from ly_users where id='{$id}'";
        $query = Query($sql);
        $row = GetRow($query);
        return $row;
    }
}
Example #2
0
function getOrgNameByID($id)
{
    $org = GetRow("SELECT * FROM `corp_ally_names` WHERE `id`=" . $id);
    if (!$org['name']) {
        $url = "https://api.eveonline.com/corp/CorporationSheet.xml.aspx?corporationID={$id}";
        $xml_object = simplexml_load_string(file_get_contents($url));
        $xml_array = object2array($xml_object);
        $corporationName = $xml_array["result"]["corporationName"];
        $org = array('typ' => 'c', 'id' => $id, 'name' => $corporationName, 'ticker' => $xml_array["result"]['ticker']);
        InsertData($org, 'corp_ally_names');
    }
    return $org;
}
Example #3
0
 //图片地址
 $linkUrl = trim($_POST["linkUrl"]);
 //链接
 if ($vType == 2) {
     $adti = GetRow("select status_time,end_time,jifen,jifen_jia,up_tarttime,up_endtime,pp_endtime,pp_starttime from ad_type where week=10 and status=1", 1);
     $endtime = $adti['pp_endtime'];
     $starttime = $adti['pp_starttime'];
     $zgsql = "select max(jifen) as jifen from ad_paimai where ad_date>={$starttime} and ad_date<={$endtim} limit 1";
     $zgzf = GetRow($zgsql, 1);
 }
 if ($vType == 1) {
     $adti = GetRow("select status_time,end_time,jifen,jifen_jia,Uptime from ad_type where week={$week} and status=1", 1);
     $starttime = $CCtime + $adti['status_time'] * 3600;
     $endtime = $CCtime + $adti['end_time'] * 3600;
     $zgsql = "select max(jifen)  as jifen from ad_paimai where ad_date={$CCtime} limit 1";
     $zgzf = GetRow($zgsql, 1);
 }
 if (!$zgzf['jifen']) {
     $num = $zgzf['jifen'] = $adti['jifen'];
 } else {
     $num = $zgzf['jifen'] + $adti['jifen_jia'];
 }
 $upadtime = upadtime($adti['Uptime'], 2);
 if ($vType == 2) {
     $ad_start_time = $adti['up_tarttime'];
     $ad_end_time = $adti['up_endtime'];
 } else {
     $ad_start_time = $upadtime['start'];
     $ad_end_time = $upadtime['end'];
 }
 if (empty($vid) || empty($vType)) {
Example #4
0
	<div class="vendueListWrap">
        <table>
        	<thead>
            	<tr><th width="120">广告名称</th>
                	<th width="60">出价积分</th>
                	<th width="210">广告标题</th>
                    <th width="180">中标时间</th>
                    <th width="360">投放时间</th>
                </tr>
            </thead>
        	<tbody>
<?php 
        if ($GETSQL['count'] > 0) {
            while ($row = mysql_fetch_assoc($result)) {
                $ppsql = "select name,Uptime from ad_type where week = " . $row['week'];
                $pprow = GetRow($ppsql, 1);
                ?>

            	<tr>
                    <td><?php 
                echo $pprow['name'];
                ?>
</td>
                	<td><?php 
                echo $row['jifen'];
                ?>
</td>
                	<td><a href="<?php 
                echo $row['link'];
                ?>
" target="_blank"><?php 
Example #5
0
?>
">试用完成</a></li>
    </ul>
  </div>
  我参与的抢白菜:</div>
<div class="tablehead clearfix"> <span class="td1"> &nbsp; 产品图 </span> <span class="td2"> 产品信息 </span> <span class="td3"> 活动进度 </span> <span class="td4"> 操作 </span> </div>
<div class="right_list actionlist">
  <ul>
    
    <!--这里的几个li代表不同的进度,嵌套php时注意判断--->
    <?php 
if ($GETSQL['count'] > 0) {
    while ($row = mysql_fetch_assoc($result)) {
        $Hdxx = Getlmname('id,title,pic_url,jifen,create_user_id,coupon_price,detail_url', 'shiyong', "id=" . $row['shiyongid']);
        $HDidd = $Hdxx['id'];
        $rowstatus = GetRow("select b.xianshi from user_shiyong as a left join shiyong as b on a.shiyongid=b.id where b.id={$HDidd}", 1);
        ?>
    <!--刚申请-->
    <li id="li_<?php 
        echo $row['id'];
        ?>
">
      <div class="cover"> <a href="/v1qiang_view.php?id=<?php 
        echo $Hdxx['id'];
        ?>
" target="_blank" title="<?php 
        echo $Hdxx['title'];
        ?>
"><img width="60" height="60" src="<?php 
        echo $Hdxx['pic_url'];
        ?>
Example #6
0
    } else {
        return false;
    }
}
switch ($do) {
    //*********************************************提交试用报告·,返回json
    case "submit_report":
        if ($_SESSION['usidse'] == "") {
            $arry["id"] = 114;
            //返回代号,未登录:114
            $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;
        }
        if (checkReoprtUser($usidse, $aid)) {
            //验证用户是否有资格操作该条项目
            $star_a = $_POST["star_a"];
            $star_b = $_POST["star_b"];
            $star_c = $_POST["star_c"];
            $star_d = $_POST["star_d"];
            $rep_1 = trim($_POST["rep_1"]);
            $rep_2 = trim($_POST["rep_2"]);
    }
}
$do = isset($_GET["do"]) ? $_GET["do"] : "form_task";
switch ($do) {
    case "pass_application":
        $bs_id = $_REQUEST["bs_id"];
        $pass = $_REQUEST["pass"];
        if ($_SESSION['usnamese'] == "") {
            $arry['id'] = 114;
            //未登录
            $arry['msg'] = "请先登录再进行操作";
        } else {
            $pass == 1 ? $pass = 2 : ($pass = -1);
            $aidarr = explode(',', $bs_id);
            $pscount = count($aidarr);
            $paid = GetRow("select a.id,a.num from shiyong as a left join user_shiyong as b on a.id=b.shiyongid where b.id=" . $aidarr[0] . "  and name='{$usname}' limit 1");
            $Chengchushiyong = Chengchushiyong('user_shiyong', "status in (2,3,4,5,6,-3)", "shiyongid=" . $paid['id']);
            $Chengchushiyong = $paid['num'] - $Chengchushiyong;
            $cycount = $Chengchushiyong - $pscount;
            if ($cycount < 0 && $pass == 2) {
                $arry['id'] = 0;
                $arry['msg'] = "通过失败,因为您所发布的任务的还只剩余" . $Chengchushiyong . "个资格名额";
                echo json_encode($arry);
                exit;
            }
            foreach ($aidarr as $value) {
                $count = EditstatusT('user_shiyong', "status={$pass}", "step2_time={$CCtimes},lasttime={$CCtimes}", "name='{$usname}'", $value);
            }
            if ($count > 0) {
                $arry['id'] = 216;
                //通过成功
            //失败
            $arry['msg'] = "发货号提交失败";
        }
        echo json_encode($arry);
        exit;
        //********************************************* 订单号表单的html
    //********************************************* 订单号表单的html
    case "form_sjenterCode3":
        $cjid = $_GET['cjid'];
        $yhxxsql = "select c.name as cjusname, c.address,c.phone,c.xingming,b.title,b.detail_url,a.* from choujiang as a left join gift as b on a.cj_gid=b.id left join user as c on a.cj_uid=c.id where a.cj_type=1 and a.name='{$usname}' and a.cj_id={$cjid}";
        $row_sy = GetRow($yhxxsql, 1);
        if (!$row_sy['cj_id']) {
            echo "非法操作";
            exit;
        }
        $row = GetRow("select b.xianshi from choujiang as a left join gift as b on a.cj_gid=b.id where a.cj_id={$cjid}", 1);
        if ($row['xianshi'] == 5) {
            $arry['id'] = 0;
            //
            $arry['msg'] = "活动结束不能修改";
            echo $arry['msg'];
            exit;
        }
        ?>
	
	 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style>
        .enter_code_form3 { margin: -20px 0 0 0px; position: relative; }
        .enter_code_form3 ul li { padding: 8px 0; }
        .enter_code_form3 ul li em { display: block; float: left; text-align: left; white-space: nowrap; overflow: hidden; margin-right: 10px; }
Example #9
0
        描述
    </span>
    <span class="td4">
        操作
    </span>
</div>
<div class="right_list actionlist">
    <ul>
    
        <!--这里的几个li代表不同的进度,嵌套php时注意判断--->
<?php 
if ($GETSQL['count'] > 0) {
    while ($row = mysql_fetch_assoc($result)) {
        $Hdxx = Getlmname('id,title,pic_url,jifen,create_user_id,coupon_price,detail_url', 'duihuan', "id=" . $row['cj_gid']);
        $HDidd = $Hdxx['id'];
        $rowstatus = GetRow("select b.xianshi from user_duihuan as a left join duihuan as b on a.cj_gid=b.id where b.id={$HDidd}", 1);
        ?>
    	<!--刚申请-->
        <li class="list_cj" id="li_<?php 
        echo $row['cj_id'];
        ?>
">
            <div class="cover">
                <a href="/v1duihuan_list.php?classid=<?php 
        echo $Hdxx['id'];
        ?>
" target="_blank" title="<?php 
        echo $Hdxx['title'];
        ?>
"><img width="60" height="60" src="<?php 
        echo $Hdxx['pic_url'];
Example #10
0
<?php

session_start();
include './include/conn.php';
include './include/myfunction.php';
$usname = $_SESSION['usnamese'];
$usid = $_SESSION['usidse'];
$user = Getlmname('*', 'user', "id={$usid}");
if (isset($_GET['gid'])) {
    $id = $_GET['gid'];
}
$wj = rand(1, 3);
$girow = GetRow("select * from  gift where id={$id} and xianshi=3 and begin_time<{$CCtimes} and end_time>{$CCtimes}", 1);
if (!$girow) {
    exit;
}
$Sjname = Getlmname('name', 'user', "id=" . $girow['create_user_id']);
$HongBao = $girow["HongBao" . $wj];
$jifen = $girow['jifen'];
$urlfile = '抽奖扣分' . time() . rand(99, 99999);
if (empty($_SESSION['usnamese'])) {
    header("Location:/");
    exit;
}
if ($jifen > $user['jifen']) {
    $arr['success'] = "1";
    $arr['g_type'] = "4";
} else {
    $mingxi = "参加ID编号为" . $id . "的抽奖活动扣除积分";
    $smingxi = "用户" . $usname . "参加ID编号为" . $id . "的抽奖活动";
    Kjifen($usname, -$jifen, $mingxi);
Example #11
0
function lmnameid($id)
{
    $sql = "select name from tougao_category where id={$id}";
    $row = GetRow($sql, 1);
    return $row['name'];
}
Example #12
0
}
if ($_POST['mode'] == 'login') {
    $_POST['vcode'] = mysql_real_escape_string($_POST['vcode']);
    $_POST['keyid'] = mysql_real_escape_string($_POST['keyid']);
    $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$_POST['keyid']}' AND v_code = '{$_POST['vcode']}' ");
    //if  not in db, try to register
    if (!$api_key['key_id']) {
        $url = 'https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=' . $_POST['keyid'] . '&vCode=' . $_POST['vcode'];
        $xml_object = simplexml_load_string(file_get_contents($url));
        $xml_array = object2array($xml_object);
        $characterID = $xml_array["result"]["key"]["rowset"]["row"]["@attributes"]["characterID"];
        $characterNAME = getUserNameByID($characterID);
        if (strlen($characterNAME) > 3) {
            $regdata = array('key_id' => $_POST['keyid'], 'v_code' => $_POST['vcode'], 'username' => $characterNAME);
            InsertData($regdata, 'api_keys');
            $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$_POST['keyid']}' AND v_code = '{$_POST['vcode']}' ");
        }
    }
    if (!$api_key['key_id']) {
        ?>
        <H3>Error! Bad api key.</H3>

        <?php 
        exit;
    }
    $_SESSION['evegate'][0] = $api_key;
    $_SESSION['evegate']['loggedin'] = 1;
}
// process post requests - end
?>
<!DOCTYPE html>
Example #13
0
                	  <a class="btn"  href="javascript:beginAction(' . $row['id'] . ');">发布活动</a>';
        } else {
            if ($row['xianshi'] == -1) {
                '';
            } else {
                if ($row['xianshi'] == 5) {
                    echo '<a class="btn">完结</a>';
                } elseif ($row['xianshi'] == 3 && $row['end_time'] < time() && GetRow($sqlc, 2) > 0) {
                    echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核中奖</a>';
                } elseif ($row['xianshi'] == 3 && $row['begin_time'] < time() && $row['end_time'] > time()) {
                    echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核中奖</a>
				      <a class="btn"  href="javascript:endAction(' . $row['id'] . ');">提前终止活动</a>';
                } else {
                    if ($row['end_time'] < time() && GetRow($sqlc, 2) == 0 && $row['xianshi'] != -1) {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">查看中奖</a><a class="btn"  href="javascript:blanceAction(' . $row['id'] . ');">确认完成并结款</a>';
                    } elseif ($row['end_time'] < time() && GetRow($sqlc, 2) > 0) {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核中奖</a>';
                    } else {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">查看中奖</a>';
                    }
                }
            }
        }
        ?>


                </div>
            </div>
        </li>

<?php 
Example #14
0
            //失败
            $arry['msg'] = "发货号提交失败";
        }
        echo json_encode($arry);
        exit;
        //********************************************* 订单号表单的html
    //********************************************* 订单号表单的html
    case "form_sjenterCode3":
        $cjid = $_GET['cjid'];
        $yhxxsql = "select c.name as cjusname, c.address,c.phone,c.xingming,b.title,b.detail_url,a.* from user_duihuan as a left join duihuan as b on a.cj_gid=b.id left join user as c on a.cj_uid=c.id where a.name='{$usname}' and a.cj_id={$cjid}";
        $row_sy = GetRow($yhxxsql, 1);
        if (!$row_sy['cj_id']) {
            echo "非法操作";
            exit;
        }
        $row = GetRow("select b.xianshi from user_duihuan as a left join duihuan as b on a.cj_gid=b.id where a.cj_id={$cjid}", 1);
        if ($row['xianshi'] == 5) {
            $arry['id'] = 0;
            //
            $arry['msg'] = "活动结束不能修改";
            echo $arry['msg'];
            exit;
        }
        ?>
	
	 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style>
        .enter_code_form3 { margin: -20px 0 0 0px; position: relative; }
        .enter_code_form3 ul li { padding: 8px 0; }
        .enter_code_form3 ul li em { display: block; float: left; text-align: left; white-space: nowrap; overflow: hidden; margin-right: 10px; }
Example #15
0
                	  <a class="btn"  href="javascript:beginAction(' . $row['id'] . ');">发布活动</a>';
        } else {
            if ($row['xianshi'] == -1) {
                '';
            } else {
                if ($row['xianshi'] == 5) {
                    echo '<a class="btn">完结</a>';
                } elseif ($row['xianshi'] == 3 && $row['end_time'] < time() && GetRow($sqlc, 2) > 0) {
                    echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核试用</a>';
                } elseif ($row['xianshi'] == 3 && $row['begin_time'] < time() && $row['end_time'] > time()) {
                    echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核试用</a>
                	  <a class="btn"  href="javascript:endAction(' . $row['id'] . ');">提前终止任务</a>';
                } else {
                    if ($row['end_time'] < time() && GetRow($sqlc, 2) == 0 && $row['xianshi'] != -1) {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">查看报告</a><a class="btn"  href="javascript:blanceAction(' . $row['id'] . ');">确认完成并结款</a>';
                    } elseif (($row['end_time'] < time() || $Hegenum >= $row['num'] || $row['xianshi'] == 4) && GetRow($sqlc, 2) > 0) {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">审核报告</a>';
                    } else {
                        echo '<a class="btn"  href="javascript:viewApplication(' . $row['id'] . ',0);">查看报告</a>';
                    }
                }
            }
        }
        ?>


                </div>
            </div>
        </li>

<?php 
Example #16
0
     exit;
     //********************************************* 审核提交,返回json
 //********************************************* 审核提交,返回json
 case "audit_action":
     $aid = trim($_REQUEST["aid"]);
     //用户稿件id,当批量操作时,aid 以 "1,2,3"的形式传入,tid也是。
     $pass = trim($_REQUEST["pass"]);
     //是否通过? 1 or 0
     if ($_SESSION['usnamese'] == "") {
         $arry['id'] = 114;
         //未登录
         $arry['msg'] = "请先登录再进行操作";
     } else {
         $aidarr = explode(',', $aid);
         $pscount = count($aidarr);
         $paid = GetRow("select a.id,a.ymsum from remai as a left join user_renwu as b on a.id=b.renwuid where b.id=" . $aidarr[0] . "  and b.name='{$usname}' limit 1");
         $sql = "select id  from user_renwu where renwuid=" . $paid['id'] . " and xianshi=1";
         $result = mysql_query($sql);
         $crcount = mysql_num_rows($result);
         $cycount1 = $paid['ymsum'] - $crcount;
         $cycount = $cycount1 - $pscount;
         if ($cycount < 0 && $pass == 1) {
             $arry['id'] = 0;
             $arry['msg'] = "通过失败,因为您所发布的任务的还只剩余" . $cycount1 . "个资格名额";
             echo json_encode($arry);
             exit;
         }
         foreach ($aidarr as $value) {
             if ($pass == 1) {
                 $Rwarr = Getlmname('renwuid,userid', 'user_renwu', "id={$value}");
                 $Frenwuid = $Rwarr['renwuid'];
Example #17
0
 function seekPassword()
 {
     if ($this->ID > 0) {
         exit('您已登录');
     }
     $name = Post('uname');
     $email = Post('uemail');
     $sql = "select * from ly_users where username='******' and email='{$email}'";
     $query = Query($sql);
     $row = GetRow($query);
     if ($row) {
         $seek = randstr(5);
         $_SESSION['seek'] = $seek;
         $subject = "多爱食密码找回邮件";
         $message = "您的验证码:" . $seek . "。输入验证码即可设置新密码。请勿回复此邮件。";
         $return = mail($email, $subject, $message);
         if ($return == true) {
             echo '1';
         }
     } else {
         echo '2';
     }
 }
Example #18
0
        描述
    </span>
    <span class="td4">
        操作
    </span>
</div>
<div class="right_list actionlist">
    <ul>
    
        <!--这里的几个li代表不同的进度,嵌套php时注意判断--->
<?php 
if ($GETSQL['count'] > 0) {
    while ($row = mysql_fetch_assoc($result)) {
        $Hdxx = Getlmname('id,title,pic_url,jifen,create_user_id,coupon_price,detail_url', 'gift', "id=" . $row['cj_gid']);
        $HDidd = $Hdxx['id'];
        $rowstatus = GetRow("select b.xianshi from choujiang as a left join gift as b on a.cj_gid=b.id where b.id={$HDidd}", 1);
        ?>
    	<!--刚申请-->
        <li class="list_cj" id="li_<?php 
        echo $row['cj_id'];
        ?>
">
            <div class="cover">
                <a href="/choujiang-<?php 
        echo $Hdxx['id'];
        ?>
" target="_blank" title="<?php 
        echo $Hdxx['title'];
        ?>
"><img width="60" height="60" src="<?php 
        echo $Hdxx['pic_url'];
Example #19
0
        $huidawenti = $_POST['huidawenti'];
        $dingdanhao = $_POST['dingdanhao'];
        $star_a = $_POST['star_a'];
        $star_b = $_POST['star_b'];
        $star_c = $_POST['star_c'];
        $star_d = $_POST['star_d'];
        $rep_1 = $_POST['rep_1'];
        $rep_2 = $_POST['rep_2'];
        $rep_3 = $_POST['rep_3'];
        if (GetCount('free_report', "aid={$xxid}") > 0) {
            if (Zbkupdate('user_shiyong', array('status' => $status, 'huidawenti' => $huidawenti, 'dingdanhao' => $dingdanhao, 'step' . $steptime . '_time' => time(), 'lasttime' => time()), "id={$xxid}") || Zbkupdate('free_report', array('star_a' => $star_a, 'star_b' => $star_b, 'star_c' => $star_c, 'star_d' => $star_d, 'rep_1' => $rep_1, 'rep_2' => $rep_2, 'rep_3' => $rep_3), "aid={$xxid}")) {
                $updateMessage = '更新成功';
            } else {
                $updateMessage = '更新失败';
            }
        } else {
            if (Zbkupdate('user_shiyong', array('status' => $status, 'huidawenti' => $huidawenti, 'dingdanhao' => $dingdanhao, 'step' . $steptime . '_time' => time(), 'lasttime' => time()), "id={$xxid}")) {
                $updateMessage = '更新成功';
            } else {
                $updateMessage = '更新失败';
            }
        }
    }
}
if (isset($_GET['id'])) {
    $GETid = $_GET['id'];
    $getname = $_GET['name'];
}
$sql = "SELECT c.name AS username, a.name as shname,e.title, a.id, a.sort, a.shiyongid, a.name, a.userid, a.tuijian, a.status, a.xianshi, a.huidawenti, a.step1_time, a.step2_time, a.step3_time, a.step4_time, a.step5_time, a.step6_time, a.lasttime, a.dingdanhao, b.id AS bgid, b.aid, b.uid, b.acid, b.star_a, b.star_b, b.star_c, b.star_d, b.rep_1, b.rep_2, b.rep_3\nFROM user_shiyong AS a\nLEFT JOIN free_report AS b ON a.id = b.aid left join shiyong as e on a.shiyongid=e.id \nLEFT JOIN user AS c ON c.id = a.userid\nWHERE a.id ={$GETid}";
$row = GetRow($sql, 1);
Example #20
0
        if (Zbkupdate('user_duihuan', array('status' => 5, 'step5_time' => $CCtimes), "cj_id={$aid} and cj_uid='" . $usidse . "'")) {
            $arry['id'] = 211;
            //提交成功
            $arry['msg'] = "确认收货成功";
        } else {
            $arry['id'] = 0;
            //失败
            $arry['msg'] = "提交失败";
        }
        echo json_encode($arry);
        exit;
        //********************************************* 订单号表单的html
    //********************************************* 订单号表单的html
    case "form_codezj":
        $yhxxsql = "select c.name as cjusname, c.address,c.phone,c.xingming,b.title,b.detail_url,a.* from user_duihuan as a left join duihuan as b on a.cj_gid=b.id left join user as c on a.cj_uid=c.id where a.cj_uid={$usidse} and a.cj_id={$aid}";
        $row_sy = GetRow($yhxxsql, 1);
        if (!$row_sy['cj_id']) {
            echo "非法操作";
            exit;
        }
        ?>
	
	 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style>
        .enter_code_form { margin: -20px 0 0 0px; position: relative; }
        .enter_code_form ul li { padding: 8px 0; }
        .enter_code_form ul li em { display: block; float: left; text-align: left; white-space: nowrap; overflow: hidden; margin-right: 10px; }
        </style>
        
        <script type="text/javascript">