<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={sys_charset}">
<title>link edit</title>
<link href="{adminStylePath}style/common.css" rel="stylesheet" type="text/css">
<link href="{adminStylePath}style/jqModal.css" type="text/css" rel="stylesheet">
<link href="{sys_path}plugins/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css">
<script language="javascript" src="{adminStylePath}js/validate.js"></script>
<script language="javascript" src="{adminStylePath}js/jquery.js"></script>
<script language="javascript" src="{adminStylePath}js/jqModal.js"></script>
<script language="javascript" src="{adminStylePath}js/jqModal.init.js"></script>
<script language="javascript" src="{adminStylePath}js/common.js"></script>
<script type="text/javascript" src="{sys_path}plugins/kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="{sys_path}plugins/kindeditor/lang/zh_CN.js"></script>
<script language="javascript">
    KindEditor.ready(function(K) {
        var editor = K.editor({
            allowFileManager : true
        });
        K('#btn_upfile').click(function() {
            editor.loadPlugin('image', function() {
                editor.plugin.imageDialog({
                    imageUrl : K('#logo').val(),
                    clickFn : function(url, title, width, height, border, align) {
                        K('#logo').val(url);
                        editor.hideDialog();
                    }
                });
            });
        });
    });

function doEvent()
{ 
	submitsSelect('save','link_edit.php?act=save');
}
function showChannel(tmptype)
{
	if(tmptype==1) document.getElementById('edit_channel').style.display="none";
	else document.getElementById('edit_channel').style.display="";
}
function showLayout(tmptype)
{
	if(tmptype==1) document.getElementById('edit_layout').style.display="none";
	else document.getElementById('edit_layout').style.display="";

}

</script>
</head>

<body onkeypress = "thisKeyPress(event,'doEvent()')">
<table class="nav_table" cellpadding="0" cellspacing="0">	
	<tr>
		<td class="nav_td">{menu_nav}</td>
	</tr>	
</table>
<table class="toolbar_table" cellpadding="0" cellspacing="0">
	<tr>
		<td class="toolbar_td">{toolbar}</td>
	</tr>
</table>
<div class="line_space"><img src="{adminStylePath}images/blank.gif"></div>
<table cellpadding="0" cellspacing="0" class="edit_tb">
  
  <form name="editForm" method="post" action="" >
  	<input type="hidden" name="selectid" id="selectValue" value="{selectid}">
    <input type="hidden" name="selectValue" id="selectValue" value="{selectid}">
    
    <tr> 
      <td width="20%"  class="edit_td_txt">网址:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="weburl" class="input_text" size="40" value="{weburl}" dataType="LimitB" min="4" max="255"  msg="[4,255]个字符之内">
      </td>
    </tr>
    <tr> 
      <td width="20%"  class="edit_td_txt">网站名称:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="webname" class="input_text" size="40" value="{webname}" dataType="LimitB" min="4" max="255"  msg="[1,255]个字符之内">
      </td>
    </tr>    
    <tr> 
      <td width="20%"  class="edit_td_txt">网站logo:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="logo" id="logo" class="input_text" size="40" value="{logo}" require="false" dataType="LimitB" min="0" max="255"  msg="[0,255]个字符之内">
		<input name="btn_upfile" type="button" value="上传图片" id="btn_upfile"> &nbsp;&nbsp;<span id="show_img_logo">{logo_img}</span>
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">网站介绍:</td>
      <td width="80%"  class="edit_td_input">
      	<textarea name="intro" class="input_textarea" rows="6" style="width:90%" require="false" dataType="LimitB" min="0" max="255"  msg="[0,255]个字符之内">{intro}</textarea>
      </td>
    </tr> 
    <tr> 
      <td width="20%"  class="edit_td_txt">email:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="email" class="input_text" size="40" value="{email}" require="false" dataType="Email" msg="信箱格式不正确">
      </td>
    </tr> 
    <tr style="display:{style_display}"> 
      <td width="20%"  class="edit_td_txt">申请人:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="text" name="username" id="username" class="input_text" value="{username}" onclick="openSelectWin('../mod_user/user_select.php')">
	      <input type="hidden" name="uid" id="uid" value="{uid}">
      </td>
    </tr> 
    <tr style="display:{style_display}"> 
      <td width="20%" class="edit_td_txt" >板块位置:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="radio" name="layout_type" id="layout_type_1" value="1" {layout_checked_1} onclick="showLayout(1)">所有&nbsp;
      	<input type="radio" name="layout_type" id="layout_type_2" value="2" {layout_checked_2} onclick="showLayout(2)">选择
      </td>
    </tr> 
    <tr id="edit_layout" style="display:{layout_display}"> 
      <td colspan="2">
      	<table cellpadding="0" cellspacing="0" border="0" width="100%">	
					<tr>
						<td width="20%"  class="edit_td_txt"></td>
						<td>
							<select size="3" multiple="multiple" name="layout_list[]" id="layout_id">{layout_list}</select>
						</td>
      			<td align="left">
      				<input type="button" name="btn_add" value="添加..." onclick="openSelectWin('../mod_template/template_layout_select.php?act=insert&type=2')">
      				<input type="button" name="btn_delete" value="删除所选项" onclick="referencebrowser_removeReference('layout_id',1)">
							<input type="button" name="btn_preview" value="预览所选项" onclick="referencebrowser_openBrowser('layout_id','../mod_template/template_view.php?layout_id=')">
							<input type="button" name="btn_selectAll" value="全选" onclick="referencebrowser_selectAllReference('layout_id',1)">
      			</td>     
					</tr>	
				</table>
      </td>
    </tr> 
    <tr style="display:{style_display}"> 
      <td width="20%"  class="edit_td_txt">频道分类:</td>
      <td width="80%"  class="edit_td_input">
      	<input type="radio" name="channel_type" id="channel_type_1" value="1" {channel_checked_1} onclick="showChannel(1)">所有&nbsp;
      	<input type="radio" name="channel_type" id="channel_type_2" value="2" {channel_checked_2} onclick="showChannel(2)">选择
      </td>
    </tr> 
	<tr id="edit_channel" style="display:{channel_display}"> 
        <td width="20%"  class="edit_td_txt"></td>
		<td width="80%"  class="edit_td_input">
		<input type="text" name="channel_id" id="channel_id" class="input_text" size="30" value="{channel_id}" require="false" dataType="LimitB" min="0" max="255"  msg="不能为空">
        <input type="button" class="btn_jqm" name="btn_select_channel_id" id="btn_select_channel_id" title="选择频道" value="选择..." onclick="openChannelSelect('channel_id','multiselect','all')" >
		</td> 
    </tr> 
    <tr style="display:{style_display}"> 
      <td width="20%" class="edit_td_txt">标 记:</td>
      <td width="80%"  class="edit_td_input">{flag}</td>
    </tr>
    <tr> 
    	<td colspan="2" width="100%">
    		<table cellpadding="0" cellspacing="0" width="100%" border="0">	
					<tr>
						<td width="20%" class="edit_td_txt">添加日期:</td>
      			<td width="20%" class="edit_td_input">
	      			{addtime}
      			</td>
						<td width="20%" class="edit_td_txt">IP:</td>
			      <td class="edit_td_input">
			      	{ip}
			      </td>		      
					</tr>	
				</table>
    	</td>
    </tr>
  </form>
</table>

<div id="modalWindow" class="jqmWindow">
<div id="jqmTitle">
<button class="jqmClose">X</button>
<span id="jqmTitleText">选择频道</span>
</div>
<iframe id="jqmContent" src=""></iframe>
</div>

</body>
</html>

