[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_plugins/pm/private_msg_menu.php,v $ 14 | $Revision: 1.11 $ 15 | $Date: 2006/11/15 20:48:46 $ 16 | $Author: mcfly_e107 $ 17 +----------------------------------------------------------------------------+ 18 */ 19 if (!defined('e107_INIT')) { exit; } 20 21 global $sysprefs, $pref, $pm_prefs; 22 if(!isset($pm_prefs['perpage'])) 23 { 24 $pm_prefs = $sysprefs->getArray("pm_prefs"); 25 } 26 require_once(e_PLUGIN."pm/pm_func.php"); 27 pm_getInfo('clear'); 28 29 define("PM_INBOX_ICON", "<img src='".e_PLUGIN."pm/images/mail_get.png' style='height:16px; width:16px; border:0px;' alt='".LAN_PM_25."' title='".LAN_PM_25."' />"); 30 define("PM_OUTBOX_ICON", "<img src='".e_PLUGIN."pm/images/mail_send.png' style='height:16px; width:16px; border:0px;' alt='".LAN_PM_26."' title='".LAN_PM_26."' />"); 31 define("PM_SEND_LINK", LAN_PM_35); 32 define("NEWPM_ANIMATION", "<img src='".e_PLUGIN."pm/images/newpm.gif' alt='' style='border:0' />"); 33 34 $sc_style['SEND_PM_LINK']['pre'] = "<br /><br />[ "; 35 $sc_style['SEND_PM_LINK']['post'] = " ]"; 36 37 $sc_style['INBOX_FILLED']['pre'] = "["; 38 $sc_style['INBOX_FILLED']['post'] = "%]"; 39 40 $sc_style['OUTBOX_FILLED']['pre'] = "["; 41 $sc_style['OUTBOX_FILLED']['post'] = "%]"; 42 43 $sc_style['NEWPM_ANIMATE']['pre'] = "<a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>"; 44 $sc_style['NEWPM_ANIMATE']['post'] = "</a>"; 45 46 47 if(!defined($pm_menu_template)) 48 { 49 $pm_menu_template = " 50 <a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".PM_INBOX_ICON."</a> 51 <a href='".e_PLUGIN_ABS."pm/pm.php?inbox'>".LAN_PM_25."</a> 52 {NEWPM_ANIMATE} 53 <br /> 54 {INBOX_TOTAL} ".LAN_PM_36.", {INBOX_UNREAD} ".LAN_PM_37." {INBOX_FILLED} 55 <br /> 56 <a href='".e_PLUGIN_ABS."pm/pm.php?outbox'>".PM_OUTBOX_ICON."</a> 57 <a href='".e_PLUGIN_ABS."pm/pm.php?outbox'>".LAN_PM_26."</a><br /> 58 {OUTBOX_TOTAL} ".LAN_PM_36.", {OUTBOX_UNREAD} ".LAN_PM_37." {OUTBOX_FILLED} 59 {SEND_PM_LINK} 60 "; 61 } 62 63 if(check_class($pm_prefs['pm_class'])) 64 { 65 global $tp, $pm_inbox; 66 $pm_inbox = pm_getInfo('inbox'); 67 require_once(e_PLUGIN."pm/pm_shortcodes.php"); 68 $txt = $tp->parseTemplate($pm_menu_template, TRUE, $pm_shortcodes); 69 if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, "pm.php") === FALSE && $_COOKIE["pm-alert"] != "ON") 70 { 71 $txt .= pm_show_popup(); 72 } 73 $ns->tablerender(LAN_PM, $txt, 'pm'); 74 } 75 76 function pm_show_popup() 77 { 78 global $pm_inbox, $pm_prefs; 79 $alertdelay = intval($pm_prefs['popup_delay']); 80 if($alertdelay == 0) { $alertdalay = 60; } 81 setcookie("pm-alert", "ON", time()+$alertdelay); 82 $popuptext = " 83 <html> 84 <head> 85 <title>".$pm_inbox['inbox']['new']." ".LAN_PM_109."</title> 86 <link rel=stylesheet href=" . THEME . "style.css> 87 </head> 88 <body style=\'padding-left:2px;padding-right:2px; padding:2px; padding-bottom:2px; margin:0px; text-align:center\' marginheight=\'0\' marginleft=\'0\' topmargin=\'0\' leftmargin=\'0\'> 89 <table style=\'width:100%; text-align:center; height:99%; padding-bottom:2px\' class=\'bodytable\'> 90 <tr> 91 <td width=100% > 92 <center><b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new']." ".LAN_PM_109."<br />".$pm_inbox['inbox']['unread']." ".LAN_PM_37."<br /><br /> 93 <form> 94 <input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_PM_110."\' /> 95 </form> 96 </center> 97 </td> 98 </tr> 99 </table> 100 </body> 101 </html> "; 102 $popuptext = str_replace("\n", "", $popuptext); 103 $popuptext = str_replace("\t", "", $popuptext); 104 $text .= " 105 <script type='text/javascript'> 106 winl=(screen.width-200)/2; 107 wint = (screen.height-100)/2; 108 winProp = 'width=200,height=100,left='+winl+',top='+wint+',scrollbars=no'; 109 window.open('javascript:document.write(\"".$popuptext."\");', 'pm_popup', winProp); 110 </script >"; 111 return $text; 112 } 113 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |