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

📄 compose.inc

📁 groupoffice
💻 INC
📖 第 1 页 / 共 2 页
字号:
	echo $ml_format.':&nbsp;</td><td>';
	$dropbox = new dropbox();
	$dropbox->add_value('text/PLAIN', $ml_text_format);
	$dropbox->add_value('text/HTML', $ml_html_format);
	$dropbox->print_dropbox('content_type', $content_type, 'onchange="javascript:change_format()"');
} else {
	echo '</td><td><input type="hidden" value="text/PLAIN" name="content_type" />';
}
?>
	</td>
	<td align="right">
	<span id="attachments_text"><?php
$count = 0;
$tooltip = '';
if(isset($_SESSION['attach_array']))
{
	for ($i = 0; $i < count($_SESSION['attach_array']); $i ++) {
		if ($_SESSION['attach_array'][$i]->disposition == 'attachment') {
			$extension = get_extension($_SESSION['attach_array'][$i]->file_name);
			$tooltip .= '<div><img border="0" width="16" height="16" src="'.get_filetype_image($extension).'" align="middle" />'.
	      		'&nbsp;'.$_SESSION['attach_array'][$i]->file_name.'</div>';
			
			$count ++;
		}
	}
}

if($tooltip != '')
{	
	echo '<a href="javascript:open_attachments();" '.$overlib->print_overlib(htmlspecialchars($tooltip), $ml_attachments).'>';
}
if ($count == 1) {
	echo '1 '.$ml_attachment_added;
} else {
	echo $count.' '.$ml_attachments_added;
}
if($tooltip != '')
{	
	echo '</a>';
}
?></span>
	<?php

$button = new button($ml_attachments, "javascript:open_attachments();");echo $button->get_html();
?>
	</td>
</tr><tr>	<td colspan="3" height="100%" width="100%">	<?php	if($content_type == 'text/HTML')	{		$htmleditor->Value		= $mail_body;		$htmleditor->ToolbarSet='email';		$htmleditor->SetConfig('ImageBrowser',true);		$htmleditor->SetConfig('ImageBrowserURL', $GO_MODULES->modules['email']['url'].'select_image.php');
		echo $htmleditor->CreateHtml() ;	}else	{		$textarea = new textarea('mail_body', $mail_body);		$textarea->set_attribute('style','width:100%;height:100%;');		echo $textarea->get_html();			}
	?>	</td></tr>	<td colspan="3" style="text-align:center">	<?php
		$button = new button($ml_send, "javascript:send()");
		echo $button->get_html();
		if (isset ($mail_from) && $account = $email->get_account($mail_from)) {
			if ($account['drafts'] != '') {
				$button = new button($cmdSave, "javascript:save_draft()");
				echo $button->get_html();
			}
		}
		$button = new button($cmdCancel, "javascript:window.close()");		echo $button->get_html();
		?>	</td></tr></table>
</form>

<script type="text/javascript" language="javascript">
var attach_popup;

function show_cc()
{

	var cc_row = get_object('cc_row');

	cc_row.style.display='';		document.sendform.show_cc.value='true';
	
	var cc_opener = get_object('cc_opener');
	cc_opener.style.display='none';
	var sep;
	if(sep = get_object('sep'))
	{
		sep.style.display='none';
	}
	
	if(document.sendform.show_bcc.value=='true')
	{
		var show_buttons = get_object('show_buttons');
		show_buttons.style.display='none';
	}
}

function show_bcc()
{
	var bcc_row = get_object('bcc_row');
	bcc_row.style.display='';
	
	var bcc_opener = get_object('bcc_opener');
	bcc_opener.style.display='none';		document.sendform.show_bcc.value='true';
	
	var sep;
	if(sep = document.getElementById('sep'))
	{
		sep.style.display='none';
	}
	if(document.sendform.show_cc.value=='true')
	{
		var show_buttons = get_object('show_buttons');
		show_buttons.style.display='none';
	}
}

function validate()
{
  if (window.RegExp)
  {
    var reg = new RegExp("[0-9A-Za-z]+","g");
    if (!reg.test(document.sendform.mail_to.value) && !reg.test(document.sendform.mail_cc.value) && !reg.test(document.sendform.mail_bcc.value))
    {
      alert("<?php echo $ml_to_empty ?>");
      document.sendform.mail_to.focus();
      return (false);
    }
  }
  return (true);
}

function save_draft()
{
	 <?php

if (isset ($uid) && $uid > 0) {
	echo 'document.sendform.uid.value="'.$uid.'";';
}

?>      
	document.sendform.sendaction.value='save_draft';
	document.sendform.submit();

}

function send()
{
  if (document.sendform.sendaction.value != 'send')
  {
  	
	  	if(attach_popup && !attach_popup.closed)
	  	{
	  		if(attach_popup.document.forms[0].task.value == 'viewing')
	  		{
	  			attach_popup.close();
	  		}else
	  		{
	  			alert('<?php echo htmlspecialchars(addslashes($ml_please_close_attachments)); ?>');
		  		attach_popup.focus();
		  		return false;
		  	}
		  	
	  	}
		  <?php
			if ($mailing_group_id == 0) {
				echo 'if (validate()){';
			} else {
				echo "document.sendform.action = '".$tp_plugin['url']."send_to_mailing_group.php';";
			}
			?>			if(document.sendform.mail_subject.value!='' || confirm("<?php echo addslashes(htmlspecialchars($ml_confirm_no_subject)); ?>"))  		{
				document.sendform.sendaction.value = "send";
				<?php
				if (isset ($uid) && $uid > 0) {
					echo 'document.sendform.uid.value="'.$uid.'";';
				}
				?>
				document.sendform.submit();			}
			<?php if ($mailing_group_id == 0) echo '}'; ?>		}
	  
}

  function attach()
  {
    if (document.sendform.mail_att.value != "")
    {
				document.sendform.sendaction.value = "add";
      document.sendform.submit();
    }
  }

  function change_format()
  {
    if (confirm('<?php echo htmlspecialchars(addslashes($ml_loose_changes)); ?>'))
    {
      <?php
			if (isset ($uid) && $uid > 0) {
				echo 'document.sendform.uid.value="'.$uid.'";';
			}			?>
			document.sendform.mail_body.value='';
     document.sendform.sendaction.value = 'change_format';
     document.sendform.submit();
    }
  }

  function change_mail_from()
  {
    document.sendform.sendaction.value = 'change_mail_from';
    document.sendform.submit();
  }

function delete_attach()
{
  document.sendform.sendaction.value = "delete";
   document.sendform.submit();
}


function open_attachments()
{
	var centered;
	var width = 600;
	var height = 300;
	
x = (screen.availWidth - width) / 2;
y = (screen.availHeight - height) / 2;

centered =',width=' + width + ',height=' + height + ',left=' + x + ',top=' + y + ',scrollbars=yes,resizable=yes,status=yes';

attach_popup = window.open('attachments.php', 'attachments', centered);
  if (!attach_popup.opener) attach_popup.opener = self;
attach_popup.focus();	
}


function close_attachments()
{
	if(eval(attach_popup))
	{
		attach_popup.close();
	}
}
</script>

⌨️ 快捷键说明

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