Changeset 432 for trunk/phpgwapi


Ignore:
Timestamp:
09/16/08 15:21:54 (16 years ago)
Author:
rafaelraymundo
Message:

Referencias ao Mobile adicionadas em ambos os arquivos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/functions.inc.php

    r411 r432  
    2222         * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA            * 
    2323         \**************************************************************************/ 
    24          
    25          
     24 
     25 
    2626        /***************************************************************************\ 
    2727        * If running in PHP3, then force admin to upgrade                           * 
     
    3838 
    3939        include(PHPGW_API_INC.'/common_functions.inc.php'); 
    40          
     40 
    4141        /*! 
    4242         @function lang 
     
    5353                        $vars = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10); 
    5454                } 
    55                 // Get the translation from Lang File, if the database is down. 
    56                 if(!$GLOBALS['phpgw']->translation){ 
    57                         $fn = PHPGW_SERVER_ROOT.'/phpgwapi/setup/phpgw_'.$GLOBALS['_SERVER']['HTTP_ACCEPT_LANGUAGE'].'.lang'; 
    58                         if (file_exists($fn)){ 
    59                                 $fp = fopen($fn,'r'); 
    60                                 while ($data = fgets($fp,16000)){ 
    61                                         list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1)); 
    62                                         $GLOBALS['phpgw_info']['phpgwapi']['lang'][$message_id] =  $content; 
    63                                 } 
    64                                 fclose($fp); 
    65                         } 
    66                         $return = str_replace('%1',$vars[0],$GLOBALS['phpgw_info']['phpgwapi']['lang'][$key]);                   
    67                         return $return;   
    68                 } 
    6955                $value = $GLOBALS['phpgw']->translation->translate("$key",$vars); 
    7056                return $value; 
     
    9480        * Multi-Domain support                                                       * 
    9581        \****************************************************************************/ 
    96          
     82 
    9783        /* make them fix their header */ 
    9884        if (!isset($GLOBALS['phpgw_domain'])) 
     
    162148        } 
    163149        $GLOBALS['phpgw']->db->Halt_On_Error = 'no'; 
    164         /* jakjr: ExpressoLivre: We do not count the config table. */ 
    165         if (! 
    166150        $GLOBALS['phpgw']->db->connect( 
    167151                $GLOBALS['phpgw_info']['server']['db_name'], 
     
    171155                $GLOBALS['phpgw_info']['server']['db_pass'], 
    172156                $GLOBALS['phpgw_info']['server']['db_type'] 
    173         ) ) 
    174         //@$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config"); 
    175         //if(!@$GLOBALS['phpgw']->db->next_record()) 
    176         { 
    177                  
     157        ); 
     158        @$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config"); 
     159        if(!@$GLOBALS['phpgw']->db->next_record()) 
     160        { 
     161                $setup_dir = str_replace($_SERVER['PHP_SELF'],'index.php','setup/'); 
    178162                /* BEGIN - CELEPAR - jakjr - 05/06/2006 */ 
    179                 /* $setup_dir = str_replace($_SERVER['PHP_SELF'],'index.php','setup/'); */ 
    180163                /*echo '<center><b>Fatal Error:</b> It appears that you have not created the database tables for ' 
    181164                        .'eGroupWare.  Click <a href="' . $setup_dir . '">here</a> to run setup.</center>';*/ 
    182                 echo '<center><b>'.lang("ExpressoLivre is unavailable at this moment. Code %1<br>Please, try later.","001").'</b></center>'; 
     165                echo '<center><b>ExpressoLivre indisponível no momento. Códgio 001<br>' . 
     166                         'Tente mais tarde.</b></center>'; 
    183167                /* END - CELEPAR - jakjr - 05/06/2006 */ 
    184168                exit; 
     
    188172        /* Fill phpgw_info["server"] array */ 
    189173        // An Attempt to speed things up using cache premise 
    190         /* jakjr: ExpressoLivre does not use cache. */ 
    191         /* 
    192174        $GLOBALS['phpgw']->db->query("select config_value from phpgw_config WHERE config_app='phpgwapi' and config_name='cache_phpgw_info'",__LINE__,__FILE__); 
    193175        if ($GLOBALS['phpgw']->db->num_rows()) 
     
    195177                $GLOBALS['phpgw']->db->next_record(); 
    196178                $GLOBALS['phpgw_info']['server']['cache_phpgw_info'] = stripslashes($GLOBALS['phpgw']->db->f('config_value')); 
    197         }*/ 
    198  
    199         /* jakjr: ExpressoLivre does not use cache. */ 
    200         /*       
     179        } 
     180 
    201181        $cache_query = "select content from phpgw_app_sessions where" 
    202182                ." sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'"; 
     
    204184        $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 
    205185        $server_info_cache = $GLOBALS['phpgw']->db->num_rows(); 
    206         */ 
    207         /* 
     186 
    208187        if(@$GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $server_info_cache) 
    209188        { 
     
    212191        } 
    213192        else 
    214         {*/ 
    215                 $GLOBALS['phpgw']->db->query("SELECT * from phpgw_config WHERE config_app='phpgwapi'",__LINE__,__FILE__); 
     193        { 
     194                $GLOBALS['phpgw']->db->query("select * from phpgw_config WHERE config_app='phpgwapi'",__LINE__,__FILE__); 
    216195                while ($GLOBALS['phpgw']->db->next_record()) 
    217196                { 
     
    219198                } 
    220199 
    221                 /* 
    222200                if(@isset($GLOBALS['phpgw_info']['server']['cache_phpgw_info'])) 
    223201                { 
     
    230208                                . "'0','0','phpgwapi','config','".addslashes(serialize($GLOBALS['phpgw_info']['server']))."')"; 
    231209                        $GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__); 
    232                 }*/ 
    233         //} 
     210                } 
     211        } 
    234212        unset($cache_query); 
    235213        unset($server_info_cache); 
     
    476454                } 
    477455                $GLOBALS['phpgw']->applications->read_installed_apps(); // to get translated app-titles 
    478                  
     456 
    479457                /*************************************************************************\ 
    480458                * Load the header unless the developer turns it off                       * 
Note: See TracChangeset for help on using the changeset viewer.