index.php 766 B

123456789101112131415161718192021222324252627
  1. <?php
  2. require("../../class/connect.php");
  3. $id=(int)$_GET['id'];
  4. $classid=(int)$_GET['classid'];
  5. if($id&&$classid)
  6. {
  7. include("../../class/db_sql.php");
  8. include("../../data/dbcache/class.php");
  9. $link=db_connect();
  10. $empire=new mysqlquery();
  11. $editor=1;
  12. if(empty($class_r[$classid][tbname])||InfoIsInTable($class_r[$classid][tbname]))
  13. {
  14. printerror("ErrorUrl","",1);
  15. }
  16. $r=$empire->fetch1("select isurl,titleurl,classid,id from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' limit 1");
  17. if(empty($r['isurl']))
  18. {
  19. printerror("ErrorUrl","",1);
  20. }
  21. $url=$r['titleurl'];
  22. $sql=$empire->query("update {$dbtbpre}ecms_".$class_r[$classid][tbname]." set onclick=onclick+1 where id='$id'");
  23. db_close();
  24. $empire=null;
  25. Header("Location:$url");
  26. }
  27. ?>