<?php
error_reporting(0);
header("Content-type: text/html; charset=utf-8");
if(isset($_POST['reg'])&&$_POST['reg']==1){
//格式判断开始
if((isset($_POST['number'])&&!$_POST['number']=="")&&(isset($_POST['username'])&&!$_POST['username']=="")&&(isset($_POST['password'])&&!$_POST['password']=="")&&(isset($_POST['cpassword'])&&!$_POST['cpassword']=="")){
$syydz = $_SERVER['HTTP_REFERER'];
$number=md5(md5($_POST['number']));
$username = $_POST['username'];
$password=md5(md5($_POST['password']));
$cpassword=md5(md5($_POST['cpassword']));
$password_num = strlen($_POST['cpassword']);
if(!preg_match("/[^\d-., ]/",$username)){
if(strlen($username)>=5&&strlen($username)<=20){
if($password_num>=8&&$password_num<=30){
if($password==$cpassword){
$numbers_json_name = "vip_numbers.json";
$numbers_json_string = file_get_contents($numbers_json_name);
$numbers_obj = json_decode($numbers_json_string);
$numbers = $numbers_obj->numbers;
$numbers_num = count($numbers);
if($numbers_num!=0){
for($j=0;$j<$numbers_num;$j++){
if($numbers[$j]==$number){
//开始读取数据
$json_name = "vip_zhuanjiao.json";
$json_string = file_get_contents($json_name);
$obj = json_decode($json_string);
$users = $obj->users;
$users_num = count($users);
if($users_num!=0){
for($i=0;$i<$users_num;$i++){
if($users[$i][0]==$username){
echo '<script language="javascript"> alert("注册失败。此账号已被注册占用!\n\n说明:建议使用QQ号/手机号作为登入账号。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
break;
}else if($i==$users_num-1){
array_splice($numbers,$j,1);
$numbers_obj = array ('numbers'=>$numbers);
$numbers_json_string = json_encode($numbers_obj);
file_put_contents('vip_numbers.json', $numbers_json_string);
$user = array($username,$password,date('Y-m-d H:i:s',time()),$_SERVER["REMOTE_ADDR"]);
$users[] = $user;
$obj = array ('users'=>$users);
$json_string = json_encode($obj);
file_put_contents('vip_zhuanjiao.json', $json_string);
echo '<script language="javascript"> alert("注册成功。请牢记以下信息:↓ ↓ ↓\n账号:'.$username.'\n密码:'.$_POST['cpassword'].'");window.location.href=\'../\';</script>';
}
}
break;
}else{
array_splice($numbers,$j,1);
$numbers_obj = array ('numbers'=>$numbers);
$numbers_json_string = json_encode($numbers_obj);
file_put_contents('vip_numbers.json', $numbers_json_string);
$user = array($username,$password,date('Y-m-d H:i:s',time()),$_SERVER["REMOTE_ADDR"]);
$users[] = $user;
$obj = array ('users'=>$users);
$json_string = json_encode($obj);
file_put_contents('vip_zhuanjiao.json', $json_string);
echo '<script language="javascript"> alert("注册成功。请牢记以下信息:↓ ↓ ↓\n账号:'.$username.'\n密码:'.$_POST['cpassword'].'");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else if($j==$numbers_num-1){
echo '<script language="javascript"> alert("注册失败。注册码错误!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
break;
}
}
}else{
echo '<script language="javascript"> alert("注册失败。注册码缺货!\n\n说明:注册码暂时缺货,请联系客服购买。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("注册失败。密码和确认密码不一致!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("注册失败。密码不足8位字符!\n\n说明:密码至少8位字符,最多30位字符。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("注册失败。账号不足5位数字!\n\n说明:账号至少5位数,最多20位数。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("注册失败。账号包含特殊字符!\n\n说明:禁止使用中文、英文、符号等,只允许使用纯数字");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("注册失败。输入框为空!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else if(isset($_POST['login'])&&$_POST['login']==1){
//登录代码
if((isset($_POST['username'])&&!$_POST['username']=="")&&(isset($_POST['password'])&&!$_POST['password']=="")){
$username = $_POST['username'];
$password = md5(md5($_POST['password']));
$password_num = strlen($_POST['password']);
if((strlen($username)>=5&&strlen($username)<=20)&&($password_num>=8&&$password_num<=30)&&(!preg_match("/[^\d-., ]/",$username))){
$json_name = "vip_zhuanjiao.json";
$json_string = file_get_contents($json_name);
$obj = json_decode($json_string);
$users = $obj->users;
$users_num = count($users);
if($users_num!=0){
for($i=0;$i<$users_num;$i++){
if(($users[$i][0]==$username)&&($users[$i][1]==$password)){
if(strlen($_POST['loginbl'])&&$_POST['loginbl']=='on'){
setcookie('vip_username',$username,time()+3600*24*7,'/');
setcookie('vip_password',$password,time()+3600*24*7,'/');
}else{
setcookie('vip_username',$username,0,'/');
setcookie('vip_password',$password,0,'/');
}
if(empty($_COOKIE['cookie_name'])){
echo '<script language="javascript"> alert("登录成功!欢迎回来。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}else{
echo '<script language="javascript"> alert("登录失败!浏览器不支持Cookie。");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
break;
}else if($i==$users_num-1){
echo '<script language="javascript"> alert("登录失败,密码错误或者账户不存在!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}
}else{
echo '<script language="javascript"> alert("登录失败,密码错误或者账户不存在!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("登录失败,密码错误或者账户不存在!");</script>';
echo '<script language="javascript"> window.location.href = "'.$_SERVER['HTTP_REFERER'].'";</script>';
}
}else{
echo '<script language="javascript"> alert("登录失败。输入框为空!");</script>';
echo '<script language="javascript"
表白网页制作源码.zip
需积分: 0 173 浏览量
更新于2024-01-08
收藏 25.24MB ZIP 举报
在线表白也不失为一种浪漫的方式,只要输入一些基本信息,就能自动生成表白页面。
可以设置购买网站会员来使用指定的网页制作模板,从而增加网站收入。
无需数据库即可使用,带有后台管理,可以设置指定域名,同时还能设置会员的激活码。
账号:admin 密码:qqmu.com
酷爱码
- 粉丝: 8856
- 资源: 2005
最新资源
- 基于大数据技术的工程项目管理架构研究与应用
- dcs111_ui_auto.zip
- Java学生信息管理系统GUI界面+MySQL数据库+实训报告(高分项目)
- 电梯壁板自动涂胶装配生产线sw19可编辑全套技术资料100%好用.zip
- #MATLAB模拟电磁波在自由空间中传播,基于FDTD方法编写,采用ABC边界,激励源选择正弦脉冲脉冲 #程序包含详细注释,本人在2020a版本均可运行
- java学生信息管理系统(GUI+javaSwing+MySQL)源码+报告
- 动力电池及电池管理系统BMS(stp+cad+资料)全套技术资料100%好用.zip
- 无人艇、无人船usv nmpc预测控制,有详细的代码解释 能够实现动态避障都有详细的注释和代码 几乎每行都有 需要下载matlab以及casadi求解器,不然无法求解 仿真对象无人艇:WAM
- Java+Swing+Mysql实现学生信息管理系统源码+数据库+报告文档
- 二工位半自动灌袋机sw20可编辑全套技术资料100%好用.zip
- 经典的FC游戏SD快打旋风
- win32汇编环境,对话框程序源码模版
- 一款非常昂贵的java支付系统源码分享给大家学习,附带完整的安装教程和步骤-非常昂贵完善的支付,代付,收银系统java版-优雅草片翼
- Matlab计算齿轮啮合刚度计算,包括赫兹刚度弯曲刚度等子程序 以及六自由度齿轮系统动力学响应计算
- 电梯控制柜测试柜sw19可编辑全套技术资料100%好用.zip
- Multimodal Deep Learning