index.php 555 B

1234567891011121314151617181920212223
  1. <?php
  2. require("../../class/connect.php");
  3. $adid=(int)$_GET['adid'];
  4. if(!$adid)
  5. {
  6. echo"<script>alert('error');history.go(-1);</script>";
  7. exit();
  8. }
  9. require("../../class/db_sql.php");
  10. $link=db_connect();
  11. $empire=new mysqlquery();
  12. $r=$empire->fetch1("select url,adid from {$dbtbpre}enewsad where adid='$adid'");
  13. if(empty($r[adid]))
  14. {
  15. echo"<script>alert('error');history.go(-1);</script>";
  16. exit();
  17. }
  18. $url=$r[url];
  19. $empire->query("update {$dbtbpre}enewsad set onclick=onclick+1 where adid='$adid'");
  20. db_close();
  21. $empire=null;
  22. Header("Location:$url");
  23. ?>