Пример #1
0
 function verify($email, $passwd)
 {
     $datas = $this->db->select($this->table, "*", ["AND" => ["email" => $email, "pass" => $passwd], "LIMIT" => 1]);
     $rs;
     if (count($datas) == 1) {
         $node = new \Ss\Node\NodeInfo($datas[0]['node_id']);
         $u = $datas[0];
         $rs['code'] = '1';
         $rs['ok'] = '1';
         $rs['msg'] = "欢迎回来";
         $rs['node'] = $node->Server();
         $rs['account'] = $u['port'];
         $rs['passwd'] = $u['passwd'];
         $rs['method'] = $node->Method();
         $rs['features']['adfilter'] = $u['f_adfilter'];
     } else {
         $rs['code'] = '0';
         $rs['msg'] = "账户或者密码错误";
     }
     return $rs;
 }
Пример #2
0
<?php

require_once '../lib/config.php';
require_once '_check.php';
$id = $_GET['id'];
$node = new \Ss\Node\NodeInfo($id);
$server = $node->Server();
$method = $node->Method();
$pass = $oo->get_pass();
$port = $oo->get_port();
$nodeType = $node->Type();
$role = $ko->kotoriNeedInfo('role', $uid);
$userPermission = $ko->getUserPermission($role);
if ($userPermission >= $nodeType) {
    ?>
{
"server":"<?php 
    echo $server;
    ?>
",
"server_port":<?php 
    echo $port;
    ?>
,
"local_port":1080,
"password":"<?php 
    echo $pass;
    ?>
",
"timeout":600,
"method":"<?php 
Пример #3
0
require_once '_main.php';
//更新
if (!empty($_POST)) {
    $node_id = $_POST['node_id'];
    $node_name = $_POST['node_name'];
    $node_type = $_POST['node_type'];
    $node_server = $_POST['node_server'];
    $node_method = $_POST['node_method'];
    $node_info = $_POST['node_info'];
    $node_status = $_POST['node_status'];
    $node_order = $_POST['node_order'];
    $node = new \Ss\Node\NodeInfo($node_id);
    $query = $node->Update($node_name, $node_type, $node_server, $node_method, $node_info, $node_status, $node_order);
    if ($query) {
        $ue['code'] = '1';
        $ue['ok'] = '1';
        $ue['msg'] = "更新成功!";
        $ue['msg'] .= " <script>window.setTimeout(\"location.href='node.php'\", 2000);</script> ";
    }
    echo json_encode($ue, JSON_UNESCAPED_UNICODE);
} else {
    if (!empty($_GET)) {
        //获取id
        $id = $_GET['id'];
        $node = new \Ss\Node\NodeInfo($id);
        $rs = $node->NodeArray();
    }
    $smarty->assign('id', $id);
    $smarty->assign('rs', $rs);
    $smarty->display('admin/node_edit.tpl');
}
Пример #4
0
<?php

require_once '../lib/config.php';
require_once '_check.php';
$id = $_GET['id'];
$node = new \Ss\Node\NodeInfo($id);
$server = $node->Server();
$method = $node->Method();
$pass = $oo->get_pass();
$port = $oo->get_port();
?>
{
"server":"<?php 
echo $server;
?>
",
"server_port":<?php 
echo $port;
?>
,
"local_port":1080,
"password":"<?php 
echo $pass;
?>
",
"timeout":600,
"method":"<?php 
echo $method;
?>
"
}
Пример #5
0
<?php

//引入配置文件
require_once '../lib/config.php';
require_once '_check.php';
$id = $_GET['id'];
$node = new \Ss\Node\NodeInfo($id);
$node->Del();
echo ' <script>alert("删除成功!")</script> ';
echo " <script>window.location='node.php';</script> ";