Changeset 3018
- Timestamp:
- 07/08/10 17:52:20 (13 years ago)
- Location:
- branches/2.2
- Files:
-
- 2 added
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/admin/inc/class.uiconfig.inc.php
r1325 r3018 200 200 $t->set_var('row_on', $GLOBALS['phpgw_info']['theme']['row_on']); 201 201 $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'))); 202 203 $t->pparse('out','header'); 203 204 -
branches/2.2/calendar/inc/class.boicalendar.inc.php
r678 r3018 1275 1275 if($this->line < count($ical_text)) 1276 1276 { 1277 $str = str_replace("\r\n",'',$ical_text[$this->line]); 1277 $str = str_replace(array("\r\n","\r","\n"), '', $ical_text[$this->line]); 1278 1278 1279 $this->line = $this->line + 1; 1279 1280 while(ereg("^[[:space:]]",$ical_text[$this->line])) … … 1282 1283 $this->line = $this->line + 1; 1283 1284 } 1285 // Corrige a codificacao dos caracteres 1286 $str = utf8_decode ( trim ($str) ); 1284 1287 $this->debug("LINE : ".$str); 1285 1288 return $str; … … 1405 1408 function parse_parameters(&$event,$majortype,$value) 1406 1409 { 1410 $this->debug ('value: '.$value); 1407 1411 if(!ereg('[\=\;]',$value)) 1408 1412 { … … 1451 1455 } 1452 1456 } 1457 1458 $this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 1453 1459 1454 1460 for($i=0;$i<count($return_value);$i++) … … 1528 1534 if($this->property[$majortype][$mode]['multiples']) 1529 1535 { 1530 $this->debug( _debug_array($var,False));1536 $this->debug('parse_value var array: '._debug_array($var,False)); 1531 1537 $event[$majortype][] = $var; 1532 1538 } … … 1540 1546 $t_var = $var[$majortype]; 1541 1547 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 } 1548 1557 } 1549 1558 $this->set_var($event,$majortype,$var); … … 2260 2269 function switch_partstat($var) 2261 2270 { 2262 // $this->debug_str = True;2263 2271 $this->debug('PARTSTAT = '.$var); 2264 // $this->debug_str = False;2265 2272 if(is_string($var)) 2266 2273 { … … 2567 2574 2568 2575 ereg($property_regexp,$text,$temp); 2576 $this->debug ('Majortype dump: '._debug_array($temp, false) ); 2569 2577 $majortype = str_replace('-','_',strtolower($temp[1])); 2570 2578 $value = chop($temp[2]); … … 2767 2775 elseif($state == 'optional' || $state == 'required') 2768 2776 { 2769 $this->debug('Mode : '.$mode.' Majortype : '.$majortype );2777 $this->debug('Mode : '.$mode.' Majortype : '.$majortype . ' Type : '.$type); 2770 2778 if($do_to_text) 2771 2779 { … … 3016 3024 break; 3017 3025 } 3026 $this->debug ('ical parse result: ' . _debug_array ($ical, false)); 3018 3027 $c_events = count($ical['event']); 3019 3028 for($i=0;$i<$c_events;$i++) … … 3056 3065 $so_event->set_ex_participants($ical['event'][$i]['ex_participants']['value']); 3057 3066 } 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 3058 3087 if($ical['event'][$i]['location']['value']) 3059 3088 { … … 3296 3325 else 3297 3326 { 3298 //owner 3327 $so_event->add_attribute('participants','A',(int)$GLOBALS['phpgw_info']['user']['account_id']); 3299 3328 } 3300 3329 … … 3585 3614 if($this->debug_str) 3586 3615 { 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); 3588 3620 } 3589 3621 } -
branches/2.2/calendar/inc/class.socalendar_sql.inc.php
r1949 r3018 309 309 ); 310 310 311 $result = array(); 311 312 do 312 313 { … … 317 318 if($quociente == 1) 318 319 { 319 $result[] .= $dias_semana[$divisor];320 $result[] = $dias_semana[$divisor]; 320 321 321 322 $divisor = $divisor / 2; … … 335 336 { 336 337 337 $result[] .= $dias_semana[$divisor];338 $result[] = $dias_semana[$divisor]; 338 339 339 340 $divisor = $divisor / 2; -
branches/2.2/contactcenter/inc/class.ui_data.inc.php
r1690 r3018 2072 2072 2073 2073 /* Verify Data and performs insertion/update */ 2074 foreach($data as $field => &$value)2074 foreach($data as $field => $value) 2075 2075 { 2076 2076 if ($value == '' or is_null($value)) … … 2082 2082 switch($field) 2083 2083 { 2084 case 'names_ordered': 2085 $data[$field] = urldecode($value); 2084 2086 case 'corporate_name': 2085 2087 case 'job_title': … … 2089 2091 case 'given_names': 2090 2092 case 'family_names': 2091 case 'names_ordered':2092 2093 case 'pgp_key': 2093 2094 case 'notes': 2094 /* Do Nothing. This is just to make sure no invalid field is passed */2095 $data[$field] = urldecode($data[$field]); 2095 2096 break; 2096 2097 … … 2167 2168 if ($value['new_cities'][$type]) 2168 2169 { 2169 $ value['new_cities'][$type]['id_state'] = $id_state;2170 $data[$field]['new_cities'][$type]['id_state'] = $id_state; 2170 2171 } 2171 2172 } … … 2203 2204 } 2204 2205 2205 $code = '$id = $this->bo->catalog->';2206 2207 2206 if (!is_null($id) and $id !== '') 2208 2207 { 2209 $ code .= $code.'update_single_info($id, $data);';2208 $id = $this->bo->catalog->update_single_info($id, $data); 2210 2209 $result = array( 2211 2210 'msg' => lang('Updated Successfully!'), … … 2215 2214 else 2216 2215 { 2217 $ code .= 'add_single_entry($data);';2216 $id = $this->bo->catalog->add_single_entry($data); 2218 2217 $result = array( 2219 2218 'msg' => lang('Entry Added Successfully!'), … … 2221 2220 ); 2222 2221 } 2223 2224 eval($code);2225 2222 2226 2223 if (!($id)) … … 2371 2368 case 'notes': 2372 2369 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 ); 2375 2371 break; 2376 2372 -
branches/2.2/doc-expressolivre/debian/arqs-conf/header.inc.php
r1358 r3018 18 18 * the absolute path to fit your site, and you should be up and running. * 19 19 \**************************************************************************/ 20 20 ob_start(); 21 21 define('PHPGW_SERVER_ROOT','/var/www/expresso'); 22 22 define('PHPGW_INCLUDE_ROOT','/var/www/expresso'); … … 127 127 { 128 128 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');131 129 } 132 130 $connection_id = $GLOBALS['phpgw']->session->sessionid; 133 131 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 }140 132 include("header.session.inc.php"); 141 133 } -
branches/2.2/doc-expressolivre/debian/expressoInstallDebian-lenny.sh
r1331 r3018 3 3 # Criado por João Alfredo Knopik Junior <jakjr@celepar.pr.gov.br> 4 4 # Colaborações: 5 # 6 # 5 # "William Fernando Merlotto" <william@prognus.com.br> 6 # "Alexandre Felipe Muller de Souza" <amuller@celepar.pr.gov.br> 7 7 8 8 set -e # Para caso de erro 9 9 10 10 if [ $UID != 0 ]; then { 11 12 13 11 echo "Este script deve ser executado como superusuario, root ou sudo"; 12 exit 1; 13 } 14 14 fi 15 15 … … 49 49 dialog --backtitle "$BACKTITLE" --cr-wrap --msgbox \ 50 50 "A instalação dos pacotes necessários para o ExpressoLivre começará agora." 10 65 && 51 #..................................................................... 51 #..................................................................... 52 52 53 53 apt-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; } … … 65 65 #apache2-ssl-certificate; 66 66 67 a2enmod rewrite; 67 a2enmod rewrite 68 a2enmod ssl 68 69 69 70 cp -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/71 cp ./arqs-conf/etc/apache2/apache2.conf.lenny /etc/apache2/apache2.conf 72 cp ./arqs-conf/etc/apache2/sites-available/default.lenny /etc/apache2/sites-available/expresso 73 cp ./arqs-conf/etc/apache2/ports.conf.lenny /etc/apache2/ports.conf 73 74 cp -r -p ./arqs-conf/etc/apache2/ssl/ /etc/apache2/ 74 75 … … 76 77 mkdir /php_sessions/ || { echo "Diretório já existe. [OK]"; } 77 78 chmod -R 777 /php_sessions/ 79 80 a2ensite expresso 81 a2dissite default 82 83 # Linha adicionada para resolver alguns warnings quando "apache2ctl configtest" 84 HOST=`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 78 85 79 86 /etc/init.d/apache2 restart … … 86 93 rm -rf /var/lib/ldap 87 94 mkdir /var/lib/ldap 88 cp ./arqs-conf/etc/ldap/DB_CONFIG /var/lib/ldap/ 89 chown -R openldap. /var/lib/ldap/ 95 chown -R openldap:openldap /var/lib/ldap/ 90 96 /etc/init.d/slapd start 91 97 /etc/init.d/slapd stop … … 101 107 /etc/init.d/slapd start 102 108 rm /tmp/expresso.ldif 109 103 110 ############################################################################################ 104 111 # CYRUS … … 126 133 /etc/init.d/postfix restart 127 134 postmap /etc/postfix/expresso-dominios 128 echo "127.0.0.1 $DOMAIN" >> /etc/hosts129 135 130 136 sleep 10 … … 134 140 mkdir /home/expressolivre || { echo "Diretório já existe. [OK]"; } 135 141 cp ./arqs-conf/home/expressolivre/* /home/expressolivre/ 136 chown -R www-data .www-data /home/expressolivre/142 chown -R www-data:www-data /home/expressolivre/ 137 143 ############################################################################################ 138 144 # HEADER_INC_PHP 139 145 sed -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.php146 chown www-data:www-data /var/www/expresso/header.inc.php 141 147 142 148 ############################################################################################ … … 179 185 echo Acerta permissoes das pastas crls e temp em /var/www/expresso/security: 180 186 chown www-data:www-data /var/www/expresso/security/temp 181 chown www-data:www-data /var/www/expresso/logs 187 chown www-data:www-data /var/www/expresso/logs 182 188 chown -R www-data:www-data /var/www/expresso/security/crls 183 chown www-data .www-data /var/www/expresso/security/crl_admin/crl_admin.py189 chown www-data:www-data /var/www/expresso/security/crl_admin/crl_admin.py 184 190 chmod 755 /var/www/expresso/security/temp 185 191 chmod 755 /var/www/expresso/security/crls -
branches/2.2/expressoAdmin1_2/inc/class.manager.inc.php
r1913 r3018 1 <? 1 <?php 2 2 /***********************************************************************************\ 3 3 * Expresso Administração * -
branches/2.2/expressoAdmin1_2/js/jscode/connector.js
r317 r3018 499 499 500 500 id = url; 501 connector.newRequest(id, url, method, handler, params);501 admin_connector.newRequest(id, url, method, handler, params); 502 502 } 503 503 … … 508 508 // form: form element (for upload files) 509 509 function cExecuteForm(url, form, handler){ 510 connector.buildBar();510 admin_connector.buildBar(); 511 511 isExecuteForm = true; 512 512 document.onmouseup = alertBut; 513 513 514 connector.showProgressBar();514 admin_connector.showProgressBar(); 515 515 if(! (divUpload = document.getElementById('divUpload'))) { 516 516 divUpload = document.createElement('DIV'); … … 554 554 if(isExecuteForm) { 555 555 if(confirm("There's an action processing. Do you want abort it?")) { 556 connector.hideProgressBar();556 admin_connector.hideProgressBar(); 557 557 isExecuteForm = false; 558 delete connector.requests[id];559 connector.requests[id] = null;558 delete admin_connector.requests[id]; 559 admin_connector.requests[id] = null; 560 560 stop(); 561 561 return; -
branches/2.2/expressoAdmin1_2/js/jscode/users.js
r1913 r3018 139 139 if (document.forms[0].mailalternateaddress.value != '') 140 140 attrs_array['mailalternateaddress'] = document.forms[0].mailalternateaddress.value; 141 var attributes = connector.serialize(attrs_array);141 var attributes = admin_connector.serialize(attrs_array); 142 142 143 143 var handler_validate_fields = function(data) … … 156 156 if (type == 'create_user') 157 157 { 158 // Turn enabled checkbox on create user. 159 document.getElementById('changepassword').disabled = false; 158 160 cExecuteForm ("$this.user.create", document.forms[0], handler_create); 159 161 } … … 203 205 attrs_array['first_name'] = first_name; 204 206 attrs_array['second_name'] = second_name; 205 var attributes = connector.serialize(attrs_array);207 var attributes = admin_connector.serialize(attrs_array); 206 208 207 209 var handler_generate_login = function(data) { … … 539 541 attrs_array['type'] = 'rename_user'; 540 542 attrs_array['uid'] = new_uid; 541 attributes = connector.serialize(attrs_array);543 attributes = admin_connector.serialize(attrs_array); 542 544 543 545 cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields); -
branches/2.2/expressoAdmin1_2/templates/default/accounts_form.tpl
r1991 r3018 98 98 <tr bgcolor={row_on}> 99 99 <td colspan="2">{lang_password_expired}:</td> 100 <td><input onc hange="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> 101 101 </tr> 102 102 103 103 <tr bgcolor={row_off}> 104 104 <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> 106 106 </tr> 107 107 108 108 <tr bgcolor={row_on}> 109 109 <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> 111 111 </tr> 112 112 113 113 <tr bgcolor={row_off}> 114 114 <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> 116 116 </tr> 117 117 {start_coment_expired} … … 158 158 <tr bgcolor={row_off}> 159 159 <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> 161 161 </tr> 162 162 … … 186 186 <tr bgcolor={row_off}> 187 187 <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> 189 189 </tr> 190 190 … … 386 386 <script type="text/javascript"> 387 387 tab.display(1); 388 // Note: The "change_password" field must be disabled and checked when the "passwd_expired" field will be enabled. 389 set_changepassword(); 388 390 </script> 389 391 -
branches/2.2/expressoMail1_2/inc/class.ScriptS.inc.php
r1352 r3018 62 62 if(!$aux){ 63 63 // 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; 65 66 } 66 67 // Mata a variavel; … … 71 72 if(!$aux){ 72 73 // 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; 74 76 } 75 77 else{ … … 84 86 $this->SieveS->close(); 85 87 86 if($this->rules) {88 if($this->rules) 87 89 return $this->rules; 88 }else{89 return $this->errstr;90 }91 90 92 91 } … … 99 98 100 99 $var_decode = rawurldecode($params['arfilter']); 100 $var_decode = preg_replace('/\n\./', '.', $var_decode); 101 101 102 102 $narray = explode("_end_",$var_decode); -
branches/2.2/expressoMail1_2/inc/class.SieveS.inc.php
r1149 r3018 178 178 179 179 //Verifica a conexao 180 if(! $this->socket){180 if(!is_resource($this->socket)){ 181 181 $this->errstr = "listscripts: sem conexão para o servidor $this->host"; 182 182 return false; … … 187 187 188 188 $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))) { 190 190 191 191 // Cyrus v1 script lines look like '"script*"' with the -
branches/2.2/expressoMail1_2/inc/class.db_functions.inc.php
r1992 r3018 1 1 <?php 2 define('PHPGW_INCLUDE_ROOT','../'); 3 define('PHPGW_API_INC','../phpgwapi/inc'); 4 include_once(PHPGW_API_INC.'/class.db.inc.php'); 2 if(!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 } 11 else{ 12 define('PHPGW_INCLUDE_ROOT','../'); 13 define('PHPGW_API_INC','../phpgwapi/inc'); 14 include_once(PHPGW_API_INC.'/class.db.inc.php'); 15 } 5 16 include_once('class.dynamic_contacts.inc.php'); 6 17 … … 214 225 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['number_of_contacts'] && 215 226 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) { 227 // Free others requests 228 session_write_close(); 216 229 $dynamic_contact = new dynamic_contacts(); 217 230 $dynamic = $dynamic_contact->dynamic_contact_toString(); … … 353 366 $calendar = $fileContent; 354 367 } 368 // It's necessary to access calendar method. 369 include_once(PHPGW_INCLUDE_ROOT.'/header.inc.php'); 355 370 356 371 $uiicalendar = CreateObject("calendar.uiicalendar"); -
branches/2.2/expressoMail1_2/inc/class.functions.inc.php
r1572 r3018 116 116 $h = ord($c{0}); 117 117 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 } 120 124 else if ($h <= 0xDF) { 121 125 $h = ($h & 0x1F) << 6 | (ord($c{1}) & 0x3F); -
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r1969 r3018 77 77 function get_range_msgs2($params) 78 78 { 79 // Free others requests 80 session_write_close(); 79 81 $folder = $params['folder']; 80 82 $msg_range_begin = $params['msg_range_begin']; … … 335 337 $head1 = explode(":",$head); 336 338 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 } 341 349 } 342 350 … … 474 482 $body = $return_get_body['body']; 475 483 //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); 478 486 479 487 if($return_get_body['body']=='isCripted'){ … … 492 500 } 493 501 494 $pattern = '/^[ \t]*Disposition-Notification-To (^:)*:(.+)*@(.+)*$/isUm';502 $pattern = '/^[ \t]*Disposition-Notification-To:[ ]*<?[[:alnum:]\._-]+@[[:alnum:]_-]+[\.[:alnum:]]+>?/sm'; 495 503 if (preg_match($pattern, $header_, $fields)) 496 504 { 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 } 499 508 } 500 509 … … 789 798 if(!$msg->structure[$msg_number]->parts) //Simple message, only 1 piece 790 799 { 791 792 793 794 800 if(strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime'){ 801 $return['body']='isCripted'; 802 return $return; 803 } 795 804 796 805 $attachment = array(); //No attachments 797 806 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( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $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 } 812 836 } 813 837 else … … 836 860 837 861 $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 } 843 872 844 873 if(($file_type == "text/plain" 845 874 || $file_type == "text/html") 846 && $file_type != 'attachment')875 && $file_type != 'attachment') 847 876 { 848 877 if($file_type == "text/plain" && !$show_only_html && $has_multipart) … … 850 879 // if TXT file size > 100kb, then it will not expand. 851 880 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>'; 853 883 } 854 884 } … … 860 890 } 861 891 } 862 else if($file_type == "message/delivery-status"){892 else if($file_type == "message/delivery-status" || $file_type == "message/feedback-report"){ 863 893 $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>'; 866 896 } 867 897 else if($file_type == "message/rfc822" || $file_type == "text/rfc822-headers"){ … … 870 900 $att = new imap_attachment(); 871 901 $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( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $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; 915 963 } 916 964 } … … 1151 1199 function replace_links( $body ) 1152 1200 { 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 = '/( |<|<|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|>|<)/im'; 1262 $replacement = '$1<a href="mailto:$2">$2</a>$3'; 1164 1263 $body = preg_replace( $pattern, $replacement, $body ); 1165 1264 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 ExpressoMail1172 $pattern = '/( |<|<|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|>|<)/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 1181 1265 return $body; 1182 1266 } … … 1184 1268 function get_signature($msg, $msg_number, $msg_folder) 1185 1269 { 1186 include_once( "../security/classes/CertificadoB.php");1270 include_once(dirname( __FILE__ ) ."/../../security/classes/CertificadoB.php"); 1187 1271 include_once("class.db_functions.inc.php"); 1188 1272 foreach ($msg->file_type[$msg_number] as $index => $file_type) … … 1557 1641 $this->delete_mailbox(array("del_past" => "INBOX/decifradas")); 1558 1642 } 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 1566 1644 1567 1645 $inbox = 'INBOX'; 1568 1646 $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(); 1572 1661 1573 1662 if (is_array($folders_list)) { … … 1593 1682 $result[$i]['folder_name'] = array_pop($tmp_folder_parent); 1594 1683 $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') { 1596 1685 //$this->ldap = new ldap_functions(); 1597 1686 if ($cn = $this->ldap->uid2cn($result[$i]['folder_name'])) { … … 1798 1887 return "The server denied your request to send a mail, you cannot use this mail address."; 1799 1888 } 1800 1801 //new_message_to backs to mailto: pattern1802 $params['body'] = eregi_replace("<a href=\"javascript:new_message_to\('([^>]+)'\)\">[^>]+</a>","<a href='mailto:\\1'>\\1</a>",$params['body']);1803 1889 1804 1890 $toaddress = implode(',',$db->getAddrs(explode(',',$params['input_to']))); … … 1997 2083 $mail->Certs_crypt = $aux_mails; 1998 2084 } 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 2048 2088 // Build Uploading Attachments!!! 2049 2089 if ((count($attachments)) && ($params['is_local_forward']!="1")) //Caso seja forward normal... … … 2080 2120 { 2081 2121 // Bug fixed for array_search function 2122 $name_cid_files = array(); 2082 2123 if(count($name_cid_files) > 0) { 2083 2124 $name_cid_files[count($name_cid_files)] = $name_cid_files[0]; … … 2142 2183 } 2143 2184 } 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) 2146 2252 { 2147 2253 $result = ""; … … 2512 2618 $mail->Body = $body; 2513 2619 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); 2572 2621 2573 2622 // Build Forwarding Attachments!!! … … 3159 3208 $criteria = 'BEFORE "'.$before_date.'"'; 3160 3209 $mbox_stream = $this->open_mbox('INBOX'.$this->imap_delimiter.$_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']); 3210 // Free others requests 3211 session_write_close(); 3161 3212 $messages = imap_search($mbox_stream, $criteria, SE_UID); 3162 3213 if (is_array($messages)){ … … 3201 3252 3202 3253 function search_msg($params = ''){ 3203 $retorno = "";3204 3254 $mbox_stream = ""; 3205 3255 if(strpos($params['condition'],"#")===false) { //local messages … … 3280 3330 foreach($search_criteria as $new_search) 3281 3331 { 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 3282 3338 if ($search_result_number != '65536' && $sum == $search_result_number) 3283 3339 { … … 3290 3346 $retorno .= $m_token; 3291 3347 $sum ++; 3292 } 3348 } 3349 */ 3293 3350 } 3294 3351 } … … 3300 3357 { 3301 3358 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) 3304 3366 { 3305 3367 return $retorno ? $sum . "=sumResults=" . $retorno : "none"; 3306 3368 } 3307 3369 $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++;*/ 3309 3371 } 3310 3372 } … … 3327 3389 } 3328 3390 3329 function get_msg ($uid_msg,$name_box, $mbox_stream )3391 function get_msg_detail($uid_msg,$name_box, $mbox_stream ) 3330 3392 { 3331 3393 $header = $this->get_header($uid_msg); 3332 include_once("class.imap_attachment.inc.php");3394 require_once("class.imap_attachment.inc.php"); 3333 3395 $imap_attachment = new imap_attachment(); 3334 3396 $attachments = $imap_attachment->get_attachment_headerinfo($mbox_stream, $uid_msg); … … 3347 3409 if($header->from[0]->personal != "") 3348 3410 $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; 3350 3416 return $ret_msg; 3351 3417 } 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 3362 3418 function ob_array($the_object) 3363 3419 { -
branches/2.2/expressoMail1_2/inc/class.message_components.inc.php
r1739 r3018 112 112 $skip_next = ($ftype == 'message/rfc822')? true : false; 113 113 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' ) ) 115 115 { 116 116 $n--; 117 117 } 118 118 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; 121 121 $this->file_type[$mid][$n] = $ftype; 122 122 $this->encoding[$mid][$n] = $encoding; -
branches/2.2/expressoMail1_2/inc/class.phpmailer.php
r1793 r3018 525 525 for($i = 0; $i < count($this->to); $i++) 526 526 { 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]; 535 529 } 536 530 for($i = 0; $i < count($this->cc); $i++) 537 531 { 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]; 546 534 } 547 535 for($i = 0; $i < count($this->bcc); $i++) 548 536 { 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]; 557 539 } 558 540 if($errorx != '') … … 728 710 } 729 711 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 dominio741 $term_dom = substr(strrchr ($email, '.'),1);742 //verifica se terminação do dominio esta correcta743 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 }757 712 758 713 /** -
branches/2.2/expressoMail1_2/inc/gotodownload.php
r1937 r3018 12 12 $msg_number = $_GET['msg_number']; 13 13 $idx_file = $_GET['idx_file']; 14 $newfilename = $_GET['newfilename'];14 $newfilename = urldecode($_GET['newfilename']); 15 15 $msg_part = $_GET['msg_part']; 16 16 $msg_folder = $_GET['msg_folder']; … … 171 171 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)) 172 172 { 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 } 175 199 } 176 else177 if (preg_match("#^".dirname( __FILE__ ) . '/../tmpLclAtt'."/source_#",$strFileName)) {178 readfile($strFileName);179 }180 }181 200 ?> -
branches/2.2/expressoMail1_2/inc/hook_home.inc.php
r1402 r3018 11 11 $current_app = 'expressoMail1_2'; 12 12 $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 } 15 17 $homedisplay = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail']; 16 18 if($homedisplay=='True') -
branches/2.2/expressoMail1_2/inc/show_embedded_attach.php
r1040 r3018 1 1 <?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'; 10 4 11 5 $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; -
branches/2.2/expressoMail1_2/inc/show_img.php
r1040 r3018 1 1 <?php 2 if(!isset($GLOBALS['phpgw_info'])){3 $GLOBALS['phpgw_info']['flags'] = array(4 'currentapp' => 'expressoMail1_2',5 'nonavbar' => true,6 'noheader' => true7 );8 }9 require_once '../../header.inc.php';10 2 3 require_once '../../header.session.inc.php'; 11 4 header("Content-Type: image/jpeg"); 12 5 if($_GET['msg_num'] && $_GET['msg_part'] && $_GET['msg_folder']) { -
branches/2.2/expressoMail1_2/inc/show_thumbs.php
r1040 r3018 1 1 <?php 2 if(!isset($GLOBALS['phpgw_info'])){3 $GLOBALS['phpgw_info']['flags'] = array(4 'currentapp' => 'expressoMail1_2',5 'nonavbar' => true,6 'noheader' => true7 );8 }9 require_once '../../header.inc.php';10 2 3 require_once '../../header.session.inc.php'; 11 4 $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; 12 5 $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; … … 31 24 $image_mail = imap_fetchbody($mb, $msg_num, $msg_part, FT_UID); 32 25 $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); 45 36 imagecopyresized($thumb, $pic, 0, 0, 0, 0,$twidth, $theight, $width, $height); # resize image into thumb 46 37 imagejpeg($thumb,"",75); # Thumbnail as JPEG 47 38 } 48 39 ?> -
branches/2.2/expressoMail1_2/inc/show_user_photo.php
r1495 r3018 1 1 <?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'; 10 4 11 5 -
branches/2.2/expressoMail1_2/index.php
r1735 r3018 62 62 63 63 $preferences = $GLOBALS['phpgw']->preferences->read(); 64 $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['enable_local_messages']; 64 65 $_SESSION['phpgw_info']['user']['preferences']['expressoMail'] = $preferences['expressoMail']; 65 66 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['voip_enabled'] = $voip_enabled; … … 163 164 include("inc/load_lang.php"); 164 165 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>"; 167 169 echo $obj -> getFilesJs("js/abas.js," . 168 170 "js/doiMenuData.js," . -
branches/2.2/expressoMail1_2/js/DropDownContacts.js
r804 r3018 81 81 for (var i=0; i<match_contacts.length; i++) 82 82 { 83 match_contacts[i] = unescape(match_contacts[i]); 83 84 var aux = match_contacts[i].split(""); 84 85 for(var j in aux){ -
branches/2.2/expressoMail1_2/js/TreeShow.js
r1558 r3018 147 147 148 148 var aux = ttree.FOLDER.split(cyrus_delimiter); 149 var delimExp = new RegExp(cyrus_delimiter,"g"); 150 newp = newp.replace(delimExp,'_'); 149 151 var newp2 = ""; 150 152 if( aux[0] == "root"){ -
branches/2.2/expressoMail1_2/js/abas.js
r1994 r3018 113 113 return alternate_border(id_value); 114 114 var ID = id_value; 115 openTab.imapBox[ID] = current_folder; 115 116 } 116 117 td = document.createElement("TD"); … … 124 125 125 126 td.setAttribute("align", "right"); 126 td.onclick = function(){alternate_border(ID); };127 td.onclick = function(){alternate_border(ID);resizeWindow()}; 127 128 td.setAttribute("noWrap","true"); 128 129 td.alt = borderTitle; … … 152 153 div.style.display=''; 153 154 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);160 155 div.style.overflow = "hidden"; 161 156 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 }170 157 Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 171 158 alternate_border(ID); … … 213 200 if (body) 214 201 { 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; 225 218 } 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 } 236 223 } 237 224 } … … 273 260 content = Element('content_id_' + ID); 274 261 content.parentNode.removeChild(content); 262 resizeWindow(); 275 263 return true; 276 264 } -
branches/2.2/expressoMail1_2/js/common_functions.js
r1899 r3018 35 35 function resizeWindow(){ 36 36 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 } 44 46 45 47 if(typeof(BordersArray) != 'undefined') { … … 48 50 var div = Element("content_id_"+BordersArray[i].sequence); 49 51 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 } 64 68 } 65 69 // END: FUNCTION RESIZE WINDOW … … 90 94 // Translate words and phrases using user language from eGroupware. 91 95 function get_lang(_key) { 96 if (typeof(_key) == 'undefined') 97 return false; 92 98 var key = _key.toLowerCase(); 93 99 if(array_lang[key]) … … 116 122 remove_className(tr_message, 'tr_msg_unread'); 117 123 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')+"'>"; 118 125 connector.purgeCache(); 119 126 return true; … … 131 138 remove_className(tr_message, 'selected_msg'); 132 139 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')+"'>"; 133 141 } 134 142 … … 215 223 } 216 224 if(new_file_name) 217 params = "&newfilename="+ new_file_name;225 params = "&newfilename="+escape(new_file_name); 218 226 if(encoding) 219 227 params += "&encoding="+encoding; … … 862 870 } 863 871 } 872 873 function 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 } 864 891 865 892 function validate_date(date){ -
branches/2.2/expressoMail1_2/js/connector.js
r1965 r3018 340 340 if ( typeof data == 'undefined' ) 341 341 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 } 342 358 if(debug_controller) { 343 359 document.getElementById("debug_controller").innerHTML += oxmlhttp.responseText; -
branches/2.2/expressoMail1_2/js/draw_api.js
r1969 r3018 436 436 } 437 437 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);439 438 } 440 439 } … … 726 725 var _divScroll = document.getElementById("divScrollMain_"+numBox); 727 726 728 var bar = document.getElementById("toolbar");729 var offset = 0;730 727 731 728 if(!_divScroll){ … … 742 739 _divScroll.style.width ="99.3%"; 743 740 } 744 // Inicio: Redimensiona DIV SCROLL745 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 SCROLL754 741 _divScroll.appendChild(table_element); 755 742 openTab.content_id[numBox].appendChild(_divScroll); … … 758 745 759 746 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"); 762 750 td_info.setAttribute("background", "#FFF"); 763 t d_info.setAttribute("id", "msg_info");751 tr_info.setAttribute("id", "msg_info"); 764 752 td_info.align = "center"; 753 td_info.style.padding = "25px"; 754 td_info.style.fontWeight = "bold"; 755 td_info.style.fontSize = "11pt"; 765 756 td_info.innerHTML = get_lang("This mail box is empty"); 757 tr_info.appendChild(td_info); 766 758 tbody_element.appendChild(td_info); 767 759 } … … 788 780 draw_footer_box(headers_msgs.num_msgs); 789 781 Element('main_table').style.display = ''; 782 if(is_ie6) // Stupid Fixing on IE6. 783 setTimeout("resizeWindow()",1); 784 else 785 resizeWindow(); 790 786 if(debug) { 791 787 var _eTime = new Date(); … … 954 950 _img_sent.src = "templates/"+template+"/images/sent.gif"; 955 951 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 956 964 td_element3 = document.createElement("TD"); 957 965 td_element3.className = "td_msg"; … … 964 972 if (typeof(headers_msgs.from) == 'undefined') 965 973 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 ) 967 975 { 968 976 td_element3.onmouseover = function () {this.title=headers_msgs.to.email;}; … … 970 978 td_element3.innerHTML += "<span style=\"color:red\">("+get_lang("Draft")+") </span>"; 971 979 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) 973 981 td_element24.innerHTML = "<img valign='center' src ='templates/"+template+"/images/sent.gif' title='"+get_lang('Sent')+"'>"; 974 982 … … 1048 1056 tr_element.appendChild(td_element22); 1049 1057 tr_element.appendChild(td_element23); 1050 tr_element.appendChild(td_element24); 1058 tr_element.appendChild(td_element24); 1059 tr_element.appendChild(td_element25); 1051 1060 tr_element.appendChild(td_element3); 1052 1061 tr_element.appendChild(td_element4); … … 1115 1124 function draw_message(info_msg, ID){ 1116 1125 var content = document.getElementById('content_id_' + ID); 1117 var defaultWidth = document.body.offsetWidth - 37;1118 1126 1119 1127 var menuHidden = Element("folderscol").style.display == 'none' ? true : false; 1120 if(!menuHidden)1121 defaultWidth -= Element("folderscol").offsetWidth;1122 1128 ////////////////////////////////////////////////////////////////////////////////////////////////////// 1123 1129 //Make the next/previous buttom. … … 1239 1245 var tbody_message = document.createElement("TBODY"); 1240 1246 table_message.border = "0"; 1241 table_message.width = defaultWidth ;1247 table_message.width = "100%"; 1242 1248 1243 1249 ////////////////////////////////////////////////////////////////////////////////////////////////////// … … 1268 1274 1269 1275 td.innerHTML = _name.bold() + ', ' + info_msg.smalldate; 1270 if (info_msg.attachments .length > 0)1276 if (info_msg.attachments && info_msg.attachments.length > 0) 1271 1277 td.innerHTML += " <img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='templates/"+template+"/images/clip.gif' title='"+info_msg.attachments.names+"'>"; 1272 1278 … … 1296 1302 option_hide_more.id = 'option_hide_more_'+ID; 1297 1303 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;1301 1304 if (this.value == 'more_options'){ 1302 1305 this.innerHTML = "<b><u>"+get_lang('Options')+"</u></b>"; 1303 1306 this.value = 'hide_options'; 1304 Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";1305 1307 Element('table_message_others_options_'+ID).style.display = ''; 1306 1308 Element('tr_other_options_'+ID).style.display = ''; … … 1310 1312 this.innerHTML = get_lang('Options'); 1311 1313 this.value = 'more_options'; 1312 Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px";1313 1314 Element('table_message_others_options_'+ID).style.display = 'none'; 1314 1315 Element('tr_other_options_'+ID).style.display = 'none'; 1315 1316 } 1317 resizeWindow(); 1316 1318 }; 1317 1319 var option_mark = document.createElement('TD'); … … 1510 1512 var table_message_others_options = document.createElement("TABLE"); 1511 1513 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%"; 1513 1515 table_message_others_options.style.display = 'none'; 1514 1516 table_message_others_options.className = "table_message"; … … 1619 1621 } 1620 1622 else { 1621 to.innerHTML += draw_plugin_cc(ID,toaddress_array[ID]); 1623 toAdd = toaddress_array[ID].toString().replace("<","<"); 1624 toAdd = toAdd.replace(">",">"); 1625 to.innerHTML += draw_plugin_cc(ID,toAdd); 1622 1626 } 1623 1627 to.className = "header_message_field"; … … 1747 1751 tr5.appendChild(subject); 1748 1752 tbody_message_others_options.appendChild(tr5); 1749 if ( info_msg.attachments.length > 0){1750 1753 if ( info_msg.attachments && info_msg.attachments.length > 0 ){ 1754 var tr6 = document.createElement("TR"); 1751 1755 tr6.className = "tr_message_header"; 1752 1756 var td6 = document.createElement("TD"); … … 1826 1830 1827 1831 1828 // BEGIN MAKE THE SCROLL HEIGHT1829 var bar = document.getElementById("toolbar");1830 var offset = 0;1831 if(bar.style.visibility != 'hidden')1832 offset = bar.offsetHeight ? bar.offsetHeight : bar.clientHeight;1833 1832 var div = document.createElement("DIV"); 1834 1833 div.id = "div_message_scroll_"+ID; 1835 1834 div.style.background = 'WHITE'; 1836 div.style.height = document.body.clientHeight - offset - 125;1837 content.style.height = document.body.clientHeight - offset - 90;1838 1835 div.style.overflow = "auto"; 1839 div.style.width = defaultWidth - (is_ie ? 5 : 0); 1840 // END MAKE THE SCROLL HEIGHT 1836 div.style.width = "100%"; 1841 1837 table_message_others_options.appendChild(tbody_message_others_options); 1842 1838 var tr = document.createElement("TR"); … … 1844 1840 td.colSpan = '2'; 1845 1841 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); 1847 1843 var newBody = info_msg.body; 1848 1844 if(!info_msg.showImg && imgTag) … … 1859 1855 for (var i = 0; i < domains.length; i++) 1860 1856 { 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 } 1861 1862 imgSource = imgTag[j].match(/=['"](http:\/\/)+[^'"\/]*/); 1862 1863 if (imgSource && imgSource.toString().substr(5).match(domains[i])) … … 1894 1895 newBody = newBody.replace("<body","<span"); 1895 1896 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 } 1897 1933 ////////////////////////////////////////////////////////////////////////////////////////////////////// 1898 1934 //Make the thumbs of the message. … … 1942 1978 table_message.appendChild(tbody_message); 1943 1979 content.appendChild(table_message); 1980 resizeWindow(); 1944 1981 var msg_number = document.createElement('INPUT'); 1945 1982 msg_number.id = "msg_number_" + ID; … … 2481 2518 tr5.appendChild(td_body); 2482 2519 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"); 2490 2521 _div.id = "div_message_scroll_"+ID; 2491 _div.style.height = document.body.clientHeight - _offset - 105;2492 content.style.height = document.body.clientHeight - _offset - 80;2493 2522 _div.style.overflow = "auto"; 2494 _div.style.width = defaultWidth; 2495 // END MAKE THE SCROLL HEIGHT 2523 _div.style.width = "100%"; 2496 2524 2497 2525 // Hide the contac tips and re-position the pallete color. … … 2512 2540 if(!expresso_offline) 2513 2541 draw_from_field(sel_from,tr1_1); 2542 resizeWindow(); 2514 2543 return ID; 2515 2544 } -
branches/2.2/expressoMail1_2/js/filter.js
r1546 r3018 11 11 function cfilter(){ 12 12 13 this.criticalError = false; 13 14 this.mode_in = ""; 14 15 this.rulest = new Array; … … 41 42 42 43 43 cfilter.prototype.load_rules = function( )44 cfilter.prototype.load_rules = function(posHandler, param) 44 45 { 45 46 var _this = this; 46 47 var cont1 = parseInt(0); 47 48 var cont2 = parseInt(0); 48 49 49 50 if( _this.rulest.length == 0 ) 50 51 { 51 52 var handler_sieve = function(data) 52 53 { 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{ 53 61 if(data.rule.length > 0){ 54 62 for(var i=0 ; i < data.rule.length; i++) … … 64 72 _this.out_officeR = _this.out_officeR ? trim(_this.out_officeR.toString().replace("\n","")) : ""; 65 73 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); 66 81 } 67 82 if(Element('form_status') != null) … … 381 396 this.reload_rules(); 382 397 } 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 399 cfilter.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 414 431 cfilter.prototype.e_newrule = function(nw_rule) 415 432 { … … 747 764 var args = "$this.ScriptS.rec_rules"; 748 765 var params = "arfilter="+aux_rul; 749 cExecute(args,h_filter,params); 766 if(!_this.criticalError) 767 cExecute(args,h_filter,params); 750 768 } 751 769 -
branches/2.2/expressoMail1_2/js/filters.js
r810 r3018 1 var rules_limit = 300 ;1 var rules_limit = 3000; 2 2 3 3 function cfilterSh(){ … … 67 67 68 68 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); 72 73 } 73 74 74 75 cfilterSh.prototype.list_rules = function(){ 75 if(filter.rulest.length == 0)76 setTimeout("filters.mount_list()",2500);77 else78 this.mount_list();76 if(filter.criticalError) 77 return false; 78 else 79 filters.mount_list(); 79 80 } 80 81 -
branches/2.2/expressoMail1_2/js/local_messages.js
r1982 r3018 119 119 120 120 local_messages.prototype.create_objects = function() { 121 if(this.dbGears == null) 121 if(window.google){ 122 if (this.dbGears == null) 122 123 this.dbGears = google.gears.factory.create('beta.database'); 123 124 if(this.localServer == null) … … 125 126 if(this.store == null) 126 127 this.store = this.localServer.createStore('test-store'); 128 } 127 129 } 128 130 -
branches/2.2/expressoMail1_2/js/main.js
r1989 r3018 59 59 cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences. 60 60 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); 61 62 62 63 } … … 320 321 321 322 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 } 324 327 else { 325 328 var border_id = create_border(msg_info.subject, id_msg_read); … … 393 396 if (box.childNodes.length == 0) 394 397 { 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"); 397 401 td_info.setAttribute("background", "#FFF"); 398 t d_info.setAttribute("id", "msg_info");402 tr_info.setAttribute("id", "msg_info"); 399 403 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); 401 409 box.appendChild(td_info); 402 410 } … … 410 418 var box = Element("tbody_box"); 411 419 table_element.appendChild(box); 412 420 if (data[0].msg_folder != current_folder) // Bad request 421 return false; 422 413 423 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 } 417 431 } 418 432 if (! typeof(data.msgs_to_delete) == 'undefined') … … 633 647 function move_msgs2(folder, msgs_number, border_ID, new_folder, new_folder_name,show_success_msg){ 634 648 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()); 637 650 if(openTab.type[currentTab] == 1) 638 651 return move_search_msgs('content_id_'+currentTab,new_folder,new_folder_name); … … 1334 1347 1335 1348 // IM Module Enabled 1336 if( window.parent.loadscript )1349 if( window.parent.loadscript && loadscript.autoStatusIM ) 1337 1350 { 1338 1351 config_events( body.contentWindow.document, "onkeypress", loadscript.autoStatusIM ); … … 1429 1442 1430 1443 function send_message_return(data, ID){ 1444 watch_changes_in_msg(ID); 1431 1445 1432 1446 var sign = false; … … 1702 1716 function return_save(data,border_id,folder_name,folder_id,message_id) 1703 1717 { 1718 Element("send_button_"+border_id).style.visibility="visible"; 1704 1719 var handler_delete_msg = function(data){ refresh(preferences.alert_new_msg); }; 1705 1720 … … 1839 1854 save_link.className = 'message_options_inactive'; 1840 1855 watch_changes_in_msg(border_id); 1841 Element("send_button_"+border_id).style.visibility="visible";1842 1856 write_msg(get_lang('Your message was save as draft in folder %1.', lang_folder(folder_name))); 1843 1857 } … … 1858 1872 sendButton.style.visibility="hidden"; 1859 1873 1860 if (openTab.imapBox[border_id] ) //Gets the imap folder1874 if (openTab.imapBox[border_id] && openTab.type[border_id] != 6 && openTab.type[border_id] != 7) //Gets the imap folder 1861 1875 var folder_id = openTab.imapBox[border_id]; 1862 1876 else … … 2159 2173 if(!verify_session(data)) 2160 2174 return; 2161 if (get_current_folder() == 'INBOX'+cyrus_delimiter+trashfolder){2162 draw_paging(0);2163 kill_current_box();2164 }2165 2175 tree_folders.getNodeById('INBOX'+cyrus_delimiter+trashfolder).alter({caption: get_lang("Trash")}); 2166 2176 tree_folders.getNodeById('INBOX'+cyrus_delimiter+trashfolder)._refresh(); 2167 2177 update_quota(get_current_folder()); 2168 if (data) 2178 if (data){ 2169 2179 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 } 2170 2187 else 2171 2188 write_msg(get_lang('ERROR emptying your Trash folder.')); … … 2386 2403 else{ 2387 2404 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)); 2389 2406 else { /* 2390 2407 * @author Rommel Cysne (rommel.cysne@serpro.gov.br) -
branches/2.2/expressoMail1_2/js/messages_proxy.js
r1969 r3018 90 90 91 91 messages_proxy.prototype.is_local_folder = function(folder) { 92 if( folder.indexOf("local_")==-1)92 if(typeof(folder) == "undefined" || folder.indexOf("local_")==-1) 93 93 return false; 94 94 return true; … … 179 179 messages_proxy.prototype.proxy_move_messages = function (folder, msgs_number, border_ID, new_folder, new_folder_name) { 180 180 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()); 183 182 if ((this.is_local_folder(folder)) && (this.is_local_folder(new_folder))) { //Move entre pastas não locais... 184 183 if (folder == new_folder){ -
branches/2.2/expressoMail1_2/js/search.js
r1969 r3018 203 203 ttree.make_tree(folders,"div_folders_search","_folders_tree_search","","","",""); 204 204 } 205 206 //This func returns the most recent date207 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 else236 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 else255 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 else276 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 else292 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 else301 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 }309 205 310 206 // Form resultado 311 207 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; 315 210 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 316 224 switch (sort_type) 317 225 { 318 226 case 'SORTDATE': 319 var_tmp.sort(date_comp);227 data.sort(date_comp); 320 228 break; 321 229 case 'SORTDATE_REVERSE': 322 var_tmp.sort(date_comp_reverse);230 data.sort(date_comp_reverse); 323 231 break; 324 232 case 'SORTBOX': 325 var_tmp.sort(box_comp);233 data.sort(box_comp); 326 234 break; 327 235 case 'SORTBOX_REVERSE': 328 var_tmp.sort(box_comp_reverse);236 data.sort(box_comp_reverse); 329 237 break; 330 238 case 'SORTSUBJECT': 331 var_tmp.sort(subject_comp);239 data.sort(subject_comp); 332 240 break; 333 241 case 'SORTSUBJECT_REVERSE': 334 var_tmp.sort(subject_comp_reverse);242 data.sort(subject_comp_reverse); 335 243 break; 336 244 case 'SORTWHO': 337 var_tmp.sort(who_comp);245 data.sort(who_comp); 338 246 break; 339 247 case 'SORTWHO_REVERSE': 340 var_tmp.sort(who_comp_reverse);248 data.sort(who_comp_reverse); 341 249 break; 342 250 case 'SORTSIZE': 343 var_tmp.sort(size_comp);251 data.sort(size_comp); 344 252 break; 345 253 case 'SORTSIZE_REVERSE': 346 var_tmp.sort(size_comp_reverse);254 data.sort(size_comp_reverse); 347 255 break; 348 256 default: … … 350 258 } 351 259 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) ){ 361 264 nw_array.length = preferences.search_result_number; 362 265 write_msg(get_lang("More than %1 results. Please, try to refine your search.",preferences.search_result_number)); … … 365 268 write_msg(nw_array.length + " "+ get_lang('results found')); 366 269 } 270 */ 367 271 368 272 numBox++; … … 386 290 tbody.id = "tbody_box_" + numBox; 387 291 388 for( var i=0; i < nw_array.length; i++){292 for( var i=0; i < data.length; i++){ 389 293 var tr = document.createElement("TR"); 390 294 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; 412 299 tr.id = uid_msg+"_s"+global_search; 413 300 … … 416 303 tr.name = mailbox; 417 304 418 if (aux [5].match("U"))305 if (aux.flag.match("U")) 419 306 add_className(tr,'tr_msg_unread'); 420 307 add_className(tr, i%2 != 0 ? 'tr_msg_read2' : 'tr_msg_read'); … … 432 319 { 433 320 td.style.width = "2%"; 434 if (aux [5].match('T'))321 if (aux.flag.match('T')) 435 322 { 436 attachNum = parseInt(aux [5].substr(aux[5].indexOf('T')+1));323 attachNum = parseInt(aux.flag.substr(aux.flag.indexOf('T')+1)); 437 324 td1 = "<img src='templates/"+template+"/images/clip.gif' title='"+attachNum +' '+ get_lang('attachment(s)')+"'>"; 438 325 } … … 444 331 td.style.width = "1%"; 445 332 td.id = "td_message_answered_"+uid_msg; 446 if (aux [5].match('X'))333 if (aux.flag.match('X')) 447 334 td1 = '<img src=templates/'+template+'/images/forwarded.gif title=Forwarded>'; 448 335 else 449 if (aux [5].match('A'))336 if (aux.flag.match('A')) 450 337 td1 = '<img src=templates/'+template+'/images/answered.gif>'; 451 338 else … … 456 343 td.style.width = "1%"; 457 344 td.id = "td_message_important_"+uid_msg; 458 if (aux [5].match("F"))345 if (aux.flag.match("F")) 459 346 { 460 347 add_className(tr, 'flagged_msg'); … … 474 361 td.style.width = "14%"; 475 362 td.onclick = _onclick; 476 var nm_box = aux [0].split(cyrus_delimiter);363 var nm_box = aux.boxname.split(cyrus_delimiter); 477 364 var td1 = nm_box.pop(); 478 365 td.setAttribute("NoWrap","true"); … … 493 380 if( j == 6) 494 381 { 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) + "..."; 497 384 td.style.width = "20%"; 498 385 td.onclick = _onclick; 499 386 td.setAttribute("NoWrap","true"); 500 387 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>"; 502 389 } 503 390 if( j == 7) … … 505 392 var subject_encode = url_encode(subject); 506 393 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) + "..."; 510 397 td.style.width = "35%"; 511 398 td.onclick = _onclick; 512 399 td.setAttribute("NoWrap","true"); 513 400 td.style.overflow = "hidden"; 514 var td1 = aux [2];401 var td1 = aux.subject; 515 402 516 403 } … … 520 407 td.align = "center"; 521 408 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(); 523 411 } 524 412 if( j == 9) … … 527 415 td.align = "center"; 528 416 td.onclick = _onclick; 529 var td1 = aux[4];417 var td1 = borkb(aux.size); 530 418 } 531 419 if (j == 10) 532 420 { 533 if (aux [5].match("U"))421 if (aux.flag.match("U")) 534 422 add_className(tr, 'tr_msg_unread'); 535 if (aux [5].match("F"))423 if (aux.flag.match("F")) 536 424 add_className(tr, 'flagged_msg'); 537 425 var td1 = ''; … … 550 438 551 439 var content_search = Element('content_id_search_' + numBox); 552 // BEGIN MAKE THE SCROLL HEIGHT553 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;561 440 var div_scroll_result = document.createElement("DIV"); 562 441 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;565 442 div_scroll_result.style.overflow = "auto"; 566 div_scroll_result.style.width = defaultWidth - (is_ie ? 7 : 0);567 // END MAKE THE SCROLL HEIGHT568 569 443 570 444 if(is_ie) … … 711 585 content_search.appendChild(div_scroll_result); 712 586 } 587 resizeWindow(); 713 588 } 714 589 … … 923 798 var handler = function(data){ 924 799 var tmp; 925 var countTmp= new Array();926 800 927 801 var dataTemp = data.split('=sumResults='); … … 934 808 if (tmp!=false) { 935 809 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 949 818 if ((sumResults == "none") && (countTmp.length==0)){ 950 819 alert(get_lang("None result was found.")); … … 953 822 { 954 823 EsearchE.mount_result((sumResults=='none')?tmp:(countTmp.length==0)?data:data+tmp); 955 } 824 }*/ 956 825 957 826 } -
branches/2.2/expressoMail1_2/templates/classic/index.tpl
r1151 r3018 27 27 </tbody> 28 28 </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"> 31 30 <input type="text" id="em_message_search" size="16" maxlength="22" onfocus="javascript:onFocusQuickSearchEmail(this); return false;"/> 32 31 <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)"> … … 71 70 <tbody id="border_tbody"> 72 71 <tr id="border_tr"> 73 <td nowrap class="menu" onClick="alternate_border(0); " id="border_id_0"> {lang_inbox} <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"> {lang_inbox} <font face="Verdana" size="1" color="#505050">[<span id="new_m">0</span> / <span id="tot_m">0</span>]</font> 74 73 </td> 75 74 <td nowrap id="border_blank" class="last_menu" width="100%"> </td> -
branches/2.2/expressoMail1_2/templates/classic/main.css
r1570 r3018 115 115 } 116 116 117 .menu-sel118 {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 .menu136 {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_menu156 {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 176 117 .table_message{ 177 118 background-color: #CCCCCC; … … 374 315 } 375 316 317 .message_options_active, 318 .message_options_over, 376 319 .message_options { 377 320 cursor: pointer; 378 color: blue;379 321 white-space: nowrap; 380 /*padding:0 1.8;*/381 322 } 382 323 .message_options_trash, … … 392 333 } 393 334 394 .message_options_active {395 white-space: nowrap;396 color: blue;397 cursor: pointer;398 }399 400 335 .message_options_over { 401 cursor: pointer;402 color: blue;403 white-space: nowrap;404 336 font-weight: bold; 405 337 text-decoration: underline; … … 478 410 font-weight: bold !important; 479 411 font-size: 10px !important; 480 color: #666 !important;481 412 text-decoration: none !important; 482 413 font-family: sans-serif !important; -
branches/2.2/expressoMail1_2/templates/default/config.tpl
r1466 r3018 1 1 <!-- BEGIN header --> 2 <form method="POST" action="{action_url}"> 2 <script type="text/javascript"> 3 function 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}" /> 3 19 <table border="0" align="center"> 4 20 <tr bgcolor="{th_bg}"> … … 75 91 <td>{lang_Max_attachment_size}</td> 76 92 <td> 77 <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}"> Mb 93 <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}"> 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}" /> 78 95 </td> 79 96 </tr> -
branches/2.2/expressoMail1_2/templates/default/index.tpl
r1588 r3018 11 11 <tbody> 12 12 <tr> 13 <td id="folderscol" width="1 62px" 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"> 15 15 <tbody> 16 16 <tr> 17 17 <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%"> 19 19 <tbody> 20 20 <tr> … … 59 59 <tr> 60 60 <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> 62 62 </td> 63 63 </tr> … … 97 97 <tbody id="border_tbody"> 98 98 <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"> 100 100 {lang_inbox} <font face="Verdana" size="1" color="#505050">[ 101 101 <span id="new_m">0</span> / -
branches/2.2/header.session.inc.php
r1464 r3018 1 1 <?php 2 session_id( $_COOKIE[ 'sessionid' ] ); 3 session_ start( );2 if ( isset( $_COOKIE[ 'sessionid' ] ) ) 3 session_id( $_COOKIE[ 'sessionid' ] ); 4 4 5 $sess = $_SESSION[ 'phpgw_session' ]; 6 $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199); 5 session_start( ); 7 6 7 $sess = $_SESSION[ 'phpgw_session' ]; 8 $invalidSession = false; 9 $user_agent = array(); 10 if (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 } 21 if($_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 } 35 if (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 } 8 42 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 } 51 else{ 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 } 16 57 ?> -
branches/2.2/logout.php
r2 r3018 20 20 'nonavbar' => True 21 21 ); 22 include( './header.inc.php');22 include(dirname( __FILE__ ).'/header.inc.php'); 23 23 24 24 $GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE')); -
branches/2.2/phpgwapi/inc/class.common.inc.php
r1576 r3018 1264 1264 $tpl->set_var('app_css', $app_css); 1265 1265 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 1291 1306 } 1292 1307 -
branches/2.2/phpgwapi/inc/class.sessions.inc.php
r1464 r3018 343 343 } 344 344 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 376 346 $GLOBALS['phpgw']->acl->acl($this->account_id); 377 347 $GLOBALS['phpgw']->accounts->accounts($this->account_id); … … 408 378 function getuser_ip() 409 379 { 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']; 430 381 } 431 382 -
branches/2.2/phpgwapi/inc/class.sessions_php4.inc.php
r2 r3018 125 125 else 126 126 { 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); 133 131 } 134 132 } … … 199 197 function list_sessions($start,$order,$sort,$all_no_sort = False) 200 198 { 201 //echo "<p>session_php4::list_sessions($start,'$order','$sort',$all)</p>\n";202 $session_cache = $this->appsession('php4_session_cache','phpgwapi');203 199 204 200 $values = array(); … … 211 207 while ($file = readdir($dir)) 212 208 { 213 if (substr($file,0,5) != 'sess_' )209 if (substr($file,0,5) != 'sess_' || !is_readable($path. '/' . $file)) 214 210 { 215 211 continue; 216 212 } 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)); 259 220 $values[$session['session_id']] = $session; 260 221 } … … 280 241 reset($values); 281 242 } 282 $this->appsession('php4_session_cache','phpgwapi',$session_cache);283 243 284 244 return $values; -
branches/2.2/phpgwapi/inc/class.setup.inc.php
r1322 r3018 863 863 } 864 864 /* 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__); 867 867 while($this->db->next_record()) 868 868 { -
branches/2.2/phpgwapi/inc/functions.inc.php
r1463 r3018 29 29 30 30 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 39 32 include(PHPGW_API_INC.'/common_functions.inc.php'); 40 33 … … 378 371 reset($GLOBALS['phpgw_info']['flags']); 379 372 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 380 384 /*************************************************************************\ 381 385 * These lines load up the templates class * … … 390 394 } 391 395 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 else402 {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 else414 {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 else430 {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);439 396 440 397 /*************************************************************************\ … … 488 445 } 489 446 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 352 352 .dsused 353 353 { 354 354 background-image: url(../../../../expressoMail1_2/templates/default/images/dsused_classic.gif) !important; 355 355 } 356 356 #fmLocation … … 413 413 background-color:white; 414 414 } 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 478 table.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; 640 background-color:#FFFFFF !important; 641 border-bottom:1px solid #CFCFCF !important; 642 color:black !important; 643 } -
branches/2.2/phpgwapi/templates/classic/head.tpl
r1151 r3018 13 13 <link rel="icon" href="{img_icon}" type="image/x-ico" /> 14 14 <link rel="shortcut icon" href="{img_shortcut}" /> 15 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/>16 15 <META http-equiv="Default-Style" content="eGroupWareStyle"> 17 16 {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; 1 body 2 { 3 background-color: #e9e9e9; 4 } 5 6 a:link, 7 a:visited 8 { 9 color: #000066; 10 } 11 12 a:hover, 13 a:active 14 { 15 color: #ff9933; 16 } 17 18 a.divSideboxEntry, 19 .divSideboxEntry 20 { 21 background-color: #eee; 22 } 23 24 a.appTitles, 25 .appTitles 26 { 27 padding: 2px 2px; 28 } 29 30 a.textSidebox 31 { 32 border-top-color: #aaa; 33 } 34 35 input, 36 button 37 { 38 border-color: #bbb; 39 color: #069; 69 40 } 70 41 71 42 input[type=image] 72 43 { 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 47 select 48 { 49 border-color: #bbb; 50 color: #006; 51 } 52 53 #divAppbox 54 { 55 background: #e6f3d9; 56 border-color: #9c9c9c; 285 57 } 286 58 287 59 #divAppboxHeader 288 60 { 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; 293 64 font-size: 14px; 294 65 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 231 table.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 { 296 280 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; 371 283 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 438 438 } 439 439 440 table.inboxElements th, 441 .table_elements_tr_header, 442 .info_tr_header, 440 443 .message_header{ 441 444 background-color: #CCCCCC !important; … … 475 478 color:#0000FF !important; 476 479 height: 20px !important; 477 width:220px !important;478 480 background-color: #F7F7F7 !important; 479 481 margin-bottom: 0px !important; … … 493 495 color: #505050 !important; 494 496 height: 20px !important; 495 width:220px !important;496 497 background-color:#E5E5E5 !important; 497 498 margin-bottom: 0px !important; … … 601 602 background-image: none !important; 602 603 } 604 605 .linha0, 603 606 .tr_msg_read2, 604 607 .tr_msg_read { -
branches/2.2/phpgwapi/templates/default/css/comics.css
r1195 r3018 486 486 } 487 487 488 table.inboxElements th, 489 .table_elements_tr_header, 490 .info_tr_header, 488 491 .message_header 489 492 { … … 505 508 { 506 509 -moz-border-radius-topleft:5px !important; 507 508 509 510