Watch 1 Star 6 Fork 60

冒泡鱼 / MarkNotePHP

forked from WuSiYu / MarkNote 
Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
PHP轻量级MarkDown云记事本系统,使用GPL v2协议开源. spread retract

Clone or download
login.php 573 Bytes
Copy Edit Web IDE Raw Blame History
shay authored 2018-07-24 09:21 . 屏蔽了注册功能
<?php
require_once('common.php');
require_once 'include/user.php';
if(isset($_POST['type'])){
switch ($_POST['type']) {
case 'login':
login($_POST['username'], $_POST['passwd']);
break;
case 'register':
//register($_POST['username'], $_POST['email'], $_POST['passwd'], $_POST['nickname']);
break;
case 'logout':
logout();
break;
default:
# code...
break;
}
}
if(hasLogin()){
header("location: ./");
}else{
if(isset($_GET['t']) && $_GET['t'] == 'register'){
include(template('register'));
}else{
include(template('login'));
}
}

Comment ( 0 )

You need to Sign in for post a comment

Help Search