X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=48cfc82880761b4214c79943537298f3ee8e0a55;hb=6540ee5ef6f1183ea6620fec82ac53f82316a419;hp=73d5da3b97cd54e87e4ef49e6338c6e6ebf6f287;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index 73d5da3b..48cfc828 100644 --- a/src/signout.php +++ b/src/signout.php @@ -11,92 +11,80 @@ * $Id$ */ -/*****************************************************************/ -/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ -/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ -/*** + Base level indent should begin at left margin, as ***/ -/*** the require_once below looks. ***/ -/*** + All identation should consist of four space blocks ***/ -/*** + Tab characters are evil. ***/ -/*** + all comments should use "slash-star ... star-slash" ***/ -/*** style -- no pound characters, no slash-slash style ***/ -/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ -/*** ALWAYS USE { AND } CHARACTERS!!! ***/ -/*** + Please use ' instead of ", when possible. Note " ***/ -/*** should always be used in _( ) function calls. ***/ -/*** Thank you for your help making the SM code more readable. ***/ -/*****************************************************************/ - require_once('../src/validate.php'); require_once('../functions/prefs.php'); require_once('../functions/plugin.php'); +require_once('../functions/strings.php'); +require_once('../functions/html.php'); + +/* Erase any lingering attachments */ +if (isset($attachments) && is_array($attachments) + && sizeof($attachments)){ + $hashed_attachment_dir = getHashedDir($username, $attachment_dir); + foreach ($attachments as $info) { + $attached_file = "$hashed_attachment_dir/$info[localfilename]"; + if (file_exists($attached_file)) { + unlink($attached_file); + } + } +} - // Erase any lingering attachments - if (! isset($attachments)) { - $attachments = array(); - } - $hashed_attachment_dir = getHashedDir($username, $attachment_dir); - foreach ($attachments as $info) { - $attached_file = "$hashed_attachment_dir/$info[localfilename]"; - if (file_exists($attached_file)) { - unlink($attached_file); - } - } +if (!isset($frame_top)) { + $frame_top = '_top'; +} - // If a user hits reload on the last page, $base_uri isn't set - // because it was deleted with the session. - if (! isset($base_uri)) { - ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs); - $base_uri = $regs[1]; - } +/* If a user hits reload on the last page, $base_uri isn't set + * because it was deleted with the session. */ +if (!isset($base_uri)) { + if (!function_exists('sqm_baseuri')){ + require_once('../functions/display_messages.php'); + } + $base_uri = sqm_baseuri(); +} - do_hook('logout'); - setcookie('username', '', 0, $base_uri); - setcookie('key', '', 0, $base_uri); - session_destroy(); +do_hook('logout'); +setcookie('username', '', 0, $base_uri); +setcookie('key', '', 0, $base_uri); +session_destroy(); - if ($signout_page) { - header("Status: 303 See Other"); - header("Location: $signout_page"); - exit; /* we send no content if we're redirecting. */ - } +if ($signout_page) { + header('Status: 303 See Other'); + header("Location: $signout_page"); + exit; /* we send no content if we're redirecting. */ +} ?> - - + + - + +<?php echo $org_title ?> - Signout + + +

+' . + _("Click here to log back in.") . '
' , + 'center' ) , + '', $color[4], 'width="100%"' ) . + html_tag( 'tr', + html_tag( 'td', '
', 'center' ) , + '', $color[0], 'width="100%"' ) , +'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' ) ?> -<?php echo $org_title ?> - Signout - - -

- - - - - - - - - - -
- -
- -
- - -

-
-
-
- - + + \ No newline at end of file