begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
{php include pubTemplate("header_admin")}
<div class="midder">
{php include template("admin/menu");}
<div class="page">{$pageUrl}</div>
<table class="table table-hover">
<thead class="thead-light">
<tr><th>AlbumID</th><th>图片</th><th>标题</th><th>UserID</th><th>统计</th><th>addtime</th><th>操作</th></tr>
</thead>
<tbody class="fs12">
{loop $arrAlbum $key $item}
<tr><td>{$item[albumid]}</td><td><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=photo&albumid={$item[albumid]}">
{if $item[albumface]}
<img src="{php echo tsXimg($item[albumface],'photo',100,100,$item[path])}" />
{else}
<img src="{SITE_URL}public/images/event_dft.jpg" />
{/if}
</a></td>
<td>{tsTitle($item['albumname'])}</td>
<td>{$item[userid]}</td>
<td>图片:{$item['count_photo']}</td>
<td>{$item['addtime']}</td>
<td>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=isaudit&albumid={$item[albumid]}">
{if $item['isaudit']}
<font color="red">审核</font>
{else}
取消审核
{/if}
</a>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=isrecommend&albumid={$item[albumid]}">
{if $item[isrecommend]==0}
推荐
{else}
取消推荐
{/if}
</a>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=del_album&albumid={$item[albumid]}">删除</a>
</td></tr>
{/loop}
</tbody>
</table>
</div>
{php include pubTemplate("footer_admin")}
+42
View File
@@ -0,0 +1,42 @@
{php include pubTemplate("header_admin")}
<div class="midder">
{php include template("admin/menu");}
<div class="page">{$pageUrl}</div>
<table class="table table-hover">
<thead class="thead-light">
<tr><th>PhotoId</th><th>图片</th><th>AlbumID</th><th>UserId</th><th>操作</th></tr>
</thead>
<tbody>
{loop $arrPhoto $key $item}
<tr><td>{$item[photoid]}</td><td><a target="_blank" href="{SITE_URL}uploadfile/photo/{$item[photourl]}">
{if $item[photourl]}
<img src="{php echo tsXimg($item[photourl],'photo',100,100,$item[path])}" />
{else}
<img src="{SITE_URL}public/images/event_dft.jpg" />
{/if}
</a></td><td>{$item[albumid]}</td><td>{$item[userid]}</td><td><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=face&photoid={$item[photoid]}">设为封面</a> <a href="">修改</a> <a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=del_photo&photoid={$item[photoid]}">删除</a></td></tr>
{/loop}
</tbody>
</table>
</div>
{php include pubTemplate("footer_admin")}
+89
View File
@@ -0,0 +1,89 @@
{php include pubTemplate("header_admin")}
<!--main-->
<div class="midder">
{php include template("admin/menu");}
<div class="page">{$pageUrl}</div>
<div class="mb-3">
<form method="get" action="index.php">
<input type="hidden" name="app" value="photo">
<input type="hidden" name="ac" value="admin">
<input type="hidden" name="mg" value="comment">
<input type="hidden" name="ts" value="list">
<input type="number" name="photoid" placeholder="图片ID">
<input type="number" name="userid" placeholder="用户ID">
<input type="submit" value="搜索">
<a class="btn btn-sm btn-outline-secondary" href="index.php?app=photo&ac=admin&mg=comment&ts=list">全部</a>
</form>
</div>
<table class="table table-hover">
<thead class="thead-light fs14">
<tr><th>ID</th>
<th>UserID</th>
<th>photoid</th>
<th>内容</th>
<th>时间</th>
<th>操作</th></tr>
</thead>
<tbody class="fs12">
{loop $arrComment $key $item}
<tr>
<td>{$item['commentid']}</td>
<td>{$item['userid']}</td>
<td>{$item['photoid']} <a target="_blank" href="{tsUrl('photo','show',array('id'=>$item['photoid']))}">[查看内容]</a></td>
<td>
<div style="width: 600px;">{php echo tsTitle($item['content'])}</div>
</td>
<td>{php echo date('Y-m-d H:i:s',$item['addtime'])}</td>
<td>
<a onclick="return confirm('确定删除?')" href="{SITE_URL}index.php?app=photo&ac=admin&mg=comment&ts=delete&commentid={$item['commentid']}">删除</a>
</td></tr>
{/loop}
</tbody>
</table>
</div>
{php include pubTemplate("footer_admin")}
+16
View File
@@ -0,0 +1,16 @@
<div class="tabnav">
<h6>相册管理</h6>
<ul>
<li {if $mg=='options'}class="select"{/if}><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=options">相册配置</a></li>
<li {if $mg=='permissions'}class="select"{/if}><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=permissions">权限配置</a></li>
<li {if $mg=='album'}class="select"{/if}><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=list">相册列表</a></li>
<li {if $mg=='photo'}class="select"{/if}><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=photo&ts=list">图片列表</a></li>
</ul>
</div>
<div style="height: 100px;"></div>
+34
View File
@@ -0,0 +1,34 @@
{php include pubTemplate("header_admin")}
<div class="midder">
{php include template("admin/menu")}
<form method="POST" action="index.php?app=photo&ac=admin&mg=options&ts=do">
<table class="table table-hover">
<tr><td width="150">APP名称:</td><td><input style="width:300px;" name="option[appname]" value="{$strOption[appname]}" /></td></tr>
<tr><td>APP介绍:</td><td><textarea style="width:300px;" name="option[appdesc]">{$strOption[appdesc]}</textarea></td></tr>
<tr><td>APP关键词:</td><td><input style="width:300px;" name="option[appkey]" value="{$strOption[appkey]}" /></td></tr>
<tr><td>是否审核:</td><td><input type="radio" name="option[isaudit]" value="0" {if $strOption['isaudit']=='0'}checked{/if} />不审核 <input type="radio" name="option[isaudit]" value="1" {if $strOption['isaudit']=='1'}checked{/if} />审核</td></tr>
<tr><td></td><td>
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<input class="btn btn-primary" type="submit" value="提交修改" /></td></tr>
</table>
</form>
<table class="table table-hover">
<tr><td>重新统计相册</td><td><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=count">执行</a></td></tr>
<tr><td>删除空相册</td><td><a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=nophoto">执行</a></td></tr>
</table>
</div>
{php include pubTemplate("footer_admin")}
+165
View File
@@ -0,0 +1,165 @@
{php include pubTemplate("header_admin")}
<div class="midder">
{php include template("admin/menu");}
<div class="mb-3">
{loop $arrUg $key $item}
<a class="btn btn-sm {if $item['ugid']==$ugid}btn-secondary{else}btn-outline-secondary{/if}" href="{SITE_URL}index.php?app=photo&ac=admin&mg=permissions&ugid={$item['ugid']}">{$item['ugname']}</a>
{/loop}
</div>
<form method="POST" action="index.php?app=photo&ac=admin&mg=permissions&ts=do">
<h6 class="font-weight-bold fs14">前台权限</h6>
<table class="table table-hover">
<tr>
<td width="150">查看图片:</td>
<td>
<select name="option[photo_show]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_show']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_show']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<!--不允许游客发布、修改、删除-->
{if $ugid==1 || $ugid==2 || $ugid==3}
<tr>
<td>创建相册:</td>
<td>
<select name="option[photo_create]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_create']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_create']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>修改相册:</td>
<td>
<select name="option[photo_album_edit]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_album_edit']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_album_edit']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>删除相册:</td>
<td>
<select name="option[photo_album_del]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_album_del']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_album_del']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>上传图片:</td>
<td>
<select name="option[photo_upload]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_upload']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_upload']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>修改图片:</td>
<td>
<select name="option[photo_edit]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_edit']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_edit']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>删除图片:</td>
<td>
<select name="option[photo_delete]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_delete']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_delete']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
{/if}
</table>
<!--管理权限-->
{if $ugid==1 || $ugid==2}
<h6 class="font-weight-bold fs14">后台权限</h6>
<table class="table table-hover">
<tr>
<td width="150">图片配置:</td>
<td>
<select name="option[photo_admin_options]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_admin_options']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_admin_options']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
<tr>
<td>权限配置:</td>
<td>
<select name="option[photo_admin_permissions]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_admin_permissions']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_admin_permissions']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
</table>
{/if}
<h6 class="font-weight-bold fs14">API权限</h6>
<table class="table table-hover">
<tr>
<td width="150">查看图片:</td>
<td>
<select name="option[photo_api_show]">
<option value="1" {if $TS_APP['permissions'][$ugid]['photo_api_show']==1}selected{/if}>允许</option>
<option value="0" {if $TS_APP['permissions'][$ugid]['photo_api_show']==0}selected{/if}>拒绝</option>
</select>
</td>
</tr>
</table>
<input type="hidden" name="ugid" value="{$ugid}">
<input class="btn btn-primary" type="submit" value="提交修改" />
</form>
</div>
{php include pubTemplate("footer_admin")}
+60
View File
@@ -0,0 +1,60 @@
{php include pubTemplate("header_admin")}
<div class="midder">
{php include template("admin/menu");}
<div class="page">{$pageUrl}</div>
<table class="table table-hover">
<thead class="thead-light">
<tr><th>PhotoId</th><th>图片</th><th>AlbumID</th>
<th>UserId</th>
<th>统计</th>
<th>操作</th></tr>
</thead>
<tbody class="fs12">
{loop $arrPhoto $key $item}
<tr><td>{$item[photoid]}</td><td><a target="_blank" href="{SITE_URL}uploadfile/photo/{$item[photourl]}">
{if $item[photourl]}
<img src="{php echo tsXimg($item[photourl],'photo',100,100,$item[path])}" />
{else}
<img src="{SITE_URL}public/images/event_dft.jpg" />
{/if}
</a></td><td>{$item[albumid]}</td>
<td>{$item[userid]}</td>
<td>
浏览:{$item['count_view']}<br>
评论:{$item['count_comment']}
</td>
<td>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=face&photoid={$item[photoid]}">设为封面</a>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=photo&ts=isrecommend&photoid={$item[photoid]}">{if $item[isrecommend]==0}推荐{else}取消推荐{/if}</a>
<a href="{SITE_URL}index.php?app=photo&ac=admin&mg=album&ts=del_photo&photoid={$item[photoid]}">删除</a></td></tr>
{/loop}
</tbody>
</table>
</div>
{php include pubTemplate("footer_admin")}
+96
View File
@@ -0,0 +1,96 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">{$strAlbum['albumname']}</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
<h1 class="h3 fw400">{$title}</h1>
<hr />
<div class="c9 fs12">
<span class="mr-2">{$strAlbum[count_view]} 人浏览</span>
<span class="mr-2">{$strAlbum[count_photo]}&nbsp;张照片</span>
&nbsp;<span>{$strAlbum[addtime]}&nbsp;创建</span>
</div>
<div class="row mt-3">
{if $arrPhoto}
{loop $arrPhoto $key $item}
<div class="col-4 col-md-2 mb-3">
<div class="thumbnail">
<a href="{tsUrl('photo','show',array('id'=>$item[photoid]))}">
<img class="mw100" src="{php echo tsXimg($item[photourl],'photo',320,'320',$item[path],1)}" alt="{$strAlbum['albumname']}{$item['title']}">
</a>
<div class="caption">
<div class="c9 fs12 mt-1">{$item[count_view]}浏览</div>
</div>
</div>
</div>
{/loop}
{else}
<div class="p-3">这个相册现在还没有照片
{if $strAlbum[userid] == $TS_USER[userid]}, 你可以 <a class="btn btn-sm btn-outline-info" href="{SITE_URL}index.php?app=photo&ac=upload&albumid={$strAlbum[albumid]}">添加照片</a>{/if}
</div>
{/if}
</div>
<div class="page">{$pageUrl}</div>
<div class="text-black-50">{$strAlbum[albumdesc]}</div>
<hr />
<div class="tar fs12 c9 mt-3">
{if $strAlbum[userid] == $TS_USER[userid] || $TS_USER[isadmin]==1} &nbsp;
&gt;&nbsp;<a href="{tsUrl('photo','album',array('ts'=>'edit','albumid'=>$strAlbum['albumid']))}">修改相册</a>
&nbsp;&gt;&nbsp;<a href="{tsUrl('photo','upload',array('albumid'=>$strAlbum['albumid']))}">添加照片</a>
{if $strAlbum[count_photo]>'0'}&nbsp;
&gt;&nbsp;<a href="{tsUrl('photo','album',array('ts'=>'info','albumid'=>$strAlbum['albumid']))}">批量修改</a>{/if}
{/if}
{if $strAlbum[userid] == $TS_USER[userid] || $TS_USER[isadmin]==1}
&nbsp;&gt;&nbsp;<a href="{tsUrl('photo','album',array('ts'=>'del','albumid'=>$strAlbum['albumid']))}">删除相册</a>
{/if}
&nbsp;&gt;&nbsp;<a href="{tsUrl('photo','user',array('id'=>$strAlbum['userid']))}">{$strUser['username']}的相册</a>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+68
View File
@@ -0,0 +1,68 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">{$strAlbum['albumname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">修改相册</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<form role="form" method="POST" action="{tsUrl('photo','album',array('ts'=>'editdo'))}">
<div class="form-group">
<label>相册名称(必填)</label>
<input type="text" name="albumname" value="{$strAlbum['albumname']}" class="form-control" >
</div>
<div class="form-group">
<label>相册介绍:</label>
<textarea class="form-control" rows="3" name="albumdesc">{$strAlbum['albumdesc']}</textarea>
</div>
<input type="hidden" name="albumid" value="{$strAlbum['albumid']}" />
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<button class="btn btn-sm btn-info" type="submit">修改相册</button>
<a class="btn btn-sm text-black-50" href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">返回相册</a>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+79
View File
@@ -0,0 +1,79 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">{$strAlbum['albumname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">批量修改</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<form method="post" action="{SITE_URL}index.php?app=photo&ac=album&ts=info_do">
{loop $arrPhoto $key $item}
<div class="photo-item">
<div class="cover">
<a href=""><img class="mw-100" src="{php echo tsXimg($item[photourl],'photo',320,320,$item[path])}"></a>
<div class="choose-cover">
<input type="hidden" name="photoid[]" value="{$item[photoid]}" />
<input type="radio" {if $strAlbum['albumface']==$item['photourl']}checked="checked"{/if} value="{$item['photoid']}" name="albumface" {if $key==0}checked{/if}><label>设置为封面</label>
</div>
</div>
<div class="intro">
<textarea style="height:50px;" name="photodesc[]">{if $addtime}{$strAlbum['albumname']}{/if}{$item[photodesc]}</textarea>
<p><a class="j a_confirm_link" title="删除这张照片" rel="nofollow" href="{SITE_URL}index.php?app=photo&ac=do&ts=photo_del&photoid={$item[photoid]}">删除照片</a></p>
</div>
</div>
<div class="clear"></div>
{/loop}
<hr />
<input type="hidden" name="albumid" value="{$strAlbum[albumid]}" />
<input class="btn btn-sm btn-info" type="submit" value="保存">
<a class="btn btn-sm btn-outline-secondary" href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">返回相册</a>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+65
View File
@@ -0,0 +1,65 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">创建新相册</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
{template menu}
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form role="form" method="POST" action="{tsUrl('photo','create',array('ts'=>'do'))}">
<div class="form-group">
<label>相册名称(必填)</label>
<input type="text" name="albumname" class="form-control" >
</div>
<div class="form-group">
<label>相册介绍:</label>
<textarea class="form-control" rows="3" name="albumdesc"></textarea>
</div>
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<button class="btn btn-sm btn-info" type="submit">创建相册</button>
<a class="btn btn-sm text-black-50" href="{tsUrl('photo','user',array('id'=>$userid))}">返回我的相册</a>
</form>
<p>
</p>
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+48
View File
@@ -0,0 +1,48 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb" class="position-relative">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item active" aria-current="page">{$TS_APP['appname']}</li>
</ol>
<a class="btn btn-sm btn-info position-absolute" style="z-index: 100;top:6px;right:6px;" href="{tsUrl('photo','create')}">创建相册</a>
</nav>
<div class="card">
<div class="card-body">
{template menu}
<div class="row">
{loop $arrAlbum $key $item}
<div class="col-6 col-md-2 mb-3">
<a href="{tsUrl('photo','album',array('id'=>$item[albumid]))}">
<img class="mw100" src="{if $item[albumface] == ''}{SITE_URL}app/{$app}/skin/photo_album.png{else}{php echo tsXimg($item[albumface],'photo',320,'320',$item[path],1)}{/if}" alt="{$item[albumname]}">
</a>
<div class="caption">
<div class="title-cut mt-2">{$item[albumname]}</div>
<div class="c9 fs12"> {$item[count_photo]}张图片</div>
<div class="fs12 c9">{php echo date('Y-m-d',strtotime($item['addtime']))} 创建</div>
</div>
</div>
{/loop}
</div>
<div class="clear"></div>
<div class="page">{$pageUrl}</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+9
View File
@@ -0,0 +1,9 @@
<div class="mb-3">
<a class="btn btn-sm {if $ac=='index'}btn-outline-secondary{else}text-secondary{/if}" href="{tsUrl('photo')}">最新相册</a>
{if $ac=='album' && $ts=='user'}
<a class="btn btn-sm btn-outline-secondary" href="{tsUrl('photo','album',array(ts=>user,userid=>$userid))}">{$title}</a>
{/if}
</div>
<hr />
+64
View File
@@ -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">
<div class="row">
{loop $arrAlbum $key $item}
<div class="col-6 col-md-3">
<a target="_blank" href="{tsUrl('photo','album',array('id'=>$item[albumid]))}"><img class="mw-100" src="{if $item[albumface] == ''}{SITE_URL}public/images/photo.jpg{else}{php echo tsXimg($item[albumface],'photo',170,'170',$item[path],1)}{/if}" /></a>
<div class="caption">
<div class="title-cut">{$item['albumname']}</div>
<div class="c9 fs12"> {$item['count_photo']}张照片</div>
<div class="fs12 c9">{php echo date('Y-m-d',strtotime($item['addtime']))} 创建</div>
</div>
</div>
{/loop}
</div>
<div class="page">{$pageUrl}</div>
</div>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+62
View File
@@ -0,0 +1,62 @@
{php include pubTemplate("header")}
<div class="container">
<div class="card">
<div class="card-header">编辑图片信息</div>
<div class="card-body">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<form method="post" action="{tsUrl('photo','edit',array('ts'=>'do'))}">
<p>图片:</p>
<p>
<img src="{php echo tsXimg($strPhoto['photourl'],'photo','320','320',$strPhoto['path'],1)}" />
</p>
<p>图片名称:</p>
<p><input style="width:300px;" name="title" value="{$strPhoto['title']}" /></p>
<p>图片介绍:</p>
<p><textarea style="width:300px;height:100px;" name="photodesc">{$strPhoto['photodesc']}</textarea></p>
<p>
<input type="hidden" name="photoid" value="{$strPhoto['photoid']}" />
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<input class="btn btn-success" type="submit" value="修改" />
<a class="btn btn-default" href="{tsUrl('photo','show',array('id'=>$photoid))}">返回</a>
</p>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}
+174
View File
@@ -0,0 +1,174 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">{$strAlbum['albumname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">第{$nowPage}张</li>
</ol>
</nav>
<div class="row">
<div class="col-md-8">
<div class="card">
<div class="card-body">
<h1 class="h3 fw400">{$strAlbum['albumname']}(第{$nowPage}张)</h1>
<hr />
<div class="tac fs12 c9">
&gt; <a class="mr-2" href="{tsUrl('photo','album',array('id'=>$strAlbum[albumid]))}">返回相册</a>第{$nowPage}张 / 共{$conutPage}张
{if $nowPage >1}
<link href="#" rel="prev">
<a id="pre_photo" title="用方向键←可以向前翻页" href="{tsUrl('photo','show',array('id'=>$prev))}">上一张</a>
{if $nowPage < $conutPage}
/
{/if}
{/if}
{if $nowPage < $conutPage}
<link href="#" rel="next">
<a id="next_photo" title="用方向键→可以向后翻页" name="next_photo" href="{tsUrl('photo','show',array('id'=>$next))}">下一张</a>
{/if}
</div>
<div class="tac show_photo mt-3">
{if $nowPage < $conutPage}
<a title="点击查看下一张" href="{tsUrl('photo','show',array('id'=>$next))}" class="mainphoto">
{/if}
<img src="{php echo tsXimg($strPhoto['photourl'],'photo',640,'',$strPhoto['path'])}" alt="{$strAlbum['albumname']}{$strPhoto['title']}" title="{$strAlbum['albumname']}{$strPhoto['title']}" />
{if $nowPage < $conutPage}
</a>
{/if}
</div>
<div class="tac pd100">
{$strPhoto[title]} {$strPhoto[photodesc]}
</div>
<div class="c9 fs12">
{$strPhoto[count_view]}人浏览 
上传于{$strPhoto[addtime]}
<a class="thickbox" target="_blank" href="{$strPhoto['photo_url']}">查看原图</a>
 
