<?php

namespace app\admin\controller;
use think\Controller;
use think\Db;
class  Dmin1 extends Controller
{
public function lst()
{
session_start();
echo $_SESSION["USER_NAME"];
echo $_SESSION["PASSWORD"];
return $this->fetch();
}
public function add()
{
if (request()->isPost()){
$data = [
'USER_ID'=>(input('USER_ID')),
'USER_NAME'=>(input('USER_NAME')),
'USER_PRIV'=>(input('USER_PRIV')),
'DEPT_ID'=>(input('DEPT_ID')),
'USER_NO'=>(input('USER_NO')),
'POST_PRIV'=>(input('POST_PRIV')),
'IM_RANGE'=>(input('IM_RANGE')),
'CANBROADCAST'=>(input('CANBROADCAST')),
'SEX'=>(input('SEX')),
'PASSWORD'=>(input('PASSWORD')),
];
if(db('user')->insert($data)){
return $this->success('ok','lst');
}
else {
return $this->error('false');
}
return ;
}
return $this->fetch();
}
}
?>