Пример #1
0
 function UpdatePWd($pwd)
 {
     $this->db->update("user", ["pass" => \Ss\User\Comm::SsPW($pwd)], ["uid" => $this->uid]);
 }
Пример #2
0
                    </ul>
                </div>
            </nav>
        </header>

        <!-- =============================================== -->

        <!-- Left side column. contains the sidebar -->
        <aside class="main-sidebar">
            <!-- sidebar: style can be found in sidebar.less -->
            <section class="sidebar">
                <!-- Sidebar user panel -->
                <div class="user-panel">
                    <div class="pull-left image">
                        <img src="<?php 
echo \Ss\User\Comm::Gravatar($U->GetEmail());
?>
" class="img-circle" alt="User Image" />
                    </div>
                    <div class="pull-left info moe-side-menu">
                        <p><?php 
echo $U->GetUserName();
?>
</p>

                        <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                    </div>
                </div>

                <!-- sidebar menu: : style can be found in sidebar.less -->
                <ul class="sidebar-menu">
Пример #3
0
<?php

//检测是否登录,若没登录则转向登录界面
if (isset($_COOKIE['uid']) || $_COOKIE['uid'] != '') {
    //co
    $uid = $_COOKIE['uid'];
    $user_email = $_COOKIE['user_email'];
    $user_pwd = $_COOKIE['user_pwd'];
    $U = new \Ss\User\UserInfo($uid);
    //验证cookie
    $pwd = $U->GetPasswd();
    $pw = \Ss\User\Comm::CoPW($pwd);
    if ($pw != $user_pwd) {
        header("Location:login.php");
    }
    if (!$U->IsAdmin()) {
        header("Location:../user/index.php");
    }
} else {
    header("Location:login.php");
    exit;
}
$oo = new Ss\User\Ss($uid);
Пример #4
0
} elseif (strlen($passwd) < 8) {
    $a['msg'] = "密码太短";
} elseif (strlen($name) < 5) {
    $a['msg'] = "用户名太短";
} elseif ($c->IsUsernameUsed($name)) {
    $a['msg'] = "用户名已经被使用";
} elseif (empty($question)) {
    $a['msg'] = "密保问题没有填写";
} elseif (empty($answer)) {
    $a['msg'] = "密保回答无效或没有填写";
} else {
    if ($inviter != 0) {
        $query = $ko->db()->query("SELECT * FROM user WHERE uid='{$inviter}'");
        $result = mysqli_fetch_array($query, MYSQLI_ASSOC);
        $able = $result['transfer_enable'] + 1073741824;
        $ko->db()->query("UPDATE user SET `transfer_enable` = {$able} WHERE uid = {$inviter}");
    }
    // get value
    $ref_by = $code->GetCodeUser();
    $passwd = \Ss\User\Comm::SsPW($passwd);
    $plan = "A";
    $transfer = 6442450944;
    $invite_num = rand($user_invite_min, $user_invite_max);
    //do reg
    $reg = new \Ss\User\Reg();
    $reg->Reg($name, $email, $passwd, $plan, $transfer, $invite_num, $ref_by, $role, $inviter, $question, $answer);
    $code->Del();
    $a['ok'] = '1';
    $a['msg'] = "注册成功!";
}
echo json_encode($a);
Пример #5
0
<?php

require_once '../lib/config.php';
require_once '_check.php';
$pwd = $_POST['pwd'];
$pwd = \Ss\User\Comm::SsPW($pwd);
if ($U->GetPasswd() != $pwd) {
    $a['error'] = '1';
    $a['msg'] = "密码错误";
} else {
    $a['ok'] = '1';
    $a['msg'] = "再见,您已经安全的从我们的数据库中移除。";
    //remove
    $U->DelMe();
}
echo json_encode($a);
Пример #6
0
<?php

//设置编码
header("content-type:text/html;charset=utf-8");
require_once '../lib/config.php';
/**
 * SSPanel 二次开发 吟梦の重置方法
*/
if (isset($_POST['answer']) && isset($_POST['newpassword']) && isset($_POST['email'])) {
    $ans = $_POST['answer'];
    $newpwd = $_POST['newpassword'];
    $email = $_POST['email'];
    $uid = $ko->kotoriFindKotori('uid', 'email', $email);
    if ($ko->kotoriFindKotori('answer', 'email', $email) == $ans) {
        $newpwd = \Ss\User\Comm::SsPW($newpwd);
        $ko->updateUserInfo('pass', $newpwd, $uid);
        $a['msg'] = '密码已修改,新的密码为' . $_POST['newpassword'] . ',请牢记哦。';
    } else {
        $a['msg'] = '密码重置失败,密保答案无效哦。';
    }
    echo json_encode($a);
} else {
    return false;
    exit;
}
/***
//mailgun
require '../vendor/autoload.php';
use Mailgun\Mailgun;
$mg = new Mailgun($mailgun_key);
$domain = $mailgun_domain;
Пример #7
0
<?php

require_once '../lib/config.php';
require_once '_check.php';
$smarty->assign('Gravatar_Email_img', \Ss\User\Comm::Gravatar($U->GetEmail()));
//获取头像
$smarty->assign('GetUserName', $U->GetUserName());
//获取用户名
$smarty->assign('GetEmail', $U->GetEmail());
//获取邮箱
$smarty->assign('RegDate', $U->RegDate());
//获取加入时间
Пример #8
0
<?php

//开启session
session_start();
require_once '../lib/config.php';
require_once '_check.php';
//引入AES
require_once '../lib/Ss/AES/aes.class.php';
require_once '../lib/Ss/AES/aesctr.class.php';
if (!empty($_POST)) {
    $uid = $_POST['user_uid'];
    $name = $_POST['user_name'];
    $post_user_pass = AesCtr::decrypt($_POST['user_pass'], $_SESSION['randomChar'], 256);
    if (!empty($post_user_pass)) {
        $pass = \Ss\User\Comm::SsPW($post_user_pass);
    } else {
        $pass = $_POST['user_pass_hidden'];
    }
    if (!empty($_POST['user_email'])) {
        $email = $_POST['user_email'];
    } else {
        $email = $_POST['user_email_hidden'];
    }
    $passwd = AesCtr::decrypt($_POST['user_passwd'], $_SESSION['randomChar'], 256);
    if (!empty($_POST['transfer_enable'])) {
        $transfer_enable = $togb * $_POST['transfer_enable'];
    } else {
        $transfer_enable = $_POST['transfer_enable_hidden'];
    }
    $invite_num = $_POST['invite_num'];
    $enable = $_POST['enable'];