@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
return array(
|
||||
'name' => '我的社区',
|
||||
'version' => '1.2',
|
||||
'desc' => '我的社区',
|
||||
'url' => 'http://www.thinksaas.cn',
|
||||
'email' => 'thinksaas@qq.com',
|
||||
'author' => '邱君',
|
||||
'author_url' => 'http://www.thinksaas.cn',
|
||||
'isoption' => '0',
|
||||
'isinstall' => '1',
|
||||
'issql' => '1',
|
||||
'issystem' => '1',
|
||||
'isappnav' => '1',
|
||||
'ismy'=>'0',
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
//管理入口
|
||||
|
||||
if(is_file('app/'.$app.'/action/admin/'.$mg.'.php')){
|
||||
include_once 'app/'.$app.'/action/admin/'.$mg.'.php';
|
||||
}else{
|
||||
qiMsg('sorry:no index!');
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
//基本配置
|
||||
case "":
|
||||
|
||||
include template("admin/options");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$userid = aac('user')->isLogin();
|
||||
|
||||
$strUser = aac('user')->getOneUser($userid);
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
|
||||
//我的( 加入)小组
|
||||
$arrGroupsList = $new['my']->findAll('group_user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),null,'groupid',12);
|
||||
|
||||
foreach($arrGroupsList as $key=>$item){
|
||||
$strGroup = aac('group')->getOneGroup($item['groupid']);
|
||||
if($strGroup){
|
||||
$arrGroup[] = $strGroup;
|
||||
}else{
|
||||
$new['my']->delete('group_user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
'groupid'=>$item['groupid'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#加入的小组数
|
||||
$joinGroupNum = $new['my']->findCount('group_user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
));
|
||||
|
||||
//我的帖子
|
||||
$arrTopic = $new['my']->findAll('topic',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),'addtime desc',null,10);
|
||||
|
||||
|
||||
//我的文章
|
||||
$arrArticle = $new ['my']->findAll ( 'article', array (
|
||||
'userid' => $strUser['userid'],
|
||||
), 'addtime desc', null, 10 );
|
||||
|
||||
|
||||
|
||||
$title = '我的社区';
|
||||
include template("index");
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
#邀请的用户
|
||||
$arrInviteUser = $new['my']->findAll('user_info',array(
|
||||
'fuserid'=>$userid,
|
||||
),'addtime desc','userid,username');
|
||||
|
||||
$title = '我的邀请';
|
||||
include template('invite');
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
|
||||
|
||||
$page = tsIntval($_GET['page'],1);
|
||||
$url = tsUrl('my','score',array('page'=>''));
|
||||
$lstart = $page*50-50;
|
||||
|
||||
$arrScore = $new['my']->findAll('user_score_log',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),'addtime desc',null,$lstart.',50');
|
||||
|
||||
$scoreNum = $new['my']->findCount('user_score_log',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
));
|
||||
$pageUrl = pagination($scoreNum, 50, $page, $url);
|
||||
|
||||
$title = '我的积分';
|
||||
include template('score');
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
|
||||
|
||||
case "base":
|
||||
$title = '基本设置';
|
||||
include template("setting_base");
|
||||
break;
|
||||
|
||||
case "basedo":
|
||||
|
||||
$username = t($_POST['username']);
|
||||
$signed = t($_POST['signed']);
|
||||
$phone = t($_POST['phone']);
|
||||
$blog = t($_POST['blog']);
|
||||
$about = t($_POST['about']);
|
||||
$sex = t($_POST['sex']);
|
||||
|
||||
if($TS_USER == '') {
|
||||
|
||||
tsNotice("机房重地,闲人免进!");
|
||||
|
||||
}
|
||||
if($username == '') {
|
||||
|
||||
tsNotice("不管做什么都需要有一个名号吧^_^");
|
||||
|
||||
}
|
||||
if(mb_strlen($username) < 4 || mb_strlen($username) > 20) {
|
||||
|
||||
tsNotice("用户名长度必须在4到20字符之间!");
|
||||
|
||||
}
|
||||
|
||||
if($username != $strUser['username']){
|
||||
|
||||
if($TS_APP['banuser']){
|
||||
|
||||
$arrUserName = explode('|',$TS_APP['banuser']);
|
||||
if(in_array($username,$arrUserName)){
|
||||
tsNotice("用户名已经存在,请换个用户名!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$isUserName = $new['my']->findCount('user_info',array(
|
||||
'username'=>$username,
|
||||
));
|
||||
|
||||
if($isUserName > 0) {
|
||||
|
||||
tsNotice("用户名已经存在,请换个用户名!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(tsIntval($TS_USER['isadmin'])==0){
|
||||
//过滤内容开始
|
||||
$username = antiWord($username);
|
||||
$signed = antiWord($signed);
|
||||
$phone = antiWord($phone);
|
||||
$about = antiWord($about);
|
||||
//过滤内容结束
|
||||
}
|
||||
|
||||
|
||||
//签名中禁止写URL,Email
|
||||
/*
|
||||
if(filter_var($signed, FILTER_SANITIZE_URL) || filter_var($signed, FILTER_VALIDATE_EMAIL)){
|
||||
tsNotice('签名不合法!请修改后再提交!');
|
||||
}
|
||||
|
||||
if(filter_var($about, FILTER_SANITIZE_URL) || filter_var($about, FILTER_VALIDATE_EMAIL)){
|
||||
tsNotice('个人介绍不合法!请修改后再提交!');
|
||||
}
|
||||
*/
|
||||
|
||||
$username = str_replace('.','',$username);
|
||||
|
||||
//更新数据
|
||||
$new['my']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'username' => $username,
|
||||
'sex' => $sex,
|
||||
'signed' => $signed,
|
||||
'phone' => $phone,
|
||||
'about' => $about,
|
||||
));
|
||||
|
||||
#更新session用户名
|
||||
$_SESSION['tsuser']['username'] = $username;
|
||||
|
||||
tsNotice("基本资料更新成功!");
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case "face":
|
||||
|
||||
|
||||
$_SESSION['tsuser']['face'] = $strUser['face'];
|
||||
|
||||
|
||||
$title = '头像设置';
|
||||
|
||||
include template("setting_face");
|
||||
|
||||
break;
|
||||
//执行上传头像
|
||||
case "facedo":
|
||||
|
||||
if($_FILES['photo']){
|
||||
|
||||
//上传
|
||||
$arrUpload = tsUpload($_FILES['photo'],$userid,'user',array('jpg','gif','png','jpeg'));
|
||||
|
||||
if($arrUpload){
|
||||
|
||||
$new['my']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'path'=>$arrUpload['path'],
|
||||
'face'=>$arrUpload['url'],
|
||||
'uptime'=>time(),
|
||||
));
|
||||
|
||||
|
||||
|
||||
if($TS_SITE['file_upload_type']=='0' || $TS_SITE['file_upload_type']==''){
|
||||
$filesize=abs(filesize('uploadfile/user/'.$arrUpload['url']));
|
||||
if($filesize<=0){
|
||||
$new['my']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'path'=>'',
|
||||
'face'=>'',
|
||||
));
|
||||
tsNotice('上传头像失败,你可以使用系统默认头像!');
|
||||
}
|
||||
}
|
||||
|
||||
tsDimg($arrUpload['url'],'user','120','120',$arrUpload['path']);
|
||||
|
||||
header('Location: '.tsUrl('my','setting',array('ts'=>'face')));
|
||||
|
||||
|
||||
}else{
|
||||
tsNotice('头像修改失败');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
//设置密码
|
||||
case "pwd":
|
||||
|
||||
$title = '密码修改';
|
||||
include template("setting_pwd");
|
||||
|
||||
break;
|
||||
|
||||
case "pwddo":
|
||||
|
||||
$theUser = $new['my']->find('user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
));
|
||||
|
||||
$oldpwd = tsTrim($_POST['oldpwd']);
|
||||
$newpwd = tsTrim($_POST['newpwd']);
|
||||
$renewpwd = tsTrim($_POST['renewpwd']);
|
||||
|
||||
if($oldpwd == '' || $newpwd=='' || $renewpwd=='') tsNotice("所有项都不能为空!");
|
||||
|
||||
if($newpwd != $renewpwd) tsNotice('两次输入新密码密码不一样!');
|
||||
|
||||
//更新密码
|
||||
if(md5($theUser['salt'].$oldpwd) != $theUser['pwd']) tsNotice("旧密码输入有误!");
|
||||
|
||||
$salt = md5(rand());
|
||||
|
||||
$new['my']->update('user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),array(
|
||||
'pwd'=>md5($salt.$newpwd),
|
||||
'salt'=>$salt,
|
||||
));
|
||||
|
||||
tsNotice("密码修改成功!");
|
||||
|
||||
break;
|
||||
|
||||
//修改登录Email
|
||||
case "email":
|
||||
$title = '修改登录Email';
|
||||
include template('setting_email');
|
||||
break;
|
||||
|
||||
case "emaildo":
|
||||
|
||||
$email = tsTrim($_POST['email']);
|
||||
|
||||
if($email=='') tsNotice('Email不能为空!');
|
||||
|
||||
if(valid_email($email) == false) tsNotice('Email输入有误!');
|
||||
|
||||
if($email != $strUser['email']){
|
||||
$emailNum = $new['my']->findCount('user',array(
|
||||
'email'=>$email,
|
||||
));
|
||||
|
||||
if($emailNum > 0) tsNotice("Email帐号已经存在,请换个其他Email帐号!");
|
||||
|
||||
//更新Email
|
||||
$new['my']->update('user',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),array(
|
||||
'email'=>$email,
|
||||
));
|
||||
|
||||
//修改信息并将用户设为未验证状态
|
||||
$new['my']->update('user_info',array(
|
||||
'userid'=>$strUser['userid'],
|
||||
),array(
|
||||
'email'=>$email,
|
||||
'isverify'=>'0',
|
||||
));
|
||||
|
||||
tsNotice('Email帐号修改成功,下次请用'.$email.'登录网站!');
|
||||
|
||||
}else{
|
||||
tsNotice('新Email帐号不能和旧Email帐号一样!');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
//设置常居地
|
||||
case "city":
|
||||
|
||||
$title = '常居地修改';
|
||||
include template("setting_city");
|
||||
break;
|
||||
|
||||
case "citydo":
|
||||
|
||||
$province = tsTrim($_POST['province']);
|
||||
$city = tsTrim($_POST['city']);
|
||||
|
||||
|
||||
$new['my']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
|
||||
'province'=>$province,
|
||||
'city'=>$city,
|
||||
|
||||
));
|
||||
|
||||
tsNotice("常居地更新成功!");
|
||||
|
||||
break;
|
||||
|
||||
//个人标签
|
||||
case "tag":
|
||||
|
||||
$arrTag = aac('tag')->getObjTagByObjid('user','userid',$userid);
|
||||
|
||||
$title = '个人标签修改';
|
||||
include template("setting_tag");
|
||||
break;
|
||||
|
||||
case "tagdo":
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
class my extends tsApp{
|
||||
|
||||
//构造函数
|
||||
public function __construct($db){
|
||||
$tsAppDb = array();
|
||||
include 'app/my/config.php';
|
||||
//判断APP是否采用独立数据库
|
||||
if($tsAppDb){
|
||||
$db = new MySql($tsAppDb);
|
||||
}
|
||||
|
||||
parent::__construct($db);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$skin = 'default';
|
||||
|
||||
$TS_APP['appname'] = '我的社区';
|
||||
@@ -0,0 +1,9 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
|
||||
<!--main-->
|
||||
<div class="midder">
|
||||
|
||||
<div>暂无配置</div>
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer_admin")}
|
||||
@@ -0,0 +1,104 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">我的小组</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="of c9 border-bottom pb-3">
|
||||
<div class="float-left mt-1">已加入{$joinGroupNum}个小组</div>
|
||||
<a target="_blank" class="btn btn-sm btn-info float-right" href="{tsUrl('group','create')}">创建小组</a>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3">
|
||||
|
||||
{loop $arrGroup $key $item}
|
||||
<div class="col-6 col-md-2 mb-3">
|
||||
<div>
|
||||
<a href="{tsUrl('group','show',array('id'=>$item['groupid']))}"><img src="{$item['photo']}" class="rounded" alt="{$item['groupname']}" style="max-width: 100%;"></a>
|
||||
<div>
|
||||
<div class="title-cut text-center c9">{$item['groupname']}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">我的帖子</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table">
|
||||
<thead class="thead-light">
|
||||
<tr><th>发布时间</th><th>标题</th><th>浏览/评论</th><th>操作</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $arrTopic $key $item}
|
||||
<tr><td class="fs12 c9">{php echo date('Y-m-d',$item['addtime'])}</td><td><a href="{tsUrl('topic','show',array('id'=>$item['topicid']))}">{php echo tsTitle($item['title'])}</a></td><td class="fs12 c9">{$item['count_view']}/{$item['count_comment']}</td><td><a href="{tsUrl('topic','edit',array('topicid'=>$item['topicid']))}">修改</a></td></tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">我的文章</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table">
|
||||
<thead class="thead-light">
|
||||
<tr><th>发布时间</th><th>标题</th><th>浏览/评论</th><th>操作</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop $arrArticle $key $item}
|
||||
<tr><td class="fs12 c9">{php echo date('Y-m-d',strtotime($item['addtime']))}</td><td><a href="{tsUrl('article','show',array('id'=>$item['articleid']))}">{tsTitle($item['title'])}</a></td><td class="fs12 c9">{$item['count_view']}/{$item['count_comment']}</td><td><a href="{tsUrl('article','edit',array('articleid'=>$item['articleid']))}">修改</a></td></tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="qiandao">{if $TS_USER['signin']<strtotime(date('Y-m-d 00:00:00'))}<a href="javascript:void('0');" onclick="qianDao();">每日签到+5积分</a>{else}今日已签到{/if}</div>-->
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,70 @@
|
||||
{php include pubTemplate("header")}
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">我的邀请</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<input id="invite-link" type="text" class="form-control c9" value="{tsUrl('user','register',array('fuserid'=>$userid))}">
|
||||
<div class="input-group-append">
|
||||
<button class="invite-btn btn btn-outline-secondary" data-clipboard-target="#invite-link" type="button">点击复制邀请链接</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<table class="table mt-3">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>用户ID</th>
|
||||
<th>用户名</th>
|
||||
<th>加入时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
{loop $arrInviteUser $key $item}
|
||||
<tr>
|
||||
<td>{$item['userid']}</td>
|
||||
<td>{$item['username']}</td>
|
||||
<td>{php echo date('Y-m-d H:i:s',$item['addtime'])}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="{SITE_URL}public/js/clipboard.js?v=2020"></script>
|
||||
<script>
|
||||
new ClipboardJS('.invite-btn');
|
||||
</script>
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,56 @@
|
||||
{php include pubTemplate("header")}
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">我的积分</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
<table class="table">
|
||||
|
||||
<thead class="thead-light">
|
||||
<tr><th>名称</th><th>积分</th><th>状态</th><th>时间</th></tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="text-secondary">
|
||||
{loop $arrScore $key $item}
|
||||
<tr><td>{$item['scorename']}</td><td>{$item['score']}</td><td>{if $item['status']==0}+{else}-{/if}</td><td>{php echo date('Y-m-d H:i:s',$item['addtime'])}</td></tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="page">{$pageUrl}</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,85 @@
|
||||
{php include pubTemplate("header")}
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<form role="form" method="POST" action="{tsUrl('my','setting',array('ts'=>'basedo'))}">
|
||||
|
||||
<div class="form-group">
|
||||
<label>用户名:</label>
|
||||
<input type="text" class="form-control" name="username" value="{$strUser[username]}" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>性别:</label>
|
||||
<div>
|
||||
<input {if $strUser['sex']=='保密'}checked="select"{/if} name="sex" type="radio" value="保密" />保密
|
||||
<input {if $strUser['sex']=='男'}checked="select"{/if} name="sex" type="radio" value="男" />男
|
||||
<input {if $strUser['sex']=='女'}checked="select"{/if} name="sex" type="radio" value="女" />女
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>签名:</label>
|
||||
<input class="form-control" name="signed" value="{$strUser[signed]}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>自我介绍:</label>
|
||||
<textarea class="form-control" rows="3" name="about">{$strUser[about]}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="token" value="{$_SESSION['token']}" />
|
||||
<button class="btn btn-sm btn-info" type="submit">修改设置</button>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,75 @@
|
||||
{php include pubTemplate("header")}
|
||||
<script type="text/javascript" src="{SITE_URL}public/js/city/jquery.cityselect.js"></script>
|
||||
<script type="text/javascript">
|
||||
var city1 = "{$strUser['province']}";
|
||||
if(city1==''){city1 = '北京';}
|
||||
var city2 = "{$strUser['city']}";
|
||||
if(city2==''){city2 = '朝阳区';}
|
||||
|
||||
$(function(){
|
||||
$("#city_3").citySelect({
|
||||
prov:city1,
|
||||
city:city2
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<form role="form" method="POST" action="{tsUrl('my','setting',array('ts'=>'citydo'))}">
|
||||
|
||||
<div class="form-group">
|
||||
<label>修改常居地:</label>
|
||||
|
||||
<div id="city_3">
|
||||
<p><select name="province" class="prov form-control"></select></p>
|
||||
<p><select name="city" class="city form-control" disabled="disabled"></select></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-info" type="submit">提交修改</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,96 @@
|
||||
{php include pubTemplate("header")}
|
||||
<script src="{SITE_URL}public/js/jcrop/jquery.Jcrop.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="{SITE_URL}public/js/jcrop/jquery.Jcrop.css" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
// Create variables (in this scope) to hold the API and image size
|
||||
var jcrop_api, boundx, boundy;
|
||||
|
||||
$('#target').Jcrop({
|
||||
minSize: [48,48],
|
||||
setSelect: [0,0,190,190],
|
||||
onChange: updatePreview,
|
||||
onSelect: updatePreview,
|
||||
onSelect: updateCoords,
|
||||
aspectRatio: 1
|
||||
},
|
||||
function(){
|
||||
// Use the API to get the real image size
|
||||
var bounds = this.getBounds();
|
||||
boundx = bounds[0];
|
||||
boundy = bounds[1];
|
||||
// Store the API in the jcrop_api variable
|
||||
jcrop_api = this;
|
||||
});
|
||||
function updateCoords(c)
|
||||
{
|
||||
$('#x').val(c.x);
|
||||
$('#y').val(c.y);
|
||||
$('#w').val(c.w);
|
||||
$('#h').val(c.h);
|
||||
};
|
||||
function checkCoords()
|
||||
{
|
||||
if (parseInt($('#w').val())) return true;
|
||||
alert('Please select a crop region then press submit.');
|
||||
return false;
|
||||
};
|
||||
function updatePreview(c){
|
||||
if (parseInt(c.w) > 0)
|
||||
{
|
||||
var rx = 48 / c.w; //小头像预览Div的大小
|
||||
var ry = 48 / c.h;
|
||||
|
||||
$('#preview').css({
|
||||
width: Math.round(rx * boundx) + 'px',
|
||||
height: Math.round(ry * boundy) + 'px',
|
||||
marginLeft: '-' + Math.round(rx * c.x) + 'px',
|
||||
marginTop: '-' + Math.round(ry * c.y) + 'px'
|
||||
});
|
||||
}
|
||||
{
|
||||
var rx = 199 / c.w; //大头像预览Div的大小
|
||||
var ry = 199 / c.h;
|
||||
$('#preview2').css({
|
||||
width: Math.round(rx * boundx) + 'px',
|
||||
height: Math.round(ry * boundy) + 'px',
|
||||
marginLeft: '-' + Math.round(rx * c.x) + 'px',
|
||||
marginTop: '-' + Math.round(ry * c.y) + 'px'
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
</script>
|
||||
<!--main-->
|
||||
<div class="container">
|
||||
{template set_menu}
|
||||
|
||||
|
||||
<div class="cleft bbox">
|
||||
|
||||
<h1>裁切头像</h1>
|
||||
|
||||
<div style="float:left;"><img width="300" id="target" src="{SITE_URL}uploadfile/user/{$strUser['face']}" ></div>
|
||||
|
||||
<div style="width:190px;height:195px;margin:0 10px;overflow:hidden; float:left;"><img style="float:left;" id="preview2" src="{SITE_URL}uploadfile/user/{$strUser['face']}" ></div>
|
||||
|
||||
<form action="{SITE_URL}index.php?app=user&ac=set&ts=cutdo" method="post" onsubmit="return checkCoords();">
|
||||
<input type="hidden" id="x" name="x" />
|
||||
<input type="hidden" id="y" name="y" />
|
||||
<input type="hidden" id="w" name="w" />
|
||||
<input type="hidden" id="h" name="h" />
|
||||
<input class="btn" type="submit" value="裁剪" />
|
||||
</form>
|
||||
|
||||
<a href="{tsUrl('user','set',array('ts'=>'face'))}">返回头像设置</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cright"></div>
|
||||
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,177 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
{if $TS_SITE['regtype']=='0' || $TS_SITE['regtype']=='2'}
|
||||
<form role="form" method="POST" action="{tsUrl('my','setting',array('ts'=>'emaildo'))}">
|
||||
|
||||
<div class="form-group">
|
||||
<label>当前Email帐号:</label>
|
||||
<div class="text-black-50">{$strUser['email']}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>新Email帐号:</label>
|
||||
<input class="form-control" name="email" type="email" />
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="token" value="{$_SESSION['token']}" />
|
||||
<button class="btn btn-sm btn-info" type="submit">提交修改</button>
|
||||
|
||||
<small class="text-black-50">(修改Email登录帐号将需要重新验证Email)</small>
|
||||
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{if $TS_SITE['regtype']=='2'}
|
||||
<hr />
|
||||
{/if}
|
||||
|
||||
|
||||
{if $TS_SITE['regtype']=='1' || $TS_SITE['regtype']=='2'}
|
||||
<form id="comm-form" role="form" method="POST" action="{SITE_URL}index.php?app=user&ac=phone&ts=editphone">
|
||||
|
||||
<div class="form-group">
|
||||
<label>当前手机号:</label>
|
||||
<div class="text-black-50">{$strUser['phone']}</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>新手机号:</label>
|
||||
<input id="myphone" class="form-control" name="phone" type="number" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>图片验证码:</label>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
<div class="d-flex"><input id="authcode" type="text" name="authcode" class="form-control" value=""></div>
|
||||
<div class="d-flex ml-1">
|
||||
|
||||
<img src="{SITE_URL}index.php?app=pubs&ac=code" onclick="javascript:newgdcode(this,this.src);" title="点击刷新验证码" alt="点击刷新验证码" style="cursor:pointer;" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>手机验证码:</label>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
<div class="d-flex"><input type="text" class="form-control" name="phonecode" value=""></div>
|
||||
<div class="d-flex ml-1"><button id="mybtn" type="button" class="btn btn-outline-secondary">获取验证码</button></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="token" value="{$_SESSION['token']}" />
|
||||
<button class="btn btn-sm btn-info" type="submit">提交修改</button>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--{if $TS_SITE['is_vaptcha']}-->
|
||||
<script src="https://v-cn.vaptcha.com/v3.js"></script>
|
||||
<script>
|
||||
vaptcha({
|
||||
vid: '{$TS_SITE[vaptcha_vid]}',// 验证单元id
|
||||
mode: 'invisible',// 显示类型 隐藏式
|
||||
scene: 0,// 场景值 默认0
|
||||
area: 'auto' //验证节点区域,默认 auto,可选值 auto,sea,na,cn
|
||||
}).then(function (vaptchaObj) {
|
||||
|
||||
obj = vaptchaObj; //将VAPTCHA验证实例保存到局部变量中
|
||||
|
||||
vaptchaObj.listen("pass", function () {
|
||||
// 验证成功进行后续操作
|
||||
|
||||
serverToken = vaptchaObj.getServerToken()
|
||||
|
||||
sendPhoneCode(1,serverToken.token,serverToken.server)
|
||||
|
||||
vaptchaObj.reset(); //重置验证码
|
||||
|
||||
});
|
||||
|
||||
//关闭验证弹窗时触发
|
||||
vaptchaObj.listen("close", function () {
|
||||
//验证弹窗关闭触发
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$("#mybtn").on("click", function () {
|
||||
var phone = $("#myphone").val();
|
||||
var authcode = $("#authcode").val();
|
||||
|
||||
if(phone && authcode){
|
||||
//人机验证
|
||||
obj.validate();
|
||||
}else{
|
||||
tsNotice('手机号和图形验证码必须填写!');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--{else}-->
|
||||
|
||||
<script>
|
||||
$("#mybtn").on("click", function () {
|
||||
var phone = $("#myphone").val();
|
||||
var authcode = $("#authcode").val();
|
||||
|
||||
if(phone && authcode){
|
||||
sendPhoneCode(1)
|
||||
}else{
|
||||
tsNotice('手机号和图形验证码必须填写!');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--{/if}-->
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,68 @@
|
||||
{php include pubTemplate("header")}
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
{if $TS_SITE['isface']=='1' && $strUser['face'] == SITE_URL.'public/images/user_large.jpg'}
|
||||
<div class="alert alert-info" role="alert">提示:你需要上传头像才可以正常使用网站!</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<form role="form" method="post" action="{tsUrl('my','setting',array('ts'=>'facedo'))}" enctype="multipart/form-data">
|
||||
|
||||
<div class="form-group">
|
||||
<p><img alt="{$strUser['username']}" src="{$strUser[face]}" width="120" /></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>选择图片</label>
|
||||
<p><input type="file" name="photo" /></p>
|
||||
</div>
|
||||
|
||||
<input class="btn btn-sm btn-info" type="submit" value="上传头像" />
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="mb-3">
|
||||
<a class="btn btn-sm {if $ts=='base'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'base'))}">基本信息</a>
|
||||
<a class="btn btn-sm {if $ts=='face'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'face'))}">会员头像</a>
|
||||
<a class="btn btn-sm {if $ts=='pwd' || $ac=='user'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'pwd'))}">修改密码</a>
|
||||
<a class="btn btn-sm {if $ts=='email' || $ac=='user'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'email'))}">修改帐号</a>
|
||||
<a class="btn btn-sm {if $ts=='city' || $ac=='user'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'city'))}">常居地</a>
|
||||
<a class="btn btn-sm {if $ts=='tag' || $ac=='user'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('my','setting',array('ts'=>'tag'))}">个人标签</a>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -0,0 +1,64 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<form role="form" method="POST" action="{tsUrl('my','setting',array('ts'=>'pwddo'))}">
|
||||
|
||||
<div class="form-group">
|
||||
<label>旧密码:</label>
|
||||
<input class="form-control" name="oldpwd" value="" type="password" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>新密码:</label>
|
||||
<input class="form-control" name="newpwd" value="" type="password" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>输入新密码:</label>
|
||||
<input class="form-control" name="renewpwd" value="" type="password" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-info" type="submit">提交修改</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,85 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="my_left">
|
||||
|
||||
{php include pubTemplate("my")}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
|
||||
{template setting_menu}
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<div>
|
||||
{loop $arrTag $key $item}
|
||||
<span class="badge badge-secondary mr-2 fw300 fs16">{$item[tagname]}</span>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
|
||||
<input class="form-control float-left form-control-sm w-auto mr-1" type="text" name="tags" id="tags" />
|
||||
|
||||
<button class="btn btn-sm btn-info float-left" onClick="savaTag()">添加</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
/*提交标签*/
|
||||
function savaTag(){
|
||||
var userid = "{$strUser['userid']}";
|
||||
var tag = $('#tags').val();
|
||||
if(tag ==''){ alert('请输入标签哟^_^');$('#tagFrom').show('fast');}else{
|
||||
var url = siteUrl+'index.php?app=tag&ac=add_ajax&ts=do';
|
||||
$.post(url,{objname:'user',idname:'userid',tags:tag,objid:userid},function(rs){ window.location.reload() })
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
{php include pubTemplate("footer")}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,22 @@
|
||||
.my .my_right .rl{float:left;width:530px;padding:10px;}
|
||||
|
||||
.my .my_right .rr{float:right;width:230px;padding:10px 10px 10px 0;}
|
||||
|
||||
/*Ç©µ½*/
|
||||
.qiandao{background-color: #F9F9F9;
|
||||
border: 1px solid #EEE;
|
||||
border-radius: 5px;text-align:center;padding:10px;}
|
||||
.qiandao a{font-size:14px;}
|
||||
|
||||
|
||||
|
||||
/*×îÐÂÌû×Ó*/
|
||||
.newtopic{}
|
||||
.newtopic ul{}
|
||||
.newtopic ul li{border-bottom:1px dashed #DDD;padding:5px 0;overflow:hidden}
|
||||
.newtopic ul li .photo{width:36px;float:left;}
|
||||
.newtopic ul li .info{margin-left:36px;color:#999;}
|
||||
.newtopic ul li .info .title{float:left;width:50%}
|
||||
.newtopic ul li .info .comment{float:left;width:15%}
|
||||
.newtopic ul li .info .uptime{float:left;width:15%}
|
||||
.newtopic ul li .info .group{float:left;width:20%}
|
||||
@@ -0,0 +1,22 @@
|
||||
.my .my_right .rl{float:left;width:530px;padding:10px;}
|
||||
|
||||
.my .my_right .rr{float:right;width:230px;padding:10px 10px 10px 0;}
|
||||
|
||||
/*Ç©µ½*/
|
||||
.qiandao{background-color: #F9F9F9;
|
||||
border: 1px solid #EEE;
|
||||
border-radius: 5px;text-align:center;padding:10px;}
|
||||
.qiandao a{font-size:14px;}
|
||||
|
||||
|
||||
|
||||
/*×îÐÂÌû×Ó*/
|
||||
.newtopic{}
|
||||
.newtopic ul{}
|
||||
.newtopic ul li{border-bottom:1px dashed #DDD;padding:5px 0;overflow:hidden}
|
||||
.newtopic ul li .photo{width:36px;float:left;}
|
||||
.newtopic ul li .info{margin-left:36px;color:#999;}
|
||||
.newtopic ul li .info .title{float:left;width:50%}
|
||||
.newtopic ul li .info .comment{float:left;width:15%}
|
||||
.newtopic ul li .info .uptime{float:left;width:15%}
|
||||
.newtopic ul li .info .group{float:left;width:20%}
|
||||
Reference in New Issue
Block a user