ecms.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. require("../class/connect.php");
  3. require("../class/db_sql.php");
  4. require("../class/functions.php");
  5. require LoadLang("pub/fun.php");
  6. require("../class/delpath.php");
  7. require("../class/t_functions.php");
  8. require("../data/dbcache/class.php");
  9. require("../data/dbcache/MemberLevel.php");
  10. require("../member/class/user.php");
  11. require("../class/qinfofun.php");
  12. $link=db_connect();
  13. $empire=new mysqlquery();
  14. $enews=$_POST['enews'];
  15. if(empty($enews))
  16. {$enews=$_GET['enews'];}
  17. //验证IP
  18. eCheckAccessDoIp('postinfo');
  19. $muserid=(int)getcvar('mluserid');
  20. $musername=RepPostVar(getcvar('mlusername'));
  21. $mrnd=RepPostVar(getcvar('mlrnd'));
  22. $loginin='[Member]'.$musername;
  23. $doetran=1;
  24. include('../data/ecmseditor/eshoweditor.php');
  25. //增加投稿
  26. if($enews=="MAddInfo")
  27. {
  28. DodoInfo($_POST,0);
  29. }
  30. //修改投稿
  31. elseif($enews=="MEditInfo")
  32. {
  33. DodoInfo($_POST,1);
  34. }
  35. //删除投稿
  36. elseif($enews=="MDelInfo")
  37. {
  38. DodoInfo($_GET,2);
  39. }
  40. //编辑器上传图片
  41. elseif($enews=="MEditorTranFile")
  42. {
  43. $file=$_FILES['file']['tmp_name'];
  44. $file_name=$_FILES['file']['name'];
  45. $file_type=$_FILES['file']['type'];
  46. $file_size=$_FILES['file']['size'];
  47. DoQTranFile($_POST,$file,$file_name,$file_type,$file_size,$muserid,$musername,$mrnd,1);
  48. }
  49. //上传附件
  50. elseif($enews=="MTranFile")
  51. {
  52. $file=$_FILES['file']['tmp_name'];
  53. $file_name=$_FILES['file']['name'];
  54. $file_type=$_FILES['file']['type'];
  55. $file_size=$_FILES['file']['size'];
  56. DoQTranFile($_POST,$file,$file_name,$file_type,$file_size,$muserid,$musername,$mrnd,0);
  57. }
  58. else
  59. {printerror("ErrorUrl","",1);}
  60. db_close();
  61. $empire=null;
  62. ?>