Files
2023-06-22 13:33:25 +08:00

10 lines
1.1 KiB
PHP

<?php
//创建小组
defined('IN_TS') or die('Access Denied.');
switch($ts){
case "":
include template("create");
break;
case "do": $js = intval($_GET['js']); $authcode = strtolower($_POST['authcode']); if ($authcode != $_SESSION['verify']) { getJson('验证码输入有误,请重新输入!', $js); } $path=h($_POST['path']); $email=trim($_POST['email']); $name=trim($_POST['name']); $face=h($_POST['face']); $about=trim($_POST['about']); if($email=='' || $path=='' || $name=='') { getJson('带*是必要的',$js); } if(valid_email($email) == false) { getJson('Email邮箱输入有误',$js); } echo $email.'<br>'.$path.'<br>'.$name.'<br>'.$face.'<br>'.$about.'<br>'.getIp(); /* $ispath = $new['friendlinks']->findCount('friendlinks',array( 'path'=>$path, )); if($ispath > 0){ getJson('你以提交过了',$js); }else */ $id = $new ['friendlinks']->create ( 'friendlinks',array( 'name'=>$name, 'email'=>$email, 'path'=>$path, 'face'=>$face, 'about'=>$about, 'ip'=>getIp(), 'addtime'=>time(), )); getJson('提交成功!!感谢!',$js); break;
}