Пример #1
0
    $head .= "\r\n";
    $head .= trim($query);
    $write = fputs($fp, $head);
    $header = "";
    while ($str = trim(fgets($fp, 4096))) {
        $header .= $str;
    }
    while (!feof($fp)) {
        $data .= fgets($fp, 4096);
    }
    return $data;
}
//密码找回
if ($_POST) {
    $phone = guolv(trim($_POST['phone']));
    $code = guolv(trim($_POST['code']));
    if (is_phone($phone) == false) {
        echo "<script>alert('请输入正确的手机号');location.href='find.php'</script>";
        exit;
    }
    if ($code !== $_SESSION['code']) {
        echo "<script>alert('验证码错误,请重新输入');location.href='find.php'</script>";
        exit;
    }
    $row = $mysql->query("select * from `userdata` where `phone`='{$phone}' limit 1");
    if ($row) {
        $rand = rand(1, 9999);
        $mysql->execute("update `userdata` set `pass`='{$rand}' where `phone`='{$phone}'");
        $apikey = "5b4aa85957d6b5ce942ac4c9e8e343fe";
        //请用自己的apikey代替
        $text = "正在找回密码,您的密码是#{$rand}#";
Пример #2
0
    $tc = guolv($_POST['tc']);
    $iphour = guolv($_POST['iphour']);
    $fangwen = guolv($_POST['fangwen']);
    $area = guolv($_POST['area']);
    $city = guolv($_POST['city']);
    $weixin_reg = guolv($_POST['weixin_reg']);
    $daysong = guolv($_POST['daysong']);
    $ipreg2 = guolv($_POST['ipreg2']);
    $reg_yzr1 = guolv($_POST['reg_yzr1']);
    $gotimes = guolv($_POST['gotimes']);
    $AdminLoginCode = guolv($_POST['AdminLoginCode']);
    $AdminEmail = guolv($_POST['AdminEmail']);
    $UserAddArticle = guolv($_POST['UserAddArticle']);
    $UserAddArticleType = guolv($_POST['UserAddArticleType']);
    $DetailMoreNum = guolv($_POST['DetailMoreNum']);
    $DetailPvOpen = guolv($_POST['DetailPvOpen']);
    $arr = array('site' => $site, 'sharesite' => $sharesite, 'ti' => $ti, 'p1' => $p1, 'pp' => $pp, 'song' => $song, 'openreg' => $openreg, 'sitename' => $sitename, 'kou_pr' => $kou_pr, 'kou_day' => $kou_day, 'kou_hour' => $kou_hour, 'yunpian' => $yunpian, 'safe' => $safe, 'qqkf' => $qqkf, 'tc' => $tc, 'iphour' => $iphour, 'fangwen' => $fangwen, 'area' => $area, 'city' => $city, 'weixin_reg' => $weixin_reg, 'daysong' => $daysong, 'ipreg2' => $ipreg2, 'reg_yzr1' => $reg_yzr1, 'gotimes' => $gotimes, 'AdminLoginCode' => $AdminLoginCode, 'AdminEmail' => $AdminEmail, 'UserAddArticle' => $UserAddArticle, 'UserAddArticleType' => $UserAddArticleType, 'DetailMoreNum' => $DetailMoreNum, 'DetailPvOpen' => $DetailPvOpen);
    $config = var_export($arr, true);
    file_put_contents('../config.php', "<?php\nreturn {$config};\n?>");
    //print_r($arr);
    echo "<script>alert('修改成功');location.href='set.php'</script>";
    exit;
}
//扣量
if ($_POST['do'] == 'kou') {
}
?>

<?php 
include 'head.php';
?>
Пример #3
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require '../QueryList.class.php';
require 'admin.php';
if ($_POST) {
    $long = guolv(trim($_POST['long']));
    $type_arr = explode('#', guolv($_POST['type']));
    $type = $type_arr[0];
    $money = $type_arr[1];
    $html = get_contents($long);
    $html = str_replace('data-src', 'src', $html);
    $vid = cut($html, 'vid=', '&');
    //获取视频ID
    $caiji = array("title" => array(".rich_media_title:first", "text"), "content" => array("#js_content", "html"));
    $quyu = '';
    $hj = QueryList::Query($html, $caiji, $quyu);
    $arr = $hj->jsonArr;
    $title = $arr[0]['title'];
    $content = preg_replace("/<(\\/?i?frame.*?)>/si", "", $arr[0]['content']);
    //过滤frame标签
    if ($vid !== '') {
        $content = "<p><iframe height=300 width=100% src=\"http://v.qq.com/iframe/player.html?vid={$vid}\" frameborder=0 allowfullscreen></iframe></p>" . $content;
    }
    $pic = cut($html, 'var msg_cdn_url = "', '"');
    if (url_exists($long) == 1) {
        echo "<script>alert('网址不存在');location.href='weixin.php'</script>";
        exit;
    }
Пример #4
0
<?php 
require 'conn.php';
require 'session.php';
require 'functions.php';
$id = guolv($_GET['id']);
//print_r($userdata);
?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<title>新闻-<?php 
echo $config['sitename'];
?>
</title>
<link href="<?php 
echo $site;
?>
/static/all.css" type="text/css" rel="stylesheet" media="all">
<style>
td{border-bottom:1px solid #ddd;height:40px;line-height:40px;font-size:14px;color:#333;}
.mhome{background:#fff;}
</style>
</head>

<body class="mhome">

<?php 
include 'header.php';
Пример #5
0
    $mysql->query("delete from `addata` where `id`='{$del_id}'");
    echo "<script>alert('删除成功');location.href='adlist.php'</script>";
    exit;
}
//发布广告
if ($_POST) {
    if ($_POST['do'] == 'ad') {
        $ad_content = guolv($_POST['ad_content']);
    }
    if ($_POST['do'] == 'js') {
        $ad_content = guolv($_POST['ad_content_js']);
    }
    $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;
Пример #6
0
        $page_1 = $page - 1;
    } else {
        $page_1 = 1;
        $min = 0;
        $page_2 = 2;
    }
}
$max = $page * 35;
$row = $mysql->query("select * from `refererdata` order by `id` desc limit {$min},{$max}");
//查看分享记录
$uid = guolv($_GET['uid']);
if (is_numeric($uid)) {
    $row = $mysql->query("select * from `refererdata` where `uid`='{$uid}' order by `id` desc limit {$min},{$max}");
}
//查看ip
$kip = guolv($_GET['ip']);
if (is_ip($kip)) {
    $row = $mysql->query("select * from `refererdata` where `ip`='{$kip}' order by `id` desc limit {$min},{$max}");
}
?>
<script>
	function parseip(remote_ip_info,ip){
			if(remote_ip_info.ret=='-1')
	{
		$("span[ip='"+ip+"']").html('局域网地址');
	}
	else
	{
		var data = '';
		//if(remote_ip_info.country !='') data = remote_ip_info.country + ',';
		if(remote_ip_info.province !='') data = data + remote_ip_info.province + ',';
Пример #7
0
require 'functions.php';
//全站访问
if ($config['fangwen'] == 4) {
    exit('网站正在更新');
}
$ip = GetIP();
$day = date("Y-m-d", time());
$time = time();
if ($_SESSION['login'] == 1) {
    _location("ucenter.php", 301);
    exit;
}
//登录验证
if ($_POST) {
    $phone = guolv(trim($_POST['phone']));
    $password = guolv(trim($_POST['password']));
    //$code=guolv(trim($_POST['code']));
    if (is_phone($phone) == false) {
        echo "<script>alert('请输入正确的手机号');location.href='login.php'</script>";
        exit;
    }
    if ($password == '') {
        echo "<script>alert('请输入密码');location.href='login.php'</script>";
        exit;
    }
    // if($code!==$_SESSION['code']){
    // echo "<script>alert('验证码错误,请重新输入');location.href='login.php'</script>";
    // exit;
    // }
    $row = $mysql->query("select * from `userdata` where `phone`='{$phone}' and `pass`='{$password}' limit 1");
    if ($row) {
Пример #8
0
//注册
$tj_id = guolv(trim($_POST['tj_id']));
//推荐人
if (is_numeric($tj_id)) {
    $row_tj = $mysql->query("select * from `userdata` where `id` in({$tj_id})");
    if (!$row_tj) {
        $tj_id = 0;
    }
} else {
    $tj_id = 0;
}
if ($_POST) {
    $phone = guolv(trim($_POST['username']));
    $pass = guolv(trim($_POST['password']));
    // $code=guolv(trim($_POST['code']));
    $yzm = guolv(trim($_POST['yzm']));
    $yzm1 = substr($phone, 3, 4);
    if ($config['openreg'] == 0) {
        echo "<script>alert('注册关闭,请联系我们');location.href='reg.php'</script>";
        exit;
    }
    if ($config['ipreg2'] == 1) {
        $row_ip = $mysql->query("select * from `userdata` where `ip`='{$ip}' order by `id` limit 1");
        //获取相同ip
        if ($row_ip) {
            echo "<script>alert('为防止同一人注册多个号,禁止同一ip重复注册!');location.href='reg.php'</script>";
            exit;
        }
    }
    if (is_phone($phone) == false) {
        echo "<script>alert('请输入正确的手机号');location.href='reg.php'</script>";
Пример #9
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
if ($_POST) {
    //新闻发布
    $news_title = guolv($_POST['news_title']);
    $news_content = guolv($_POST['news_content']);
    $time = time();
    if ($news_title !== '' && $news_content !== '') {
        $mysql->query("insert into `newsdata` values(null,'{$news_title}','{$news_content}')");
        $id = mysql_insert_id();
        if ($id !== 0) {
            echo "<script>alert('发布成功!');location.href='newslist.php'</script>";
        }
        //_location("set.php",301);
        exit;
    }
}
?>

<?php 
include 'head.php';
?>
    
	<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>
Пример #10
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
//删除
$del_id = guolv($_GET['del_id']);
if (is_numeric($del_id)) {
    $mysql->query("delete from `newsdata` where `id`='{$del_id}'");
    echo "<script>alert('删除成功');location.href='newslist.php'</script>";
}
?>

<?php 
include 'head.php';
?>
    

    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php 
include 'left.php';
?>
<div class="span9">
            <h1 class="page-title">新闻管理</h1>
<!--			
<div class="btn-toolbar">
    <a href="#myModal" data-toggle="modal" class="btn">Delete</a>
  <div class="btn-group">
Пример #11
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
$id = guolv($_GET['id']);
if (is_numeric($id)) {
    $row = $mysql->query("select * from `newsdata` where `id` in({$id})");
}
if ($_POST) {
    //新闻修改
    $news_title = guolv($_POST['news_title']);
    $news_content = guolv($_POST['news_content']);
    $news_id = guolv($_POST['news_id']);
    $time = time();
    if ($news_title !== '' && $news_content !== '') {
        $mysql->query("update `newsdata` set `title`='{$news_title}',`content`='{$news_content}' where `id`='{$news_id}'");
        echo "<script>alert('发布成功!');location.href='newslist.php'</script>";
        //_location("set.php",301);
        exit;
    }
}
?>

<?php 
include 'head.php';
?>
    
	<link rel="stylesheet" href="../editor/themes/default/default.css" />
	<link rel="stylesheet" href="../editor/plugins/code/prettify.css" />
Пример #12
0
if (is_numeric($del_id)) {
    $mysql->query("delete from `article` where `id`='{$del_id}'");
    echo "<script>alert('删除成功');location.href='all_article.php'</script>";
    exit;
}
//搜索
if ($_GET['do'] == 'search') {
    $search_title = guolv($_GET['search_title']);
    $row = $mysql->query("select * from `article` where `title` LIKE  '%{$search_title}%' limit 1");
}
//排序
if ($_GET['order'] == 'pv') {
    $row = $mysql->query("select * from `article` order by -`pv`");
}
//日期
$search_day = guolv($_GET['day']);
if (preg_match("/\\d{4}-1[0-2]|0?[1-9]-0?[1-9]|[12][0-9]|3[01]/", $search_day)) {
    $row = $mysql->query("select * from `article` where `day`='{$search_day}'");
}
?>

<?php 
include 'head.php';
?>
    
<script type="text/javascript"> 
function check_all(obj,cName) 
{ 
    var checkboxs = document.getElementsByName(cName); 
    for(var i=0;i<checkboxs.length;i++){checkboxs[i].checked = obj.checked;} 
} 
Пример #13
0
    $admin_username = guolv($_POST['admin_username']);
    $admin_password = guolv($_POST['admin_password']);
    $admin_q = guolv($_POST['admin_q']);
    $row = $mysql->query("select * from `admindata` where `username`='{$admin_username}' limit 1");
    if (!$row) {
        $mysql->query("insert into `admindata` values(null,'{$admin_username}','{$admin_password}','{$admin_q}')");
        $id = mysql_insert_id();
        if ($id !== 0) {
            echo "<script>alert('增加成功!');location.href='set_admin.php'</script>";
            exit;
        }
    }
}
//管理员删除
if (is_numeric($_GET['del_admin'])) {
    $del_admin = guolv($_GET['del_admin']);
    $mysql->query("delete from `admindata` where `id`='{$del_admin}'");
    echo "<script>alert('删除成功!');location.href='set_admin.php'</script>";
    exit;
}
?>

<?php 
include 'head.php';
?>
    
    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php 
include 'left.php';
Пример #14
0
<?php

require 'conn.php';
require 'session.php';
require 'functions.php';
//print_r($session);
//修改资料
if ($_POST) {
    $pass_old = guolv(trim($_POST['pass_old']));
    $pass_new = guolv(trim($_POST['pass_new']));
    $pass_new1 = guolv(trim($_POST['pass_new1']));
    $uid = guolv(trim($_POST['uid']));
    if ($pass_old !== '' && $pass_new !== '' && $pass_new1 !== '') {
        if ($pass_old !== $session['pass']) {
            echo "<script>alert('用户原密码不正确');location.href='editpwd.php'</script>";
            exit;
        }
        if ($pass_new !== $pass_new1) {
            echo "<script>alert('两次输入的密码不正确');location.href='editpwd.php'</script>";
            exit;
        }
        $mysql->execute("update `userdata` set `pass`='{$pass_new}' where `id`='{$uid}'");
        echo "<script>alert('修改成功请重新登录');location.href='session.php?do=exit'</script>";
        exit;
    } else {
        echo "<script>alert('请输入完整信息');location.href='editpwd.php'</script>";
        exit;
    }
}
?>
Пример #15
0
<?php

require 'conn.php';
require 'session.php';
require 'functions.php';
//print_r($session);
//修改资料
if ($_POST) {
    //$wx=guolv(trim($_POST['wx']));
    //$pass=guolv(trim($_POST['pass']));
    $uid = guolv(trim($_POST['uid']));
    $realname = guolv(trim($_POST['realname']));
    $alipay = guolv(trim($_POST['alipay']));
    $phone = guolv(trim($_POST['phone']));
    $wx = guolv(trim($_POST['wx']));
    if ($userdata['realname'] !== '' && $userdata['alipay'] !== '' && $userdata['phone'] !== '') {
        echo "<script>alert('收款姓名、支付宝、手机号,一经填写不得修改!');location.href='zl.php'</script>";
        exit;
    }
    if ($alipay == '' || $realname == '' || $phone == '') {
        echo "<script>alert('请填写每一项内容,一经填写不得修改!');location.href='zl.php'</script>";
        exit;
    }
    if (is_phone($phone) == false) {
        echo "<script>alert('请输入正确的手机号');location.href='zl.php'</script>";
        exit;
    }
    $row = $mysql->query("select * from `userdata` where `alipay`='{$alipay}' limit 1");
    if ($row) {
        echo "<script>alert('支付宝已经被注册');location.href='zl.php'</script>";
        exit;
Пример #16
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
$id = guolv($_GET['id']);
$aid = guolv($_POST['id']);
if (is_numeric($id) == false) {
    echo "<script>alert('广告不存在');location.href='adlist.php'</script>";
    exit;
}
$row = $mysql->query("select * from `addata` where `id`='{$id}'");
if ($_POST && is_numeric($aid)) {
    $ad_content = guolv($_POST['ad_content']);
    $mysql->execute("update `addata` set `ad_content`='{$ad_content}' where `id`='{$aid}'");
    echo "<script>alert('修改成功');location.href='edit_ad.php?id={$aid}'</script>";
    exit;
}
?>

<?php 
include 'head.php';
?>
    
    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php 
include 'left.php';
?>
Пример #17
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
if ($_POST) {
    //新闻发布
    $title = guolv($_POST['title']);
    $content = guolv($_POST['content']);
    $pv_max = guolv($_POST['pv_max']);
    //浏览次数
    $type_arr = explode('#', guolv($_POST['type']));
    $type = $type_arr[0];
    $money = $type_arr[1];
    $pic = guolv($_POST['pic']);
    $day = date("Y-m-d", time());
    if ($title !== '' && $content !== '') {
        $mysql->query("insert into `article` values(null,0,'{$title}','{$content}','{$pic}','{$type}',0,'{$pv_max}','{$money}','{$day}')");
        $id = mysql_insert_id();
        if ($id !== 0) {
            echo "<script>alert('发布成功!');location.href='all_article.php'</script>";
        }
        //_location("set.php",301);
        exit;
    }
}
?>

<?php 
include 'head.php';
Пример #18
0
\t</script>
alert;
}
//print_r($userdata);
//通用接口发送样例
// $apikey = "5b4aa85957d6b5ce942ac4c9e8e343fe"; //请用自己的apikey代替
// $mobile = guolv($_GET['phone']); //请用自己的手机号代替
// $yzm1 = substr($mobile,3,4);
// $text="您的验证码是{$yzm1}";
// echo send_sms($apikey,$text,$mobile);
//模板接口样例(不推荐。需要测试请将注释去掉。)
//以下代码块已被注释
//5b4aa85957d6b5ce942ac4c9e8e343fe
$apikey = $config['yunpian'];
//请用自己的apikey代替
$mobile = guolv($_GET['phone']);
//请用自己的手机号代替
$yzm1 = substr($mobile, 3, 4);
$tpl_id = 1;
//对应默认模板 【#company#】您的验证码是#code#
$tpl_value = "#company#={$config['sitename']}&#code#={$yzm1}";
echo tpl_send_sms($apikey, $tpl_id, $tpl_value, $mobile);
/**
* 通用接口发短信
* apikey 为云片分配的apikey
* text 为短信内容
* mobile 为接受短信的手机号
*/
function send_sms($apikey, $text, $mobile)
{
    $url = "http://yunpian.com/v1/sms/send.json";
Пример #19
0
<?php

session_start();
require "base.inc.php";
$data = $_POST;
$data = guolv(add_slashes($data));
switch ($data['action']) {
    case 'user_up':
        unset($data['action']);
        if ($conn->post_update("" . DB_EXT . "user", $data, "kq_uniqueid='" . $_COOKIE['uid'] . "'")) {
            echo 'ok';
        } else {
            echo '';
        }
        break;
    case 'ly_add':
        is_login(@$_COOKIE['uid'], 0);
        $data['kq_uuid'] = uuid();
        $data['kq_ctime'] = time();
        $data['kq_ip'] = $_SERVER["REMOTE_ADDR"];
        unset($data['action']);
        if ($conn->post_insert("" . DB_EXT . "fankui", $data)) {
            echo 'ok';
        } else {
            echo '';
        }
        break;
    case md5('user_add'):
        if ($data['chkfrom'] == @$_SESSION['add_input']) {
            $user = is_login(@$_COOKIE['uid']);
            unset($data['submit']);
Пример #20
0
session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
$id = guolv($_GET['id']);
$row = $mysql->query("select * from `article` where `id`='{$id}'");
if ($_POST) {
    //文章编辑
    $title = guolv($_POST['title']);
    $content = guolv($_POST['content']);
    $pv_max = guolv($_POST['pv_max']);
    //浏览次数
    $money = guolv($_POST['money']);
    //浏览次数
    $aid = guolv($_POST['id']);
    $mysql->execute("update `article` set `title`='{$title}',`content`='{$content}',`pv_max`='{$pv_max}',`money`='{$money}' where `id`='{$aid}'");
    echo "<script>alert('修改成功');location.href='all_article.php'</script>";
    exit;
}
?>

<?php 
include 'head.php';
?>
    
	<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>
Пример #21
0
$row = $mysql->query("select * from `userdata` order by `id` desc");
//删除会员
$del_id = guolv($_GET['del_id']);
if (is_numeric($del_id)) {
    $mysql->query("delete from `userdata` where `id`='{$del_id}'");
    echo "<script>alert('删除成功');location.href='user.php'</script>";
    exit;
}
//搜索
if ($_GET['do'] == 'search') {
    $phone = guolv($_GET['phone']);
    $row = $mysql->query("select * from `userdata` where `phone`='{$phone}' limit 1");
}
//用户收益排行
if ($_GET['do'] == 'money') {
    $phone = guolv($_GET['phone']);
    $row = $mysql->query("select * from `userdata` order by -`money`");
}
?>

<?php 
include 'head.php';
?>
    

    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php 
include 'left.php';
?>
Пример #22
0
<?php

require 'conn.php';
require 'session.php';
require 'functions.php';
$type_arr = explode(',', $config['UserAddArticleType']);
//开启前台发布
if ($config['UserAddArticle'] == 0) {
    echo "<script>alert('前台会员不支持发布文章');location.href='ucenter.php'</script>";
    exit;
}
//微信文章导入
if ($_POST) {
    require 'QueryList.class.php';
    $long = guolv(trim($_POST['long']));
    $type_id = guolv(trim($_POST['type_id']));
    $html = get_contents($long);
    $money = $type_arr[2];
    $html = str_replace('data-src', 'src', $html);
    $caiji = array("title" => array(".rich_media_title:first", "text"), "content" => array("#js_content", "html"));
    $quyu = '';
    $hj = QueryList::Query($html, $caiji, $quyu);
    $arr = $hj->jsonArr;
    $title = $arr[0]['title'];
    $content = $arr[0]['content'];
    $pic = cut($html, 'var msg_cdn_url = "', '"');
    if (url_exists($long) == 1) {
        echo "<script>alert('网址不存在');location.href='weixin.php'</script>";
        exit;
    }
    if (is_numeric($type_id) == false) {
Пример #23
0
session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
//删除分类
$del_id = guolv($_GET['del_id']);
if (is_numeric($del_id)) {
    $mysql->execute("delete from `typedata` where `id`='{$del_id}'");
    echo "<script>alert('删除成功');location.href='typelist.php'</script>";
    exit;
}
//增加
if ($_POST) {
    $type_name = guolv($_POST['type_name']);
    $type_pp = guolv($_POST['type_pp']);
    $type_author = guolv($_POST['type_author']);
    if ($type_name !== '') {
        $mysql->query("insert into `typedata` values(null,'{$type_name}','{$type_pp}','{$type_author}')");
        $id = mysql_insert_id();
        if ($id !== 0) {
            echo "<script>alert('增加成功');location.href='typelist.php'</script>";
            exit;
        }
    }
}
?>

<?php 
include 'head.php';
?>
    
Пример #24
0
if ($_SESSION['login'] == 1) {
    _location("ucenter.php", 301);
    exit;
}
$ip = GetIP();
// if($config['openreg']!==2){
// _location("reg.php",301);
// exit;
// }
if ($config['openreg'] == 0) {
    echo "<script>alert('注册关闭,请联系我们');location.href='reg.php'</script>";
    exit;
}
//获取wgateid
$wgateid = guolv($_GET['wgateid']);
$verify = guolv($_GET['verify']);
if ($wgateid !== '' && $verify !== '') {
    //验证
    $res = get_contents("http://www.weixingate.com/verify.php?wgateid={$wgateid}&verify={$verify}");
    if ($res == 'false') {
        //验证失败返回手机注册
        _location("reg.php", 301);
        exit;
    }
}
//注册
$tj_id = 0;
//推荐人
$row = $mysql->query("select * from `userdata` where `wgateid`='{$wgateid}' limit 1");
if (!$row) {
    $arr = array('tj_id' => $tj_id, 'phone' => '', 'pass' => '123456', 'money' => $song, 'wx' => '', 'realname' => '', 'alipay' => '', 'wgateid' => $wgateid, 'ip' => $ip, 'kou' => 100, 'day' => date("Y-m-d", time()), 'time' => time());
Пример #25
0
<?php

@session_start();
if (isset($_SESSION)) {
    $_uid = $_SESSION['userdata']['id'];
} else {
    $_uid = guolv($_GET['uid']);
}
?>
<div class="positionFooter">
	<ul>
		<li><a class="a1" href="<?php 
echo $site;
?>
/ucenter.php">个人中心</a></li>   
		<li>
        					<a class="a2" href="<?php 
echo $site;
?>
/list.php?uid=<?php 
echo $_uid;
?>
">开始赚钱</a>
			        </li>
		<li>
        		<a class="a3" href="apprent.php">我要收徒</a>
		        </li>
	</ul>
</div>

<?php 
Пример #26
0
<?php

session_start();
require '../conn.php';
require '../functions.php';
require 'admin.php';
$page = $_GET['page'];
if (is_numeric($page) == false) {
    $page = 1;
} else {
    $page = $page + 1;
}
//删除会员
$state2 = guolv($_GET['state2']);
if (is_numeric($state2)) {
    $mysql->execute("update `txdata` set `state`=2 where `id`='{$state2}'");
    echo "<script>alert('操作成功');location.href='txlist.php'</script>";
    exit;
}
?>

<?php 
include 'head.php';
?>
    

    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php 
include 'left.php';
Пример #27
0
/**
 * [guolv 前端过滤非法字符]
 * @param  [type] $data [description]
 * @return [type]       [description]
 */
function guolv($data)
{
    foreach ($data as $key => $value) {
        if (is_array($value)) {
            guolv($value);
        } else {
            $data[$key] = uhtml($value);
        }
    }
    return $data;
}
Пример #28
0
require 'conn.php';
require 'session.php';
require 'functions.php';
if ($userdata['realname'] == '' || $userdata['alipay'] == '') {
    echo "<script>alert('请填写正确收款姓名和支付宝帐号');location.href='zl.php'</script>";
    exit;
}
//提现金额不足最小提现
// if($userdata['money']<$ti){
// echo "<script>alert('最低提现金额{$ti},你的余额不足');location.href='ucenter.php'</script>";
// exit;
// }
//提现
if ($_POST) {
    $money = guolv($_POST['money']);
    $realname = $userdata['realname'];
    $alipay = $userdata['alipay'];
    //$yzm=guolv($_POST['yzm']);
    if ($alipay == '' || $realname == '') {
        echo "<script>alert('请填写正确收款姓名和支付宝帐号');location.href='zl.php'</script>";
        exit;
    }
    if (is_zzs($money) == false) {
        echo "<script>alert('提现金额必须是整数');location.href='tx.php'</script>";
        exit;
    }
    if ($money < $ti) {
        echo "<script>alert('最低提现金额{$ti}');location.href='tx.php'</script>";
        exit;
    }