Changeset 1042
- Timestamp:
- 06/23/09 14:27:31 (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 1 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/hook_admin.inc.php
r1035 r1042 83 83 $file['CASCRLS'] = $GLOBALS['phpgw']->link('../seguranca/security_admin.php'); 84 84 } 85 } 86 87 88 if (! $GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin')) 89 { 90 $file['subversion'] = $GLOBALS['phpgw']->link('subversion.php'); 91 } 85 } 92 86 93 87 if (! $GLOBALS['phpgw']->acl->check('site_config_access',1,'admin')) -
trunk/admin/templates/azul/config.tpl
r1029 r1042 52 52 <tr class="th"> 53 53 <td colspan="2"> <b>{lang_security}</b></td> 54 </tr> 55 56 <tr class="row_off"> 57 <td valign="top"><pre> 58 Nome, um ponto-e-virgula como separador, e o caminho completo para os drivers dos tokens 59 que serão suportados (Até 10):<br/> 60 61 Ex: ePass2000Lx;/usr/lib/libepsng_p11.so 62 ePass2000Win;c:/windows/system32/ngp11v211.dll 63 64 Estes são os drivers para o token ePass2000, utilizado no Serpro, 65 nos ambientes Linux e Windows respectivamente. 66 67 <b>Atenção</b>: O caminho no ambiente Windows não deve usar contra barra. 68 </pre> </td> 69 <td> 70 <input name="newsettings[test_token11]" value="{value_test_token11}"><br/> 71 <input name="newsettings[test_token21]" value="{value_test_token21}"><br/> 72 <input name="newsettings[test_token31]" value="{value_test_token31}"><br/> 73 <input name="newsettings[test_token41]" value="{value_test_token41}"><br/> 74 <input name="newsettings[test_token51]" value="{value_test_token51}"><br/> 75 <input name="newsettings[test_token61]" value="{value_test_token61}"><br/> 76 <input name="newsettings[test_token71]" value="{value_test_token71}"><br/> 77 <input name="newsettings[test_token81]" value="{value_test_token81}"><br/> 78 <input name="newsettings[test_token91]" value="{value_test_token91}"><br/> 79 <input name="newsettings[test_token101]" value="{value_test_token101}"><br/> 80 </td> 54 81 </tr> 55 82 -
trunk/contactcenter/setup/external_catalogs.inc.php
r404 r1042 3 3 * Created on 20/08/2007 Por Bruno costa 4 4 * 5 * Arquivo de configura cao de catalogos externos5 * Arquivo de configuraᅵᅵo de catï¿œlogos externos 6 6 * 7 7 */ … … 23 23 * 'obj' => 'objectClass that will be used in searches', 24 24 * 'branch' => strtolower('attribute used as branches in the catalog tree'), 25 * 'quicksearch' =>'ExpressoMail's search',26 * 'max_results' =>'Ldap's search limit',25 'quicksearch => 'ExpressoMail's search', 26 'max_results' => 'Ldap's search limit', 27 27 * ), 28 *29 28 * 2 => array( 30 29 * ... … … 47 46 * 48 47 */ 48 49 $external_srcs = array( 50 /* 1 => array( 51 'name' => 'Exchange Fazenda', 52 'host' => '10.30.2.21', 53 'dn' => 'dc=mf,dc=correio', 54 'acc' => 'cn=Carteiro,ou=Serpro,dc=mf,dc=correio', 55 'pw' => 'bfr2000s$', 56 'obj' => 'person', 57 'branch' => '', 58 'quicksearch' => true, 59 'max_results' => 50, 60 61 ),*/ 62 1 => array( 63 'name' => 'Grupos Notes', 64 'host' => '10.30.2.25', 65 'dn' => 'ou=gruposNotes,dc=correiolivre,dc=serpro,dc=gov,dc=br', 66 'acc' => 'cn=admin,dc=correiolivre,dc=serpro,dc=gov,dc=br', 67 'pw' => 'correio', 68 'obj' => 'inetOrgPerson', 69 'branch' => '', 70 'quicksearch' => false, 71 'max_result' => 0, 72 ) 73 ); 74 $external_mappings = array( 75 /* 1 => array( 76 'contact.id_contact' => array('dn'), 77 'contact.photo' => array('jpegPhoto'), 78 'contact.prefixes.prefix' => false, 79 'contact.alias' => array('alias'), 80 'contact.given_names' => array('givenName'), 81 'contact.family_names' => array('sn'), 82 'contact.names_ordered' => array('cn'),//,'displayName'), 83 'contact.suffixes.suffix' => false, 84 'contact.birthdate' => false, 85 'contact.sex' => false, 86 'contact.pgp_key' => false, 87 'contact.notes' => false, 88 'contact.mail_forwarding_address' => array('mailForwardingAddress'), 89 'contact.account_type' => false, 90 'contact.account_status' => false, 91 'contact.account_visible' => false, 92 'contact.object_class' => array('objectClass'), 93 'contact.business_info.title' => array('title'), 94 'contact.business_info.department' => array('ou'), // Setor do empregado... 95 'contact.business_info.empNumber' => array('employeeNumber'), // Matricula do empregado 96 'contact.business_info.celPhone' => array('mobile'), // Celular empresarial do empregado 97 'contact.company.company_name' => array('o'), 98 'contact.company.company_notes' => array('businessCategory'), 99 100 'contact.contact_related.names_ordered' => 'contact.contact_related.typeof_relation.contact_relation_name', 101 'contact.contact_related.typeof_relation.contact_relation_name' => array( 102 'manager' => array('manager'), 103 'secretary' => array('secretary') 104 ), 105 106 'contact.address.address1' => 'contact.address.typeof_address.contact_address_type_name', 107 'contact.address.typeof_address.contact_address_type_name' => array( 108 'home' => array('street', 'st', 'postalAddress', 'homePostalAddress'), 109 ), 110 111 'contact.address.postal_code' => 'contact.address.typeof_address.contact_address_type_name', 112 'contact.address.typeof_address.contact_address_type_name' => array( 113 'home' => array('PostalCode'), 114 ), 115 116 'contact.address.city.city_name' => 'contact.address.typeof_address.contact_address_type_name', 117 'contact.address.typeof_address.contact_address_type_name' => array( 118 'home' => array('l'), 119 ), 120 121 'contact.address.city.state.state_name' => 'contact.address.typeof_address.contact_address_type_name', 122 'contact.address.typeof_address.contact_address_type_name' => array( 123 'home' => false, 124 ), 125 126 'contact.address.city.country.id_country' => 'contact.address.typeof_address.contact_address_type_name', 127 'contact.address.typeof_address.contact_address_type_name' => array( 128 'home' => array('c') 129 ), 130 131 'contact.connection.connection_value' => 'contact.connection.typeof_connection.contact_connection_type_name', 132 'contact.connection.typeof_connection.contact_connection_type_name' => array ( 133 'email' => array('mail'), 134 'phone' => array('telephoneNumber'), 135 // 'mobile' => array('mobile'), 136 'pager' => array('pager'), 137 'fax' => array('facsimileTelephoneNumber'), 138 'telex' => array('telexNumber') 139 ), 140 ),*/ 141 1 => array( 142 'contact.id_contact' => array('dn'), 143 'contact.photo' => array('jpegPhoto'), 144 'contact.prefixes.prefix' => false, 145 'contact.alias' => array('alias'), 146 'contact.given_names' => array('givenName'), 147 'contact.family_names' => array('sn'), 148 'contact.names_ordered' => array('cn'),//,'displayName'), 149 'contact.suffixes.suffix' => false, 150 'contact.birthdate' => false, 151 'contact.sex' => false, 152 'contact.pgp_key' => false, 153 'contact.notes' => false, 154 'contact.mail_forwarding_address' => array('mailForwardingAddress'), 155 'contact.account_type' => false, 156 'contact.account_status' => false, 157 'contact.account_visible' => false, 158 'contact.object_class' => array('objectClass'), 159 'contact.business_info.title' => array('title'), 160 'contact.business_info.department' => array('ou'), // Setor do empregado... 161 'contact.business_info.empNumber' => array('employeeNumber'), // Matricula do empregado 162 'contact.business_info.celPhone' => array('mobile'), // Celular empresarial do empregado 163 'contact.company.company_name' => array('o'), 164 'contact.company.company_notes' => array('businessCategory'), 165 166 'contact.contact_related.names_ordered' => 'contact.contact_related.typeof_relation.contact_relation_name', 167 'contact.contact_related.typeof_relation.contact_relation_name' => array( 168 'manager' => array('manager'), 169 'secretary' => array('secretary') 170 ), 171 172 'contact.address.address1' => 'contact.address.typeof_address.contact_address_type_name', 173 'contact.address.typeof_address.contact_address_type_name' => array( 174 'home' => array('street', 'st', 'postalAddress', 'homePostalAddress'), 175 ), 176 177 'contact.address.postal_code' => 'contact.address.typeof_address.contact_address_type_name', 178 'contact.address.typeof_address.contact_address_type_name' => array( 179 'home' => array('PostalCode'), 180 ), 181 182 'contact.address.city.city_name' => 'contact.address.typeof_address.contact_address_type_name', 183 'contact.address.typeof_address.contact_address_type_name' => array( 184 'home' => array('l'), 185 ), 186 187 'contact.address.city.state.state_name' => 'contact.address.typeof_address.contact_address_type_name', 188 'contact.address.typeof_address.contact_address_type_name' => array( 189 'home' => false, 190 ), 191 192 'contact.address.city.country.id_country' => 'contact.address.typeof_address.contact_address_type_name', 193 'contact.address.typeof_address.contact_address_type_name' => array( 194 'home' => array('c') 195 ), 196 197 'contact.connection.connection_value' => 'contact.connection.typeof_connection.contact_connection_type_name', 198 'contact.connection.typeof_connection.contact_connection_type_name' => array ( 199 'email' => array('mail'), 200 'phone' => array('telephoneNumber'), 201 // 'mobile' => array('mobile'), 202 'pager' => array('pager'), 203 // 'fax' => array('facsimileTelephoneNumber'), 204 'telex' => array('telexNumber') 205 ), 206 207 208 ), 209 ); 210 49 211 ?> -
trunk/doc-expressolivre/debian/arqs-conf/header.inc.php
r254 r1042 10 10 * option) any later version. * 11 11 \**************************************************************************/ 12 /* $Id $ */12 /* $Id: header.inc.php.template,v 1.55.2.1 2004/08/03 14:05:35 reinerj Exp $ */ 13 13 14 14 /**************************************************************************\ … … 22 22 define('PHPGW_INCLUDE_ROOT','/var/www/expresso'); 23 23 $GLOBALS['phpgw_info']['server']['header_admin_user'] = 'expresso-admin'; 24 $GLOBALS['phpgw_info']['server']['header_admin_password'] = ' HEADER_PWD';24 $GLOBALS['phpgw_info']['server']['header_admin_password'] = 'e8d95a51f3af4a3b134bf6bb680a213a'; 25 25 $GLOBALS['phpgw_info']['server']['setup_acl'] = ''; 26 26 27 // Opcoes exlusivas para o Carteiro Expresso 28 $GLOBALS['phpgw_info']['server']['captcha'] = 1; /* troque para 1 para usar o captcha */ 29 $GLOBALS['phpgw_info']['server']['num_badlogin'] = 2; /*Numero de falhas no login antes de pedir o captcha */ 30 $GLOBALS['phpgw_info']['server']['atributoexpiracao'] = 'phpgwLastPasswdChange'; 31 $GLOBALS['phpgw_info']['server']['atributousuarios'] = 'person'; 32 $GLOBALS['phpgw_info']['server']['politicasenhas'] = 'expresso'; /* expresso ou diretorio */ 33 $GLOBALS['phpgw_info']['server']['diretorioescravo'] = 'nao'; /* 1 ou 0 */ 34 $GLOBALS['phpgw_info']['server']['certificado'] = 1; /* troque para 1 para usar o Certificado */ 35 $GLOBALS['phpgw_info']['server']['use_assinar_criptografar'] = 1; 36 $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] = 10; 37 #$GLOBALS['phpgw_info']['server']['corporative_certificate'] = '{CORPORATIVE_CERTIFICATE}'; 38 $GLOBALS['phpgw_info']['server']['versao-Serpro'] = '1.0'; /* soh para o SERPRO */ 39 27 40 // Opcoes exlusivas para o Expresso Livre 28 $GLOBALS['phpgw_info']['server']['use_https'] = 0;29 $GLOBALS['phpgw_info']['server']['sugestoes_email_to'] = ''; 41 $GLOBALS['phpgw_info']['server']['use_https'] = 2; 42 $GLOBALS['phpgw_info']['server']['sugestoes_email_to'] = ''; /* email para receber sugestoes */ 30 43 $GLOBALS['phpgw_info']['server']['domain_name'] = ''; 31 44 $GLOBALS['phpgw_info']['server']['use_prefix_organization'] = False; 45 $GLOBALS['phpgw_info']['server']['use_mailman'] = 0; 46 $GLOBALS['phpgw_info']['server']['contexto_geral'] = '{CONTEXTO_GERAL}'; 47 48 49 /********** INICIO BLOCO MAILMAN ************/ 50 51 // Opcoes usadas com servidor de listas Mailman 52 $GLOBALS['phpgw_info']['server']['use_mailman'] = '0'; 53 $GLOBALS['phpgw_info']['server']['dn_listas'] = ''; 54 $GLOBALS['phpgw_info']['server']['dn_listadmin'] = ''; 55 $GLOBALS['phpgw_info']['server']['dominio_listas'] = ''; 56 $GLOBALS['phpgw_info']['server']['porta_mailman'] = ''; 57 $GLOBALS['phpgw_info']['server']['host_mailman'] = ''; 58 $GLOBALS['phpgw_info']['server']['url_mailman'] = ''; 59 60 /********** FIM BLOCO MAILMAN ***************/ 61 62 32 63 /* eGroupWare domain-specific db settings */ 33 64 $GLOBALS['phpgw_domain']['default'] = array( 34 'db_host' => ' 127.0.0.1',65 'db_host' => 'localhost', 35 66 'db_port' => '5432', 36 67 'db_name' => 'expresso', … … 41 72 // This will limit who is allowed to make configuration modifications 42 73 'config_user' => 'expresso-admin', 43 'config_passwd' => ' HEADER_PWD'74 'config_passwd' => 'e8d95a51f3af4a3b134bf6bb680a213a' 44 75 ); 45 76 -
trunk/login.php
r222 r1042 1 1 <?php 2 //Valida a existencia do cookie, antes de grava-lo 3 if(isset($_COOKIE['contador'])) { 4 $valor_cookie = $_COOKIE['contador']; 5 if($_POST['user'] && $_POST['passwd']) 6 { 7 $valor_cookie = $valor_cookie + 1; 8 setcookie("contador", $valor_cookie,0); 9 } 10 } 11 //Cookie inexistente: tenta gravar um 12 else 13 { 14 if (setcookie("contador", 1,0)) 15 //echo "OK, cookie gravado."; 16 $valor_cookie = 1; 17 else 18 //echo "Nao gravou o cookie"; 19 $valor_cookie = "9999"; // forca captcha 20 } 21 // logout, inicia contador novamente..... 22 if($_GET['cd']=='1' || $_COOKIE['sessionid'] || $_GET['cd'] == 10) 23 { 24 $valor_cookie = 1; 25 setcookie("contador", 1,0); 26 } 27 2 28 /**************************************************************************\ 3 29 * eGroupWare login * … … 90 116 } 91 117 118 $login_include = $GLOBALS['phpgw_info']['server']['template_dir'] . '/login_' . $GLOBALS['phpgw_info']['login_template_set'] . '.php'; 92 119 93 function check_logoutcode($code)120 if(!$login_include || !file_exists($login_include)) 94 121 { 95 switch($code) 96 { 97 case 1: 98 return lang('You have been successfully logged out'); 99 100 case 2: 101 return lang('Sorry, your login has expired'); 102 103 case 4: 104 return lang('Cookies are required to login to this site.'); 105 106 case 5: 107 return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; 108 109 case 6: 110 return '<font color="FF0000">' . lang('Your password has expired, and you do not have access to change it') . '</font>'; 111 112 case 98: 113 return '<font color="FF0000">' . lang('Account is expired') . '</font>'; 114 115 case 99: 116 return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>'; 117 118 case 10: 119 $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid'); 120 $GLOBALS['phpgw']->session->phpgw_setcookie('kp3'); 121 $GLOBALS['phpgw']->session->phpgw_setcookie('domain'); 122 123 //fix for bug php4 expired sessions bug 124 if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4') 125 { 126 $GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID); 127 } 128 129 return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>'; 130 131 default: 132 return ' '; 133 } 134 } 135 136 /* Program starts here */ 137 138 if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER'])) 139 { 140 $submit = True; 141 $login = $_SERVER['PHP_AUTH_USER']; 142 $passwd = $_SERVER['PHP_AUTH_PW']; 143 $passwd_type = 'text'; 144 } 145 else 146 { 147 $passwd = $_POST['passwd']; 148 $passwd_type = $_POST['passwd_type']; 122 $aux = explode('phpgwapi',$GLOBALS['phpgw_info']['server']['template_dir']); 123 $login_include = $aux[0] . 'phpgwapi/templates/default/login_default.php'; 149 124 } 150 125 151 # Apache + mod_ssl style SSL certificate authentication 152 # Certificate (chain) verification occurs inside mod_ssl 153 if($GLOBALS['phpgw_info']['server']['auth_type'] == 'sqlssl' && isset($_SERVER['SSL_CLIENT_S_DN']) && !isset($_GET['cd'])) 154 { 155 # an X.509 subject looks like: 156 # /CN=john.doe/OU=Department/O=Company/C=xx/Email=john@comapy.tld/L=City/ 157 # the username is deliberately lowercase, to ease LDAP integration 158 $sslattribs = explode('/',$_SERVER['SSL_CLIENT_S_DN']); 159 # skip the part in front of the first '/' (nothing) 160 while($sslattrib = next($sslattribs)) 161 { 162 list($key,$val) = explode('=',$sslattrib); 163 $sslattributes[$key] = $val; 164 } 126 include($login_include); 165 127 166 if(isset($sslattributes['Email'])) 167 { 168 $submit = True; 128 ?> 169 129 170 # login will be set here if the user logged out and uses a different username with171 # the same SSL-certificate.172 if(!isset($_POST['login'])&&isset($sslattributes['Email']))173 {174 $login = $sslattributes['Email'];175 # not checked against the database, but delivered to authentication module176 $passwd = $_SERVER['SSL_CLIENT_S_DN'];177 }178 }179 unset($key);180 unset($val);181 unset($sslattributes);182 }183 184 if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit)185 {186 ///// Início - Código temporário: Para renomeação de login com organização para sem. //////187 /* $common = CreateObject('phpgwapi.common');188 $ldap_conn = $common->ldapConnect();189 $justthese = array("uid");190 $filter="(&(phpgwAccountType=u)(uid=".$_POST['user']."))";191 $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese);192 $ldap_info = ldap_get_entries($ldap_conn, $ldap_search);193 if ($ldap_info['count'] != 0) // Verifica se o login existe sem organização.194 {195 $_POST['login'] = $_POST['user'];196 }197 ldap_close($ldap_conn);*/198 /// Fim - Código temporário: Para renomeação de login com organização para sem. //////199 if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&200 !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))201 {202 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=5'));203 }204 205 // don't get login data again when $submit is true206 if($submit == false)207 {208 $login = $_POST['login'];209 }210 211 if(strstr($login,'@') === False && isset($_POST['logindomain']))212 {213 $login .= '@' . $_POST['logindomain'];214 }215 elseif(!isset($GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]))216 {217 $login .= '@'.$GLOBALS['phpgw_info']['server']['default_domain'];218 }219 $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u');220 221 if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])222 {223 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason);224 }225 else226 {227 if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&228 $_POST['lang'] != $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])229 {230 $GLOBALS['phpgw']->preferences->add('common','lang',$_POST['lang'],'session');231 }232 233 if(!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'])234 {235 $GLOBALS['phpgw']->translation->autoload_changed_langfiles();236 }237 $forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward'];238 if (!$forward)239 {240 $extra_vars['cd'] = 'yes';241 $forward = '/home.php';242 }243 else244 {245 list($forward,$extra_vars) = explode('?',$forward,2);246 }247 if ($GLOBALS['phpgw_info']['server']['use_https'] != 2)248 {249 $forward = 'http://'.$_SERVER['HTTP_HOST'].($GLOBALS['phpgw']->link($forward.'?cd=yes'));250 echo "<script language='Javascript1.3'>location.href='".$forward."'</script>";251 }252 else253 {254 $GLOBALS['phpgw']->redirect_link($forward,$extra_vars);255 }256 }257 }258 else259 {260 // !!! DONT CHANGE THESE LINES !!!261 // If there is something wrong with this code TELL ME!262 // Commenting out the code will not fix it. (jengo)263 if(isset($_COOKIE['last_loginid']))264 {265 $accounts = CreateObject('phpgwapi.accounts');266 $prefs = CreateObject('phpgwapi.preferences', $accounts->name2id($_COOKIE['last_loginid']));267 268 if($prefs->account_id)269 {270 $GLOBALS['phpgw_info']['user']['preferences'] = $prefs->read_repository();271 }272 }273 if ($_GET['lang'])274 {275 $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang'];276 }277 elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id)278 {279 // If the lastloginid cookies isn't set, we will default to the first language,280 // the users browser accepts.281 list($lang) = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);282 /*283 if(strlen($lang) > 2)284 {285 $lang = substr($lang,0,2);286 }287 */288 $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang;289 }290 #print 'LANG:' . $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] . '<br>';291 292 $GLOBALS['phpgw']->translation->init(); // this will set the language according to the (new) set prefs293 $GLOBALS['phpgw']->translation->add_app('login');294 $GLOBALS['phpgw']->translation->add_app('loginscreen');295 if(lang('loginscreen_message') == 'loginscreen_message*')296 {297 $GLOBALS['phpgw']->translation->add_app('loginscreen','en'); // trying the en one298 }299 if(lang('loginscreen_message') != 'loginscreen_message*')300 {301 $tmpl->set_var('lang_message',stripslashes(lang('loginscreen_message')));302 }303 }304 305 if($GLOBALS['phpgw_info']['server']['use_prefix_organization'])306 {307 $organization_select = "<tr><td width=\"66\" class=\"loginLabel\">";308 $organization_select .= lang("organization").":</td>";309 $organization_select .="<td width=\"135\">";310 $organization_select .="<select name=\"organization\">\n";311 312 $obj_organization = CreateObject('phpgwapi.sector_search_ldap');313 $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);314 315 for ($i=0; $i<count($organizations); $i++)316 {317 $tmp_array[strtolower($organizations[$i])] = $organizations[$i];318 }319 320 $arrayOrganization = $tmp_array;321 ksort($arrayOrganization);322 323 foreach($arrayOrganization324 as $organization_name => $organization_vars)325 {326 $organization_select .= '<option value="' . $organization_name . '"';327 328 if($organization_name == $_COOKIE['last_organization'])329 {330 $organization_select .= ' selected';331 }332 $organization_select .= '>' . $organization_vars . "</option>\n";333 }334 $organization_select .= "</select>\n";335 $organization_select .="</td><td> </td></tr>";336 $tmpl->set_var('select_organization',$organization_select);337 }338 339 $domain_select = ' ';340 $last_loginid = $_COOKIE['last_loginid'];341 if($GLOBALS['phpgw_info']['server']['show_domain_selectbox'])342 {343 $domain_select = "<select name=\"logindomain\">\n";344 foreach($GLOBALS['phpgw_domain'] as $domain_name => $domain_vars)345 {346 $domain_select .= '<option value="' . $domain_name . '"';347 348 if($domain_name == $_COOKIE['last_domain'])349 {350 $domain_select .= ' selected';351 }352 $domain_select .= '>' . $domain_name . "</option>\n";353 }354 $domain_select .= "</select>\n";355 }356 elseif($last_loginid !== '')357 {358 reset($GLOBALS['phpgw_domain']);359 list($default_domain) = each($GLOBALS['phpgw_domain']);360 361 if($_COOKIE['last_domain'] != $default_domain && !empty($_COOKIE['last_domain']))362 {363 $last_loginid .= '@' . $_COOKIE['last_domain'];364 }365 }366 $tmpl->set_var('select_domain',$domain_select);367 368 foreach($_GET as $name => $value)369 {370 if(ereg('phpgw_',$name))371 {372 $extra_vars .= '&' . $name . '=' . urlencode($value);373 }374 }375 376 if($extra_vars)377 {378 $extra_vars = '?' . substr($extra_vars,1);379 }380 381 /********************************************************\382 * Check is the registration app is installed, activated *383 * And if the register link must be placed *384 \********************************************************/385 386 $cnf_reg = createobject('phpgwapi.config','registration');387 $cnf_reg->read_repository();388 $config_reg = $cnf_reg->config_data;389 390 if($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True')391 {392 $reg_link=' <a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>';393 }394 395 $GLOBALS['phpgw_info']['server']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];396 397 $tmpl->set_var('register_link',$reg_link);398 $tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());399 $tmpl->set_var('login_url', $GLOBALS['phpgw_info']['server']['webserver_url'] . '/login.php' . $extra_vars);400 $tmpl->set_var('registration_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . '/registration/');401 $tmpl->set_var('version',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);402 $tmpl->set_var('cd',check_logoutcode($_GET['cd']));403 $tmpl->set_var('cookie',$last_loginid);404 405 $tmpl->set_var('lang_username',lang('username'));406 $tmpl->set_var('lang_password',lang('password'));407 $tmpl->set_var('lang_login',lang('login'));408 409 $tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);410 $tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']);411 $tmpl->set_var('bg_color',($GLOBALS['phpgw_info']['server']['login_bg_color']?$GLOBALS['phpgw_info']['server']['login_bg_color']:'FFFFFF'));412 $tmpl->set_var('bg_color_title',($GLOBALS['phpgw_info']['server']['login_bg_color_title']?$GLOBALS['phpgw_info']['server']['login_bg_color_title']:'486591'));413 414 if($GLOBALS['phpgw_info']['server']['use_frontend_name'])415 $tmpl->set_var('frontend_name', " - ".$GLOBALS['phpgw_info']['server']['use_frontend_name']);416 417 if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'],0,4) == 'http')418 {419 $var['logo_file'] = $GLOBALS['phpgw_info']['server']['login_logo_file'];420 }421 else422 {423 $var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo');424 }425 $var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';426 if (substr($var['logo_url'],0,4) != 'http')427 {428 $var['logo_url'] = 'http://'.$var['logo_url'];429 }430 $var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';431 $tmpl->set_var($var);432 433 if (@$GLOBALS['phpgw_info']['server']['login_show_language_selection'])434 {435 $select_lang = '<select name="lang" onchange="'."location.href=location.href+(location.search?'&':'?')+'lang='+this.value".'">';436 $langs = $GLOBALS['phpgw']->translation->get_installed_langs();437 uasort($langs,'strcasecmp');438 foreach ($langs as $key => $name) // if we have a translation use it439 {440 $select_lang .= "\n\t".'<option value="'.$key.'"'.($key == $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] ? ' selected="1"' : '').'>'.$name.'</option>';441 }442 $select_lang .= "\n</select>\n";443 $tmpl->set_var(array(444 'lang_language' => lang('Language'),445 'select_language' => $select_lang,446 ));447 }448 else449 {450 $tmpl->set_block('login_form','language_select');451 $tmpl->set_var('language_select','');452 }453 454 $tmpl->set_var('autocomplete', ($GLOBALS['phpgw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));455 456 $tmpl->pfp('loginout','login_form');457 ?> -
trunk/phpgwapi/templates/azul/login.tpl
r963 r1042 14 14 15 15 function setLogin(){ 16 if( document.f orm_login.organization != null)17 document.f orm_login.login.value = document.form_login.organization.value+'-'+document.form_login.user.value;16 if( document.flogin.organization != null) 17 document.flogin.login.value = document.flogin.organization.value+'-'+document.flogin.user.value; 18 18 else 19 document.f orm_login.login.value = document.form_login.user.value;19 document.flogin.login.value = document.flogin.user.value; 20 20 } 21 21 22 22 function getLogin(){ 23 23 var cookie = '{cookie}'; 24 if( document.f orm_login.organization != null)25 document.f orm_login.user.value= cookie.substring(cookie.indexOf('-')+1,cookie.length);24 if( document.flogin.organization != null) 25 document.flogin.user.value= cookie.substring(cookie.indexOf('-')+1,cookie.length); 26 26 else 27 document.f orm_login.user.value= cookie;27 document.flogin.user.value= cookie; 28 28 29 if(document.f orm_login.user.value == '') {30 if(document.f orm_login.organization != null)31 document.f orm_login.organization.focus();29 if(document.flogin.user.value == '') { 30 if(document.flogin.organization != null) 31 document.flogin.organization.focus(); 32 32 else 33 document.f orm_login.user.focus();33 document.flogin.user.focus(); 34 34 } 35 35 else 36 document.f orm_login.passwd.focus();36 document.flogin.passwd.focus(); 37 37 } 38 38 … … 53 53 <div id="login"> 54 54 <div align="center"> 55 <form name="f orm_login" method="post" action="{login_url}" {autocomplete}>55 <form name="flogin" method="post" action="{login_url}" {autocomplete}> 56 56 <input type="hidden" name="passwd_type" value="text"> 57 57 <input type="hidden" name="account type" value="u"> … … 60 60 <div id="reflexo"> 61 61 <div class="titulo_login">Expresso Livre</div> 62 <div id="mensagem" class="msgInicial" style="display:no ne;">{cd}<br>{lang_message}</div> 63 <div id="conteudo_login"> 62 <div id="mensagem" class="msgInicial" >{cd}<br>{lang_message}</div> 63 {action} 64 <div id="conteudo_login" style="display:{show};"> 64 65 <div class="login_label"> 65 66 <label for="usuario">{lang_username}</label> … … 67 68 <input class="input" type="text" maxlength="50" size="20" name="user" id="user" value=""> 68 69 </div> 70 69 71 <div class="login_label"> 70 72 <label for="senha">{lang_password}</label> … … 72 74 <input class="input" type="password" maxlength="50" size="20" name="passwd" id="passwd" value=""> 73 75 </div> 74 <br /> 75 <input value="{lang_login}" name="submitit" class="button" onclick="javascript:setLogin()" type="submit" /> 76 </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> 77 83 </div> 78 84 <div id="rodape_login"> 79 <div class="ajuda"><a href="#">Ajuda</a></div> 85 <div class="ajuda"><a href="#" >Ajuda</a></div> 86 80 87 </div> 81 88 </div> … … 105 112 </div> 106 113 </div> 114 <div>{applet}</div> 107 115 </body></html> -
trunk/phpgwapi/templates/azul/login_azul.php
r949 r1042 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="./seguranca/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/azul/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/azul/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="code" value="LoginApplet.class"> \' + 475 \'<param name="locale" value="' . $lang . '"> \' + 476 \'<param name="mayscript" value="true"> \' + ' 477 . $param1 478 . ' \'<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"> \' + 479 \'</object>\'); 480 } 481 else { 482 document.write(\'<embed style="display:yes;width:0;height:0;vertical-align:bottom;" id="login_applet" code="LoginApplet.class" locale="' . $lang . '"\' + 483 \'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" \' + ' 484 . $param2 485 . ' \'type="application/x-java-applet;version=1.5" mayscript > \' + 486 \'<noembed> \' + 487 \'No Java Support. \' + 488 \'</noembed> \' + 489 \'</embed> \'); 490 } 491 </script>'; 492 493 494 } 495 496 else 497 { 498 if($GLOBALS['phpgw_info']['server']['certificado']==1) 499 { 500 $tmpl->set_var('show','yes'); 501 $link_alterna_login = '<img border=0 style="padding: 0px" src="phpgwapi/templates/azul/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>'; 502 } 503 $tmpl->set_var('lang_username',lang('username')); 504 $tmpl->set_var('action',''); 505 $cod_applet = ''; 506 507 } 508 509 $tmpl->set_var('applet',$cod_applet); 510 $tmpl->set_var('link_alterna_login',$link_alterna_login); 511 512 377 513 $tmpl->pfp('loginout','login_form'); 378 514 ?> 515 -
trunk/preferences/changepassword.php
r545 r1042 20 20 include('../header.inc.php'); 21 21 22 function grava_senha_criptografada_com_certificado_no_ldap($aux_uid,$aux_senha) 23 { 24 require_once('/var/www/expresso/seguranca/classes/CertificadoB.php'); 25 $ldap_context = $GLOBALS['phpgw_info']['server']['ldap_context']; 26 $ldap_servidor = $GLOBALS['phpgw_info']['server']['ldap_host']; 27 $ldap_dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 28 $ldap_passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 29 30 $cc=ldap_connect($ldap_servidor); 31 32 // bind .. 33 $sr=ldap_bind($cc,$ldap_dn,$ldap_passwd); 34 35 $filtro = 'uidNumber='.$aux_uid; 36 37 // Pesquisa uidNumber no LDAP 38 $sr=ldap_search($cc, $ldap_context,$filtro); 39 40 // Pega resultado .... 41 $info = ldap_get_entries($cc, $sr); 42 43 // Tem de achar só uma entrada.....ao menos uma.... 44 if($info["count"]!=1) 45 { 46 ldap_close($cc); 47 return false; 48 } 49 50 if(!$info[0]["usercertificate"][0]) 51 { 52 //Usuario sem certificado cadastrado 53 ldap_close($cc); 54 return false; 55 } 56 57 $a = new certificadoB(); 58 $R = $a->encriptar_senha($aux_senha,$info[0]["usercertificate"][0]); 59 if(!$R) 60 { 61 return false; 62 } 63 $user_info = array(); 64 $aux1 = $info[0]["dn"]; 65 $user_info['cryptpassword'] = $R; 66 ldap_modify($cc,$aux1,$user_info); 67 68 ldap_close($cc); 69 70 return true; 71 } 72 22 73 $a_passwd = $_POST['a_passwd']; 23 74 $n_passwd = $_POST['n_passwd']; … … 129 180 $GLOBALS['hook_values']['new_passwd'] = $n_passwd; 130 181 $GLOBALS['phpgw']->hooks->process('changepassword'); 182 183 if($GLOBALS['phpgw_info']['server']['certificado']) 184 { 185 if(!$GLOBALS['phpgw_info']['server']['atributousuarios'] or $GLOBALS['phpgw_info']['server']['atributousuarios'] == "person") 186 { 187 $RR = grava_senha_criptografada_com_certificado_no_ldap($GLOBALS['phpgw_info']['user']['account_id'],$n_passwd); 188 } 189 } 131 190 132 191 if ($GLOBALS['phpgw_info']['server']['use_https'] == 1) -
trunk/setup/manageheader.php
r1035 r1042 10 10 \**************************************************************************/ 11 11 12 /* $Id: manageheader.php,v 1.1 2006/09/15 14:36:29 niltonneto Exp $ */ 12 13 13 14 $phpgw_info = array(); … … 174 175 $action = @get_var('action',Array('POST')); 175 176 list($action) = @each($action); 177 176 178 switch($action) 177 179 { … … 232 234 echo lang('Please check read/write permissions on directories, or back up and use another option.') . '<br>'; 233 235 echo '</td></tr></table></body></html>'; 236 break; 234 237 } 235 238 break; … … 591 594 case '0': 592 595 $setup_tpl->set_var('use_https_0',' checked'); 596 $setup_tpl->set_var('div_cert',' style="display:none" '); 593 597 break; 594 598 case '1': 595 599 $setup_tpl->set_var('use_https_1',' checked'); 600 $setup_tpl->set_var('div_cert',' '); 596 601 break; 597 602 case '2': 598 603 $setup_tpl->set_var('use_https_2',' checked'); 599 break; 600 } 601 602 switch($GLOBALS['phpgw_info']['server']['use_assinar_criptografar']) 604 $setup_tpl->set_var('div_cert',' '); 605 break; 606 } 607 608 switch($GLOBALS['phpgw_info']['server']['certificado']) 609 { 610 case '0': 611 $setup_tpl->set_var('certificado_0',' checked'); 612 break; 613 case '1': 614 $setup_tpl->set_var('certificado_1',' checked'); 615 break; 616 default: 617 $setup_tpl->set_var('certificado_0',' checked'); 618 } 619 620 switch($GLOBALS['phpgw_info']['server']['captcha']) 621 { 622 case '0': 623 $setup_tpl->set_var('captcha_0',' checked'); 624 $setup_tpl->set_var('div_badlogin',' style="display:none" '); 625 break; 626 case '1': 627 $setup_tpl->set_var('captcha_1',' checked'); 628 break; 629 default: 630 $setup_tpl->set_var('captcha_0',' checked'); 631 $setup_tpl->set_var('div_badlogin',' style="display:none" '); 632 } 633 634 635 if($GLOBALS['phpgw_info']['server']['num_badlogin']) 636 { 637 $setup_tpl->set_var('num_badlogin',$GLOBALS['phpgw_info']['server']['num_badlogin']); 638 } 639 else 640 { 641 $setup_tpl->set_var('num_badlogin','0'); 642 } 643 644 645 switch($GLOBALS['phpgw_info']['server']['use_assinar_criptografar']) 603 646 { 604 647 case '0': … … 611 654 $setup_tpl->set_var('use_assinar_criptografar_0',' checked'); 612 655 } 613 656 614 657 if($GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher']) 615 658 { … … 620 663 $setup_tpl->set_var('num_max_certs_to_cipher','10'); 621 664 } 665 /* 666 if($GLOBALS['phpgw_info']['server']['corporative_certificate']) 667 { 668 $setup_tpl->set_var('corporative_certificate',$GLOBALS['phpgw_info']['server']['corporative_certificate']); 669 } 670 else 671 { 672 $setup_tpl->set_var('corporative_certificate',''); 673 } 674 */ 675 if($GLOBALS['phpgw_info']['server']['atributoexpiracao']) 676 { 677 $setup_tpl->set_var('atributoexpiracao',$GLOBALS['phpgw_info']['server']['atributoexpiracao']); 678 } 679 else 680 { 681 $setup_tpl->set_var('atributoexpiracao', 'phpgwaccountexpires'); 682 } 683 if($GLOBALS['phpgw_info']['server']['atributousuarios']) 684 { 685 $setup_tpl->set_var('atributousuarios',$GLOBALS['phpgw_info']['server']['atributousuarios']); 686 } 687 else 688 { 689 $setup_tpl->set_var('atributousuarios', 'serprousr'); 690 } 691 switch($GLOBALS['phpgw_info']['server']['politicasenhas']) 692 { 693 case 'expresso': 694 $setup_tpl->set_var('politicasenhas_expresso',' checked'); 695 break; 696 case 'diretorio': 697 $setup_tpl->set_var('politicasenhas_diretorio',' checked'); 698 break; 699 default: 700 $setup_tpl->set_var('politicasenhas_expresso',' checked'); 701 } 702 switch($GLOBALS['phpgw_info']['server']['diretorioescravo']) 703 { 704 case 'sim': 705 $setup_tpl->set_var('diretorioescravo_true',' checked'); 706 break; 707 case 'nao': 708 $setup_tpl->set_var('diretorioescravo_false',' checked'); 709 break; 710 default: 711 $setup_tpl->set_var('diretorioescravo_false',' checked'); 712 } 713 714 /********************* INICIO BLOCO MAILMAN **************************/ 715 716 switch($GLOBALS['phpgw_info']['server']['use_mailman']) 717 { 718 case '0': 719 $setup_tpl->set_var('use_mailman_0',' checked'); 720 $setup_tpl->set_var('div_mailman',' style="display: none;" '); 721 break; 722 case '1': 723 $setup_tpl->set_var('use_mailman_1',' checked'); 724 $setup_tpl->set_var('div_mailman',''); 725 break; 726 default: 727 $setup_tpl->set_var('use_mailman_0',' checked'); 728 $setup_tpl->set_var('div_mailman',' style="display: none;" '); 729 } 730 731 if($GLOBALS['phpgw_info']['server']['dn_listas']) 732 { 733 $setup_tpl->set_var('dn_listas',$GLOBALS['phpgw_info']['server']['dn_listas']); 734 } 735 736 if($GLOBALS['phpgw_info']['server']['dn_listadmin']) 737 { 738 $setup_tpl->set_var('dn_listadmin',$GLOBALS['phpgw_info']['server']['dn_listadmin']); 739 } 740 741 if($GLOBALS['phpgw_info']['server']['dominio_listas']) 742 { 743 $setup_tpl->set_var('dominio_listas',$GLOBALS['phpgw_info']['server']['dominio_listas']); 744 } 745 746 if($GLOBALS['phpgw_info']['server']['porta_mailman']) 747 { 748 $setup_tpl->set_var('porta_mailman',$GLOBALS['phpgw_info']['server']['porta_mailman']); 749 } 750 751 if($GLOBALS['phpgw_info']['server']['host_mailman']) 752 { 753 $setup_tpl->set_var('host_mailman',$GLOBALS['phpgw_info']['server']['host_mailman']); 754 } 755 756 if($GLOBALS['phpgw_info']['server']['url_mailman']) 757 { 758 $setup_tpl->set_var('url_mailman',$GLOBALS['phpgw_info']['server']['url_mailman']); 759 } 760 761 /********************* FIM BLOCO MAILMAN **************************/ 622 762 623 763 if(@$GLOBALS['phpgw_info']['server']['sugestoes_email_to']) -
trunk/setup/templates/default/manageheader.tpl
r1035 r1042 14 14 return false; 15 15 } 16 17 /***** INICIO BLOCO MAILMAN *****/ 18 19 function ocultar(zdiv) 20 { 21 var xdiv = document.getElementById(zdiv); 22 23 if(xdiv.id == "certificado") { 24 xdiv.style.display='none'; 25 var xdiv = document.getElementById('cert_0'); 26 xdiv.checked = true; 27 } 28 29 if(xdiv.id == "conf_mailman") { 30 xdiv.style.display='none'; 31 document.getElementById('use_mail_0').checked = true; 32 } 33 if(xdiv.id == "badlogin") { 34 xdiv.style.display='none'; 35 var xdiv = document.getElementById('badlogintxt'); 36 xdiv.value='0'; 37 } 38 } 39 40 function exibir(zdiv) 41 { 42 var xdiv = document.getElementById(zdiv); 43 xdiv.style.display=''; 44 } 45 46 /***** FIM BLOCO MAILMAN *****/ 47 48 function getEvent(e) 49 // Retorna um dicionï¿œrio com o objeto evento e o cï¿œdigo da tecla pressionada 50 { 51 var d 52 var keycode 53 var evento 54 if (window.event) 55 d = { e: window.event, keycode: window.event.keyCode } 56 else 57 { 58 if (e) 59 d = { e: e, keycode: e.which } 60 else 61 return null 62 } 63 return d 64 } 65 66 function soNumero(myfield, e) 67 // Permite a digitaᅵᅵo de apenas nï¿œmeros em campos de formulï¿œrios 68 // Utilizaᅵᅵo: <input type="text" onkeypress="return soNumero(this, event);"> 69 { 70 71 var d = getEvent(e); 72 var e = d['e']; 73 var keycode = d['keycode']; 74 if (e == null) return true; 75 // Tecla de funᅵᅵo (Ctrl, Alt), deixa passar 76 if (e.ctrlKey || e.metaKey || keycode < 32) 77 return true; 78 else 79 return (keycode > 47 && keycode < 58); // false se tecla nï¿œo for numï¿œrica 80 } 81 16 82 //--> 17 83 </script> … … 91 157 </tr>{comment_r} 92 158 93 <!-- INICIO configura ções exclusivas para o ExpressoLivre -->159 <!-- INICIO configuraᅵᅵes exclusivas para o ExpressoLivre --> 94 160 <tr><td><br></td></tr> 95 161 <th colspan="2" class="th">ExpressoLivre</th> 96 162 </td></tr> 163 164 <tr><td colspan="2"> 165 <fieldset><legend>HTTPS</legend> 166 <table> 97 167 <tr><td colspan="2"><b>Usar HTTPS?</b></td></tr> 98 168 <tr><td colspan="2"> 99 <font color='red'>Obs.: Apenas use https no site, caso o apache esteja configurado para isto. A porta 443 DEVE estar acessível.</font><br>100 <INPUT type="radio"{use_https_0} name="setting[use_https]" value="0" >NÃO Usar HTTPS no site.<BR>101 <INPUT type="radio"{use_https_1} name="setting[use_https]" value="1" >Usar HTTPS apenas no Login.<BR>102 <INPUT type="radio"{use_https_2} name="setting[use_https]" value="2" >Usar HTTPS no Site inteiro.<BR>169 <font color='red'>Obs.: Apenas use https no site, caso o apache esteja configurado para isto. A porta 443 DEVE estar liberada.</font><br> 170 <INPUT type="radio"{use_https_0} name="setting[use_https]" value="0" onclick="javascript:ocultar('certificado')">NAO Usar HTTPS no site.<BR> 171 <INPUT type="radio"{use_https_1} name="setting[use_https]" value="1" onclick="javascript:exibir('certificado')" >Usar HTTPS apenas no Login.<BR> 172 <INPUT type="radio"{use_https_2} name="setting[use_https]" value="2" onclick="javascript:exibir('certificado')" >Usar HTTPS no Site inteiro.<BR> 103 173 </td></tr> 104 105 <tr><td colspan="2"> 106 <fieldset><legend>Segurança</legend> 107 <table> 108 <tr><td colspan="2"><b>Habilitar Assinar/Cifrar digitalmente?</b></td></tr> 174 <tr><td colspan="2"> 175 <div id="certificado" {div_cert}> 176 <table> 177 <tr><td colspan="2"><b>Usar Certificado Digital(para identificar o usuario no processo de login)?</b></td></tr> 178 <tr><td colspan="2"> 179 <font color='red'>Obs.: Para usar certificado Digital o uso do HTTPS deve ter sido selecionado no item acima.</font><br> 180 <INPUT id="cert_0" type="radio" {certificado_0} name="setting[certificado]" value="0" >Nao Usar Certificado Digital.<BR> 181 <INPUT id="cert_1" type="radio" {certificado_1} name="setting[certificado]" value="1">Usar Certificado Digital.<BR> 182 </td></tr> 183 </table> 184 </div> 185 186 </td></tr> 187 </table> 188 </fieldset> 189 </td></tr> 190 191 <tr><td colspan="2"> 192 <fieldset><legend> Anti-Robo</legend> 193 <table> 194 <tr><td colspan="2"><b>Usar Anti-Robo(CAPTCHA) ?</b></td></tr> 195 <tr><td colspan="2"> 196 <INPUT type="radio" {captcha_0} name="setting[captcha]" value="0" onclick="javascript:ocultar('badlogin')">NAO Usar Anti-Robo.<BR> 197 <INPUT type="radio" {captcha_1} name="setting[captcha]" value="1" onclick="javascript:exibir('badlogin')" >Usar Anti-Robo.<BR> 198 </td></tr> 199 200 <tr><td colspan="2"> 201 <div id="badlogin" {div_badlogin}> 202 <table> 203 <tr><td colspan="2"><b>Numero de falhas no login, antes de exibir o codigo do Anti-robo ?</b></td></tr> 204 <tr><td colspan="2"> 205 <INPUT type="text" maxlength="2" size="3" name="setting[num_badlogin]" id="badlogintxt" value="{num_badlogin}" onkeypress="return soNumero(this, event);"> 206 </td></tr> 207 </table> 208 </div> 209 210 </td></tr> 211 </table> 212 </fieldset> 213 </td></tr> 214 215 216 <tr><td colspan="2"> 217 <fieldset><legend>Segurança</legend> 218 <table> 219 <tr><td colspan="2"><b>Habilitar Assinar/Criptografar digitalmente?</b></td></tr> 109 220 <tr><td colspan="2"> 110 221 <INPUT type="radio" {use_assinar_criptografar_0} name="setting[use_assinar_criptografar]" value="0" />NAO habilitar.<BR> 111 222 <INPUT type="radio" {use_assinar_criptografar_1} name="setting[use_assinar_criptografar]" value="1" />Habilitar.<BR> 112 223 </td></tr> 113 <tr><td colspan="2"><b>Numero maximo de destinat ários para uma mensagem cifrada:</b><br>Este valor e utilizado se Assinar/Criptografar for habilitado.</td></tr>224 <tr><td colspan="2"><b>Numero maximo de destinatarios para uma mensagem cifrada:</b><br>Este valor e utilizado se Assinar/Criptografar for habilitado.</td></tr> 114 225 <tr><td colspan="2"> 115 226 <INPUT type="text" maxlength="2" size="3" name="setting[num_max_certs_to_cipher]" id="maxcerttxt" value="{num_max_certs_to_cipher}" onkeypress="return soNumero(this, event);"> … … 119 230 <tr><td colspan="2"> 120 231 <INPUT type="text" size="40" name="setting[corporative_certificate]" id="corpcerttxt" value="{corporative_certificate}" > 121 </td></tr> 232 </td></tr> 122 233 --> 123 234 </fieldset> … … 125 236 <br> 126 237 127 <tr><td colspan="2"><b>Digite os endereços de emails, separados por vírgula, que devem receber as sugestões enviados pelos usuários.</b></td></tr> 128 <tr><td colspan="2"><INPUT size="50" name="setting[sugestoes_email_to]" value="{sugestoes_email_to}"></td></tr> 129 130 <tr><td colspan="2"><b>Digite parte do seu domínio. Esta parte de domínio será concatenado a organização do usuário para formar o domínio do usuário. Ex.: usuario@organizacao.dominio -> joao@celepar.pr.gov.br, o pr.gov.br é a parte do domínio.</b></td></tr> 238 239 <tr><td nowrap> 240 <b>Nome do atributo , no ldap, para controle de expiracao da senhas.</b> 241 </td></tr> 242 <tr><td> 243 <INPUT type="text" maxlength="50" size="40" name="setting[atributoexpiracao]" id="atributoexpiracaotxt" value="{atributoexpiracao}" > 244 </td></tr> 245 <tr><td nowrap> 246 <b>Classe ldap utilizada para identificar os usuarios.</b> 247 </td></tr> 248 <tr><td> 249 <INPUT type="text" maxlength="50" size="40" name="setting[atributousuarios]" id="atributousuarios" value="{atributousuarios}" > 250 <tr><td colspan="2"> 251 <fieldset><legend>Politica de Senhas</legend> 252 <table> 253 <tr><td colspan="2"><b>Usar qual politica de senhas?</b></td></tr> 254 <tr><td colspan="2"> 255 <INPUT type="radio" {politicasenhas_expresso} name="setting[politicasenhas]" value="expresso" />Utilizar as politicas de senha do Expresso.<BR> 256 <INPUT type="radio" {politicasenhas_diretorio} name="setting[politicasenhas]" value="diretorio" />Utilizar as politicas de senha do Diretorio Ldap.<BR> 257 </td></tr> 258 </table> 259 <tr><td colspan="2"> 260 <fieldset><legend>Escrita em diretorios escravos</legend> 261 <table> 262 <tr><td colspan="2"><b>O Expresso deve tentar escrever em diretorios escravos?</b></td></tr> 263 <tr><td colspan="2"> 264 <INPUT type="radio" {diretorioescravo_true} name="setting[diretorioescravo]" value="sim" />Escrever em diretorios escravos.<BR> 265 <INPUT type="radio" {diretorioescravo_false} name="setting[diretorioescravo]" value="nao" />NAO escrever em diretorios escravos.<BR> 266 </td></tr> 267 </table> 268 </td></tr> 269 270 271 <!-- INICIO BLOCO MAILMAN --> 272 273 <tr><td colspan="2"> 274 <fieldset><legend>Mailman</legend> 275 <table> 276 <tr><td colspan="2"><b>Usar Mailman?</b></td></tr> 277 <tr><td colspan="2"> 278 <INPUT id="use_mail_0" type="radio" {use_mailman_0} name="setting[use_mailman]" value="0" onclick="javascript:ocultar('conf_mailman')" />NAO usar listas no Mailman.<BR> 279 <INPUT id="use_mail_1" type="radio" {use_mailman_1} name="setting[use_mailman]" value="1" onclick="javascript:exibir('conf_mailman')" />Usar listas no Mailman.<BR> 280 </td></tr> 281 </table> 282 <table id="conf_mailman" {div_mailman} > 283 <tr><td colspan="2"><b>Digite o DN usado pelas listas. (Ex.: ou=listas,dc=company,dc=com,dc=br)</b></td></tr> 284 <tr><td colspan="2"> 285 <INPUT size="50" name="setting[dn_listas]" value="{dn_listas}" /> 286 </td></tr> 287 <tr><td colspan="2"><b>Digite o DN do grupo listadmin. (Ex.: ou=grupos,dc=company,dc=com,dc=br)</b></td></tr> 288 <tr><td colspan="2"> 289 <INPUT size="50" name="setting[dn_listadmin]" value="{dn_listadmin}" /> 290 </td></tr> 291 <tr><td colspan="2"><b>Digite o dominio usado pelas listas. (Ex.: dominio.com.br)</b></td></tr> 292 <tr><td colspan="2"> 293 <INPUT size="50" name="setting[dominio_listas]" value="{dominio_listas}" /> 294 </td></tr> 295 <tr><td colspan="2"><b>Digite a porta utilizada pelo Mailman. (Ex: 80)</b></td></tr> 296 <tr><td colspan="2"> 297 <INPUT size="50" name="setting[porta_mailman]" value="{porta_mailman}" onkeypress="return soNumero(this, event);"/> 298 </td></tr> 299 <tr><td colspan="2"><b>Digite o endereco IP do servidor Mailman. (Ex.: 192.168.0.1)</b></td></tr> 300 <tr><td colspan="2"> 301 <INPUT size="50" name="setting[host_mailman]" value="{host_mailman}" /> 302 </td></tr> 303 <tr><td colspan="2"><b>Digite o caminho do programa de sincronizacao do Mailman.</b></td></tr> 304 <tr><td colspan="2"> 305 <INPUT size="50" name="setting[url_mailman]" value="{url_mailman}" /> 306 </td></tr> 307 </table> 308 309 <!-- FIM BLOCO MAILMAN --> 310 311 <tr><td colspan="2"><b>Digite os enderecos de emails, separados por virgula, que devem receber as sugestoes enviadas pelos usuarios.</b></td></tr> 312 <tr><td colspan="2"><INPUT size="100" name="setting[sugestoes_email_to]" value="{sugestoes_email_to}"></td></tr> 313 314 <tr><td colspan="2"><b>Digite parte do seu dominio. Esta parte de dominio sera concatenada a organizacao do usuario para formar o dominio do usuario. Ex.: usuario@organizacao.dominio -> joao@serpro.gov.br, o gov.br a parte do dominio.</b></td></tr> 131 315 <tr><td colspan="2"><INPUT size="50" name="setting[domain_name]" value="{domain_name}"></td></tr> 132 316 133 317 <th colspan="2" class="th"> </th> 134 <!-- FIM configura ções exclusivas para o ExpressoLivre -->318 <!-- FIM configuraᅵᅵes exclusivas para o ExpressoLivre --> 135 319 136 320 <tr>
Note: See TracChangeset
for help on using the changeset viewer.