ecmsfile.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. require LoadLang("pub/fun.php");
  7. require("../data/dbcache/class.php");
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. $enews=$_POST['enews'];
  11. if(empty($enews))
  12. {
  13. $enews=$_GET['enews'];
  14. }
  15. //验证用户
  16. $lur=is_login();
  17. $logininid=$lur['userid'];
  18. $loginin=$lur['username'];
  19. $loginrnd=$lur['rnd'];
  20. $loginlevel=$lur['groupid'];
  21. $loginadminstyleid=$lur['adminstyleid'];
  22. hCheckEcmsRHash();
  23. $incftp=0;
  24. if($public_r['phpmode'])
  25. {
  26. include("../class/ftp.php");
  27. $incftp=1;
  28. }
  29. require("../class/filefun.php");
  30. if($enews=="DelFile")//删除文件
  31. {
  32. $fileid=$_GET['fileid'];
  33. DelFile($fileid,$logininid,$loginin);
  34. }
  35. elseif($enews=="DelFile_all"||$enews=="TDelFile_all")//批量删除文件
  36. {
  37. $fileid=$_POST['fileid'];
  38. DelFile_all($fileid,$logininid,$loginin);
  39. }
  40. elseif($enews=="DelFreeFile")//清理失效附件
  41. {
  42. DelFreeFile($logininid,$loginin);
  43. }
  44. elseif($enews=="DelPathFile")//删除目录文件
  45. {
  46. $filename=$_POST['filename'];
  47. DelPathFile($filename,$logininid,$loginin);
  48. }
  49. elseif($enews=="DoMarkSmallPic")//批量操作图片
  50. {
  51. DoMarkSmallPic($_POST,$logininid,$loginin);
  52. }
  53. elseif($enews=="TranMoreFile")//批量上传附件
  54. {
  55. $file=$_FILES['file']['tmp_name'];
  56. $file_name=$_FILES['file']['name'];
  57. $file_type=$_FILES['file']['type'];
  58. $file_size=$_FILES['file']['size'];
  59. $no=$_POST['no'];
  60. $type=$_POST['type'];
  61. TranMoreFile($file,$file_name,$file_type,$file_size,$no,$type,$logininid,$loginin);
  62. }
  63. elseif($enews=='AddFileDataTable')//增加附件分表
  64. {
  65. AddFileDataTable($_POST,$logininid,$loginin);
  66. }
  67. elseif($enews=='DefFileDataTable')//默认附件分表
  68. {
  69. DefFileDataTable($_GET,$logininid,$loginin);
  70. }
  71. elseif($enews=='DelFileDataTable')//删除附件分表
  72. {
  73. DelFileDataTable($_GET,$logininid,$loginin);
  74. }
  75. else
  76. {
  77. printerror("ErrorUrl","history.go(-1)");
  78. }
  79. db_close();
  80. $empire=null;
  81. ?>