link_add.vm

来自「一个简单的blog系统」· VM 代码 · 共 49 行

VM
49
字号
##
##  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.
##
##  add link
##
###############################################################################
#parse("/wml/_sub/_global.vm")
#set($page_title="添加友情链接")
<p>
	#invoke("_opt_bar.vm") <a href="$dlog.root()/wml/mgr/links.vm?sid=$g_site_id">友情链接</a> &gt; 添加链接<br/>
#if(!$dlog.is_owner($g_site, $g_user))
	对不起,你没有足够的访问权限,点击<a href="$dlog.root()/dlog/login.vm?sid=$g_site_id&amp;fromPage=$link.encodeURL($dlog.get_request_url())">$text.ui("label.login")</a>使用其他帐号进入。<br /><br /><a href="#" onclick="history.go(-1);return false;">返回上页</a>
#else
	#wml_error_msg()
	--请输入链接信息--<br/>	
	#set($cform = $form.getBean())
	链接名称:<input type="text" maxlength="20" name="title" value="$!{cform.title}"/><br/>
	网址(URL):<input type="text" maxlength="100" name="url" value="$!{cform.url}"/><br/>
	类型:<select name="type"><option value="6">WAP</option><option value="2">XML(RDF,RSS,ATOM)</option><option value="1">HTML</option></select><br/>
	#if(${g_site.links.size()}>0)
	位置:<select name="id">#foreach($lnk in ${g_site.links})<option value="$lnk.id">$text.html($lnk.title)</option>#end</select><select name="direction"><option value="2">之后</option><option value="1">之前</option></select><br/>
	#end
	
    <anchor>添加链接
        <go href="$link.setAction("wml/link")" method="post">
            <postfield name="sid" value="$g_site_id"/>
            <postfield name="title" value="$(title)"/>
            <postfield name="url" value="$(url)"/>
            <postfield name="type" value="$(type)"/>
            <postfield name="id" value="$(id)"/>
            <postfield name="direction" value="$(direction)"/>
            <postfield name="__ClientId" value="$dlog.gen_client_id()"/>
            <postfield name="eventSubmit_CreateLink" value="WML"/>
        </go>
    </anchor>
#end
</p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?