Files
EQN/appServer/distquake_dowload_otheruserprofile.php
2017-09-22 15:16:26 +02:00

29 lines
883 B
PHP

<?php
$ini = parse_ini_file("conf.ini", true);
mysql_connect($ini['db']['host'],$ini['db']['user'],$ini['db']['pass']);
mysql_select_db($ini['db']['db']);
if ($ini['db']['log']=="1"){
$arrival_time=microtime(true);
$filename=basename(__FILE__);
$filename="log_".$filename.".txt";
$chunck=strval($arrival_time)." ".$_SERVER['REQUEST_URI']."\r\n";
file_put_contents($filename,$chunck,FILE_APPEND);
}
mysql_set_charset("utf8");
$nick=$_REQUEST['nick'];
$password=$_REQUEST['password'];
$other_user_code=$_REQUEST['user_code'];
$sql=mysql_query("select nick,country,town,sex,updated,DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), birth)), '%Y')+0 AS age from contest_nick where user_code=$other_user_code limit 1");
while($e=mysql_fetch_assoc($sql))
$output[]=$e;
print(json_encode($output));
mysql_close();
?>