##// END OF EJS Templates
modificaciones del componente usuarios. Reduccion de codigo
arturo -
r4:5
parent child
Show More
@@ -533,10 +533,9
533 $path = implode(DS, $url); No newline at end of file
533 $path = implode(DS, $url);
534 No newline at end of file
534
535 $flag = FALSE;
535 $flag = FALSE;
No newline at end of file
536 $data_list = $user->getAllUsers(); No newline at end of file
536 $result = $user->getAllUsers();
No newline at end of file
537 $data_list = $result->fetchAll(); No newline at end of file
538 foreach($data_list as $userdata){
537 foreach($data_list as $userdata){
No newline at end of file
538 if(strtolower($data_user['username']) == strtolower($userdata->username)){$flag = TRUE; break;} No newline at end of file
539 if(strtolower($data_user['username']) == strtolower($userdata['username'])){$flag = TRUE; break;} No newline at end of file
540 } No newline at end of file
539 }
541 No newline at end of file
540
542 if($flag === FALSE){ No newline at end of file
541 if($flag === FALSE){
@@ -240,16 +238,6
240 return array($consulta,$paginas,$navegador); No newline at end of file
238 return array($consulta,$paginas,$navegador);
241 } No newline at end of file
239 }
242
240
No newline at end of file
243 function addUser($username, $password, $data_user){
No newline at end of file
244 $query = "INSERT INTO sis_user( username, password, date_create, firstname, lastname, email,"
No newline at end of file
245 ." photo, usertype, state ) VALUES ( '$username' , md5('$password'), '".date("Y-m-d H:i:s")."',"
No newline at end of file
246 ." '".$data_user['firstname']."', '".$data_user['lastname']."', '".$data_user['email']."',"
No newline at end of file
247 ." '".$data_user['urlphoto']."', 1, 4)";
No newline at end of file
248 $result = $this->db->prepare($query);
No newline at end of file
249 $result->execute();
No newline at end of file
250 return $result;
No newline at end of file
251 }
No newline at end of file
252 No newline at end of file
253 function editUser($user){ No newline at end of file
241 function editUser($user){
254 $query = "SELECT * FROM sis_user WHERE iduser = '$user'"; No newline at end of file
242 $query = "SELECT * FROM sis_user WHERE iduser = '$user'";
255 $result = $this->db->prepare($query); No newline at end of file
243 $result = $this->db->prepare($query);
@@ -1,5 +1,5
1 <?php
1 <?php
No newline at end of file
2 $html_select_pag = '<select onchange="window.location='.chr(39).'index.php?option=com_users&controller=Users&action=dolist&inicio='.chr(39).'+this.value">'; No newline at end of file
2 $html_select_pag = '<select onchange="window.location='.chr(39).'index.php?option=com_users&controller=Users&action=getUsers&inicio='.chr(39).'+this.value">'; No newline at end of file
3 No newline at end of file
3
4 $j = count($paginas); No newline at end of file
4 $j = count($paginas);
5 for($i=0;$i<$j;$i++){ No newline at end of file
5 for($i=0;$i<$j;$i++){
General Comments 0
You need to be logged in to leave comments. Login now