Changeset 597
- Timestamp:
- 01/13/09 18:22:43 (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiconfig.inc.php
r547 r597 157 157 do algoritmo. 158 158 */ 159 159 160 $dir = $GLOBALS['phpgw']->common->get_app_dir($appname) . "/inc"; 160 161 $options = ' '; … … 177 178 } 178 179 179 /*180 * FCK editor para o termo de aceite181 */182 include_once("news_admin/inc/fckeditor.php");183 $texto_termo_aceite = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : '';184 $oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]');185 $oFCKeditor->BasePath = 'news_admin/templates/celepar/fckeditor/';186 $oFCKeditor->ToolbarSet = 'Basic';187 $oFCKeditor->Value = $texto_termo_aceite;188 189 $t->set_var('agree_term_input',$oFCKeditor->Create());190 180 191 181 if($appname=="admin") { 182 /* 183 * FCK editor para o termo de aceite 184 */ 185 include_once("news_admin/inc/fckeditor.php"); 186 $texto_termo_aceite = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : ''; 187 $oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]'); 188 $oFCKeditor->BasePath = 'news_admin/templates/celepar/fckeditor/'; 189 $oFCKeditor->ToolbarSet = 'Basic'; 190 $oFCKeditor->Value = $texto_termo_aceite; 191 $t->set_var('agree_term_input',$oFCKeditor->Create()); 192 } 192 193 $t->set_var('title',lang('Site Configuration')); 193 194 $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)); -
trunk/admin/templates/celepar/config.tpl
r548 r597 147 147 <td>{lang_Enter_your_VoIP_server_port}:</td> 148 148 <td><input name="newsettings[voip_port]" value="{value_voip_port}"></td> 149 </tr--> 150 149 </tr--> 151 150 <tr class="row_on"> 152 151 <td > 153 152 {lang_use_agree_term}: 154 153 </td> 155 154 <td> -
trunk/expressoAdmin1_2/inc/class.db_functions.inc.php
r586 r597 18 18 $this->db = new db(); 19 19 $this->db->Halt_On_Error = 'no'; 20 20 21 $this->db->connect( 21 22 $_SESSION['phpgw_info']['expresso']['server']['db_name'], … … 26 27 $_SESSION['phpgw_info']['expresso']['server']['db_type'] 27 28 ); 28 $this->user_id = $_SESSION['phpgw_info']['expresso']['user']['account_id']; 29 $this->user_id = $_SESSION['phpgw_info']['expresso']['user']['account_id']; 29 30 } 30 31 … … 38 39 return $result; 39 40 } 40 /*41 /* 41 42 * Reativa os usuários desabilitados por tempo inativo modificando o seu ultimo acesso para o dia atual. 42 43 */ 43 function reativar_usuario_inativo($uidNumber) { 44 45 /* $sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','teste','10.10.10.10','0','0','1') "; 46 $this->db->query($sql);*/ 44 function reactivate_inactive_user($uidNumber) { 47 45 48 46 $sql = "select * from phpgw_access_log where account_id=$uidNumber order by li desc limit 1"; … … 51 49 $this->db->next_record(); 52 50 $linha = $this->db->row(); 53 54 55 51 if(count($linha)>0) { 56 52 $sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','".$linha["loginid"]."','0.0.0.0','".time()."','0','".$linha["account_id"]."')"; … … 59 55 } 60 56 } 61 62 63 function inserir_usuario_log_controle_inativo($uid,$uidNumber) { 57 58 function insert_log_inactive_user_control($uid,$uidNumber) { 64 59 $sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','".$uid."','0.0.0.0','".time()."','0','".$uidNumber."')"; 65 60 … … 157 152 } 158 153 159 //Retorn Oo maior dos ID's incrementado de 1154 //Retorna o maior dos ID's incrementado de 1 160 155 if ($accounts_nextid >= $groups_nextid) 161 156 $id = $accounts_nextid; … … 656 651 $user = $params['user']; 657 652 $pass = $params['pass']; 658 653 659 654 $con_string = "host=$host port=$port dbname=$name user=$user password=$pass"; 660 655 if ($db = pg_connect($con_string)) -
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r548 r597 352 352 } 353 353 354 function get_ina tive_users($contexts) {354 function get_inactive_users($contexts) { 355 355 $retorno = array(); 356 356 $tempUsers = array(); -
trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
r548 r597 69 69 'back_url' => $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'), 70 70 'context_display' => $context_display, 71 'lang_ina tives' => lang('list inatives')71 'lang_inactives' => lang('list inactives') 72 72 ); 73 73 $p->set_var($var); … … 99 99 'sector_name' => $sector, 100 100 'add_link' => $this->row_action('add','sector',$context) 101 ); 102 101 ); 103 102 if(isset($GLOBALS['phpgw_info']['server']['time_to_account_expires'])) 104 $var['ina tives_link'] = $this->row_action('list_inative','users',$context,'uiaccounts');103 $var['inactives_link'] = $this->row_action('list_inactive','users',$context,'uiaccounts'); 105 104 else 106 $var['ina tives_link'] = lang('disabled');105 $var['inactives_link'] = lang('disabled'); 107 106 108 107 $p->set_var($var); -
trunk/expressoAdmin1_2/inc/class.user.inc.php
r548 r597 584 584 { 585 585 $this->db_functions->write_log("Reativado usuário bloqueado por inatividade",'',$dn,'',''); 586 $this->db_functions->reativar_usuario_inativo($old_values['uidnumber']); 587 } 588 589 586 $this->db_functions->reactivate_inactive_user($old_values['uidnumber']); 587 } 590 588 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 591 589 // ACCOUNT VISIBLE -
trunk/expressoAdmin1_2/templates/default/sectors.tpl
r548 r597 20 20 <tr bgcolor="{th_bg}"> 21 21 <td>{lang_name}</td> 22 <td>{lang_ina tives}</td>22 <td>{lang_inactives}</td> 23 23 <td>{lang_add_sub_sectors}</td> 24 24 <td>{lang_edit}</td> … … 32 32 <tr bgcolor="{tr_color}"> 33 33 <td>{sector_name}</td> 34 <td width="13%">{ina tives_link}</td>34 <td width="13%">{inactives_link}</td> 35 35 <td width="25%">{add_link}</td> 36 36 <td width="5%">{edit_link}</td> -
trunk/phpgwapi/inc/class.sessions.inc.php
r548 r597 519 519 return False; 520 520 } 521 522 if($this->account_id!=null) { 523 $last_access = $this->get_last_access_on_history($this->account_id); 524 //echo $last_access+($current_config["time_to_account_expires"]*86400); 525 //exit(0); 526 527 $this->read_repositories(False); 528 if((isset($GLOBALS['phpgw_info']['server']['time_to_account_expires'])) && ($last_access) && ($this->account_lid!="expresso-admin")) { 529 if ($last_access+($GLOBALS['phpgw_info']['server']['time_to_account_expires']*86400) < time()) 521 // Só verifica tempo de inatividade do usuário, caso esteja configurado no Administrador. 522 if(isset($GLOBALS['phpgw_info']['server']['time_to_account_expires']) && 523 $this->account_id !=null && $this->account_lid != "expresso-admin") { 524 $last_access = $this->get_last_access_on_history($this->account_id); 525 $this->read_repositories(False); 526 if ($last_access && ($last_access+($GLOBALS['phpgw_info']['server']['time_to_account_expires']*86400) < time())) 530 527 { 531 528 if(is_object($GLOBALS['phpgw']->log)) … … 544 541 return False; 545 542 } 546 }547 543 } 548 544 … … 627 623 628 624 /** 629 630 625 * Retorna o UNIX DATE do ultimo acesso dessa conta, baseado na tabela de histórico. 626 */ 631 627 function get_last_access_on_history($account_id) { 632 628 $GLOBALS['phpgw']->db->query("select li from phpgw_access_log where account_id='$account_id' order by li desc limit 1",__LINE__,__FILE__);
Note: See TracChangeset
for help on using the changeset viewer.