1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Bugtracker #4734 - get rid of deprecated <center>

This commit is contained in:
e107steved
2009-12-21 22:31:04 +00:00
parent 1ac54f806f
commit 1234bf86bb
3 changed files with 30 additions and 21 deletions

View File

@@ -9,8 +9,8 @@
* Message Handler * Message Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $
* $Revision: 1.28 $ * $Revision: 1.29 $
* $Date: 2009-12-13 21:52:32 $ * $Date: 2009-12-21 22:31:02 $
* $Author: e107steved $ * $Author: e107steved $
* *
*/ */
@@ -767,9 +767,9 @@ function show_emessage($mode, $message, $line = 0, $file = "") {
echo "<script type='text/javascript'>alert(\"".$tp->toJS($message)."\"); </script>\n"; echo "<script type='text/javascript'>alert(\"".$tp->toJS($message)."\"); </script>\n";
break; break;
case "POPUP": case 'POPUP':
$mtext = "<html><head><title>Message</title><link rel=stylesheet href=" . THEME . "style.css></head><body style=padding-left:2px;padding-right:2px;padding:2px;padding-bottom:2px;margin:0px;align;center marginheight=0 marginleft=0 topmargin=0 leftmargin=0><table width=100% align=center style=width:100%;height:99%padding-bottom:2px class=bodytable height=99% ><tr><td width=100% ><center><b>--- Message ---</b><br /><br />".$message."<br /><br /><form><input class=button type=submit onclick=self.close() value = ok /></form></center></td></tr></table></body></html> "; $mtext = "<html><head><title>Message</title><link rel=stylesheet href=" . THEME . "style.css></head><body style=padding-left:2px;padding-right:2px;padding:2px;padding-bottom:2px;margin:0px;align;center marginheight=0 marginleft=0 topmargin=0 leftmargin=0><table width=100% align=center style=width:100%;height:99%padding-bottom:2px class=bodytable height=99% ><tr><td width=100% style='text-align:center'><b>--- Message ---</b><br /><br />".$message."<br /><br /><form><input class=button type=submit onclick=self.close() value = ok /></form></td></tr></table></body></html> ";
echo " echo "
<script type='text/javascript'> <script type='text/javascript'>

View File

@@ -9,8 +9,8 @@
* Administration - Site Maintenance * Administration - Site Maintenance
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/newsletter/admin_config.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/newsletter/admin_config.php,v $
* $Revision: 1.12 $ * $Revision: 1.13 $
* $Date: 2009-11-19 20:24:21 $ * $Date: 2009-12-21 22:31:03 $
* $Author: e107steved $ * $Author: e107steved $
* *
*/ */
@@ -549,8 +549,8 @@ class newsletter
$_nl_sanatized = ''; $_nl_sanatized = '';
if(!$nl_sql -> db_Select('newsletter', '*', 'newsletter_id='.$p_id)) if(!$nl_sql -> db_Select('newsletter', '*', 'newsletter_id='.$p_id))
{ // Check if newsletter id is available { // Check if newsletter id is available
$vs_text .= "<br /><br /><center>".NLLAN_56."<br /><br/> $vs_text .= "<br /><br /><span style='text-align:center'>".NLLAN_56."<br /><br/>
<input class='button' type=button value='".NLLAN_57."' onClick=\"window.location='".e_SELF."'\"></center>"; <input class='button' type=button value='".NLLAN_57."' onClick=\"window.location='".e_SELF."'\"></span>";
$ns -> tablerender(NLLAN_58, $vs_text); $ns -> tablerender(NLLAN_58, $vs_text);
return; return;
} }

View File

@@ -9,8 +9,8 @@
* PM plugin - menu display * PM plugin - menu display
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/pm/private_msg_menu.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/pm/private_msg_menu.php,v $
* $Revision: 1.12 $ * $Revision: 1.13 $
* $Date: 2009-12-17 22:47:20 $ * $Date: 2009-12-21 22:31:04 $
* $Author: e107steved $ * $Author: e107steved $
*/ */
@@ -20,7 +20,7 @@
* *
* @package e107_plugins * @package e107_plugins
* @subpackage pm * @subpackage pm
* @version $Id: private_msg_menu.php,v 1.12 2009-12-17 22:47:20 e107steved Exp $; * @version $Id: private_msg_menu.php,v 1.13 2009-12-21 22:31:04 e107steved Exp $;
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -81,35 +81,44 @@ if(check_class($pm_prefs['pm_class']))
{ {
$tp = e107::getParser(); $tp = e107::getParser();
$pm_inbox = $pmManager->pm_getInfo('inbox'); $pm_inbox = $pmManager->pm_getInfo('inbox');
$txt = $tp->parseTemplate($pm_menu_template, TRUE); $txt = "\n".$tp->parseTemplate($pm_menu_template, TRUE);
if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, 'pm.php') === FALSE && $_COOKIE['pm-alert'] != 'ON') if($pm_inbox['inbox']['new'] > 0 && $pm_prefs['popup'] && strpos(e_SELF, 'pm.php') === FALSE && $_COOKIE['pm-alert'] != 'ON')
{ {
$txt .= pm_show_popup($pm_inbox, $pm_prefs); $txt .= pm_show_popup($pm_inbox, $pm_prefs['popup_delay']);
} }
$ns->tablerender(LAN_PM, $txt, 'pm'); $ns->tablerender(LAN_PM, $txt, 'pm');
} }
function pm_show_popup($pm_inbox, $pm_prefs)
/**
* Function to show a popup (if enabled) when new PMs arrive.
*
* @param array $pm_inbox - information about current state of inbox
* @param int $alertdelay - delay between popups, in seconds (defaults to 60 if pref not set)
*
* @return string - text for display
*
* @todo - check JS - may be some problems, especially if using debug in FF
*/
function pm_show_popup($pm_inbox, $alertdelay = 0)
{ {
$alertdelay = intval($pm_prefs['popup_delay']); if($alertdelay == 0) { $alertdelay = 60; }
if($alertdelay == 0) { $alertdalay = 60; }
setcookie('pm-alert', 'ON', time()+$alertdelay); setcookie('pm-alert', 'ON', time()+$alertdelay);
$popuptext = " $popuptext = "
<html> <html>
<head> <head>
<title>".$pm_inbox['inbox']['new']." ".LAN_PM_109."</title> <title>".$pm_inbox['inbox']['new'].' '.LAN_PM_109."</title>
<link rel=stylesheet href=" . THEME . "style.css> <link rel=\'stylesheet\' href=\'".THEME."style.css\'>
</head> </head>
<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\'> <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\'>
<table style=\'width:100%; text-align:center; height:99%; padding-bottom:2px\' class=\'bodytable\'> <table style=\'width:100%; text-align:center; height:99%; padding-bottom:2px\' class=\'bodytable\'>
<tr> <tr>
<td width=100% > <td width=100% style='text-align:center'>
<center><b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new']." ".LAN_PM_109."<br />".$pm_inbox['inbox']['unread']." ".LAN_PM_37."<br /><br /> <b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new'].' '.LAN_PM_109."<br />".$pm_inbox['inbox']['unread'].' '.LAN_PM_37."<br /><br />
<form> <form>
<input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_PM_110."\' /> <input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_PM_110."\' />
</form> </form>
</center>
</td> </td>
</tr> </tr>
</table> </table>