@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
return array(
|
||||
'name' => '同城',
|
||||
'version' => '1.2',
|
||||
'desc' => '同城APP',
|
||||
'url' => 'http://www.thinksaas.cn',
|
||||
'email' => 'thinksaas@qq.com',
|
||||
'author' => '邱君',
|
||||
'author_url' => 'http://www.thinksaas.cn',
|
||||
'isoption' => '1',
|
||||
'isinstall' => '1',
|
||||
'issql' => '0',
|
||||
'issystem' => '1',
|
||||
'isappnav' => '1',
|
||||
'ismy'=>'1',
|
||||
);
|
||||
@@ -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,136 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
case "list":
|
||||
|
||||
$arrLocation = $new['location']->findAll('location',null,'orderid asc');
|
||||
include template('admin/location_list');
|
||||
break;
|
||||
|
||||
case "add":
|
||||
|
||||
|
||||
include template('admin/location_add');
|
||||
break;
|
||||
|
||||
case "adddo":
|
||||
|
||||
$title = t($_POST['title']);
|
||||
$content = trim($_POST['content']);
|
||||
|
||||
$orderid = intval($_POST['orderid']);
|
||||
|
||||
$locationid = $new['location']->create('location',array(
|
||||
'title'=>$title,
|
||||
'content'=>$content,
|
||||
'orderid'=>$orderid,
|
||||
));
|
||||
|
||||
$arrUpload = tsUpload ( $_FILES ['photo'], $locationid, 'location', array ('jpg','gif','png','jpeg' ) );
|
||||
if ($arrUpload) {
|
||||
$new ['location']->update ( 'location', array (
|
||||
'locationid' => $locationid
|
||||
), array (
|
||||
'path' => $arrUpload ['path'],
|
||||
'photo' => $arrUpload ['url']
|
||||
) );
|
||||
}
|
||||
|
||||
header('Location: '.SITE_URL.'index.php?app=location&ac=admin&mg=location&ts=list');
|
||||
|
||||
break;
|
||||
|
||||
case "edit":
|
||||
|
||||
$locationid = intval($_GET['locationid']);
|
||||
|
||||
$strLocation = $new['location']->find('location',array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
include template('admin/location_edit');
|
||||
break;
|
||||
|
||||
case "editdo":
|
||||
$locationid = intval($_POST['locationid']);
|
||||
$title = t($_POST['title']);
|
||||
$content = trim($_POST['content']);
|
||||
|
||||
$orderid = intval($_POST['orderid']);
|
||||
|
||||
$new['location']->update('location',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'title'=>$title,
|
||||
'content'=>$content,
|
||||
'orderid'=>$orderid,
|
||||
));
|
||||
|
||||
$arrUpload = tsUpload ( $_FILES ['photo'], $locationid, 'location', array ('jpg','gif','png','jpeg' ) );
|
||||
if ($arrUpload) {
|
||||
$new ['location']->update ( 'location', array (
|
||||
'locationid' => $locationid
|
||||
), array (
|
||||
'path' => $arrUpload ['path'],
|
||||
'photo' => $arrUpload ['url']
|
||||
) );
|
||||
}
|
||||
|
||||
header('Location: '.SITE_URL.'index.php?app=location&ac=admin&mg=location&ts=list');
|
||||
|
||||
break;
|
||||
|
||||
case "delete":
|
||||
|
||||
$locationid = intval($_GET['locationid']);
|
||||
$strLocation = $new['location']->find('location',array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
unlink('uploadfile/location/'.$strLocation['photo']);
|
||||
|
||||
$new['location']->delete('location',array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('article',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('attach',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('group_topic',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('photo',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('user_info',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('weibo',array(
|
||||
'locationid'=>$locationid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
qiMsg('操作成功!');
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
include template("admin/options");
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
switch($ts){
|
||||
case "join":
|
||||
|
||||
|
||||
$userid = intval($TS_USER['userid']);
|
||||
|
||||
$locationid = intval($_POST['locationid']);
|
||||
|
||||
if($userid==0){
|
||||
getJson('请登录后再加入!');
|
||||
}
|
||||
|
||||
//更新ts_article、ts_attach、ts_group_topic、ts_photo、ts_user_info、ts_weibo
|
||||
$new['location']->update('article',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('attach',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('group_topic',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('photo',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$new['location']->update('weibo',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
getJson('加入成功!',1,2,tsUrl('location','show',array('id'=>$locationid)));
|
||||
|
||||
break;
|
||||
|
||||
case "exit":
|
||||
|
||||
$userid = intval($TS_USER['userid']);
|
||||
|
||||
$locationid = intval($_POST['locationid']);
|
||||
|
||||
if($userid==0 || $locationid == 0){
|
||||
getJson('非法操作!');
|
||||
}
|
||||
|
||||
//更新ts_article、ts_attach、ts_group_topic、ts_photo、ts_user_info、ts_weibo
|
||||
$new['location']->update('article',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('attach',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('group_topic',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('photo',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('user_info',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
$new['location']->update('weibo',array(
|
||||
'userid'=>$userid,
|
||||
),array(
|
||||
'locationid'=>0,
|
||||
));
|
||||
|
||||
getJson('退出成功!',1,2,tsUrl('location'));
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$arrLocation = $new['location']->findAll('location');
|
||||
|
||||
$title = '全部同城';
|
||||
include template('all');
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$userid = aac('user')->isLogin();
|
||||
|
||||
$strUser = aac('user')->getSimpleUser($userid);
|
||||
|
||||
if($strUser['locationid']==0){
|
||||
$arrLocation = $new['location']->findAll('location');
|
||||
if($arrLocation==''){
|
||||
tsNotice('同城未做配置,暂时还不能加入!');
|
||||
}
|
||||
|
||||
$title = '选择加入同城';
|
||||
include template('index');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
header('Location: '.tsUrl('location','show',array('id'=>$strUser['locationid'])));
|
||||
exit;
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
defined ( 'IN_TS' ) or die ( 'Access Denied.' );
|
||||
|
||||
// 管理入口
|
||||
if (is_file ( 'app/' . $TS_URL['app'] . '/action/my/' . $TS_URL['my'] . '.php' )) {
|
||||
include_once 'app/' . $TS_URL['app'] . '/action/my/common.php';
|
||||
include_once 'app/' . $TS_URL['app'] . '/action/my/' . $TS_URL['my'] . '.php';
|
||||
} else {
|
||||
qiMsg ( 'sorry:no index!' );
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$userid = aac('user')->isLogin();
|
||||
|
||||
$strUser = aac('user')->getOneUser($userid);
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
defined ( 'IN_TS' ) or die ( 'Access Denied.' );
|
||||
|
||||
|
||||
if($strUser['locationid']){
|
||||
|
||||
$strLocation = $new['location']->find('location',array(
|
||||
'locationid'=>$strUser['locationid'],
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
$title = '我的同城';
|
||||
include template('my/index');
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
$locationid = intval($_GET['id']);
|
||||
|
||||
$strLocation = $new['location']->find('location',array(
|
||||
'locationid'=>$locationid,
|
||||
));
|
||||
|
||||
$strLocation['title'] = tsTitle($strLocation['title']);
|
||||
$strLocation['content'] = tsTitle($strLocation['content']);
|
||||
|
||||
//文章
|
||||
$arrArticle = $new['location']->findAll('article',array(
|
||||
'locationid'=>$locationid,
|
||||
),'addtime desc',null,10);
|
||||
//资料
|
||||
/*
|
||||
$arrAttach = $new['location']->findAll('attach',array(
|
||||
'locationid'=>$locationid,
|
||||
),'addtime desc',null,10);
|
||||
*/
|
||||
//帖子
|
||||
$arrTopic = $new['location']->findAll('group_topic',array(
|
||||
'locationid'=>$locationid,
|
||||
),'addtime desc',null,10);
|
||||
foreach($arrTopic as $key=>$item){
|
||||
$arrTopic[$key]['title'] = tsTitle($item['title']);
|
||||
$arrTopic[$key]['user'] = aac('user')->getSimpleUser($item['userid']);
|
||||
$arrTopic[$key]['group'] = $new['location']->find('group',array(
|
||||
'groupid'=>$item['groupid'],
|
||||
));
|
||||
}
|
||||
|
||||
//图片
|
||||
$arrPhoto = $new['location']->findAll('photo',array(
|
||||
'locationid'=>$locationid,
|
||||
),'addtime desc',null,10);
|
||||
//用户
|
||||
$arrUser = $new['location']->findAll('user_info',array(
|
||||
'locationid'=>$locationid,
|
||||
),'uptime desc',null,16);
|
||||
//唠叨
|
||||
$arrWeibo = $new['location']->findAll('weibo',array(
|
||||
'locationid'=>$locationid,
|
||||
),'addtime desc',null,10);
|
||||
foreach($arrWeibo as $key=>$item){
|
||||
$arrWeibo[$key]['content'] = tsTitle($item['content']);
|
||||
$arrWeibo[$key]['user'] = aac('user')->getSimpleUser($item['userid']);
|
||||
}
|
||||
|
||||
//是否是同城用户
|
||||
$isLocationId = 0;
|
||||
if($TS_USER['userid']){
|
||||
$strUser=$new['location']->find('user_info',array(
|
||||
'userid'=>$TS_USER['userid'],
|
||||
));
|
||||
$isLocationId = $strUser['locationid'];
|
||||
}
|
||||
|
||||
$sitekey = $strLocation['title'];
|
||||
$sitedesc = cututf8(t($strLocation['content']),0,100);
|
||||
$title = $strLocation['title'];
|
||||
include template('show');
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
class location extends tsApp{
|
||||
|
||||
//构造函数
|
||||
public function __construct($db){
|
||||
$tsAppDb = array();
|
||||
include 'app/location/config.php';
|
||||
//判断APP是否采用独立数据库
|
||||
if($tsAppDb){
|
||||
$db = new MySql($tsAppDb);
|
||||
}
|
||||
|
||||
parent::__construct($db);
|
||||
}
|
||||
|
||||
|
||||
//析构函数
|
||||
public function __destruct(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
/*
|
||||
*包含数据库配置文件
|
||||
*/
|
||||
$skin = 'default';
|
||||
$TS_APP['appname'] = '同城';
|
||||
require_once THINKDATA."/config.inc.php";
|
||||
@@ -0,0 +1,23 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
<!--main-->
|
||||
<div class="midder">
|
||||
{php include template("admin/menu");}
|
||||
|
||||
<form method="POST" action="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=adddo" enctype="multipart/form-data">
|
||||
<table class="table table-hover">
|
||||
<tr><td width="100">名称:</td><td><input style="width:300px;" name="title" value="" /></td></tr>
|
||||
|
||||
<tr><td>内容:</td><td><textarea style="width:300px;" name="content"></textarea></td></tr>
|
||||
|
||||
<tr><td>图片:</td><td><input type="file" name="photo" /></td></tr>
|
||||
|
||||
<tr><td>排序ID:</td><td><input name="orderid" value="0" /></td></tr>
|
||||
<tr><td></td><td>
|
||||
<input class="btn btn-primary" type="submit" value="添加" />
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer_admin")}
|
||||
@@ -0,0 +1,28 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
<!--main-->
|
||||
<div class="midder">
|
||||
{php include template("admin/menu");}
|
||||
|
||||
<form method="POST" action="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=editdo" enctype="multipart/form-data">
|
||||
<table class="table table-hover">
|
||||
<tr><td width="100">名称:</td><td><input style="width:300px;" name="title" value="{$strLocation['title']}" /></td></tr>
|
||||
|
||||
<tr><td>内容:</td><td><textarea style="width:300px;" name="content">{$strLocation['content']}</textarea></td></tr>
|
||||
|
||||
<tr><td>图片:</td><td>
|
||||
{if $strLocation['photo']}
|
||||
<img src="{php echo tsXimg($strLocation['photo'],'location','120','120',$strLocation['path'],1)}" />
|
||||
<br />
|
||||
{/if}
|
||||
<input type="file" name="photo" /></td></tr>
|
||||
|
||||
<tr><td>排序ID:</td><td><input name="orderid" value="{$strLocation['orderid']}" /></td></tr>
|
||||
<tr><td></td><td>
|
||||
<input type="hidden" name="locationid" value="{$strLocation['locationid']}" />
|
||||
<input class="btn btn-primary" type="submit" value="修改" />
|
||||
</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{php include template("admin/footer")}
|
||||
@@ -0,0 +1,36 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
<!--main-->
|
||||
<div class="midder">
|
||||
|
||||
{php include template("admin/menu");}
|
||||
|
||||
<table class="table table-hover">
|
||||
|
||||
<thead class="thead-light">
|
||||
<tr><th>ID</th><th>名称</th><th>排序</th><th>操作</th></tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
{loop $arrLocation $key $item}
|
||||
|
||||
<tr class="odd"><td>{$item[locationid]}</td><td>{$item[title]}</td>
|
||||
|
||||
<td>{$item[orderid]}</td>
|
||||
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<a href="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=edit&locationid={$item[locationid]}">[修改]</a> <a href="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=delete&locationid={$item['locationid']}" onclick="return confirm('确定删除?')">[删除]</a></td></tr>
|
||||
|
||||
|
||||
{/loop}
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{php include pubTemplate("footer_admin")}
|
||||
@@ -0,0 +1,11 @@
|
||||
<h6>区域管理</h6>
|
||||
<div class="tabnav">
|
||||
<ul>
|
||||
<li {if $mg=='options'}class="select"{/if}><a href="{SITE_URL}index.php?app=location&ac=admin&mg=options">配置</a></li>
|
||||
<li {if $mg=='location' && $ts=='list'}class="select"{/if}><a href="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=list">同城列表</a></li>
|
||||
<li {if $mg=='location' && $ts=='add'}class="select"{/if}><a href="{SITE_URL}index.php?app=location&ac=admin&mg=location&ts=add">添加同城</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
|
||||
<!--main-->
|
||||
<div class="midder">
|
||||
|
||||
{php include template("admin/menu");}
|
||||
|
||||
<div>暂无配置</div>
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer_admin")}
|
||||
@@ -0,0 +1,33 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">全部同城</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="location_list">
|
||||
<ul>
|
||||
{loop $arrLocation $key $item}
|
||||
<li>
|
||||
<div class="photo"><img class="rounded" src="{if $item['photo']}{php echo tsXimg($item['photo'],'location','120','120',$item['path'],1)}{else}{SITE_URL}public/images/location.jpg{/if}" width="90" height="90" alt="{$item['title']}" /></div>
|
||||
<div class="info">
|
||||
<div class="fs18">{$item['title']}</div>
|
||||
<div class="content">{$item['content']}</div>
|
||||
|
||||
<div><a class="btn btn-sm btn-info" href="{tsUrl('location','show',array('id'=>$item['locationid']))}">访问</a></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,33 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">选择加入同城</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="location_list">
|
||||
<ul>
|
||||
{loop $arrLocation $key $item}
|
||||
<li>
|
||||
<div class="photo"><img class="rounded" src="{if $item['photo']}{php echo tsXimg($item['photo'],'location','120','120',$item['path'],1)}{else}{SITE_URL}public/images/location.jpg{/if}" width="90" height="90" alt="{$item['title']}" /></div>
|
||||
<div class="info">
|
||||
<div class="fs18">{$item['title']}</div>
|
||||
<div class="content">{$item['content']}</div>
|
||||
|
||||
<div><a class="btn btn-sm btn-info" href="javascript:void('0');" onclick="tsPost('index.php?app=location&ac=ajax&ts=join',{'locationid':'{$item[locationid]}'})">加入</a></div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -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-header">我的同城</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
{if $strUser['locationid']}
|
||||
|
||||
|
||||
<div class="location of">
|
||||
<div class="photo">
|
||||
<a href="{tsUrl('location','show',array('id'=>$strLocation['locationid']))}">
|
||||
<img class="rounded" src="{if $strLocation['photo']}{php echo tsXimg($strLocation['photo'],'location','120','120',$strLocation['path'],1)}{else}{SITE_URL}public/images/location.jpg{/if}" width="90" height="90" alt="{$strLocation['title']}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="info">
|
||||
<h1 class="h3 fw400">
|
||||
<a href="{tsUrl('location','show',array('id'=>$strLocation['locationid']))}">{tsTitle($strLocation['title'])}</a>
|
||||
</h1>
|
||||
<p class="text-black-50">{$strLocation['content']}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{else}
|
||||
|
||||
<div class="fs12 c9 text-center">
|
||||
你还没有加入同城
|
||||
<div class="mt-2">
|
||||
<a class="btn btn-sm btn-info" href="{tsUrl('location')}">选择同城</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,207 @@
|
||||
{php include pubTemplate("header")}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="location of">
|
||||
<div class="photo"><img class="rounded" src="{if $strLocation['photo']}{php echo tsXimg($strLocation['photo'],'location','120','120',$strLocation['path'],1)}{else}{SITE_URL}public/images/location.jpg{/if}" width="90" height="90" alt="{$strLocation['title']}" /></div>
|
||||
<div class="info">
|
||||
<h1 class="h3 fw400">{tsTitle($strLocation['title'])}{if $isLocationId==$strLocation['locationid']}<a class="float-right fs12 c9" href="javascript:void('0')" onclick="tsPost('index.php?app=location&ac=ajax&ts=exit',{'locationid':'{$strLocation[locationid]}'})">退出同城</a>
|
||||
{/if}</h1>
|
||||
<p class="text-black-50">{$strLocation['content']}</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">同城用户</div>
|
||||
<div class="card-body">
|
||||
<div class="facelist">
|
||||
<ul>
|
||||
{loop $arrUser $key $item}
|
||||
<li><a href="{tsUrl('user','space',array('id'=>$item['userid']))}"><img src="{if $item['face']}{php echo tsXimg($item['face'],'user','120','120',$item['path'],1)}{else}{SITE_URL}public/images/user_large.jpg{/if}" alt="{$item['username']}" width="48" height="48" class="rounded-circle" /></a>
|
||||
<div><a class="title-cut fs12 c9" href="{tsUrl('user','space',array('id'=>$item['userid']))}">{$item['username']}</a></div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">同城图片</div>
|
||||
<div class="card-body">
|
||||
<div class="photo">
|
||||
|
||||
<ul>
|
||||
{loop $arrPhoto $key $item}
|
||||
<li>
|
||||
<a title="{$item[photodesc]}" class="photolst_photo" href="{tsUrl('photo','show',array('id'=>$item[photoid]))}">
|
||||
<img src="{php echo tsXimg($item[photourl],'photo',170,'170',$item[path],1)}" width="120" height="120" alt="{$item['albumname']}" />
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">同城帖子</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="topic_list">
|
||||
<ul>
|
||||
|
||||
{loop $arrTopic $key $item}
|
||||
<li>
|
||||
<div class="userimg">
|
||||
|
||||
<a href="{tsUrl('user','space',array('id'=>$item[user][userid]))}">
|
||||
|
||||
<img class="rounded-circle" src="{$item[user][face]}" width="32" height="32" alt="{$item['user']['username']}" title="{$item['user']['username']}" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="topic_title">
|
||||
<div class="title">
|
||||
<a title="{$item[title]}" href="{tsUrl('group','topic',array('id'=>$item[topicid]))}">{tsTitle($item[title])}</a>
|
||||
|
||||
</div>
|
||||
<div class="topic_info">
|
||||
<span style="float:left;">
|
||||
<a href="{tsUrl('group','show',array('id'=>$item[groupid]))}">{tsTitle($item[group][groupname])}</a>
|
||||
</span>
|
||||
|
||||
<span style="float:right;">
|
||||
{php echo getTime($item[uptime],time())}
|
||||
|
||||
<a href="{tsUrl('group','user',array('id'=>$item[userid]))}">{$item[user][username]}</a>
|
||||
|
||||
{if $item[count_comment]>0}<a class="rank" style="color:#FFFFFF;" href="{tsUrl('group','topic',array('id'=>$item[topicid]))}">{$item[count_comment]}</a>{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{if $item['topic']}
|
||||
<div class="other">
|
||||
{loop $item['topic'] $tkey $titem}
|
||||
<p><a href="{tsUrl('group','topic',array('id'=>$titem['topicid']))}">{tsTitle($titem['title'])}</a></p>
|
||||
{/loop}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="clear"></div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">开心每一天</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="weilist">
|
||||
<ul id="weibo">
|
||||
{loop $arrWeibo $key $item}
|
||||
<li>
|
||||
<span class="portrait">
|
||||
|
||||
<a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}">
|
||||
|
||||
<img class="rounded-circle" title="{$item['user']['username']}" alt="{$item['user']['username']}" src="{$item['user']['face']}">
|
||||
|
||||
</a></span>
|
||||
<span class="body">
|
||||
<span class="user"><a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}">{$item['user']['username']}</a>:</span><span class="log">{$item['content']}</span>
|
||||
{if $item[photo]}
|
||||
<div style="padding:5px 0;"><a target="_blank" href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}"><img src="{php echo tsXimg($item['photo'],'weibo',240,'',$item['path'])}" width="120" /></a>
|
||||
</div>
|
||||
{/if}
|
||||
<span class="time">{php echo getTime(strtotime($item['addtime']),time())} (<a href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}">{$item['count_comment']}评</a>)
|
||||
</span>
|
||||
</span>
|
||||
<div class="clear"></div>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">同城文章</div>
|
||||
<div class="card-body">
|
||||
<div class="commlist">
|
||||
|
||||
<ul>
|
||||
{loop $arrArticle $key $item}
|
||||
<li><a href="{tsUrl('article','show',array('id'=>$item['articleid']))}">{tsTitle($item['title'])}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="card-body">
|
||||
<div class="card-header">同城资料</div>
|
||||
<div class="card-body">
|
||||
<div class="commlist">
|
||||
|
||||
<ul>
|
||||
{loop $arrAttach $key $item}
|
||||
<li><a href="{tsUrl('attach','show',array('id'=>$item['attachid']))}">{tsTitle($item['attachname'])}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="text-black-50 fs12" href="{tsUrl('location','all')}">查看全部同城</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer")}
|
||||
@@ -0,0 +1,95 @@
|
||||
.location_list{}
|
||||
.location_list ul, .location_list ul li{list-style: none;margin:0;padding:0;}
|
||||
.location_list ul{}
|
||||
.location_list ul li{float:left;padding:20px;width:420px;}
|
||||
.location_list ul li .photo{float:left;width:100px;}
|
||||
.location_list ul li .info{margin-left:100px;}
|
||||
|
||||
.location_list ul li .info .content{line-height:25px;font-size:12px;color:#999}
|
||||
|
||||
|
||||
.location{}
|
||||
.location .photo{float:left;width:100px;}
|
||||
.location .info{margin-left:100px;}
|
||||
.location .info h1{padding:0 10px;}
|
||||
.location .info p{padding:10px;}
|
||||
|
||||
|
||||
.photo{}
|
||||
.photo ul, .photo ul li{list-style: none;margin:0;padding: 0;}
|
||||
.photo ul{}
|
||||
.photo ul li{float:left;}
|
||||
|
||||
|
||||
.weilist{}
|
||||
.weilist ul, .weilist ul li{list-style: none;margin:0;padding:0;}
|
||||
.weilist ul li {
|
||||
border-bottom: 1px dashed #DDDDDD;
|
||||
margin: 0 0 5px;
|
||||
padding: 0 0 8px;
|
||||
}
|
||||
.weilist ul li .portrait {
|
||||
float: left;
|
||||
padding-top: 3px;
|
||||
width: 45px;
|
||||
}
|
||||
.weilist ul li .portrait img {
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
|
||||
height: 32px;
|
||||
|
||||
width: 32px;
|
||||
}
|
||||
.weilist ul li .body {
|
||||
float: left;
|
||||
font-size: 9pt;
|
||||
overflow: hidden;
|
||||
width: 230px;
|
||||
}
|
||||
.weilist ul li .user a {
|
||||
|
||||
}
|
||||
|
||||
.weilist ul li .log {
|
||||
color: #999;
|
||||
word-break: break-all;
|
||||
}
|
||||
.weilist ul li .time {
|
||||
color: #9A9A9A;
|
||||
display: block;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
.weilist ul li .time a {
|
||||
color: #9A9A9A;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*帖子列表*/
|
||||
.topic_list{overflow:hidden;}
|
||||
.topic_list ul, .topic_list ul li{list-style: none;margin:0;padding:0;}
|
||||
.topic_list ul{overflow:hidden;}
|
||||
.topic_list ul li{overflow:hidden;padding:15px 0;display: block;border-bottom: 1px dashed #999999;}
|
||||
|
||||
.topic_list ul li .other{background: none repeat scroll 0 0 #F8F8F8;
|
||||
border-left: 3px solid #EEEEEE;
|
||||
margin-left: 38px;
|
||||
margin-top: 5px;
|
||||
padding: 5px;}
|
||||
.topic_list ul li .other p{margin:0px;padding:5px 0;}
|
||||
|
||||
.topic_list .userimg{float:left;width:38px;overflow:hidden;}
|
||||
|
||||
.topic_list .topic_title{margin-left:40px;overflow:hidden;}
|
||||
|
||||
.topic_list .topic_title .title a{color:#343434;font-size:14px;}
|
||||
|
||||
.topic_list .topic_info{overflow: hidden;font-size:12px;color:#999999;}
|
||||
|
||||
.rank {
|
||||
background: none repeat scroll 0 0 #BBBBBB;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
margin: 0 0 0 5px;
|
||||
padding: 0 3px;
|
||||
border-radius:5px 5px 5px 5px;
|
||||
}
|
||||
Reference in New Issue
Block a user