<?php 
require_once '../../Config.php';
if (intval ( BLL_Admin::isLogin () ) === 0) {
	header ( 'Location:../index.html' );
	die ();
}
$makeData = $theObj = BLL_Link::getOne ( intval ( $_GET ['theId'] ) );
$sortObj = BLL_LinkSort::getOne ( $theObj ['sort'],'id,pid,sortName' );
$findId = $sortObj ['id'];
?>
<!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=utf-8" />
<title>后台管理系统</title>
<link rel="stylesheet" type="text/css" href="../Css/RightFrm.css" />
<script type="text/javascript" src="../jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../Comm.js"></script>
<script type="text/javascript" src="ThisJs.js"></script>
</head>
<body>
<table  border="0" cellpadding="0" cellspacing="1" class="headTable">
  <tr>
    <th width="80%">修改信息(<?php echo $sortObj['sortName']; ?>)</th>
    <th width="20%" class="links"><a href="<?php COM_OftenFunction::getListPageUrl ( "LinkList$sortObj[id]", "Link_List.php?theId=$sortObj[id]" ); ?>">【返回】</a></th>
  </tr>
</table>
<form name="theForm" method="post" action="TheAction.php" onsubmit="return ckTheLinkForm(this);">
  <input type="hidden" name="action" value="editLink" />
  <input type="hidden" name="theId" value="<?php echo $theObj['id']; ?>" />
  <table border="0" cellpadding="0" cellspacing="1" class="formTable">
    <tr>
      <th width="10%">标题：</th>
      <td width="90%"><input type="text" name="title_txt" value="<?php echo $theObj['title']; ?>" size="40" /></td>
    </tr>
    <?php if(in_array($findId, array(1,2))){//首页超链?>
    <tr>
      <th width="10%">链接地址：</th>
      <td width="90%"><input type="text" name="addr_txt" value="<?php echo $theObj['addr']; ?>" size="40" /></td>
    </tr>
    <?php }?>
    <?php if(in_array($findId, array(3))){//首页超链(可判断哪些页面可添加链接地址输入框,1表示就只有首页添加)?>
    <tr>
      <th width="10%">服务理念：</th>
      <td width="90%"><input type="text" name="service_txt" style="width:50%" value="<?php echo $theObj['service']; ?>" size="40" /></td>
    </tr>
    <?php }?>
    <?php if(in_array($findId, array(1,2))){//首页超链(可判断哪些页面可添加链接地址输入框,1表示就只有首页添加)?>
    <tr>
      <th width="10%">图片：</th>
      <td width="90%">
        <input type="text" name="picture_txt" value="<?php echo $theObj['picture']; ?>" size="40" />        
        <input type="button" onclick="showUploadDialog('image','theForm.picture_txt')" value="图片上传" class="btn" />
        <?php if(in_array($findId, array(2))){//首页超链(可判断哪些页面可添加链接地址输入框,1表示就只有首页添加)?>
        <span>&nbsp;&nbsp;常规即左侧图片规格：551*410</span><span>&nbsp;&nbsp;个性即右侧图片规格：411*410</span>
         <?php }?>
       </td>
    </tr>
     <?php if(in_array($findId, array(1))){//首页超链(可判断哪些页面可添加链接地址输入框,1表示就只有首页添加)?>
    <tr>
      <th width="10%">理念1：</th>
      <td width="90%"><input type="text" name="lilian1_txt" value="<?php echo $theObj['lilian1']; ?>" size="40" /></td>
      
    </tr>
    <tr>
      <th width="10%">理念2：</th>
      <td width="90%"><input type="text" name="lilian2_txt" value="<?php echo $theObj['lilian2']; ?>" size="40" /></td>
      
    </tr>
    <tr>
      <th width="10%">理念3：</th>
      <td width="90%"><input type="text" name="lilian3_txt" value="<?php echo $theObj['lilian3']; ?>" size="40" /></td>
      
    </tr>
    <?php }?>
     <?php }?>
     <tr>
      <th>&nbsp;</th>
      <td>
        <input type="submit" value=" 提 交 " class='btn' />
        &nbsp;&nbsp;
        <input type="reset" value=" 重 填 " class='btn' />
      </td>
    </tr>
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
  </table>
</form>
<script type="text/javascript">$(function(){setTableColor('no');});</script>
</body>
</html>