replaced "foo" with 'foo' while doing other
authorlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 00:26:02 +0000 (00:26 +0000)
committerlbergman <lbergman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 00:26:02 +0000 (00:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1078 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/redirect.php
src/right_main.php
src/search.php
src/signout.php

index b99ad2e04d9c877200ee89455ed420be5fafaec2..4a4097a485068b3ad917d3e27121407fb456e72d 100644 (file)
@@ -14,8 +14,8 @@
     **/
 
    if (!isset($strings_php))
-      include ("../functions/strings.php");
-   include("../config/config.php");
+      include ('../functions/strings.php');
+   include('../config/config.php');
 
    // Before starting the session, the base URI must be known.
    // Assuming that this file is in the src/ subdirectory (or
    ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
    $base_uri = $regs[1];
 
-   header("Pragma: no-cache");
+   header('Pragma: no-cache');
    $location = get_location();
 
    session_set_cookie_params (0, $base_uri);
    session_start();
 
-   session_register ("base_uri");
+   session_register ('base_uri');
 
    if(!isset($login_username)) {
       exit;
 
    // Refresh the language cookie.
    if (isset($squirrelmail_language)) {
-      setcookie("squirrelmail_language", $squirrelmail_language, time()+2592000);
+      setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000);
    }
 
 
-   include ("../config/config.php");
-   include ("../functions/prefs.php");
-   include ("../functions/imap.php");
+   include ('../config/config.php');
+   include ('../functions/prefs.php');
+   include ('../functions/imap.php');
    if (!isset($plugin_php))
-      include ("../functions/plugin.php");
+      include ('../functions/plugin.php');
    if (!isset($auth_php))
-      include ("../functions/auth.php");
+      include ('../functions/auth.php');
    if (!isset($strings_php))
-      include ("../functions/strings.php");
+      include ('../functions/strings.php');
 
-   if (!session_is_registered("user_is_logged_in") || $logged_in != 1) {
-      do_hook ("login_before");
+   if (!session_is_registered('user_is_logged_in') || $logged_in != 1) {
+      do_hook ('login_before');
 
       $onetimepad = OneTimePadCreate(strlen($secretkey));
       $key = OneTimePadEncrypt($secretkey, $onetimepad);
-      session_register("onetimepad");
+      session_register('onetimepad');
       // verify that username and password are correct
       if ($force_username_lowercase)
           $login_username = strtolower($login_username);
          }
       sqimap_logout($imapConnection);
 
-      setcookie("username", $login_username, 0, $base_uri);
-      setcookie("key", $key, 0, $base_uri);
-      setcookie("logged_in", 1, 0, $base_uri);
-      do_hook ("login_verified");
+      setcookie('username', $login_username, 0, $base_uri);
+      setcookie('key', $key, 0, $base_uri);
+      setcookie('logged_in', 1, 0, $base_uri);
+      do_hook ('login_verified');
    }
 
-   session_register ("user_is_logged_in");
+   session_register ('user_is_logged_in');
    $user_is_logged_in = true;
 
    header("Location: $location/webmail.php");
index 11d09a535e4a2c9c2545c182f48cbe63a1cc0bb5..e4b569cc438cc7349f3cf79daf08fb3b49e9cc10 100644 (file)
     **/
 
    if (!isset($i18n_php))
-      include("../functions/i18n.php");
+      include('../functions/i18n.php');
 
    session_start();
 
    if(!isset($logged_in) || !isset($username) || !isset($key)) {
-      include ("../themes/default_theme.php");
-      include ("../functions/display_messages.php");
+      include ('../themes/default_theme.php');
+      include ('../functions/display_messages.php');
       printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
               $color[8], $color[4], $color[7], $color[7], $color[7]);
       plain_error_message(_("You need a valid user and password to access this page!")
-                          . "<br><a href=\"../src/login.php\">"
+                          . '<br><a href="../src/login.php">'
                           . _("Click here to log back in.") . "</a>.", $color);
-      echo "</body></html>";
+      echo '</body></html>';
       exit;
    }
 
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($imap_php))
-      include("../functions/imap.php");
+      include('../functions/imap.php');
    if (!isset($date_php))
