Changeset 777
- Timestamp:
- Sep 16, 2016, 10:21:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/egroupware/CTA/inc/class.uiCTA.inc.php
r776 r777 10 10 { 11 11 print ($GLOBALS['egw_info']['user']['account_lid']); 12 print "<br>";13 print_r($data);14 print "<br>GET :";15 print_r ($_GET);16 print "<br>POST:";17 print_r ($_POST);12 //print "<br>"; 13 //print_r($data); 14 //print "<br>GET :"; 15 //print_r ($_GET); 16 //print "<br>POST:"; 17 //print_r ($_POST); 18 18 19 19 include_once('/usr/share/alternc/panel/class/functions.php'); … … 33 33 } 34 34 35 $username_=str_replace("@","_",$username); 36 print "<br /><br /><br />".$username_; 35 // separamos email en 2, usuario y dominio 36 $u_email = explode("@", $username); 37 $u_lp = $u_email[0]; 38 $u_domain = $u_email[1]; 39 40 // encrypt new password 37 41 $crypted_passwd=_md5cr($data['new_passwd']); 38 42 39 43 $connect_sql=mysql_connect($db_host.":".$db_port,$db_pwd_user,$db_pwd_pass); 44 if ($connect_sql) 45 { 46 $db=mysql_select_db($db_pwd_name,$connect_sql); 47 if($db) 48 { 49 $query="UPDATE address SET password=\"$crypted_passwd\" 50 WHERE address = \"$u_lp\" 51 AND domain_id = (SELECT id FROM domaines 52 WHERE domaine = \"$u_domain\")"; 53 54 //print "<br /><br /><br />".$query; 55 56 $result=mysql_query($query, $connect_sql); 57 58 // print resultados... 59 //while($row = mysql_fetch_assoc($result)){ 60 // foreach($row as $cname => $cvalue){ 61 // print "$cname: $cvalue\t"; 62 // } 63 // print "\r\n"; 64 //} 65 66 if ($result) 67 {return true;}else return false; 68 }else 69 {return false;} 70 71 }else 72 {return false;} 40 73 } 41 74 }
Note: See TracChangeset
for help on using the changeset viewer.