if(($_GET["im"]=="positive")||($_GET["im"]=="negative")){ $selected=$_GET["im"]; $ra=$_SERVER["REMOTE_ADDR"]; include("dbcon.php"); $backthen=date("Y-m-d H:i:s",(strtotime("-60 seconds"))); $sql="SELECT * FROM wmi WHERE tid>'$backthen' and ip='$ra';"; $result=mysql_query($sql); if($row=mysql_fetch_array($result)){ $rowthen=$row["tid"]; $sec1=(strtotime($rowthen)); $sec2=(strtotime($backthen)); $sec=$sec1-$sec2; header("Location:/pleasewait.php?sec=$sec&returnurl=$_GET[returnurl]"); }else{ include("geoip.inc"); $gi = geoip_open("GeoIP.dat",GEOIP_STANDARD); $ccode=geoip_country_code_by_addr($gi, $ra); $cname=geoip_country_name_by_addr($gi, $ra); geoip_close($gi); $mood=substr($selected,0,1); if(!$ccode){ $ccode="XX"; } $sql="INSERT INTO wmi (id,tid,land,mood,ip) VALUES ('',NOW(),'$ccode', '$mood', '$ra');"; $result=mysql_query($sql); if($_GET[returnurl]){ header("Location:$_GET[returnurl]"); }else{ header("Location:/thankyou.php"); } } }else{ $o="
I'm feeling positive |
I'm feeling negative |