$stno = $_GET['st']; $sdt = $_GET['dt']; $dt = "'".substr($sdt,2,2).'.'.substr($sdt,0,2).'.'.substr($sdt,4,2).' '.substr($sdt,6,2).':00'."'"; $dts = substr($sdt,0,2).'.'.substr($sdt,2,2).'.'.substr($sdt,4,2).' '.substr($sdt,6,2).':00'; $lng= urldecode($_GET['lang']); if($stno == "") die("stno parameter not found"); $tit = "MM5 - NAM Forecast on $stno site since $dts"; $con = mssql_connect ("192.168.132.10", "oper", "asdfghjkl"); if ($con == FALSE) die('Server is in the DOWN'); mssql_select_db ("gmch", $con); //Lets find Table $sql= "select DTF, cast(PC as decimal(7,5)), cast(TA as decimal(5,1)), cast(DS as decimal(7,3)), HG from _FOR_PCTA where st=$stno and dt=$dt"; $result = mssql_query ($sql, $con); echo '
| Date and time | Precipitation | Air temperature | Discharge | Water level | '; echo "
| '.Date('d.m.Y G:i', strtotime($row[0]))." | "; echo ''.$row[1].' | '; echo ''.$row[2].' | '; echo ''.$row[3].' | '; echo ''.$row[4].' | '; echo "