-      include("../functions/date.php");
+      include('../functions/date.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($array_php))
-      include("../functions/array.php");
+      include('../functions/array.php');
    if (!isset($mime_php))
-      include("../functions/mime.php");
+      include('../functions/mime.php');
    if (!isset($mailbox_display_php))
-      include("../functions/mailbox_display.php");
+      include('../functions/mailbox_display.php');
    if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
+      include('../functions/display_messages.php');
 ?>
 <?php
    /////////////////////////////////////////////////////////////////////////////////
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
    /** If it was a successful login, lets load their preferences **/
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
 
    if (isset($newsort) && $newsort != $sort) {
-      setPref($data_dir, $username, "sort", $newsort);
+      setPref($data_dir, $username, 'sort', $newsort);
    }
 
    // If the page has been loaded without a specific mailbox,
    //   send them to the inbox
    if (!isset($mailbox)) {
-      $mailbox = "INBOX";
+      $mailbox = 'INBOX';
       $startMessage = 1;
    }
 
    // compensate for the UW vulnerability
-   if ($imap_server_type == "uw" && strstr($mailbox, "../")) {
-      $mailbox = "INBOX";
+   if ($imap_server_type == 'uw' && strstr($mailbox, '../')) {
+      $mailbox = 'INBOX';
    }
 
    sqimap_mailbox_select($imapConnection, $mailbox);
    displayPageHeader($color, $mailbox);
 
-   do_hook("right_main_after_header");
+   do_hook('right_main_after_header');
    
    if (isset($just_logged_in) && $just_logged_in == 1 && 
        strlen(trim($motd)) > 0) {
 
        if (isset($newsort)) {
                $sort = $newsort;
-               session_register("sort");
+               session_register('sort');
        }       
 
    // Check to see if we can use cache or not.  Currently the only time when you wont use it is
    //    array in the registered session data.  :)
    if (! isset($use_mailbox_cache))
        $use_mailbox_cache = 0;
-   if ($use_mailbox_cache && session_is_registered("msgs")) {
+   if ($use_mailbox_cache && session_is_registered('msgs')) {
       showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
    } else {
-      if (session_is_registered("msgs"))
+      if (session_is_registered('msgs'))
          unset($msgs);
-      if (session_is_registered("msort"))
+      if (session_is_registered('msort'))
          unset($msort);
-               if (session_is_registered("numMessages"))
+               if (session_is_registered('numMessages'))
                        unset($numMessages);
 
        $numMessages = sqimap_get_num_messages ($imapConnection, $mailbox);
 
       showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color, $show_num, $use_mailbox_cache);
       
-      if (session_is_registered("msgs") && isset($msgs))
-         session_register("msgs");
-      if (session_is_registered("msort") && isset($msort))
-         session_register("msort");
-      session_register("numMessages");
+      if (session_is_registered('msgs') && isset($msgs))
+         session_register('msgs');
+      if (session_is_registered('msort') && isset($msort))
+         session_register('msort');
+      session_register('numMessages');
    }
 
-   do_hook("right_main_bottom");
+   do_hook('ight_main_bottom');
    sqimap_logout ($imapConnection);
 ?>
 </FONT>
index e7e9f8d2e3d550f967ba549d1a79cc211c285574..79da86acd8aa95417a0f5303185b7f571041dd99 100644 (file)
       exit;
    }
    if(!isset($username) || !isset($key)) {
-      include ("../themes/default_theme.php");
-      include ("../functions/display_messages.php");
+      include ('../themes/default_theme.php');
+      include ('../functions/display_messages.php');
       printf('<html><BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
               $color[8], $color[4], $color[7], $color[7], $color[7]);
       plain_error_message(_("You need a valid user and password to access this page!")
-                          . "<br><a href=\"../src/login.php\">"
-                          . _("Click here to log back in.") . "</a>.", $color);
-      echo "</body></html>";
+                          . '<br><a href="../src/login.php">'
+                          . _("Click here to log back in.") . '</a>.', $color);
+      echo '</body></html>';
       exit;
    }
 
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
    if (!isset($i18n_php))
-      include("../functions/i18n.php");
+      include('../functions/i18n.php');
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($page_header_php))
-      include("../functions/page_header.php");
+      include('../functions/page_header.php');
    if (!isset($imap_php))
-      include("../functions/imap.php");
+      include('../functions/imap.php');
    if (!isset($imap_search_php))
-      include("../functions/imap_search.php");
+      include('../functions/imap_search.php');
    if (!isset($array_php))
-      include("../functions/array.php");
+      include('../functions/array.php');
 
-   include("../src/load_prefs.php");
+   include('../src/load_prefs.php');
 
    displayPageHeader($color, $mailbox);
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
-   do_hook("search_before_form");
+   do_hook('search_before_form');
    echo "<br>\n";
    echo "      <table width=95% align=center cellpadding=2 cellspacing=0 border=0>\n";
    echo "      <tr><td bgcolor=\"$color[0]\">\n";
    echo "          <center><b>"._("Search")."</b></center>\n";
    echo "      </td></tr>\n";