</div>
<div class="tar c9 fs12">
{if $TS_USER[userid] == $strPhoto[userid] || $TS_USER[isadmin]==1}<a href="{tsUrl('photo','edit',array('photoid'=>$strPhoto['photoid']))}">修改</a> |
<a onclick="return confirm('确定删除?')" href="{SITE_URL}index.php?app=photo&ac=delete&photoid={$strPhoto[photoid]}">删除照片</a>
{/if}
</div>
</div>
</div>
<div class="card">
<div class="card-header">评论{if $strPhoto['count_comment']} <small class="text-secondary">({$strPhoto['count_comment']})</small>{/if}</div>
<div class="card-body">
<!--评论列表-->
{php include pubTemplate("comment")}
<div class="commentform">
{if tsIntval($TS_USER[userid])==0}
<div class="tac pd20 fw300">
<a href="{tsUrl('user','login')}">登录</a> | <a href="{tsUrl('user','register')}">注册</a>
</div>
{else}
<form id="comm-form" method="post" action="{SITE_URL}index.php?app=comment&ac=add">
<div >
<textarea id="tseditor" name="content"></textarea>
</div>
<div class="row mt-3">
<div class="col-md-6">
{if $TS_SITE['isauthcode']}
<input class="form-control form-control-sm w-auto float-left" name="authcode" placeholder="输入验证码" />
<img class="mt-1 ml-1" src="{tsUrl('pubs','code')}" onclick="javascript:newgdcode(this,this.src);" title="点击刷新验证码" alt="点击刷新验证码" style="cursor:pointer;"/>
{/if}
</div>
<div class="col-md-4">
<div class="mt-1">是否公开:<input type="radio" name="ispublic" value="0" checked />公开 <input type="radio" name="ispublic" value="1" />不公开</div>
</div>
<div class="col-md-2 text-right">
<input type="hidden" name="ptable" value="photo">
<input type="hidden" name="pkey" value="photoid">
<input type="hidden" name="pid" value="{$strPhoto['photoid']}" />
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<button class="btn btn-sm btn-info btn-block" type="submit">提交评论</button>
</div>
</div>
</form>
{/if}
</div>
</div>
</div>
</div>
<div class="col-md-4">
{php doAction('gobad','300')}
</div>
</div>
</div>
{php doAction('tseditor','mini')}
{php include pubTemplate("footer")}
+77
View File
@@ -0,0 +1,77 @@
{php include pubTemplate("header")}
<link href="{SITE_URL}public/js/dropzone/dropzone.css" type="text/css" rel="stylesheet" />
<script src="{SITE_URL}public/js/dropzone/dropzone.js"></script>
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">{$strAlbum['albumname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">上传图片</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
<div class="alert alert-info">上传文件只支持:jpg,gif,png格式。</div>
<form id ="myAwesomeDropzone" style="width:100%;border:dashed;" action="{SITE_URL}index.php?app=photo&ac=upload&ts=do" class="dropzone">
<input type="hidden" name="albumid" value="{$albumid}">
<input type="hidden" name="addtime" value="{$addtime}"/>
</form>
<div class="clear"></div>
<div class="mt-3">
<a class="btn btn-sm btn-outline-secondary" href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">返回相册</a>
</div>
</div>
</div>
</div>
<script>
Dropzone.options.myAwesomeDropzone = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: "{$GLOBALS['TS_SITE']['photo_size']}", // MB
{if isMobile()}
acceptedFiles:"image/jpeg,image/png,image/gif",
{else}
acceptedFiles:".jpg,.png,.jpeg,.gif",
{/if}
dictDefaultMessage:'点击选择图片上传',
accept: function(file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
} else {
done();
}
},
queuecomplete:function (file) {
window.location = siteUrl+"index.php?app=photo&ac=album&ts=info&albumid={$albumid}&addtime={$addtime}";
}
};
</script>
{php include pubTemplate("footer")}
+47
View File
@@ -0,0 +1,47 @@
{php include pubTemplate("header")}
<div class="container">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
<li class="breadcrumb-item active" aria-current="page">{$strUser['username']}的相册</li>
</ol>
</nav>
<div class="card">
<div class="card-body">
<h1 class="h3 fw400">{$strUser['username']}的相册</h1>
<hr />
<div class="row">
{loop $arrAlbum $key $item}
<div class="col-4 col-md-2">
<a href="{tsUrl('photo','album',array('id'=>$item[albumid]))}" class="thumbnail">
<img class="mw100" src="{if $item[albumface] == ''}{SITE_URL}public/images/photo.jpg{else}{php echo tsXimg($item[albumface],'photo',320,'320',$item[path],1)}{/if}" alt="{$item[albumname]}">
</a>
<div class="caption">
<div class="title-cut">{$item['albumname']}</div>
<div class="c9 fs12"> {$item['count_photo']}张照片</div>
<div class="fs12 c9">{php echo date('Y-m-d',strtotime($item['addtime']))} 创建</div>
</div>
</div>
{/loop}
</div>
<div class="page">{$pageUrl}</div>
</div>
</div>
</div>
{php include pubTemplate("footer")}