define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
displayPageHeader($color, 'None' );
</td></tr>
<tr><td align="center">© 1999 - 2006 The SquirrelMail Project Team</td></tr>
</table></p>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/** SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/addressbook.php');
?>
define('SM_PATH','../');
/** SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/strings.php');
include_once(SM_PATH . 'functions/global.php');
include_once(SM_PATH . 'functions/html.php');
echo html_tag( 'p', '<br /><b>' . _("Nothing to search") . "</b>\n",'center' );
}
}
-
-?>
-</body></html>
\ No newline at end of file
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
}
/** SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/global.php');
include_once(SM_PATH . 'functions/date.php');
include_once(SM_PATH . 'functions/display_messages.php');
echo '<input type="submit" value="' . _("Return") . '" name="return" />' . "\n" .
'</form></center></nobr>';
}
-
-?>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/** SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/display_messages.php');
require_once(SM_PATH . 'functions/addressbook.php');
require_once(SM_PATH . 'functions/forms.php');
html_tag( 'th', _("Info") .
show_abook_sort_button($abook_sort_order, _("sort by info"), 6, 7),
'left', '', 'width="1%"' ) .
- ($abook->add_extra_field ? html_tag( 'th', ' ','left', '', 'width="1%"'): '') .
+ ($abook->add_extra_field ? html_tag( 'th', ' ','left', '', 'width="1%"'): '') .
"\n",
'', $color[9] ) . "\n";
}
' ' ,
'center', '', 'valign="top" width="1%"' );
}
- echo html_tag( 'td',
- ' ' . htmlspecialchars($row['nickname']) . ' ',
+ echo html_tag( 'td',
+ ' ' . htmlspecialchars($row['nickname']) . ' ',
'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' );
// different full name display formating for Japanese translation
* translation uses euc-jp character set internally.
* htmlspecialchars() should not break any characters.
*/
- echo html_tag( 'td',
+ echo html_tag( 'td',
' ' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . ' ',
'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' );
} else {
// add extra column if third party backend needs it
if ($abook->add_extra_field) {
- echo html_tag( 'td',
+ echo html_tag( 'td',
' ' . (isset($row['extra']) ? $row['extra'] : '') . ' ',
'left', '', 'valign="top" width="1%"' );
}
echo "<!-- start of addressbook_bottom hook-->\n";
do_hook('addressbook_bottom');
echo "\n<!-- end of addressbook_bottom hook-->\n";
-
-?>
-</body></html>
\ No newline at end of file
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/date.php');
exit();
}
unset($compose_messages[$session]);
-
+
/* if it is resumed draft, delete draft message */
if ( isset($delete_draft)) {
$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, false);
$username, $data_dir, $identity, $idents, $delete_draft,
$mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
$username, $compose_messages, $composesession, $default_charset,
- $compose_onsubmit;
+ $compose_onsubmit, $oTemplate;
if (checkForJavascript()) {
$onfocus = ' onfocus="alreadyFocused=true;"';
// Plugins that use compose_form hook can add an array entry
// to the globally scoped $compose_onsubmit; we add them up
- // here and format the form tag's full onsubmit handler.
- // Each plugin should use "return false" if they need to
+ // here and format the form tag's full onsubmit handler.
+ // Each plugin should use "return false" if they need to
// stop form submission but otherwise should NOT use "return
// true" to give other plugins the chance to do what they need
// to do; SquirrelMail itself will add the final "return true".
// need to quote accordingly.
if (checkForJavascript()) {
$onsubmit_text = ' onsubmit="';
- if (empty($compose_onsubmit))
+ if (empty($compose_onsubmit))
$compose_onsubmit = array();
- else if (!is_array($compose_onsubmit))
+ else if (!is_array($compose_onsubmit))
$compose_onsubmit = array($compose_onsubmit);
foreach ($compose_onsubmit as $text) {
$text = trim($text);
- if (substr($text, -1) != ';' && substr($text, -1) != '}')
+ if (substr($text, -1) != ';' && substr($text, -1) != '}')
$text .= '; ';
$onsubmit_text .= $text;
}
echo $onsubmit_text . ' return true;"';
}
-
+
echo ">\n";
}
do_hook('compose_bottom');
- echo '</body></html>' . "\n";
+ $oTemplate->display('footer.tpl');
}
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/display_messages.php');
global $color;
error_box('delete_message.php script is obsolete since 1.5.1.',$color);
-
-?>
-</body></html>
\ No newline at end of file
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/folder_manip.php');
require_once(SM_PATH . 'functions/plugin.php');
if ( $server_type == 'courier' ) {
/**
* If we use courier, we should hide system trash folder
- * FIXME: (tokul) Who says that courier does not allow storing folders in
- * INBOX.Trash or inbox.trash? Can't reproduce it 3.0.8. This entry is
- * useless, because in_array() check is case sensitive and INBOX is in
+ * FIXME: (tokul) Who says that courier does not allow storing folders in
+ * INBOX.Trash or inbox.trash? Can't reproduce it 3.0.8. This entry is
+ * useless, because in_array() check is case sensitive and INBOX is in
* upper case.
*/
array_push($skip_folders, 'inbox.trash');
if (isSpecialMailbox($aBoxData['unformatted']) &&
! in_array($aBoxData['unformatted'],$skip_folders)) {
$skip_folders[] = $aBoxData['unformatted'];
- }
+ }
}
/**
* Retrieve list of folders when special folders are excluded. Special folders
* should be unavailable in rename/delete/unsubscribe. Theoretically user can
- * modify form and perform these operations with special folders, but if user
- * manages to delete/rename/unsubscribe special folder by hacking form...
+ * modify form and perform these operations with special folders, but if user
+ * manages to delete/rename/unsubscribe special folder by hacking form...
*
* If script or program depends on special folder, they should not assume that
* folder is available.
</table>
</td></tr>
</table>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/display_messages.php');
);
?>
-</table></body></html>
\ No newline at end of file
+</table>
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/date.php');
require_once(SM_PATH . 'functions/page_header.php');
<img src="<?php echo $DownloadLink; ?>" />
</td></tr></table>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/plugin.php');
require_once(SM_PATH . 'functions/page_header.php');
$boxes->total = $result['MESSAGES'];
$boxes->unseen = $result['UNSEEN'];
}
-
+
$pre .= "<a href=\"right_main.php?PG_SHOWALL=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
if ($unseen > 0) {
$pre .= '<b>';
?>
</td></tr></table>
-</div></body></html>
\ No newline at end of file
+</div>
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/display_messages.php');
include_once(SM_PATH . 'functions/imap.php');
include_once(SM_PATH . 'functions/plugin.php');
do_hook('options_highlight_bottom');
?>
-</table></body></html>
\ No newline at end of file
+</table>
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/global.php');
include_once(SM_PATH . 'functions/display_messages.php');
include_once(SM_PATH . 'functions/imap.php');
</table>
</td></tr>
</table>
-</body></html>
<?php
}
+$oTemplate->display('footer.tpl');
?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/imap.php');
/* get some of these globals */
echo html_tag( 'tr',
html_tag( 'td', '<hr style="height: 1px;" /><br />' . "\n" . $body, 'left', '', 'colspan="2"' )
) . "\n" ;
-
+
if (! empty($attachments)) {
// attachments title
echo html_tag( 'tr',
) . "\n" ;
}
- echo '</table>' . "\n" .
- '</body></html>';
+ echo '</table>' . "\n";
+$oTemplate->display('footer.tpl');
/* --end browser output-- */
// TODO: maybe make it nicer?
$attachments .= '<table cellpadding="1" cellspacing="0" width="100%" border="1"><tr><th colspan="2">'.decodeHeader($display_filename).'</th></tr>' .
- '<tr>'.
- html_tag( 'td',_("Size:"), 'right', '', 'width="25%"') .
+ '<tr>'.
+ html_tag( 'td',_("Size:"), 'right', '', 'width="25%"') .
html_tag( 'td',show_readable_size($header->size), 'left', '', 'width="75%"') .
'</tr><tr>' . "\n" .
html_tag( 'td',_("Type:"), 'right', '', 'width="25%"') .
- html_tag( 'td',htmlspecialchars($type0).'/'.htmlspecialchars($type1), 'left', '', 'width="75%"') .
+ html_tag( 'td',htmlspecialchars($type0).'/'.htmlspecialchars($type1), 'left', '', 'width="75%"') .
'</tr>';
if (! empty($description)) {
$attachments .= $description;
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
displayHtmlHeader( _("Printer Friendly"),
"<script language=\"javascript\" type=\"text/javascript\">\n".
'</form>',
'right' );
-?>
-</body></html>
\ No newline at end of file
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/global.php');
+include_once(SM_PATH . 'include/validate.php');
+//require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/mime.php');
require_once(SM_PATH . 'functions/date.php');
require_once(SM_PATH . 'functions/url_parser.php');
require_once(SM_PATH . 'functions/html.php');
-require_once(SM_PATH . 'functions/global.php');
+//require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/identity.php');
include_once(SM_PATH . 'functions/arrays.php');
include_once(SM_PATH . 'functions/mailbox_display.php');
*/
$mailbox_cache[$iAccount.'_'.$aMailbox['NAME']] = $aMailbox;
sqsession_register($mailbox_cache,'mailbox_cache');
-
+$oTemplate->display('footer.tpl');
?>
-</body></html>
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-require_once(SM_PATH . 'functions/global.php');
+include_once(SM_PATH . 'include/validate.php');
+//include_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/date.php');
require_once(SM_PATH . 'functions/mime.php');
require_once(SM_PATH . 'functions/mailbox_display.php');
require_once(SM_PATH . 'functions/display_messages.php');
require_once(SM_PATH . 'functions/html.php');
-require_once(SM_PATH . 'functions/plugin.php');
-include_once(SM_PATH . 'class/error.class.php');
+//require_once(SM_PATH . 'functions/plugin.php');
-//include_once(SM_PATH . 'templates/default/message_list.tpl');
-include_once(SM_PATH . 'class/template/template.class.php');
-
-/**
- * Which templatedir are we using. TODO, add make a config var of this and make it possible to switch templates
- */
-$sTplDir = SM_PATH . 'templates/default/';
-
-/*
- * Initialize the template object
- */
-$oTemplate = new Template($sTplDir);
-
-/*
- * Initialize our custom error handler object
- */
-$oErrorHandler = new ErrorHandler($oTemplate,'error_message.tpl');
-
-/*
- * Activate custom error handling
- */
-if (version_compare(PHP_VERSION, "4.3.0", ">=")) {
- $oldErrorHandler = set_error_handler(array($oErrorHandler, 'SquirrelMailErrorhandler'));
-} else {
- $oldErrorHandler = set_error_handler('SquirrelMailErrorhandler');
-}
-
// Trigger Developers to look at CSS ;)
// trigger_error("This layout sucks. Adapt squirrelmail.css!!!",E_USER_WARNING);
//sqm_trigger_imap_error('SQM_IMAP_NO_THREAD',"BLA1",'BAD', 'BLA2', array('test1'=>'test1'));
/** SquirrelMail required files.
*/
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/strings.php');
include_once(SM_PATH . 'functions/imap_asearch.php');
include_once(SM_PATH . 'functions/imap_mailbox.php');
do_hook('search_bottom');
sqimap_logout($imapConnection);
-echo '</body></html>';
+$oTemplate->display('footer.tpl');
sqsession_register($mailbox_cache,'mailbox_cache');
?>
*/
define('SM_PATH','../');
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/prefs.php');
require_once(SM_PATH . 'functions/plugin.php');
require_once(SM_PATH . 'functions/strings.php');
'', $color[0] ) ,
'center', $color[4], 'width="50%" cellpadding="2" cellspacing="0" border="0"' )
-?>
-</body>
-</html>
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
<?php
/**
* Style sheet script
- *
+ *
* Script processes GET arguments and generates CSS output from stylesheet.tpl.
* Used GET arguments:
* <ul>
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/strings.php');
require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'include/load_prefs.php');
/* temp setting containing list of font styles. Should go to config.php */
$fontsets=array();
/* template init */
/** start block copy from right_main.php */
include_once(SM_PATH . 'class/template/template.class.php');
-$sTplDir = SM_PATH . 'templates/default/';
+
$oTemplate = new Template($sTplDir);
/** end block copy */
include_once($theme[$theme_default]['PATH']);
}
+/**
+ * get alignment variable from language settings...
+ * MOVE THIS to a central init section !!!!
+ */
+if (!sqgetGlobalVar('align',$align,SQ_SESSION)) {
+ $dir = ( isset( $languages[$squirrelmail_language]['DIR']) ) ? $languages[$squirrelmail_language]['DIR'] : 'ltr';
+ if ( $dir == 'ltr' ) {
+ $align = array('left' => 'left', 'right' => 'right');
+ } else {
+ $align = array('left' => 'right', 'right' => 'left');
+ }
+ sqsession_register($align, 'align');
+}
+
/**/
$oTemplate->assign('color', $color);
/**
* set color constants in order to use simple names instead of color array
- * 0 - SQM_TEXT_DISABLED, SQM_TITLE_BACKGROUND, SQM_BUTTON_BACKGROUND_DISABLED,
+ * 0 - SQM_TEXT_DISABLED, SQM_TITLE_BACKGROUND, SQM_BUTTON_BACKGROUND_DISABLED,
* SQM_ROW_BACKGROUND_1
* 1 -
* 2 - SQM_ERROR_TEXT
* 5 - SQM_ROW_BACKGROUND_HIGHLIGHT, SQM_COLUMN_HEADER_BACKGROUND
* 6 - SQM_TEXT_STANDARD_LEFT
* 7 - SQM_TITLE_TEXT, SQM_BLOCK_TITLE_TEXT
- * 8 - SQM_TEXT_STANDARD, SQM_BUTTON_TEXT, SQM_BLOCK_TEXT, SQM_ROW_TEXT_1,
- * SQM_ROW_TEXT_2, SQM_ROW_TEXT_HIGHLIGHT, SQM_ROW_TEXT_SELECTED,
+ * 8 - SQM_TEXT_STANDARD, SQM_BUTTON_TEXT, SQM_BLOCK_TEXT, SQM_ROW_TEXT_1,
+ * SQM_ROW_TEXT_2, SQM_ROW_TEXT_HIGHLIGHT, SQM_ROW_TEXT_SELECTED,
* SQM_COLUMN_HEADER_TEXT
* 9 - SQM_BUTTON_BACKGROUND
* 10 - SQM_BLOCK_TITLE
define('SQM_ERROR_TEXT',$color[2]);
+define('SQM_ALIGN_LEFT', $align['left']);
+define('SQM_ALIGN_RIGHT', $align['right']);
+
if (sqgetGlobalVar('fontset',$fontset,SQ_GET) &&
isset($fontsets[$fontset])) {
$fontfamily=$fontsets[$fontset]['STYLE'];
Define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/mime.php');
require_once(SM_PATH . 'functions/url_parser.php');
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tr><td bgcolor="<?php echo $color[4]; ?>">
</td></tr></table>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/html.php');
$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id);
view_header($header, $mailbox, $color);
-?>
+?>
\ No newline at end of file
define('SM_PATH','../');
/** SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
include_once(SM_PATH . 'functions/imap.php');
/** Get globals */
define('SM_PATH','../');
/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/imap.php');
require_once(SM_PATH . 'functions/mime.php');
<tr><td bgcolor="<?php echo $color[4]; ?>"><tt>
<?php echo $body; ?>
</tt></td></tr></table>
-</body></html>
\ No newline at end of file
+<?php
+$oTemplate->display('footer.tpl');
+?>
\ No newline at end of file