public function adduser() { //if(isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['passwd']) && !empty($_POST['passwd'])){ if (isset($_GET['username']) && !empty($_GET['username']) && isset($_GET['passwd']) && !empty($_GET['passwd'])) { if (libs_tools::checkEmail($_GET['username'])) { if ($this->dataObj->checkUsername($_GET['username'])) { echo '邮箱己被注册,请更换'; } else { $username = $_GET['username']; $resdata = $this->dataObj->adduser($username, $_GET['passwd']); echo $resdata; } } else { echo '邮箱格式错误'; } } else { echo '缺少参数'; } }
public function addfeedback() { if (!isset($_GET['username']) && !empty($_GET['username']) && !isset($_GET['comment']) && !empty($_GET['comment'])) { echo '提交参数错误'; } if (libs_tools::checkEmail($_GET['username'])) { $username = $_GET['username']; } else { echo '用户名错误'; return; } $feedback = array(); /*if($_GET['uid']){ $feedback['uid'] = $_GET['uid']; }else{ $_GET['uid'] = 0; }*/ $comment = libs_tools::filterXss($_GET['comment']); return $this->dataObj->addFeedback($_GET['username'], $comment); }
public function addtags() { if (!isset($_GET['username']) && !empty($_GET['username']) && !isset($_GET['tagname']) && !empty($_GET['tagname'])) { echo '提交参数错误'; } if (libs_tools::checkEmail($_GET['username'])) { $username = $_GET['username']; } else { echo '用户名错误'; return; } $tagname = libs_tools::filterXss($_GET['tagname']); $status = $this->dataObj->checkTag($tagname); //判断该tag是否己有,己有tag reference+1 else add new tag if ($status) { $this->dataObj->updateTagRef($tagname); return $status; } else { return $this->dataObj->addTag($tagname, $_GET['username']); } }