Changeset 1247
- Timestamp:
- 08/03/09 10:09:55 (15 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/controller.php
r1246 r1247 7 7 ); 8 8 } 9 require_once '../header. inc.php';9 require_once '../header.session.inc.php'; 10 10 11 11 // Explode action from cExecuteForm function -
trunk/expressoMail1_2/inc/class.exporteml.inc.php
r1246 r1247 75 75 $file = $subject."_".$i.".eml"; 76 76 } else{ 77 $file = "email_".$ GLOBALS['phpgw']->session->sessionid.".eml";77 $file = "email_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".eml"; 78 78 } 79 79 } … … 90 90 91 91 function createFileZip($files, $tempDir){ 92 $tmp_zip_filename = "email_".$ GLOBALS['phpgw']->session->sessionid.".zip";92 $tmp_zip_filename = "email_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".zip"; 93 93 $command = "cd " . escapeshellarg($tempDir) . " && nice zip -m9 " . escapeshellarg($tmp_zip_filename) . " " . escapeshellcmd($files); 94 94 if(!exec($command)) { … … 235 235 $body = $this-> getBody($id_number); 236 236 237 $file = "source_".$ GLOBALS['phpgw']->session->sessionid.".txt";237 $file = "source_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".txt"; 238 238 $f = fopen($tempDir.'/'.$file,"w"); 239 239 fputs($f,$header ."\r\n\r\n". $body); … … 273 273 $body = $this-> getBody($id_msg); 274 274 275 $file = "source_".$ GLOBALS['phpgw']->session->sessionid.".php";275 $file = "source_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".php"; 276 276 $f = fopen($tempDir.'/'.$file,"w"); 277 277 fputs($f,$phpheader.$header ."\r\n\r\n". $body); -
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1246 r1247 60 60 // This error is returned from Postfix. 61 61 elseif(strstr($error,'message file too big')) { 62 return str_replace("%1", $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']."M",$this->functions->getLang('The size of this message has exceeded the limit (%1B).'));62 return str_replace("%1", ini_get('upload_max_filesize'),$this->functions->getLang('The size of this message has exceeded the limit (%1B).')); 63 63 } 64 64 elseif(strstr($error,'virus')) { … … 210 210 return $this->htmlspecialchars_encode($string); 211 211 } 212 213 212 /** 214 213 * Função que importa arquivos .eml exportados pelo expresso para a caixa do usuário. Testado apenas … … 1630 1629 $body = $params['body']; 1631 1630 } 1631 //echo "<script language=\"javascript\">javascript:alert('".$body."');</script>"; 1632 1632 $attachments = $params['FILES']; 1633 1633 $forwarding_attachments = $params['forwarding_attachments']; … … 1803 1803 } 1804 1804 $tempDir = ini_get("session.save_path"); 1805 $file = "cidimage_".$ GLOBALS['phpgw']->session->sessionid.".dat";1805 $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat"; 1806 1806 $f = fopen($tempDir.'/'.$file,"w"); 1807 1807 fputs($f,$fileContent); … … 1818 1818 { 1819 1819 $total_uploaded_size = 0; 1820 $upload_max_filesize = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'];1820 $upload_max_filesize = str_replace("M","",ini_get('upload_max_filesize')) * 1024 * 1024; 1821 1821 foreach ($attachments as $attach) 1822 1822 { … … 1824 1824 $total_uploaded_size = $total_uploaded_size + $attach['size']; 1825 1825 } 1826 if( $total_uploaded_size > $upload_max_filesize) 1826 if( $total_uploaded_size > $upload_max_filesize) 1827 1827 return $this->parse_error("message file too big"); 1828 1828 } … … 2315 2315 } 2316 2316 $tempDir = ini_get("session.save_path"); 2317 $file = "cidimage_".$ GLOBALS['phpgw']->session->sessionid.".dat";2317 $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat"; 2318 2318 $f = fopen($tempDir.'/'.$file,"w"); 2319 2319 fputs($f,$fileContent); … … 2366 2366 case 3: $image_big = imagecreatefrompng($attach['tmp_name']); break; 2367 2367 case 6: 2368 include_once("gd_functions.php");2368 require_once("gd_functions.php"); 2369 2369 $image_big = imagecreatefrombmp($attach['tmp_name']); break; 2370 2370 default: … … 2390 2390 imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height); 2391 2391 $tmpDir = ini_get("session.save_path"); 2392 $_file = "cidimage_".$ GLOBALS['phpgw']->session->sessionid.".dat";2392 $_file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".dat"; 2393 2393 imagejpeg($image_new,$tmpDir.$_file, 85); 2394 2394 $mail->AddAttachment($tmpDir.$_file, $attach['name'], "base64", $this->get_file_type($tmpDir.$_file)); … … 3263 3263 if($timestamp){ 3264 3264 $tempDir = ini_get("session.save_path"); 3265 $file = $tempDir."imap_".$ GLOBALS['phpgw']->session->sessionid;3265 $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 3266 3266 $f = fopen($file,"w"); 3267 3267 fputs($f,base64_encode($source)); -
trunk/expressoMail1_2/inc/class.phpmailer.php
r1246 r1247 626 626 if($pos_MIME_Version >= $pos_content_type) 627 627 { 628 628 // nao deve enviar a msg..... O header MIME-Version com posicao invalida ...... 629 629 $this->SetError('Formato dos headers da msg estao invalidos.(CD-17) - A'); 630 630 $this->smtp->Reset(); … … 670 670 } 671 671 else 672 {673 $smtpSent = $this->smtp->Data($header . $body);674 }672 { 673 $smtpSent = $this->smtp->Data($header . $body); 674 } 675 675 676 676 if(!$smtpSent) 677 677 { 678 678 $this->SetError($this->Lang("data_not_accepted") .' '. $this->smtp->error['error'] .','. $this->smtp->error['smtp_code'].','. $this->smtp->error['smtp_msg']); 679 679 $this->smtp->Reset(); 680 680 return false; 681 681 } 682 682 if($this->SMTPKeepAlive == true) 683 683 $this->smtp->Reset(); -
trunk/expressoMail1_2/inc/gotodownload.php
r1246 r1247 167 167 } 168 168 else 169 if (preg_match("#^".ini_get('session.save_path')."/[A-z]+_".$GLOBALS['phpgw']->session->sessionid." (\.[A-z]{3,4})?$#",$strFileName))169 if (preg_match("#^".ini_get('session.save_path')."/[A-z]+_".$GLOBALS['phpgw']->session->sessionid."[A-z0-9]*(\.[A-z]{3,4})?$#",$strFileName)) 170 170 { 171 171 readfile($strFileName); -
trunk/expressoMail1_2/index.php
r1246 r1247 78 78 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ? $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10"; 79 79 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0"; 80 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size'] = $current_config['expressoMail_Max_attachment_size'] ? $current_config['expressoMail_Max_attachment_size'] : ini_get('upload_max_filesize');81 80 82 81 $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); -
trunk/expressoMail1_2/js/abas.js
r1246 r1247 121 121 td.onclick = function(){alternate_border(ID);}; 122 122 td.setAttribute("noWrap","true"); 123 123 td.alt = borderTitle; 124 td.title = borderTitle; 124 125 borderTitle = borderTitle ? borderTitle : id_value ? get_lang("No Subject") : " " ; 125 126 td.value = borderTitle; 126 td.alt = borderTitle;127 td.title = borderTitle;128 127 if (borderTitle.length > 21) 129 128 borderTitle = borderTitle.substring(0,21) + "..."; -
trunk/expressoMail1_2/js/connector.js
r1246 r1247 620 620 divUpload.innerHTML= "<iframe onload=\"cExecute('$this.functions.getReturnExecuteForm',"+handler+");\" style='display:"+(debug_controller ? "" : "none")+";width:"+(debug_controller ? 400 : 0)+";height:"+(debug_controller ? 400 : 0)+";' name='uploadFile'></iframe>"; 621 621 form.action ="controller.php"; 622 form.target ="uploadFile"; 622 form.target ="uploadFile"; 623 623 form.submit(); 624 624 } -
trunk/expressoMail1_2/js/draw_api.js
r1246 r1247 408 408 span_paging = document.createElement("DIV"); 409 409 span_paging.id = "span_paging"; 410 span_paging.className = "boxHeaderText"; 410 411 span_paging.align="right"; 411 412 document.getElementById("div_menu_c3").appendChild(span_paging); … … 867 868 } 868 869 else{ 869 td_element3.onmouseover = function (event) {try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};};870 td_element3.onmouseout = function (){ try {clearTimeout(InfoContact.timeout);} catch(e){}};871 870 if (headers_msgs.Draft == 'X'){ 872 871 td_element3.innerHTML = "<span style=\"color:red\">("+get_lang("Draft")+") </span>"; 873 872 } 874 else{ 875 if (headers_msgs.from.name != null)876 td_element3.innerHTML += headers_msgs.from.name;877 else878 td_element3.innerHTML +=headers_msgs.from.email;879 }880 }881 if (td_element3.innerHTML.indexOf(" ") == '-1' && td_element3.innerHTML.length > 25){882 td_element3.innerHTML = td_element3.innerHTML.substring(0,25) + "...";883 }884 else if (td_element3.innerHTML.length > 40 ){885 td_element3.innerHTML = td_element3.innerHTML.substring(0,40) + "...";886 }887 873 else{ 874 var spanSender = document.createElement("SPAN"); 875 spanSender.onmouseover = function (event) {this.style.textDecoration = "underline";try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};}; 876 spanSender.onmouseout = function (){ try {this.style.textDecoration = "none"; clearTimeout(InfoContact.timeout);} catch(e){}}; 877 spanSender.innerHTML = headers_msgs.from.name != null ? headers_msgs.from.name : headers_msgs.from.email; 878 if (spanSender.innerHTML.indexOf(" ") == '-1' && spanSender.innerHTML.length > 25){ 879 spanSender.innerHTML = spanSender.innerHTML.substring(0,25) + "..."; 880 } 881 else if (spanSender.innerHTML.length > 40 ){ 882 spanSender.innerHTML = spanSender.innerHTML.substring(0,40) + "..."; 883 } 884 td_element3.appendChild(spanSender); 885 } 886 } 888 887 td_element4 = document.createElement("TD"); 889 888 td_element4.className = "td_msg"; … … 2520 2519 td11.align="center"; 2521 2520 td11.setAttribute("noWrap","true"); 2522 td11.innerHTML += ' ' + value+"% ("+q_used+"M/"+q_limit+"M)";2521 td11.innerHTML += ' <span class="boxHeaderText">' + value+"% ("+q_used+"M/"+q_limit+"M)</span>"; 2523 2522 //tr1.appendChild(td11); 2524 2523 -
trunk/expressoMail1_2/js/main.js
r1246 r1247 1567 1567 return; 1568 1568 } 1569 1569 1570 if (expresso_offline) { 1570 1571 stringEmail = Element("to_"+ID).value; … … 2212 2213 document.form_import.appendChild(folder); 2213 2214 write_msg(get_lang('You must wait while the messages will be imported...')); 2214 2215 2215 2216 cExecuteForm('$this.imap_functions.import_msgs', document.form_import, handler); 2216 2217 } … … 2253 2254 //Begin: Verify if the file extension is allowed. 2254 2255 var imgExtensions = new Array("eml","zip"); 2255 var inputFile = document.form_import.file_1; 2256 var inputFile = document.form_import.file_1; 2256 2257 if(!inputFile.value){ 2257 2258 alert(get_lang('File extension forbidden or invalid file') + '.'); -
trunk/expressoMail1_2/setup/setup.inc.php
r1246 r1247 37 37 $setup_info['expressoMail1_2']['depends'][] = array( 38 38 'appname' => 'phpgwapi', 39 'versions' => Array('0.9.14','0.9.15',' 1.0.0')39 'versions' => Array('0.9.14','0.9.15','2.0.0') 40 40 ); 41 41 ?> -
trunk/expressoMail1_2/setup/tables_update.inc.php
r1246 r1247 9 9 * option) any later version. * 10 10 \**************************************************************************/ 11 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.234'){ 12 $test[] = '1.234'; 13 function expressoMail1_2_upgrade1_234() { 14 $oProc = $GLOBALS['phpgw_setup']->oProc; 15 $oProc->CreateTable('phpgw_certificados',array( 16 'fd' => array( 17 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 18 'chave_publica' => array( 'type' => 'text'), 19 'expirado' => array('type' => 'bool', 'default' => 'false'), 20 'revogado' => array('type' => 'bool', 'default' => 'false'), 21 'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false), 22 'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false), 23 ), 24 'pk' => array('email','serialnumber','authoritykeyidentifier'), 25 'fk' => array(), 26 'ix' => array(), 27 'uc' => array() 28 ) 29 ); 30 31 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235'; 32 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 33 } 34 } 35 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.233'){ 36 $test[] = '1.233'; 37 function expressoMail1_2_upgrade1_233() { 38 $setup_info['expressoMail1_2']['currentver'] = '1.234'; 39 return $setup_info['expressoMail1_2']['currentver']; 40 } 41 } 42 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.232'){ 43 $test[] = '1.232'; 44 function expressoMail1_2_upgrade1_232() { 45 $setup_info['expressoMail1_2']['currentver'] = '1.233'; 46 return $setup_info['expressoMail1_2']['currentver']; 47 } 48 } 49 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.231'){ 50 $test[] = '1.231'; 51 function expressoMail1_2_upgrade1_231() { 52 $setup_info['expressoMail1_2']['currentver'] = '1.232'; 53 return $setup_info['expressoMail1_2']['currentver']; 54 } 11 $test[] = '1.2031'; 12 function expressoMail1_2_upgrade1_2031() { 13 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2201'; 14 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 55 15 } 56 16 17 $test[] = '1.2201'; 18 function expressoMail1_2_upgrade1_2201() { 19 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.2211'; 20 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 21 } 22 23 $test[] = '1.2211'; 24 function expressoMail1_2_upgrade1_2211() { 25 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.222'; 26 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 27 } 28 29 $test[] = '1.222'; 30 function expressoMail1_2_upgrade1_222() { 31 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.230'; 32 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 33 } 34 35 $test[] = '1.230'; 57 36 function expressoMail1_2_upgrade1_230() { 58 37 $oProc = $GLOBALS['phpgw_setup']->oProc; … … 70 49 return $setup_info['expressoMail1_2']['currentver']; 71 50 } 72 73 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.230'){ 74 $test[] = '1.230'; 75 return expressoMail1_2_upgrade1_230(); 76 } 77 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.222'){ 78 $test[] = '1.222'; 79 function expressoMail1_2_upgrade1_222() { 80 $oProc = $GLOBALS['phpgw_setup']->oProc; 81 $oProc->CreateTable('phpgw_expressomail_contacts',array( 82 'fd' => array( 83 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 84 'data' => array( 'type' => 'text') 85 ), 86 'pk' => array('id_owner'), 87 'fk' => array(), 88 'ix' => array(), 89 'uc' => array() 90 ) 91 ); 92 $oProc->CreateTable('phpgw_certificados',array( 93 'fd' => array( 94 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 95 'chave_publica' => array( 'type' => 'text'), 96 'expirado' => array('type' => 'bool', 'default' => 'false') 97 ), 98 'pk' => array('email'), 99 'fk' => array(), 100 'ix' => array(), 101 'uc' => array() 102 ) 103 ); 104 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 105 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 106 } 107 } 108 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2211'){ 109 $test[] = '1.2211'; 110 function expressoMail1_2_upgrade1_2211() { 111 $oProc = $GLOBALS['phpgw_setup']->oProc; 112 $oProc->CreateTable('phpgw_expressomail_contacts',array( 113 'fd' => array( 114 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 115 'data' => array( 'type' => 'text') 116 ), 117 'pk' => array('id_owner'), 118 'fk' => array(), 119 'ix' => array(), 120 'uc' => array() 121 ) 122 ); 123 $oProc->CreateTable('phpgw_certificados',array( 124 'fd' => array( 125 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 126 'chave_publica' => array( 'type' => 'text'), 127 'expirado' => array('type' => 'bool', 'default' => 'false') 128 ), 129 'pk' => array('email'), 130 'fk' => array(), 131 'ix' => array(), 132 'uc' => array() 133 ) 134 ); 135 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 136 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 137 } 138 } 139 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2201'){ 140 $test[] = '1.2201'; 141 function expressoMail1_2_upgrade1_2201() {return expressoMail1_2_upgrade1_230();} 51 $test[] = '1.231'; 52 function expressoMail1_2_upgrade1_231() { 53 $setup_info['expressoMail1_2']['currentver'] = '1.232'; 54 return $setup_info['expressoMail1_2']['currentver']; 142 55 } 143 56 144 if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2031'){ 145 $test[] = '1.2031'; 146 function expressoMail1_2_upgrade1_2031() { 147 $oProc = $GLOBALS['phpgw_setup']->oProc; 148 $oProc->CreateTable('phpgw_expressomail_contacts',array( 149 'fd' => array( 150 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 151 'data' => array( 'type' => 'text') 152 ), 153 'pk' => array('id_owner'), 154 'fk' => array(), 155 'ix' => array(), 156 'uc' => array() 157 ) 158 ); 159 $oProc->CreateTable('phpgw_certificados',array( 160 'fd' => array( 161 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 162 'chave_publica' => array( 'type' => 'text'), 163 'expirado' => array('type' => 'bool', 'default' => 'false') 164 ), 165 'pk' => array('email'), 166 'fk' => array(), 167 'ix' => array(), 168 'uc' => array() 169 ) 170 ); 171 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223'; 172 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 173 } 57 $test[] = '1.232'; 58 function expressoMail1_2_upgrade1_232() { 59 $setup_info['expressoMail1_2']['currentver'] = '1.233'; 60 return $setup_info['expressoMail1_2']['currentver']; 61 } 62 63 $test[] = '1.233'; 64 function expressoMail1_2_upgrade1_233() { 65 $setup_info['expressoMail1_2']['currentver'] = '1.234'; 66 return $setup_info['expressoMail1_2']['currentver']; 67 } 68 69 $test[] = '1.234'; 70 function expressoMail1_2_upgrade1_234() { 71 $oProc = $GLOBALS['phpgw_setup']->oProc; 72 $oProc->CreateTable('phpgw_certificados',array( 73 'fd' => array( 74 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), 75 'chave_publica' => array( 'type' => 'text'), 76 'expirado' => array('type' => 'bool', 'default' => 'false'), 77 'revogado' => array('type' => 'bool', 'default' => 'false'), 78 'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false), 79 'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false), 80 ), 81 'pk' => array('email','serialnumber','authoritykeyidentifier'), 82 'fk' => array(), 83 'ix' => array(), 84 'uc' => array() 85 ) 86 ); 87 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235'; 88 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 174 89 } 175 90 ?> -
trunk/expressoMail1_2/templates/default/config.tpl
r1246 r1247 99 99 </td> 100 100 </tr> 101 <tr bgcolor="{row_off}">102 <td>{lang_Max_attachment_size}</td>103 <td>104 <input size="1" name="newsettings[expressoMail_Max_attachment_size]" value="{value_expressoMail_Max_attachment_size}">105 </td>106 </tr>107 101 <!-- END body --> 108 102 <!-- BEGIN footer --> -
trunk/phpgwapi/inc/class.common.inc.php
r1246 r1247 736 736 while ($entry=$d->read()) 737 737 { 738 if ($entry != '.' && $entry != '..' && is_dir(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry) && file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/head.inc.php'))738 if ($entry != '.' && $entry != '..' && is_dir(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry) && !is_link(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry) && file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/head.inc.php')) 739 739 { 740 740 $list[$entry]['title'] = $entry; -
trunk/phpgwapi/inc/class.setup_process.inc.php
r1246 r1247 634 634 635 635 /* $test array comes from update file. It is a list of available upgrade functions */ 636 @reset($test); 636 @reset($test); 637 637 638 while(list($x,$value) = @each($test)) 638 639 { 639 $this->currentversion = $currentver = $setup_info[$key]['currentver'];640 640 $this->currentversion = $currentver = $setup_info[$key]['currentver']; 641 641 642 /* build upgrade function name */ 642 643 $function = $appname . '_upgrade' . str_replace(".", '_', $value); 643 644 644 645 if($DEBUG) 645 646 { … … 754 755 } 755 756 else 756 { 757 break;757 { 758 continue; 758 759 } 759 760 } -
trunk/phpgwapi/templates/default/about.tpl
r1246 r1247 1 <table border="0" width="100%" >1 <table border="0" width="100%" cellspacing="0" cellpadding="0"> 2 2 <!-- <tr> 3 3 <td align="left"> 4 <a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt=" logo"></a>4 <a href="http://www.eGroupWare.org" target="_new"><img src="{phpgw_logo}" border="0" alt="eGroupWare"></a> 5 5 </td> 6 6 </tr> … … 9 9 </tr> 10 10 <tr> 11 <td align=" center">{phpgw_version}</td>11 <td align="left">{phpgw_version}</td> 12 12 </tr> 13 13 <tr> 14 <td align=" center">{phpgw_message}</td>14 <td align="left">{phpgw_message}</td> 15 15 </tr> 16 16 <tr> 17 <td><hr></td> 18 </tr>--> 17 <td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td> 18 </tr> 19 <tr> 20 <td align="center"><div class="greyLine"></div></td> 21 </tr> 22 --> 19 23 <tr> 20 <td align="center"> 24 <td height="3"><img src="phpgwapi/templates/default/images/spacer.gif" alt="spacer" height="3" /></td> 25 </tr> 26 <tr> 27 <td align="left"> 21 28 22 29 {phpgw_app_about} -
trunk/phpgwapi/templates/default/css.tpl
r1246 r1247 1 1 <style type="text/css"> 2 2 <!-- 3 a { text-decoration:none; color: {link}; }4 a:active{ text-decoration:none; color: {alink}; }5 a:hover{ text-decoration:underline; color: {alink}; }6 a:visted{ text-decoration:none; color: {link}; }7 body { margin-top: 0px; margin-right: 0px; margin-left: 0px; font-family: {font}; }8 3 .row_on { color: {row_text}; background-color: {row_on}; } 9 4 .row_off { color: {row_text}; background-color: {row_off}; } 10 5 .th { color: {th_text}; background-color: {th_bg}; } 11 .tablink { color: #000000; }12 6 {app_css} 13 7 --> -
trunk/phpgwapi/templates/default/footer.tpl
r1246 r1247 1 <!-- BEGIN footer --> 2 </td></tr></table> 3 <table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="{table_bg_color}"> 4 <tr> 5 <td> {user_info}<br></td> 6 <td align="center">{current_users}<br></td> 7 <td align="right">{powered_by} <br></td> 8 </tr> 9 </table> 10 </body> 11 </html> 12 13 <!-- END footer --> 14 1 </td></tr></table> 2 </div> 3 <!-- Applicationbox Column --> 4 </td> 5 </tr> 6 </table> 7 </div> 8 <!-- END footer.tpl --> -
trunk/phpgwapi/templates/default/head.tpl
r1246 r1247 1 <!-- BEGIN head --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <HTML> 3 <HEAD> 4 <META http-equiv="Content-Type" content="text/html; charset={charset}"> 5 <META name="AUTHOR" content="eGroupWare http://www.egroupware.org"> 6 <META NAME="description" CONTENT="eGroupWare"> 7 <META NAME="keywords" CONTENT="eGroupWare"> 8 <meta name="robots" content="none"> 9 <LINK REL="ICON" href="{img_icon}" type="image/x-ico"> 10 <LINK REL="SHORTCUT ICON" href="{img_shortcut}"> 11 {css} 12 <TITLE>{website_title}</TITLE> 13 {java_script} 14 </HEAD> 15 <BODY {body_tags}> 1 <!-- BEGIN head --> 2 <html xml:lang="{lang_code}" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>{website_title}</title> 5 <meta http-equiv="content-type" content="text/html; charset={charset}" /> 6 <meta name="keywords" content="eGroupWare" /> 7 <meta name="description" content="eGroupware" /> 8 <meta name="keywords" content="eGroupWare" /> 9 <meta name="copyright" content="eGroupWare http://www.egroupware.org (c) 2003" /> 10 <meta name="language" content="{lang_code}" /> 11 <meta name="author" content="eGroupWare http://www.egroupware.org" /> 12 <meta name="robots" content="none" /> 13 <link rel="icon" href="{img_icon}" type="image/x-ico" /> 14 <link rel="shortcut icon" href="{img_shortcut}" /> 15 <link href="{theme_css}" title="eGroupWareStyle" type="text/css" rel="StyleSheet"/> 16 <META http-equiv="Default-Style" content="eGroupWareStyle"> 17 {slider_effects} 18 {simple_show_hide} 19 {pngfix} 20 {css} 21 {java_script} 22 {cookie_manager} 23 </head> 24 <!-- we don't need body tags anymore, do we?) we do!!! onload!! LK --> 25 <body {body_tags}> 16 26 <!-- END head --> -
trunk/phpgwapi/templates/default/login.tpl
r1246 r1247 3 3 <!-- BEGIN login_form --> 4 4 <HEAD> 5 6 5 <META http-equiv="Content-Type" content="text/html; charset={charset}"> 7 6 <META name="AUTHOR" content="dGroupWare http://www.eGroupWare.org"> … … 9 8 <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> 10 9 <META NAME="keywords" CONTENT="{website_title} login screen, eGroupWare, groupware, groupware suite"> 10 <link href="phpgwapi/templates/default/login.css" rel="stylesheet" type="text/css"> 11 <TITLE>{website_title} - {lang_login}</TITLE> 12 <script language="Javascript"> 13 <!-- 11 14 12 <TITLE>{website_title} - {lang_login}</TITLE> 15 function setLogin(){ 16 if( document.flogin.organization != null) 17 document.flogin.login.value = document.flogin.organization.value+'-'+document.flogin.user.value; 18 else 19 document.flogin.login.value = document.flogin.user.value; 20 } 21 22 function getLogin(){ 23 var cookie = '{cookie}'; 24 if( document.flogin.organization != null) 25 document.flogin.user.value= cookie.substring(cookie.indexOf('-')+1,cookie.length); 26 else 27 document.flogin.user.value= cookie; 28 29 if(document.flogin.user.value == '') { 30 if(document.flogin.organization != null) 31 document.flogin.organization.focus(); 32 else 33 document.flogin.user.focus(); 34 } 35 else 36 document.flogin.passwd.focus(); 37 } 38 39 function openWindow(newWidth,newHeight,link) { 40 newScreenX = screen.width - newWidth; 41 newScreenY = 0; 42 Window1=window.open(link,'',"width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no"); 43 } 44 --> 45 </script> 13 46 </HEAD> 47 <body scroll="no" style="overflow:hidden" onLoad="javascript:getLogin()" bgcolor="#ffffff"> 48 <div id="conteudo"> 49 <div style="position: absolute; top:0px; right: 10px;"><span class="login_label">{lang_language} </span>{select_language}</div> 50 <div align="center"> 51 <div id="conteudo_corpo"> 52 <div id="superior"> 53 <div id="login"> 54 <div align="center"> 55 <form name="flogin" method="post" action="{login_url}" {autocomplete}> 56 <input type="hidden" name="passwd_type" value="text"> 57 <input type="hidden" name="account type" value="u"> 58 <input type="hidden" name="login"> 59 <div id="caixa_login"> 60 <div id="reflexo"> 61 <div class="titulo_login">Expresso Livre</div> 62 <div id="mensagem" class="msgInicial" >{cd}<br>{lang_message}</div> 63 {action} 64 <div id="conteudo_login" style="display:{show};"> 65 <div class="login_label"> 66 <label for="usuario">{lang_username}</label> 67 <br /> 68 <input class="input" type="text" maxlength="50" size="20" name="user" id="user" value=""> 69 </div> 14 70 15 <body bgcolor="#{bg_color}"> 16 <a href="{logo_url}"><img src="{logo_file}" alt="{logo_title}" title="{logo_title}" border="0"></a> 17 <p> </p> 18 <center>{lang_message}</center> 19 <p> </p> 20 21 <TABLE bgcolor="#000000" border="0" cellpadding="0" cellspacing="0" width="40%" align="center"> 22 <TR> 23 <TD> 24 <TABLE border="0" width="100%" bgcolor="#486591" cellpadding="2" cellspacing="1"> 25 <TR bgcolor="#{bg_color_title}"> 26 <TD align="LEFT" valign="MIDDLE"> 27 <font color="#FEFEFE"> {website_title}</font> 28 </TD> 29 </TR> 30 <TR bgcolor="#e6e6e6"> 31 <TD valign="BASELINE"> 32 33 <FORM name="login" method="post" action="{login_url}" {autocomplete}> 34 <input type="hidden" name="passwd_type" value="text"> 35 <input type="hidden" name="account type" value="u"> 36 <TABLE border="0" align="CENTER" bgcolor="#486591" width="100%" cellpadding="0" cellspacing="0"> 37 <TR bgcolor="#e6e6e6"> 38 <TD colspan="3" align="CENTER">{cd}</TD> 39 </TR> 40 <TR bgcolor="#e6e6e6"> 41 <TD align="RIGHT"><font color="#000000">{lang_username}: </font></TD> 42 <TD><input name="login" value="{cookie}"></TD> 43 <TD>{select_domain}</TD> 44 </TR> 45 <TR bgcolor="#e6e6e6"> 46 <TD align="RIGHT"><font color="#000000">{lang_password}: </font></TD> 47 <TD><input name="passwd" type="password"></TD> 48 <TD> </TD> 49 </TR> 50 <TR bgcolor="#e6e6e6"> 51 <TD colspan="3" align="CENTER"><input type="submit" value="{lang_login}" name="submitit"></TD> 52 </TR> 53 <TR bgcolor="#e6e6e6"> 54 <TD colspan="3" align="right"><font color="#000000" size="-1">eGroupWare {version}</font></TD> 55 </TR> 56 </TABLE> 57 </FORM> 58 59 </TD> 60 </TR> 61 </TABLE> 62 </TD> 63 </TR> 64 </TABLE> 65 66 <!-- END login_form --> 67 </HTML> 71 <div class="login_label"> 72 <label for="senha">{lang_password}</label> 73 <br /> 74 <input class="input" type="password" maxlength="50" size="20" name="passwd" id="passwd" value=""> 75 </div> 76 {captcha} 77 78 <input value="{lang_login}" name="submitit" class="button" onclick="javascript:setLogin()" type="submit" style="margin-top:10px"/> 79 </div> 80 <div style="margin-top:5px"> 81 {link_alterna_login} 82 </div> 83 </div> 84 <div id="rodape_login"> 85 <div class="ajuda"><a target="help" href="./phpgwapi/templates/{template}/help.php?lang={lang}">Ajuda</a></div> 86 </div> 87 </div> 88 </form> 89 </div> 90 </div> 91 </div> 92 <div id="inferior"><br /> 93 <div id="rodape"> 94 <table align="center" cellspacing="0" cellpadding="0" border="0"> 95 <tr> 96 <td> 97 <table border="0" cellpadding="0" cellspacing="0" width="300px"> 98 <tbody> 99 <tr> 100 <td>{logo_config} 101 <br><a title="Projeto Expresso Livre" target="_blank" href="http://www.expressolivre.org/">Expresso Livre</a> {version} 102 <br><a title="eGroupWare" target="_blank" href="http://www.egroupware.org/"> Powered by eGroupWare </a></div></td> 103 </tr> 104 </tbody> 105 </table> 106 </td> 107 </tr> 108 </table> 109 </div> 110 </div> 111 </div> 112 </div> 113 </div> 114 <div>{applet}</div> 115 </body></html> -
trunk/phpgwapi/templates/default/login_default.php
r1246 r1247 36 36 case 99: 37 37 return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>'; 38 38 case 200: 39 return '<font color="FF0000">' . lang('Invalid code') . '</font>'; 40 break; 39 41 case 10: 40 42 $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid'); … … 105 107 if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) 106 108 { 109 110 // Primeiro testa o captcha....se houver...... 111 if( $GLOBALS['phpgw_info']['server']['captcha']==1) 112 { 113 if(isset($_POST['codigo'])) 114 { 115 if ($_SESSION['CAPTCHAString'] != strtoupper($_POST['codigo'])) 116 { 117 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=200')); 118 } 119 unset($_SESSION['CAPTCHAString']); 120 } 121 } 122 if($_POST['user']) 123 { 124 $_POST['login'] = $_POST['user']; 125 } 107 126 ///// Início - Código temporário: Para renomeação de login com organização para sem. ////// 108 127 /* $common = CreateObject('phpgwapi.common'); … … 375 394 $tmpl->set_var('autocomplete', ($GLOBALS['phpgw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : '')); 376 395 396 $aux_captcha = ''; 397 // soh mostra o captcha se for login sem certificado.... 398 if($GLOBALS['phpgw_info']['server']['captcha'] && $_GET['cd']!='300' ) 399 { 400 if($valor_cookie > $GLOBALS['phpgw_info']['server']['num_badlogin']) 401 { 402 $aux_captcha = '<div class="login_label" > 403 <img src="./security/captcha.php" title="'.lang('Security code').'" alt="'.lang('Security code').'" style="width:60;"> 404 <br /> 405 <input class="input" type="text" maxlength="50" size="20" name="codigo" id="codigo" value="" > 406 </div>'; 407 $tmpl->set_var('captcha',$aux_captcha); 408 } 409 } 410 411 // Testa se deve incluir applet para login com certificado...... 412 if ($_GET['cd']=='300' && $GLOBALS['phpgw_info']['server']['certificado']==1) 413 { 414 //Zera o Cookie contador, responsavel pelo captcha 415 $valor_cookie = 1; 416 setcookie("contador", 1,0); 417 418 $link_alterna_login = '<img border=0 style="padding: 0px 5px 0px 0px" src="phpgwapi/templates/default/images/warning.gif"/><a href="login.php" style="margin: 0px; padding: 0px; text-decoration:none;"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="1">' . lang('Access without Digital Certificate') . '</a>'; 419 $tmpl->set_var('show','none'); 420 $tmpl->set_var('action','<div id="action"><img style="border:0px;margin:31px 0px 58px 0px;" src="phpgwapi/templates/default/images/acao.gif" /></div>'); 421 // gera parametro com tokens suportados .... 422 $var_tokens = ''; 423 for($ii = 1; $ii < 11; $ii++) 424 { 425 if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) 426 $var_tokens .= $GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'] . ','; 427 } 428 429 if(!$var_tokens) 430 { 431 $var_tokens = 'ePass2000Lx;/usr/lib/libepsng_p11.so,ePass2000Win;c:/windows/system32/ngp11v211.dll'; 432 } 433 $param1 = " 434 '<param name=\"token\" value=\"" . substr($var_tokens,0,strlen($var_tokens)) . "\"> ' + 435 "; 436 $param2 = " 437 'token=\"" . substr($var_tokens,0,strlen($var_tokens)) . "\" ' + 438 "; 439 440 $cod_applet = 441 442 /* // com debug ativado 443 '<script type="text/javascript"> 444 if (navigator.userAgent.match(\'MSIE\')){ 445 document.write(\'<object style="display:yes;width:0;height:0;vertical-align:bottom;" id="login_applet" \' + 446 \'classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"> \' + 447 \'<param name="type" value="application/x-java-applet;version=1.5"> \' + 448 \'<param name="code" value="LoginApplet.class"> \' + 449 \'<param name="locale" value="' . $lang . '"> \' + 450 \'<param name="mayscript" value="true"> \' + ' 451 . $param1 452 . ' \'<param name="archive" value="ExpressoCertLogin.jar,ExpressoCert.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,commons-codec-1.3.jar,bcmail-jdk15-142.jar,mail.jar,activation.jar,bcprov-jdk15-142.jar"> \' + 453 \'<param name="debug" value="true"> \' + 454 \'</object>\'); 455 } 456 else { 457 document.write(\'<embed style="display:yes;width:0;height:0;vertical-align:bottom;" id="login_applet" code="LoginApplet.class" locale="' . $lang . '"\' + 458 \'archive="ExpressoCertLogin.jar,ExpressoCert.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,commons-codec-1.3.jar,bcmail-jdk15-142.jar,mail.jar,activation.jar,bcprov-jdk15-142.jar" \' + ' 459 . $param2 460 . ' \'type="application/x-java-applet;version=1.5" debug= "true" mayscript > \' + 461 \'<noembed> \' + 462 \'No Java Support. \' + 463 \'</noembed> \' + 464 \'</embed> \'); 465 } 466 </script>'; 467 */ 468 // sem debug ativado 469 '<script type="text/javascript"> 470 if (navigator.userAgent.match(\'MSIE\')){ 471 document.write(\'<object style="display:yes;width:0;height:0;vertical-align:bottom;" id="login_applet" \' + 472 \'classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"> \' + 473 \'<param name="type" value="application/x-java-applet;version=1.5"> \' + 474 \'<param name="codebase" value="/security/">\' + 475 \'<param name="code" value="LoginApplet.class"> \' + 476 \'<param name="locale" value="' . $lang . '"> \' + 477 \'<param name="mayscript" value="true"> \' + ' 478 . $param1 479 . ' \'<param name="archive" value="ExpressoCertLogin.jar,ExpressoCert.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,commons-codec-1.3.jar,bcmail-jdk15-142.jar,mail.jar,activation.jar,bcprov-jdk15-142.jar"> \' + 480 \'</object>\'); 481 } 482 else { 483 document.write(\'<embed style="display:yes;width:0;height:0;vertical-align:bottom;" id="login_applet" codebase="/security/" code="LoginApplet.class" locale="' . $lang . '"\' + 484 \'archive="ExpressoCertLogin.jar,ExpressoCert.jar,commons-httpclient-3.1.jar,commons-logging-1.1.1.jar,commons-codec-1.3.jar,bcmail-jdk15-142.jar,mail.jar,activation.jar,bcprov-jdk15-142.jar" \' + ' 485 . $param2 486 . ' \'type="application/x-java-applet;version=1.5" mayscript > \' + 487 \'<noembed> \' + 488 \'No Java Support. \' + 489 \'</noembed> \' + 490 \'</embed> \'); 491 } 492 </script>'; 493 494 495 } 496 497 else 498 { 499 if($GLOBALS['phpgw_info']['server']['certificado']==1) 500 { 501 $tmpl->set_var('show','yes'); 502 $link_alterna_login = '<img border=0 style="padding: 0px" src="phpgwapi/templates/default/images/lock1_icon.gif"/><a title="' . lang('Link to use digital certificate') . '" href="login.php?cd=300" style="margin: 0px; padding: 0px; text-decoration:none;"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="1"><b>' . lang('Logon with my digital certificate') . '</b></font></a>'; 503 } 504 $tmpl->set_var('lang_username',lang('username')); 505 $tmpl->set_var('action',''); 506 $cod_applet = ''; 507 508 } 509 510 $tmpl->set_var('applet',$cod_applet); 511 $tmpl->set_var('link_alterna_login',$link_alterna_login); 512 513 377 514 $tmpl->pfp('loginout','login_form'); 378 515 ?> 516 -
trunk/phpgwapi/templates/default/login_denylogin.tpl
r1246 r1247 1 1 2 2 <!-- BEGIN form --> 3 < BODY bgcolor="#FFFFFF">4 < A href="http://www.eGroupWare.org"><img src="phpgwapi/templates/{template_set}/images/logo.gif" title="www.eGroupWare.org" border="0"></a>3 <body bgcolor="#ffffff"> 4 <a href="http://www.egroupware.org"><img src="phpgwapi/templates/celepar/images/logo.png" alt="eGroupWare" border="0"></a> 5 5 6 < TABLE border="0" height="94%" width="100%">7 < TR>8 < TD align="CENTER">9 Opps! You caught us in the middle of a system upgrade.<br>Please, check back with us shortly.10 </ TD>11 </ TR>12 </ TABLE>6 <table border="0" width="100%"> 7 <tr> 8 <td align="center"> 9 {deny_msg} 10 </td> 11 </tr> 12 </table> 13 13 14 14 <!-- END form --> -
trunk/phpgwapi/templates/default/navbar.inc.php
r1246 r1247 1 1 <?php 2 3 4 5 6 7 8 9 10 2 /**************************************************************************\ 3 * phpGroupWare * 4 * http://www.phpgroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 11 12 12 13 13 function parse_navbar($force = False) 14 14 { 15 $tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 16 $tpl->set_unknowns('remove'); 17 18 $tpl->set_file( 15 $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 16 17 $GLOBALS['celepar_tpl']->set_file( 19 18 array( 20 'navbar' => 'navbar.tpl', 21 'navbar_app' => 'navbar_app.tpl' 19 'navbar' => 'navbar.tpl' 22 20 ) 23 21 ); 24 22 25 $var['navbar_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; 26 27 if ($GLOBALS['phpgw_info']['flags']['navbar_target']) 28 { 29 $target = ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 30 } 31 32 $i = 1; 23 $GLOBALS['celepar_tpl']->set_block('navbar','navbar_header','navbar_header'); 24 $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_header','extra_block_header'); 25 $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_row','extra_block_row'); 26 $GLOBALS['celepar_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer'); 27 $GLOBALS['celepar_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer'); 28 $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header'); 29 $GLOBALS['celepar_tpl']->set_block('navbar','sidebox_hide_footer','sidebox_hide_footer'); 30 $GLOBALS['celepar_tpl']->set_block('navbar','appbox','appbox'); 31 $GLOBALS['celepar_tpl']->set_block('navbar','navbar_footer','navbar_footer'); 32 33 $GLOBALS['celepar_tpl']->set_var('my_preferences', lang("My Preferences")); 34 $GLOBALS['celepar_tpl']->set_var('title_my_preferences', lang("Click here to change your Expresso password and other preferences")); 35 $GLOBALS['celepar_tpl']->set_var('title_suggestions', lang("Send your critics, doubts or suggestions")); 36 $GLOBALS['celepar_tpl']->set_var('suggestions', lang("Suggestions")); 37 $GLOBALS['celepar_tpl']->set_var('help', lang("Help")); 38 $GLOBALS['celepar_tpl']->set_var('title_help', lang("Click here for help")); 39 $GLOBALS['celepar_tpl']->set_var('template',$GLOBALS['phpgw_info']['server']['template_set']); 40 41 $var['img_root'] = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'; 42 $var['dir_root'] = $GLOBALS['phpgw_info']['server']['webserver_url']; 43 $var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg']; 44 45 if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover') 46 { 47 $show_menu_event = 'onMouseOver'; 48 } 49 else 50 { 51 $show_menu_event = 'onClick'; 52 } 53 54 55 $applications = ''; 56 57 // == 'icons_and_text') 58 59 $max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons']; 60 61 if(!$max_icons) 62 { 63 $max_icons=200; 64 } 65 66 $i = 0; 33 67 foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) 34 68 { 35 if ($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format'] == 'text') 36 { 37 $tabs[$i]['label'] = $app_data['title']; 38 $tabs[$i]['link'] = $app_data['url']; 39 if (!empty($app_data['target'])) 69 $current_app = False; 70 if($app != 'preferences' && $app != 'about' && $app != 'logout') 40 71 { 41 $tabs[$i]['target'] = $app_data['target']; 42 } 43 elseif (!empty($target)) 72 $icon = '<a href="'.$app_data['url'].'">'; 73 $title = $GLOBALS['phpgw_info']['apps'][$app]['title']; 74 if ($GLOBALS['phpgw_info']['flags']['currentapp'] == $app) 75 { 76 $icon .= '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" width="35" height="35" nowrap="nowrap"/></a>'; 77 $current_app = True; 78 } 79 else 80 $icon .= '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title . '" border="0" width="24" height="24" nowrap="nowrap"/></a>'; 81 82 // 020204 ndee 83 if($app == 'home') $title = lang('Home'); 84 85 if($app=='home') 86 { 87 if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 88 { 89 continue; 90 } 91 } 92 93 // Verifica qual o formato da Barra de navegação: 94 // Icone ou Texto, ou Icone e Texto 95 96 97 if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 98 $title_extra = $title; 99 $title = ''; 100 } 101 else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 102 $icon = ''; 103 } 104 105 if($i< $max_icons) { 106 107 if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no') 108 { 109 $tdwidth = 100/($max_icons); 110 } 111 else 112 { 113 $tdwidth = 100/($max_icons+2); 114 } 115 116 $app_icons .= '<td nowrap '. 117 'onmouseover="javascript:'.($current_app?'return true;':'').'this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id)" '. 118 'onmouseout="javascript:'.($current_app?'return true;':'').'this.className=\'navbar_but\'; '.($current_app?'':'zoom_out(this.firstChild.firstChild.id)').'" '. 119 'class="'.($current_app?'navbar_butOut':'navbar_but').'">'; 120 121 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 122 { 123 $app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 124 } 125 $app_icons .= $icon; 126 } 127 128 129 $icon = '<img align="center" src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />'; 130 131 $app_extra_icons .= '<tr>'; 132 133 if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text') 134 { 135 $app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"'; 136 137 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 138 { 139 $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 140 } 141 142 $app_extra_icons .= ' >' . $icon . '</a></td>'; 143 } 144 145 146 $app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"'; 147 148 if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target']) 149 { 150 $app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; 151 } 152 153 $app_extra_icons .= '>' . $title_extra . '</a></td></tr>'; 154 155 unset($icon); 156 unset($title); 157 $i++; 158 } 159 } 160 161 if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no') 162 { 163 164 $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 165 $icon = '<img id="logout_id" width="24" height="24" src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'" alt="'.$hint.'" title="'.$hint.'">'; 166 167 if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') { 168 169 $title = ''; 170 } 171 else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){ 172 173 $icon = ''; 174 } 175 $app_icons .= '<td nowrap '. 176 'onmouseover="javascript:this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id)" '. 177 'onmouseout="javascript:this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id)" '. 178 'class="navbar_but"><a onclick="location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\'">'.$icon.'</td>'; 179 } // window.location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\' 180 181 $var['app_icons'] = $app_icons; 182 183 $hint = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 184 $icon = '<img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'" alt="'.$hint.'" title="'.$hint.'">'; 185 $title = $GLOBALS['phpgw_info']['navbar']['logout']['title']; 186 187 $app_extra_icons .= '<td class="extraIconsRow"> 188 <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$icon.'</a></td>'; 189 190 $app_extra_icons .= '<td class="extraIconsRow"> 191 <a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$title.'</a></td>'; 192 193 194 $app_extra_icons_div = ' 195 <script language="javascript"> 196 new ypSlideOutMenu("menu1", "down", 5, 24, 160, 200,\'left\') 197 </script> 198 <div id="menu1Container"> 199 <div id="menu1Content" style="position: relative; left: 0; text-align: left;"> 200 201 <div id="extraIcons"> 202 203 <table cellspacing="0" cellpadding="0" border="0" width="100%"> 204 <tr> 205 <td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd;padding:1px;"> 206 <a href="#" '.$show_menu_event.'="ypSlideOutMenu.hide(\'menu1\')" title="'.lang('close').'"> 207 <img style="" border="0" src="'.$var['img_root'].'/close.png"/></a></span></td></tr> 208 <tr> 209 <td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;"> 210 <a href="#" onClick="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'"> 211 <img src = "'.$var['img_root'].'/down.button.png"></a> 212 </td> 213 <td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;"> 214 <a href="#" onClick="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'"> 215 <b>'.lang('Expand Menu').'</b></a></td></tr> 216 '.$app_extra_icons.'</table> 217 </div> 218 219 </div> 220 </div> 221 '; 222 223 $var['app_extra_icons_div']= $app_extra_icons_div; 224 $var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="zIndex:10000;padding-right:3px;padding-top:10px;"><a title="'.lang('show_more_apps').'" href="#" '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>'; 225 226 227 if(isset($GLOBALS['phpgw_info']['flags']['app_header'])) 228 { 229 $var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header']; 230 } 231 else 232 { 233 $var['current_app_title']=$GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']; 234 } 235 236 if(isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) 237 { 238 $var['current_users'] = '<a href="' 239 . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' 240 . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>'; 241 } 242 $now = time(); 243 $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - ' 244 . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 245 . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']); 246 247 if($GLOBALS['phpgw_info']['server']['use_frontend_name']) 248 $var['frontend_name'] = " - ".$GLOBALS['phpgw_info']['server']['use_frontend_name']; 249 250 /* 251 * Forçar termo de aceite por parte do usuário 252 */ 253 254 if(($GLOBALS['phpgw_info']['user']['agree_terms'] != 1) && ($GLOBALS['phpgw_info']['server']['use_agree_term']=='True')) //Ele deverá confirmar o termo de aceite. 255 { 256 $agreeterm_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/termo_aceite.php'; 257 258 if ($GLOBALS['phpgw_info']['server']['use_https'] == 2) 259 $agreeterm_url = 'https://' . $agreeterm_url; 260 else 261 $agreeterm_url = 'http://' . $agreeterm_url; 262 263 echo '<script>' . 264 'if(location.href.indexOf("termo_aceite.php") == -1){' . 265 'location.href = "' . $agreeterm_url . '"' . 266 '}' . 267 '</script>'; 268 } 269 270 271 if(($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0') && (($GLOBALS['phpgw_info']['user']['agree_terms'] == 1) || ($GLOBALS['phpgw_info']['server']['use_agree_term']!='True'))) 272 { 273 $changepasswd_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/changepassword.php?cd=1'; 274 275 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) 276 $changepasswd_url = 'https://' . $changepasswd_url; 277 else 278 $changepasswd_url = 'http://' . $changepasswd_url; 279 280 echo '<script>' . 281 'if(location.href.indexOf("changepassword.php") == -1){' . 282 'location.href = "' . $changepasswd_url . '"' . 283 '}' . 284 '</script>'; 285 286 /* 287 $api_messages = lang('You are required to change your password during your first login') 288 . '<br> Click this image on the navbar: <img src="' 289 . $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">'; 290 */ 291 } 292 /* 293 elseif($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30)) 294 { 295 $api_messages = lang('it has been more then %1 days since you changed your password',30); 296 } 297 */ 298 /* 299 // This is gonna change 300 if(isset($cd)) 301 { 302 $var['messages'] = $api_messages . '<br>' . checkcode($cd); 303 }*/ 304 305 $var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo'); 306 $var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org'; 307 $var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org'; 308 $var['hide_bar_txt'] = lang("Hide header and toolbar"); 309 $var['show_bar_txt'] = lang("Show header and toolbar"); 310 $GLOBALS['celepar_tpl']->set_var($var); 311 $GLOBALS['celepar_tpl']->pfp('out','navbar_header'); 312 313 /******************************************************\ 314 * The sidebox menu's * 315 \******************************************************/ 316 317 $menu_title = lang('General Menu'); 318 319 $file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url']; 320 if($GLOBALS['phpgw_info']['user']['apps']['preferences']) 321 { 322 $file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url']; 323 } 324 $file += array( 325 array( 326 'text' => lang('About %1',$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']), 327 'no_lang' => True, 328 'link' => $GLOBALS['phpgw_info']['navbar']['about']['url'] 329 ), 330 'Logout'=>$GLOBALS['phpgw_info']['navbar']['logout']['url'] 331 ); 332 333 if($GLOBALS['phpgw_info']['user']['preferences']['common']['auto_hide_sidebox']==1) 334 { 335 $GLOBALS['celepar_tpl']->set_var('show_menu_event',$show_menu_event); 336 $GLOBALS['celepar_tpl']->set_var('lang_show_menu',lang('show menu')); 337 $GLOBALS['celepar_tpl']->pparse('out','sidebox_hide_header'); 338 339 display_sidebox('',$menu_title,$file); 340 $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); 341 342 $GLOBALS['celepar_tpl']->pparse('out','sidebox_hide_footer'); 343 344 $var['sideboxcolstart']=''; 345 346 $GLOBALS['celepar_tpl']->set_var($var); 347 $GLOBALS['celepar_tpl']->pparse('out','appbox'); 348 $var['remove_padding'] = 'style="padding-left:0px;"'; 349 $var['sideboxcolend'] = ''; 350 } 351 else 352 { 353 $var['menu_link'] = ''; 354 $var['sideboxcolstart'] = '<td id="tdSidebox" valign="top">'; 355 $var['remove_padding'] = ''; 356 $GLOBALS['celepar_tpl']->set_var($var); 357 $GLOBALS['celepar_tpl']->pparse('out','appbox'); 358 359 display_sidebox('',$menu_title,$file); 360 $GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']); 361 362 $var['sideboxcolend'] = '</td>'; 363 } 364 365 $GLOBALS['celepar_tpl']->set_var($var); 366 $GLOBALS['celepar_tpl']->pparse('out','navbar_footer'); 367 368 // If the application has a header include, we now include it 369 if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) 370 { 371 list($app,$class,$method) = explode('.',$_GET['menuaction']); 372 if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) 44 373 { 45 $tabs[$i]['target'] = $target; 46 } 47 if (ereg($GLOBALS['phpgw_info']['navbar'][$app],$_SERVER['PHP_SELF'])) 374 $GLOBALS[$class]->header(); 375 } 376 } 377 $GLOBALS['phpgw']->hooks->process('after_navbar'); 378 return; 379 } 380 381 function display_sidebox($appname,$menu_title,$file) 382 { 383 if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) 384 { 385 $var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); 386 $GLOBALS['celepar_tpl']->set_var($var); 387 $GLOBALS['celepar_tpl']->pfp('out','extra_blocks_header'); 388 389 foreach($file as $text => $url) 48 390 { 49 $selected = $i; 50 } 51 $i++; 391 sidebox_menu_item($url,$text); 392 } 393 394 $GLOBALS['celepar_tpl']->pparse('out','extra_blocks_footer'); 395 } 396 } 397 398 function sidebox_menu_item($item_link='',$item_text='') 399 { 400 if($item_text === '_NewLine_' || $item_link === '_NewLine_') 401 { 402 $GLOBALS['celepar_tpl']->pparse('out','extra_block_spacer'); 52 403 } 53 404 else 54 405 { 55 $ title = '<img src="' . $app_data['icon'] . '" alt="' . $app_data['title'] . '" title="'56 . $app_data['title'] . '" border="0">';57 if ($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format'] == 'icons_and_text')406 $var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>'; 407 $var['target'] = ''; 408 if(is_array($item_link)) 58 409 { 59 $title .= "<br>" . $app_data['title']; 60 $var['width'] = '7%'; 410 if(isset($item_link['icon'])) 411 { 412 $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; 413 $var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>'; 414 } 415 $var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']); 416 $var['item_link'] = $item_link['link']; 417 if ($item_link['target']) 418 { 419 $var['target'] = ' target="' . $item_link['target'] . '"'; 420 } 61 421 } 62 422 else 63 423 { 64 $var['width'] = '3%'; 65 } 66 67 $var['value'] = '<a href="' . $app_data['url'] . '"' . ($app_data['target'] ? $app_data['target'] : $target) . '>' . $title . '</a>'; 68 $var['align'] = 'center'; 69 $tpl->set_var($var); 70 $tpl->parse('applications','navbar_app',True); 71 } 72 } 73 if ($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format'] == 'text') 74 { 75 $var['navbar_color'] = $GLOBALS['phpgw_info']['theme']['bg_color']; 76 $var['align'] = 'right'; 77 $var['value'] = $GLOBALS['phpgw']->common->create_tabs($tabs,$selected,-1); 78 $tpl->set_var($var); 79 $tpl->parse('applications','navbar_app',True); 80 } 81 82 if ($GLOBALS['phpgw_info']['server']['showpoweredbyon'] == 'top') 83 { 84 $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); 85 } 86 if (isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) 87 { 88 $var['current_users'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') 89 . '"> ' . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>'; 90 } 91 $now = time(); 92 $var['user_info'] = $GLOBALS['phpgw']->common->display_fullname() . ' - ' 93 . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 94 . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']); 95 // . lang($GLOBALS['phpgw']->common->show_date($now,'F')) . ' ' 96 // . $GLOBALS['phpgw']->common->show_date($now,'d, Y'); 97 98 // Maybe we should create a common function in the phpgw_accounts_shared.inc.php file 99 // to get rid of duplicate code. 100 if ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0) 101 { 102 $api_messages = lang('You are required to change your password during your first login') 103 . '<br> Click this image on the navbar: <img src="' 104 . $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">'; 105 } 106 elseif ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30)) 107 { 108 $api_messages = lang('it has been more then %1 days since you changed your password',30); 109 } 110 111 // This is gonna change 112 if (isset($cd)) 113 { 114 $var['messages'] = $api_messages . '<br>' . checkcode($cd); 115 } 116 117 if (isset($GLOBALS['phpgw_info']['flags']['app_header'])) 118 { 119 $var['current_app_header'] = $GLOBALS['phpgw_info']['flags']['app_header']; 120 $var['th_bg'] = $GLOBALS['phpgw_info']['theme']['th_bg']; 121 } 122 else 123 { 124 $tpl->set_block('navbar','app_header','app_header'); 125 $var['app_header'] = ''; 126 } 127 128 $tpl->set_var($var); 129 $tpl->pfp('out','navbar'); 130 // If the application has a header include, we now include it 131 if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($_GET['menuaction'])) 132 { 133 list($app,$class,$method) = explode('.',$_GET['menuaction']); 134 if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) 135 { 136 $GLOBALS[$class]->header(); 137 } 138 } 139 $GLOBALS['phpgw']->hooks->process('after_navbar'); 140 return; 141 } 142 143 function parse_navbar_end() 144 { 145 if ($GLOBALS['phpgw_info']['server']['showpoweredbyon'] == 'bottom') 146 { 147 $tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 148 $tpl->set_unknowns('remove'); 149 150 $tpl->set_file( 424 $var['lang_item'] = lang($item_text); 425 $var['item_link'] = $item_link; 426 } 427 $GLOBALS['celepar_tpl']->set_var($var); 428 $GLOBALS['celepar_tpl']->pparse('out','extra_block_row'); 429 } 430 } 431 432 function parse_navbar_end() 433 { 434 $GLOBALS['celepar_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR); 435 436 $GLOBALS['celepar_tpl']->set_file( 151 437 array( 152 438 'footer' => 'footer.tpl' 153 439 ) 154 440 ); 441 155 442 $var = Array( 443 'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images', 156 444 'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 445 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] 157 446 ); 447 $GLOBALS['phpgw']->hooks->process('navbar_end'); 448 449 450 if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time']) 451 { 452 $mtime = microtime(); 453 $mtime = explode(' ',$mtime); 454 $mtime = $mtime[1] + $mtime[0]; 455 $tend = $mtime; 456 $totaltime = ($tend - $GLOBALS['page_start_time']); 457 458 $var['page_generation_time'] = '<div id="divGenTime"><br/><span>'.lang('Page was generated in %1 seconds',$totaltime).'</span></div>'; 459 } 460 158 461 $var['powered_by'] = lang('Powered by phpGroupWare version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']); 159 if (isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) 160 { 161 $var['current_users'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') 162 . '"> ' . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>'; 163 } 164 $now = time(); 165 $var['user_info'] = $GLOBALS['phpgw']->common->display_fullname() . ' - ' 166 . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 167 . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']); 168 $tpl->set_var($var); 169 $GLOBALS['phpgw']->hooks->process('navbar_end'); 170 $tpl->pfp('out','footer'); 171 } 172 } 462 $GLOBALS['celepar_tpl']->set_var($var); 463 $GLOBALS['celepar_tpl']->pfp('out','footer'); 464 } -
trunk/phpgwapi/templates/default/navbar.tpl
r1246 r1247 1 <!-- BEGIN navbar --> 1 <!-- BEGIN navbar_header --> 2 <div align="center" id="hiddenButton" style="position:absolute"> 3 </div> 4 <div align="center" id="extraButton" style="position:absolute"> 5 <table><tr>{app_extra_icons_icon}</tr></table> 6 </div> 7 {app_extra_icons_div} 8 <script language="Javascript"> 9 function showBar(){ 10 bar = document.getElementById("toolbar"); 11 bar.style.visibility = ""; 12 bar.style.position ="static"; 13 but = document.getElementById("hiddenButton"); 14 but.style.visibility = ""; 15 but.style.position = "absolute"; 16 but.style.top = "55px"; 17 but.style.left = "2px"; 18 title = "{hide_bar_txt}"; 19 extra = document.getElementById("extraButton"); 20 extra.style.visibility = "hidden"; 21 but.innerHTML="<a title='"+title+"' onClick='javascript:changeBar()'><img src='{img_root}/up.button.png'></a>"; 22 var neverExpires = new Date("January 01, 2100 00:00:00"); 23 document.cookie = "showHeader=true"+ 24 ";expires=" + neverExpires.toGMTString()+ 25 ";path=/"; 26 } 27 28 function hideBar(){ 29 bar = document.getElementById("toolbar"); 30 bar.style.position ="absolute"; 31 bar.style.visibility = "hidden"; 32 but = document.getElementById("hiddenButton"); 33 but.style.visibility = "hidden"; 34 title = "{show_bar_txt}"; 35 extra = document.getElementById("extraButton"); 36 extra.style.visibility = "" 37 extra.style.top = "-11px"; 38 extra.style.left = "-10px"; 39 var neverExpires = new Date("January 01, 2100 00:00:00"); 40 document.cookie = "showHeader=false"+ 41 ";expires=" + neverExpires.toGMTString()+ 42 ";path=/"; 43 } 44 function changeBar(){ 45 bar = document.getElementById("toolbar"); 46 if(bar.style.visibility == "hidden") 47 showBar(); 48 else 49 hideBar(); 50 } 51 function initBar(val){ 52 53 if(val == 'true') 54 showBar(); 55 else 56 hideBar(); 57 } 58 var zoominTimer = new Array(); 59 var zoomoutTimer = new Array(); 60 function zoom_in(id) 61 { 62 clearTimeout(zoomoutTimer[id]); 63 var elem = document.getElementById(id); 64 if (elem.height > 34) 65 { 66 clearTimeout(zoominTimer[id]); 67 return false; 68 } 69 elem.height += 4; 70 elem.width += 4; 71 zoominTimer[id] = setTimeout('zoom_in("'+id+'");',30); 72 } 73 function zoom_out(id) 74 { 75 clearTimeout(zoominTimer[id]); 76 var elem = document.getElementById(id); 77 if (elem.height < 24) 78 { 79 clearTimeout(zoomoutTimer[id]); 80 return false; 81 } 82 elem.height -= 2; 83 elem.width -= 2; 84 zoomoutTimer[id] = setTimeout('zoom_out("'+id+'");',30); 85 } 86 </script> 87 88 <div class="toolbar" id="toolbar" style="visibility:hidden"> 89 <table border="0" height="50px" width="100%" cellpadding=0 cellspacing=0><tr> 90 <td class="logo_expresso"> <br></td> 91 <td align="center"> 92 <table width="auto" border="0" cellpadding="0" cellspacing="0">{app_icons}</table> 93 </td><td style="padding-left:0px;padding-right:25px" align="right" nowrap> 94 </td></tr></table> 95 <div id ="divStatusBar"> 2 96 <table width="100%" border="0" cellspacing="0" cellpadding="0"> 3 <tr bgcolor="{navbar_color}">4 <td align="left"> </td>5 </tr>6 97 <tr> 7 <td> 8 <table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="white"> 9 <tr > 10 {applications} 11 </tr> 12 </table> 98 <td width="30%" align="left" id="user_info" nowrap>{user_info}{frontend_name}</td> 99 <td width="30%" id="admin_info" nowrap>{current_users}</td> 100 <td style="padding-right:10px" width="*" align="right" valign="center" nowrap="true"> 101 <a href="{dir_root}/preferences" title="{title_my_preferences}" alt="{title_my_preferences}" onmouseover="javascript:self.status='{title_my_preferences}'" onmouseout="javascript:self.status=''"><img height="15px" src="{dir_root}/phpgwapi/templates/{template}/images/preferences.png"><font id="links_bar">{my_preferences}</font></a> 102 103 <a href="#" title="{title_suggestions}" alt="{title_suggestions}" onmouseover="javascript:self.status='{title_suggestions}'" onmouseout="javascript:self.status=''" onclick="javascript:openWindow(400,550,'{dir_root}/help/enviasugestao.php')"><img src="{dir_root}/phpgwapi/templates/{template}/images/critic.png"><font id="links_bar">{suggestions}</font></a> 104 105 <a href="#" title="{title_help}" alt="{title_help}" onmouseover="javascript:self.status='{title_help}'" onmouseout="javascript:self.status=''" onclick="javascript:openWindow(480,510,'{dir_root}/help')"><img src="{dir_root}/phpgwapi/templates/{template}/images/help.png"><font id="links_bar">{help}</font></a> 13 106 </td> 14 </tr>15 <tr bgcolor="{navbar_color}">16 <td align="left"> </td>17 107 </tr> 18 108 </table> 19 <table width="100%" border="0" cellspacing="0" cellpadding="0"> 20 <tr> 21 <td align="left"> 22 {powered_by} 23 </td> 24 </tr> 25 <!-- <tr> 26 <td align="left" colspan="2"> 27 {user_info} 28 </td> 29 <td align="right"> 30 {current_users} 31 </td> 32 </tr>--> 33 </table> 34 <table width="100%" cellspacing="5"><tr><td> 35 <!-- BEGIN app_header --> 36 <b>{current_app_header}</b><hr> 37 <!-- END app_header --> 38 {messages}<br> 39 <!-- END navbar --> 109 </div> 110 </div> 111 112 <script language="Javascript"> 113 function openWindow(newWidth,newHeight,link) 114 { 115 116 newScreenX = screen.width - newWidth; 117 newScreenY = 0; 118 Window1=window.open(link,'',"width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no"); 119 120 } 121 </script> 122 <!-- END navbar_header --> 123 <!-- BEGIN appbox --> 124 <div id="divSubContainer"> 125 <table width="100%" cellspacing="0" cellpadding="0" border="0"> 126 <tr> 127 {sideboxcolstart} 128 <!-- END appbox --> 129 <!-- BEGIN sidebox_hide_header --> 130 <script language="javascript"> 131 new ypSlideOutMenu("menu2", "right", 0, 165, 160, 200) 132 </script> 133 134 <div id="sideboxdragarea" style="position:absolute;left:0px;top:175px"> 135 <a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a> 136 </div> 137 <div id="menu2Container"> 138 <div id="menu2Content" style="position: relative; left: 0; text-align: left;"> 139 <table cellspacing="0" cellpadding="0" border="0"> 140 <tr><td> 141 142 <div style="background-color:#ffffff;border: #9c9c9c 1px solid;padding:5px;"> 143 <!-- END sidebox_hide_header --> 144 <!-- BEGIN sidebox_hide_footer --> 145 </div> 146 </td><td style="padding-top:10px" valign="top"> 147 <a href="#" onClick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a> 148 </td></tr></table> 149 </div> 150 </div> 151 <script language="Javascript"> 152 initBar(GetCookie("showHeader")); 153 </script> 154 <!-- END sidebox_hide_footer --> 155 156 157 158 159 160 <!-- BEGIN navbar_footer --> 161 {sideboxcolend} 162 <!-- End Sidebox Column --> 163 <!-- Applicationbox Column --> 164 <td id="tdAppbox" valign="top" {remove_padding}> 165 <div id="divAppboxHeader">{current_app_title}</div> 166 <div id="divAppbox" class="divAppbox"> 167 <table id="tableDivAppbox" width="98%" cellpadding="0" cellspacing="0"> 168 <tr><td> 169 <!-- END navbar_footer --> 170 <!-- BEGIN extra_blocks_header --> 171 <div class="divSidebox"> 172 <div class="divSideboxHeader"><span>{lang_title}</span></div> 173 <div> 174 <table width="100%" cellspacing="0" cellpadding="0" border=0> 175 <!-- END extra_blocks_header --> 176 <!-- BEGIN extra_blocks_footer --> 177 </table> 178 </div> 179 </div> 180 <div class="sideboxSpace"></div> 181 <!-- END extra_blocks_footer --> 182 <!-- BEGIN extra_block_row --> 183 <tr class="divSideboxEntry"> 184 <td width="15" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td></tr> 185 <!-- END extra_block_row --> 186 <!-- BEGIN extra_block_spacer --> 187 <tr class="divSideboxEntry"> 188 <td colspan="2" height="8" class="textSidebox"> </td> 189 </tr> 190 <!-- END extra_block_spacer --> -
trunk/phpgwapi/templates/default/navbar_app.tpl
r1246 r1247 1 <td align="{align}" valign="top" width="{width}">{value}</td> 1 <!-- <TD width="10%" align=center><img src="{img_root}/admin.jpg" width="60" height="62"></TD>--> 2 3 <!--<td align="center" width="{width}">{value}</td>--> -
trunk/phpgwapi/templates/default/portal.tpl
r1246 r1247 1 1 <!-- BEGIN portal_box --> 2 < p>3 <table border=" {outer_border}" cellpadding="0" cellspacing="0" width="{outer_width}" bordercolor="{outer_bordercolor}" bgcolor="{outer_bgcolor}">2 <div style="border: 1px solid #adc9d8;border-top:0px"> 3 <table border="0" cellpadding="0" cellspacing="0" width="{outer_width}" height="100%"> 4 4 <tr nowrap align="center"> 5 <td align="center" background="{header_background_image}">{title}</td>{portal_controls}5 <td style="height:19px;border-top:0px;border-bottom:1px solid #d6e2ee;padding:1px;vertical-align:top;background-repeat:repeat-x;background: #fff url(phpgwapi/templates/default/images/bgBlockTitle.png)" align="left" nowrap> <font size="2" color="#003366">{title}</font></td> 6 6 </tr> 7 7 <tr> 8 <td colspan="2">9 <table border=" 1" cellpadding="0" cellspacing="0" width="{inner_width}" bgcolor="{inner_bgcolor}">8 <td style='background: #f4f8fb;border-top:0px solid #adc9d8'> 9 <table border="0" cellpadding="0" height="100%" cellspacing="0" width="{inner_width}"> 10 10 {row} 11 11 </table> … … 13 13 </tr> 14 14 </table> 15 </ p>15 </div> 16 16 <!-- END portal_box --> 17 17 <!-- BEGIN portal_row --> 18 18 <tr> 19 <td >20 {output}19 <td > 20 {output} 21 21 </td> 22 22 </tr> 23 23 <!-- END portal_row --> 24 24 <!-- BEGIN portal_listbox_header --> 25 <td> 26 <ul> 25 <tr> 26 <td> 27 <ul> 27 28 <!-- END portal_listbox_header --> 28 29 <!-- BEGIN portal_listbox_link --> … … 30 31 <!-- END portal_listbox_link --> 31 32 <!-- BEGIN portal_listbox_footer --> 32 </ul> 33 </td> 33 </ul> 34 </td> 35 </tr> 34 36 <!-- END portal_listbox_footer --> 35 37 <!-- BEGIN portal_control --> 36 <td valign="middle" align="right" nowrap background="{header_background_image}">{control_link} 37 </td> 38 <td valign="middle" align="right" nowrap="nowrap">{control_link}</td> 38 39 <!-- END portal_control --> 39 40 <!-- BEGIN link_field -->
Note: See TracChangeset
for help on using the changeset viewer.