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

📄 messages.php

📁 groupoffice
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		{			$short_from = cut_string($mail->f('from'), 40);		}else		{			$to = '';			$to_array = $mail->f("to");			for ($i=0;$i<sizeof($to_array);$i++)			{				if ($i != 0)				{					$to .= ", ";				}				$to .= enc_utf8($to_array[$i]);			}			if ($to == "")			{				$to = $ml_no_reciepent;			}			$to = htmlspecialchars($to, ENT_QUOTES);			$short_to = cut_string($to, 50);		}		if ($mail->f('flagged') == '1')		{			$flag = new image('flag');					$flag->set_attribute('style', 'border:0px;width:16px;height:16px;margin-right:3px;');			$flag->set_attribute('valign', 'middle');			$flag = $flag->get_html();					}else		{			$flag = '&nbsp;';		}				$row->set_tooltip(new tooltip(htmlspecialchars($mail->f('from')."&nbsp;&lt;".$mail->f("sender")."&gt;<br />".$subject), '', 'ol_width=300'));			 		$row->add_cell(new table_cell($img->get_html()));				if ($show=="from")		{			$cell = new table_cell($short_from);						if(isset($ab) && $contact = $ab->get_contact_by_email($mail->f("sender"), $GO_SECURITY->user_id))			{				$cell->set_attribute('style','color: #'.$contact['color'].';white-space:nowrap');							}else			{				$cell->set_attribute('style','white-space:nowrap');							}			$row->add_cell($cell);		}else		{			$cell = new table_cell($short_to);			$cell->set_attribute('style','white-space:nowrap');							$row->add_cell($cell);		}				$cell = new table_cell($flag);		$cell->set_attribute('style','width:10px;');		$row->add_cell($cell);				$cell = new table_cell($short_subject);		$cell->set_attribute('style','white-space:nowrap');					$row->add_cell($cell);			//	$cell = new table_cell(format_size($mail->f('size')));	//	$cell->set_attribute('style','white-space:nowrap');				//	$row->add_cell($cell);				$cell = new table_cell(date($_SESSION['GO_SESSION']['date_format'].' '.$_SESSION['GO_SESSION']['time_format'], $mail->f('udate')));		$cell->set_attribute('style','white-space:nowrap');					$row->add_cell($cell);				$datatable->add_row($row);				if(!$first_uid)		{			$first_uid = $mail->f('uid');		}	}}if(isset($refresh)){	header('Location: '.add_params_to_url($link_back, 'refreshed=true'));	exit();}elseif(isset($_GET['refreshed'])){	$email->cache_account_status($account);	$refresh_treeview=true;}$status = $mail->status($mailbox, SA_ALL);$mailbox_msg_count = $status->messages;$unseen = $status->unseen;$datatable->set_pagination($msg_count);$email_folder = $email->get_folder($account['id'], addslashes($mailbox));$email_folder['unseen'] = $unseen;$email_folder['msgcount'] = $msg_count;$email->__update_folder($email_folder);if ($msg_count == 0){		if ($email_folder['attributes']&LATT_NOSELECT)	{		$row = new table_row();		$cell = new table_cell($ml_no_mailbox);		$cell->set_attribute('colspan','99');		$cell->set_attribute('style','height:18px;');		$row->add_cell($cell);		$datatable->add_row($row);			}else	{		$row = new table_row();		$cell = new table_cell($ml_no_messages);		$cell->set_attribute('colspan','99');		$cell->set_attribute('style','height:18px;');		$row->add_cell($cell);		$datatable->add_row($row);	}	}else{	$row = new table_row();	$row->set_attribute('class','small');		$cell = new table_cell($mailbox_msg_count.' '.$ml_messages.'&nbsp;&nbsp;&nbsp;');	if ($mail->is_imap())	{		$cell->innerHTML .= '('.$unseen.' '.$ml_new.')';	}	$cell->set_attribute('colspan','99');	$cell->set_attribute('style','height:18px;');	$row->add_cell($cell);	$datatable->add_footer($row);}$GO_HEADER['nomessages'] = true;$GO_HEADER['body_arguments'] = 'onload="initializeDocument();"';$GO_HEADER['head'] = $overlib->get_header();$GO_HEADER['head'] .= $datatable->get_header();$GO_HEADER['head'] .= '<script type="text/javascript" src="'.$GO_MODULES->url.'email.js"></script>';require($GO_THEME->theme_path.'header.inc');$form = new form('email_form');//$form->add_html_element(new input('hidden', 'empty_mailbox'));$form->add_html_element(new input('hidden', 'link_back', $link_back));$form->add_html_element(new input('hidden', 'account_id', $account_id));$form->add_html_element(new input('hidden', 'form_action'));$form->add_html_element(new input('hidden', 'mailbox', $mailbox));if ($_SESSION['email_search_query'] != '') {	$div = new html_element('div');	$div->set_attribute('class', 'headerTable');	$div->set_attribute('style', 'padding:2px;');		$img = new image('info');	$img->set_attribute('style', 'border:0;margin-right:3px;');	$img->set_attribute('align','absmiddle');		$link = new hyperlink($_SERVER['PHP_SELF'].'?account_id='.$account['id'].'&mailbox='.urlencode($mailbox).'&task=set_search_query', $img->get_html().$ml_search_active);		$div->add_html_element($link);		$form->add_html_element($div);}$table = new table();$table->set_attribute('style','width:100%');$table->set_attribute('cellpadding','0');$table->set_attribute('cellspacing','0');$row = new table_row();$cell = new table_cell();require_once($GO_CONFIG->class_path.'filesystem.class.inc');$fs = new filesystem();if(eregi('localhost', $account['host']) && $quota = $fs->get_quota($account['username'])){	$percentage = number_format(($quota['used']/$quota['total'])*100);	$text = $percentage.'% '.$ml_used_of.' '.format_size($quota['total']);	$statusbar = new statusbar($quota['used'], $quota['total']);		$st_table = new table();  //$table->set_attribute('cellpadding','0');  $st_table->set_attribute('cellspacing','0');    $tr = new table_row();      $tr->add_cell(new table_cell($statusbar->get_html()));    $td = new table_cell($text);  $tr->add_cell($td);    $st_table->add_row($tr);         $cell->add_html_element($st_table);}$row->add_cell($cell);$cell = new table_cell();$cell->set_attribute('align','right');$h3 = new html_element('h3');	$h3->innerHTML = $account['email'].' - ';if ($mailbox == $account['mbroot'] || $mailbox == 'INBOX') {	$h3->innerHTML .=  $ml_inbox;}elseif ($account['mbroot'] != '') {	$h3->innerHTML .= utf7_imap_decode(str_replace($account['mbroot'], '', $mailbox));} else {	$h3->innerHTML .=  utf7_imap_decode($mailbox);}$h3->innerHTML .= ' ('.$mailbox_msg_count;if($mail->is_imap()){	$h3->innerHTML .= '/'.$unseen.')';}else{	$h3->innerHTML .= ')';}$cell->add_html_element($h3);$row->add_cell($cell);$table->add_row($row);$row = new table_row();$cell = new table_cell();$cell->set_attribute('style', 'text-align:right;white-space: nowrap');$cell->set_attribute('colspan', '2');if ($account['type'] == "imap"){	if ($email->get_subscribed($account['id']) > 0)	{		$select = new select('folder', '');		$select->set_attribute('onchange' , 'javascript:move_mail()');				$select->add_value('', $ml_move_mail);		while ($email->next_record())		{			if (!($email->f('attributes')&LATT_NOSELECT) && $email->f('name') != $mailbox)			{				if($email->f('name') == 'INBOX')				{					$select->add_value('INBOX',$ml_inbox);				}else				{										$select->add_value($email->f('name'), utf7_imap_decode(str_replace('INBOX'.$email->f('delimiter'), '', $email->f('name'))));				}			}		}		$cell->add_html_element($select);	}	$select = new select('flag', '');	$select->set_attribute('onchange' , 'javascript:set_flag()');	$select->add_value('', $ml_mark);	$select->add_value('read', $ml_markread);	$select->add_value('unread', $ml_markunread);	$select->add_value('flag', $ml_flag);	$select->add_value('clear_flag', $ml_clearflag);		$cell->add_html_element($select);}$row->add_cell($cell);$table->add_row($row);$form->add_html_element($table);$form->add_html_element($datatable);echo $form->get_html();?><script type="text/javascript">	function confirm_delete(){	document.forms[0].form_action.value='delete';	parent.close_message_frame_for_delete();	<?php echo $datatable->get_delete_handler(); ?>}function initializeDocument(){    //Refresh treeview so that the mail checker doesn't alert about new mail the	//user has already seen	<?php 	if(!$refresh_treeview) echo 'var loc = parent.treeview.location.toString();if(loc.substring(loc.length-10) == \'blank.html\'){'; 	?>		parent.treeview.location.href='treeview.php';	<?php 	if(!$refresh_treeview) echo '}';		?>	parent.update_toolbar(false);		parent.message.location.replace('blank.html');}var last_selected= 0;var start_point = 0;function open_message(evt, uid, row){			evt=evt||false;		if (navigator.userAgent.toLowerCase().indexOf('mac')>=0) {		var ctrlPressed = (evt && evt.altKey);	} else {		var ctrlPressed = (evt && evt.ctrlKey);	}	var shiftPressed = (evt && evt.shiftKey);	 if(!ctrlPressed && !shiftPressed &&	 	 !(	 	 		parent.message.location.href.indexOf('message.php')>-1 && 	 	 		parent.message.document.forms["email_form"].uid.value==uid	 	 	)	 	)	{		row.className='';		<?php		echo 'parent.message.location="message.php?account_id='.$account['id'].'&uid="+uid+"&mailbox='.urlencode($mailbox).'&sort_index='.$datatable->sort_index.'&sort_ascending='.$datatable->sort_ascending.'";';		?>	}}function confirm_empty_folder(account_id, folder, message){	if(confirm(message))	{		document.forms[0].account_id.value=account_id;		document.forms[0].mailbox.value=folder;		document.forms[0].form_action.value='empty_folder';		document.forms[0].submit();	}}</script><?phprequire($GO_THEME->theme_path.'footer.inc');?>

⌨️ 快捷键说明

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