⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editor.php

📁 邮箱加即时聊天
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<? ob_start();?>
<? include "function.php";
   include realpath("Sysconf.php");//连接数据库
?>


<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
form {  margin-top: 0px; margin-right: 1px; margin-bottom: 0px; margin-left: 1px; font-family: "宋体", "黑体", "仿宋_GB2312", "System", "Fixedsys"; font-size: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px}
div {  font-family: "宋体", "幼圆", "黑体", "仿宋_GB2312", "System", "Fixedsys"; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px}
h6 {  font-size: 9pt; font-weight: bolder; font-style: normal; text-decoration: blink; line-height: normal}
h5 {  font-size: 14px; font-weight: bolder; line-height: normal}
h4 {  font-size: 15px; font-weight: bolder; line-height: normal}
h3 {  font-size: 16px; font-weight: bolder; line-height: normal}
h2 {  font-size: 18px; font-weight: bolder; letter-spacing: -1px; line-height: normal}
h1 {  font-size: 20px; font-weight: bolder; letter-spacing: -1px}
pre {  font-size: 9pt; color: #999999; line-height: normal; font-family: "宋体", "幼圆", "黑体", 
"仿宋_GB2312", "System", "Fixedsys"}
body, td, p, li, input, select{
	font-family: "宋体", "黑体", "仿宋_GB2312", "System", "Fixedsys";
	color: #000044;
	font-size: 12px;
	margin-top: 1px;
	margin-right: 1px;
	margin-bottom: 1px;
	margin-left: 1px;
	list-style-type: square;
	line-height: 130%;

}
body {background-color: #fafaff}
.font_大字显示全高 {line-height: 130%}
.TABLE_真1边框 {BORDER-COLLAPSE: collapse;LETTER-SPACING: 2px }
</style>
</head>

<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->

</script>



<body onLoad="FP_preloadImgs(/*url*/'images/buttonE.jpg', /*url*/'images/buttonF.jpg', /*url*/'images/button14.jpg', /*url*/'images/button15.jpg', /*url*/'images/buttonE1.jpg', /*url*/'images/buttonF1.jpg', /*url*/'images/button8.jpg', /*url*/'images/button9.jpg')">
<form name="myform" action="editor.php" method="post" enctype="multipart/form-data" onSubmit="checkForm()">
<hr>
     <table width=100%>
	<tr>
	  <td align=right width=7% height="32">
		<img border="0" id="img5" src="moren/buttonD1.jpg" height="20" width="100" alt="收信人" onMouseOver="FP_swapImg(1,0,/*id*/'img5',/*url*/'moren/buttonE1.jpg')" onMouseOut="FP_swapImg(0,0,/*id*/'img5',/*url*/'moren/buttonD1.jpg')" onMouseDown="FP_swapImg(1,0,/*id*/'img5',/*url*/'moren/buttonF1.jpg')" onMouseUp="FP_swapImg(0,0,/*id*/'img5',/*url*/'moren/buttonE1.jpg')" fp-style="fp-btn: Embossed Capsule 1; fp-font" fp-title="收信人"></td>
	  <td width="50%" height="32"><input type=text size=80 id=rec name=rec maxlength="80" value=
				<?
					$message_id=$_GET["messageid"];
					$sql="select * from message where message_id=$message_id";
					$res=mysql_query($sql);
					
					if($message_id == true){
						
						$receiver_id=mysql_result($res,0,'receiver_id');
						$receiver_name=getusername($receiver_id);
						
						echo $receiver_name;
					}
				?>
		></td>
	  <td align=left height="32">
		<select name=fd onChange="showName(this);this[0].selected = true">
		       <option value=0 selected="selected">好友列表
		<?
			$username=$_COOKIE["username"];
			
			$sql="select distinct contact_id 
				  from contact_man c,user_base_information u
				  where u.user_id=c.local_id and u.user_name='$username';";
			$resultA=mysql_query($sql);
			$a=mysql_num_rows($resultA);
			if($a==0)
				echo "<option >你没有好友!";
			else
			for($num=0;$num<$a;$num++){
				$user_id=mysql_result($resultA,$num,'contact_id');
				
				$sql="select * from user_base_information where user_id='$user_id'";
				$result=mysql_query($sql);
				
				$username =mysql_result($result,0,'user_name');
				 
				$user_id=mysql_result($result,0,'user_id');
				
				$value="<option value=".($username).">";
				echo $value.$username;
				}
		?></option>
				
		</select>
	  </td><td><textarea  name="content"  style="display:none"></textarea></td>
	</tr>
	<tr>
	  <td align=right>
		<img border="0" id="img2" src="moren/buttonD.jpg" height="20" width="100" alt="主    题" fp-style="fp-btn: Embossed Capsule 1; fp-font" fp-title="主    题" onMouseOver="FP_swapImg(1,0,/*id*/'img2',/*url*/'moren/buttonE.jpg')" onMouseOut="FP_swapImg(0,0,/*id*/'img2',/*url*/'moren/buttonD.jpg')" onMouseDown="FP_swapImg(1,0,/*id*/'img2',/*url*/'moren/buttonF.jpg')" onMouseUp="FP_swapImg(0,0,/*id*/'img2',/*url*/'moren/buttonE.jpg')"></td><td>
		<input type=text size=80 name="subject" maxlength=80 value = 
				<?
					if($message_id!=""){
						$subject=mysql_result($res,0,'subject');
						echo $subject;
					}
				?>
			></td>
	</tr>
	<tr>
	  <td> <img border="0" id="img3" src="moren/button7.jpg" height="20" width="100" alt="附    件" fp-style="fp-btn: Embossed Capsule 1; fp-font" fp-title="附    件" onMouseOver="FP_swapImg(1,0,/*id*/'img3',/*url*/'moren/button8.jpg')" onMouseOut="FP_swapImg(0,0,/*id*/'img3',/*url*/'moren/button7.jpg')" onMouseDown="FP_swapImg(1,0,/*id*/'img3',/*url*/'moren/button9.jpg')" onMouseUp="FP_swapImg(0,0,/*id*/'img3',/*url*/'moren/button8.jpg')"></td>
		<td height="35"><input type="hidden" name="maxsize" value="40000"><input type="file" name="upfile"></td>
	</tr>
    </table>
    <hr>


<div align="center">


<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#3366CC">
  <tr> 
    <td width="100%"> 



      <select name="selectFont" onChange="format('fontname', selectFont.options[selectFont.selectedIndex].value);selectFont.options[0].selected = true;"  style="font-family: 宋体; font-size: 9pt" onMouseOver="window.status='选择选定文字的字体。';return true;" onMouseOut="window.status='';return true;">
        <option selected>选择字体</option>
        <option value="宋体">宋体</option>
        <option value="楷体_GB2312">楷体</option>
        <option value="新宋体">新宋体</option>

        <option value="黑体">黑体</option>
        <option value="隶书">隶书</option>
        <option value="幼圆">幼圆</option>
        <OPTION value="Andale Mono">Andale Mono</OPTION>
        <OPTION value=Arial>Arial</OPTION>
        <OPTION value="Arial Black">Arial Black</OPTION>

        <OPTION value="Book Antiqua">Book Antiqua</OPTION>
        <OPTION value="Century Gothic">Century Gothic</OPTION>
        <OPTION value="Comic Sans MS">Comic Sans MS</OPTION>
        <OPTION value="Courier New">Courier New</OPTION>
        <OPTION value=Georgia>Georgia</OPTION>
        <OPTION value=Impact>Impact</OPTION>

        <OPTION value=Tahoma>Tahoma</OPTION>
        <OPTION value="Times New Roman" >Times New Roman</OPTION>
        <OPTION value="Trebuchet MS">Trebuchet MS</OPTION>
        <OPTION value="Script MT Bold">Script MT Bold</OPTION>
        <OPTION value=Stencil>Stencil</OPTION>
        <OPTION value=Verdana>Verdana</OPTION>

        <OPTION value="Lucida Console">Lucida Console</OPTION>
      </select>
      <select language="javascript"  id="select2" title="字号大小" onChange="format('fontsize',this[this.selectedIndex].value);this[0].selected = true;" name="select" onMouseOver="window.status='选择选定文字的字号大小。';return true;" onMouseOut="window.status='';return true;">
        <option class="heading" selected>字号 
        <option value="7">一号 
        <option value="6">二号 
        <option value="5">三号 
        <option value="4">四号 
        <option value="3">五号 
        <option value="2">六号 
        <option value="1">七号</option>

      </select>
      <img  src="image/fgcolor.gif" align="absmiddle" WIDTH="16" HEIGHT="16"  onclick="foreColor()" TITLE="字体颜色">&nbsp;&nbsp;<img  src="image/bgcolor.gif" align="absmiddle" WIDTH="16" HEIGHT="16"  onclick="BackColor()" TITLE="字体背景颜色">&nbsp; 
      <img src="image/bold.gif" align="absmiddle" alt="粗体" onClick="format('bold', '')" style="cursor: hand;"> 
      <img src="image/italic.gif" align="absmiddle" alt="斜体" onClick="format('italic', '')" style="cursor: hand;"> 
      <img src="image/underline.gif" align="absmiddle" alt="下划线" onClick="format('underline', '')" style="cursor: hand;"> 
      <img src="image/sup.gif" align="absmiddle" border="0" alt="上标" onClick="format('superscript')" style="cursor: hand;"> 
      <img src="image/sub.gif" align="absmiddle" border="0" alt="下标" onClick="format('subscript')" style="cursor: hand;"> 



      &nbsp; <img src="image/url.gif" align="absmiddle" border="0" alt="超级链接" onClick="format('createLink')" style="cursor: hand;"> 
      <img src="image/nourl.gif" align="absmiddle" border="0" alt="取消超级链接" onClick="format('unLink')" style="cursor: hand;"> 
	  
 
      <img src="image/line.gif" align="absmiddle" alt="普通水平线" border="0" onClick="format('InsertHorizontalRule', '')"  style="cursor: hand;"> 
      &nbsp; &nbsp; <img src="image/Aleft.gif" align="absmiddle" onClick="format('Justifyleft', '')" style="cursor: hand;" alt="左对齐"> 
      <img src="image/Acenter.gif" align="absmiddle" border="0" alt="居中" onClick="format('JustifyCenter', '')" style="cursor: hand;"> 
      <img src="image/Aright.gif" align="absmiddle" onClick="format('JustifyRight', '')" style="cursor: hand;" alt="右对齐"> 
	  
      <select name="select3" ID="formatSelect"  onchange="format('FormatBlock',this[this.selectedIndex].value);this.selectedIndex=0">

        <option selected>段落格式</option>
        <option VALUE="&lt;P&gt;">普通</option>
        <option VALUE="&lt;PRE&gt;">已编排格式</option>
        <option VALUE="&lt;H1&gt;">标题一</option>
        <option VALUE="&lt;H2&gt;">标题二</option>
        <option VALUE="&lt;H3&gt;">标题三</option>

        <option VALUE="&lt;H4&gt;">标题四</option>
        <option VALUE="&lt;H5&gt;">标题五</option>
        <option VALUE="&lt;H6&gt;">标题六</option>
        <option VALUE="&lt;H7&gt;">标题七</option>
      </select>
    </td>
  </tr>
</table>

</div>
			
	   <input type="hidden" name="tx" value='<? 
	   			if($message_id!=""){
					$c=mysql_result($res,0,'content_path');
					echo $c;
				}	 ?>'>
					</td>
<iframe class="HtmlEdit" ID="HtmlEdit" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" height="320" 
					<?
						if($message_id!=""){
							echo "onload=showCon()";
						}
					
					?>
> 
</iframe><center>	<input type=image border="0" id="img4" src='moren/button2b1.jpg' height="20" width="100" alt="发送消息" fp-style="fp-btn: Embossed Capsule 1; fp-font" fp-title="发送消息"   onClick="checkForm();document.myform.send.value='send'"><input type=hidden  name=send value="ok"><input type=image border="0" id="img4" src="moren/button6b.jpg" height="20" width="100" alt="保存草稿" fp-style="fp-btn: Embossed Capsule 1; fp-font" fp-title="保存草稿" onClick="checkForm();document.myform.send.value='save'"></center>

</form>
<script type="text/javascript">
SEP_PADDING = 5
HANDLE_PADDING = 7

var yToolbars =	new Array();
var YInitialized = false;
var bLoad=false
var pureText=true
var bodyTag="<head><style type=\"text/css\">body {font-size:9pt}</style><meta http-equiv=Content-Type content=\"text/html; charset=gb2312\"></head><BODY bgcolor=\"#FFFFFF\" MONOSPACE>"
var bTextMode=false

public_description=new Editor

function document.onreadystatechange(){
  if (YInitialized) return;
  YInitialized = true;

  var i, s, curr;

  for (i=0; i<document.body.all.length;	i++)
  {
    curr=document.body.all[i];
    if (curr.className == "yToolbar")
    {
      InitTB(curr);
      yToolbars[yToolbars.length] = curr;
    }
  }

  DoLayout();
  window.onresize = DoLayout;

  HtmlEdit.document.open();
  HtmlEdit.document.write(bodyTag);
  HtmlEdit.document.close();
  HtmlEdit.document.designMode="On";
}

function InitBtn(btn)
{
  btn.onmouseover = BtnMouseOver;
  btn.onmouseout = BtnMouseOut;
  btn.onmousedown = BtnMouseDown;
  btn.onmouseup	= BtnMouseUp;
  btn.ondragstart = YCancelEvent;
  btn.onselectstart = YCancelEvent;
  btn.onselect = YCancelEvent;
  btn.YUSERONCLICK = btn.onclick;
  btn.onclick =	YCancelEvent;
  btn.YINITIALIZED = true;
  return true;
}

function InitTB(y)
{
  y.TBWidth = 0;

  if (!	PopulateTB(y)) return false;

  y.style.posWidth = y.TBWidth;

  return true;
}


function YCancelEvent()
{
  event.returnValue=false;
  event.cancelBubble=true;
  return false;
}

function PopulateTB(y)
{
  var i, elements, element;

  elements = y.children;
  for (i=0; i<elements.length; i++) {
    element = elements[i];
    if (element.tagName	== "SCRIPT" || element.tagName == "!") continue;

    switch (element.className) {
      case "Btn":
        if (element.YINITIALIZED == null)	{
          if (! InitBtn(element))
          return false;
        }
        element.style.posLeft = y.TBWidth;
        y.TBWidth	+= element.offsetWidth + 1;
        break;

      case "TBGen":
        element.style.posLeft = y.TBWidth;
        y.TBWidth	+= element.offsetWidth + 1;
        break;

      case "TBSep":
        element.style.posLeft = y.TBWidth	+ 2;
        y.TBWidth	+= SEP_PADDING;
        break;

      case "TBHandle":
        element.style.posLeft = 2;
        y.TBWidth	+= element.offsetWidth + HANDLE_PADDING;
        break;

      default:
        return false;
      }
  }

  y.TBWidth += 1;
  return true;
}

function DebugObject(obj)
{
  var msg = "";
  for (var i in	TB) {
    ans=prompt(i+"="+TB[i]+"\n");
    if (! ans) break;
  }
}

function LayoutTBs()
{
  NumTBs = yToolbars.length;

  if (NumTBs ==	0) return;

  var i;
  var ScrWid = (document.body.offsetWidth) - 6;
  var TotalLen = ScrWid;
  for (i = 0 ; i < NumTBs ; i++) {
    TB = yToolbars[i];
    if (TB.TBWidth > TotalLen) TotalLen	= TB.TBWidth;
  }

  var PrevTB;
  var LastStart	= 0;
  var RelTop = 0;
  var LastWid, CurrWid;
  var TB = yToolbars[0];
  TB.style.posTop = 0;
  TB.style.posLeft = 0;

  var Start = TB.TBWidth;
  for (i = 1 ; i < yToolbars.length ; i++) {
    PrevTB = TB;
    TB = yToolbars[i];
    CurrWid = TB.TBWidth;

    if ((Start + CurrWid) > ScrWid) {
      Start = 0;
      LastWid =	TotalLen - LastStart;
    }
    else {
       LastWid =	PrevTB.TBWidth;
       RelTop -=	TB.offsetHeight;
    }

    TB.style.posTop = RelTop;
    TB.style.posLeft = Start;
    PrevTB.style.width = LastWid;

    LastStart =	Start;
    Start += CurrWid;
  }

  TB.style.width = TotalLen - LastStart;

  i--;
  TB = yToolbars[i];
  var TBInd = TB.sourceIndex;
  var A	= TB.document.all;
  var item;
  for (i in A) {
    item = A.item(i);
    if (! item)	continue;
    if (! item.style) continue;
    if (item.sourceIndex <= TBInd) continue;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -