<!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 href="admin/admin/template/style/admin.css" rel="stylesheet" type="text/css" />
<script src="include/js/jquery.js" type="text/javascript"></script>
<script src="include/js/admin.js" type="text/javascript"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
</head>
<body>
<div class="maintop">当前位置：<?php echo $toptxt ?></div>
<div class="main">
  <?php if($a==''){ ?>
  <div class="info">
    <form action="?c=ld_online&run=1" method="post">
      <div id="infos1">
        <dl>
          <dt>开启前台客服：</dt>
          <dd>
            <select class="select" name="ifonserver" id="ifonserver">
              <option <?php if($d['ifonserver']=='1'){ echo  'selected=""';} ?>  value="1">开启</option>
              <option  <?php if($d['ifonserver']=='0'){ echo  'selected=""';} ?> value="0">关闭 </option>
            </select>
          </dd>
          <dd class="t"></dd>
        </dl>
        <dl>
          <dt>展开客服列表：</dt>
          <dd>
            <select class="select" name="boxopen" id="boxopen">
              <option <?php if($d['boxopen']=='open'){ echo  'selected=""';} ?> value="open">开启</option>
              <option <?php if($d['boxopen']=='close'){ echo  'selected=""';} ?>  value="close">关闭 </option>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>弹出邀请对话框：</dt>
          <dd>
            <select class="select" name="liveboxtip" id="liveboxtip">
              <option  <?php if($d['liveboxtip']=='1'){ echo  'selected=""';} ?> value="1">开启</option>
              <option <?php if($d['liveboxtip']=='0'){ echo  'selected=""';} ?> value="0">关闭 </option>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>联系地址：</dt>
          <dd>
            <input name="address" id="address" type="text" class="int" value="<?php echo $d['address'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>联系电话：</dt>
          <dd>
            <input name="tel" id="tel" type="text" class="int" value="<?php echo $d['tel'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>移动电话：</dt>
          <dd>
            <input name="mobile" id="mobile" type="text" class="int" value="<?php echo $d['mobile'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>传&nbsp;&nbsp;真：</dt>
          <dd>
            <input name="fax" id="fax" type="text" class="int" value="<?php echo $d['fax'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>Email：</dt>
          <dd>
            <input name="email" id="email" type="text" class="int" value="<?php echo $d['email'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>邮政编码：</dt>
          <dd>
            <input name="postcode" id="postcode" type="text" class="int" value="<?php echo $d['postcode'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>站长QQ：</dt>
          <dd>
            <input name="qq1" id="qq1" type="text" class="int" value="<?php echo $d['qq1'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售前QQ：</dt>
          <dd>
            <input name="qq2" id="qq2" type="text" class="int" value="<?php echo $d['qq2'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售后QQ：</dt>
          <dd>
            <input name="qq3" id="qq3" type="text" class="int" value="<?php echo $d['qq3'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售后QQ：</dt>
          <dd>
            <input name="qq4" id="qq4" type="text" class="int" value="<?php echo $d['qq4'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售后QQ：</dt>
          <dd>
            <input name="qq5" id="qq5" type="text" class="int" value="<?php echo $d['qq5'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售后QQ：</dt>
          <dd>
            <input name="qq6" id="qq6" type="text" class="int" value="<?php echo $d['qq6'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售前阿里旺旺：</dt>
          <dd>
            <input name="aliwangwang1" id="aliwangwang1" type="text" class="int" value="<?php echo $d['aliwangwang1'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>售后阿里旺旺：</dt>
          <dd>
            <input name="aliwangwang2" id="aliwangwang2" type="text" class="int" value="<?php echo $d['aliwangwang2'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>Skype：</dt>
          <dd>
            <input name="Skype" id="Skype" type="text" class="int" value="<?php echo $d['Skype'] ?>" style="width:300px;"/>
          </dd>
        </dl>
        <dl>
          <dt>MSN：</dt>
          <dd>
            <input name="msn" id="msn" type="text" class="int" value="<?php echo $d['msn'] ?>" style="width:300px;"/>
          </dd>
        </dl>
      </div>
      <dl>
        <dt>&nbsp;</dt>
        <dd>
          <input type="submit" value="提 交" class="btnbig" />
        </dd>
      </dl>
    </form>
  </div>
  <?php } ?>
</div>
</body>
<script type="text/javascript">

var marker=null;
var map=null;

  function showMap()
  {
 	 document.getElementById('showMapTable').style.display="";
  	 initialize($("#lat").val(),$("#long").val());
  }

  function setInfoWindows()
  {  
	 $("#show_companyname").text($("#company_name").val());
	 $("#show_qq").text($("#qq").val());
	 $("#show_email").text($("#email").val());
	 $("#show_address").text($("#address").val());
	
	 $("#show_linkuser").text($("#linkuser").val());
	 $("#show_tel").text($("#tel").val());
	 if($("#litpic").val()!=null)
	 {
	 	var str="<img src='"+$("#litpic").val()+"' width='100px' height='80px' />";
		$("#show_litpic").html(str);
	 }
	  var str=document.getElementById("Template1").innerHTML;
	  var infowindow = new google.maps.InfoWindow({
 	 	content: str,
		height:300
  		});
		  google.maps.event.addListener(marker, 'click', function() {
		  infowindow.open(map,marker);
	  	});
  		infowindow.open(map,marker);
  }
  function initialize(lat,long) {
		var zoom=$("#zoom").val();
		zoom=	parseInt(zoom);
	  var myOptions = {
	  zoom: zoom,
	  center: new google.maps.LatLng(lat,long),
	  mapTypeId: google.maps.MapTypeId.ROADMAP
	  };
	  map = new google.maps.Map(document.getElementById('myMap'),
	  myOptions);
		 var myLatlng = new google.maps.LatLng(lat,long);	
		  //alert(myLatlng);
		 placeMarker(myLatlng,map);
    setInfoWindows();
  }
 
  function placeMarker(position, map) {
	 
      marker = new google.maps.Marker({
      position: position,
      title: $("#company_name").val(),
      map: map,
      draggable: true
    });
      google.maps.event.addListener(marker, "dragend", function(latlng) {
     	  lat=latlng.latLng.Ya;
		  $("#lat").val(latlng.latLng.Ya);
		  $("#long").val(latlng.latLng.Za);
     });
    map.panTo(position);
  }
  $(function(){
  	initialize($("#lat").val(),$("#long").val());
  });
</script>
</html>
