index.php 667 B

1234567891011121314151617181920212223242526
  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[id]))
  18. {
  19. printerror("ErrorUrl","",1);
  20. }
  21. $titleurl=sys_ReturnBqTitleLink($r);
  22. db_close();
  23. $empire=null;
  24. Header("Location:$titleurl");
  25. }
  26. ?>