<?php $header	=	new View("header"); $header->title='编辑服务请求'; $header->render(TRUE);?>

<div id="banner"><img src="<?=BASEURL?>public/www/images/downBanner.jpg" alt="成都灵通科技发展有限公司" title="成都灵通科技发展有限公司" /></div>
<div class="mainCnt">
  <div class="pageL">
    <h1>会员中心</h1>
    <?php $header	=	new View("member/leftmenu"); $header->render(TRUE);?>
  </div>
  <div class="pageR">
    <h1><a href="index.html">首页</a>&nbsp;&gt;&gt;&nbsp;会员中心&nbsp;&gt;&gt;&nbsp;<span>编辑服务请求</span></h1>
    <div class="pageRCnt">
      <SCRIPT language=javascript>
	function mychang(url,id)
{	
	var xmlhttp;
	var xmldom;
	if(window.ActiveXObject)
	{
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}else if(window.XMLHttpRequest){
	xmlhttp=new XMLHttpRequest();
	}else{
	
	}
	
	xmlhttp.open("get",url+id,true);
	xmlhttp.onreadystatechange=myrequest;
	xmlhttp.send(null);
	function myrequest(){
		if(xmlhttp.readyState==4)
		{
			if(xmlhttp.status==200)
			{
				xmldom=xmlhttp.responseText;
	
				if(xmldom!="")
				{
				
					getoperatin(xmldom);
				}
			}else{
				
			}
		}
	}
}

function getoperatin(xmldom){
	var operatinArray = xmldom.split("|");
	var newarr;	
	var slt=document.getElementById("cus");
		slt.options.length=0 
	for (i=0;i<operatinArray.length-1;i++){
		newarr=operatinArray[i].split(","); 
		if(newarr.constructor == Array ){
		var objOption=document.createElement("OPTION");
			objOption.value=newarr[0];
			objOption.text=newarr[1];
			slt.add(objOption);
		}
	}
}
</SCRIPT>
      <form action="<?=BASEURI?>member/editserver" name="editserver" method="post">
        <table width="100%" border="0"  class="adminform">
          <tr>
            <th align="left">分类</th>
          </tr>
          <tr>
            <td align="left"><select name="form[type]">
                <?php foreach($operation as $operation){?>
                <option value="<?=$operation['sort_id']?>" <?php if($content->type==$operation['sort_id']){ echo "selected";}?>>
                <?=$operation['sort_name']?>
                </option>
                <?php }?>
              </select></td>
          </tr>
          <tr>
            <th align="left">业务员</th>
          </tr>
          <tr>
            <td align="left"><select name="form[salesmanid]"  onchange="mychang('<?=BASEURI?>operation/ajax/',this.value)">
            	<?php if($content->id){?>
                <option value="<?=$content->id?>"><?=$content->name?></option>
                <?php }else{?>
                <option value="">未分配</option>
                <?php }?>
              </select>
              <input type="hidden" name="form[customer]" value="<?=$_SESSION['user']->user_id?>" />
              </td>
          </tr>
          <tr>
            <th align="left">备注</th>
          </tr>
          <tr>
            <td align="left"><textarea name="form[control]" cols="30" rows="6"><?=$content->control?>
</textarea></td>
          </tr>
          <tr>
            <td align="left"><input type="hidden" name="form[oid]"  value="<?=$content->oid?>"/>
              <input type="submit" class="submit"  value="保存"/></td>
          </tr>
        </table>
      </form>
    </div>
  </div>
</div>
<?php $header	=	new View("footer"); $header->render(TRUE);?>
