<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
  <tr>
    <td width="3%" align="left" ><img src="{tpl_path}images/forward.jpg" /></td>
    <td width="97%" align="left" >您现在的位置：<a href="<?php echo site_url(CTL_FOLDER."ads");?>">广告列表</a> &gt; 广告修改</td>
  </tr>
</table>
<fieldset>
<legend>广告修改</legend>
<form action="<?php echo site_url(CTL_FOLDER."ads/save_record");?>" method="post" enctype="multipart/form-data" name="dialog_edit_form" id="dialog_edit_form">
  <table width="100%"  border="0" cellpadding="3" cellspacing="0" >
    <tr>
      <td width="135"><font color="#FF0000">*</font>广告图片标题：</td>
      <td width="578"><input Name="title" type="text" Id="title" size="30" value="<?php echo $edit_data['title'];?>" dataType="Require" msg="该项必须填写">      </td>
    </tr>
    <tr>
      <td width="135"><font color="#FF0000">*</font>广告尺寸(像素)：</td>
      <td width="578">宽
        <input name="width" type="text" size="5"  value="<?php echo $edit_data['width'];?>" dataType="Integer" msg="宽度必须是数字">
        x 高
        <input name="height" type="text" size="5"  value="<?php echo $edit_data['height'];?>" dataType="Integer" msg="高度必须是数字">      </td>
    </tr>
    <tr>
      <td width="135">推广链接：</td>
      <td width="578"><input Name="hplink" type="text" Id="hplink" size="50"  value="<?php echo $edit_data['hplink'];?>"> <input type="button" name="sf7btn" class="button-style2" onclick="get_tb_dialog('hplink')" value="获取推广链接" style="width:100px" /></td>
    </tr>
    <tr>
      <td>上传文件：</td>
      <td><?php 
		  if($edit_data['is_pic']==1)
		  {
		  ?>
        <img src="{root_path}images/loading.gif" rel="<?php echo get_real_path($edit_data['file_path']);?>" border="0" class="jq_pic_loading_150" /><br />
        <?php 
		}
		?>
        <input type="text" value="<?php echo $edit_data['file_path'];?>" name="pic_path" id="pic_path" size="25" /> <input name="pic" type="file" id="pic" size="20" dataType="Filter" accept="jpg,png,gif,swf" require="false" msg="文件格式必须是：jpg|png|gif|swf" title="上传的文件格式必须是：jpg|png|gif|swf,且单个文件不能超过 <?php echo ini_get("upload_max_filesize");?>"> <input type="button" name="sfbtn" class="button-style2" onclick="GetFileDialog('pic_path')" value="选择文件" />      </td>
    </tr>
  </table>
  <input name="rd_id" type="hidden" value="<?php echo $edit_data['id'];?>" />
  <input type="button" name="sbmit" style=" margin-left:160px; margin-bottom:10px; margin-top:10px" onclick="subForm(this.form,this)" value="修改" class="button-style2" /> <input type="hidden" name="is_pic" value="1" />
</form>
</fieldset>
<script language="javascript">
$(function(){
	$(".jq_pic_loading_150").each(function(){
		LoadImage($(this),$(this).attr("rel"),150);
	});
});
</script>
<?php $this->load->view(TPL_FOLDER."footer");?>