edit.vm
来自「一个简单的blog系统」· VM 代码 · 共 65 行
VM
65 行
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Library General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## photo edit
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($page_title="修改照片")
#set($photo_id = $dlog.param("pid", -1))
#set($photo = $PHOTO_tool.photo($g_site, $g_user, $photo_id))
<p>
#if(!$dlog.is_owner($g_site, $g_user))
对不起,你没有足够的访问权限,点击<a href="$dlog.root()/dlog/login.vm?sid=$g_site_id&fromPage=$link.encodeURL($dlog.get_request_url())">$text.ui("label.login")</a>使用其他帐号进入。<br /><br /><a href="#" onclick="history.go(-1);return false;">返回上页</a>
#else
相册总空间: <b>${g_site.capacity.photoTotalFriendly}</b>
已用空间: <b>${g_site.capacity.photoUsedFriendly}</b>
空间利用率: <b>${g_site.capacity.photoSpacePercent}%</b><br/>
#if($messages.exist())<b>$!messages.getAll()</b><br/>#end
<img src="$dlog.root()${photo.previewURL}" alt=""/><br/>
照片名称:<input type="text" name="name" value="$text.html($!{photo.name})" /><br/>
照片关键字:<input type="text" name="keyword" value="$text.html($!{photo.keyword})" /><br/>
照片描述:<input type="text" name="desc" value="$text.html($!{photo.desc})" /><br/>
存放相簿:
<select name="album">
#foreach($album in $g_site.albums)
<option value="${album.id}">$text.html(${album.name})</option>
#foreach($s_album in $album.childs)
<option value="${s_album.id}"> • $text.html(${s_album.name})</option>
#end
#end
</select><br/>
照片属性:
<select name="status">
<option value="0">公开</option>
<option value="2">隐藏</option>
</select>
<anchor>修改照片
<go href="$link.setAction("wml/photo")" method="post">
<postfield name="sid" value="$g_site_id"/>
<postfield name="id" value="$photo_id"/>
<postfield name="pid" value="$photo_id"/>
<postfield name="name" value="$(name)"/>
<postfield name="keyword" value="$(keyword)"/>
<postfield name="desc" value="$(desc)"/>
<postfield name="album" value="$(album)"/>
<postfield name="status" value="$(status)"/>
<postfield name="__ClientId" value="$dlog.gen_client_id()"/>
<postfield name="eventSubmit_Update" value="WML"/>
</go>
</anchor>
#end
</p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?