Correct changes of "" to ''.
authorthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Jan 2001 18:27:06 +0000 (18:27 +0000)
committerthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Jan 2001 18:27:06 +0000 (18:27 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1015 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/abook_database.php
functions/addressbook.php
functions/array.php
functions/auth.php
functions/date.php

index 62a2610b44408e5fab1348a0657111cff5d1c9e0..bc9fede25bec2e15dc348007908d8caf23729046 100644 (file)
     ** $Id$
     **/
    
     ** $Id$
     **/
    
-   require_once("DB.php");
+   require_once('DB.php');
    
    class abook_database extends addressbook_backend {
    
    class abook_database extends addressbook_backend {
-      var $btype = "local";
-      var $bname = "database";
+      var $btype = 'local';
+      var $bname = 'database';
       
       
-      var $dsn       = "";
-      var $table     = "";
-      var $owner     = "";
+      var $dsn       = '';
+      var $table     = '';
+      var $owner     = '';
       var $dbh       = false;
       
       var $writeable = true;
       var $dbh       = false;
       
       var $writeable = true;
          // See if user exist already
          $ret = $this->lookup($userdata['nickname']);
          if(!empty($ret))
          // See if user exist already
          $ret = $this->lookup($userdata['nickname']);
          if(!empty($ret))
-            return $this->set_error(sprintf(_((User \'%s\' already exist"),
+            return $this->set_error(sprintf(_("User '%s' already exist"),
                                             $ret['nickname']));
 
          // Create query
                                             $ret['nickname']));
 
          // Create query
index baaff51b376f8e3d89117eb8075b804e6ac3e3c7..c83d4faa524a0e850e221f24149fa7f933b07e3e 100644 (file)
@@ -11,8 +11,8 @@
    $addressbook_php = true;
 
    // Include backends here.
    $addressbook_php = true;
 
    // Include backends here.
-   include("../functions/abook_local_file.php");
-   include("../functions/abook_ldap_server.php");
+   include('../functions/abook_local_file.php');
+   include('../functions/abook_ldap_server.php');
 
 
    // Create and initialize an addressbook object. 
 
 
    // Create and initialize an addressbook object. 
@@ -24,9 +24,9 @@
       $abook = new AddressBook;
       
       // Always add a local backend
       $abook = new AddressBook;
       
       // Always add a local backend
-      $filename = sprintf("%s%s.abook", $data_dir, $username);
-      $r = $abook->add_backend("local_file", Array("filename" => $filename,
-                                                  "create"   => true));
+      $filename = sprintf('%s%s.abook', $data_dir, $username);
+      $r = $abook->add_backend('local_file', Array('filename' => $filename,
+                                                  'create'   => true));
       if(!$r && $showerr) {
         printf(_("Error opening file %s"), $filename);
         exit;
       if(!$r && $showerr) {
         printf(_("Error opening file %s"), $filename);
         exit;
        return $abook;
 
       // Load configured LDAP servers (if PHP has LDAP support)
        return $abook;
 
       // Load configured LDAP servers (if PHP has LDAP support)
-      if(is_array($ldap_server) && function_exists("ldap_connect")) {
+      if(is_array($ldap_server) && function_exists('ldap_connect')) {
         reset($ldap_server);
         while(list($undef,$param) = each($ldap_server)) {
            if(is_array($param)) {
         reset($ldap_server);
         while(list($undef,$param) = each($ldap_server)) {
            if(is_array($param)) {
-              $r = $abook->add_backend("ldap_server", $param);
+              $r = $abook->add_backend('ldap_server', $param);
               if(!$r && $showerr) {
               if(!$r && $showerr) {
-                 printf("&nbsp;"._("Error initializing LDAP server %s:").
-                        "<BR>\n", $param["host"]);
-                 printf("&nbsp;".$abook->error);
+                 printf('&nbsp;' . _("Error initializing LDAP server %s:") .
+                      "<BR>\n", $param['host']);
+                 print('&nbsp;' . $abook->error);
                  exit;
               }
            }
                  exit;
               }
            }
    // Had to move this function outside of the Addressbook Class
    // PHP 4.0.4 Seemed to be having problems with inline functions.
    function cmp($a,$b) {   
    // Had to move this function outside of the Addressbook Class
    // PHP 4.0.4 Seemed to be having problems with inline functions.
    function cmp($a,$b) {   
-      if($a["backend"] > $b["backend"]) 
+      if($a['backend'] > $b['backend']) 
             return 1;
             return 1;
-         else if($a["backend"] < $b["backend"]) 
+         else if($a['backend'] < $b['backend']) 
             return -1;
             return -1;
-         return (strtolower($a["name"]) > strtolower($b["name"])) ? 1 : -1;
+         return (strtolower($a['name']) > strtolower($b['name'])) ? 1 : -1;
    }
 
 
    }
 
 
@@ -76,9 +76,9 @@
    class AddressBook { 
       var $backends    = array();
       var $numbackends = 0;
    class AddressBook { 
       var $backends    = array();
       var $numbackends = 0;
-      var $error       = "";
+      var $error       = '';
       var $localbackend = 0;
       var $localbackend = 0;
-      var $localbackendname = "";
+      var $localbackendname = '';
 
       // Constructor function.
       function AddressBook() {
 
       // Constructor function.
       function AddressBook() {
@@ -87,7 +87,7 @@
 
       // Return an array of backends of a given type, 
       // or all backends if no type is specified.
 
       // Return an array of backends of a given type, 
       // or all backends if no type is specified.
-      function get_backend_list($type = "") {
+      function get_backend_list($type = '') {
         $ret = array();
         for($i = 1 ; $i <= $this->numbackends ; $i++) {
            if(empty($type) || $type == $this->backends[$i]->btype) {
         $ret = array();
         for($i = 1 ; $i <= $this->numbackends ; $i++) {
            if(empty($type) || $type == $this->backends[$i]->btype) {
       // (without the abook_ prefix), and $param is an optional
       // mixed variable that is passed to the backend constructor.
       // See each of the backend classes for valid parameters.
       // (without the abook_ prefix), and $param is an optional
       // mixed variable that is passed to the backend constructor.
       // See each of the backend classes for valid parameters.
-      function add_backend($backend, $param = "") {
-        $backend_name = "abook_".$backend;
+      function add_backend($backend, $param = '') {
+        $backend_name = 'abook_' . $backend;
         eval("\$newback = new $backend_name(\$param);");
         if(!empty($newback->error)) {
            $this->error = $newback->error;
         eval("\$newback = new $backend_name(\$param);");
         if(!empty($newback->error)) {
            $this->error = $newback->error;
         $this->backends[$this->numbackends] = $newback;
 
         // Store ID of first local backend added
         $this->backends[$this->numbackends] = $newback;
 
         // Store ID of first local backend added
-        if($this->localbackend == 0 && $newback->btype == "local") {
+        if($this->localbackend == 0 && $newback->btype == 'local') {
            $this->localbackend = $this->numbackends;
            $this->localbackendname = $newback->sname;
         }
            $this->localbackend = $this->numbackends;
            $this->localbackendname = $newback->sname;
         }
       // all backends of a given type.
       function search($expression, $bnum = -1) {
         $ret = array();
       // all backends of a given type.
       function search($expression, $bnum = -1) {
         $ret = array();
-        $this->error = "";
+        $this->error = '';
 
         // Search all backends
         if($bnum == -1) {
 
         // Search all backends
         if($bnum == -1) {
-           $sel = $this->get_backend_list("");
+           $sel = $this->get_backend_list('');
            $failed = 0;
            for($i = 0 ; $i < sizeof($sel) ; $i++) {
               $backend = &$sel[$i];
            $failed = 0;
            for($i = 0 ; $i < sizeof($sel) ; $i++) {
               $backend = &$sel[$i];
-              $backend->error = "";
+              $backend->error = '';
               $res = $backend->search($expression);
               if(is_array($res)) {
                  $ret = array_merge($ret, $res);
               } else {
               $res = $backend->search($expression);
               if(is_array($res)) {
                  $ret = array_merge($ret, $res);
               } else {
-                 $this->error = $this->error . "<br>\n". $backend->error;
+                 $this->error .= "<br>\n" . $backend->error;
                  $failed++;
               }
            }
                  $failed++;
               }
            }
         else {
            $ret = $this->backends[$bnum]->search($expression);
            if(!is_array($ret)) {
         else {
            $ret = $this->backends[$bnum]->search($expression);
            if(!is_array($ret)) {
-              $this->error = $this->error . "<br>\n". $this->backends[$bnum]->error;
+              $this->error .= "<br>\n" . $this->backends[$bnum]->error;
               return false;
            }
         }
               return false;
            }
         }
            }
         }     
 
            }
         }     
 
-        $sel = $this->get_backend_list("local");
+        $sel = $this->get_backend_list('local');
         for($i = 0 ; $i < sizeof($sel) ; $i++) {
            $backend = &$sel[$i];
         for($i = 0 ; $i < sizeof($sel) ; $i++) {
            $backend = &$sel[$i];
-           $backend->error = "";
+           $backend->error = '';
            $res = $backend->lookup($alias);
            if(is_array($res)) {
               if(!empty($res))
            $res = $backend->lookup($alias);
            if(is_array($res)) {
               if(!empty($res))
         $ret = array();
 
         if($bnum == -1) 
         $ret = array();
 
         if($bnum == -1) 
-           $sel = $this->get_backend_list("local");
+           $sel = $this->get_backend_list('local');
         else
            $sel = array(0 => &$this->backends[$bnum]);
 
         for($i = 0 ; $i < sizeof($sel) ; $i++) {
            $backend = &$sel[$i];
         else
            $sel = array(0 => &$this->backends[$bnum]);
 
         for($i = 0 ; $i < sizeof($sel) ; $i++) {
            $backend = &$sel[$i];
-           $backend->error = "";
+           $backend->error = '';
            $res = $backend->list_addr();
            if(is_array($res)) {
               $ret = array_merge($ret, $res);
            $res = $backend->list_addr();
            if(is_array($res)) {
               $ret = array_merge($ret, $res);
            $this->error = _("Invalid input data");
            return false;
         }
            $this->error = _("Invalid input data");
            return false;
         }
-        if(empty($userdata["firstname"]) &&
-           empty($userdata["lastname"])) {
+        if(empty($userdata['firstname']) &&
+           empty($userdata['lastname'])) {
            $this->error = _("Name is missing");
            return false;
         }
            $this->error = _("Name is missing");
            return false;
         }
-        if(empty($userdata["email"])) {
+        if(empty($userdata['email'])) {
            $this->error = _("E-mail address is missing");
            return false;
         }
            $this->error = _("E-mail address is missing");
            return false;
         }
-        if(empty($userdata["nickname"])) {
-           $userdata["nickname"] = $userdata["email"];
+        if(empty($userdata['nickname'])) {
+           $userdata['nickname'] = $userdata['email'];
         }
 
         }
 
-        if(eregi("[\: \|\#\"\!]", $userdata["nickname"])) {
+        if(eregi("[\: \|\#\"\!]", $userdata['nickname'])) {
            $this->error = _("Nickname contain illegal characters");
            return false;
         }
            $this->error = _("Nickname contain illegal characters");
            return false;
         }
            $this->error = _("Invalid input data");
            return false;
         }
            $this->error = _("Invalid input data");
            return false;
         }
-        if(empty($userdata["firstname"]) &&
-           empty($userdata["lastname"])) {
+        if(empty($userdata['firstname']) &&
+           empty($userdata['lastname'])) {
            $this->error = _("Name is missing");
            return false;
         }
            $this->error = _("Name is missing");
            return false;
         }
-        if(empty($userdata["email"])) {
+        if(empty($userdata['email'])) {
            $this->error = _("E-mail address is missing");
            return false;
         }
 
            $this->error = _("E-mail address is missing");
            return false;
         }
 
-        if(eregi("[\: \|\#\"\!]", $userdata["nickname"])) {
+        if(eregi("[\: \|\#\"\!]", $userdata['nickname'])) {
            $this->error = _("Nickname contain illegal characters");
            return false;
         }
 
            $this->error = _("Nickname contain illegal characters");
            return false;
         }
 
-        if(empty($userdata["nickname"])) {
-           $userdata["nickname"] = $userdata["email"];
+        if(empty($userdata['nickname'])) {
+           $userdata['nickname'] = $userdata['email'];
         }
 
         // Check that specified backend is writable
         }
 
         // Check that specified backend is writable
    class addressbook_backend {
 
       // Variables that all backends must provide.
    class addressbook_backend {
 
       // Variables that all backends must provide.
-      var $btype      = "dummy";
-      var $bname      = "dummy";
-      var $sname      = "Dummy backend";
+      var $btype      = 'dummy';
+      var $bname      = 'dummy';
+      var $sname      = 'Dummy backend';
 
       // Variables common for all backends, but that 
       // should not be changed by the backends.
       var $bnum       = -1;
 
       // Variables common for all backends, but that 
       // should not be changed by the backends.
       var $bnum       = -1;
-      var $error      = "";
+      var $error      = '';
       var $writeable  = false;
 
       function set_error($string) {
       var $writeable  = false;
 
       function set_error($string) {
-        $this->error = "[" . $this->sname . "] " . $string;
+        $this->error = '[' . $this->sname . '] ' . $string;
         return false;
       }
 
         return false;
       }
 
       // ========================== Public ========================
 
       function search($expression) {
       // ========================== Public ========================
 
       function search($expression) {
-        $this->set_error("search not implemented");
+        $this->set_error('search not implemented');
         return false;
       }
 
       function lookup($alias) {
         return false;
       }
 
       function lookup($alias) {
-        $this->set_error("lookup not implemented");
+        $this->set_error('lookup not implemented');
         return false;
       }
 
       function list_addr() {
         return false;
       }
 
       function list_addr() {
-        $this->set_error("list_addr not implemented");
+        $this->set_error('list_addr not implemented');
         return false;
       }
 
       function add($userdata) {
         return false;
       }
 
       function add($userdata) {
-        $this->set_error("add not implemented");
+        $this->set_error('add not implemented');
         return false;
       }
 
       function remove($alias) {
         return false;
       }
 
       function remove($alias) {
-        $this->set_error("delete not implemented");
+        $this->set_error('delete not implemented');
         return false;
       }
 
       function modify($alias, $newuserdata) {
         return false;
       }
 
       function modify($alias, $newuserdata) {
-        $this->set_error("modify not implemented");
+        $this->set_error('modify not implemented');
         return false;
       }
 
         return false;
       }
 
index b59f21c960e76612ae1fa8cb32c3881319c32bb2..5d959fe1441d4a219b5d1daddb572b0714d4a85f 100644 (file)
       // These should be $this->col and $this->dir in a class
       // Would beat using globals
       if(!is_array($col)){
       // These should be $this->col and $this->dir in a class
       // Would beat using globals
       if(!is_array($col)){
-         $col = array("$col");
+         $col = array($col);
       }
       }
-      $GLOBALS["col"] = $col;  // Column or Columns as an array
-      $GLOBALS["dir"] = $dir;  // Direction, a positive number for ascending a negative for descending
+      $GLOBALS['col'] = $col;  // Column or Columns as an array
+      $GLOBALS['dir'] = $dir;  // Direction, a positive number for ascending a negative for descending
 
       usort($ary,'comp2');
       return $ary;
 
       usort($ary,'comp2');
       return $ary;
          global $col;
          global $dir;
          $c = count($col) -1;
          global $col;
          global $dir;
          $c = count($col) -1;
-         if ($a["$col[$i]"] == $b["$col[$i]"]){
+         if ($a[$col[$i]] == $b[$col[$i]]){
             $r = 0;
             while($i < $c && $r == 0){
                $i++;
                $r = comp2($a,$b,$i);
             }
             $r = 0;
             while($i < $c && $r == 0){
                $i++;
                $r = comp2($a,$b,$i);
             }
-         } elseif($a["$col[$i]"] < $b["$col[$i]"]){
+         } elseif($a[$col[$i]] < $b[$col[$i]]){
             $r = -1 * $dir; // Im not sure why you must * dir here, but it wont work just before the return...
          } else {
             $r = 1 * $dir;
             $r = -1 * $dir; // Im not sure why you must * dir here, but it wont work just before the return...
          } else {
             $r = 1 * $dir;
@@ -58,7 +58,7 @@
     $key=0;
     $array2 = array();
     while ($key < count($array1)) {
     $key=0;
     $array2 = array();
     while ($key < count($array1)) {
-        array_push($array2, $array1[$key]["$column"]);
+        array_push($array2, $array1[$key][$column]);
         $key++;
     }
 
         $key++;
     }
 
index fec8c1b342aa86c06d2c5062a3fae81ebced2191..f302a496e021bdb2ddb3f6d2d23f25a1489a0c23 100644 (file)
@@ -11,7 +11,7 @@
    $auth_php = true;
 
    function is_logged_in () {
    $auth_php = true;
 
    function is_logged_in () {
-      if (!session_is_registered("user_is_logged_in")) {
+      if (!session_is_registered('user_is_logged_in')) {
          echo _("You must login first.");
          echo "</body></html>\n\n";
          exit;
          echo _("You must login first.");
          echo "</body></html>\n\n";
          exit;
index d814c51383cd18646f889d048255147738727d1a..1b2811532289370eef75cbbac0fb97c5a10bab0f 100644 (file)
@@ -5,7 +5,7 @@
     **  Takes a date and parses it into a usable format.  The form that a
     **  date SHOULD arrive in is:
     **        <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
     **  Takes a date and parses it into a usable format.  The form that a
     **  date SHOULD arrive in is:
     **        <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
-    **  (as specified in RFC 822) -- "Tue" is optional
+    **  (as specified in RFC 822) -- 'Tue' is optional
     **
     **  $Id$
     **/
     **
     **  $Id$
     **/
    // corrects a time stamp to be the local time
    function getGMTSeconds($stamp, $gmt) {
       global $invert_time;
    // corrects a time stamp to be the local time
    function getGMTSeconds($stamp, $gmt) {
       global $invert_time;
-      if (($gmt == "Pacific") || ($gmt == "PST"))
-         $gmt = "-0800";
-      else if (($gmt == "EDT"))
-         $gmt = "-0400";
-      else if (($gmt == "Eastern") || ($gmt == "EST") || ($gmt == "CDT"))
-         $gmt = "-0500";
-      else if (($gmt == "Central") || ($gmt == "CST") || ($gmt == "MDT"))
-         $gmt = "-0600";
-      else if (($gmt == "Mountain") || ($gmt == "MST") || ($gmt == "PDT"))
-         $gmt = "-0700";
-      else if ($gmt == "BST")
-         $gmt = "+0100";
-      else if ($gmt == "EET")
-         $gmt = "+0200";
-      else if ($gmt == "GMT")
-         $gmt = "+0000";
-      else if ($gmt == "HKT")
-         $gmt = "+0800";
-      else if ($gmt == "IST")
-         $gmt = "+0200";
-      else if ($gmt == "JST")
-         $gmt = "+0900";
-      else if ($gmt == "MET")
-         $gmt = "+0100";
-      else if ($gmt == "MET DST" || $gmt == "METDST")
-         $gmt = "+0200";
+      if (($gmt == 'Pacific') || ($gmt == 'PST'))
+         $gmt = '-0800';
+      else if (($gmt == 'EDT'))
+         $gmt = '-0400';
+      else if (($gmt == 'Eastern') || ($gmt == 'EST') || ($gmt == 'CDT'))
+         $gmt = '-0500';
+      else if (($gmt == 'Central') || ($gmt == 'CST') || ($gmt == 'MDT'))
+         $gmt = '-0600';
+      else if (($gmt == 'Mountain') || ($gmt == 'MST') || ($gmt == 'PDT'))
+         $gmt = '-0700';
+      else if ($gmt == 'BST')
+         $gmt = '+0100';
+      else if ($gmt == 'EET')
+         $gmt = '+0200';
+      else if ($gmt == 'GMT')
+         $gmt = '+0000';
+      else if ($gmt == 'HKT')
+         $gmt = '+0800';
+      else if ($gmt == 'IST')
+         $gmt = '+0200';
+      else if ($gmt == 'JST')
+         $gmt = '+0900';
+      else if ($gmt == 'MET')
+         $gmt = '+0100';
+      else if ($gmt == 'MET DST' || $gmt == 'METDST')
+         $gmt = '+0200';
       
       
-      if (substr($gmt, 0, 1) == "-") {
+      if (substr($gmt, 0, 1) == '-') {
          $neg = true;
          $gmt = substr($gmt, 1, strlen($gmt));
          $neg = true;
          $gmt = substr($gmt, 1, strlen($gmt));
-      } else if (substr($gmt, 0, 1) == "+") {
+      } else if (substr($gmt, 0, 1) == '+') {
          $neg = false;
          $gmt = substr($gmt, 1, strlen($gmt));
       } else
          $neg = false;
          $gmt = substr($gmt, 1, strlen($gmt));
       } else
@@ -59,7 +59,7 @@
          $gmt = "+$gmt";
 
       /** now find what the server is at **/
          $gmt = "+$gmt";
 
       /** now find what the server is at **/
-      $current = date("Z", time());
+      $current = date('Z', time());
       if ($invert_time)
           $current = - $current;
       $stamp = (int)$stamp - (int)$gmt + (int)$current;
       if ($invert_time)
           $current = - $current;
       $stamp = (int)$stamp - (int)$gmt + (int)$current;
    }
 
    function getLongDateString($stamp) {
    }
 
    function getLongDateString($stamp) {
-      return date("D, F j, Y g:i a", $stamp);
+      return date('D, F j, Y g:i a', $stamp);
    }
 
    function getDateString($stamp) {
       global $invert_time;
       $now = time();
    }
 
    function getDateString($stamp) {
       global $invert_time;
       $now = time();
-      $dateZ = date("Z", $now);
+      $dateZ = date('Z', $now);
       if ($invert_time)
           $dateZ = - $dateZ;
       $midnight = $now - ($now % 86400) - $dateZ;
 
       if ($midnight < $stamp) {
          // Today
       if ($invert_time)
           $dateZ = - $dateZ;
       $midnight = $now - ($now % 86400) - $dateZ;
 
       if ($midnight < $stamp) {
          // Today
-         return date("g:i a", $stamp);
+         return date('g:i a', $stamp);
       } else if ($midnight - (60 * 60 * 24 * 6) < $stamp) {
          // This week
       } else if ($midnight - (60 * 60 * 24 * 6) < $stamp) {
          // This week
-         return date("D, g:i a", $stamp);
+         return date('D, g:i a', $stamp);
       } else {
          // before this week 
       } else {
          // before this week 
-         return date("M j, Y", $stamp);
+         return date('M j, Y', $stamp);
       }
    }
 
       }
    }
 
       // array is an integer or not.
       //    Since the day of week is optional, this check is needed.  
       //    
       // array is an integer or not.
       //    Since the day of week is optional, this check is needed.  
       //    
-      //    The old code used eregi("mon|tue|wed|thu|fri|sat|sun",
+      //    The old code used eregi('mon|tue|wed|thu|fri|sat|sun',
       //    $dateParts[0], $tmp) to find if the first element was the
       //    day of week or day of month. This is an expensive call
       //    (processing time) to have inside a loop. Doing it this way
       //    $dateParts[0], $tmp) to find if the first element was the
       //    day of week or day of month. This is an expensive call
       //    (processing time) to have inside a loop. Doing it this way
       //    getHour, getMinute, and getSecond.
       //
       if (intval(trim($dateParts[0])) > 0) {
       //    getHour, getMinute, and getSecond.
       //
       if (intval(trim($dateParts[0])) > 0) {
-         $string = $dateParts[0] . " " . $dateParts[1] . " " . $dateParts[2] . " " . $dateParts[3];
+         $string = $dateParts[0] . ' ' . $dateParts[1] . ' ' . 
+                   $dateParts[2] . ' ' . $dateParts[3];
          return getGMTSeconds(strtotime($string), $dateParts[4]);
       }
          return getGMTSeconds(strtotime($string), $dateParts[4]);
       }
-      $string = $dateParts[0] . " " . $dateParts[1] . " " . $dateParts[2] . " " . $dateParts[3] . " " . $dateParts[4];
+      $string = $dateParts[0] . ' ' . $dateParts[1] . ' ' .
+                $dateParts[2] . ' ' . $dateParts[3] . ' ' . $dateParts[4];
          if (isset($dateParts[5]))
        return getGMTSeconds(strtotime($string), $dateParts[5]);
          else 
          if (isset($dateParts[5]))
        return getGMTSeconds(strtotime($string), $dateParts[5]);
          else 
-               return getGMTSeconds(strtotime($string), "");
+               return getGMTSeconds(strtotime($string), '');
    }
 
    // I use this function for profiling. Should never be called in
    // actual versions of squirrelmail released to public.
    function getmicrotime() {
       $mtime = microtime();
    }
 
    // I use this function for profiling. Should never be called in
    // actual versions of squirrelmail released to public.
    function getmicrotime() {
       $mtime = microtime();
-      $mtime = explode(" ",$mtime);
+      $mtime = explode(' ',$mtime);
       $mtime = $mtime[1] + $mtime[0];
       return ($mtime);
    }
       $mtime = $mtime[1] + $mtime[0];
       return ($mtime);
    }