<!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" />
<?php 	require_once('_approot.php');	
	$tips=new mytips();
	$tips->table="ls_config"; 

$title=$_GET['title'];
$disp=trim($_GET['disp']);
$text=$tips->gettips($title); // 26字一行
$lines=ceil(strlen($text)/26)+2;
$isw=$tipsWr;

if($_POST['submit']=="保存"){
	$tips->puttips($title,$_POST['thistext']); 
	//echo $_POST['submit'].$title.$_POST['thistext'];exit;
	echo "<script language=\"javascript\">window.opener=null;window.close();</script>";
}

?>

<title>修改<?=$title?>提示</title>
	<link rel="stylesheet" href="kindeditor-4.1.10/themes/default/default.css" />
	<link rel="stylesheet" href="kindeditor-4.1.10/plugins/code/prettify.css" />
	<script charset="utf-8" src="kindeditor-4.1.10/kindeditor.js"></script>
	<script charset="utf-8" src="kindeditor-4.1.10/lang/zh_CN.js"></script>
	<script charset="utf-8" src="kindeditor-4.1.10/plugins/code/prettify.js"></script>
	<script>
		var editor12;

		
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="thistext"]', {
				cssPath : 'kindeditor-4.1.10/plugins/code/prettify.css',
				uploadJson : 'kindeditor-4.1.10/php/upload_json.php',
				fileManagerJson : 'kindeditor-4.1.10/php/file_manager_json.php',
				allowFileManager : true,
				afterBlur: function(){
					this.sync();
					if($('#newsTitle').val().length <= 0){
						$('#newsTitle').val('<?=$companyName?>');
						$('#newsKeywords').val('<?=$siteKeywords?>');
						var newsDescription = '<?=str_replace('\\r','',$select_rows['siteDescription']);?>';
						$('#newsDescription').val(newsDescription.substr(0, 267).replace(/<[^>]+>/g,'').replace(/	/g, '').replace(/\n/g, ''));
					}
				},
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>

<body>
<script> window.resizeTo(document.body.clientWidth, <?=$lines*(14+4)?>) 	</script>
<form  action="tipswr.php?title=<?=$title?>" method="post" enctype="multipart/form-data" name="fmconfig" id="fmconfig">
  <table width="92%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="right">&nbsp;</td>
      <td><?=$disp==""?$title:$disp?>     ：<br/><br/></td>
    </tr>
    <tr>
      <td width="6%" align="right">&nbsp;</td>
      <td width="94%">
      <?php if($isw){?>
      <textarea name="thistext" cols="28"  class="inputareashort"  id="thistext" style="height:55px;" ><?=$text?></textarea>
      <?php }else{ ?>
      <?=$text?>
      <?php }  ?>
       </td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td align="center"><font color="#FF0000"><br/><a name="interlink" id="interlink"></a></font>
      <button type="<?=$isw?"submit":"button"?>"  value="<?=$isw?"保存":"关闭"?>" onclick="<?=$isw?"":"window.opener=null;window.open('','_self');window.close();"?>" class="submitbuttonsf4" name="submit"><?=$isw?"保存":"关闭"?> </button><?=$isw?" <button type='button' onclick=\"window.opener=null;window.open('','_self');window.close();\">关闭</button>":""?> </td>
    </tr>
  </table>
  <div class="lsconeditorarea2" align=""></div>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
