<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<%@ Register TagPrefix="IlgharUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="IlgharUC" TagName="LanguageMenu" Src="../../language_menu.dwt.ascx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ilghar:Get ID="Position" Object="Position" InnerID="Request.QueryString['ID']" Validate="True" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑广告位</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<ilgharUC:Ime Ime="true" Eot="true" runat="server" />
<script type="text/javascript">
var _page = "position_edit";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _id = "<%=Request.QueryString["ID"]%>";
var _adminPath = "<%=AdminPath%>";
var _sketchMapRoot = "<%=Manager.GetDataPath((Guid)Channel[IlgharCMS.SystemModule.Alias.Instance.ID], null) + "position/sketch_map"%>";
var _imageRoot = "<%=Manager.GetDataPath((Guid)Channel[IlgharCMS.SystemModule.Alias.Instance.ID], null) + "position/image"%>";
var _uploadSketchMap;
var _uploadImage;
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_name_empty = "名称不能空！";
var _lang_width_incorrect = "宽度格式不正确！";
var _lang_height_incorrect = "高度格式不正确！";
var _lang_select_type = "请选择类型！";
var _lang_price_incorrect = "价格格式不正确！";
var _lang_duration_incorrect = "期限格式不正确！";
var _lang_click_price_incorrect = "点击价格格式不正确！";
var _lang_image_type_must_be = "默认图片类型应为：";
var _lang_start_upload_image = "开始上传默认图片...";
var _lang_uploading_image = "正在上传默认图片...";
var _lang_sketch_map_type_must_be = "示意图类型应为：";
var _lang_start_upload_sketch_map = "开始上传示意图...";
var _lang_uploading_sketch_map = "正在上传示意图...";
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title"><a href="list.aspx?Lang=<%=ContentLang%>">广告位列表</a> → <span class="<%=ContentLang%>Font"><%=Position[Name]%></span></div>
	<div class="Right">
		<ilgharUC:LanguageMenu runat="server" />
		<img height="15" src="<%=ImagePath%>dropdown.gif" /> 语言：<%=CurrentLanguage%>
	</div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left Selected"></li>
		<li class="Middle Selected">编辑</li>
		<li class="Right Selected"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../ad/list.aspx?Lang=<%=ContentLang%>&amp;PositionID=<%=Request.QueryString["ID"]%>">广告列表</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../ad/add.aspx?Lang=<%=ContentLang%>&amp;PositionID=<%=Request.QueryString["ID"]%>">添加广告</a></li>
		<li class="Right"></li>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<form>
		<table border="0" cellpadding="4" cellspacing="1">
			<tfoot>
				<tr><td colspan="2"><input type="submit" value="编辑" /></td></tr>
			</tfoot>
			<tbody>
				<tr>
					<th width="140">名称：</th>
					<td>
						<input type="text" name="Name" value="<%=Position[Name]%>" size="40" maxlength="50" class="Text <%=ContentLang%>Font" />
						<input type="checkbox" id="GuidCheckBox" /><label for="GuidCheckBox">Guid：</label><input type="text" name="ID" value="<%=Position[ID]%>" size="40" maxlength="40" disabled="disabled" class="Disabled" />
					</td>
				</tr>
				<tr>
					<th>类型：</th>
					<td>
						<select name="TypeID" class="<%=ContentLang%>Font">
							<ilghar:List Object="Type">
								<ilghar:Record>
									<%If Guid.Equals(ID, Position[TypeID])%>
										<option value="<%=ID%>" selected="selected"><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Name%></option>
									<%EndIf%>
								</ilghar:Record>
							</ilghar:List>
						</select>
					</td>
				</tr>
				<tr>
					<th>尺寸（宽x高）：</th>
					<td>
						<input type="text" name="Width" value="<%=Position[Width]%>" size="10" maxlength="10" class="Text" /> x
						<input type="text" name="Height" value="<%=Position[Height]%>" size="10" maxlength="10" class="Text" />
					</td>
				</tr>
				<tr>
					<th>示意图：</th>
					<td>
						<input id="SketchMapTextbox" type="text" name="SketchMap" value="<%=Position[SketchMap]%>" size="55" class="Text" />
						<input id="SketchMapBrowse" type="button" value="浏览..." />
						<input type="hidden" name="SketchMapAllowedType" value="gif|jpg|jpeg|png|bmp" />
						<a href="<%=Position[SketchMap]%>" target="_blank"><img src="<%=Position[SketchMap]%>" height="22" id="SketchMapView" alt="示意图" style="vertical-align:bottom" /></a>
					</td>
				</tr>
				<tr>
					<th>默认标题：</th>
					<td><input type="text" name="Title" value="<%=Position[Title]%>" size="50" maxlength="255" class="Text <%=ContentLang%>Font" /></td>
				</tr>
				<tr>
					<th>默认图片：</th>
					<td>
						<input id="ImageTextbox" type="text" name="Image" value="<%=Position[Image]%>" size="55" class="Text" />
						<input id="ImageBrowse" type="button" value="浏览..." />
						<input type="hidden" name="ImageAllowedType" value="gif|jpg|png|swf|flv|rm|rmvb|wmv|mpg" />
						<a href="<%=Position[Image]%>" target="_blank"><img src="<%=Position[Image]%>" height="22" id="ImageView" alt="默认图片" style="vertical-align:bottom" /></a>
						<input type="checkbox" id="AddWaterMark" /><label for="AddWaterMark">水印</label>
					</td>
				</tr>
				<tr>
					<th>默认链接：</th>
					<td><input type="text" name="URL" value="<%=Position[URL]%>" size="50" maxlength="255" class="Text" /></td>
				</tr>
				<tr>
					<th>默认代码：</th>
					<td>
						<button type="button" id="Escape">Escape</button>
						<button type="button" id="UnEscape">UnEscape</button>
						<br />
						<textarea name="Code" cols="70" rows="6" wrap="off" class="Text"><%=Position[Code]%></textarea>
					</td>
				</tr>
				<tr>
					<th>价格：</th>
					<td>
						按时长计费：<input type="text" name="Price" value="<%=Position[Price]%>" size="5" maxlength="10" class="Text" />元/<input type="text" name="Duration" value="<%=Position[Duration]%>" size="5" maxlength="10" class="Text" />天
						按点击计费：<input type="text" name="ClickPrice" value="<%=Position[ClickPrice]%>" size="5" maxlength="10" class="Text" />元/次
					</td>
				</tr>
				<tr>
					<th>描述：</th>
					<td>
						<textarea name="Description" cols="70" rows="6" wrap="off" class="Text <%=ContentLang%>Font"><%=Position[Description]%></textarea>
					</td>
				</tr>
				<tr>
					<th>是否空缺：</th>
					<td>
						<%If Convert.ToBoolean(Position[IsAvailable])%>
							<input type="radio" name="IsAvailable" id="IsAvailableYes" checked="checked" /><label for="IsAvailableYes">是</label>
							<input type="radio" name="IsAvailable" id="IsAvailableNo" /><label for="IsAvailableNo">否</label>
						<%Else%>
							<input type="radio" name="IsAvailable" id="IsAvailableYes" /><label for="IsAvailableYes">是</label>
							<input type="radio" name="IsAvailable" id="IsAvailableNo" checked="checked" /><label for="IsAvailableNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>插入代码：</th>
					<td>&lt;ilghar:Ad Guid=&quot;{<%=Convert.ToString(Position[ID]).ToUpper()%>}&quot;&gt;&lt;/ilghar:Ad&gt;</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>uploader.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=JsPath%>ad.js"></script>
</body>
</html>