Example #1
0
function autojd($xj)
{
    $xxtime = time() - $xj * 3600;
    $sql = "select id from  user_shiyong where status=3 and  {$xxtime}>step3_time and userid=" . $_SESSION['usidse'];
    $result = mysql_query($sql);
    while ($row = mysql_fetch_assoc($result)) {
        $djid[] = $row['id'];
    }
    if (!empty($djid)) {
        foreach ($djid as $usid) {
            GetUpdate('user_shiyong', "status=4,step4_time=" . time(), $usid, 'userid=' . $_SESSION['usidse']);
        }
    }
}
Example #2
0
if (array_key_exists('dns', $_REQUEST)) {
    $dnsServers = str_replace('-', ',', $_REQUEST['dns']);
}
$supports_sharding = false;
if (array_key_exists('shards', $_REQUEST) && $_REQUEST['shards']) {
    $supports_sharding = true;
}
$is_done = false;
if (isset($locations) && is_array($locations) && count($locations) && (!array_key_exists('freedisk', $_GET) || (double) $_GET['freedisk'] > 0.1)) {
    shuffle($locations);
    $location = trim($locations[0]);
    if (!$is_done && array_key_exists('reboot', $_GET)) {
        $is_done = GetReboot();
    }
    if (!$is_done && array_key_exists('ver', $_GET)) {
        $is_done = GetUpdate();
    }
    if (!$is_done && @$_GET['video']) {
        $is_done = GetVideoJob();
    }
    foreach ($locations as $loc) {
        $location = trim($loc);
        if (!$is_done && strlen($location)) {
            $is_done = GetJob();
        }
    }
} elseif (isset($_GET['freedisk']) && (double) $_GET['freedisk'] <= 0.1) {
    if (isset($_GET['reboot']) && GetSetting("lowDiskReboot")) {
        header('Content-type: text/plain');
        header("Cache-Control: no-cache, must-revalidate");
        header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
Example #3
0
     }
     if ($ZBK['jifen_vip'] == 1) {
         if (Getvip($_SESSION['usnamese']) < 1) {
             $arry['id'] = 0;
             $arry['msg'] = "只有VIP用户才能参与";
             echo json_encode($arry);
             exit;
         }
     }
     $count = Kjifen($_SESSION['usnamese'], -$tknum * $tkjf, $SK['MingxiA']);
     if ($count > 2) {
         $sql = "insert into remai (" . implode(',', GetTable('remai')) . ") values ('" . $tktitle . "'," . $tknum . "," . $tkjf . ",'" . $CCdates . "','" . $T_jieshu . "','" . $tkquestion . "','" . $_SESSION['usnamese'] . "'," . $Getuname['id'] . ")";
         mysql_query($sql);
         $insertid = mysql_insert_id();
         if ($ZBK['jf_examine'] == 1) {
             GetUpdate('remai', "xianshi=1", $insertid, '1=1');
         }
         $arry['id'] = 215;
         //提交成功
         $arry['msg'] = "发布积分任务成功";
     } else {
         $arry['id'] = 0;
         //失败
         $arry['msg'] = "您的积分不足,发布积分任务失败";
         //写失败原因,哪部分要求不符合,如积分不足等等。。
     }
     echo json_encode($arry);
     exit;
     break;
     //********************************************* 表单·商家发布积分任务  返回html
 //********************************************* 表单·商家发布积分任务  返回html
Example #4
0
function BookOpenHouse($DateString, $Username, $HouseID)
{
    $Insert = "INSERT INTO Bookings (UserID, HouseID, Time) values ('{$Username}','{$HouseID}','{$DateString}')";
    GetUpdate($Insert);
}
Example #5
0
                 $arry['msg'] = "活动发布成功";
                 echo json_encode($arry);
                 exit;
             }
         }
     } else {
         if (Getvip($_SESSION['usnamese'], 0) == 1) {
             if ($shiyongmoney > $create_user_id['money'] - $create_user_id['money_dongjie']) {
                 $arry['id'] = 120;
                 //余额不足
                 $arry['msg'] = "您的流动金额不足,无法发布任务,请冲值后再发布";
                 echo json_encode($arry);
                 exit;
             } else {
                 $count1 = Kmoney($_SESSION['usnamese'], -$shiyongmoney, $mingxi, 'publish', 2, 1, 0);
                 $count2 = GetUpdate('shiyong', 'xianshi=3', $aid, 'create_user_id=' . $create_user_id['id']);
                 if ($count1 + $count2 > 3) {
                     $arry['id'] = 218;
                     //发布成功
                     $arry['msg'] = "活动发布成功";
                     echo json_encode($arry);
                     exit;
                 }
             }
         } else {
             $arry['id'] = 0;
             //发布失败
             $arry['msg'] = "失败";
         }
     }
 }
