<!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>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title>修改文章:<?php echo $row['title']?> - 会员中心 - <?php echo $cfg_webname; ?></title>
<link href="templets/style/base.css" rel="stylesheet" type="text/css" />
<link href="templets/style/article.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="templets/js/main.js"></script>
<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript" src="templets/js/checkSubmit.js"></script>
<script language="javascript">
<!--
function checkSubmit()
{

	if(document.addcontent.title.value=="" || document.addcontent.title.value=="请输入文章标题"){
		alert("文章标题不能为空！");
		document.addcontent.title.focus();
		return false;
	}
	if(document.addcontent.tags.value==""){
		alert("文章标签不能为空！");
		document.addcontent.tags.focus();
		return false;
	}

if(document.addcontent.typeid.value==0){
		alert("发布栏目必须选择！");
		return false;
	}

if(document.addcontent.typeid.options && document.addcontent.typeid.options[document.addcontent.typeid.selectedIndex].className!='option3')
{
	alert("发布栏目必须选择白色背景的栏目！");
	return false;
}

  	if(document.addcontent.description.value.length<=0)
    {
        alert("内容简介不能为空");
		document.addcontent.description.focus();
		return false;
    }
	if(document.addcontent.vdcode.value==""){
		document.addcontent.vdcode.focus();
		alert("验证码不能为空！");
		return false;
	}

}
-->
</script>
</head>
<body>
<?php include(DEDEMEMBER."/templets/head@@.htm"); ?>
<DIV class=content-box>
<DIV class=content-box-header>
<H3>修改文章</H3>
<DIV class=clear></DIV></DIV>
<DIV class=content-box-content>
    <div id="mcpmain">
      <form class="mTB10 mL10 mR10" name="addcontent" id="addcontent" action="fx_cy_edit.php" method="post" enctype="multipart/form-data" onsubmit="return checkSubmit();">
          <input type="hidden" name="dopost" value="save" />
          <input type="hidden" name="aid" value="<?php echo $row['id']; ?>" />
          <input type="hidden" name="idhash" value="<?php echo md5($row['id'].$cfg_cookie_encode); ?>" />
          <input type="hidden" name="channelid" value="<?php echo $row['channel']; ?>" />
          <input type="hidden" name="oldlitpic" value="<?php echo $row['litpic']; ?>" />
          <input type="hidden" name="sortrank" value="<?php echo $row['sortrank']; ?>" />
      <div id="mainCp">
        <div class="postForm">
          <p>
            <label>文章标题：</label>
            <input  name="title" type="text" id="title" value="<?php echo $row['title']?>" maxlength="100" class="intxt"/>
          </p>
          <p>
            <label>文章标签：</label>
            <input name="tags" type="text" id="tags"  value="<?php echo $row['keywords']; ?>" maxlength="100" class="intxt"/>多个关键词请用英文逗号分隔 
          </p>
          <p>
            <label>文章作者：</label>
            <input type="text" name="writer" id="writer" value="<?php echo $cfg_ml->M_UserName?>" maxlength="100" class="intxt" style="width:219px"/>
          </p>
          <p>
            <label>发布栏目：</label>
            <?php
    			$typeOptions = GetOptionList($row["typeid"],$row["channel"]);
   			    echo "<select name='typeid' size='1'>\r\n";
    			echo $typeOptions;
    			echo "</select>";
			?>
            <span style="color:#F00">*</span>(不能选择带颜色的分类)
          </p>
        
          <p>
            <label>内容简介：</label>
            <textarea name="description" id="description"><?php echo $row["description"]; ?></textarea>
            (内容的简要说明) </p>
          <p>
            <label>缩略图：</label>
            <input name="litpic" type="file" id="litpic" onchange="SeePicNew('divpicview',this);"  maxlength="100" class="intxt"/>
          </p>
          <?php if($row['litpic']!='')
          { 
          ?>
          <p>
            <label style="width: 85px;">原来的缩略图：</label>
            <img name="nlitpic"  id="nlitpic" src='<?php  echo $row['litpic'];  ?>' style="width: 200px; height:150px" />
          </p>
          <?php
          }
     	  //自定义字段
      	  	PrintAutoFieldsEdit($row['fieldset'],$addRow,'autofield');
      	  ?>
    </div>
        <!-- 表单操作区域 -->
        <h3 class="meTitle">详细内容</h3>
        <div class="contentShow postForm">
          <p>
            <?php GetEditor("body",$addRow['body'],350,"Member"); ?>
          </p>
      <?php
      	//游客强制加验证码，会员则判断后台开关
       	if(preg_match("/3/",$safe_gdopen)){
      ?>
          <p class="cellBg">
            <label>验证码：</label>
            <input name="vdcode" type="text" id="vdcode" maxlength="100" class="intxt" style='width:50px;text-transform:uppercase;' />
            <img src="../include/vdimgck.php" alt="看不清？点击更换" align="absmiddle" style="cursor:pointer" onclick="this.src=this.src+'?'" />
          </p>
      <?php }?>
      <p>
<INPUT id=btnSubmit2 class=button value=修&nbsp;&nbsp;改 type=submit>  
      </p>
        </div>
      </div>
      </form>
      <!--主操作区域 -->
    </div>
  </div>
<?php include(DEDEMEMBER."/templets/foot@@.htm"); ?>
</div>
</body>
</html>
