<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.user_user_classad_edit" %>
<%On Error Resume Next%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/style.css" rel="stylesheet" type="text/css" />
<title>发布招聘职位</title>
</head>
<script type="Text/JavaScript" LANGUAGE="JavaScript">
<!--//
function TableMouseClick(Url){
	window.location=Url;
}
function check()
{   
    if (document.form.dtitle.value.length<1)
	{
        alert("请填写信息标题！");
        document.form.dtitle.focus();
        return false;
    }
    if (document.form.dlei.value=="选择信息类别")
	{
        alert("请选择信息类别！");
        document.form.dlei.focus();
        return false;
    }
    if (document.form.dtext.value.length<1)
	{
        alert("请您填写信息内容！");
        document.form.dtext.focus();
        return false;
    }
    if (document.form.dtext.value.length>1500)
	{
        alert("请把信息内容的字数控制在1500以内！");
        document.form.dtext.focus();
        return false;
    }
	if (document.form.dusername.value.length == 0) {
		alert("请您填写联系人姓名！");
		document.form.dusername.focus();
		return false;
	}
	var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^ & *()_+|?><:";
	var errorChar
	errorChar = isCharsInBag(form.dusername.value,str)
	if (errorChar != "" )
	{
		alert('联系人姓名必须是中文！');
		form.dusername.focus();
		return false;
	} 
function isCharsInBag (s, bag)
{ 
var i,c;
for (i = 0; i < s.length; i++)
{ 
c = s.charAt(i);//字符串s中的字符
if (bag.indexOf(c) > -1) 
return c;
}
return "";
}
	
	    if(document.form.dusername.value.length<2||document.form.dusername.value.length>4){
		alert("联系人姓名不能少于2字多于4字！");
		document.form.dusername.focus();
		return false;
	}	

    if (document.form.dtel.value.length<1)
	{
        alert("请填写您的联系电话！");
        document.form.dtel.focus();
        return false;
    }

       var dtel=document.form.dtel.value;
       for (var i=0;i<dtel.length;i++){
              var c=dtel.charAt(i);
              if (c<"0" || c>"9") break;
       }
       if (i<7){
              alert("电话号码必须是7位以上的数字！");
			  document.form.dtel.focus();
              return false;
       }
	   
    if (document.form.dstop.value=="选择有效期")
	{
        alert("请选择有效期！");
        document.form.dstop.focus();
        return false;
    }
}
//-->
</script>
<script type="Text/JavaScript" LANGUAGE="JavaScript">      
<!-- Begin
maxLen = 1500;
function checkMaxInput(form) {
if (form.dtext.value.length > maxLen)
form.remLen.value = 0;
else form.remLen.value = maxLen - form.dtext.value.length;
}
//  End -->
</script>

<script language="javascript" type="text/javascript">
<!--
function changeColor(o) {
    document.getElementById("colorBox").style.color = o.value;
}
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
function changeColor1(o) {
    document.getElementById("colorBox1").style.background = o.value;
}
//-->
</script>
</head>
<body onload="checkMaxInput(document.form);">
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table style="width:600" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td style="width:100"><div align="center"><a href="User_classad_list.aspx"><img src="images/classad_02.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center"><a href="User_classad_add.aspx"><img src="images/classad_01.gif" width="50" height="48" border="0" /></a></div></td>
        <td style="width:100"><div align="center">
          <div align="center"><a href="user_info_list.aspx"><img height="48" src="images/j_resume_modify.gif" width="50" border="0" /></a></div>
          <a href="User_work_search.aspx"></a></div></td>
        <td style="width:100"><div align="center">
          <div align="center"><a href="user_info_add.aspx"><img height="48" src="images/j_position_supply.gif" width="50" border="0" /></a></div>
          <a href="User_work_favorite.aspx"></a></div></td>
        <td style="width:100"><div align="center">
          <div align="center"><a href="User_products_list.aspx"><img height="48" src="images/photo_all.gif" width="50" border="0" /></a></div>
          <a href="User_work_person.aspx"></a></div></td>
        <td style="width:100"><div align="center">
          <div align="center"><a href="User_products_add.aspx"><img height="48" src="images/photo_add.gif" width="50" border="0" /></a></div>
          <a href="User_work_search.aspx"></a></div></td>
      </tr>
      <tr>
        <td style="width:100"><div align="center"><strong>我的分类信息</strong></div></td>
        <td style="width:100"><div align="center"><strong>添加分类信息</strong></div></td>
        <td style="width:100"><div align="center"><strong>我的商机</strong><strong></strong></div></td>
        <td style="width:100"><div align="center"><strong>添加商机</strong></div></td>
        <td style="width:100"><div align="center"><strong>我的产品</strong></div></td>
        <td style="width:100"><div align="center"><strong>添加产品</strong></div></td>
      </tr>
    </table></td>
  </tr>
