'$filia' LIMIT 1"; @$resultad=mysqli_query($mydb, $queryad); @$numad=$resultad->num_rows; if ($numad >0){ @$queryad="UPDATE NEWDAY SET ELEGXOS ='$filia'"; @$resultad=mysqli_query($mydb, $queryad); //@include_once ("/home3/psixia/www/resetorio1.php"); } }//filia <1 $a1=$_GET["ft"]; $a2=$_GET["link"]; $a12=str_replace("α","?",$a2); $a12=str_replace("β","#",$a12); $a12=str_replace("γ","&",$a12); $a12=addslashes($a12); $id=$a1-date("d"); $queryad="SELECT DESMOS,USER FROM ADS WHERE AKTIF ='1' AND ID='$id' AND DESMOS='$a12' AND ORIO > 0"; @$resultad=mysqli_query($mydb, $queryad); @$numad=$resultad->num_rows; if ($numad > 0){ @$actor=$resultad->fetch_assoc(); $a2=stripslashes($actor["DESMOS"]);//psixia to desmo $pelatis=$actor["USER"];//psixia to orio $queryadf="SELECT ORIO FROM PELATIS WHERE ID='$pelatis'"; $resultadf=mysqli_query($mydb, $queryadf); $astor=$resultadf->fetch_assoc(); $orio=$astor["ORIO"];//diabazw to orio if ($orio < 1 ) {//EMFANISEIS MHDENISAN KAI KLEINW THN YPHRESIA $queryadx="UPDATE ADS SET AKTIF='2' WHERE USER='$pelatis' AND (AKTIF='1' OR AKTIF='3')"; @mysqli_query($mydb, $queryadx); $queryadx="UPDATE ADS SET ORIO='0' WHERE USER='$pelatis'";//mhdenizw ta klik stis ads @mysqli_query($mydb, $queryadx); //antio @$resultad->close(); @$resultadx->close(); @$resultadf->close(); @mysqli_close($mydb); @include($indexit); exit(0);//KAI ΕΞΟΔΟΣ ΑΦΟΥ ΤΕΛΕΙΩΣΕ Η ΥΠΗΡΕΣΙΑ } $queryad="SELECT CLICK,ID0 FROM STATS WHERE ID='$id' AND HMERA='$filia'"; $resultad=@mysqli_query($mydb, $queryad); $aftor=$resultad->fetch_assoc(); $ft=$aftor["CLICK"]; $id0=$aftor["ID0"]; $ft=$ft+1; $queryad="UPDATE STATS SET CLICK ='$ft' WHERE ID0='$id0'";//katagrafw to klik ΤΟ ΣΗΜΕΡΙΝΟ ΑΥΤΗΣ ΤΗΣ ΔΙΑΦΗΜΙΣΗΣ ID0 $resultad=mysqli_query($mydb,$queryad) or die ("ERRROR 3"); mysqli_close($mydb); header("location: $a2");//KAI SE ΠΑΕΙ ΕΚΕΙ ΠΟΥ ΕΚΑΝΕΣ ΚΛΙΚ }else //πιπα { @$resultad->close(); @$resultadx->close(); @$resultadf->close(); @mysqli_close($mydb); @include($indexit); } } else { header("location: https://www.psixi.gr"); exit(0); } ?>