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

51 lines
2.0 KiB
PHP

<?php
$arrival_time=microtime(true);
$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);
}
$user_id=$_REQUEST['u_id'];
$n_e=$_REQUEST['n_e'];
$n_m=$_REQUEST['n_m'];
$n_o=$_REQUEST['n_o'];
$n_o_near=$_REQUEST['n_o_near'];
$n_o_mag=$_REQUEST['n_o_mag'];
$n_o_usgs=$_REQUEST['n_o_usgs'];
$n_o_emsc=$_REQUEST['n_o_emsc'];
$n_o_ingv=$_REQUEST['n_o_ingv'];
$n_o_ign=$_REQUEST['n_o_ign'];
$n_o_csi=$_REQUEST['n_o_csi'];
$n_o_jma=$_REQUEST['n_o_jma'];
$n_o_ineter=$_REQUEST['n_o_ineter'];
$n_o_ssn=$_REQUEST['n_o_ssn'];
$n_o_sgc=$_REQUEST['n_o_sgc'];
$n_o_rsn=$_REQUEST['n_o_rsn'];
$n_o_guc=$_REQUEST['n_o_csn'];
$n_o_funvisis=$_REQUEST['n_o_funvisis'];
$n_o_geonet=$_REQUEST['n_o_geonet'];
$n_o_inpres=$_REQUEST['n_o_inpres'];
$n_o_igepn=$_REQUEST['n_o_igepn'];
$sql=mysql_query("update gcm set notification_eqn=$n_e,notification_manual=$n_m,notification_official=$n_o,notification_near=$n_o_near,notification_official_csi=$n_o_csi,notification_official_emsc=$n_o_emsc,notification_official_funvisis=$n_o_funvisis,notification_official_geonet=$n_o_geonet,notification_official_guc=$n_o_guc,notification_official_ign=$n_o_ign,notification_official_igepn=$n_o_igepn,notification_official_ineter=$n_o_ineter,notification_official_ingv=$n_o_ingv,notification_official_inpres=$n_o_inpres,notification_official_jma=$n_o_jma,notification_official_rsn=$n_o_rsn,notification_official_sgc=$n_o_sgc,notification_official_ssn=$n_o_ssn,notification_official_usgs=$n_o_usgs,notification_official_minmag='$n_o_mag' where user_id=$user_id");
if ($sql === TRUE)
{
print("ok");
}
else{
print("nok");
}
mysql_close();
?>