function get_ref_name($rs, $content) { if ($rs['rs'] != 0) { $ref_u = new \Ss\User\UserInfo($rs['rs']); $ref_name = $ref_u->GetUserName(); return $ref_name; } else { return '<code class="hoverable">公开</code>'; } }
<?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);
<?php //设置编码 header("content-type:text/html;charset=utf-8"); require_once '../lib/config.php'; //mailgun require '../vendor/autoload.php'; use Mailgun\Mailgun; $mg = new Mailgun($mailgun_key); $domain = $mailgun_domain; // $code = $_GET['code']; $email = $_GET['email']; $uid = $_GET['uid']; // $ur = new \Ss\User\UserInfo($uid); if ($ur->GetEmail() == $email) { $rs = '1'; } else { $rs = '0'; } if (!$rs) { $a['code'] = '0'; $a['msg'] = "邮箱错误"; } else { $rst = new \Ss\User\ResetPwd($uid); $u = new \Ss\User\User($uid); if ($rst->IsCharOK($code, $uid)) { $NewPwd = md5(time() . $uid . $email); $mg->sendMessage($domain, array('from' => "no-reply@" . $mailgun_domain, 'to' => $email, 'subject' => $site_name . "您的新密码", 'text' => "您的新密码为:" . $NewPwd)); $u->UpdatePWd($NewPwd);
<?php require_once '_main.php'; if (!empty($_GET)) { //获取id $uid = $_GET['uid']; $u = new \Ss\User\UserInfo($uid); $rs = $u->UserArray(); } ?> <!-- =============================================== --> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> 用户管理 <small>User Manage</small> </h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <!-- left column --> <div class="col-md-6"> <!-- general form elements --> <div class="box box-primary">
<li> <a href="user.php"> <i class="fa fa-user"></i> <span>查看用户</span> </a> </li> <li> <a href="invite.php"> <i class="fa fa-users"></i> <span>邀请管理</span> </a> </li> <?php $sessionLogin = new \Ss\User\SessionLogin($_COOKIE['PHPSESSID']); $sessionLoginData = $sessionLogin->GetSessArray(); $userInfo = new \Ss\User\UserInfo($sessionLoginData['uid']); if ($userInfo->isAdmin()) { ?> <li > <a href="/user"> <i class="fa fa-mail-forward"></i> <span>跳转到用户中心</span> </a> </li> <?php } ?> </ul> </section> <!-- /.sidebar --> </aside>
<?php //检测是否登录,若没登录则转向登录界面 if (isset($_COOKIE['PHPSESSID']) || $_COOKIE['PHPSESSID'] != '') { // 查询session login数据 $PHPSESSID = $_COOKIE['PHPSESSID']; $sessionLogin = new \Ss\User\SessionLogin($PHPSESSID); $loginSessionData = $sessionLogin->GetSessArray(); $uid = $loginSessionData['uid']; $user_email = $loginSessionData['user_email']; $user_pwd = $loginSessionData['user_pwd']; //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 || $pw == null || $user_pwd == null) { header("Location:login.php"); } } else { header("Location:login.php"); exit; } $oo = new Ss\User\Ss($uid);
<?php //引入配置文件 require_once '../lib/config.php'; require_once '_check.php'; $uid = $_GET['uid']; $u = new \Ss\User\UserInfo($uid); $u->UpdatePwd(\Ss\Etc\Comm::get_random_char(8)); $u->DelMe(); echo ' <script>alert("删除成功!")</script> '; echo " <script>window.location='user.php';</script> ";
<?php require_once '../lib/config.php'; require_once '_check.php'; if (!empty($_POST)) { $uid = $_POST['uid']; $money = $_POST['money']; //更新 $User = new Ss\User\UserInfo($uid); $User->AddMoney($money); $mysqltime = date('Y-m-d H:i:s', time()); $opid = $_COOKIE['uid']; $db->insert("order", ["uid" => "{$uid}", "money" => "{$money}", "opid" => "{$opid}", "datetime" => $mysqlitime]); $ue['code'] = '1'; $ue['ok'] = '1'; $ue['msg'] = "修改成功!即将跳转到用户管理列表!"; } echo json_encode($ue);
<td><?php \Ss\Etc\Comm::flowAutoShow($rs['transfer_enable'] - $rs['u'] - $rs['d']); ?> </td> <td><?php \Ss\Etc\Comm::flowAutoShow($rs['u'] + $rs['d']); ?> </td> <td><?php echo date('Y-m-d H:i:s', $rs['last_check_in_time']); ?> </td> <td> <?php if ($rs['ref_by'] != 0) { $ref_u = new \Ss\User\UserInfo($rs['ref_by']); $ref_name = $ref_u->GetUserName(); } echo $ref_name; ?> </td> <td> <a class="btn btn-info btn-sm" href="user_edit.php?uid=<?php echo $rs['uid']; ?> ">查看</a> <a class="btn btn-danger btn-sm" href="user_del.php?uid=<?php echo $rs['uid']; ?> " onclick="JavaScript:return confirm('确定删除吗?')">删除</a> </td>
<?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->isCs()) { header("Location:../user/index.php"); } } else { header("Location:login.php"); exit; } $oo = new Ss\User\Ss($uid);