Changeset 3018 for branches/2.2


Ignore:
Timestamp:
07/08/10 17:52:20 (14 years ago)
Author:
amuller
Message:

Ticket #1135 - Aplicando alterações do branches 2.0 no branches 2.2

Location:
branches/2.2
Files:
2 added
62 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/inc/class.uiconfig.inc.php

    r1325 r3018  
    200200                        $t->set_var('row_on',    $GLOBALS['phpgw_info']['theme']['row_on']); 
    201201                        $t->set_var('row_off',   $GLOBALS['phpgw_info']['theme']['row_off']); 
     202                        $t->set_var('php_upload_limit',str_replace('M','',ini_get('upload_max_filesize'))); 
    202203                        $t->pparse('out','header'); 
    203204 
  • branches/2.2/calendar/inc/class.boicalendar.inc.php

    r678 r3018  
    12751275                        if($this->line < count($ical_text)) 
    12761276                        { 
    1277                                 $str = str_replace("\r\n",'',$ical_text[$this->line]); 
     1277                                $str = str_replace(array("\r\n","\r","\n"), '', $ical_text[$this->line]); 
     1278 
    12781279                                $this->line = $this->line + 1; 
    12791280                                while(ereg("^[[:space:]]",$ical_text[$this->line])) 
     
    12821283                                        $this->line = $this->line + 1; 
    12831284                                } 
     1285                                // Corrige a codificacao dos caracteres 
     1286                                $str = utf8_decode ( trim ($str) ); 
    12841287                                $this->debug("LINE : ".$str); 
    12851288                                return $str; 
     
    14051408                function parse_parameters(&$event,$majortype,$value) 
    14061409                { 
     1410                        $this->debug ('value: '.$value); 
    14071411                        if(!ereg('[\=\;]',$value)) 
    14081412                        { 
     
    14511455                                } 
    14521456                        } 
     1457 
     1458                        $this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 
    14531459 
    14541460                        for($i=0;$i<count($return_value);$i++) 
     
    15281534                        if($this->property[$majortype][$mode]['multiples']) 
    15291535                        { 
    1530                                 $this->debug(_debug_array($var,False)); 
     1536                                $this->debug('parse_value var array: '._debug_array($var,False)); 
    15311537                                $event[$majortype][] = $var; 
    15321538                        } 
     
    15401546                                        $t_var = $var[$majortype]; 
    15411547                                        unset($var[$majortype]); 
    1542                                         reset($t_var); 
    1543                                         while(list($key,$val) = each($t_var)) 
    1544                                         { 
    1545                                                 $var[$key] = $val; 
    1546                                         } 
    1547                                         $this->debug($majortype.' : '._debug_array($var,False)); 
     1548                                        if ( $t_var ) 
     1549                                        { 
     1550                                                reset($t_var); 
     1551                                                while(list($key,$val) = each($t_var)) 
     1552                                                { 
     1553                                                        $var[$key] = $val; 
     1554                                                } 
     1555                                                $this->debug($majortype.' : '._debug_array($var,False)); 
     1556                                        } 
    15481557                                } 
    15491558                                $this->set_var($event,$majortype,$var); 
     
    22602269                function switch_partstat($var) 
    22612270                { 
    2262 //                      $this->debug_str = True; 
    22632271                        $this->debug('PARTSTAT = '.$var); 
    2264 //                      $this->debug_str = False; 
    22652272                        if(is_string($var)) 
    22662273                        { 
     
    25672574 
    25682575                                ereg($property_regexp,$text,$temp); 
     2576                                $this->debug ('Majortype dump: '._debug_array($temp, false) ); 
    25692577                                $majortype = str_replace('-','_',strtolower($temp[1])); 
    25702578                                $value = chop($temp[2]); 
     
    27672775                                elseif($state == 'optional' || $state == 'required') 
    27682776                                { 
    2769                                         $this->debug('Mode : '.$mode.' Majortype : '.$majortype); 
     2777                                        $this->debug('Mode : '.$mode.' Majortype : '.$majortype . ' Type : '.$type); 
    27702778                                        if($do_to_text) 
    27712779                                        { 
     
    30163024                                        break; 
    30173025                        } 
     3026                        $this->debug ('ical parse result: ' . _debug_array ($ical, false)); 
    30183027                        $c_events = count($ical['event']); 
    30193028                        for($i=0;$i<$c_events;$i++) 
     
    30563065                                                $so_event->set_ex_participants($ical['event'][$i]['ex_participants']['value']); 
    30573066                                        } 
     3067                                        // Compatibilidade com agendamentos vindos do outlook/exchange 
     3068                                        if ( isset ($ical['event'][$i]['attendee']) ) 
     3069                                        { 
     3070                                                $c_attendees = count($ical['event'][$i]['attendee']); 
     3071                                                $all_attendees = ''; 
     3072                                                for ( $a=0; $a < $c_attendees; $a++ ) 
     3073                                                { 
     3074                                                        $cname = '"'. $ical['event'][$i]['attendee'][$a]['cn'] .'"'; 
     3075                                                        $email = $ical['event'][$i]['attendee'][$a]['mailto']['user']; 
     3076                                                        if ( $email ) 
     3077                                                                $email = '<'. $email .'@'. $ical['event'][$i]['attendee'][$a]['mailto']['host'] .'>'; 
     3078                                                        else 
     3079                                                                $email = ''; 
     3080                                                         
     3081                                                        $all_attendees .= $cname . $email .', '; 
     3082                                                } 
     3083                                                $this->debug ('All attendees: ' . $all_attendees); 
     3084                                                $so_event->set_ex_participants($all_attendees); 
     3085                                        } 
     3086 
    30583087                                        if($ical['event'][$i]['location']['value']) 
    30593088                                        { 
     
    32963325                                        else 
    32973326                                        { 
    3298 //owner 
     3327                                                $so_event->add_attribute('participants','A',(int)$GLOBALS['phpgw_info']['user']['account_id']); 
    32993328                                        } 
    33003329 
     
    35853614                        if($this->debug_str) 
    35863615                        { 
    3587                                 echo $str."<br>\n"; 
     3616                                //echo $str."<br>\n"; 
     3617                                $log = fopen('/tmp/calendar.log', 'a') or die("nao foi possivel abrir o arquivo /tmp/calendar.log"); 
     3618                                fwrite($log, $str . "\n"); 
     3619                                fclose($log); 
    35883620                        } 
    35893621                } 
  • branches/2.2/calendar/inc/class.socalendar_sql.inc.php

    r1949 r3018  
    309309                                                        ); 
    310310 
     311                                        $result = array();  
    311312                                        do 
    312313                                        { 
     
    317318                                                if($quociente == 1) 
    318319                                                { 
    319                                                         $result[] .= $dias_semana[$divisor]; 
     320                                                        $result[] = $dias_semana[$divisor]; 
    320321 
    321322                                                        $divisor = $divisor / 2; 
     
    335336                                                        { 
    336337 
    337                                                                 $result[] .= $dias_semana[$divisor]; 
     338                                                                $result[] = $dias_semana[$divisor]; 
    338339 
    339340                                                                $divisor = $divisor / 2; 
  • branches/2.2/contactcenter/inc/class.ui_data.inc.php

    r1690 r3018  
    20722072 
    20732073                        /* Verify Data and performs insertion/update */ 
    2074                         foreach($data as $field => &$value) 
     2074                        foreach($data as $field => $value) 
    20752075                        { 
    20762076                                if ($value == '' or is_null($value)) 
     
    20822082                                switch($field) 
    20832083                                { 
     2084                                        case 'names_ordered': 
     2085                                                $data[$field] = urldecode($value);  
    20842086                                        case 'corporate_name': 
    20852087                                        case 'job_title': 
     
    20892091                                        case 'given_names': 
    20902092                                        case 'family_names': 
    2091                                         case 'names_ordered': 
    20922093                                        case 'pgp_key': 
    20932094                                        case 'notes': 
    2094                                                 /* Do Nothing. This is just to make sure no invalid field is passed */ 
     2095                                                $data[$field] = urldecode($data[$field]); 
    20952096                                                break; 
    20962097 
     
    21672168                                                                if ($value['new_cities'][$type]) 
    21682169                                                                { 
    2169                                                                         $value['new_cities'][$type]['id_state'] = $id_state; 
     2170                                                                        $data[$field]['new_cities'][$type]['id_state'] = $id_state;  
    21702171                                                                } 
    21712172                                                        } 
     
    22032204                        } 
    22042205 
    2205                         $code = '$id = $this->bo->catalog->'; 
    2206  
    22072206                        if (!is_null($id) and $id !== '') 
    22082207                        { 
    2209                                 $code .= $code.'update_single_info($id, $data);'; 
     2208                                $id = $this->bo->catalog->update_single_info($id, $data);  
    22102209                                $result = array( 
    22112210                                        'msg' => lang('Updated Successfully!'), 
     
    22152214                        else 
    22162215                        { 
    2217                                 $code .= 'add_single_entry($data);'; 
     2216                                $id = $this->bo->catalog->add_single_entry($data);  
    22182217                                $result = array( 
    22192218                                        'msg' => lang('Entry Added Successfully!'), 
     
    22212220                                ); 
    22222221                        } 
    2223  
    2224                         eval($code); 
    22252222 
    22262223                        if (!($id)) 
     
    23712368                                        case 'notes': 
    23722369                                        case 'photo': 
    2373                                                 $value = urldecode( $value ); 
    2374                                                 /* Do Nothing. This is just to make sure no invalid field is passed */ 
     2370                                                $data[$field] = urldecode( $value );  
    23752371                                                break; 
    23762372 
  • branches/2.2/doc-expressolivre/debian/arqs-conf/header.inc.php

    r1358 r3018  
    1818        * the absolute path to fit your site, and you should be up and running.    * 
    1919        \**************************************************************************/ 
    20  
     20        ob_start();  
    2121        define('PHPGW_SERVER_ROOT','/var/www/expresso'); 
    2222        define('PHPGW_INCLUDE_ROOT','/var/www/expresso'); 
     
    127127        { 
    128128                include(PHPGW_API_INC . '/functions.inc.php'); 
    129                 include(PHPGW_API_INC . '/xml_functions.inc.php'); 
    130                 include(PHPGW_API_INC . '/soap_functions.inc.php'); 
    131129        } 
    132130        $connection_id = $GLOBALS['phpgw']->session->sessionid; 
    133131        if (!strlen($connection_id) != 32){ 
    134                 if (!isset($_SESSION['connection_db_info'])) 
    135                 { 
    136                 $GLOBALS['phpgw']->db->query("select trim(sessionid), ip, browser from phpgw_access_log where account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['phpgw']->session->sessionid}' limit 1",__LINE__,__FILE__); 
    137                 $GLOBALS['phpgw']->db->next_record( ); 
    138                 $_SESSION['connection_db_info']['user_auth'] = $GLOBALS['phpgw']->db->row( ); 
    139                 } 
    140132                include("header.session.inc.php"); 
    141133        } 
  • branches/2.2/doc-expressolivre/debian/expressoInstallDebian-lenny.sh

    r1331 r3018  
    33# Criado por João Alfredo Knopik Junior <jakjr@celepar.pr.gov.br> 
    44# Colaborações: 
    5 #       "William Fernando Merlotto" <william@prognus.com.br> 
    6 #       "Alexandre Felipe Muller de Souza" <amuller@celepar.pr.gov.br> 
     5#       "William Fernando Merlotto" <william@prognus.com.br> 
     6#       "Alexandre Felipe Muller de Souza" <amuller@celepar.pr.gov.br> 
    77 
    88set -e # Para caso de erro 
    99 
    1010if [ $UID != 0 ]; then { 
    11         echo "Este script deve ser executado como superusuario, root ou sudo"; 
    12         exit 1; 
    13         } 
     11        echo "Este script deve ser executado como superusuario, root ou sudo"; 
     12        exit 1; 
     13        } 
    1414fi 
    1515 
     
    4949dialog --backtitle "$BACKTITLE" --cr-wrap --msgbox \ 
    5050"A instalação dos pacotes necessários para o ExpressoLivre começará agora." 10 65 && 
    51 #.....................................................................       
     51#..................................................................... 
    5252 
    5353apt-get install -y apache2-mpm-prefork libapache2-mod-php5 apache2-utils php5 php5-common php5-dev php5-gd php5-imap php5-ldap php5-pgsql php5-cgi php5-cli slapd ldap-utils db4.2-util cyrus-admin-2.2 cyrus-clients-2.2 cyrus-common-2.2 cyrus-doc-2.2 cyrus-imapd-2.2 libcyrus-imap-perl22 postfix postfix-ldap libsasl2-2 libsasl2-modules sasl2-bin nmap vim libmail-imapclient-perl libparse-recdescent-perl libterm-readkey-perl libterm-readline-perl-perl zip unzip graphviz lsb-base openssl ssl-cert || { echo "Impossível continuar, erro no nome dos pacotes"; exit 1; } 
     
    6565#apache2-ssl-certificate; 
    6666 
    67 a2enmod rewrite; 
     67a2enmod rewrite 
     68a2enmod ssl 
    6869 
    6970cp -r -p ../../../expresso/ /var/www/ 
    70 cp ./arqs-conf/etc/apache2/apache2.conf /etc/apache2/ 
    71 cp ./arqs-conf/etc/apache2/ports.conf /etc/apache2/ 
    72 cp ./arqs-conf/etc/apache2/sites-available/default /etc/apache2/sites-available/ 
     71cp ./arqs-conf/etc/apache2/apache2.conf.lenny /etc/apache2/apache2.conf 
     72cp ./arqs-conf/etc/apache2/sites-available/default.lenny /etc/apache2/sites-available/expresso 
     73cp ./arqs-conf/etc/apache2/ports.conf.lenny /etc/apache2/ports.conf 
    7374cp -r -p ./arqs-conf/etc/apache2/ssl/ /etc/apache2/ 
    7475 
     
    7677mkdir /php_sessions/ || { echo "Diretório já existe. [OK]"; } 
    7778chmod -R 777 /php_sessions/ 
     79 
     80a2ensite expresso 
     81a2dissite default 
     82 
     83# Linha adicionada para resolver alguns warnings quando "apache2ctl configtest" 
     84HOST=`hostname` ; mv /etc/hosts /etc/hosts.ori ; echo 127.0.0.1 $DOMAIN localhost $HOST  > /etc/hosts ; cat /etc/hosts.ori >> /etc/hosts ; rm /etc/hosts.ori 
    7885 
    7986/etc/init.d/apache2 restart 
     
    8693rm -rf /var/lib/ldap 
    8794mkdir /var/lib/ldap 
    88 cp ./arqs-conf/etc/ldap/DB_CONFIG /var/lib/ldap/ 
    89 chown -R openldap. /var/lib/ldap/ 
     95chown -R openldap:openldap /var/lib/ldap/ 
    9096/etc/init.d/slapd start 
    9197/etc/init.d/slapd stop 
     
    101107/etc/init.d/slapd start 
    102108rm /tmp/expresso.ldif 
     109 
    103110############################################################################################ 
    104111# CYRUS 
     
    126133/etc/init.d/postfix restart 
    127134postmap /etc/postfix/expresso-dominios 
    128 echo "127.0.0.1         $DOMAIN" >> /etc/hosts 
    129135 
    130136sleep 10 
     
    134140mkdir /home/expressolivre || { echo "Diretório já existe. [OK]"; } 
    135141cp ./arqs-conf/home/expressolivre/* /home/expressolivre/ 
    136 chown -R www-data.www-data /home/expressolivre/ 
     142chown -R www-data:www-data /home/expressolivre/ 
    137143############################################################################################ 
    138144# HEADER_INC_PHP 
    139145sed -e "s/HEADER_PWD/$HEADER_PWD/g" ./arqs-conf/header.inc.php > /var/www/expresso/header.inc.php 
    140 chown www-data.www-data /var/www/expresso/header.inc.php 
     146chown www-data:www-data /var/www/expresso/header.inc.php 
    141147 
    142148############################################################################################ 
     
    179185echo Acerta permissoes das pastas crls e temp em /var/www/expresso/security: 
    180186chown www-data:www-data /var/www/expresso/security/temp 
    181 chown www-data:www-data /var/www/expresso/logs  
     187chown www-data:www-data /var/www/expresso/logs 
    182188chown -R www-data:www-data /var/www/expresso/security/crls 
    183 chown www-data.www-data /var/www/expresso/security/crl_admin/crl_admin.py 
     189chown www-data:www-data /var/www/expresso/security/crl_admin/crl_admin.py 
    184190chmod 755 /var/www/expresso/security/temp 
    185191chmod 755 /var/www/expresso/security/crls 
  • branches/2.2/expressoAdmin1_2/inc/class.manager.inc.php

    r1913 r3018  
    1 <? 
     1<?php 
    22        /***********************************************************************************\ 
    33        * Expresso Administração                                                                                                   * 
  • branches/2.2/expressoAdmin1_2/js/jscode/connector.js

    r317 r3018  
    499499                          
    500500                id = url; 
    501                 connector.newRequest(id, url, method, handler, params); 
     501                admin_connector.newRequest(id, url, method, handler, params); 
    502502        } 
    503503         
     
    508508        //      form: form element (for upload files)    
    509509        function cExecuteForm(url, form, handler){ 
    510                 connector.buildBar(); 
     510                admin_connector.buildBar(); 
    511511                isExecuteForm = true;            
    512512                document.onmouseup = alertBut; 
    513513                 
    514                 connector.showProgressBar(); 
     514                admin_connector.showProgressBar(); 
    515515                if(! (divUpload = document.getElementById('divUpload'))) { 
    516516                        divUpload               = document.createElement('DIV');                 
     
    554554                if(isExecuteForm) { 
    555555                if(confirm("There's an action processing. Do you want abort it?")) { 
    556                         connector.hideProgressBar(); 
     556                        admin_connector.hideProgressBar(); 
    557557                        isExecuteForm = false; 
    558                         delete connector.requests[id];                                                           
    559                                 connector.requests[id] = null; 
     558                        delete admin_connector.requests[id];                                                             
     559                                admin_connector.requests[id] = null; 
    560560                        stop();                                          
    561561                        return; 
  • branches/2.2/expressoAdmin1_2/js/jscode/users.js

    r1913 r3018  
    139139        if (document.forms[0].mailalternateaddress.value != '') 
    140140                attrs_array['mailalternateaddress'] = document.forms[0].mailalternateaddress.value; 
    141         var attributes = connector.serialize(attrs_array); 
     141        var attributes = admin_connector.serialize(attrs_array); 
    142142 
    143143        var handler_validate_fields = function(data) 
     
    156156                        if (type == 'create_user') 
    157157                        { 
     158                                // Turn enabled checkbox on create user.  
     159                                document.getElementById('changepassword').disabled = false;  
    158160                                cExecuteForm ("$this.user.create", document.forms[0], handler_create); 
    159161                        } 
     
    203205        attrs_array['first_name'] = first_name; 
    204206        attrs_array['second_name'] = second_name; 
    205         var attributes = connector.serialize(attrs_array); 
     207        var attributes = admin_connector.serialize(attrs_array); 
    206208         
    207209        var handler_generate_login = function(data) { 
     
    539541                attrs_array['type'] = 'rename_user'; 
    540542                attrs_array['uid'] = new_uid; 
    541                 attributes = connector.serialize(attrs_array); 
     543                attributes = admin_connector.serialize(attrs_array); 
    542544         
    543545                cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields); 
  • branches/2.2/expressoAdmin1_2/templates/default/accounts_form.tpl

    r1991 r3018  
    9898                <tr bgcolor={row_on}> 
    9999                        <td colspan="2">{lang_password_expired}:</td> 
    100                         <td><input onchange="javascript:set_changepassword();" type="checkbox" {passwd_expired_checked} {disabled} name="passwd_expired" id="passwd_expired" value="1"</td> 
     100                        <td><input onclick="javascript:set_changepassword();" type="checkbox" {passwd_expired_checked} {disabled} name="passwd_expired" id="passwd_expired" value="1"></td> 
    101101                </tr> 
    102102 
    103103                <tr bgcolor={row_off}> 
    104104                        <td colspan="2">{lang_change_password}:</td> 
    105                         <td><input type="checkbox" {changepassword_checked} {disabled} name="changepassword" id="changepassword" value="1"</td> 
     105                        <td><input type="checkbox" {changepassword_checked} {disabled} name="changepassword" id="changepassword" value="1"></td> 
    106106                </tr> 
    107107 
    108108                <tr bgcolor={row_on}> 
    109109                        <td colspan="2">{lang_account_active}:</td> 
    110                         <td><input type="checkbox" {phpgwaccountstatus_checked} {disabled} name="phpgwaccountstatus" id="phpgwaccountstatus" value="1"</td> 
     110                        <td><input type="checkbox" {phpgwaccountstatus_checked} {disabled} name="phpgwaccountstatus" id="phpgwaccountstatus" value="1"></td> 
    111111                </tr> 
    112112 
    113113                <tr bgcolor={row_off}> 
    114114                        <td colspan="2">{lang_do_not_show_this_account_in_the_contact_center}:</td> 
    115                         <td><input type="checkbox" {phpgwaccountvisible_checked} {disabled} name="phpgwaccountvisible" id="phpgwaccountvisible" value="1"</td> 
     115                        <td><input type="checkbox" {phpgwaccountvisible_checked} {disabled} name="phpgwaccountvisible" id="phpgwaccountvisible" value="1"></td> 
    116116                </tr>            
    117117                {start_coment_expired} 
     
    158158                <tr bgcolor={row_off}> 
    159159                        <td>{lang_active_email_account}:</td> 
    160                         <td><input type="checkbox" {accountstatus_checked} {disabled} name="accountstatus" id="accountstatus" value="1"</td> 
     160                        <td><input type="checkbox" {accountstatus_checked} {disabled} name="accountstatus" id="accountstatus" value="1"></td> 
    161161                </tr> 
    162162         
     
    186186                <tr bgcolor={row_off}> 
    187187                        <td>{lang_only_forwarding}:</td> 
    188                         <td><input type="checkbox" {deliverymode_checked} {disabled} name="deliverymode" id="deliverymode" value="1"</td> 
     188                        <td><input type="checkbox" {deliverymode_checked} {disabled} name="deliverymode" id="deliverymode" value="1"></td> 
    189189                </tr> 
    190190 
     
    386386<script type="text/javascript"> 
    387387tab.display(1); 
     388// Note: The "change_password" field must be disabled and checked when the "passwd_expired" field will be enabled.   
     389set_changepassword();  
    388390</script> 
    389391 
  • branches/2.2/expressoMail1_2/inc/class.ScriptS.inc.php

    r1352 r3018  
    6262                        if(!$aux){ 
    6363                                // Caso de erro, grava dentro da variável errstr; 
    64                                 $this->errstr = "O arquivo não foi criado"; 
     64                                $this->errstr = "Error: file not created";  
     65                                return $this->errstr;  
    6566                        } 
    6667                        // Mata a variavel; 
     
    7172                        if(!$aux){ 
    7273                                // Caso de erro, grava dentro da variavel errstr; 
    73                                 $this->errstr = "O arquivo não foi ativado"; 
     74                                $this->errstr = "Error: error to activate file";  
     75                                return $this->errstr;  
    7476                        } 
    7577                        else{ 
     
    8486                $this->SieveS->close(); 
    8587                         
    86                 if($this->rules){                
     88                if($this->rules) 
    8789                        return $this->rules; 
    88                 }else{ 
    89                         return $this->errstr; 
    90                 } 
    9190                         
    9291        } 
     
    9998         
    10099                $var_decode = rawurldecode($params['arfilter']); 
     100                $var_decode = preg_replace('/\n\./', '.', $var_decode); 
    101101                 
    102102                $narray  = explode("_end_",$var_decode); 
  • branches/2.2/expressoMail1_2/inc/class.SieveS.inc.php

    r1149 r3018  
    178178 
    179179                //Verifica a conexao 
    180                 if(!$this->socket){ 
     180                if(!is_resource($this->socket)){  
    181181                        $this->errstr = "listscripts: sem conexão para o servidor $this->host"; 
    182182                        return false; 
     
    187187         
    188188                $said = $this->read(); 
    189                 while (!preg_match("/^OK/",$said) && !preg_match("/^NO/",$said)) { 
     189                while (is_resource($this->socket) && (!preg_match("/^OK/",$said) && !preg_match("/^NO/",$said))) {  
    190190         
    191191                    // Cyrus v1 script lines look like '"script*"' with the  
  • branches/2.2/expressoMail1_2/inc/class.db_functions.inc.php

    r1992 r3018  
    11<?php 
    2 define('PHPGW_INCLUDE_ROOT','../');      
    3 define('PHPGW_API_INC','../phpgwapi/inc');       
    4 include_once(PHPGW_API_INC.'/class.db.inc.php'); 
     2if(!isset($_SESSION['phpgw_info']['expressomail']['server']['db_name'])) {  
     3        include_once('../header.inc.php');  
     4        $_SESSION['phpgw_info']['expressomail']['server']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];   
     5        $_SESSION['phpgw_info']['expressomail']['server']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];  
     6        $_SESSION['phpgw_info']['expressomail']['server']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];  
     7        $_SESSION['phpgw_info']['expressomail']['server']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];  
     8        $_SESSION['phpgw_info']['expressomail']['server']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass'];  
     9        $_SESSION['phpgw_info']['expressomail']['server']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];  
     10}  
     11else{  
     12        define('PHPGW_INCLUDE_ROOT','../');       
     13        define('PHPGW_API_INC','../phpgwapi/inc');        
     14        include_once(PHPGW_API_INC.'/class.db.inc.php');  
     15}  
    516include_once('class.dynamic_contacts.inc.php'); 
    617         
     
    214225                if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] && 
    215226                        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) { 
     227                        // Free others requests  
     228                        session_write_close();  
    216229                        $dynamic_contact = new dynamic_contacts(); 
    217230                        $dynamic = $dynamic_contact->dynamic_contact_toString(); 
     
    353366                                $calendar = $fileContent; 
    354367                } 
     368                // It's necessary to access calendar method.  
     369                include_once(PHPGW_INCLUDE_ROOT.'/header.inc.php');  
    355370                         
    356371                $uiicalendar = CreateObject("calendar.uiicalendar"); 
  • branches/2.2/expressoMail1_2/inc/class.functions.inc.php

    r1572 r3018  
    116116                $h = ord($c{0});    
    117117                    if ($h <= 0x7F || $h < 0xC2) { 
    118                         $result .= $c; 
    119                     } 
     118                            // fixing curly brackets  
     119                            if($h == 0x7B || $h == 0x7D)  
     120                                    $result .= "&#" . $h . ";";  
     121                            else  
     122                                    $result .= $c; 
     123                    } 
    120124                        else if ($h <= 0xDF) { 
    121125                        $h = ($h & 0x1F) << 6 | (ord($c{1}) & 0x3F); 
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r1969 r3018  
    7777        function get_range_msgs2($params) 
    7878        { 
     79                // Free others requests  
     80                session_write_close();  
    7981                $folder = $params['folder']; 
    8082                $msg_range_begin = $params['msg_range_begin']; 
     
    335337                        $head1 = explode(":",$head); 
    336338                        if ( (strtoupper($head1[0]) == "TO") || 
    337                                         (strtoupper($head1[0]) == "FROM") || 
    338                                         (strtoupper($head1[0]) == "SUBJECT") || 
    339                                         (strtoupper($head1[0]) == "DATE") ) 
    340                                 $header .= $head."\r\n"; 
     339                                (strtoupper($head1[0]) == "FROM") || 
     340                                (strtoupper($head1[0]) == "SUBJECT") || 
     341                                (strtoupper($head1[0]) == "DATE") ||  
     342                                (strtoupper($head1[0]) == "CONTENT-TYPE")) {  
     343 
     344                                        if(strtoupper($head1[0]) == "CONTENT-TYPE"){  
     345                                                $head = str_replace("multipart/mixed","text/html",$head);                         
     346                                        }  
     347                                        $header .= $head."\n";  
     348                                }  
    341349                } 
    342350 
     
    474482                $body = $return_get_body['body']; 
    475483                //Remoção de tags <span></span> para correção de erro no firefox 
    476                 $body = mb_ereg_replace("<span><span>","",$body); 
    477                 $body = mb_ereg_replace("</span></span>","",$body); 
     484                $body = mb_eregi_replace("<span><span>","",$body); 
     485                $body = mb_eregi_replace("</span></span>","",$body); 
    478486 
    479487                if($return_get_body['body']=='isCripted'){ 
     
    492500                } 
    493501 
    494                 $pattern = '/^[ \t]*Disposition-Notification-To(^:)*:(.+)*@(.+)*$/isUm'; 
     502                $pattern = '/^[ \t]*Disposition-Notification-To:[ ]*<?[[:alnum:]\._-]+@[[:alnum:]_-]+[\.[:alnum:]]+>?/sm'; 
    495503                if (preg_match($pattern, $header_, $fields)) 
    496504                { 
    497                         preg_match('/[[:alnum:]\._\-]+@[[:alnum:]_\-\.]+/',$fields[0], $matches); 
    498                         $return['DispositionNotificationTo'] = "<".$matches[0].">"; 
     505                        if(preg_match('/[[:alnum:]\._\-]+@[[:alnum:]_\-\.]+/',$fields[0], $matches)){  
     506                                $return['DispositionNotificationTo'] = "<".$matches[0].">";  
     507                        }  
    499508                } 
    500509 
     
    789798                if(!$msg->structure[$msg_number]->parts) //Simple message, only 1 piece 
    790799                { 
    791             if(strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime'){ 
    792                 $return['body']='isCripted'; 
    793                 return $return; 
    794             } 
     800                        if(strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime'){ 
     801                                $return['body']='isCripted'; 
     802                                return $return; 
     803                        } 
    795804 
    796805                        $attachment = array(); //No attachments 
    797806 
    798             if(strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime'){ 
    799                                         $return['body']='isCripted'; 
    800                                         return $return; 
    801                         } 
    802  
    803                         $content = ''; 
    804                         if (strtolower($msg->structure[$msg_number]->subtype) == "plain") 
    805                         { 
    806                                 $content .= '<span style="font-family: monospace">' . nl2br($this->decodeBody((imap_body($this->mbox, $msg_number, FT_UID)), $msg->encoding[$msg_number][0], $msg->charset[$msg_number][0])) . '</span>'; 
    807                         } 
    808                         else if (strtolower($msg->structure[$msg_number]->subtype) == "html") 
    809                         { 
    810                                 $content .= $this->decodeBody(imap_body($this->mbox, $msg_number, FT_UID), $msg->encoding[$msg_number][0], $msg->charset[$msg_number][0]); 
    811                         } 
     807                        if(strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime'){ 
     808                                $return['body']='isCripted'; 
     809                                return $return; 
     810                        } 
     811 
     812                        $content = '';  
     813                        // If simple message is subtype 'html' or 'plain', then get content body.  
     814                        if(strtolower($msg->structure[$msg_number]->subtype) == "html" ||   
     815                                strtolower( $msg -> structure[ $msg_number ] -> subtype ) == 'plain'){  
     816 
     817                                        $content = $this->decodeBody(  
     818                                                imap_body( $this -> mbox, $msg_number, FT_UID ),  
     819                                                $msg -> encoding[ $msg_number ][ 0 ],  
     820                                                $msg -> charset[ $msg_number ][ 0 ]  
     821                                        );  
     822 
     823                                        if ( strtolower( $msg -> structure[ $msg_number ] -> subtype ) == 'plain' )  
     824                                        {  
     825                                                $content = str_replace( array( '<', '>' ), array( ' #$<$# ', ' #$>$# ' ), $content );  
     826                                                $content = htmlentities( $content );  
     827                                                $content = $this -> replace_links( $content );  
     828                                                $content = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $content );  
     829                                                $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';  
     830 
     831                                                $return[ 'body' ] = $content;  
     832 
     833                                                return $return;  
     834                                        }  
     835                                } 
    812836                } 
    813837                else 
     
    836860 
    837861                                $file_type = strtolower($msg->file_type[$msg_number][$values]); 
    838                                 if($file_type == "message/rfc822") 
    839                                         $has_multipart = false; 
    840  
    841                                 if($file_type == "multipart/alternative") 
    842                                         $has_multipart = false; 
     862                                if($file_type == "message/rfc822" || $file_type == "multipart/alternative")  
     863                                {  
     864                                        // Show only 'text/html' part, when message/rfc822 format contains 'text/plain' alternative part.  
     865                                        if(array_key_exists($values+1, $msg->file_type[$msg_number]) &&  
     866                                                strtolower($msg->file_type[$msg_number][$values+1]) == 'text/plain' &&  
     867                                                array_key_exists($values+2, $msg->file_type[$msg_number]) &&  
     868                                                strtolower($msg->file_type[$msg_number][$values+2]) == 'text/html') {  
     869                                                        $has_multipart = false;  
     870                                                }  
     871                                }        
    843872 
    844873                                if(($file_type == "text/plain" 
    845874                                        || $file_type == "text/html") 
    846                                         && $file_type != 'attachment') 
     875                                                && $file_type != 'attachment') 
    847876                                { 
    848877                                        if($file_type == "text/plain" && !$show_only_html && $has_multipart) 
     
    850879                                                // if TXT file size > 100kb, then it will not expand. 
    851880                                                if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) { 
    852                                                         $content .= nl2br(htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]))); 
     881                                                         $content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]));  
     882                                                         $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';     
    853883                                                } 
    854884                                        } 
     
    860890                                        } 
    861891                                } 
    862                                 else if($file_type == "message/delivery-status"){ 
     892                                 else if($file_type == "message/delivery-status" || $file_type == "message/feedback-report"){  
    863893                                        $content .= "<hr align='left' width='95%' style='border:1px solid #DCDCDC'>"; 
    864                                         $content .= nl2br($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])); 
    865  
     894                                         $content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]);  
     895                                        $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';  
    866896                                } 
    867897                                else if($file_type == "message/rfc822" || $file_type == "text/rfc822-headers"){ 
     
    870900                                        $att = new imap_attachment(); 
    871901                                        $attachments =  $att -> get_attachment_info($this->mbox,$msg_number); 
    872                                         if($attachments['number_attachments'] > 0) { 
    873                                                 foreach($attachments ['attachment'] as $index => $attachment) 
    874                                                 { 
    875                                                         if ( in_array( strtolower( $attachment[ 'type' ] ), array( 'delivery-status', 'rfc822', 'rfc822-headers', 'plain' ) ) ) 
    876                                                         { 
    877                                                                 $obj = imap_rfc822_parse_headers( imap_fetchbody( $this -> mbox, $msg_number, $msg_part, FT_UID ), $msg -> encoding[ $msg_number ][ $values ] ); 
    878  
    879                                                                 $content .= '<hr align="left" width="95%" style="border:1px solid #DCDCDC">'; 
    880                                                                 $content .= '<br><table  style="margin:2px;border:1px solid black;background:#EAEAEA">'; 
    881  
    882                                                                 $content .= '<tr><td><b>' . $this->functions->getLang("Subject") 
    883                                                                         . ':</b></td><td>' .$this->decode_string($obj->subject) . '</td></tr>'; 
    884  
    885                                                                 $content .= '<tr><td><b>' . $this -> functions -> getLang( 'From' ) . ':</b></td><td>' 
    886                                                                         . $this -> replace_links( $this -> decode_string( $obj -> from[ 0 ] -> mailbox . '@' . $obj -> from[ 0 ] -> host) ) 
    887                                                                         . '</td></tr>'; 
    888  
    889                                                                 $content .= '<tr><td><b>' . $this->functions->getLang("Date") . ':</b></td><td>' . $obj->date . '</td></tr>'; 
    890  
    891                                                                 $content .= '<tr><td><b>' . $this -> functions -> getLang( 'TO' ) . ':</b></td><td>' 
    892                                                                         . $this -> replace_links( $this -> decode_string( $obj -> to[ 0 ] -> mailbox . '@' . $obj -> to[ 0 ] -> host ) ) 
    893                                                                         . '</td></tr>'; 
    894  
    895                                                                 if ( $obj->cc ) 
    896                                                                         $content .= '<tr><td><b>' . $this -> functions -> getLang( 'CC' ) . ':</b></td><td>' 
    897                                                                                 . $this -> replace_links( $this -> decode_string( $obj -> cc[ 0 ] -> mailbox . '@' . $obj -> cc[ 0 ] -> host ) ) 
    898                                                                                 . '</td></tr>'; 
    899  
    900                                                                 $content .= '</table><br>'; 
    901  
    902                                                                 $content .= $this->decodeBody( 
    903                                                                         imap_fetchbody( 
    904                                                                                 $this->mbox, 
    905                                                                                 $msg_number, 
    906                                                                                 ( $attachment['part_in_msg'] + ( 
    907                                                                                         ( strtolower( $attachment[ 'type' ] ) == 'delivery-status' ) ? 0 : 1 ) 
    908                                                                                 ) . ".1", 
    909                                                                                 FT_UID 
    910                                                                         ), 
    911                                                                         $msg->encoding[ $msg_number ][ $values ], 
    912                                                                         $msg->charset[ $msg_number ][ $values ] 
    913                                                                 ); 
    914                                                                 break; 
     902                                        if($attachments['number_attachments'] > 0) {  
     903                                                foreach($attachments ['attachment'] as $index => $attachment)  
     904                                                {  
     905                                                        if ( in_array( strtolower( $attachment[ 'type' ] ), array( 'delivery-status', 'rfc822', 'rfc822-headers', 'plain' ) ) )  
     906                                                        {  
     907                                                                $obj = imap_rfc822_parse_headers( imap_fetchbody( $this -> mbox, $msg_number, $msg_part, FT_UID ), $msg -> encoding[ $msg_number ][ $values ] );  
     908 
     909                                                                $content .= '<hr align="left" width="95%" style="border:1px solid #DCDCDC">';  
     910                                                                $content .= '<br><table  style="margin:2px;border:1px solid black;background:#EAEAEA">';  
     911 
     912                                                                $content .= '<tr><td><b>' . $this->functions->getLang("Subject")  
     913                                                                        . ':</b></td><td>' .$this->decode_string($obj->subject) . '</td></tr>';  
     914 
     915                                                                $content .= '<tr><td><b>' . $this -> functions -> getLang( 'From' ) . ':</b></td><td>'  
     916                                                                        . $this -> replace_links( $this -> decode_string( $obj -> from[ 0 ] -> mailbox . '@' . $obj -> from[ 0 ] -> host) )  
     917                                                                        . '</td></tr>';  
     918 
     919                                                                $content .= '<tr><td><b>' . $this->functions->getLang("Date") . ':</b></td><td>' . $obj->date . '</td></tr>';  
     920 
     921                                                                $content .= '<tr><td><b>' . $this -> functions -> getLang( 'TO' ) . ':</b></td><td>'  
     922                                                                        . $this -> replace_links( $this -> decode_string( $obj -> to[ 0 ] -> mailbox . '@' . $obj -> to[ 0 ] -> host ) )  
     923                                                                        . '</td></tr>';  
     924 
     925                                                                if ( $obj->cc )  
     926                                                                        $content .= '<tr><td><b>' . $this -> functions -> getLang( 'CC' ) . ':</b></td><td>'  
     927                                                                                . $this -> replace_links( $this -> decode_string( $obj -> cc[ 0 ] -> mailbox . '@' . $obj -> cc[ 0 ] -> host ) )  
     928                                                                                . '</td></tr>';  
     929 
     930                                                                $content .= '</table><br>';  
     931 
     932 
     933                                                                $id = ( ( strtolower( $attachment[ 'type' ] ) == 'delivery-status' ) ? false : true );  
     934                                                                if ( strtolower( $msg->structure[$msg_number]->parts[1]->parts[0]->subtype ) == 'plain' )  
     935                                                                {  
     936                                                                        $id = !$id;  
     937                                                                        if ( $msg->structure[$msg_number]->parts[1]->parts[0]->encoding == 4 )  
     938                                                                                $msg->encoding[ $msg_number ][ $values ] = 'quoted-printable';  
     939                                                                }  
     940 
     941                                                                $body = $this->decodeBody(  
     942                                                                        imap_fetchbody(  
     943                                                                                $this->mbox,  
     944                                                                                $msg_number,  
     945                                                                                ( $attachment['part_in_msg'] + ( ( int ) $id ) ) . ".1",  
     946                                                                                FT_UID  
     947                                                                        ),  
     948                                                                        $msg->encoding[ $msg_number ][ $values ],  
     949                                                                        $msg->charset[ $msg_number ][ $values ]  
     950                                                                );  
     951 
     952                                                                if ( strtolower( $msg->structure[$msg_number]->parts[1]->parts[0]->subtype ) == 'plain' )  
     953                                                                {  
     954                                                                        $body = str_replace( array( '<', '>' ), array( ' #$<$# ', ' #$>$# ' ), $body );  
     955                                                                        $body = htmlentities( $body );  
     956                                                                        $body = $this -> replace_links( $body );  
     957                                                                        $body = str_replace( array( ' #$&lt;$# ', ' #$&gt;$# ' ), array( '&lt;', '&gt;' ), $body );  
     958                                                                        $body = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;font-family: monospace;font-size:12px">' . $body . '</pre>';  
     959                                                                }  
     960 
     961                                                                $content .= $body;  
     962                                                                break;  
    915963                                                        } 
    916964                                                } 
     
    11511199        function replace_links( $body ) 
    11521200        { 
    1153                 $matches = array( ); 
    1154                 // Verify exception. 
    1155                 @preg_match( "/<a href=\"notes:\/\/\//", $body, $matches ); 
    1156  
    1157                 // If there is no exception, then open the link in new window. 
    1158                 if ( count( $matches ) ) 
    1159                         return $body; 
    1160  
    1161                 // All links should be moderated and they should only have the attribute 'target="blank"'. 
    1162                 $pattern = '/<a[^>]+href="([^>"]+)"[^>]*>(.*)<\/a>/im'; 
    1163                 $replacement = '<a href="$1" target="_blank">$2</a>'; 
     1201                // Domains and IPs addresses found in the text and which is not a link yet should be replaced by one.  
     1202                // See more informations in www.iana.org  
     1203                $octets = array(  
     1204                        'first' => '(2[0-3][0-9]|1[0-9]{2}|[1-9][0-9]?)',  
     1205                        'middle' => '(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})',  
     1206                        'last' => '(25[0-4]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)'  
     1207                );  
     1208 
     1209                $ip = "\b{$octets[ 'first' ]}\.({$octets[ 'middle' ]}\.){2}{$octets[ 'last' ]}\b";  
     1210 
     1211                $top_level_domains = '(\.(ac|ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|as|asia|at|au|aw|ax|az|'  
     1212                        . 'ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bl|bm|bn|bo|br|bs|bt|bv|bw|by|bz|'  
     1213                        . 'ca|cat|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cu|cv|cx|cy|cz|'  
     1214                        . 'de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|'  
     1215                        . 'ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|'  
     1216                        . 'hk|hm|hn|hr|ht|hu|id|ie|il|im|in|info|int|io|iq|ir|is|it|je|jm|jo|jobs|jp|'  
     1217                        . 'ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|'  
     1218                        . 'ma|mc|md|me|mf|mg|mh|mil|mk|ml|mm|mn|mo|mobi|mp|mq|mr|ms|mt|mu|museum|'  
     1219                        . 'mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|'  
     1220                        . 'pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|ps|pt|pw|py|qa|re|ro|rs|ru|rw|'  
     1221                        . 'sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|'  
     1222                        . 'tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|travel|tt|tv|tw|tz|'  
     1223                        . 'ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw))+\b';  
     1224 
     1225                $path = '(?>\/[\w\d\/\.\'\(\)\-\+~?!&#@$%|:;,*=_]+)?';  
     1226                $port = '(?>:\d{2,5})?';  
     1227                $domain = '(?>[\w\d_\-]+)';  
     1228                $subdomain = "(?>{$domain}\.)*";  
     1229                $protocol = '(?>(http|ftp)(s)?:\/\/)?';  
     1230                $url = "(?>{$protocol}((?>{$subdomain}{$domain}{$top_level_domains}|{$ip}){$port}{$path}))";  
     1231 
     1232                $pattern = "/(<\w[^>]+|[\/\"'@=])?{$url}/"; 
     1233                ini_set( 'pcre.backtrack_limit', 300000 );  
     1234 
     1235                /*  
     1236                // PHP 5.3  
     1237                $replace = function( $matches )  
     1238                {  
     1239                        if ( $matches[ 1 ] )  
     1240                                return $matches[ 0 ];  
     1241 
     1242                        $url = ( $matches[ 2 ] ) ? $matches[ 2 ] : 'http';  
     1243                        $url .= "{$matches[ 3 ]}://{$matches[ 4 ]}";  
     1244                        return "<a href=\"{$url}\" target=\"_blank\">{$matches[ 4 ]}</a>";  
     1245                };  
     1246                $body = preg_replace_callback( $pattern, $replace, $body );  
     1247                 */  
     1248 
     1249                // PHP 5.2.x - Remover assim que possível  
     1250                $body = preg_replace_callback( $pattern,  
     1251                        create_function(  
     1252                                '$matches',  
     1253                                'if ( $matches[ 1 ] ) return $matches[ 0 ];'  
     1254                                . '$url = ( $matches[ 2 ] ) ? $matches[ 2 ] : "http";' 
     1255                                . '$url .= "{$matches[ 3 ]}://{$matches[ 4 ]}";' 
     1256                                . 'return "<a href=\"{$url}\" target=\"_blank\">{$matches[ 4 ]}</a>";' 
     1257                        ), $body 
     1258                ); 
     1259                ini_set( 'pcre.backtrack_limit', 100000 );  
     1260                // E-mail address in the text should create a new e-mail on ExpressoMail 
     1261                $pattern = '/( |<|&lt;|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|&gt;|<)/im';  
     1262                $replacement = '$1<a href="mailto:$2">$2</a>$3'; 
    11641263                $body = preg_replace( $pattern, $replacement, $body ); 
    11651264 
    1166                 // Url found in the text and which is not a link yet should be replaced by one. 
    1167                 $pattern = '/(^|\w>|[ \(\[])((http(s)?:\/\/)?([\w\d_\-@]{2,}(\.[\w\d~?\/_=&#;\-:@$]+)+))/im'; 
    1168                 $replacement = '$1<a href="http$4://$5" target="_blank">$2</a>'; 
    1169                 $body = preg_replace( $pattern, $replacement, $body ); 
    1170  
    1171                 // E-mail address in the text should create a new e-mail on ExpressoMail 
    1172                 $pattern = '/( |<|&lt;|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|&gt;|<)/im'; 
    1173                 $replacement = '$1<a href="javascript:new_message_to(\'$2\')">$2</a>$3'; 
    1174                 $body = preg_replace( $pattern, $replacement, $body ); 
    1175  
    1176                 // If there is an link with a "mailto:" in href attribute, it will changed to create a new e-mail on ExpressoMail. 
    1177                 $pattern = '/<a[^>]+href=["\']mailto:([^"]+)["\'][^>]*>([^<]+)<\/a>/im'; 
    1178                 $replacement = '<a href="javascript:new_message_to(\'$1\')">$2</a>'; 
    1179                 $body = preg_replace( $pattern, $replacement, $body ); 
    1180  
    11811265                return $body; 
    11821266        } 
     
    11841268        function get_signature($msg, $msg_number, $msg_folder) 
    11851269        { 
    1186         include_once("../security/classes/CertificadoB.php"); 
     1270        include_once(dirname( __FILE__ ) ."/../../security/classes/CertificadoB.php"); 
    11871271                include_once("class.db_functions.inc.php"); 
    11881272                foreach ($msg->file_type[$msg_number] as $index => $file_type) 
     
    15571641                        $this->delete_mailbox(array("del_past" => "INBOX/decifradas")); 
    15581642                } 
    1559                 $serverString = "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}"; 
    1560                 $folders_list = imap_getmailboxes($mbox_stream, $serverString, ($params && $params['noSharedFolders']) ? "INBOX/*" : "*"); 
    1561                 $folders_list = array_slice($folders_list,0,$this->foldersLimit); 
    1562  
    1563                 $tmp = array(); 
    1564                 $resultMine = array(); 
    1565                 $resultDefault = array(); 
     1643 
    15661644 
    15671645                $inbox = 'INBOX'; 
    15681646                $trash = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']; 
    1569                 $drafts = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']; 
    1570                 $spam = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']; 
    1571                 $sent = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']; 
     1647                $drafts = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']; 
     1648                $spam = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']; 
     1649                $sent = $inbox . $this->imap_delimiter . $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']; 
     1650                $uid2cn = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn'];  
     1651                // Free others requests  
     1652                session_write_close();  
     1653 
     1654                $serverString = "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}";  
     1655                $folders_list = imap_getmailboxes($mbox_stream, $serverString, ($params && $params['noSharedFolders']) ? "INBOX/*" : "*");  
     1656                $folders_list = array_slice($folders_list,0,$this->foldersLimit);  
     1657 
     1658                $tmp = array();  
     1659                $resultMine = array();  
     1660                $resultDefault = array();  
    15721661 
    15731662                if (is_array($folders_list)) { 
     
    15931682                                $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 
    15941683                                $result[$i]['folder_name'] = $result[$i]['folder_name'] == 'INBOX' ? 'Inbox' : $result[$i]['folder_name']; 
    1595                                 if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['uid2cn'] && substr($folder_id,0,4) == 'user') { 
     1684                                if ($uid2cn && substr($folder_id,0,4) == 'user') { 
    15961685                                        //$this->ldap = new ldap_functions(); 
    15971686                                        if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])) { 
     
    17981887                                return "The server denied your request to send a mail, you cannot use this mail address."; 
    17991888                } 
    1800  
    1801                 //new_message_to backs to mailto: pattern 
    1802                 $params['body'] = eregi_replace("<a href=\"javascript:new_message_to\('([^>]+)'\)\">[^>]+</a>","<a href='mailto:\\1'>\\1</a>",$params['body']); 
    18031889 
    18041890                $toaddress = implode(',',$db->getAddrs(explode(',',$params['input_to']))); 
     
    19972083            $mail->Certs_crypt = $aux_mails; 
    19982084        } 
    1999  
    2000 //////////////////////////////////////////////////////////////////////////////////////////////////// 
    2001                 //      Build CID for embedded Images!!! 
    2002                 $pattern = '/src="([^"]*?show_embedded_attach.php\?msg_folder=(.+)?&(amp;)?msg_num=(.+)?&(amp;)?msg_part=(.+)?)"/isU'; 
    2003                 $cid_imgs = ''; 
    2004                 $name_cid_files = array(); 
    2005                 preg_match_all($pattern,$mail->Body,$cid_imgs,PREG_PATTERN_ORDER); 
    2006                 $cid_array = array(); 
    2007                 foreach($cid_imgs[6] as $j => $val){ 
    2008                                 if ( !array_key_exists($cid_imgs[4][$j].$val, $cid_array) ) 
    2009                         { 
    2010                 $cid_array[$cid_imgs[4][$j].$val] = base_convert(microtime(), 10, 36); 
    2011                         } 
    2012                         $cid = $cid_array[$cid_imgs[4][$j].$val]; 
    2013                         $mail->Body = str_replace($cid_imgs[1][$j], "cid:".$cid, $mail->Body); 
    2014  
    2015                                 if (!$forwarding_attachments[$cid_imgs[6][$j]-2]) // The image isn't in the same mail? 
    2016                                 { 
    2017                                         $fileContent = $this->get_forwarding_attachment($cid_imgs[2][$j], $cid_imgs[4][$j], $cid_imgs[6][$j], 'base64'); 
    2018                                         $fileName = "image_".($j).".jpg"; 
    2019                                         $fileCode = "base64"; 
    2020                                         $fileType = "image/jpg"; 
    2021                                 } 
    2022                                 else 
    2023                                 { 
    2024                                         $attach_img = $forwarding_attachments[$cid_imgs[6][$j]-2]; 
    2025                                         $file_description = unserialize(rawurldecode($attach_img)); 
    2026  
    2027                                         foreach($file_description as $i => $descriptor){ 
    2028                                                 $file_description[$i]  = eregi_replace('\'*\'','',$descriptor); 
    2029                                         } 
    2030                                         $fileContent = $this->get_forwarding_attachment($file_description[0], $cid_imgs[4][$j], $file_description[3], 'base64'); 
    2031                                         $fileName = $file_description[2]; 
    2032                                         $fileCode = $file_description[4]; 
    2033                                         $fileType = $this->get_file_type($file_description[2]); 
    2034                                         unset($forwarding_attachments[$cid_imgs[6][$j]-2]); 
    2035                                 } 
    2036                                 $tempDir = ini_get("session.save_path"); 
    2037                                 $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat"; 
    2038                                 $f = fopen($tempDir.'/'.$file,"w"); 
    2039                                 fputs($f,$fileContent); 
    2040                                 fclose($f); 
    2041                                 if ($fileContent) 
    2042                                         $mail->AddEmbeddedImage($tempDir.'/'.$file, $cid, $fileName, $fileCode, $fileType); 
    2043                                 //else 
    2044                                 //      return "Error loading image attachment content"; 
    2045  
    2046                 } 
    2047 //////////////////////////////////////////////////////////////////////////////////////////////////// 
     2085                // Build CID images  
     2086                $this->buildEmbeddedImages($mail,$msg_uid,$forwarding_attachments);  
     2087 
    20482088                //      Build Uploading Attachments!!! 
    20492089                if ((count($attachments)) && ($params['is_local_forward']!="1")) //Caso seja forward normal... 
     
    20802120                { 
    20812121                        // Bug fixed for array_search function 
     2122                        $name_cid_files = array();  
    20822123                        if(count($name_cid_files) > 0) { 
    20832124                                $name_cid_files[count($name_cid_files)] = $name_cid_files[0]; 
     
    21422183                } 
    21432184        } 
    2144  
    2145     function add_recipients_cert($full_address) 
     2185        function buildEmbeddedImages(&$mail,$msg_uid,&$forwarding_attachments)  
     2186        {  
     2187                //      Build CID for embedded Images!!!  
     2188                $pattern = '/src="([^"]*?show_embedded_attach.php\?msg_folder=(.+)?&(amp;)?msg_num=(.+)?&(amp;)?msg_part=(.+)?)"/isU';  
     2189                $cid_imgs = '';  
     2190                preg_match_all($pattern,$mail->Body,$cid_imgs,PREG_PATTERN_ORDER);  
     2191                $cid_array = array();  
     2192                foreach($cid_imgs[6] as $j => $val){  
     2193                        if ( !array_key_exists($cid_imgs[4][$j].$val, $cid_array) )  
     2194                        {  
     2195                                $cid_array[$cid_imgs[4][$j].$val] = base_convert(microtime(), 10, 36);  
     2196                        }  
     2197                        $cid = $cid_array[$cid_imgs[4][$j].$val];   
     2198                        $mail->Body = str_replace($cid_imgs[1][$j], "cid:".$cid, $mail->Body);  
     2199 
     2200                        if ($msg_uid != $cid_imgs[4][$j]) // The image is not in the same mail?  
     2201                        {  
     2202                                $fileContent = $this->get_forwarding_attachment($cid_imgs[2][$j], $cid_imgs[4][$j], $cid_imgs[6][$j], 'base64');  
     2203                                //prototype: get_forwarding_attachment ( folder, msg number, part, encoding)  
     2204                                $fileName = "image_".($j).".jpg";  
     2205                                $fileCode = "base64";  
     2206                                $fileType = "image/jpg";  
     2207                                $file_attached[0] = $cid_imgs[2][$j];  
     2208                                $file_attached[1] = $cid_imgs[4][$j];  
     2209                                $file_attached[2] = $fileName;  
     2210                                $file_attached[3] = $cid_imgs[6][$j];  
     2211                                $file_attached[4] = 'base64';  
     2212                                $file_attached[5] = strlen($fileContent); //Size of file  
     2213                                $return_forward[] = $file_attached;  
     2214 
     2215                                $attachment_ = unserialize(rawurldecode($forwarding_attachments[$cid_imgs[6][$j]-2]));  
     2216                                if ($file_attached[3] == $attachment_[3])  
     2217                                        unset($forwarding_attachments[$cid_imgs[6][$j]-2]);      
     2218                        }  
     2219                        else  
     2220                        {  
     2221                                $attach_img = $forwarding_attachments[$cid_imgs[6][$j]-2];  
     2222                                $file_description = unserialize(rawurldecode($attach_img));  
     2223                                if (is_array($file_description))  
     2224                                        foreach($file_description as $i => $descriptor){                                  
     2225                                                $file_description[$i]  = eregi_replace('\'*\'','',$descriptor);  
     2226                                        }  
     2227                                $fileContent = $this->get_forwarding_attachment($file_description[0], $msg_uid, $file_description[3], 'base64');  
     2228                                $fileName = $file_description[2];  
     2229                                $fileCode = $file_description[4];  
     2230                                $fileType = $this->get_file_type($file_description[2]);  
     2231                                unset($forwarding_attachments[$cid_imgs[6][$j]-2]);  
     2232                                if (!empty($file_description))  
     2233                                {  
     2234                                        $file_description[5] = strlen($fileContent); //Size of file  
     2235                                        $return_forward[] = $file_description;  
     2236                                }  
     2237                        }  
     2238                        $tempDir = ini_get("session.save_path");  
     2239                        $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat";                                         
     2240                        $f = fopen($tempDir.'/'.$file,"w");  
     2241                        fputs($f,$fileContent);  
     2242                        fclose($f);  
     2243                        if ($fileContent)  
     2244                                $mail->AddEmbeddedImage($tempDir.'/'.$file, $cid, $fileName, $fileCode, $fileType);  
     2245                        //else  
     2246                        //      return "Error loading image attachment content";                                                  
     2247 
     2248                }  
     2249                return $return_forward;  
     2250        }  
     2251        function add_recipients_cert($full_address) 
    21462252        { 
    21472253                $result = ""; 
     
    25122618                $mail->Body = $body; 
    25132619 
    2514                 //      Build CID for embedded Images!!! 
    2515                 $pattern = '/src="([^"]*?show_embedded_attach.php\?msg_folder=(.+)?&(amp;)?msg_num=(.+)?&(amp;)?msg_part=(.+)?)"/isU'; 
    2516                 $cid_imgs = ''; 
    2517                 $name_cid_files = array(); 
    2518                 preg_match_all($pattern,$mail->Body,$cid_imgs,PREG_PATTERN_ORDER); 
    2519                 $cid_array = array(); 
    2520                 foreach($cid_imgs[6] as $j => $val){ 
    2521                                 if ( !array_key_exists($cid_imgs[4][$j].$val, $cid_array) ) 
    2522                         { 
    2523                 $cid_array[$cid_imgs[4][$j].$val] = base_convert(microtime(), 10, 36); 
    2524                         } 
    2525                         $cid = $cid_array[$cid_imgs[4][$j].$val]; 
    2526                         $mail->Body = str_replace($cid_imgs[1][$j], "cid:".$cid, $mail->Body); 
    2527  
    2528                                 if ($msg_uid != $cid_imgs[4][$j]) // The image isn't in the same mail? 
    2529                                 { 
    2530                                         $fileContent = $this->get_forwarding_attachment($cid_imgs[2][$j], $cid_imgs[4][$j], $cid_imgs[6][$j], 'base64'); 
    2531                                         //prototype: get_forwarding_attachment ( folder, msg number, part, encoding) 
    2532                                         $fileName = "image_".($j).".jpg"; 
    2533                                         $fileCode = "base64"; 
    2534                                         $fileType = "image/jpg"; 
    2535                                         $file_attached[0] = $cid_imgs[2][$j]; 
    2536                                         $file_attached[1] = $cid_imgs[4][$j]; 
    2537                                         $file_attached[2] = $fileName; 
    2538                                         $file_attached[3] = $cid_imgs[6][$j]; 
    2539                                         $file_attached[4] = 'base64'; 
    2540                                         $file_attached[5] = strlen($fileContent); //Size of file 
    2541                                         $return_forward[] = $file_attached; 
    2542                                 } 
    2543                                 else 
    2544                                 { 
    2545                                         $attach_img = $forwarding_attachments[$cid_imgs[6][$j]-2]; 
    2546                                         $file_description = unserialize(rawurldecode($attach_img)); 
    2547                                         foreach($file_description as $i => $descriptor){ 
    2548                                                 $file_description[$i]  = eregi_replace('\'*\'','',$descriptor); 
    2549                                         } 
    2550                                         $fileContent = $this->get_forwarding_attachment($file_description[0], $msg_uid, $file_description[3], 'base64'); 
    2551                                         $fileName = $file_description[2]; 
    2552                                         $fileCode = $file_description[4]; 
    2553                                         $fileType = $this->get_file_type($file_description[2]); 
    2554                                         unset($forwarding_attachments[$cid_imgs[6][$j]-2]); 
    2555                                         if (!empty($file_description)) 
    2556                                         { 
    2557                                                 $file_description[5] = strlen($fileContent); //Size of file 
    2558                                                 $return_forward[] = $file_description; 
    2559                                         } 
    2560                                 } 
    2561                                 $tempDir = ini_get("session.save_path"); 
    2562                                 $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat"; 
    2563                                 $f = fopen($tempDir.'/'.$file,"w"); 
    2564                                 fputs($f,$fileContent); 
    2565                                 fclose($f); 
    2566                                 if ($fileContent) 
    2567                                         $mail->AddEmbeddedImage($tempDir.'/'.$file, $cid, $fileName, $fileCode, $fileType); 
    2568                                 //else 
    2569                                 //      return "Error loading image attachment content"; 
    2570  
    2571                 } 
     2620                $return_forward = $this->buildEmbeddedImages($mail,$msg_uid,$forwarding_attachments);  
    25722621 
    25732622        //      Build Forwarding Attachments!!! 
     
    31593208                $criteria =  'BEFORE "'.$before_date.'"'; 
    31603209                $mbox_stream = $this->open_mbox('INBOX'.$this->imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']); 
     3210                // Free others requests  
     3211                session_write_close();  
    31613212                $messages = imap_search($mbox_stream, $criteria, SE_UID); 
    31623213                if (is_array($messages)){ 
     
    32013252 
    32023253        function search_msg($params = ''){ 
    3203             $retorno = ""; 
    32043254            $mbox_stream = ""; 
    32053255            if(strpos($params['condition'],"#")===false) { //local messages 
     
    32803330                                foreach($search_criteria as $new_search) 
    32813331                                { 
     3332                                    $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream);  
     3333                                    $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" );  
     3334                                    $elem['uid'] = $new_search;  
     3335                                    $retorno[] = $elem;  
     3336 
     3337                                    /* NOTE: This code was lost on 2.2 merge  
    32823338                                    if ($search_result_number != '65536' && $sum == $search_result_number) 
    32833339                                    { 
     
    32903346                                        $retorno .= $m_token; 
    32913347                                        $sum ++; 
    3292                                     } 
     3348                                    } 
     3349                                     */ 
    32933350                                } 
    32943351                            } 
     
    33003357                        { 
    33013358                            foreach($search_criteria as $new_search) 
    3302                             { 
    3303                                 if ($search_result_number != '65536' && $sum == $search_result_number) 
     3359                            { 
     3360                                    $elem = $this->get_msg_detail($new_search,$name_box,$mbox_stream);  
     3361                                    $elem['boxname'] = mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" );  
     3362                                    $elem['uid'] = $new_search;  
     3363                                    $retorno[] = $elem;  
     3364                                //  NOTE: This code was lost on 2.2 merge  
     3365                                /*if ($search_result_number != '65536' && $sum == $search_result_number) 
    33043366                                { 
    33053367                                    return $retorno ? $sum . "=sumResults=" . $retorno : "none"; 
    33063368                                } 
    33073369                                $retorno .= trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 
    3308                                 $sum++; 
     3370                                $sum++;*/ 
    33093371                            } 
    33103372                        } 
     
    33273389        } 
    33283390 
    3329         function get_msg($uid_msg,$name_box, $mbox_stream ) 
     3391        function get_msg_detail($uid_msg,$name_box, $mbox_stream ) 
    33303392        { 
    33313393                $header = $this->get_header($uid_msg); 
    3332                 include_once("class.imap_attachment.inc.php"); 
     3394                require_once("class.imap_attachment.inc.php"); 
    33333395                $imap_attachment = new imap_attachment(); 
    33343396                $attachments =  $imap_attachment->get_attachment_headerinfo($mbox_stream, $uid_msg); 
     
    33473409                if($header->from[0]->personal != "") 
    33483410                        $from = $header->from[0]->personal; 
    3349                 $ret_msg = $this->decode_string($from) . "--" . $subject . "--". gmdate("d/m/Y",$header ->udate)."--". $this->size_msg($header->Size) ."--". $flag; 
     3411                $ret_msg['from'] = $this->decode_string($from);  
     3412                $ret_msg['subject'] = $subject;  
     3413                $ret_msg['udate'] = $header ->udate;  
     3414                $ret_msg['size'] = $header->Size;  
     3415                $ret_msg['flag'] = $flag;  
    33503416                return $ret_msg; 
    33513417        } 
    3352  
    3353         function size_msg($size){ 
    3354                 $var = floor($size/1024); 
    3355                 if($var >= 1){ 
    3356                         return $var." kb"; 
    3357                 }else{ 
    3358                         return $size ." b"; 
    3359                 } 
    3360         } 
    3361  
    33623418        function ob_array($the_object) 
    33633419        { 
  • branches/2.2/expressoMail1_2/inc/class.message_components.inc.php

    r1739 r3018  
    112112                    $skip_next    = ($ftype == 'message/rfc822')?        true : false; 
    113113 
    114                     if ($ftype == 'multipart/mixed' || $skip_part == true && $ftype == 'multipart/alternative' || $ftype == 'multipart/related' ) 
     114                    if ($ftype == 'multipart/report' || $ftype == 'multipart/mixed' || $skip_part == true && $ftype == 'multipart/alternative' || ( $ftype == 'multipart/related' && strtolower( $parts[$p]->parts[0]->subtype ) == 'alternative' ) )  
    115115                    { 
    116116                        $n--; 
    117117                    } 
    118118                    else 
    119                     { 
    120                         $this->pid[$mid][$n]       = ($is_sub_part == false)? $i : ($sub_pid == '' ? '1' : $sub_pid).'.'.$i; 
     119                    { 
     120                        $this->pid[$mid][$n]       = ($is_sub_part == false || $skip_part && $ftype == 'multipart/related' )? $i : ($sub_pid == '' ? '1' : $sub_pid).'.'.$i;  
    121121                        $this->file_type[$mid][$n] = $ftype; 
    122122                        $this->encoding[$mid][$n]  = $encoding; 
  • branches/2.2/expressoMail1_2/inc/class.phpmailer.php

    r1793 r3018  
    525525        for($i = 0; $i < count($this->to); $i++) 
    526526        { 
    527             if($this->valEm($this->to[$i][0])) 
    528             { 
    529                 if(!$this->smtp->Recipient($this->to[$i][0]))  $bad_rcpt[] = $this->to[$i][0]; 
    530             } 
    531             else 
    532             { 
    533                 $errorx .= $this->to[$i][0] . ', '; 
    534             } 
     527                if(!$this->smtp->Recipient($this->to[$i][0])) 
     528                        $bad_rcpt[] = $this->to[$i][0]; 
    535529        } 
    536530        for($i = 0; $i < count($this->cc); $i++) 
    537531        { 
    538             if($this->valEm($this->cc[$i][0])) 
    539             { 
    540                 if(!$this->smtp->Recipient($this->cc[$i][0])) $bad_rcpt[] = $this->cc[$i][0]; 
    541             } 
    542                         else 
    543             { 
    544                 $errorx .= $this->cc[$i][0] . ', '; 
    545             } 
     532                if(!$this->smtp->Recipient($this->cc[$i][0])) 
     533                        $bad_rcpt[] = $this->cc[$i][0]; 
    546534        } 
    547535        for($i = 0; $i < count($this->bcc); $i++) 
    548536        { 
    549             if($this->valEm($this->bcc[$i][0])) 
    550             { 
    551                 if(!$this->smtp->Recipient($this->bcc[$i][0])) $bad_rcpt[] = $this->bcc[$i][0]; 
    552             } 
    553                         else 
    554             { 
    555                 $errorx .= $this->bcc[$i][0] . ', '; 
    556             } 
     537                if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     538                        $bad_rcpt[] = $this->bcc[$i][0];       
    557539        } 
    558540        if($errorx != '') 
     
    728710    } 
    729711 
    730     function valEm($email) 
    731     { 
    732         $mail_retorno = FALSE; 
    733         if ((strlen($email) >= 6) && (substr_count($email,"@") == 1) && (substr($email,0,1) != "@") && (substr($email,strlen($email)-1,1) != "@")) 
    734         { 
    735             if ((!strstr($email,"'")) && (!strstr($email,"\"")) && (!strstr($email,"\\")) && (!strstr($email,"\$")) && (!strstr($email," "))) 
    736             { 
    737                 //testa se tem caracter . 
    738                 if (substr_count($email,".")>= 1) 
    739                 { 
    740                     //obtem a terminação do dominio 
    741                     $term_dom = substr(strrchr ($email, '.'),1); 
    742                     //verifica se terminação do dominio esta correcta 
    743                     if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,"@")) ) 
    744                     { 
    745                         $antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1); 
    746                         $caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1); 
    747                         if ($caracter_ult != "@" && $caracter_ult != ".") 
    748                         { 
    749                             $mail_retorno = TRUE; 
    750                         } 
    751                     } 
    752                 } 
    753             } 
    754         } 
    755         return $mail_retorno; 
    756     } 
    757712 
    758713    /** 
  • branches/2.2/expressoMail1_2/inc/gotodownload.php

    r1937 r3018  
    1212        $msg_number = $_GET['msg_number']; 
    1313        $idx_file = $_GET['idx_file']; 
    14         $newfilename = $_GET['newfilename']; 
     14        $newfilename = urldecode($_GET['newfilename']); 
    1515        $msg_part = $_GET['msg_part']; 
    1616        $msg_folder = $_GET['msg_folder']; 
     
    171171                        if (preg_match("#^".ini_get('session.save_path')."/(".$GLOBALS['phpgw']->session->sessionid."/)*[A-z]+_".$GLOBALS['phpgw']->session->sessionid."[A-z0-9]*(\.[A-z]{3,4})?$#",$strFileName)) 
    172172                        { 
    173                                 readfile($strFileName); 
    174                                 exec("rm -f ".escapeshellcmd(escapeshellarg($strFileName))); 
     173                                if (preg_match("#^".dirname( __FILE__ ) . '/../tmpLclAtt'."/source_#",$strFileName)) { 
     174                                        //avoid stuck request  
     175                                        session_write_close();  
     176 
     177                                        //reset time limit for big files  
     178                                        set_time_limit(0);  
     179                                        ob_end_flush();  
     180 
     181                                        if ($fp = fopen ($strFileName, 'rb'))  
     182                                        {  
     183                                                $bufferSize=1024;  
     184                                                for ($i=$bufferSize; $i<=(filesize($strFileName)+$bufferSize); $i+=$bufferSize)   
     185                                                {  
     186                                                        echo fread($fp, $i);  
     187                                                        flush();  
     188                                                }  
     189                                                fclose ($fp);  
     190                                        }  
     191                                        //readfile($strFileName);        
     192 
     193                                        exec("rm -f ".escapeshellcmd(escapeshellarg($strFileName))); 
     194                                } 
     195                                else  
     196                                        if (preg_match("#^".dirname( __FILE__ ) . '/../tmpLclAtt'."/source_#",$strFileName)) { 
     197                                                readfile($strFileName); 
     198                                        } 
    175199                        } 
    176                         else  
    177                                 if (preg_match("#^".dirname( __FILE__ ) . '/../tmpLclAtt'."/source_#",$strFileName)) { 
    178                                         readfile($strFileName); 
    179                                 } 
    180         } 
    181200?> 
  • branches/2.2/expressoMail1_2/inc/hook_home.inc.php

    r1402 r3018  
    1111        $current_app = 'expressoMail1_2'; 
    1212        $current_name    = 'Expresso Mail'; 
    13         $preferences = $GLOBALS['phpgw']->preferences->read(); 
    14         $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 
     13        if(!$_SESSION['phpgw_info']['user']['preferences']['expressoMail']) {  
     14                $preferences = $GLOBALS['phpgw']->preferences->read();  
     15                $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 
     16        } 
    1517        $homedisplay = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail']; 
    1618        if($homedisplay=='True') 
  • branches/2.2/expressoMail1_2/inc/show_embedded_attach.php

    r1040 r3018  
    11<?php 
    2 if(!isset($GLOBALS['phpgw_info'])){ 
    3         $GLOBALS['phpgw_info']['flags'] = array( 
    4                 'currentapp' => 'expressoMail1_2', 
    5                 'nonavbar'   => true, 
    6                 'noheader'   => true 
    7         ); 
    8 } 
    9 require_once '../../header.inc.php'; 
     2 
     3        require_once '../../header.session.inc.php';  
    104 
    115        $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; 
  • branches/2.2/expressoMail1_2/inc/show_img.php

    r1040 r3018  
    11<?php 
    2 if(!isset($GLOBALS['phpgw_info'])){ 
    3         $GLOBALS['phpgw_info']['flags'] = array( 
    4                 'currentapp' => 'expressoMail1_2', 
    5                 'nonavbar'   => true, 
    6                 'noheader'   => true 
    7         ); 
    8 } 
    9 require_once '../../header.inc.php'; 
    102 
     3        require_once '../../header.session.inc.php';  
    114        header("Content-Type: image/jpeg"); 
    125        if($_GET['msg_num'] && $_GET['msg_part'] && $_GET['msg_folder']) { 
  • branches/2.2/expressoMail1_2/inc/show_thumbs.php

    r1040 r3018  
    11<?php 
    2 if(!isset($GLOBALS['phpgw_info'])){ 
    3         $GLOBALS['phpgw_info']['flags'] = array( 
    4                 'currentapp' => 'expressoMail1_2', 
    5                 'nonavbar'   => true, 
    6                 'noheader'   => true 
    7         ); 
    8 } 
    9 require_once '../../header.inc.php'; 
    102 
     3        require_once '../../header.session.inc.php';  
    114        $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; 
    125        $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; 
     
    3124        $image_mail = imap_fetchbody($mb, $msg_num, $msg_part, FT_UID); 
    3225        $image = imap_base64($image_mail); 
    33         $image = imagecreatefromstring ($image); 
    34          
    35         header("Content-Type: ".$file_type); 
    36         header("Content-Disposition: inline"); 
    37   
    38         $pic = $image; 
    39     if ($pic) { 
    40         $width = imagesx($pic); 
    41         $height = imagesy($pic); 
    42         $twidth = 160; # width of the thumb 160 pixel 
    43         $theight = $twidth * $height / $width; # calculate height 
    44         $thumb = imagecreatetruecolor ($twidth, $theight); 
     26        $pic = @imagecreatefromstring ($image); 
     27        if($pic !== FALSE) {  
     28                header("Content-Type: ".$file_type);  
     29                header("Content-Disposition: inline"); 
     30                $width = imagesx($pic); 
     31                $height = imagesy($pic); 
     32                $twidth = 160; # width of the thumb 160 pixel 
     33                $theight = $twidth * $height / $width; # calculate height 
     34                $theight =  $theight < 1 ? 1 : $theight;  
     35                $thumb = imagecreatetruecolor ($twidth, $theight); 
    4536                imagecopyresized($thumb, $pic, 0, 0, 0, 0,$twidth, $theight, $width, $height); # resize image into thumb 
    4637                imagejpeg($thumb,"",75); # Thumbnail as JPEG 
    47     } 
     38        } 
    4839?> 
  • branches/2.2/expressoMail1_2/inc/show_user_photo.php

    r1495 r3018  
    11<?php 
    2 if(!isset($GLOBALS['phpgw_info'])){ 
    3         $GLOBALS['phpgw_info']['flags'] = array( 
    4                 'currentapp' => 'expressoMail1_2', 
    5                 'nonavbar'   => true, 
    6                 'noheader'   => true 
    7         ); 
    8 } 
    9 require_once '../../header.inc.php'; 
     2 
     3        require_once '../../header.session.inc.php';  
    104 
    115 
  • branches/2.2/expressoMail1_2/index.php

    r1735 r3018  
    6262         
    6363        $preferences = $GLOBALS['phpgw']->preferences->read(); 
     64        $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['enable_local_messages'];  
    6465        $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 
    6566        $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled; 
     
    163164        include("inc/load_lang.php");  
    164165 
    165         // INCLUDE these JS Files:  
    166         echo "<script src='js/gears_init.js'></script>"; 
     166        // INCLUDE these JS Files: 
     167        if ($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_local_messages'])  
     168                echo "<script src='js/gears_init.js'></script>"; 
    167169        echo $obj -> getFilesJs("js/abas.js," . 
    168170                                                        "js/doiMenuData.js," . 
  • branches/2.2/expressoMail1_2/js/DropDownContacts.js

    r804 r3018  
    8181        for (var i=0; i<match_contacts.length; i++) 
    8282        { 
     83                match_contacts[i] = unescape(match_contacts[i]);  
    8384                var aux = match_contacts[i].split(""); 
    8485                for(var j in aux){ 
  • branches/2.2/expressoMail1_2/js/TreeShow.js

    r1558 r3018  
    147147 
    148148                var aux   = ttree.FOLDER.split(cyrus_delimiter); 
     149                var delimExp = new RegExp(cyrus_delimiter,"g");  
     150                newp = newp.replace(delimExp,'_');  
    149151                var newp2 = ""; 
    150152                if( aux[0] == "root"){ 
  • branches/2.2/expressoMail1_2/js/abas.js

    r1994 r3018  
    113113                        return alternate_border(id_value); 
    114114                var ID = id_value; 
     115                openTab.imapBox[ID] = current_folder; 
    115116        } 
    116117        td = document.createElement("TD"); 
     
    124125 
    125126        td.setAttribute("align", "right"); 
    126         td.onclick = function(){alternate_border(ID);}; 
     127        td.onclick = function(){alternate_border(ID);resizeWindow()}; 
    127128        td.setAttribute("noWrap","true"); 
    128129        td.alt = borderTitle; 
     
    152153        div.style.display=''; 
    153154 
    154         var bar = document.getElementById("toolbar"); 
    155         var offset = 0; 
    156         if(bar.style.visibility != 'hidden') 
    157                 offset = bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight; 
    158  
    159         div.style.height = document.body.clientHeight - offset - (is_ie ? 76 : 86); 
    160155        div.style.overflow = "hidden"; 
    161156 
    162         if(!is_ie) { 
    163                 var menuHidden = Element("folderscol").style.display == 'none' ? true : false; 
    164                 var defaultWidth = document.body.clientWidth - 27; 
    165                 if(!menuHidden) 
    166                         defaultWidth -= Element("folderscol").offsetWidth; 
    167  
    168                 div.style.width = defaultWidth; 
    169         } 
    170157        Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 
    171158        alternate_border(ID); 
     
    213200                if (body) 
    214201                { 
    215                                 var save_link = Element("save_message_options_"+ID); 
    216                                 if (openTab.toPreserve[ID] == undefined) 
    217                                         openTab.toPreserve[ID] = false; 
    218                                 if ((! openTab.toPreserve[ID] && ! ID.toString().match("_r")) || ((body.contentWindow) == 'object' && body.contentWindow.document.designMode.toLowerCase() == 'on') && (save_link.onclick != '')) 
    219                                 { 
    220                                         var discard_msg = confirm(get_lang("Your message has not been sent. Discard your message?"), ""); 
    221                                         if (!discard_msg) 
    222                                         { 
    223                                                 Element("border_id_"+ID).onclick = function () { alternate_border(ID);}; 
    224                                                 return; 
     202                        var save_link = Element("save_message_options_"+ID); 
     203                        if (openTab.toPreserve[ID] == undefined) 
     204                                openTab.toPreserve[ID] = false; 
     205                        if ((! openTab.toPreserve[ID] && ! ID.toString().match("_r")) || ((body.contentWindow) == 'object' && body.contentWindow.document.designMode.toLowerCase() == 'on') && (save_link.onclick != '')) 
     206                        { 
     207                                var discard_msg = confirm(get_lang("Your message has not been sent. Discard your message?"), ""); 
     208                                if (!discard_msg) 
     209                                { 
     210                                        Element("border_id_"+ID).onclick = function () { alternate_border(ID);}; 
     211                                        return; 
     212                                } 
     213                                else 
     214                                { 
     215                                        if (openTab.imapBox[ID] && openTab.imapUid[ID] && !openTab.toPreserve[ID]){ 
     216                                                delete_msgs(openTab.imapBox[ID], openTab.imapUid[ID].toString(), 0) 
     217                                                        openTab.toPreserve[ID] = false; 
    225218                                        } 
    226                                         else 
    227                                         { 
    228                                                 if (openTab.imapBox[ID] && !openTab.toPreserve[ID]){ 
    229                                                         delete_msgs(openTab.imapBox[ID], openTab.imapUid[ID].toString(), 0) 
    230                                                         delete(openTab.imapBox[ID]); 
    231                                                         openTab.toPreserve[ID] = false; 
    232                                                         } 
    233                                                         // Element('to_'+ID).focus(); It crash on IE 
    234                                         } 
    235                                 } 
     219                                        delete(openTab.imapBox[ID]); 
     220                                        // Element('to_'+ID).focus(); It crash on IE  
     221                                } 
     222                        } 
    236223                } 
    237224        } 
     
    273260        content = Element('content_id_' + ID); 
    274261        content.parentNode.removeChild(content); 
     262        resizeWindow(); 
    275263        return true; 
    276264} 
  • branches/2.2/expressoMail1_2/js/common_functions.js

    r1899 r3018  
    3535function resizeWindow(){ 
    3636 
    37         var bar = Element("toolbar"); 
    38         var offset = 0; 
    39         if(bar.style.visibility != 'hidden')  
    40                 offset = (bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight);      
    41  
    42         var screenHeight = document.body.clientHeight ? document.body.clientHeight : document.body.offsetHeight; 
    43         var defaultHeight = screenHeight - offset; 
     37        var divScrollMain = Element("divScrollMain_"+numBox);  
     38        var table_message = Element("table_message");  
     39        var content_folders = Element("content_folders");  
     40        var clientHeight = ((window.innerHeight ? window.innerHeight : document.body.offsetHeight) - 8);  
     41        var clientWidth = window.innerWidth ? window.innerWidth : document.body.offsetWidth; 
     42 
     43        if(divScrollMain){  
     44                divScrollMain.style.height = (clientHeight - (findPosY(divScrollMain) + (table_message.clientHeight ? table_message.clientHeight : table_message.offsetHeight))) + "px";  
     45        }  
    4446 
    4547        if(typeof(BordersArray) != 'undefined') { 
     
    4850                        var div = Element("content_id_"+BordersArray[i].sequence); 
    4951 
    50                         // This comented code cause/avoid (!?) Firefox to stuck some request 
    51                         if(div) 
    52 //                              div.setAttribute("style","height: "+parseInt(defaultHeight - 90)+"px;"); 
    53                                 div.style.height = defaultHeight - 90; 
    54                         if(div_scroll) 
    55 //                              div_scroll.setAttribute("style","height: "+parseInt(defaultHeight - 130)+"px;"); 
    56                                 div_scroll.style.height = defaultHeight - 130; 
    57                 } 
    58         } 
    59  
    60         if(Element('content_folders')) 
    61                 Element('content_folders').style.height = defaultHeight - (is_ie ? 165 : 150); 
    62         if(Element("divScrollMain_"+numBox)) 
    63                 Element("divScrollMain_"+numBox).style.height   = defaultHeight - (is_ie ? 111 : 110); 
     52                        if(div){  
     53                                div.style.height = (clientHeight - (findPosY(div) + (table_message.clientHeight ? table_message.clientHeight : table_message.offsetHeight)+2)) + "px";  
     54                                 div.style.width = (clientWidth - (findPosX(div)+10)) + "px";  
     55                        }  
     56                        if(div_scroll){  
     57                                div_scroll.style.height = (clientHeight - (findPosY(div_scroll) + (table_message.clientHeight ? table_message.clientHeight : table_message.offsetHeight)+5)) + "px";  
     58                                div_scroll.style.width = (clientWidth - (findPosX(div_scroll)+15)) + "px";  
     59                        }  
     60                }  
     61        }  
     62 
     63        if(content_folders){  
     64                var search_div = Element("search_div");  
     65                var contentFoldersY = findPosY(content_folders);  
     66                content_folders.style.height = (clientHeight - (contentFoldersY + (contentFoldersY > findPosY(search_div) ? 0 : (search_div.clientHeight ? search_div.clientHeight : search_div.offsetHeight) + 5))) + "px";  
     67        }  
    6468} 
    6569// END: FUNCTION RESIZE WINDOW 
     
    9094// Translate words and phrases using user language from eGroupware. 
    9195function get_lang(_key) { 
     96        if (typeof(_key) == 'undefined')  
     97                return false;  
    9298        var key = _key.toLowerCase(); 
    9399        if(array_lang[key]) 
     
    116122        remove_className(tr_message, 'tr_msg_unread'); 
    117123        remove_className(tr_message, 'selected_msg'); 
     124        Element("td_message_unseen_"+msg_number).innerHTML = "<img src ='templates/"+template+"/images/seen.gif' title='"+get_lang('Seen')+"'>";  
    118125        connector.purgeCache(); 
    119126        return true; 
     
    131138        remove_className(tr_message, 'selected_msg'); 
    132139        add_className(tr_message, 'tr_msg_unread'); 
     140        Element("td_message_unseen_"+msg_number).innerHTML = "<img src ='templates/"+template+"/images/unseen.gif' title='"+get_lang('Unseen')+"'>";  
    133141} 
    134142 
     
    215223        } 
    216224        if(new_file_name) 
    217                 params = "&newfilename="+new_file_name; 
     225                params = "&newfilename="+escape(new_file_name); 
    218226        if(encoding) 
    219227                params += "&encoding="+encoding; 
     
    862870        } 
    863871} 
     872 
     873function borkb(size){  
     874        kbyte = 1024;  
     875        mbyte = kbyte*1024;  
     876        gbyte = mbyte*1024;  
     877        if (!size)  
     878                size = 0;  
     879        if (size < kbyte)  
     880                return size + ' B';  
     881        else if (size < mbyte)  
     882                return parseInt(size/kbyte) + ' KB';  
     883        else if (size < gbyte)  
     884                if (size/mbyte > 100)  
     885                        return (size/mbyte).toFixed(0) + ' MB';  
     886                else  
     887                        return (size/mbyte).toFixed(1) + ' MB';  
     888        else  
     889                return parseInt(size/gbyte).toFixed(1) + ' GB';  
     890}  
    864891 
    865892function validate_date(date){ 
  • branches/2.2/expressoMail1_2/js/connector.js

    r1965 r3018  
    340340                                                                if ( typeof data == 'undefined' ) 
    341341                                                                        data = oxmlhttp.responseText; 
     342                                                                // Verify user session  
     343                                                                if(data && data.nosession){  
     344                                                                        // If hold session is setted, dont reload the page ...  
     345                                                                        if(hold_session) {  
     346                                                                                if(typeof(write_msg) == "function" && typeof(get_lang) == "function")  
     347                                                                                        write_msg(get_lang("your session could not be verified."));  
     348                                                                                else  
     349                                                                                        alert("your session could not be verified.");  
     350                                                                        }  
     351                                                                        else  
     352                                                                                window.location.reload();  
     353 
     354                                                                        delete _thisObject.requests[id];  
     355                                                                        _thisObject.requests[id] = null;  
     356                                                                        return false;  
     357                                                                }  
    342358                                                                if(debug_controller) { 
    343359                                                                        document.getElementById("debug_controller").innerHTML += oxmlhttp.responseText; 
  • branches/2.2/expressoMail1_2/js/draw_api.js

    r1969 r3018  
    436436                        } 
    437437                        folders = data; 
    438                         cExecute ("$this.imap_functions.get_range_msgs2&folder=INBOX&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type=SORTARRIVAL&search_box_type=ALL&sort_box_reverse=1", handler_draw_box); 
    439438                } 
    440439} 
     
    726725        var _divScroll = document.getElementById("divScrollMain_"+numBox); 
    727726 
    728         var bar = document.getElementById("toolbar"); 
    729         var offset = 0; 
    730727 
    731728        if(!_divScroll){                 
     
    742739                _divScroll.style.width  ="99.3%"; 
    743740        } 
    744         // Inicio: Redimensiona DIV SCROLL 
    745         var bar = Element("toolbar"); 
    746         var offset = 0; 
    747         if(bar.style.visibility != 'hidden')  
    748                 offset = (bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight);              
    749         var screenHeight = document.body.clientHeight ? document.body.clientHeight : document.body.offsetHeight; 
    750         var defaultHeight = screenHeight - offset;               
    751         _divScroll.style.height         = defaultHeight - 110; 
    752         Element('content_folders').style.height = defaultHeight - (is_ie ? 165 : 150); 
    753         // Fim: Redimensiona DIV SCROLL 
    754741        _divScroll.appendChild(table_element); 
    755742        openTab.content_id[numBox].appendChild(_divScroll); 
     
    758745 
    759746                if (headers_msgs.num_msgs == 0){ 
    760                         td_info = document.createElement("H3"); 
    761                         td_info.setAttribute("height", "25%"); 
     747                        var tr_info = document.createElement("TR");  
     748                        var td_info = document.createElement("TD");  
     749                        td_info.setAttribute("colspan", "10");  
    762750                        td_info.setAttribute("background", "#FFF"); 
    763                         td_info.setAttribute("id", "msg_info"); 
     751                        tr_info.setAttribute("id", "msg_info"); 
    764752                        td_info.align = "center"; 
     753                        td_info.style.padding = "25px";  
     754                        td_info.style.fontWeight = "bold";  
     755                        td_info.style.fontSize = "11pt";  
    765756                        td_info.innerHTML = get_lang("This mail box is empty"); 
     757                        tr_info.appendChild(td_info);  
    766758                        tbody_element.appendChild(td_info); 
    767759                } 
     
    788780        draw_footer_box(headers_msgs.num_msgs);  
    789781        Element('main_table').style.display = ''; 
     782        if(is_ie6)      // Stupid Fixing on IE6.  
     783                setTimeout("resizeWindow()",1);  
     784        else  
     785                resizeWindow();  
    790786        if(debug) { 
    791787                var _eTime = new Date(); 
     
    954950                _img_sent.src    = "templates/"+template+"/images/sent.gif"; 
    955951 
     952 
     953 
     954                var td_element25 = document.createElement("TD");  
     955                td_element25.className = "td_msg";  
     956                td_element25.setAttribute("width", "1%");  
     957                td_element25.id = "td_message_unseen_"+headers_msgs.msg_number;  
     958                if ((headers_msgs.Unseen == 'U') || (headers_msgs.Recent == 'N'))  
     959                        td_element25.innerHTML = "<img src ='templates/"+template+"/images/unseen.gif' title='"+get_lang('Unseen')+"'>";  
     960                else  
     961                        td_element25.innerHTML = "<img src ='templates/"+template+"/images/seen.gif' title='"+get_lang('Seen')+"'>";  
     962 
     963 
    956964                td_element3 = document.createElement("TD"); 
    957965                td_element3.className = "td_msg"; 
     
    964972                if (typeof(headers_msgs.from) == 'undefined') 
    965973                        return false; 
    966                 if(headers_msgs.from.email.toLowerCase() == Element("user_email").value) 
     974                if( headers_msgs.from.email && headers_msgs.from.email.toLowerCase() == Element("user_email").value ) 
    967975                {  
    968976                        td_element3.onmouseover = function () {this.title=headers_msgs.to.email;}; 
     
    970978                                td_element3.innerHTML += "<span style=\"color:red\">("+get_lang("Draft")+") </span>"; 
    971979                        else{                            
    972                                 if(headers_msgs.to.email.toLowerCase() != Element("user_email").value) 
     980                                if(headers_msgs.to.email != null && headers_msgs.to.email.toLowerCase() != Element("user_email").value)  
    973981                                        td_element24.innerHTML = "<img valign='center' src ='templates/"+template+"/images/sent.gif' title='"+get_lang('Sent')+"'>"; 
    974982                         
     
    10481056                tr_element.appendChild(td_element22); 
    10491057                tr_element.appendChild(td_element23); 
    1050         tr_element.appendChild(td_element24); 
     1058                tr_element.appendChild(td_element24); 
     1059                tr_element.appendChild(td_element25);  
    10511060                tr_element.appendChild(td_element3); 
    10521061                tr_element.appendChild(td_element4); 
     
    11151124function draw_message(info_msg, ID){ 
    11161125        var content = document.getElementById('content_id_' + ID); 
    1117         var defaultWidth = document.body.offsetWidth - 37; 
    11181126         
    11191127        var menuHidden = Element("folderscol").style.display == 'none' ? true : false; 
    1120         if(!menuHidden) 
    1121                 defaultWidth -= Element("folderscol").offsetWidth; 
    11221128         ////////////////////////////////////////////////////////////////////////////////////////////////////// 
    11231129        //Make the next/previous buttom. 
     
    12391245        var tbody_message = document.createElement("TBODY"); 
    12401246        table_message.border = "0"; 
    1241         table_message.width = defaultWidth ; 
     1247        table_message.width = "100%";  
    12421248 
    12431249        ////////////////////////////////////////////////////////////////////////////////////////////////////// 
     
    12681274 
    12691275        td.innerHTML = _name.bold() + ', ' + info_msg.smalldate; 
    1270         if (info_msg.attachments.length > 0) 
     1276        if (info_msg.attachments && info_msg.attachments.length > 0)  
    12711277                td.innerHTML += "&nbsp<img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='templates/"+template+"/images/clip.gif' title='"+info_msg.attachments.names+"'>"; 
    12721278         
     
    12961302        option_hide_more.id = 'option_hide_more_'+ID; 
    12971303        option_hide_more.onclick = function(){ 
    1298                 var _height = Element("div_message_scroll_"+ID).style.height; 
    1299                 _height = parseInt(_height.replace("px","")); 
    1300                 var _offset = 35; 
    13011304                if (this.value == 'more_options'){ 
    13021305                        this.innerHTML = "<b><u>"+get_lang('Options')+"</u></b>"; 
    13031306                        this.value = 'hide_options'; 
    1304                         Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px"; 
    13051307                        Element('table_message_others_options_'+ID).style.display = ''; 
    13061308                        Element('tr_other_options_'+ID).style.display = ''; 
     
    13101312                        this.innerHTML = get_lang('Options'); 
    13111313                        this.value = 'more_options'; 
    1312                         Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px"; 
    13131314                        Element('table_message_others_options_'+ID).style.display = 'none'; 
    13141315                        Element('tr_other_options_'+ID).style.display = 'none';                  
    13151316                } 
     1317                resizeWindow(); 
    13161318        }; 
    13171319        var option_mark = document.createElement('TD'); 
     
    15101512        var table_message_others_options = document.createElement("TABLE"); 
    15111513        table_message_others_options.id = 'table_message_others_options_' + ID; 
    1512         table_message_others_options.width =  defaultWidth - 30; 
     1514        table_message_others_options.width = "100%"; 
    15131515        table_message_others_options.style.display = 'none'; 
    15141516        table_message_others_options.className = "table_message"; 
     
    16191621        } 
    16201622        else { 
    1621                 to.innerHTML += draw_plugin_cc(ID,toaddress_array[ID]); 
     1623                toAdd = toaddress_array[ID].toString().replace("<","&lt;");  
     1624                toAdd = toAdd.replace(">","&gt;");  
     1625                to.innerHTML += draw_plugin_cc(ID,toAdd);  
    16221626        } 
    16231627        to.className = "header_message_field"; 
     
    17471751        tr5.appendChild(subject); 
    17481752        tbody_message_others_options.appendChild(tr5); 
    1749         if (info_msg.attachments.length > 0){ 
    1750                 var tr6 = document.createElement("TR"); 
     1753        if ( info_msg.attachments && info_msg.attachments.length > 0 ){  
     1754        var tr6 = document.createElement("TR"); 
    17511755                tr6.className = "tr_message_header"; 
    17521756                var td6 = document.createElement("TD"); 
     
    18261830 
    18271831 
    1828         // BEGIN MAKE THE SCROLL HEIGHT 
    1829         var bar = document.getElementById("toolbar"); 
    1830         var offset = 0; 
    1831         if(bar.style.visibility != 'hidden') 
    1832                 offset = bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight; 
    18331832        var div = document.createElement("DIV"); 
    18341833        div.id = "div_message_scroll_"+ID; 
    18351834        div.style.background = 'WHITE'; 
    1836         div.style.height = document.body.clientHeight - offset - 125; 
    1837         content.style.height = document.body.clientHeight - offset - 90; 
    18381835        div.style.overflow = "auto"; 
    1839         div.style.width = defaultWidth - (is_ie ? 5 : 0); 
    1840         // END MAKE THE SCROLL HEIGHT 
     1836        div.style.width = "100%";  
    18411837        table_message_others_options.appendChild(tbody_message_others_options); 
    18421838        var tr = document.createElement("TR"); 
     
    18441840        td.colSpan = '2'; 
    18451841        div.appendChild(table_message_others_options); 
    1846         var imgTag = info_msg.body.match(/(<img[^>]*src[^=]*=['"][^'"]*["'][^>]*>)|(<td[^>]*background[^=]*=['"][^'"]*["'][^>]*>)/gi); 
     1842        var imgTag = info_msg.body.match(/(<img[^>]*src[^>=]*=['"]?[^'">]*["']?[^>]*>)|(<[^>]*(style[^=>]*=['"][^>]*background(-image)?:[^:;>]*url\()[^>]*>)/gi); 
    18471843        var newBody = info_msg.body; 
    18481844        if(!info_msg.showImg && imgTag) 
     
    18591855                                for (var i = 0; i < domains.length; i++) 
    18601856                                { 
     1857                                        if (imgTag[j].match(/cid:([\w\d]){5,}/) || imgTag[j].match(/src=\"\.\/inc\/show_embedded_attach\.php/g))   
     1858                                        { 
     1859                                                forbidden = false; 
     1860                                                continue; 
     1861                                        } 
    18611862                                        imgSource = imgTag[j].match(/=['"](http:\/\/)+[^'"\/]*/); 
    18621863                                        if (imgSource && imgSource.toString().substr(5).match(domains[i])) 
     
    18941895        newBody = newBody.replace("<body","<span"); 
    18951896        newBody = newBody.replace("<BODY","<span"); 
    1896         div.innerHTML+= "<span id='body_"+ID+"'>"+newBody+"</span><br><br>"; 
     1897        while ( ( /<span[^>]*><span[^>]*>/ig ).test( newBody ) )  
     1898                newBody = newBody.replace( /(<span[^>]*>)<span[^>]*>/ig, '$1' );  
     1899 
     1900        var _body = document.createElement( 'div' );  
     1901        _body.id = 'body_' + ID;  
     1902        _body.innerHTML = newBody;  
     1903 
     1904        var _elements = _body.getElementsByTagName( '*' );  
     1905        for( var i = 0; i < _elements.length; i++ )  
     1906                if ( _elements[ i ].attributes && _elements[ i ].attributes.getNamedItem( 'id' ) )  
     1907                        _elements[ i ].attributes.removeNamedItem( 'id' );  
     1908 
     1909        div.appendChild( _body );  
     1910 
     1911        function mailto( link )  
     1912        {  
     1913                var mail = link.href.substr( 7 );  
     1914                link.onclick = function( )  
     1915                {  
     1916                        new_message_to( mail );  
     1917                        return false;  
     1918                };  
     1919        }  
     1920        var links = div.getElementsByTagName( 'a' );  
     1921        for ( var i = 0; i < links.length; i++ ){  
     1922                try{  
     1923                        if ( links.item( i ).href.indexOf( 'mailto:' ) === 0 ){                           
     1924                                mailto( links.item( i ) );  
     1925                        }  
     1926                        else{  
     1927                                if ( links.item( i ).href.indexOf( 'javascript:' ) !== 0 )  
     1928                                        links.item( i ).setAttribute( 'target', '_blank' );  
     1929                        }  
     1930                }catch(e){  
     1931                }  
     1932        }        
    18971933        //////////////////////////////////////////////////////////////////////////////////////////////////////   
    18981934        //Make the thumbs of the message. 
     
    19421978        table_message.appendChild(tbody_message); 
    19431979        content.appendChild(table_message); 
     1980        resizeWindow();  
    19441981        var msg_number = document.createElement('INPUT'); 
    19451982        msg_number.id = "msg_number_" + ID; 
     
    24812518        tr5.appendChild(td_body); 
    24822519        tbody_message.appendChild(tr5); 
    2483 // BEGIN MAKE THE SCROLL HEIGHT 
    2484     var defaultWidth = document.body.clientWidth - (is_ie ? 200 : 195); 
    2485         var _bar = document.getElementById("toolbar"); 
    2486         var _offset = 0; 
    2487         if(_bar.style.visibility != 'hidden')  
    2488                 _offset = _bar.offsetHeight ? _bar.offsetHeight :  _bar.clientHeight;            
    2489         var _div = document.createElement("DIV"); 
     2520        var _div = document.createElement("DIV"); 
    24902521        _div.id = "div_message_scroll_"+ID; 
    2491         _div.style.height = document.body.clientHeight - _offset - 105; 
    2492         content.style.height = document.body.clientHeight - _offset - 80; 
    24932522        _div.style.overflow = "auto"; 
    2494         _div.style.width = defaultWidth; 
    2495         // END MAKE THE SCROLL HEIGHT 
     2523        _div.style.width = "100%";  
    24962524 
    24972525        // Hide the contac tips and re-position the pallete color. 
     
    25122540        if(!expresso_offline) 
    25132541                draw_from_field(sel_from,tr1_1); 
     2542        resizeWindow();  
    25142543        return ID; 
    25152544} 
  • branches/2.2/expressoMail1_2/js/filter.js

    r1546 r3018  
    1111        function cfilter(){ 
    1212 
     13                this.criticalError = false; 
    1314                this.mode_in   = ""; 
    1415                this.rulest              = new Array; 
     
    4142 
    4243         
    43         cfilter.prototype.load_rules = function() 
     44        cfilter.prototype.load_rules = function(posHandler, param) 
    4445        { 
    4546                var _this = this; 
    4647                var cont1 = parseInt(0); 
    4748                var cont2 = parseInt(0); 
    48                                  
     49         
    4950                if( _this.rulest.length == 0 ) 
    5051                { 
    5152                        var handler_sieve = function(data) 
    5253                        { 
     54                                if (data.toString().indexOf('Error:') == 0)  
     55                                { 
     56                                        _this.criticalError = true; 
     57                                        alert(get_lang('The filters service is out of service, try again later...')); 
     58                                } 
     59                                else 
     60                                try{ 
    5361                                if(data.rule.length > 0){ 
    5462                                        for(var i=0 ; i < data.rule.length; i++) 
     
    6472                                _this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : ""; 
    6573                                if(data.mode.length > 0){_this.mode_in = data.mode[0];} 
     74                                } 
     75                                catch(e){ 
     76                                        _this.criticalError = true; 
     77                                        alert(get_lang('The filters service is out of service, try again later...')); 
     78                                } 
     79                                if (typeof(posHandler) == 'function')   
     80                                        posHandler(param);   
    6681                        } 
    6782                        if(Element('form_status') != null) 
     
    381396                this.reload_rules(); 
    382397        } 
    383          
    384         cfilter.prototype.new_rule = function(email){ 
    385  
    386                 if(this.email_deny.length > 0){ 
    387                         for(var i=0 ; i < this.email_deny.length; i++){ 
    388                                 if(this.email_deny[i] == email){ 
    389                                         alert(get_lang("Sender blocked")+"!"); 
    390                                         return false; 
    391                                 } 
    392                         } 
    393                 } 
    394  
    395                 // Verifica Email 
    396                 var emailReg = /^[a-z][a-z-_0-9\.]+@[a-z-_=>0-9\.]+\.[a-z]{2,3}$/i 
    397         if(!emailReg.test(email)){ 
    398                         alert(get_lang("Inform a valid e-mail!")); 
    399                         return false; 
    400                 } 
    401  
    402                 this.load_rules(); 
    403                 if(confirm(get_lang("Do you want to block this e-mail?"))){ 
    404                         new_r = "&&ENABLED&&" + email + "&&&&&&discard&&&&0&&&&&&0"; 
    405 //                      setTimeout("filter.e_newrule('" + new_r + "')",2000);            
    406                         if (filter.e_newrule(new_r)){ 
    407                                 this.email_deny.push(email); 
    408                                 write_msg(get_lang("The sender was blocked"));                                                   
    409                         }else 
    410                                 write_msg(get_lang("You have reached the maximum number of rules")); 
    411                 } 
    412         } 
    413          
     398 
     399cfilter.prototype.new_rule = function(email){ 
     400 
     401        var createFilter = function (param){  
     402                if (filter.criticalError){  
     403                        alert(get_lang('The filters service is out of service, try again later...'));  
     404                        return false;  
     405                }  
     406                if(filter.rulest.length > 0){  
     407                        var blockedReg = new RegExp('#rule&&[0-9]+&&ENABLED&&'+param+'&&&&&&discard&&&&0&&&&&&0');  
     408                        for(var i=0 ; i < filter.rulest.length; i++){  
     409                                if(blockedReg.test(filter.rulest[i])){  
     410                                        alert(get_lang("Sender blocked")+"!");  
     411                                        return false;  
     412                                }  
     413                        }  
     414                }                         
     415                if(confirm(get_lang("Do you want to block this e-mail?"))){  
     416                        new_r = "&&ENABLED&&" + param + "&&&&&&discard&&&&0&&&&&&0";  
     417                        //setTimeout("filter.e_newrule('" + new_r + "')",2000);           
     418                        if (filter.e_newrule(new_r)){  
     419                                filter.email_deny.push(new_r);  
     420                                write_msg(get_lang("The sender was blocked"));                                                    
     421                        }else  
     422                                write_msg(get_lang("You have reached the maximum number of rules"));  
     423                }  
     424        };  
     425        if ( filter.rulest.length > 0 )  
     426                createFilter(email);  
     427        else  
     428                this.load_rules( createFilter, email );  
     429} 
     430 
    414431        cfilter.prototype.e_newrule = function(nw_rule) 
    415432        { 
     
    747764                var args   = "$this.ScriptS.rec_rules"; 
    748765                var params = "arfilter="+aux_rul; 
    749                 cExecute(args,h_filter,params); 
     766                if(!_this.criticalError) 
     767                        cExecute(args,h_filter,params); 
    750768        } 
    751769 
  • branches/2.2/expressoMail1_2/js/filters.js

    r810 r3018  
    1 var rules_limit = 300; 
     1var rules_limit = 3000; 
    22 
    33        function cfilterSh(){ 
     
    6767 
    6868                this.showWindow(form); 
    69                 filter.load_rules(); 
    70                 this.list_rules();                       
    71          
     69                if ( filter.rulest.length > 0 )  
     70                        this.list_rules();  
     71                else  
     72                        filter.load_rules(this.list_rules);  
    7273        } 
    7374 
    7475        cfilterSh.prototype.list_rules = function(){ 
    75                 if(filter.rulest.length == 0) 
    76                         setTimeout("filters.mount_list()",2500); 
    77                 else 
    78                         this.mount_list(); 
     76                        if(filter.criticalError)  
     77                                return false;  
     78                        else  
     79                                filters.mount_list();  
    7980        } 
    8081 
  • branches/2.2/expressoMail1_2/js/local_messages.js

    r1982 r3018  
    119119 
    120120        local_messages.prototype.create_objects = function() { 
    121                 if(this.dbGears == null) 
     121                if(window.google){ 
     122                if (this.dbGears == null) 
    122123                        this.dbGears = google.gears.factory.create('beta.database'); 
    123124                if(this.localServer == null) 
     
    125126                if(this.store == null) 
    126127                        this.store = this.localServer.createStore('test-store'); 
     128                } 
    127129        } 
    128130 
  • branches/2.2/expressoMail1_2/js/main.js

    r1989 r3018  
    5959                cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences. 
    6060                cExecute ("$this.imap_functions.get_folders_list&onload=true", update_menu); 
     61                cExecute ("$this.imap_functions.get_range_msgs2&folder=INBOX&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type=SORTARRIVAL&search_box_type=ALL&sort_box_reverse=1", handler_draw_box); 
    6162                 
    6263        } 
     
    320321 
    321322                 
    322                 if(Element("border_id_" + id_msg_read))  
    323                         alternate_border(id_msg_read);           
     323                if(Element("border_id_" + id_msg_read)) { 
     324                        alternate_border(id_msg_read);   
     325                        resizeWindow();          
     326                } 
    324327                else { 
    325328                        var border_id = create_border(msg_info.subject, id_msg_read); 
     
    393396                if (box.childNodes.length == 0) 
    394397                { 
    395                         td_info = document.createElement("H3"); 
    396                         td_info.setAttribute("height", "25%"); 
     398                        var tr_info = document.createElement("TR");  
     399                        var td_info = document.createElement("TD");  
     400                        td_info.setAttribute("colspan", "10");  
    397401                        td_info.setAttribute("background", "#FFF"); 
    398                         td_info.setAttribute("id", "msg_info"); 
     402                        tr_info.setAttribute("id", "msg_info"); 
    399403                        td_info.align = "center"; 
    400                         td_info.innerHTML = get_lang("This mail box is empty"); 
     404                        td_info.style.padding = "25px";                   
     405                        td_info.style.fontWeight = "bold";  
     406                        td_info.style.fontSize = "11pt";    
     407                        td_info.innerHTML = get_lang("This mail box is empty");i 
     408                        tr_info.appendChild(td_info);  
    401409                        box.appendChild(td_info); 
    402410                } 
     
    410418                        var box = Element("tbody_box"); 
    411419                        table_element.appendChild(box); 
    412                          
     420                        if (data[0].msg_folder != current_folder) // Bad request  
     421                                return false; 
     422 
    413423                        for (var i=0; i<data.length; i++){ 
    414                                 var new_msg = this.make_tr_message(data[i], current_folder);                             
    415                                 _dragArea.makeDragged(new_msg, data[i].msg_number, data[i].subject, true); 
    416                                 eval(data[i].command); 
     424                                var existent = document.getElementById(data[i].msg_number);  
     425                                if (!existent)  
     426                                {  
     427                                        var new_msg = this.make_tr_message(data[i], current_folder);                              
     428                                        _dragArea.makeDragged(new_msg, data[i].msg_number, data[i].subject, true);  
     429                                        eval(data[i].command);  
     430                                }  
    417431                        } 
    418432                        if (! typeof(data.msgs_to_delete) == 'undefined') 
     
    633647function move_msgs2(folder, msgs_number, border_ID, new_folder, new_folder_name,show_success_msg){ 
    634648        if (! folder || folder == 'null') 
    635                 folder = Element("input_folder_"+msgs_number+"_r") ? Element("input_folder_"+msgs_number+"_r").value : get_current_folder(); 
    636  
     649                folder = Element("input_folder_"+msgs_number+"_r") ? Element("input_folder_"+msgs_number+"_r").value : (openTab.imapBox[currentTab] ? openTab.imapBox[currentTab]:get_current_folder()); 
    637650        if(openTab.type[currentTab] == 1) 
    638651                return move_search_msgs('content_id_'+currentTab,new_folder,new_folder_name); 
     
    13341347 
    13351348        // IM Module Enabled 
    1336         if( window.parent.loadscript ) 
     1349        if( window.parent.loadscript && loadscript.autoStatusIM )  
    13371350        { 
    13381351                config_events( body.contentWindow.document, "onkeypress", loadscript.autoStatusIM );     
     
    14291442 
    14301443function send_message_return(data, ID){ 
     1444    watch_changes_in_msg(ID);  
    14311445 
    14321446    var sign = false; 
     
    17021716function return_save(data,border_id,folder_name,folder_id,message_id) 
    17031717{ 
     1718        Element("send_button_"+border_id).style.visibility="visible";  
    17041719        var handler_delete_msg = function(data){ refresh(preferences.alert_new_msg); }; 
    17051720 
     
    18391854                save_link.className = 'message_options_inactive'; 
    18401855                watch_changes_in_msg(border_id); 
    1841                 Element("send_button_"+border_id).style.visibility="visible"; 
    18421856                write_msg(get_lang('Your message was save as draft in folder %1.', lang_folder(folder_name))); 
    18431857        }                
     
    18581872                sendButton.style.visibility="hidden"; 
    18591873 
    1860         if (openTab.imapBox[border_id]) //Gets the imap folder 
     1874        if (openTab.imapBox[border_id] && openTab.type[border_id] != 6 && openTab.type[border_id] != 7) //Gets the imap folder  
    18611875                var folder_id = openTab.imapBox[border_id]; 
    18621876        else 
     
    21592173                if(!verify_session(data)) 
    21602174                        return; 
    2161                 if (get_current_folder() == 'INBOX'+cyrus_delimiter+trashfolder){ 
    2162                         draw_paging(0); 
    2163                         kill_current_box(); 
    2164                 } 
    21652175                tree_folders.getNodeById('INBOX'+cyrus_delimiter+trashfolder).alter({caption: get_lang("Trash")}); 
    21662176                tree_folders.getNodeById('INBOX'+cyrus_delimiter+trashfolder)._refresh(); 
    21672177                update_quota(get_current_folder()); 
    2168                 if (data) 
     2178                if (data){ 
    21692179                        write_msg(get_lang('Your Trash folder was empty.')); 
     2180                        if (get_current_folder() == 'INBOX'+cyrus_delimiter+trashfolder){ 
     2181                                draw_paging(0); 
     2182                                kill_current_box(); 
     2183                                Element('tot_m').innerHTML = 0; 
     2184                                Element('new_m').innerHTML = 0; 
     2185                        } 
     2186                } 
    21702187                else 
    21712188                        write_msg(get_lang('ERROR emptying your Trash folder.')); 
     
    23862403        else{ 
    23872404                if(data == 'Post-Content-Length') 
    2388                         write_msg(get_lang('The size of this message has exceeded  the limit (%1B).',Element('upload_max_filesize').value)); 
     2405                        write_msg(get_lang('The size of this message has exceeded  the limit (%1B).', preferences.max_attachment_size ? preferences.max_attachment_size : Element('upload_max_filesize').value)); 
    23892406                else {  /* 
    23902407                        * @author Rommel Cysne (rommel.cysne@serpro.gov.br) 
  • branches/2.2/expressoMail1_2/js/messages_proxy.js

    r1969 r3018  
    9090         
    9191        messages_proxy.prototype.is_local_folder = function(folder) { 
    92                 if(folder.indexOf("local_")==-1) 
     92                if(typeof(folder) == "undefined" || folder.indexOf("local_")==-1) 
    9393                        return false; 
    9494                return true; 
     
    179179        messages_proxy.prototype.proxy_move_messages = function (folder, msgs_number, border_ID, new_folder, new_folder_name) { 
    180180                if (! folder || folder == 'null') 
    181                         folder = Element("input_folder_"+msgs_number+"_r") ? Element("input_folder_"+msgs_number+"_r").value : get_current_folder(); 
    182  
     181                        folder = Element("input_folder_"+msgs_number+"_r") ? Element("input_folder_"+msgs_number+"_r").value : (openTab.imapBox[currentTab] ? openTab.imapBox[currentTab]:get_current_folder()); 
    183182                if ((this.is_local_folder(folder)) && (this.is_local_folder(new_folder))) { //Move entre pastas não locais... 
    184183                        if (folder == new_folder){ 
  • branches/2.2/expressoMail1_2/js/search.js

    r1969 r3018  
    203203                ttree.make_tree(folders,"div_folders_search","_folders_tree_search","","","",""); 
    204204        } 
    205          
    206         //This func returns the most recent date 
    207         function date_comp(a,b) 
    208         { 
    209                 var data1 = a.match(/\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g); 
    210                 data1 = data1[0].substr(0, data1[0].indexOf('--')) 
    211                 with ( data1 )  
    212                         data1 = Date.UTC(substr(6), substr(3, 2), substr(0, 2)); 
    213                 var data2 = b.match(/\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g); 
    214                 data2 = data2[0].substr(0, data2[0].indexOf('--')) 
    215                 with ( data2 ) 
    216                         data2 = Date.UTC(substr(6), substr(3, 2), substr(0, 2)); 
    217                 return data2 - data1; 
    218         } 
    219         function date_comp_reverse(a,b) 
    220         { 
    221                 return date_comp(b,a); 
    222         } 
    223          
    224         function box_comp(a,b) 
    225         { 
    226         var compare = []; 
    227         compare[0] = a.substr(0, a.indexOf('--')); 
    228         compare[0] = compare[0].toLowerCase(); 
    229         var temp=compare[0]; 
    230         compare[1] = b.substr(0, b.indexOf('--')) 
    231         compare[1] = compare[1].toLowerCase(); 
    232         compare.sort(); 
    233         if (temp != compare[0]) 
    234                 return +1; 
    235         else 
    236                 return -1; 
    237         } 
    238         function box_comp_reverse(a,b) 
    239         { 
    240                 return box_comp(b,a); 
    241         } 
    242  
    243         function who_comp(a,b) 
    244         { 
    245         var compare = []; 
    246         compare[0] = a.substr(a.indexOf('--')+2); 
    247         compare[0] = compare[0].toLowerCase(); 
    248         var temp=compare[0]; 
    249         compare[1] = b.substr(b.indexOf('--')+2); 
    250         compare[1] = compare[1].toLowerCase(); 
    251         compare.sort(); 
    252         if (temp != compare[0]) 
    253                 return +1; 
    254         else 
    255                 return -1; 
    256         } 
    257         function who_comp_reverse(a,b) 
    258         { 
    259                 return who_comp(b,a); 
    260         } 
    261  
    262         function subject_comp(a,b) 
    263         { 
    264         var compare = []; 
    265         compare[0] = a.substr(a.indexOf('--')+2); 
    266         compare[0] = compare[0].substr(compare[0].indexOf('--')+2); 
    267         compare[0] = compare[0].toLowerCase(); 
    268         var temp=compare[0]; 
    269         compare[1] = b.substr(b.indexOf('--')+2); 
    270         compare[1] = compare[1].substr(compare[1].indexOf('--')+2); 
    271         compare[1] = compare[1].toLowerCase(); 
    272         compare.sort(); 
    273         if (temp != compare[0]) 
    274                 return +1; 
    275         else 
    276                 return -1; 
    277         } 
    278         function subject_comp_reverse(a,b) 
    279         { 
    280                 return subject_comp(b,a); 
    281         } 
    282  
    283         function size_comp(a,b) 
    284         { 
    285                 var data1 = a.match(/\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g); 
    286                 data1 = data1[0].substr(data1[0].indexOf('--')+2) 
    287                 data1 = data1.substr(0,data1.indexOf('--')) 
    288                 var size_a = parseInt(data1.substr(0,data1.indexOf(' '))); 
    289                 if (data1.match("k")) 
    290                         size_a = size_a * 1024; 
    291                 else 
    292                         if (data1.match("m")) 
    293                                 size_a = size_a * 1048576; 
    294                 var data2 = b.match(/\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g); 
    295                 data2 = data2[0].substr(data2[0].indexOf('--')+2) 
    296                 data2 = data2.substr(0,data2.indexOf('--')) 
    297                 var size_b = parseInt(data2.substr(0,data2.indexOf(' '))); 
    298                 if (data2.match("k")) 
    299                         size_b = size_b * 1024; 
    300                 else 
    301                         if (data2.match("m")) 
    302                                 size_b = size_b * 1048576; 
    303                 return size_b - size_a; 
    304         } 
    305         function size_comp_reverse(a,b) 
    306         { 
    307                 return size_comp(b,a); 
    308         } 
    309205 
    310206        // Form resultado 
    311207        searchE.prototype.mount_result = function(data,sort_type){ 
    312                 var nw_array = new Array; 
    313                 var var_tmp = data.substr(2, data.length - 4); 
    314                 var_tmp  = var_tmp.split("####"); 
     208                if (data == undefined) 
     209                        return; 
    315210                var cont = parseInt(0); 
     211 
     212                //This func returns the comparison between criterias  
     213                var date_comp = function(a,b){ return a.udate > b.udate;};  
     214                var date_comp_reverse = function(a,b){ return date_comp(b,a);};  
     215                var box_comp = function(a,b){   return a.boxname > b.boxname; }  
     216                var box_comp_reverse = function(a,b){   return box_comp(b,a); }  
     217                var who_comp = function(a,b){ return a.from > b.from; }  
     218                var who_comp_reverse = function(a,b){ return who_comp(b,a); }  
     219                var subject_comp = function(a,b){ return a.subject > b.subject; }  
     220                var subject_comp_reverse = function(a,b){ return subject_comp(b,a); }  
     221                var size_comp = function(a,b){ return a.size > b.size; }  
     222                var size_comp_reverse = function(a,b){ return size_comp(b,a); } 
     223 
    316224                switch (sort_type) 
    317225                { 
    318226                        case 'SORTDATE': 
    319                                 var_tmp.sort(date_comp); 
     227                                data.sort(date_comp); 
    320228                                break; 
    321229                        case 'SORTDATE_REVERSE': 
    322                                 var_tmp.sort(date_comp_reverse); 
     230                                data.sort(date_comp_reverse); 
    323231                                break; 
    324232                        case 'SORTBOX': 
    325                                 var_tmp.sort(box_comp); 
     233                                data.sort(box_comp); 
    326234                                break; 
    327235                        case 'SORTBOX_REVERSE': 
    328                                 var_tmp.sort(box_comp_reverse); 
     236                                data.sort(box_comp_reverse); 
    329237                                break; 
    330238                        case 'SORTSUBJECT': 
    331                                 var_tmp.sort(subject_comp); 
     239                                data.sort(subject_comp); 
    332240                                break; 
    333241                        case 'SORTSUBJECT_REVERSE': 
    334                                 var_tmp.sort(subject_comp_reverse); 
     242                                data.sort(subject_comp_reverse); 
    335243                                break; 
    336244                        case 'SORTWHO': 
    337                                 var_tmp.sort(who_comp); 
     245                                data.sort(who_comp); 
    338246                                break; 
    339247                        case 'SORTWHO_REVERSE': 
    340                                 var_tmp.sort(who_comp_reverse); 
     248                                data.sort(who_comp_reverse); 
    341249                                break; 
    342250                        case 'SORTSIZE': 
    343                                 var_tmp.sort(size_comp); 
     251                                data.sort(size_comp); 
    344252                                break; 
    345253                        case 'SORTSIZE_REVERSE': 
    346                                 var_tmp.sort(size_comp_reverse); 
     254                                data.sort(size_comp_reverse); 
    347255                                break; 
    348256                        default: 
     
    350258                } 
    351259 
    352                 for(var i=0; i < var_tmp.length; i++){ 
    353                         if(var_tmp[i] != "") 
    354                         { 
    355                                 nw_array[cont] = var_tmp[i]; 
    356                                 cont++; 
    357                         } 
    358                 } 
    359  
    360                 if( (preferences.search_result_number != '65536') && (nw_array.length > 0) && (nw_array.length >= preferences.search_result_number) ){ 
     260                if(data.length > 0 && showMsg)  
     261                                write_msg(data.length + " "+ get_lang('results found'));  
     262                /* This code was lost on merge  
     263                if( (preferences.search_result_number != '65536') && (nw_array.length > 0) && (nw_array.length >= preferences.search_result_number) ){ 
    361264                    nw_array.length = preferences.search_result_number; 
    362265                    write_msg(get_lang("More than %1 results. Please, try to refine your search.",preferences.search_result_number)); 
     
    365268                        write_msg(nw_array.length + " "+ get_lang('results found')); 
    366269                } 
     270                */ 
    367271 
    368272                numBox++; 
     
    386290                tbody.id    = "tbody_box_" + numBox; 
    387291 
    388                 for( var i=0; i < nw_array.length; i++){ 
     292                for( var i=0; i < data.length; i++){ 
    389293                        var tr = document.createElement("TR"); 
    390294                        tr.style.height = preferences.line_height; 
    391  
    392                         if (nw_array[i].match(/.*--.*--\w*--\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g) != null) //subject with "--" 
    393                         { 
    394                                 var aux1 = nw_array[i].match(/\d{2}\/\d{2}\/\d{4}--\d+? \w*b--.*--\d*$/g); 
    395                                 aux1 = aux1[0].split("--"); 
    396                                 nw_array[i] = nw_array[i].substr(0, nw_array[i].indexOf(aux1[0])-2); 
    397                                 var aux = []; 
    398                                 aux[0] = nw_array[i].substr(0, nw_array[i].indexOf('--')); 
    399                                 nw_array[i] = nw_array[i].substr(nw_array[i].indexOf('--')+2); 
    400                                 aux[1] = nw_array[i].substr(0, nw_array[i].indexOf('--')); 
    401                                 aux[2] = nw_array[i].substr(nw_array[i].indexOf('--')+2); 
    402                                 aux = aux.concat(aux1); 
    403                         } 
    404                         else 
    405                         { 
    406                                 var aux = nw_array[i].split("--"); 
    407                         } 
    408  
    409                         var mailbox = aux[0]; 
    410                         var uid_msg = aux[6]; 
    411                         var subject = aux[2]; 
     295                        var aux = data[i];  
     296                        var mailbox = aux.boxname;  
     297                        var uid_msg = aux.uid;  
     298                        var subject = aux.subject;  
    412299                        tr.id = uid_msg+"_s"+global_search; 
    413300 
     
    416303                        tr.name = mailbox; 
    417304 
    418                         if (aux[5].match("U")) 
     305                        if (aux.flag.match("U")) 
    419306                                add_className(tr,'tr_msg_unread'); 
    420307                        add_className(tr, i%2 != 0 ? 'tr_msg_read2' : 'tr_msg_read'); 
     
    432319                                { 
    433320                                        td.style.width = "2%"; 
    434                                         if (aux[5].match('T')) 
     321                                        if (aux.flag.match('T')) 
    435322                                        { 
    436                                                 attachNum = parseInt(aux[5].substr(aux[5].indexOf('T')+1)); 
     323                                                attachNum = parseInt(aux.flag.substr(aux.flag.indexOf('T')+1)); 
    437324                                                td1 = "<img src='templates/"+template+"/images/clip.gif' title='"+attachNum +' '+ get_lang('attachment(s)')+"'>"; 
    438325                                        } 
     
    444331                                        td.style.width = "1%"; 
    445332                                        td.id = "td_message_answered_"+uid_msg; 
    446                                         if (aux[5].match('X')) 
     333                                        if (aux.flag.match('X')) 
    447334                                                td1 = '<img src=templates/'+template+'/images/forwarded.gif title=Forwarded>'; 
    448335                                        else 
    449                                                 if (aux[5].match('A')) 
     336                                                if (aux.flag.match('A')) 
    450337                                                        td1 = '<img src=templates/'+template+'/images/answered.gif>'; 
    451338                                                else 
     
    456343                                        td.style.width = "1%"; 
    457344                                        td.id = "td_message_important_"+uid_msg; 
    458                                         if (aux[5].match("F")) 
     345                                        if (aux.flag.match("F")) 
    459346                                        { 
    460347                                                add_className(tr, 'flagged_msg'); 
     
    474361                                        td.style.width = "14%"; 
    475362                                        td.onclick = _onclick; 
    476                                         var nm_box = aux[0].split(cyrus_delimiter); 
     363                                        var nm_box = aux.boxname.split(cyrus_delimiter); 
    477364                                        var td1 = nm_box.pop(); 
    478365                                        td.setAttribute("NoWrap","true"); 
     
    493380                                if( j == 6) 
    494381                                { 
    495                                         if (aux[1].length > 29) 
    496                                                 aux[1] = aux[1].substr(0,29) + "..."; 
     382                                        if (aux.from.length > 29) 
     383                                                aux.from = aux.from.substr(0,29) + "..."; 
    497384                                        td.style.width = "20%"; 
    498385                                        td.onclick = _onclick; 
    499386                                        td.setAttribute("NoWrap","true"); 
    500387                                        td.style.overflow = "hidden"; 
    501                                         var td1  =  '<div style="width:100%;overflow:hidden">'+aux[1]+"</div>"; 
     388                                        var td1  =  '<div style="width:100%;overflow:hidden">'+aux.from+"</div>"; 
    502389                                } 
    503390                                if( j == 7) 
     
    505392                                        var subject_encode = url_encode(subject); 
    506393                                        if (! subject_encode) 
    507                                                 aux[2] = get_lang("no subject") + "..."; 
    508                                         if (aux[2].length > 70) 
    509                                                 aux[2] = aux[2].substr(0,70) + "..."; 
     394                                                aux.subject = get_lang("no subject") + "..."; 
     395                                        if (aux.subject.length > 70) 
     396                                                aux.subject = aux.subject.substr(0,70) + "..."; 
    510397                                        td.style.width = "35%"; 
    511398                                        td.onclick = _onclick; 
    512399                                        td.setAttribute("NoWrap","true"); 
    513400                                        td.style.overflow = "hidden"; 
    514                                         var td1  = aux[2]; 
     401                                        var td1  = aux.subject; 
    515402 
    516403                                } 
     
    520407                                        td.align = "center"; 
    521408                                        td.onclick = _onclick; 
    522                                         var td1  = aux[3]; 
     409                                        var _dat = new Date(aux.udate*1000);  
     410                                        var td1 = _dat.getDate()+"/"+(_dat.getMonth()+1)+"/"+_dat.getFullYear();  
    523411                                } 
    524412                                if( j == 9) 
     
    527415                                        td.align = "center"; 
    528416                                        td.onclick = _onclick; 
    529                                         var td1  = aux[4]; 
     417                                        var td1  = borkb(aux.size); 
    530418                                } 
    531419                                if (j == 10) 
    532420                                { 
    533                                         if (aux[5].match("U")) 
     421                                        if (aux.flag.match("U")) 
    534422                                                add_className(tr, 'tr_msg_unread'); 
    535                                         if (aux[5].match("F")) 
     423                                        if (aux.flag.match("F")) 
    536424                                                add_className(tr, 'flagged_msg'); 
    537425                                        var td1 = ''; 
     
    550438 
    551439        var content_search =  Element('content_id_search_' + numBox); 
    552         // BEGIN MAKE THE SCROLL HEIGHT          
    553         var defaultWidth = document.body.offsetWidth - 31; 
    554         var menuHidden = Element("folderscol").style.display == 'none' ? true : false; 
    555         if(!menuHidden) 
    556                 defaultWidth -= Element("folderscol").offsetWidth;                       
    557         var bar = Element("toolbar"); 
    558         var offset = 0; 
    559         if(bar.style.visibility != 'hidden')  
    560                 offset = bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight;                
    561440        var div_scroll_result = document.createElement("DIV"); 
    562441        div_scroll_result.id = "divScrollMain_"+numBox; 
    563         div_scroll_result.style.height = document.body.clientHeight - offset - 120; 
    564         content_search.style.height = document.body.clientHeight - offset - 80; 
    565442        div_scroll_result.style.overflow = "auto"; 
    566         div_scroll_result.style.width = defaultWidth - (is_ie ? 7 : 0); 
    567         // END MAKE THE SCROLL HEIGHT            
    568                  
    569443         
    570444                if(is_ie) 
     
    711585                        content_search.appendChild(div_scroll_result); 
    712586                } 
     587                resizeWindow();  
    713588        } 
    714589 
     
    923798                var handler = function(data){ 
    924799                        var tmp; 
    925                         var countTmp= new Array(); 
    926800 
    927801                        var dataTemp = data.split('=sumResults='); 
     
    934808                                if (tmp!=false) { 
    935809                                        var tmp2 = tmp.substr(2, data.length - 4); 
    936                                         countTmp = tmp.split('####'); 
    937                                 } 
    938                         } 
    939 //                      if((data == "none") && (countTmp.length==0)){alert(get_lang("None result was found."));} 
    940 //                      if (preferences.search_result_number == '65536' || (data != 'many results' && countTmp.length < preferences.search_result_number)) 
    941 //                        { 
    942 //                            EsearchE.mount_result((data=='none')?tmp:(countTmp.length==0)?data:data+tmp); 
    943 //                        } 
    944 //                        else if (data == 'many results' || countTmp.length >= preferences.search_result_number) 
    945 //                        { 
    946 //                            alert(get_lang("More than %1 results. Please, try to refine your search.",preferences.search_result_number)); 
    947 //                        } 
    948  
     810                                        }  
     811                                }  
     812                                if((data == "none") || (data.length==0)){alert(get_lang("None result was found."));}  
     813                                else if(data.length > 1000){alert(get_lang("More than %1 results. Please, try to refine your search.",1000));} 
     814                        else if(data == "many results"){alert(get_lang("More than %1 results. Please, try to refine your search.",50));}  
     815                        else{EsearchE.mount_result(data);} 
     816 
     817                        /* Lost code on merge 
    949818                        if ((sumResults == "none") && (countTmp.length==0)){ 
    950819                            alert(get_lang("None result was found.")); 
     
    953822                        { 
    954823                            EsearchE.mount_result((sumResults=='none')?tmp:(countTmp.length==0)?data:data+tmp); 
    955                         } 
     824                        }*/ 
    956825 
    957826                } 
  • branches/2.2/expressoMail1_2/templates/classic/index.tpl

    r1151 r3018  
    2727                                        </tbody> 
    2828                                </table> 
    29                                 <div style="height:4px"></div> 
    30                                 <div id="search_div" align="center" style="white-space:nowrap"> 
     29                                <div id="search_div" align="center" style="padding-top:4px;white-space:nowrap">  
    3130                                        <input type="text" id="em_message_search" size="16" maxlength="22" onfocus="javascript:onFocusQuickSearchEmail(this); return false;"/> 
    3231                                        <a class='' onMouseOut="window.status='';return true;" title='{lang_Open_Search_Window}' onMouseOver="window.status='{lang_Open_Search_Window}';return true;" href="javascript:void(0);"  onClick="javascript:search_emails(Element('em_message_search').value)"> 
     
    7170                                                <tbody id="border_tbody"> 
    7271                                                        <tr id="border_tr"> 
    73                                                                 <td nowrap class="menu" onClick="alternate_border(0);"  id="border_id_0">&nbsp;{lang_inbox}&nbsp;<font face="Verdana" size="1" color="#505050">[<span id="new_m">0</span> / <span id="tot_m">0</span>]</font> 
     72                                                                <td nowrap class="menu" onClick="alternate_border(0);resizeWindow();"  id="border_id_0">&nbsp;{lang_inbox}&nbsp;<font face="Verdana" size="1" color="#505050">[<span id="new_m">0</span> / <span id="tot_m">0</span>]</font> 
    7473                                                                </td> 
    7574                                                                <td nowrap id="border_blank" class="last_menu" width="100%">&nbsp;</td>                                                          
  • branches/2.2/expressoMail1_2/templates/classic/main.css

    r1570 r3018  
    115115} 
    116116 
    117 .menu-sel 
    118 { 
    119     text-decoration: none; 
    120     text-align: center; 
    121     font: bold 13px Lucidatypewriter,monospace; 
    122         color:#0000FF; 
    123     height: 20px; 
    124         width:220px; 
    125     background-color: #F7F7F7; 
    126     margin-bottom: 0px; 
    127     border-left: 1px solid #000000; 
    128     border-top: 1px solid #000000; 
    129     border-right: 1px solid #000000; 
    130     padding:0px 5px 0px 0px; 
    131     -moz-border-radius: 9px 9px 0px 0px; 
    132     -moz-user-select: none; 
    133     cursor: pointer;     
    134 } 
    135 .menu 
    136 { 
    137     text-decoration: none; 
    138     text-align: center; 
    139     font: bold 13px Lucidatypewriter,monospace; 
    140     color: #505050; 
    141     height: 20px;     
    142         width:220px; 
    143     background-color:#E5E5E5; 
    144     margin-bottom: 0px; 
    145     border-left: 1px solid #c0c0c0; 
    146     border-top: 1px solid #c0c0c0; 
    147     border-right: 1px solid #c0c0c0;        
    148     border-bottom: 1px solid #000000; 
    149         padding:0px 5px 0px 0px; 
    150     -moz-border-radius: 9px 9px 0px 0px; 
    151     -moz-user-select: none; 
    152     cursor: pointer; 
    153 } 
    154  
    155 .last_menu 
    156 { 
    157         border-bottom: 1px solid #000000; 
    158         -moz-border-radius: 0px 0px 0px 0px; 
    159 } 
    160  
    161 .conteudo { 
    162     font-family: Verdana, Arial, Helvetica, sans-serif; 
    163     font-size: 10px; 
    164     font-weight: normal; 
    165     color: #000033; 
    166         padding: 1px; 
    167     border-color: gray gray gray gray; 
    168     
    169         border-right: 1px solid #000000; 
    170         border-left: 1px solid #000000; 
    171         border-bottom: 1px solid #000000; 
    172         width:99.5%; 
    173     -moz-border-radius: 0px 0px 6px 6px; 
    174 } 
    175  
    176117.table_message{ 
    177118        background-color: #CCCCCC; 
     
    374315} 
    375316 
     317.message_options_active, 
     318.message_options_over, 
    376319.message_options { 
    377320        cursor: pointer; 
    378         color: blue; 
    379321        white-space: nowrap; 
    380         /*padding:0 1.8;*/ 
    381322} 
    382323.message_options_trash, 
     
    392333} 
    393334 
    394 .message_options_active { 
    395         white-space: nowrap;     
    396         color: blue; 
    397         cursor: pointer; 
    398 } 
    399  
    400335.message_options_over { 
    401         cursor: pointer; 
    402         color: blue; 
    403         white-space: nowrap; 
    404336        font-weight: bold; 
    405337        text-decoration: underline; 
     
    478410        font-weight: bold !important; 
    479411        font-size: 10px !important; 
    480         color: #666 !important; 
    481412        text-decoration: none !important; 
    482413        font-family: sans-serif !important; 
  • branches/2.2/expressoMail1_2/templates/default/config.tpl

    r1466 r3018  
    11<!-- BEGIN header --> 
    2 <form method="POST" action="{action_url}"> 
     2<script type="text/javascript">  
     3function valida(pForm)  
     4{  
     5        if((!document.getElementsByName('newsettings[expressoMail_Max_attachment_size]').item(0).value) || (!pForm.php_upload_limit.value))  
     6                return ExpressoLivre.form(pForm);  
     7  
     8        if (parseInt(document.getElementsByName('newsettings[expressoMail_Max_attachment_size]').item(0).value) > parseInt(pForm.php_upload_limit.value))  
     9        {  
     10                alert(pForm.valida_alert.value);  
     11                return false;  
     12        }  
     13        else  
     14                return ExpressoLivre.form(pForm);  
     15}  
     16</script>  
     17<form method="POST" action="{action_url}" onsubmit="return valida( this );">  
     18<input type="hidden" name="php_upload_limit" value="{php_upload_limit}" />  
    319<table border="0" align="center"> 
    420   <tr bgcolor="{th_bg}"> 
     
    7591    <td>{lang_Max_attachment_size}</td>                   
    7692    <td>                  
    77     <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}">&nbsp;Mb 
     93    <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}">&nbsp;Mb<span style='position:relative; left:20px;'>Max: {php_upload_limit}Mb.</span>  
     94    <input type="hidden" name="valida_alert" value="{lang_Value_exceeds_the_PHP_upload_limit_for_this_server}" />  
    7895    </td> 
    7996    </tr> 
  • branches/2.2/expressoMail1_2/templates/default/index.tpl

    r1588 r3018  
    1111<tbody> 
    1212<tr> 
    13         <td id="folderscol" width="162px" height="100%" valign="top"> 
    14                 <table id="folders_tbl" width="162px" border="0" cellspacing="0" cellpadding="0" border="0"> 
     13        <td id="folderscol" width="170px" height="100%" valign="top">  
     14                <table id="folders_tbl" width="170px" border="0" cellspacing="0" cellpadding="0">  
    1515                <tbody> 
    1616                <tr> 
    1717                        <td class='content-menu'> 
    18                                 <table border="0" cellspacing="0" cellpadding="0" border="0" style="width:100%"> 
     18                                <table border="0" cellspacing="0" cellpadding="0" style="width:100%">  
    1919                                        <tbody> 
    2020                                                <tr> 
     
    5959                <tr> 
    6060                        <td class="image-menu" valign="top" style="padding:0px"> 
    61                                 <div id="content_folders" class="menu-degrade" style="height:100%;width:170px;overflow:auto"></div> 
     61                                <div id="content_folders" class="menu-degrade" style="width:170px;height:100%;overflow:auto"></div>  
    6262                        </td> 
    6363                </tr> 
     
    9797                                <tbody id="border_tbody"> 
    9898                                        <tr id="border_tr"> 
    99                                                 <td nowrap class="menu" onClick="alternate_border(0);"  id="border_id_0"> 
     99                                                <td nowrap class="menu" onClick="alternate_border(0);resizeWindow();"  id="border_id_0"> 
    100100                                                        &nbsp;{lang_inbox}&nbsp;<font face="Verdana" size="1" color="#505050">[ 
    101101                                                        <span id="new_m">0</span> /  
  • branches/2.2/header.session.inc.php

    r1464 r3018  
    11<?php 
    2         session_id( $_COOKIE[ 'sessionid' ] ); 
    3         session_start( ); 
     2if ( isset( $_COOKIE[ 'sessionid' ] ) )  
     3        session_id( $_COOKIE[ 'sessionid' ] );  
    44 
    5         $sess = $_SESSION[ 'phpgw_session' ]; 
    6         $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199); 
     5session_start( ); 
    76 
     7$sess = $_SESSION[ 'phpgw_session' ]; 
     8$invalidSession = false;  
     9$user_agent = array();  
     10if (isset($GLOBALS['phpgw']) && !isset($_SESSION['connection_db_info'])){  
     11        $_SESSION['phpgw_info']['admin']['server']['sessions_checkip'] = $GLOBALS['phpgw_info']['server']['sessions_checkip']; 
     12        if($GLOBALS['phpgw_info']['server']['use_https'] == 1) {  
     13                $new_ip = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR']."," : ""). $_SERVER['REMOTE_ADDR'];  
     14                $GLOBALS['phpgw']->db->query("UPDATE phpgw_access_log SET ip='$new_ip' WHERE account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['sessionid']}'",__LINE__,__FILE__);  
     15        }  
     16         $GLOBALS['phpgw']->db->query("select trim(sessionid),".($_SESSION['phpgw_info']['admin']['server']['sessions_checkip'] ? "ip," : "")."browser from phpgw_access_log where account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['sessionid']}' limit 1",__LINE__,__FILE__);  
     17        $GLOBALS['phpgw']->db->next_record();  
     18        if($GLOBALS['phpgw']->db->row( ))  
     19                $_SESSION['connection_db_info']['user_auth'] = implode("",$GLOBALS['phpgw']->db->row( ));  
     20}  
     21if($_SESSION['connection_db_info']['user_auth']){  
     22        $invalidSession = true;  
     23        $http_user_agent = substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199);  
     24        $user_ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? array($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_X_FORWARDED_FOR']) : array($_SERVER['REMOTE_ADDR']);  
     25        $user_agent[] = ($_SESSION['phpgw_info']['admin']['server']['sessions_checkip'] ? "{$sess['session_id']}{$user_ip[0]}" : "{$sess['session_id']}").$http_user_agent; 
     26        if(count($user_ip) == 2) {  
     27                $user_agent[] = "{$sess['session_id']}{$user_ip[1]}".$http_user_agent;  
     28                $user_agent[] = $sess['session_id'].implode(",",array_reverse($user_ip)).$http_user_agent;  
     29        }  
     30        $pconnection_id = $_SESSION['connection_db_info']['user_auth'];  
     31        if(array_search($pconnection_id, $user_agent)  !== FALSE) {  
     32                $invalidSession = false;  
     33        }  
     34}  
     35if (empty($_SESSION['phpgw_session']['session_id']) || $invalidSession)  
     36{ 
     37        if($_SESSION['connection_db_info']['user_auth'] && !strstr($_SERVER['SCRIPT_URL'],"/controller.php")) { 
     38                error_log( '[ INVALID SESSION ] >>>>' .$_SESSION['connection_db_info']['user_auth'].'<<<< - >>>>' . implode("",$user_agent), 0 );  
     39                $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');  
     40                $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=10');  
     41        }  
    842 
    9         if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id) 
    10         { 
    11                 setcookie("PHPSESSID","",0); 
    12                 setcookie ("sessionid","",0); 
    13                 echo lang("An important error has occured with your login, please contact your system administrator");   
    14                 exit; 
    15         } 
     43        setcookie(session_name(),"",0); // Removing session cookie.  
     44        unset($_SESSION);                               // Removing session values.  
     45        // From ExpressoAjax response "nosession"  
     46        if(strstr($_SERVER['SCRIPT_URL'],"/controller.php")){  
     47                echo serialize(array("nosession" => true));  
     48                exit;  
     49        }  
     50}  
     51else{  
     52        // From ExpressoAjax update session_dla (datetime last access).   
     53        if(strstr($_SERVER['SCRIPT_URL'],"/controller.php"))  
     54                $_SESSION['phpgw_session']['session_dla'] = time();  
     55 
     56} 
    1657?> 
  • branches/2.2/logout.php

    r2 r3018  
    2020                'nonavbar'               => True 
    2121        ); 
    22         include('./header.inc.php'); 
     22        include(dirname( __FILE__ ).'/header.inc.php'); 
    2323 
    2424        $GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE')); 
  • branches/2.2/phpgwapi/inc/class.common.inc.php

    r1576 r3018  
    12641264                        $tpl->set_var('app_css', $app_css); 
    12651265 
    1266                         // search for app specific css file 
    1267                         if(@isset($GLOBALS['phpgw_info']['flags']['currentapp'])) 
    1268                         { 
    1269                                 $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; 
    1270  
    1271                                 if(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP 
    1272                                         . 'templates' . SEP . $GLOBALS['phpgw_info']['server']['template_set'] 
    1273                                         . SEP . 'app.css') 
    1274                                 ) 
    1275                                 { 
    1276                                         $tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'] 
    1277                                                 . "/$appname/templates/".$GLOBALS['phpgw_info']['server']['template_set'] 
    1278                                                 . "/app.css".'" type=text/css rel=StyleSheet>'); 
    1279                                 } 
    1280                                 elseif(file_exists(PHPGW_SERVER_ROOT . SEP . $appname . SEP 
    1281                                         . 'templates' . SEP . 'default' 
    1282                                         . SEP . 'app.css') 
    1283                                 ) 
    1284                                 { 
    1285                                         $tpl->set_var('css_file', '<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'] 
    1286                                         ."/$appname/templates/default/app.css".'" type=text/css rel=StyleSheet>'); 
    1287                                 } 
    1288                         } 
    1289  
    1290                         return $tpl->subst('css'); 
     1266                        // search for app specific css filie 
     1267                        if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) )  
     1268                        {  
     1269                                $css = "/%s/templates/%s/%s.css";  
     1270 
     1271                                global $path, $link, $template;  
     1272 
     1273                                $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css );  
     1274 
     1275                                $link = '<LINK href="%s" type="text/css" rel="StyleSheet">';  
     1276                                $link = sprintf( $link,  
     1277                                        "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}"  
     1278                                );  
     1279 
     1280                                $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ];  
     1281 
     1282                                function _css( $module, $css )  
     1283                                {  
     1284                                        global $link, $path, $template;  
     1285 
     1286                                        if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) )  
     1287                                                return sprintf( $link, $module, $template, $css );  
     1288 
     1289                                        if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) )  
     1290                                                return sprintf( $link, $module, 'default', $css );  
     1291 
     1292                                        return '';  
     1293                                }  
     1294 
     1295                                $css = _css( 'phpgwapi', 'css/base' );  
     1296                                $css .= _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" );  
     1297                                $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" );  
     1298                                $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' );  
     1299 
     1300                                if ( $css )  
     1301                                        $tpl -> set_var( 'css_file', $css );  
     1302                        }  
     1303 
     1304                        return $tpl -> subst('css');  
     1305 
    12911306                } 
    12921307 
  • branches/2.2/phpgwapi/inc/class.sessions.inc.php

    r1464 r3018  
    343343                        } 
    344344 
    345                         /* ExpressoLivre 
    346                            Necessário comentar para que o redirecionamento de uma sessão 
    347                            https para uma http funcionasse atrás de um proxy 
    348                         */ 
    349  
    350                         /* 
    351                         if (@$GLOBALS['phpgw_info']['server']['sessions_checkip']) 
    352                         { 
    353                                 if((PHP_OS != 'Windows') && (PHP_OS != 'WINNT') && 
    354                                         (!$GLOBALS['phpgw_info']['user']['session_ip'] || $GLOBALS['phpgw_info']['user']['session_ip'] != $this->getuser_ip()) 
    355                                 ) 
    356                                 { 
    357                                         //echo "IP do cliente com https   ---->  ".$GLOBALS['phpgw_info']['user']['session_ip']; 
    358                                         //echo "<BR>IP do cliente com http ---->  ".$this->getuser_ip(); 
    359                                         if(is_object($GLOBALS['phpgw']->log)) 
    360                                         { 
    361                                                 // This needs some better wording 
    362                                                 $GLOBALS['phpgw']->log->message(array( 
    363                                                         'text' => 'W-VerifySession, IP %1 doesn\'t match IP %2 in session table', 
    364                                                         'p1'   => $this->getuser_ip(), 
    365                                                         'p2'   => $GLOBALS['phpgw_info']['user']['session_ip'], 
    366                                                         'line' => __LINE__, 
    367                                                         'file' => __FILE__ 
    368                                                 )); 
    369                                                 $GLOBALS['phpgw']->log->commit(); 
    370                                         } 
    371                                         return False; 
    372                                 } 
    373                         } 
    374                         */ 
    375  
     345                         
    376346                        $GLOBALS['phpgw']->acl->acl($this->account_id); 
    377347                        $GLOBALS['phpgw']->accounts->accounts($this->account_id); 
     
    408378                function getuser_ip() 
    409379                { 
    410                 /* 
    411                         if (getenv(HTTP_X_FORWARDED_FOR)) 
    412                         { 
    413                                 if (getenv(HTTP_CLIENT_IP)) 
    414                                 { 
    415                                         $ip=getenv(HTTP_CLIENT_IP); 
    416                                 } 
    417                                 else 
    418                                 { 
    419                                         $ip=getenv(HTTP_X_FORWARDED_FOR); 
    420                                 } 
    421                                 $ip_proxy=getenv(REMOTE_ADDR); 
    422                         } 
    423                         else 
    424                         { 
    425                                 $ip=getenv(REMOTE_ADDR); 
    426                         } 
    427                         return $ip; 
    428                 */ 
    429                         return (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']); 
     380                        return (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR']."," : "").$_SERVER['REMOTE_ADDR'];  
    430381                } 
    431382 
  • branches/2.2/phpgwapi/inc/class.sessions_php4.inc.php

    r2 r3018  
    125125                        else 
    126126                        { 
    127                                 $sessions = $this->list_sessions(0,'','',True); 
    128                                  
    129                                 if (isset($sessions[$sessionid])) 
    130                                 { 
    131                                         //echo "<p>session_php4::destroy($session_id): unlink('".$sessions[$sessionid]['php_session_file'].")</p>\n"; 
    132                                         @unlink($sessions[$sessionid]['php_session_file']); 
     127                                if(@opendir($path = ini_get('session.save_path'))){  
     128                                        $session_file = $path."/sess_".$sessionid;  
     129                                        if (file_exists($session_file))  
     130                                                @unlink($session_file);  
    133131                                } 
    134132                        } 
     
    199197                function list_sessions($start,$order,$sort,$all_no_sort = False) 
    200198                { 
    201                         //echo "<p>session_php4::list_sessions($start,'$order','$sort',$all)</p>\n"; 
    202                         $session_cache = $this->appsession('php4_session_cache','phpgwapi'); 
    203199 
    204200                        $values = array(); 
     
    211207                        while ($file = readdir($dir)) 
    212208                        { 
    213                                 if (substr($file,0,5) != 'sess_') 
     209                                if (substr($file,0,5) != 'sess_' || !is_readable($path. '/' . $file)) 
    214210                                { 
    215211                                        continue; 
    216212                                } 
    217                                 if (isset($session_cache[$file]))       // use copy from cache 
    218                                 { 
    219                                         $session = $session_cache[$file]; 
    220  
    221                                         if ($session['session_flags'] == 'A' || !$session['session_id'] || 
    222                                                 $session['session_install_id'] != $GLOBALS['phpgw_info']['server']['install_id']) 
    223                                         { 
    224                                                 continue;       // no anonymous sessions or other domains or installations 
    225                                         } 
    226                                         if (!$all_no_sort)      // we need the up-to-date data --> unset and reread it 
    227                                         { 
    228                                                 unset($session_cache[$file]); 
    229                                         } 
    230                                 } 
    231                                 if (!isset($session_cache[$file]))      // not in cache, read and cache it 
    232                                 { 
    233                                         if (!is_readable($path. '/' . $file)) 
    234                                         { 
    235                                                 continue;       // happens if webserver runs multiple user-ids 
    236                                         } 
    237                                         $session = ''; 
    238                                         if (($fd = fopen ($path . '/' . $file,'r'))) 
    239                                         { 
    240                                                 $session = ($size = filesize ($path . '/' . $file)) ? @fread ($fd, $size) : 0; 
    241                                                 fclose ($fd); 
    242                                         } 
    243                                         if (substr($session,0,14) != 'phpgw_session|') 
    244                                         { 
    245                                                 continue; 
    246                                         } 
    247                                         $session = unserialize(substr($session,14)); 
    248                                         unset($session['phpgw_app_sessions']);  // not needed, saves memory 
    249                                         $session_cache[$file] = $session; 
    250                                 } 
    251                                 if($session['session_flags'] == 'A' || !$session['session_id'] || 
    252                                         $session['session_install_id'] != $GLOBALS['phpgw_info']['server']['install_id']) 
    253                                 { 
    254                                         continue;       // no anonymous sessions or other domains or installations 
    255                                 } 
    256                                 //echo "file='$file'=<pre>"; print_r($session); echo "</pre>";  
    257  
    258                                 $session['php_session_file'] = $path . '/' . $file; 
     213                                $session = '';  
     214                                if (($fd = fopen ($path . '/' . $file,'r')))  
     215                                {  
     216                                        $session = ($size = filesize ($path . '/' . $file)) ? @fread ($fd, $size) : 0;  
     217                                        fclose ($fd);  
     218                                }  
     219                                $session = unserialize(substr($session,14));  
    259220                                $values[$session['session_id']] = $session; 
    260221                        } 
     
    280241                                reset($values); 
    281242                        } 
    282                         $this->appsession('php4_session_cache','phpgwapi',$session_cache); 
    283243 
    284244                        return $values; 
  • branches/2.2/phpgwapi/inc/class.setup.inc.php

    r1322 r3018  
    863863                                } 
    864864                                /* Load up some configured values */ 
    865                                 $this->db->query("SELECT config_name,config_value FROM phpgw_config " 
    866                                         . "WHERE config_name LIKE 'ldap%' OR config_name LIKE 'account_%' OR config_name LIKE '%encryption%'",__LINE__,__FILE__); 
     865                                $this->db->query("SELECT config_name,config_value,config_app FROM phpgw_config "  
     866                                        . "WHERE config_app = 'phpgwapi' AND (config_name LIKE 'ldap%' OR config_name LIKE 'account_%' OR config_name LIKE '%encryption%')",__LINE__,__FILE__);  
    867867                                while($this->db->next_record()) 
    868868                                { 
  • branches/2.2/phpgwapi/inc/functions.inc.php

    r1463 r3018  
    2929 
    3030        error_reporting(error_reporting() & ~E_NOTICE); 
    31  
    32         if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+ 
    33         { 
    34                 echo 'eGroupWare requires PHP 4.1 or greater.<br>'; 
    35                 echo 'Please contact your System Administrator'; 
    36                 exit; 
    37         } 
    38  
     31         
    3932        include(PHPGW_API_INC.'/common_functions.inc.php'); 
    4033         
     
    378371                reset($GLOBALS['phpgw_info']['flags']); 
    379372 
     373 
     374                if(!include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'))   
     375                {   
     376                        /* Hope we don't get to this point.  Better then the user seeing a */   
     377                        /* complety back screen and not know whats going on                */   
     378                        echo '<body bgcolor="FFFFFF">';   
     379                        $GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found'));   
     380 
     381                        exit;   
     382                }   
     383 
    380384                /*************************************************************************\ 
    381385                * These lines load up the templates class                                 * 
     
    390394                } 
    391395 
    392                 /*************************************************************************\ 
    393                 * These lines load up the themes                                          * 
    394                 \*************************************************************************/ 
    395                 if (! $GLOBALS['phpgw_info']['user']['preferences']['common']['theme']) 
    396                 { 
    397                         if (@$GLOBALS['phpgw_info']['server']['template_set'] == 'user_choice') 
    398                         { 
    399                                 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default'; 
    400                         } 
    401                         else 
    402                         { 
    403                                 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['template_set']; 
    404                         } 
    405                 } 
    406                 if (@$GLOBALS['phpgw_info']['server']['force_theme'] == 'user_choice') 
    407                 { 
    408                         if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])) 
    409                         { 
    410                                 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default'; 
    411                         } 
    412                 } 
    413                 else 
    414                 { 
    415                         if (isset($GLOBALS['phpgw_info']['server']['force_theme'])) 
    416                         { 
    417                                 $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['force_theme']; 
    418                         } 
    419                 } 
    420  
    421                 if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme')) 
    422                 { 
    423                         include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme'); 
    424                 } 
    425                 elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme')) 
    426                 { 
    427                         include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'); 
    428                 } 
    429                 else 
    430                 { 
    431                         /* Hope we don't get to this point.  Better then the user seeing a */ 
    432                         /* complety back screen and not know whats going on                */ 
    433                         echo '<body bgcolor="FFFFFF">'; 
    434                         $GLOBALS['phpgw']->log->write(array('text'=>'F-Abort, No themes found')); 
    435  
    436                         exit; 
    437                 } 
    438                 unset($theme_to_load); 
    439396 
    440397                /*************************************************************************\ 
     
    488445                } 
    489446 
    490                 /*************************************************************************\ 
    491                 * Load the app include files if the exists                                * 
    492                 \*************************************************************************/ 
    493                 /* Then the include file */ 
    494                 if (PHPGW_APP_INC != "" && 
    495                    ! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && 
    496                    file_exists(PHPGW_APP_INC . '/functions.inc.php') && 
    497                    !isset($_GET['menuaction'])) 
    498                 { 
    499                         include(PHPGW_APP_INC . '/functions.inc.php'); 
    500                 } 
    501                 if (!@$GLOBALS['phpgw_info']['flags']['noheader'] && 
    502                         !@$GLOBALS['phpgw_info']['flags']['noappheader'] && 
    503                         file_exists(PHPGW_APP_INC . '/header.inc.php') && !isset($_GET['menuaction'])) 
    504                 { 
    505                         include(PHPGW_APP_INC . '/header.inc.php'); 
    506                 } 
    507         } 
     447        } 
  • branches/2.2/phpgwapi/templates/classic/css/celepar.css

    r1532 r3018  
    352352.dsused 
    353353{ 
    354                 background-image: url(../../../../expressoMail1_2/templates/default/images/dsused_classic.gif) !important; 
     354        background-image: url(../../../../expressoMail1_2/templates/default/images/dsused_classic.gif) !important; 
    355355} 
    356356#fmLocation 
     
    413413        background-color:white; 
    414414} 
     415 
     416.toolbar 
     417{ 
     418       background-image:url(../../../../phpgwapi/templates/default/images/fundo_topo.gif); 
     419       position:absolute; 
     420} 
     421 
     422.logo_expresso 
     423{ 
     424 
     425        background:transparent url(../../../../phpgwapi/templates/default/images/logo_expresso_classic.png) no-repeat scroll right 0px; 
     426        right:0px; 
     427        position:absolute; 
     428        width:191px; 
     429} 
     430 
     431.navbar_but 
     432{ 
     433        background-image: url(../../../../phpgwapi/templates/default/images/back_app_classic.png) !important; 
     434        width: 40px !important; 
     435        height: 40px !important; 
     436        padding: 0 19px 0 13px !important; 
     437        vertical-align: center !important; 
     438        text-align: center !important; 
     439} 
     440 
     441.navbar_butOver 
     442{ 
     443        background-image: url(../../../../phpgwapi/templates/default/images/back_app_classic.png) !important; 
     444        width: 40px !important; 
     445        height: 40px !important; 
     446        vertical-align: center !important; 
     447        text-align: center !important; 
     448        padding: 0 19px 0 13px !important; 
     449 
     450} 
     451 
     452.navbar_butOut 
     453{ 
     454        background-image: url(../../../../phpgwapi/templates/default/images/back_app_classic.png) !important; 
     455        width: 40px !important; 
     456        height: 40px !important; 
     457        vertical-align: center !important; 
     458        text-align: center !important; 
     459        padding: 0 19px 0 13px !important; 
     460 
     461 
     462} 
     463#expressoAdmin12id, 
     464#adminid, 
     465#homeid, 
     466#contactcenterid, 
     467#expressoMail12id, 
     468#newsadminid, 
     469#calendarid, 
     470#jabberitmessengerid, 
     471#logout_id 
     472{ 
     473        width: 32px !important; 
     474        height: 32px !important; 
     475 
     476} 
     477 
     478table.inboxElements th, 
     479.table_elements_tr_header, 
     480.message_header{ 
     481        background-color: #CCCCCC !important; 
     482} 
     483 
     484.table_message_header_box{ 
     485        width: 100% !important; 
     486        color: black !important; 
     487        border-style: solid !important; 
     488        border-width: 0px !important; 
     489        border-collapse: collapse !important; 
     490        border-color: #bbbbbb !important; 
     491        font-family: Arial !important; 
     492        font-size: 13px !important; 
     493        cursor: pointer !important; 
     494} 
     495.font-menu 
     496{ 
     497    text-decoration: none !important; 
     498    text-align: center !important; 
     499    font: bold 13px Lucidatypewriter,monospace !important; 
     500    color: #505050 !important; 
     501} 
     502.font-menu-sel 
     503{ 
     504    text-decoration: none !important; 
     505    text-align: center !important; 
     506    font: bold 11px Lucidatypewriter,monospace !important; 
     507    color:#0000FF !important; 
     508} 
     509 
     510.menu-sel 
     511{ 
     512    text-decoration: none !important; 
     513    text-align: center !important; 
     514    font: bold 11px Lucidatypewriter,monospace !important; 
     515    color:#0000FF !important; 
     516    height: 20px !important; 
     517    background-color: #F7F7F7 !important; 
     518    margin-bottom: 0px !important; 
     519    border-left: 1px solid #000000 !important; 
     520    border-top: 1px solid #000000 !important; 
     521    border-right: 1px solid #000000 !important; 
     522    padding:0px 5px 0px 0px !important; 
     523    -moz-border-radius: 9px 9px 0px 0px !important; 
     524    -moz-user-select: none !important; 
     525    cursor: pointer !important; 
     526} 
     527 
     528.menu 
     529{ 
     530    text-decoration: none !important; 
     531    text-align: center !important; 
     532    color: #505050 !important; 
     533    height: 20px !important; 
     534    background-color:#E5E5E5 !important; 
     535    margin-bottom: 0px !important; 
     536    border-left: 1px solid #c0c0c0 !important; 
     537    border-top: 1px solid #c0c0c0 !important; 
     538    border-right: 1px solid #c0c0c0 !important; 
     539    border-bottom: 1px solid #000000 !important; 
     540    padding:0px 5px 0px 0px !important; 
     541    -moz-border-radius: 9px 9px 0px 0px !important; 
     542    -moz-user-select: none !important; 
     543    cursor: pointer !important; 
     544} 
     545 
     546.last_menu 
     547{ 
     548        border-bottom: 1px solid #000000 !important; 
     549        -moz-border-radius: 0px 0px 0px 0px !important; 
     550} 
     551.conteudo { 
     552    font-family: Verdana, Arial, Helvetica, sans-serif !important; 
     553    font-size: 10px !important; 
     554    font-weight: normal !important; 
     555    color: #000033 !important; 
     556        padding: 1px !important; 
     557    border-color: gray gray gray gray !important; 
     558 
     559        border-right: 1px solid #000000 !important; 
     560        border-left: 1px solid #000000 !important; 
     561        border-bottom: 1px solid #000000 !important; 
     562        width:99.5% !important; 
     563    -moz-border-radius: 0px 0px 6px 6px !important; 
     564} 
     565 
     566.table_message{ 
     567        background-color: #CCCCCC !important; 
     568                background-image: none !important; 
     569        padding: 1px !important; 
     570        cursor: default !important; 
     571        border-width: 1px 1px 1px 1px !important; 
     572        border-spacing: 0px 1px !important; 
     573        border-style: outset outset outset outset !important; 
     574        border-color: gray gray gray gray !important; 
     575        border-collapse: separate !important; 
     576        -moz-border-radius: 3px 3px 3px 3px !important; 
     577} 
     578 
     579.image-menu { 
     580        padding: 3px 0px 3px 5px !important; 
     581        border-top: 1px solid #000000 !important; 
     582        border-right: 1px solid #000000 !important; 
     583        border-left: 1px solid #000000 !important; 
     584        border-bottom: 1px solid #000000 !important; 
     585        -moz-border-radius: 9px 9px 9px 9px !important; 
     586} 
     587 
     588.image-menu, 
     589.menu-degrade 
     590{ 
     591        background-image: none !important; 
     592} 
     593 
     594.content-menu-td { 
     595        border: 1px solid #f7f7f7 !important; 
     596} 
     597 
     598.content-menu { 
     599        background: none !important; 
     600        padding: 4px !important; 
     601        width:162px !important; 
     602        border-top: 1px solid #000000 !important; 
     603        border-right: 1px solid #000000 !important; 
     604        border-left: 1px solid #000000 !important; 
     605        border-bottom: 1px solid #000000 !important; 
     606        -moz-border-radius: 9px 9px 9px 9px !important; 
     607        position: relative !important; 
     608        overflow: auto !important; 
     609} 
     610 
     611.message_options_trash, 
     612.message_options_import, 
     613.message_options_inactive, 
     614.message_options_export, 
     615.message_options_move, 
     616.message_options_print, 
     617.message_options_active, 
     618.message_options, 
     619.message_options_over 
     620{ 
     621        color:blue !important; 
     622        font-weight: normal !important; 
     623        background-image: none !important; 
     624        padding:0 7 0 0 !important; 
     625} 
     626.l{ 
     627        background-image: none !important; 
     628        color: #666666 !important; 
     629 
     630} 
     631.sl 
     632{ 
     633        background-image: none !important; 
     634        color: blue !important; 
     635} 
     636.linha0,  
     637.tr_msg_read2, 
     638.tr_msg_read { 
     639-moz-user-select:none !important; 
     640background-color:#FFFFFF !important; 
     641border-bottom:1px solid #CFCFCF !important; 
     642color:black !important; 
     643} 
  • branches/2.2/phpgwapi/templates/classic/head.tpl

    r1151 r3018  
    1313                <link rel="icon" href="{img_icon}" type="image/x-ico" /> 
    1414                <link rel="shortcut icon" href="{img_shortcut}" /> 
    15                 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/> 
    1615                <META http-equiv="Default-Style" content="eGroupWareStyle"> 
    1716                {slider_effects} 
  • branches/2.2/phpgwapi/templates/default/css/cataratas.css

    r1719 r3018  
    1 ul 
    2 { 
    3         list-style-image: url("../images/orange-ball.png"); 
    4 } 
    5  
    6 .grid_email_class 
    7 { 
    8         border-bottom:1px solid #cfcfcf; 
    9 } 
    10  
    11 body  
    12 { 
    13         margin: 0px !important; 
    14         background-color:#E9E9E9 !important; 
    15         font-size: 11px !important; 
    16         font-family: Verdana, Arial, Helvetica, sans-serif !important; 
    17         padding:0px !important; 
    18 } 
    19  
    20 img 
    21 { 
    22         border-width:0px !important; 
    23         border-style:none !important; 
    24         /*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader; 
    25 */ 
    26 } 
    27  
    28 a:link,a:visited 
    29 { 
    30         cursor:pointer !important; 
    31         color: #000066 !important; 
    32         text-decoration: none !important; 
    33 } 
    34  
    35 /* 
    36 a:visited  
    37 { 
    38         color: #006699;  
    39         text-decoration: none; 
    40 } 
    41 */ 
    42 a:hover,a:active 
    43 { 
    44         cursor:pointer !important; 
    45         color: #ff9933 !important; 
    46         text-decoration: underline !important; 
    47 } 
    48 /* 
    49 a:active  
    50 { 
    51         color: #006699;  
    52         text-decoration: underline; 
    53 } 
    54 */ 
    55 input,button 
    56 { 
    57         font-size: 11px !important;  
    58         color: #006699 !important;  
    59         font-family: Arial, Helvetica, sans-serif !important; 
    60         border: 1px #bbbbbb solid !important; 
    61 } 
    62  
    63 input[type=submit],input[type=button],button 
    64 { 
    65         margin:1px !important; 
    66         padding:1px !important; 
    67         cursor: pointer !important;  
    68         cursor: hand !important; 
     1body 
     2{ 
     3        background-color: #e9e9e9; 
     4} 
     5 
     6a:link, 
     7a:visited 
     8{ 
     9        color: #000066; 
     10} 
     11 
     12a:hover, 
     13a:active 
     14{ 
     15        color: #ff9933; 
     16} 
     17 
     18a.divSideboxEntry, 
     19.divSideboxEntry 
     20{ 
     21        background-color: #eee; 
     22} 
     23 
     24a.appTitles, 
     25.appTitles 
     26{ 
     27        padding: 2px 2px; 
     28} 
     29 
     30a.textSidebox 
     31{ 
     32        border-top-color: #aaa; 
     33} 
     34 
     35input, 
     36button 
     37{ 
     38        border-color: #bbb; 
     39        color: #069; 
    6940} 
    7041 
    7142input[type=image] 
    7243{ 
    73         cursor: pointer !important;  
    74         cursor: hand !important; 
    75         border: 0px #bbbbbb none !important; 
    76 } 
    77 select  
    78 { 
    79         font-size: 11px !important;  
    80         color: #000066 !important;  
    81         font-family: Arial, Helvetica, sans-serif !important; 
    82         border: 1px #bbbbbb solid !important; 
    83         z-index: -1 !important; 
    84 } 
    85  
    86 td 
    87 { 
    88         font-size: 11px !important; 
    89         /*text-align:left;*/ 
    90         /*      padding-top:1px; 
    91         padding-bottom:1px;*/ 
    92 } 
    93  
    94 .divLoginbox  
    95 { 
    96         position:relative; 
    97         width: 300px;  
    98         border-right: #9c9c9c 1px solid;  
    99         border-top: #9c9c9c 1px solid;  
    100         border-left: #9c9c9c 1px solid;  
    101         border-bottom: #9c9c9c 1px solid 
    102 } 
    103  
    104 .divLoginboxHeader  
    105 { 
    106         text-align:center; 
    107         background-color:#dddddd; 
    108         padding-top:2px; 
    109         font-size:10px; 
    110         color:#666666; 
    111 } 
    112 .divSidebox  
    113 { 
    114         position:relative; 
    115         width: 147px;  
    116         border-right: #9c9c9c 1px solid;  
    117         border-top: #9c9c9c 1px solid;  
    118         border-left: #9c9c9c 1px solid;  
    119         border-bottom: #9c9c9c 1px solid 
    120 } 
    121  
    122 .tblHeadApp { 
    123  
    124         border-right: #9c9c9c 1px solid;         
    125         border-top: #9c9c9c 1px solid;  
    126         border-left: #9c9c9c 1px solid;  
    127         border-bottom: #9c9c9c 1px solid 
    128 } 
    129  
    130 .divSideboxHeader  
    131 { 
    132         text-align:center; 
    133         background-color:#000066; 
    134         padding-top:2px; 
    135         height: 15px; 
    136         color: #FFFFFF; 
    137  
    138 } 
    139  
    140 a.divSideboxEntry, .divSideboxEntry 
    141 { 
    142         text-align:left; 
    143         height:16px; 
    144         background-color:#eeeeee; 
    145 } 
    146  
    147 a.appTitles,.appTitles 
    148 { 
    149         font-size: 10px;  
    150         height:18px; 
    151         padding-top:2px; 
    152         padding-bottom:2px; 
    153  
    154 } 
    155  
    156 a.textSidebox 
    157 { 
    158         font-size: 10px;  
    159         border-top: #aaaaaa 0px none; 
    160 } 
    161  
    162 .textSidebox 
    163 { 
    164         font-size: 10px;  
    165         height:18px; 
    166         padding-top:2px; 
    167         padding-bottom:2px; 
    168         border-top: #aaaaaa 1px solid; 
    169  
    170 } 
    171  
    172 .sideboxSpace 
    173 { 
    174         height:9px; 
    175 } 
    176  
    177 .greyLine 
    178 { 
    179         margin:1px; 
    180         border-top-color:#7e7e7e; 
    181         border-top-width:1px; 
    182         border-top-style:solid; 
    183         height:1px; 
    184 } 
    185  
    186 .prefSection 
    187 { 
    188         font-weight:bold; 
    189         font-size:16px; 
    190         line-height:40px; 
    191 } 
    192  
    193 #extraIcons 
    194 { 
    195         background-color:#eeeeee; 
    196         border-width:1px; 
    197         border-color:#7e7e7e; 
    198         border-style:solid; 
    199 } 
    200  
    201 .extraIconsRow 
    202 { 
    203         border-top-color:#dddddd; 
    204         border-top-width:1px; 
    205         border-top-style:solid; 
    206         padding:2px; 
    207 } 
    208  
    209 #divMain 
    210 { 
    211         background-color:white; 
    212         margin-top: 0px; 
    213         padding:9px; 
    214         border-color:#7e7e7e; 
    215         border-width:1px; 
    216         border-style:solid; 
    217 } 
    218  
    219 #divLogo 
    220 { 
    221         position:absolute; 
    222         left:20px; 
    223         top:5px; 
    224         z-index:51; 
    225 } 
    226  
    227 #divAppIconBar 
    228 { 
    229         background-color:white; 
    230         border-top-color:#9c9c9c; 
    231         border-top-width:1px; 
    232         border-top-style:solid; 
    233         background-image: url(../images/background-icon-bar.png);  
    234         background-repeat: repeat-x 
    235 } 
    236  
    237 #divAppTextBar 
    238 { 
    239         background-color:white; 
    240 } 
    241  
    242 #user_info 
    243 { 
    244         color: white; 
    245 } 
    246 #links_bar 
    247 { 
    248                 color: white; 
    249 } 
    250  
    251 #divStatusBar 
    252 { 
    253         height:24px; 
    254         padding-left:10px; 
    255         padding-top:0px; 
    256 } 
    257  
    258 /*#divSubContainer 
    259 { 
    260 } 
    261 */ 
    262 #tdSidebox 
    263 { 
    264         width:170px; 
    265         background-color:white; 
    266         overflow:visible; 
    267 } 
    268  
    269  
    270 #tdAppbox 
    271 { 
    272         background-color:white; 
    273         width: 100%; 
    274 } 
    275 #divSideboxContainer 
    276 { 
    277         position:relative; 
    278         width:150px; 
    279         top:0px; 
    280         left:0px; 
    281         background-color:white; 
    282         border-width:1px; 
    283         border-style:solid; 
    284         z-index:40; 
     44        border-color: #bbb; 
     45} 
     46 
     47select 
     48{ 
     49        border-color: #bbb; 
     50        color: #006; 
     51} 
     52 
     53#divAppbox 
     54{ 
     55        background: #e6f3d9; 
     56        border-color: #9c9c9c; 
    28557} 
    28658 
    28759#divAppboxHeader 
    28860{ 
    289         margin-top:2px; 
    290         margin-left:2px; 
    291         margin-right:2px; 
    292         font-family: Verdana, Arial, Helvetica, sans-serif; 
     61        background: #e6f3d9; 
     62        border-color: #9c9c9c; 
     63        color: #006; 
    29364        font-size: 14px; 
    29465        font-weight: bold; 
    295         color: #000066; 
     66} 
     67 
     68#divAppIconBar 
     69{ 
     70        background: #fff url( ../images/background-icon-bar.png ) repeat-x; 
     71        border-top-color: #9c9c9c; 
     72} 
     73 
     74#divAppTextBar 
     75{ 
     76        background-color: #fff; 
     77} 
     78 
     79#divGenTime 
     80{ 
     81        color: #f00; 
     82} 
     83 
     84#divMain 
     85{ 
     86        background: #fff; 
     87        border-color: #7e7e7e; 
     88} 
     89 
     90#divPoweredBy 
     91{ 
     92        background: #fff; 
     93        color: #999; 
     94} 
     95 
     96#divSideboxContainer 
     97{ 
     98        background: #fff; 
     99} 
     100 
     101#extraIcons 
     102{ 
     103        background: #eee; 
     104        border-color: #7e7e7e; 
     105} 
     106 
     107#links_bar, 
     108#user_info 
     109{ 
     110        color: #fff; 
     111} 
     112 
     113#tdAppbox 
     114{ 
     115        background-color: #fff; 
     116} 
     117 
     118#tdSidebox 
     119{ 
     120        background: #fff; 
     121} 
     122 
     123.conteudo 
     124{ 
     125        border-color: #4A79B1; 
     126        color: #003; 
     127} 
     128 
     129.divSideboxHeader 
     130{ 
     131        background-color: #006; 
     132        color: #fff; 
     133} 
     134 
     135.extraIconsRow 
     136{ 
     137        border-top-color: #ddd; 
     138} 
     139 
     140.greyLine 
     141{ 
     142        border-top-color: #7e7e7e; 
     143} 
     144 
     145.grid_email_class 
     146{ 
     147        border-bottom-color: #cfcfcf; 
     148} 
     149 
     150.image-menu 
     151{ 
     152        background: #a0b2cc url( ../../../../phpgwapi/templates/default/images/folder_bg_fozi.jpg ) no-repeat scroll center bottom; 
     153} 
     154 
     155.last_menu 
     156{ 
     157        border-bottom-color: #4a79b1; 
     158} 
     159 
     160.logo_expresso 
     161{ 
     162        background: url( ../../../../phpgwapi/templates/default/images/logo_expresso_fozi.gif ) no-repeat; 
     163        height: 35px; 
     164        width: 264px; 
     165} 
     166 
     167.menu 
     168{ 
     169        background: #c8d7ea; 
     170        border-color: #f4f7fc; 
     171        border-bottom-color: #4a79b1; 
     172} 
     173 
     174.menu-sel 
     175{ 
     176        background-color: #f7f7f7; 
     177        border-color: #4a79b1; 
     178        color: #00f; 
     179} 
     180 
     181.menu-degrade 
     182{ 
     183        background-image: url( ../../../../phpgwapi/templates/default/images/degrade.png ); 
     184} 
     185 
     186.navbar_but 
     187{ 
     188        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_fozi.png ); 
     189} 
     190 
     191.navbar_butOver 
     192{ 
     193        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_over_fozi.png ); 
     194} 
     195 
     196.navbar_butOut 
     197{ 
     198        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_out_fozi.png ); 
     199} 
     200 
     201.tblHeadApp 
     202{ 
     203        border-color: #9c9c9c; 
     204} 
     205 
     206.textSidebox 
     207{ 
     208        border-top-color: #aaa; 
     209} 
     210 
     211.toolbar 
     212{ 
     213        background-image: url( ../../../../phpgwapi/templates/default/images/fundo_topo_fozi.jpg ); 
     214} 
     215 
     216.linha0, 
     217.linha1, 
     218.tr_msg_read, 
     219.tr_msg_read2 
     220{ 
     221        color: #3f3f3f; 
     222        background: #fff; 
     223} 
     224 
     225.linha1, 
     226.tr_msg_read2 
     227{ 
     228        background: #e6f3d9; 
     229} 
     230 
     231table.inboxElements th, 
     232.table_elements_tr_header, 
     233.info_tr_header, 
     234.message_header 
     235{ 
     236        background-color: #98c17f; 
     237} 
     238 
     239.message_options_active { 
     240        color: #d00; 
     241        font-weight: bold; 
     242} 
     243 
     244.message_options_inactive { 
     245        color: #999; 
     246} 
     247 
     248.message_options { 
     249        color: blue; 
     250        font-weight: bold; 
     251} 
     252 
     253.message_options_over { 
     254        color: #d00; 
     255        font-weight: bold 
     256} 
     257 
     258.table_message{ 
     259        background: #98c17f; 
     260} 
     261 
     262 
     263 
     264#fmStatusBar 
     265{ 
     266        margin-left: 4px; 
     267        margin-bottom: 3px; 
     268        font-size: 10px; 
     269} 
     270 
     271.divLoginbox 
     272{ 
     273        position: relative; 
     274        width: 300px; 
     275        border: 1px solid #9c9c9c; 
     276} 
     277 
     278.divLoginboxHeader 
     279{ 
    296280        text-align: center; 
    297         padding: 0px; 
    298         background-color: #e6f3d9; 
    299         height:24px; 
    300         line-height:24px; 
    301         border-top-color:#9c9c9c; 
    302         border-top-width:1px; 
    303         border-top-style:solid; 
    304         border-left-color:#9c9c9c; 
    305         border-left-width:1px; 
    306         border-left-style:solid; 
    307         border-right-color:#9c9c9c; 
    308         border-right-width:1px; 
    309         border-right-style:solid; 
    310 } 
    311  
    312 #divAppbox 
    313 { 
    314         background-color: #e6f3d9; 
    315         padding-right:1px; 
    316         padding-top:1px; 
    317         padding-bottom:1px; 
    318         padding-left:15px; 
    319         border-bottom-color:#9c9c9c; 
    320         border-bottom-width:1px; 
    321         border-bottom-style:solid; 
    322         border-left-color:#9c9c9c; 
    323         border-left-width:1px; 
    324         border-left-style:solid; 
    325         border-right-color:#9c9c9c; 
    326         border-right-width:1px; 
    327         border-right-style:solid; 
    328         margin-top:0px; 
    329         margin-bottom:0px; 
    330         margin-left:2px; 
    331         margin-right:2px; 
    332  
    333 } 
    334  
    335 #fmStatusBar 
    336 { 
    337         margin-left:4px; 
    338         margin-bottom:3px; 
    339         font-size: 10px;  
    340 /*      font-family: Verdana, Arial, Helvetica, sans-serif;*/ 
    341          
    342  
    343 } 
    344  
    345  
    346 #user_info 
    347 { 
    348 padding-left:17px; 
    349  
    350 } 
    351  
    352 #admin_info 
    353 { 
    354         position:relative; 
    355         text-align:center; 
    356         margin-right:10px; 
    357 } 
    358  
    359 #divGenTime 
    360 { 
    361         bottom:14px; 
    362         font-size: 9px; 
    363         color: #ff0000; 
    364         text-align:center; 
    365         width:99%; 
    366 } 
    367  
    368 #divPoweredBy  
    369 { 
    370         font-family: Verdana, Arial, Helvetica, sans-serif; 
     281        background-color: #ddd; 
     282        padding-top: 2px; 
    371283        font-size: 10px; 
    372         color: #999999; 
    373         text-decoration: none; 
    374         padding: 7px; 
    375         text-align: center; 
    376         background-color:white; 
    377 } 
    378  
    379 .navbar_but 
    380 { 
    381         background-image: url(../../../../phpgwapi/templates/default/images/back_app_fozi.png) !important;  
    382         width: 40px; 
    383         height: 40px; 
    384         vertical-align: center; 
    385         text-align: center; 
    386         padding-right: 6px; 
    387         cursor:pointer; 
    388         cursor:hand; 
    389         background-repeat:no-repeat; 
    390 } 
    391  
    392 .navbar_butOver 
    393 { 
    394         background-image: url(../../../../phpgwapi/templates/default/images/back_app_over_fozi.png) !important; 
    395         width: 40px; 
    396         height: 40px; 
    397         vertical-align: center !important; 
    398         text-align: center !important; 
    399         padding-right:6px; 
    400         cursor:pointer; 
    401         cursor:hand; 
    402         background-repeat:no-repeat; 
    403 } 
    404  
    405 .navbar_butOut 
    406 { 
    407         background-image: url(../../../../phpgwapi/templates/default/images/back_app_out_fozi.png) !important; 
    408         width: 40px; 
    409         height: 40px; 
    410         vertical-align: center !important; 
    411         text-align: center !important; 
    412         padding-right:6px; 
    413         cursor:pointer; 
    414         cursor:hand; 
    415         background-repeat:no-repeat; 
    416 } 
    417  
    418 .toolbar 
    419 { 
    420         background-image:url(../../../../phpgwapi/templates/default/images/fundo_topo_fozi.jpg); 
    421         position:absolute; 
    422 } 
    423  
    424 .logo_expresso 
    425 { 
    426         background:url(../../../../phpgwapi/templates/default/images/logo_expresso_fozi.gif) no-repeat; 
    427         width: 264px; 
    428         height: 35px; 
    429 } 
    430  
    431 .content-menu { 
    432         padding: 0px 0px 0px 0px !important; 
    433         background: #fff !important; 
    434 } 
    435  
    436 .menu-degrade { 
    437           background-image: url(../../../../phpgwapi/templates/default/images/degrade.png) !important; 
    438           background-repeat: repeat-x; 
    439 } 
    440  
    441 .image-menu { 
    442         padding: 0px 0px 0px 0px !important; 
    443         background: #a0b2cc url(../../../../phpgwapi/templates/default/images/folder_bg_fozi.jpg) no-repeat scroll center bottom !important; 
    444 } 
    445  
    446 .message_header 
    447 { 
    448         background-color: #98c17f !important; 
    449 } 
    450  
    451 .menu 
    452 { 
    453         background-color:#c2d8b1 !important; 
    454         border: 1px solid #f4f7fc !important; 
    455         border-bottom: 1px solid #4a79b1 !important; 
    456 } 
    457 .message_options_active { 
    458         color: #D00 !important; 
    459         font-weight: bold !important; 
    460 } 
    461  
    462 .message_options_inactive { 
    463         color: #999 !important; 
    464 } 
    465  
    466 .message_options { 
    467         color: blue !important; 
    468         font-weight: bold !important; 
    469 } 
    470  
    471 .message_options_over { 
    472         color: #D00 !important; 
    473         font-weight: bold !important 
    474 } 
    475  
    476 .table_message{ 
    477         background:#98C17F !important; 
    478 } 
    479  
    480  
    481 .tr_msg_read { 
    482         color: #3f3f3f; 
    483         background-color: #ffffff; 
    484         -moz-user-select: none; 
    485 } 
    486  
    487 .tr_msg_read2 { 
    488         color: #3f3f3f; 
    489         background-color: #e6f3d9; 
    490         -moz-user-select: none; 
    491 } 
     284        color: #666; 
     285} 
     286 
     287.divSidebox 
     288{ 
     289        position: relative; 
     290        width: 147px; 
     291        border: 1px solid #9c9c9c; 
     292} 
     293 
     294.content-menu 
     295{ 
     296        padding: 0px 0px 0px 0px; 
     297        background: #fff; 
     298} 
  • branches/2.2/phpgwapi/templates/default/css/celepar.css

    r1704 r3018  
    438438} 
    439439 
     440table.inboxElements th, 
     441.table_elements_tr_header, 
     442.info_tr_header, 
    440443.message_header{ 
    441444        background-color: #CCCCCC !important; 
     
    475478    color:#0000FF !important; 
    476479    height: 20px !important; 
    477     width:220px !important; 
    478480    background-color: #F7F7F7 !important; 
    479481    margin-bottom: 0px !important; 
     
    493495    color: #505050 !important; 
    494496    height: 20px !important; 
    495     width:220px !important; 
    496497    background-color:#E5E5E5 !important; 
    497498    margin-bottom: 0px !important; 
     
    601602        background-image: none !important; 
    602603} 
     604 
     605.linha0, 
    603606.tr_msg_read2, 
    604607.tr_msg_read { 
  • branches/2.2/phpgwapi/templates/default/css/comics.css

    r1195 r3018  
    486486} 
    487487 
     488table.inboxElements th, 
     489.table_elements_tr_header, 
     490.info_tr_header, 
    488491.message_header 
    489492{ 
     
    505508{ 
    506509        -moz-border-radius-topleft:5px !important; 
    507         -moz-border-radius-topright:5px !important; 
    508         background-color: white !important; 
    509         border: 2px solid black !important; 
    510         border-bottom: 0px !important; 
     510        -moz-border-radius-topright:5px !important; 
     511        background-color: white !important; 
     512        border: 2px solid black !important; 
     513        border-bottom: 0px !important; 
    511514        color black !important; 
    512515} 
  • branches/2.2/phpgwapi/templates/default/css/escritorio.css

    r1704 r3018  
    430430} 
    431431 
     432table.inboxElements th, 
     433.table_elements_tr_header, 
     434.info_tr_header, 
    432435.message_header 
    433436{ 
     
    484487        background:transparent url(../../../../phpgwapi/templates/default/images/blackwhite.jpg) repeat-x; 
    485488} 
     489 
     490 
     491.conteudo {  
     492        font-family: Verdana, Arial, Helvetica, sans-serif;  
     493        font-size: 10px;  
     494        font-weight: normal;  
     495        color: #000033;  
     496        padding: 2px;  
     497    border-left: 1px solid; 
     498    border-right: 1px solid; 
     499    border-bottom: 1px solid; 
     500    border-color: #4A79B1; 
     501        width:99.5%;  
     502        overflow: none;  
     503        -moz-border-radius: 0px 0px 6px 6px;  
     504}  
     505 
     506.whiteSpace{  
     507        width: 2px;  
     508} 
     509 
     510.menu 
     511{ 
     512        text-decoration: none; 
     513        text-align: center; 
     514        height: 20px; 
     515        background-color:#c8d7ea; 
     516        margin-bottom: 0px; 
     517        border: 1px solid #f4f7fc; 
     518        border-bottom: 1px solid #4a79b1; 
     519        padding:0px 5px 0px 0px; 
     520        -moz-border-radius: 9px 9px 0px 0px; 
     521        -moz-user-select: none; 
     522        cursor: pointer; 
     523} 
     524 
     525.last_menu 
     526{ 
     527        border-bottom: 1px solid #4a79b1;  
     528        -moz-border-radius: 0px 0px 0px 0px;  
     529} 
     530 
     531.menu-sel 
     532{ 
     533        text-decoration: none; 
     534        text-align: center; 
     535        font: bold 13px Lucidatypewriter,monospace; 
     536        color:#0000FF; 
     537        height: 20px; 
     538        background-color:#F7F7F7; 
     539        margin-bottom: 0px; 
     540        border: 1px solid #4a79b1; 
     541        border-bottom: 0px; 
     542        padding:0px 5px 0px 0px; 
     543        -moz-border-radius: 9px 9px 0px 0px; 
     544        -moz-user-select: none; 
     545        cursor: pointer; 
     546} 
  • branches/2.2/phpgwapi/templates/default/css/metropole.css

    r1514 r3018  
    8080} 
    8181 
    82 /*.tr_msg_read { 
    83 background-color: #B0B0B0 !important; 
    84 color:black !important; 
    85 } 
    86  
     82.linha0, 
     83.linha1, 
     84.tr_msg_read, 
    8785.tr_msg_read2 { 
    88 background-color: #808080 !important; 
    89 color: #E0E0E0 !important; 
    90 }*/ 
    91  
    92  
    93  
    94 .tr_msg_read { 
    95 background-color: white !important; 
    96 } 
    97  
     86        color: #3f3f3f; 
     87        background-color: #ffffff; 
     88        -moz-user-select: none; 
     89} 
     90 
     91.linha1, 
    9892.tr_msg_read2 { 
    99 background-color: #E0E0E0 !important; 
     93        background-color: #E0E0E0 !important; 
    10094} 
    10195 
     
    289283} 
    290284*/ 
     285 
     286.dsused 
     287{ 
     288        background-image: url(../images/dsused_black.gif); 
     289} 
     290 
    291291#tdSidebox 
    292292{ 
     
    486486        background-repeat:no-repeat; 
    487487} 
     488.toolButton { 
     489        color:#FFF !important; 
     490} 
    488491 
    489492.toolbar 
     
    514517} 
    515518 
     519table.inboxElements th, 
     520.table_elements_tr_header, 
     521.info_tr_header, 
    516522.message_header 
    517523{ 
     
    565571        border-bottom: 1px solid gray !important; 
    566572} 
     573 
     574.conteudo {  
     575        font-family: Verdana, Arial, Helvetica, sans-serif;  
     576        font-size: 10px;  
     577        font-weight: normal;  
     578        color: #000033;  
     579        padding: 2px;  
     580    border-left: 1px solid; 
     581    border-right: 1px solid; 
     582    border-bottom: 1px solid; 
     583    border-color: #4A79B1; 
     584        width:99.5%;  
     585        overflow: none;  
     586        -moz-border-radius: 0px 0px 6px 6px;  
     587}  
     588 
     589.whiteSpace{  
     590        width: 2px;  
     591}  
     592.menu 
     593{ 
     594        text-decoration: none; 
     595        text-align: center; 
     596        height: 20px; 
     597        background-color:#c8d7ea; 
     598        margin-bottom: 0px; 
     599        border: 1px solid #f4f7fc; 
     600        border-bottom: 1px solid #4a79b1; 
     601        padding:0px 5px 0px 0px; 
     602        -moz-border-radius: 9px 9px 0px 0px; 
     603        -moz-user-select: none; 
     604        cursor: pointer; 
     605} 
     606 
     607.last_menu  
     608{  
     609        border-bottom: 1px solid #4a79b1;  
     610        -moz-border-radius: 0px 0px 0px 0px;  
     611}  
     612 
     613.menu-sel 
     614{ 
     615        text-decoration: none; 
     616        text-align: center; 
     617        font: bold 13px Lucidatypewriter,monospace; 
     618        color:#FFFFFF; 
     619        height: 20px; 
     620        background-color:#7F7F7F; 
     621        margin-bottom: 0px; 
     622        border: 1px solid #FFF; 
     623        border-bottom: 0px; 
     624        padding:0px 5px 0px 0px; 
     625        -moz-border-radius: 9px 9px 0px 0px; 
     626        -moz-user-select: none; 
     627        cursor: pointer; 
     628} 
  • branches/2.2/phpgwapi/templates/default/css/rochas.css

    r1719 r3018  
    1 ul 
    2 { 
    3         list-style-image: url("../images/orange-ball.png"); 
    4 } 
    5  
    6 .grid_email_class 
    7 { 
    8         border-bottom:1px solid #cfcfcf; 
    9 } 
    10 .selected_shortcut_msg { 
    11         color:  black   !important; 
    12         background-color: BurlyWood !important; 
    13 } 
    14  
    15 body  
    16 { 
    17         margin: 0px !important; 
    18         background-color:#E9E9E9 !important; 
    19         font-size: 11px !important; 
    20         font-family: Verdana, Arial, Helvetica, sans-serif !important; 
    21         padding:0px !important; 
    22 } 
    23  
    24 img 
    25 { 
    26         border-width:0px !important; 
    27         border-style:none !important; 
    28         /*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader; 
    29 */ 
    30 } 
    31  
    32 a:link,a:visited 
    33 { 
    34         cursor:pointer !important; 
    35         color: #000066 !important; 
    36         text-decoration: none !important; 
    37 } 
    38  
    39 /* 
    40 a:visited  
    41 { 
    42         color: #006699;  
    43         text-decoration: none; 
    44 } 
    45 */ 
    46 a:hover,a:active 
    47 { 
    48         cursor:pointer !important; 
    49         color: #ff9933 !important; 
    50         text-decoration: underline !important; 
    51 } 
    52 /* 
    53 a:active  
    54 { 
    55         color: #006699;  
    56         text-decoration: underline; 
    57 } 
    58 */ 
    59 input,button 
    60 { 
    61         font-size: 11px !important;  
    62         color: #006699 !important; 
    63         font-family: Arial, Helvetica, sans-serif !important; 
    64         border: 1px #bbbbbb solid !important; 
    65 } 
    66 input.em_button_like_span { 
    67         color:#886633 !important; 
    68 } 
    69 input[type=submit],input[type=button],button 
    70 { 
    71         margin:1px !important; 
    72         padding:1px !important; 
    73         cursor: pointer !important;  
    74         cursor: hand !important; 
     1body 
     2{ 
     3        background-color: #e9e9e9; 
     4} 
     5 
     6a:link, 
     7a:visited 
     8{ 
     9        color: #000066; 
     10} 
     11 
     12a:hover, 
     13a:active 
     14{ 
     15        color: #ff9933; 
     16} 
     17 
     18a.divSideboxEntry, 
     19.divSideboxEntry 
     20{ 
     21        background-color: #eee; 
     22} 
     23 
     24a.textSidebox 
     25{ 
     26        border-top-color: #aaa; 
     27} 
     28 
     29input, 
     30button 
     31{ 
     32        border-color: #bbb; 
     33        color: #069; 
    7534} 
    7635 
    7736input[type=image] 
    7837{ 
    79         cursor: pointer !important;  
    80         cursor: hand !important; 
    81         border: 0px #bbbbbb none !important; 
    82 } 
    83 select  
    84 { 
    85         font-size: 11px !important;  
    86         color: #000066 !important;  
    87         font-family: Arial, Helvetica, sans-serif !important; 
    88         border: 1px #bbbbbb solid !important; 
    89         z-index: -1 !important; 
    90 } 
    91  
    92 td 
    93 { 
    94         font-size: 11px !important; 
    95         /*text-align:left;*/ 
    96         /*      padding-top:1px; 
    97         padding-bottom:1px;*/ 
    98 } 
    99  
    100 .divLoginbox  
    101 { 
    102         position:relative; 
    103         width: 300px;  
    104         border-right: #9c9c9c 1px solid;  
    105         border-top: #9c9c9c 1px solid;  
    106         border-left: #9c9c9c 1px solid;  
    107         border-bottom: #9c9c9c 1px solid 
    108 } 
    109  
    110 .divLoginboxHeader  
    111 { 
    112         text-align:center; 
    113         background-color:#dddddd; 
    114         padding-top:2px; 
    115         font-size:10px; 
    116         color:#666666; 
    117 } 
    118 .divSidebox  
    119 { 
    120         position:relative; 
    121         width: 147px;  
    122         border-right: #9c9c9c 1px solid;  
    123         border-top: #9c9c9c 1px solid;  
    124         border-left: #9c9c9c 1px solid;  
    125         border-bottom: #9c9c9c 1px solid 
    126 } 
    127  
    128 .tblHeadApp { 
    129  
    130         border-right: #9c9c9c 1px solid;         
    131         border-top: #9c9c9c 1px solid;  
    132         border-left: #9c9c9c 1px solid;  
    133         border-bottom: #9c9c9c 1px solid 
    134 } 
    135  
    136 .divSideboxHeader  
    137 { 
    138         text-align:center; 
    139         background-color:#000066; 
    140         padding-top:2px; 
    141         height: 15px; 
    142         color: #FFFFFF; 
    143  
    144 } 
    145  
    146 a.divSideboxEntry, .divSideboxEntry 
    147 { 
    148         text-align:left; 
    149         height:16px; 
    150         background-color:#eeeeee; 
    151 } 
    152  
    153 a.appTitles,.appTitles 
    154 { 
    155         font-size: 10px;  
    156         height:18px; 
    157         padding-top:2px; 
    158         padding-bottom:2px; 
    159  
    160 } 
    161  
    162 a.textSidebox 
    163 { 
    164         font-size: 10px;  
    165         border-top: #aaaaaa 0px none; 
    166 } 
    167  
    168 .textSidebox 
    169 { 
    170         font-size: 10px;  
    171         height:18px; 
    172         padding-top:2px; 
    173         padding-bottom:2px; 
    174         border-top: #aaaaaa 1px solid; 
    175  
    176 } 
    177  
    178 .sideboxSpace 
    179 { 
    180         height:9px; 
    181 } 
    182  
    183 .dsused 
    184 { 
    185                 background-image: url(../images/dsused.gif); 
    186 } 
    187  
    188 .greyLine 
    189 { 
    190         margin:1px; 
    191         border-top-color:#7e7e7e; 
    192         border-top-width:1px; 
    193         border-top-style:solid; 
    194         height:1px; 
    195 } 
    196  
    197 .prefSection 
    198 { 
    199         font-weight:bold; 
    200         font-size:16px; 
    201         line-height:40px; 
    202 } 
    203  
    204 #extraIcons 
    205 { 
    206 /*      position:absolute; 
    207         z-index:13; 
    208         right:10px; 
    209         top:113px; 
    210         visibility:hidden;*/ 
    211 /*      background-image:url(../images/alpha-white.png);*/ 
    212         background-color:#eeeeee; 
    213         border-width:1px; 
    214         border-color:#7e7e7e; 
    215         border-style:solid; 
    216 } 
    217  
    218 .extraIconsRow 
    219 { 
    220         border-top-color:#dddddd; 
    221         border-top-width:1px; 
    222         border-top-style:solid; 
    223         padding:2px; 
    224 } 
    225  
    226 #divMain 
    227 { 
    228         background-color:white; 
    229         margin-top: 0px; 
    230         padding:9px; 
    231         border-color:#7e7e7e; 
    232         border-width:1px; 
    233         border-style:solid; 
    234 } 
    235  
    236 #divLogo 
    237 { 
    238         position:absolute; 
    239         left:20px; 
    240         top:5px; 
    241         z-index:51; 
    242 } 
    243  
    244 #divAppIconBar 
    245 { 
    246         background-color:white; 
    247         border-top-color:#9c9c9c; 
    248         border-top-width:1px; 
    249         border-top-style:solid; 
    250         background-image: url(../images/background-icon-bar.png);  
    251         background-repeat: repeat-x 
    252 } 
    253  
    254 #divAppTextBar 
    255 { 
    256         background-color:white; 
    257 } 
    258  
    259 #user_info 
    260 { 
    261         color: black; 
    262 } 
    263 #links_bar 
    264 { 
    265                 color: black; 
    266 } 
    267  
    268 #divStatusBar 
    269 { 
    270         height:24px; 
    271         padding-left:10px; 
    272         padding-top:0px; 
    273 } 
    274  
    275 /*#divSubContainer 
    276 { 
    277 } 
    278 */ 
    279 #tdSidebox 
    280 { 
    281         width:170px; 
    282         background-color:white; 
    283         overflow:visible; 
    284 } 
    285  
    286  
    287 #tdAppbox 
    288 { 
    289         background-color:white; 
    290         width: 100%; 
    291 } 
    292 #divSideboxContainer 
    293 { 
    294         position:relative; 
    295         width:150px; 
    296         top:0px; 
    297         left:0px; 
    298         background-color:white; 
    299         border-width:1px; 
    300         border-style:solid; 
    301         z-index:40; 
     38        border-color: #bbb; 
     39} 
     40 
     41select 
     42{ 
     43        border-color: #bbb; 
     44        color: #006; 
     45} 
     46 
     47#divAppbox 
     48{ 
     49        background: #eeeee0; 
     50        border-color: #9c9c9c; 
    30251} 
    30352 
    30453#divAppboxHeader 
    30554{ 
    306         margin-top:2px; 
    307         margin-left:2px; 
    308         margin-right:2px; 
    309         font-family: Verdana, Arial, Helvetica, sans-serif; 
     55        background: #eeeee0; 
     56        border-color: #9c9c9c; 
     57        color: #006; 
    31058        font-size: 14px; 
    31159        font-weight: bold; 
    312         color: #000066; 
     60} 
     61 
     62#divAppIconBar 
     63{ 
     64        background: #fff url( ../images/background-icon-bar.png ) repeat-x; 
     65        border-top-color: #9c9c9c; 
     66} 
     67 
     68#divAppTextBar 
     69{ 
     70        background-color: #fff; 
     71} 
     72 
     73#divGenTime 
     74{ 
     75        color: #f00; 
     76} 
     77 
     78#divMain 
     79{ 
     80        background: #fff; 
     81        border-color: #7e7e7e; 
     82} 
     83 
     84#divPoweredBy 
     85{ 
     86        background: #fff; 
     87        color: #999; 
     88} 
     89 
     90#divSideboxContainer 
     91{ 
     92        background: #fff; 
     93} 
     94 
     95#extraIcons 
     96{ 
     97        background: #eee; 
     98        border-color: #7e7e7e; 
     99} 
     100 
     101#links_bar, 
     102#user_info 
     103{ 
     104        color: #000; 
     105} 
     106 
     107#tdAppbox 
     108{ 
     109        background-color: #fff; 
     110} 
     111 
     112#tdSidebox 
     113{ 
     114        background: #fff; 
     115} 
     116 
     117.conteudo 
     118{ 
     119        border-color: #4A79B1; 
     120        color: #003; 
     121} 
     122 
     123.divSideboxHeader 
     124{ 
     125        background: #006; 
     126        color: #fff; 
     127} 
     128 
     129.extraIconsRow 
     130{ 
     131        border-top-color: #ddd; 
     132} 
     133 
     134.greyLine 
     135{ 
     136        border-top-color: #7e7e7e; 
     137} 
     138 
     139.grid_email_class 
     140{ 
     141        border-bottom-color: #cfcfcf; 
     142} 
     143 
     144.image-menu 
     145{ 
     146        background: #ddf4fe url( ../../../../phpgwapi/templates/default/images/folder_bg_canyon.jpg ) no-repeat scroll center bottom; 
     147} 
     148 
     149.last_menu 
     150{ 
     151        border-bottom-color: #4a79b1; 
     152} 
     153 
     154.logo_expresso 
     155{ 
     156        background: url( ../../../../phpgwapi/templates/default/images/logo_expresso_canyon.png ) no-repeat; 
     157        width: 264px; 
     158        height: 35px; 
     159} 
     160 
     161.menu 
     162{ 
     163        background: #a19183; 
     164        border-color: #f4f7fc; 
     165        border-bottom-color: #4a79b1; 
     166} 
     167 
     168.menu-sel 
     169{ 
     170        background-color: #f7f7f7; 
     171        border-color: #A19183; 
     172        color: #00f; 
     173} 
     174 
     175.menu-degrade 
     176{ 
     177        background-image: url( ../../../../phpgwapi/templates/default/images/degrade.png ); 
     178} 
     179 
     180.navbar_but 
     181{ 
     182        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_canyon.png ); 
     183} 
     184 
     185.navbar_butOver 
     186{ 
     187        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_over_canyon.png ); 
     188} 
     189 
     190.navbar_butOut 
     191{ 
     192        background-image: url( ../../../../phpgwapi/templates/default/images/back_app_out_canyon.png ); 
     193} 
     194 
     195.tblHeadApp 
     196{ 
     197        border-color: #9c9c9c; 
     198} 
     199 
     200.textSidebox 
     201{ 
     202        border-top-color: #aaa; 
     203} 
     204 
     205.toolbar 
     206{ 
     207        background-image: url(../../../../phpgwapi/templates/default/images/fundo_topo_canyon.png); 
     208} 
     209 
     210.whiteSpace 
     211{ 
     212        width: 2px; 
     213} 
     214 
     215.linha0, 
     216.linha1, 
     217.tr_msg_read, 
     218.tr_msg_read2 
     219{ 
     220        color: #615143; 
     221        background: #fff; 
     222} 
     223 
     224.linha1, 
     225.tr_msg_read2 
     226{ 
     227        background: #eeeee0; 
     228} 
     229 
     230table.inboxElements th, 
     231.table_elements_tr_header, 
     232.info_tr_header, 
     233.message_header 
     234{ 
     235        background: #cfb69e; 
     236} 
     237 
     238.content-menu 
     239{ 
     240        padding: 0px; 
     241        background: #fff; 
     242} 
     243 
     244.divLoginbox 
     245{ 
     246        border: 1px solid #9c9c9c; 
     247        position: relative; 
     248        width: 300px; 
     249} 
     250 
     251.divLoginboxHeader 
     252{ 
     253        background-color: #ddd; 
     254        color: #666; 
     255        font-size: 10px; 
     256        padding-top: 2px; 
    313257        text-align: center; 
    314         padding: 0px; 
    315         background-color: #eeeee0; 
    316         height:24px; 
    317         line-height:24px; 
    318         border-top-color:#9c9c9c; 
    319         border-top-width:1px; 
    320         border-top-style:solid; 
    321         border-left-color:#9c9c9c; 
    322         border-left-width:1px; 
    323         border-left-style:solid; 
    324         border-right-color:#9c9c9c; 
    325         border-right-width:1px; 
    326         border-right-style:solid; 
    327 } 
    328  
    329 #divAppbox 
    330 { 
    331         background-color: #eeeee0; 
    332         padding-right:1px; 
    333         padding-top:1px; 
    334         padding-bottom:1px; 
    335         padding-left:15px; 
    336         border-bottom-color:#9c9c9c; 
    337         border-bottom-width:1px; 
    338         border-bottom-style:solid; 
    339         border-left-color:#9c9c9c; 
    340         border-left-width:1px; 
    341         border-left-style:solid; 
    342         border-right-color:#9c9c9c; 
    343         border-right-width:1px; 
    344         border-right-style:solid; 
    345         margin-top:0px; 
    346         margin-bottom:0px; 
    347         margin-left:2px; 
    348         margin-right:2px; 
    349  
    350 } 
    351  
    352 #user_info 
    353 { 
    354 padding-left:17px; 
    355  
    356 } 
    357  
    358 #admin_info 
    359 { 
    360         position:relative; 
    361         text-align:center; 
    362         margin-right:10px; 
    363 } 
    364  
    365 #divGenTime 
    366 { 
    367         bottom:14px; 
    368         font-size: 9px; 
    369         color: #ff0000; 
    370         text-align:center; 
    371         width:99%; 
    372 } 
    373  
    374 #divPoweredBy  
    375 { 
    376         font-family: Verdana, Arial, Helvetica, sans-serif; 
    377         font-size: 10px; 
    378         color: #999999; 
    379         text-decoration: none; 
    380         padding: 7px; 
    381         text-align: center; 
    382         background-color:white; 
    383 } 
    384 .navbar_but 
    385 { 
    386         background-image: url(../../../../phpgwapi/templates/default/images/back_app_canyon.png) !important; 
    387         width: 40px; 
    388         height: 40px; 
    389         vertical-align: center; 
    390         text-align: center; 
    391         padding-right: 6px; 
    392         cursor:pointer; 
    393         cursor:hand; 
    394         background-repeat:no-repeat; 
    395 } 
    396  
    397 .navbar_butOver 
    398 { 
    399         background-image: url(../../../../phpgwapi/templates/default/images/back_app_over_canyon.png) !important; 
    400         width: 40px; 
    401         height: 40px; 
    402         vertical-align: center !important; 
    403         text-align: center !important; 
    404         padding-right:6px; 
    405         cursor:pointer; 
    406         cursor:hand; 
    407         background-repeat:no-repeat; 
    408 } 
    409  
    410 .navbar_butOut 
    411 { 
    412         background-image: url(../../../../phpgwapi/templates/default/images/back_app_out_canyon.png) !important; 
    413         width: 40px; 
    414         height: 40px; 
    415         vertical-align: center !important; 
    416         text-align: center !important; 
    417         padding-right:6px; 
    418         cursor:pointer; 
    419         cursor:hand; 
    420         background-repeat:no-repeat; 
    421 } 
    422  
    423 .toolbar 
    424 { 
    425         background-image:url(../../../../phpgwapi/templates/default/images/fundo_topo_canyon.png); 
    426         position:absolute; 
    427 } 
    428  
    429 .logo_expresso 
    430 { 
    431         background:url(../../../../phpgwapi/templates/default/images/logo_expresso_canyon.png) no-repeat; 
    432         width: 264px; 
    433         height: 35px; 
    434 } 
    435  
    436 .content-menu { 
    437         padding: 0px 0px 0px 0px !important; 
    438         background: #fff !important; 
    439 } 
    440  
    441 .image-menu { 
    442         padding: 0px 0px 0px 0px !important; 
    443         background: #ddf4fe url(../../../../phpgwapi/templates/default/images/folder_bg_canyon.jpg) no-repeat scroll center bottom !important; 
    444 } 
    445  
    446 .menu-degrade { 
    447           background-image: url(../../../../phpgwapi/templates/default/images/degrade.png) !important; 
    448           background-repeat: repeat-x; 
    449 } 
    450  
    451 .navbar_butOut 
    452 { 
    453         background-image: url(../../../../phpgwapi/templates/default/images/back_app_out_canyon.png) !important; 
    454         width: 40px; 
    455         height: 40px; 
    456         vertical-align: center !important; 
    457         text-align: center !important; 
    458         padding-right:6px; 
    459         cursor:pointer; 
    460         cursor:hand; 
    461         background-repeat:no-repeat; 
    462 } 
    463  
    464 .toolbar 
    465 { 
    466         background-image:url(../../../../phpgwapi/templates/default/images/fundo_topo_canyon.png); 
    467         position:absolute; 
    468 } 
    469  
    470 .logo_expresso 
    471 { 
    472         background:url(../../../../phpgwapi/templates/default/images/logo_expresso_canyon.png) no-repeat; 
    473         width: 264px; 
    474         height: 35px; 
    475 } 
    476  
    477 .message_header{ 
    478         background-color: #cfb69e !important; 
    479 } 
    480 .menu 
    481 { 
    482         background-color:#a19183 !important; 
    483         border: 1px solid #f4f7fc !important; 
    484         border-bottom: 1px solid #4a79b1 !important; 
    485 } 
    486 .menu-sel{ 
    487     color:#0000FF !important; 
    488     background-color:#F7F7F7 !important; 
    489     border-color: #A19183 !important; 
    490 } 
    491 .table_message{ 
    492         background: url(../../../../phpgwapi/templates/default/images/fundo_topo_canyon.png) !important; 
    493 } 
    494  
    495 .message_options { 
    496          color: #863 !important; 
     258} 
     259 
     260.divSidebox 
     261{ 
     262        position: relative; 
     263        border: 1px solid #9c9c9c; 
     264        width: 147px; 
     265} 
     266 
     267.table_message 
     268{ 
     269        background: url( ../../../../phpgwapi/templates/default/images/fundo_topo_canyon.png ); 
     270} 
     271 
     272.message_options 
     273{ 
     274        color: #863; 
    497275} 
    498276 
    499277.tr_msg_unread 
    500278{ 
    501         background-color:#EEEEE0 !important; 
    502 } 
    503 .tr_msg_read { 
    504         color: #3f3f3f; 
    505         background-color: #ffffff; 
    506         -moz-user-select: none; 
    507 } 
    508  
    509 .tr_msg_read2 { 
    510         color: #3f3f3f; 
    511         background-color: #eeeee0; 
    512         -moz-user-select: none; 
    513 } 
    514  
     279        color: #000; 
     280        font-style: oblique; 
     281} 
     282 
     283.selected_shortcut_msg 
     284{ 
     285        color: #000; 
     286        background-color: BurlyWood; 
     287} 
     288 
     289input.em_button_like_span 
     290{ 
     291        color: #886633; 
     292} 
  • branches/2.2/phpgwapi/templates/default/head.inc.php

    r890 r3018  
    3333 
    3434        #_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']); 
    35         $theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; 
    36         if(!file_exists($theme_css)) 
    37         { 
    38                 $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; 
    39         } 
    4035 
    4136        //pngfix defaults to yes 
     
    9489                'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app, 
    9590                'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), 
    96                 'theme_css'     => $theme_css, 
    9791                'css'           => $GLOBALS['phpgw']->common->get_css(), 
    9892                'java_script'   => $GLOBALS['phpgw']->common->get_java_script(), 
  • branches/2.2/phpgwapi/templates/default/head.tpl

    r1247 r3018  
    1313                <link rel="icon" href="{img_icon}" type="image/x-ico" /> 
    1414                <link rel="shortcut icon" href="{img_shortcut}" /> 
    15                 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/> 
    1615                <META http-equiv="Default-Style" content="eGroupWareStyle"> 
    1716                {slider_effects} 
  • branches/2.2/phpgwapi/templates/default/login_default.php

    r1933 r3018  
    104104                unset($sslattributes); 
    105105        } 
    106  
     106        session_start();  
    107107        if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) 
    108108        { 
     
    406406                        { 
    407407                                $aux_captcha = '<div class="login_label" > 
    408                <img src="./security/captcha.php" title="'.lang('Security code').'" alt="'.lang('Security code').'" style="width:60;"> 
     408 <input type="hidden" name="' . session_name() .'" value="' . session_id() . '" >  
     409 <img src="./security/captcha.php?xsid='.session_id().'" title="'.lang('Security code').'" alt="'.lang('Security code').'" style="width:60;">   
    409410<br /> 
    410411                <input class="input" type="text" maxlength="50" size="20" name="codigo" id="codigo" value="" > 
  • branches/2.2/preferences/preferences.php

    r1933 r3018  
    487487                if (!is_admin() || $error) 
    488488                { 
    489                         $GLOBALS['phpgw']->redirect_link('/preferences/index.php'); 
     489                        $GLOBALS['phpgw']->redirect_link('/'.$_GET['appname'].'/');  
    490490                } 
    491491                 
  • branches/2.2/security/captcha.php

    r1574 r3018  
    111111  $GLOBALS['captcha'] = new captcha; 
    112112  // Guarda o string do captcha na session... 
     113  session_id($_REQUEST['xsid']);  
     114  session_start();  
    113115  $_SESSION['CAPTCHAString'] = $GLOBALS['captcha'] ->GetCaptchaString(); 
    114116  // Vai exibir a imagem do captcha... 
Note: See TracChangeset for help on using the changeset viewer.