-   echo "      <tr><td align=center>";
+   echo '      <tr><td align=center>';
 
    echo "<FORM ACTION=\"search.php\" NAME=s>\n";
    echo "   <TABLE WIDTH=75%>\n";
    echo "     <TR>\n";
    echo "       <TD WIDTH=33%>\n";
-   echo "         <TT><SMALL><SELECT NAME=\"mailbox\">";
+   echo '         <TT><SMALL><SELECT NAME="mailbox">';
 
    $boxes = sqimap_mailbox_list($imapConnection);
    for ($i = 0; $i < count($boxes); $i++) {
-         if (!in_array("noselect", $boxes[$i]["flags"])) {
-         $box = $boxes[$i]["unformatted"];
-         $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+         if (!in_array('noselect', $boxes[$i]['flags'])) {
+         $box = $boxes[$i]['unformatted'];
+         $box2 = replace_spaces($boxes[$i]['unformatted-disp']);
          if ($mailbox == $box)
             echo "         <OPTION VALUE=\"$box\" SELECTED>$box2\n";
          else
             echo "         <OPTION VALUE=\"$box\">$box2\n";
       }
    }
-   echo "         </SELECT></SMALL></TT>";
+   echo '         </SELECT></SMALL></TT>';
    echo "       </TD>\n";
    echo "        <TD ALIGN=\"CENTER\" WIDTH=33%>\n";
    if (!isset($what))
-       $what = "";
-   $what_disp = ereg_replace(",", " ", $what);
-   $what_disp = str_replace("\\\\", "\\", $what_disp);
-   $what_disp = str_replace("\\\"", "\"", $what_disp);
-   $what_disp = str_replace("\"", "&quot;", $what_disp);
+       $what = '';
+   $what_disp = ereg_replace(',', ' ', $what);
+   $what_disp = str_replace('\\', '\', $what_disp);
+   $what_disp = str_replace('\"', '"', $what_disp);
+   $what_disp = str_replace('"', '&quot;', $what_disp);
    echo "          <INPUT TYPE=\"TEXT\" SIZE=\"20\" NAME=\"what\" VALUE=\"$what_disp\">\n";
-   echo "        </TD>";
+   echo '        </TD>';
    echo "       <TD ALIGN=\"RIGHT\" WIDTH=33%>\n";
-   echo "         <SELECT NAME=\"where\">";
+   echo '         <SELECT NAME="where">';
    
-   if (isset($where) && $where == "BODY") echo "           <OPTION VALUE=\"BODY\" SELECTED>"._("Body")."\n";
-   else echo "           <OPTION VALUE=\"BODY\">"._("Body")."\n";
+   if (isset($where) && $where == 'BODY') echo '           <OPTION VALUE="BODY" SELECTED>'._("Body")."\n";
+   else echo '           <OPTION VALUE="BODY">'._("Body")."\n";
    
-   if (isset($where) && $where == "TEXT") echo "           <OPTION VALUE=\"TEXT\" SELECTED>"._("Everywhere")."\n";
-   else echo "           <OPTION VALUE=\"TEXT\">"._("Everywhere")."\n";
+   if (isset($where) && $where == 'TEXT') echo '           <OPTION VALUE="TEXT" SELECTED>'._("Everywhere")."\n";
+   else echo '           <OPTION VALUE="TEXT">'._("Everywhere")."\n";
    
-   if (isset($where) && $where == "SUBJECT") echo "           <OPTION VALUE=\"SUBJECT\" SELECTED>"._("Subject")."\n";
-   else echo "           <OPTION VALUE=\"SUBJECT\">"._("Subject")."\n";
+   if (isset($where) && $where == 'SUBJECT') echo '           <OPTION VALUE="SUBJECT" SELECTED>'._("Subject")."\n";
+   else echo '           <OPTION VALUE="SUBJECT">'._("Subject")."\n";
    
-   if (isset($where) && $where == "FROM") echo "           <OPTION VALUE=\"FROM\" SELECTED>"._("From")."\n";
-   else echo "           <OPTION VALUE=\"FROM\">"._("From")."\n";
+   if (isset($where) && $where == 'FROM') echo '           <OPTION VALUE="FROM" SELECTED>'._("From")."\n";
+   else echo '           <OPTION VALUE="FROM">'._("From")."\n";
    
-   if (isset($where) && $where == "CC") echo "           <OPTION VALUE=\"Cc\" SELECTED>"._("Cc")."\n";
-   else echo "           <OPTION VALUE=\"CC\">"._("Cc")."\n";
+   if (isset($where) && $where == 'CC') echo '           <OPTION VALUE="Cc" SELECTED>'._("Cc")."\n";
+   else echo '           <OPTION VALUE="CC">'._("Cc")."\n";
    
-   if (isset($where) && $where == "TO") echo "           <OPTION VALUE=\"TO\" SELECTED>"._("To")."\n";
-   else echo "           <OPTION VALUE=\"TO\">"._("To")."\n";
+   if (isset($where) && $where == 'TO') echo '           <OPTION VALUE="TO" SELECTED>'._("To")."\n";
+   else echo '           <OPTION VALUE="TO">'._("To")."\n";
    
    echo "         </SELECT>\n";
    echo "        </TD>\n";
index d77db43beb6571f4caef58ed40ab6b42ccaa111c..179cfb0f2de534220ede371f21cfb13c19b0e793 100644 (file)
    session_start();
 
    if (!isset($strings_php))
-      include("../functions/strings.php");
+      include('../functions/strings.php');
 
-   include ("../src/load_prefs.php");
+   include ('../src/load_prefs.php');
 
    if (!isset($config_php))
-      include("../config/config.php");
+      include('../config/config.php');
    if (!isset($i18n_php))
-      include("../functions/i18n.php");
+      include('../functions/i18n.php');
    if (!isset($prefs_php))
-      include ("../functions/prefs.php");
+      include ('../functions/prefs.php');
    if (!isset($plugin_php))
-      include ("../functions/plugin.php");
+      include ('../functions/plugin.php');
 
-   set_up_language(getPref($data_dir, $username, "language"));
+   set_up_language(getPref($data_dir, $username, 'language'));
 
    // If a user hits reload on the last page, $base_uri isn't set
    // because it was deleted with the session.
        $base_uri = $regs[1];
    }
 
-   do_hook("logout");
-   setcookie("username", "", 0, $base_uri);
-   setcookie("key", "", 0, $base_uri);
-   setcookie("logged_in", "", 0, $base_uri);
+   do_hook('logout');
+   setcookie('username', '', 0, $base_uri);
+   setcookie('key', '', 0, $base_uri);
+   setcookie('logged_in', '', 0, $base_uri);
    session_destroy();
 ?>
 <HTML>
    <HEAD>
 <?php
-   if ($theme_css != "") {
+   if ($theme_css != '') {
       printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">', 
                $theme_css);
       echo "\n";
    
    echo "<TITLE>$org_title - Signout</TITLE>\n";
    echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
-   echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
+   echo '<BR><BR><TABLE BGCOLOR="FFFFFF" BORDER="0" COLS="1" WIDTH="50%" CELLSPACING="0" CELLPADDING="2" ALIGN="CENTER">';
    echo "   <TR BGCOLOR=$color[0] WIDTH=100%>";
-   echo "      <TD ALIGN=CENTER>";
-   echo "         <B>";
+   echo '      <TD ALIGN="CENTER">';
+   echo '         <B>';
    echo _("Sign Out");
-   echo "</B>";
-   echo "      </TD>";
-   echo "   </TR>";
+   echo '</B>';
+   echo '      </TD>';
+   echo '   </TR>';
    echo "   <TR BGCOLOR=$color[4] WIDTH=100%>";
-   echo "      <TD ALIGN=CENTER>";
-   echo "         <BR>";
+   echo '      <TD ALIGN=CENTER>';
+   echo '         <BR>';
    echo _("You have been successfully signed out.");
-   echo "<BR>";
-   echo "<A HREF=\"login.php\" TARGET=_top>";
+   echo '<BR>';
+   echo '<A HREF="login.php" TARGET=_top>';
    echo _("Click here to log back in.");
-   echo "</A><BR><BR>";
-   echo "      </TD>";
-   echo "   </TR>";
+   echo '</A><BR><BR>';
+   echo '      </TD>';
+   echo '   </TR>';
    echo "   <TR BGCOLOR=$color[0] WIDTH=100%>";
-   echo "      <TD ALIGN=CENTER>";
-       echo "                  <br>";
-   echo "      </TD>";
-   echo "   </TR>";
-   echo "</TABLE>";
-       echo "<br><br>";
+   echo '      <TD ALIGN="CENTER">;
+       echo '                  <br>';
+   echo '      </TD>';
+   echo '   </TR>';
+   echo '</TABLE>';
+       echo '<br><br>';
 ?>
 </BODY>
 </HTML>