Exemplo n.º 1
1
    $ad_type = guolv($_POST['ad_type']);
    $ad_list = guolv($_POST['ad_list']);
    //$ad_pv=guolv($_POST['ad_pv']);
    $ad_endtime = guolv($_POST['ad_endtime']);
    if ($ad_type !== '' && $ad_content !== '' && $ad_endtime !== '') {
        // if($ad_pv!=='' && $ad_endtime!==''){
        // echo "<script>alert('点击次数/到期时间,只能二选其一,空着即可');location.href='adlist.php'</script>";
        // exit;
        // }
        $row = $mysql->query("select * from `addata` where `ad_type`='{$ad_type}' and `ad_list`='{$ad_list}' limit 1");
        if ($row) {
            echo "<script>alert('广告已经存在请先删除');location.href='adlist.php'</script>";
            exit;
        }
        $arr = array('ad_type' => $ad_type, 'ad_content' => $ad_content, 'ad_list' => $ad_list, 'pv' => $ad_pv, 'endtime' => $ad_endtime);
        $value = arr2s($arr);
        $mysql->query("insert into `addata` {$value}");
        echo "<script>alert('增加成功');location.href='adlist.php'</script>";
        exit;
    } else {
        echo "<script>alert('请填写每一项');location.href='adlist.php'</script>";
        exit;
    }
}
$adlist_select = $mysql->query("select name from `typedata`");
?>
	<link rel="stylesheet" href="../editor/themes/default/default.css" />
	<link rel="stylesheet" href="../editor/plugins/code/prettify.css" />
	<script src="static/jquery.js" type="text/javascript"></script> 
	<script charset="utf-8" src="../editor/kindeditor.js"></script>
	<script charset="utf-8" src="../editor/lang/zh_CN.js"></script>
Exemplo n.º 2
0
require '../conn.php';
require '../functions.php';
require 'admin.php';
$filename = "tx.xls";
//先定义一个excel文件
header("Content-Type: application/vnd.ms-execl");
header("Content-Type: application/vnd.ms-excel; charset=utf-8");
header("Content-Disposition: attachment; filename={$filename}");
header("Pragma: no-cache");
header("Expires: 0");
$day = date("Y-m-d", time());
$rows = $mysql->query("select * from `txdata` where `state`=0 order by `id` desc");
foreach ($rows as $row) {
    $realname = iconv('utf-8', 'gb2312', $row['realname']);
    if ($row['sx1'] !== '') {
        //提成处理
        $sx1_money = $row['money'] * ($config['tc'] / 100);
        //1级上线提成
        $mysql->execute("update `userdata` set `money`=`money`+{$sx1_money} where `id`='{$row['sx1']}'");
        //结算上线
        //写入状态
        $arr_tx = array('uid' => $row['sx1'], 'aid' => '', 'title' => "下线会员ID:{$row['sx1']}提现分成奖励", 'long' => '#', 'money' => $sx1_money, 'ip' => '', 'day' => $day, 'time' => time());
        $value = arr2s($arr_tx);
        $mysql->query("insert into `refererdata` {$value}");
    }
    echo $realname . "\t";
    echo $row['alipay'] . "\t";
    echo $row['money'] . "\t";
}
$mysql->execute("update `txdata` set `state`=1 where `state`=0");
//修改所有申请状态
Exemplo n.º 3
0
Arquivo: reg.php Projeto: rallm008/wzz
    // exit;
    // }
    $row = $mysql->query("select * from `userdata` where `phone`='{$phone}' limit 1");
    if (!$row) {
        $arr = array('tj_id' => $tj_id, 'phone' => $phone, 'pass' => $pass, 'money' => $song, 'wx' => '', 'realname' => '', 'alipay' => '', 'wgateid' => '', 'ip' => $ip, 'kou' => 100, 'day' => date("Y-m-d", time()), 'time' => time());
        $value = arr2s($arr);
        $mysql->query("insert into `userdata` {$value}");
        //$mysql->query("INSERT INTO `userdata` (`id`, `tj_id`, `phone`, `pass`, `money`, `wx`, `realname`, `alipay`, `wgateid`, `ip`, `kou`, `day`, `time`) VALUES (NULL, '{$tj_id}', '{$phone}', '{$pass}', '{$song}', '', '', '', '', '{$ip}', '100', '{$day}', '{$time}');");
        $id = mysql_insert_id();
        if ($id !== 0) {
            //师傅获得多少奖励
            if ($config['reg_yzr1'] !== 0 && $tj_id !== 0) {
                $mysql->execute("update `userdata` set `money`=`money`+'{$config['reg_yzr1']}' where `id`='{$tj_id}'");
                //写入状态
                $arr_reg_yzr1 = array('uid' => $tj_id, 'aid' => '', 'title' => "新收徒弟ID:{$id}发放奖励", 'long' => '#', 'money' => $config['reg_yzr1'], 'ip' => $ip, 'day' => $day, 'time' => time());
                $value_reg_yzr1 = arr2s($arr_reg_yzr1);
                $mysql->query("insert into `refererdata` {$value_reg_yzr1}");
            }
            echo "<script>alert('注册成功!请重新登录');location.href='login.php'</script>";
            exit;
        } else {
            echo "<script>alert('注册失败');location.href='reg.php'</script>";
            exit;
        }
    } else {
        echo "<script>alert('手机号已经被占用');location.href='reg.php'</script>";
        exit;
    }
}
?>
<head>
Exemplo n.º 4
0
Arquivo: tx.php Projeto: rallm008/wzz
    }
    if (is_numeric($money) == false) {
        echo "<script>alert('提现金额必须是整数');location.href='tx.php'</script>";
        exit;
    }
    if ($money > $userdata['money']) {
        echo "<script>alert('提现金额超过你的余额');location.href='tx.php'</script>";
        exit;
    }
    // if($yzm=='' || $yzm!==$_COOKIE['yzm']){
    // echo "<script>alert('你输入的手机验证码错误');location.href='tx.php'</script>";
    // exit;
    // }
    if ($realname !== '' && $alipay !== '') {
        $arr = array('uid' => $userdata['id'], 'sx1' => $session['tj_id'], 'realname' => $realname, 'phone' => $userdata['phone'], 'alipay' => $alipay, 'money' => $money, 'state' => 0, 'time' => time());
        $values = arr2s($arr);
        $mysql->query("update `userdata` set `money`=`money`-{$money} where `id`='{$userdata['id']}'");
        $mysql->execute("insert into `txdata` {$values}");
        $id = mysql_insert_id();
        if ($id !== 0) {
            echo "<script>alert('提现申请成功,等待支付');location.href='txlist.php'</script>";
            exit;
        }
    }
}
?>


<!doctype html>
<html>
<head>