Example #6
0
 }
 if ($vType == 2) {
     $adweek = 10;
 } else {
     $adweek = $week;
 }
 if (Zbkinsert('ad_paimai', array('name' => $txtTitle, 'title' => $txtTitle, 'ad_date' => $CCtime, 'link' => $linkUrl, 'pic_url' => $picUrl, 'jifen' => $txtPrice, 'status' => 1, 'userid' => $usidse, 'week' => $adweek, 'ad_start_time' => $ad_start_time, 'ad_end_time' => $ad_end_time, 'create_time' => time()))) {
     $upresult = GetUpdate('user', "jifen=v1task_view.php?id={$txtPrice}", $usidse, '1=1');
     if ($vType == 2) {
         $ad_parow = GetTJRowUSar('id', 'userid', 'jifen', 'ad_paimai', "status=1 and week=10 and ad_start_time={$ad_start_time} and  ad_end_time={$ad_end_time} order by id desc limit 1,50");
     } else {
         $ad_parow = GetTJRowUSar('id', 'userid', 'jifen', 'ad_paimai', "status=1 and week={$adweek} and ad_date={$CCtime} order by id desc  limit 1,50");
     }
     if (!empty($ad_parow)) {
         foreach ($ad_parow['userid'] as $ppkey => $ppusid) {
             GetUpdate('user', "jifen=jifen+" . $ad_parow['jifen'][$ppkey], $ppusid, '1=1');
             Zbkupdate('ad_paimai', array('status' => -1), "status=1 and week={$adweek} and id=" . $ad_parow['id'][$ppkey]);
         }
     }
 }
 if ($upresult) {
     $json['id'] = 1;
     //成功
     $json['msg'] = "提交成功";
     //
     echo json_encode($json);
     exit;
 } else {
     $json['id'] = 0;
     //成功
     $json['msg'] = "操作失败";
Example #7
0
function Autoshenhe($tableA, $tableB, $fields, $tid, $T_jieshu, $statusA = 'xianshi=0', $statusB = 'xianshi=1', $d = 1)
{
    global $SK;
    if ($d) {
        $AutoDate = date('Y-m-d H:i:s', strtotime('-7day'));
        $AutoDate = "'{$AutoDate}'";
    } else {
        $AutoDate = strtotime('-7day');
    }
    $sql = "select a.id,a.userid,b.mdnum from {$tableA} as a left join {$tableB} as b on b.id={$tid} where b.{$T_jieshu}<{$AutoDate} and a.{$fields}={$tid} and {$statusA} GROUP BY a.id";
    $result = mysql_query($sql);
    $count = mysql_num_rows($result);
    if ($count > 0) {
        while ($row = mysql_fetch_assoc($result)) {
            $Autoshenheid[] = $row['id'];
            $Autouserid[] = $row['userid'];
            $Automdnum[] = $row['mdnum'];
        }
        foreach ($Autoshenheid as $key => $values) {
            $count = GetUpdate($tableA, $statusB, $values, '1=1');
            $Usidxx = Getlmname('name', 'user', "id=" . $Autouserid[$key]);
            $Kjifen = Kjifen($Usidxx['name'], $Automdnum[$key], $SK['MingxiD']);
        }
        return true;
    }
    return false;
}
Example #8
0
         //
         $arry['msg'] = "由于商家超过48小时未审核,系通已自动通过";
         echo json_encode($arry);
         exit;
     }
     if ($row_sy['status'] == 2 && $CCtimes > $row_sy['step2_time'] + 172800) {
         $step3_time = $row_sy['step2_time'] + 172800;
         $arry['msg'] = $step3_time;
         $count = GetUpdate('user_shiyong', "status=-2,step3_time={$step3_time}", $aid, 'userid=' . $usxx['id']);
         $arry['id'] = 211;
         //
         $arry['msg'] = "由于您超过48小时未提交订单号,系通已自动作弃权处理";
         echo json_encode($arry);
         exit;
     }
     $count = GetUpdate('user_shiyong', "dingdanhao='{$ordercode}',status=3,step3_time={$CCtimes}", $aid, 'userid=' . $usxx['id']);
     if ($count > 0) {
         $arry['id'] = 211;
         //提交成功
         $arry['msg'] = "订单号提交成功";
     } else {
         $arry['id'] = 0;
         //失败
         $arry['msg'] = "订单号提交失败";
     }
     echo json_encode($arry);
     exit;
     //********************************************* 订单号表单的html
 //********************************************* 订单号表单的html
 case "form_code":
     $row_sy = Getlmname('*', 'user_shiyong', "id='" . $aid . "' and userid = '" . $usxx['id'] . "' and ( status = 2 or status = 3 )");
Example #9
0
                 $arry['msg'] = "活动发布成功";
                 echo json_encode($arry);
                 exit;
             }
         }
     } else {
         if (Getvip($_SESSION['usnamese'], 0) == 1) {
             if ($duihuanmoney > $create_user_id['money'] - $create_user_id['money_dongjie']) {
                 $arry['id'] = 120;
                 //余额不足
                 $arry['msg'] = "您的流动金额不足,无法发布任务,请冲值后再发布";
                 echo json_encode($arry);
                 exit;
             } else {
                 $count1 = Kmoney($_SESSION['usnamese'], -$duihuanmoney, $mingxi, 'publish', 2, 1, 0);
                 $count2 = GetUpdate('duihuan', 'xianshi=3', $aid, 'create_user_id=' . $create_user_id['id']);
                 if ($count1 + $count2 > 3) {
                     $arry['id'] = 218;
                     //发布成功
                     $arry['msg'] = "活动发布成功";
                     echo json_encode($arry);
                     exit;
                 }
             }
         } else {
             $arry['id'] = 0;
             //发布失败
             $arry['msg'] = "失败";
         }
     }
 }
Example #10
0
function CreateAccount($Username, $Password, $Name, $PhoneNumber, $Email)
{
    $InsertQuery = "INSERT INTO Users (Username, Password, Email, Name, Phone, Role) values ('{$Username}','{$Password}','{$Email}','{$Name}','{$PhoneNumber}','User')";
    GetUpdate($InsertQuery);
}