</table>
<table style="width:100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table style="width:100%; height:24" cellspacing="0" cellpadding="0"  border="0">
  <tr>
    <td style="background-color:#FFF1EB; height:24; width:142" align="center" valign="bottom" class="TDBG1"><strong><span #invalid_attr_id="none"><strong>修改分类信息</strong></span></strong></td>
    <td class="bottom"><div align="right">发布分类信息： 带 <span class="00002">*</span> 号的为必填项！ </div></td>
  </tr>
</table>
<table style="width:100%"  border="0" cellpadding="0" cellspacing="0" class="topnone">
  <tr>
    <td style="background-color:#FFFFFF"><table style="width:100%; height:50" bordercolor="#FFF1EB" cellspacing="0" cellpadding="4" align="center" border="6">
      <tr><form method="POST" action="" onsubmit="return check();" name="form">
        <td style="height:50" valign="middle" bordercolor="#EDD6CA" class="0008"><table style="width:100%" border="0" cellpadding="1" cellspacing="1">
          <tr style="background-color:#FFFFFF">
            <td style="height:26; width:27%" align="right">信息标题：</td>
            <td style="height:26" colspan="2"><input type="text" name="dtitle" size="20" maxlength="15" value="<%=rs("title").Value%>" />
                <font color="#FF0000">*<%=rs("ip").Value%></font></td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">是否加粗：</td>
            <td style="height:26" colspan="2"><input type="radio" value="no" <%If (rs("cu").Value="no") Then%>checked<%End If%> name="dcu" />
      否&nbsp;
      <input type="radio" value="yes" name="dcu" <%If (rs("cu").Value="yes") Then%>checked<%End If%> />
      是</td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td align="right">标题颜色：</td>
            <td style="height:26; width:160"><input name="dcolor" type="text" id="dcolor" onchange="changeColor(this);" value="<%=rs("color").Value%>" size="8" />
                <input type="button" name="Submit" value="选择颜色" onclick="window.open('colorpicker.html', 'colorPicker', 'width=200, height=160');" />
            </td>
            <td rowspan="2"><div align="center">
                <table style="background-color:#cae2f8; height:24; width:182" border="0" cellpadding="0" cellspacing="1">
                  <tr>
                    <td style="" align="center" <%If (rs("bgcolor1").Value<>"") Then%>bgcolor="<%=rs("bgcolor1").Value%>"<%Else%>bgcolor="#EFF7FE"<%End If%>>
                      <table style="height:5; width:166" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td></td>
                        </tr>
                      </table>
                      <font style="font-size:14px" color="<%If (rs("color").Value<>"") Then%><%=rs("color").Value%><%Else%>#000000<%End If%>"><b>原来的标题和背景颜色</b></font></td>
                  </tr>
                </table>
                <table style="height:2; width:166" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td></td>
                  </tr>
                </table>
                <table style="background-color:#CAE2F8; height:24; width:182" border="0" cellpadding="0" cellspacing="1">
                  <tr>
                    <td style="" align="center" <%If (rs("bgcolor1").Value<>"") Then%>bgcolor="<%=rs("bgcolor1").Value%>"<%Else%>bgcolor="#EFF7FE"<%End If%>><div id="colorBox1" style="width: 180px;height: 24px">
                        <table style="height:5; width:166" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td></td>
                          </tr>
                        </table>
                        <font style="font-size:14px" color="<%If (rs("color").Value<>"") Then%><%=rs("color").Value%><%Else%>#000000<%End If%>">
                        <div id="colorBox"><b>修改后标题和背景颜色</b></div>
                    </font> </div></td>
                  </tr>
                </table>
            </div></td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td align="right">标题背景：</td>
            <td style="height:26"><input name="dbgcolor1" type="text" id="dbgcolor1" onchange="changeColor1(this);" value="<%=rs("bgcolor1").Value%>" size="8" />
                <input type="button" name="Submit" value="选择颜色" onclick="window.open('colorpicker1.html', 'colorPicker', 'width=200, height=160');" />
            </td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">信息类别：</td>
            <td style="height:26" colspan="2">
              <select name="dlei" size="1"><%=GetAdClassTypeOptions() %></select>
            </td>
            <script type="text/javascript">document.all.dlei.value='<%=Rs("type").Value%>';</script>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">信息形式：</td>
            <td style="height:26" colspan="2"><input type="radio" value="no" name="dispic" <%If (rs("ispic").Value="no") Then%>checked<%End If%> />
      文字信息&nbsp;
      <input type="radio" value="yes" name="dispic" <%If (rs("ispic").Value="yes") Then%>checked<%End If%> />
      图片信息</td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">图片路径：</td>
            <td style="height:26" colspan="2">
              <script type="Text/JavaScript" language="Javascript">
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=no,menubar=no,frameborder=0,status=yes' );
}
function openem()
{ 
openScript('../upad.htm',300,60); 
}
        </script>
              <input type="text" name="dpic" size="30" value="<%=rs("pic").Value%>" />
              <input type="button" name="Submit2" value="上传图片" onclick="window.open('../Include/load.aspx?formname=form&editname=dpic&uppath=../upload/classad/&imagename=&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" />
              <font color="#FF0000">支持gif、jpg格式</font></td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right" valign="top">信息内容：</td>
            <td colspan="2"><textarea rows="6" name="dtext" cols="50" onkeydown="checkMaxInput(this.form)" onkeyup="checkMaxInput(this.form)"><%=rs("text").Value%></textarea>
                <font color="#FF0000">*&nbsp;</font> <font color="#FF0000"><br>
      目前还可写
      <input readonly type="text" name="remLen" size="4" maxlength="4" style="border: 1 solid #888888" />
      个字！</font> </td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">联系人：</td>
            <td style="height:26" colspan="2"><input name="dusername" type="text" id="dusername" value="<%=rs("username").Value%>" size="20" maxlength="20" />
                <font color="#FF0000">* </font></td>
          </tr>
          <tr style="background-color:#FFFFFF" <%If Not AppConst.ValidateCardId Then%>style="display:none"<%End If%>>
            <td style="height:26" align="right">身份证号：</td>
            <td style="height:26" colspan="2"><input name="dcardid" type="text" id="dcardid" value="<%=rs("cardid").Value%>" size="20" maxlength="18" />
                <font color="#FF0000">* </font></td>
          </tr>
          <tr style="background-color:#FFFFFF">
            <td style="height:26" align="right">联系电话：</td>
            <td style="height:26" colspan="2"><input name="dtel" type="text" id="dtel" value="<%=rs("tel").Value%>" size="20" maxlength="20" />
                <font color="#FF0000">* </font></td>
          </tr><tr style="background-color:#FFFFFF">
               <td align="right">有效期至：</td>
               <td><select size="1" name="dstop">
                 <option value="7">一星期</option>
                 <option value="15">半个月</option>
                 <option value="31">一个月</option>
                 <option value="61">两个月</option>
                 <option value="92">三个月</option>
                 <option value="183">半年</option>
                 <option value="365">一年</option>
                 <option value="3650">长期</option>
             </select>
             <script type="text/javascript">document.all.dstop.value="<%=DateDiff("d", rs("time").Value, rs("stop").Value)%>";</script>
          </td>
          </tr><tr style="background-color:#FFFFFF">
            <td style="height:30" align="right"> </td>
            <td style="height:30" colspan="2" align="right">
              <p align="left">
                <input type="submit" value="修改" name="submit" />
				<input type="hidden" name="send" value="add" />
				  <input name="id" type="hidden" id="page" value="<%=id%>" />
&nbsp;
        <input type="reset" value="取消" name="reset" />
&nbsp;
        <input type="button" value="返回" name="back" onclick="javascript:history.back()" />
                  </td>
          </tr>
        </table></td>
      </form></tr>
    </table></td>
  </tr>
</table>
</body>
<%Page_Loaded()%>
</html>
