tran.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. require("../class/connect.php");
  3. include("../class/db_sql.php");
  4. $link=db_connect();
  5. $empire=new mysqlquery();
  6. //关闭
  7. if($public_r['addnews_ok'])
  8. {
  9. printerror("NotOpenCQInfo","",9);
  10. }
  11. $userid=(int)$_GET['userid'];
  12. $username=RepPostStr($_GET['username'],1);
  13. $rnd=RepPostStr($_GET['rnd'],1);
  14. $ecms=RepPostStr($_GET['ecms'],1);
  15. $classid=(int)$_GET['classid'];
  16. $infoid=(int)$_GET['infoid'];
  17. $filepass=RepPostStr($_GET['filepass'],1);
  18. $type=RepPostStr($_GET['type'],1);
  19. if(!$classid||!$filepass)
  20. {
  21. printerror("ErrorUrl","",9);
  22. }
  23. $pr=$empire->fetch1("select qaddtran,qaddtransize,qaddtranimgtype,qaddtranfile,qaddtranfilesize,qaddtranfiletype from {$dbtbpre}enewspublic limit 1");
  24. if($type==1)
  25. {
  26. if(!$pr['qaddtran'])
  27. {
  28. printerror("CloseQTranPic","",9);
  29. }
  30. $filetype=$pr['qaddtranimgtype'];
  31. $filesize=$pr['qaddtransize'];
  32. $word="上传图片";
  33. }
  34. elseif($type==2)
  35. {
  36. if(!$pr['qaddtranfile'])
  37. {
  38. printerror("CloseQTranFile","",9);
  39. }
  40. $filetype="|.swf|";
  41. $filesize=$pr['qaddtranfilesize'];
  42. $word="上传FLASH";
  43. }
  44. else
  45. {
  46. if(!$pr['qaddtranfile'])
  47. {
  48. printerror("CloseQTranFile","",9);
  49. }
  50. $filetype=$pr['qaddtranfiletype'];
  51. $filesize=$pr['qaddtranfilesize'];
  52. $word="上传附件";
  53. }
  54. $filetype=substr($filetype,1,strlen($filetype));
  55. $filetype=substr($filetype,0,strlen($filetype)-1);
  56. $filetype=str_replace("|",",",$filetype);
  57. if($ecms)
  58. {
  59. $enews="MHtmlareaTranPic";
  60. }
  61. else
  62. {
  63. $enews="MTranFile";
  64. }
  65. //导入模板
  66. require(ECMS_PATH.'e/template/DoInfo/tran.php');
  67. db_close();
  68. $empire=null;
  69. ?>