fileup.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. Doo::loadCore('db/DooModel');
  3. /**
  4. * 用户表
  5. */
  6. class Afileup extends DooModel {
  7. public $aid;
  8. public $pid;
  9. public $stid;
  10. public $mpid;
  11. public $pmid;
  12. public $numpname;
  13. public $times;
  14. public $auditoruid;
  15. public $filepath;
  16. public $ziphashcode;
  17. public $filehashcode;
  18. public $isnew;
  19. public $intime;
  20. public $_table = 'jl_attachment';
  21. public $_primarykey = 'aid';
  22. public $_fields = array('aid', 'pid', 'stid', 'mpid', 'pmid', 'numpname', 'times', 'auditoruid', 'filepath', 'ziphashcode', 'filehashcode', 'isnew', 'intime');
  23. public function __construct() {
  24. parent::setupModel(__CLASS__);
  25. }
  26. public function createFile($pid, $stid, $mpid, $pmid, $numpname, $auditoruid, $filepath, $ziphashcode = 0, $filehashcode, $isnew, $times = 0) {
  27. $this->pid = $pid;
  28. $this->stid = $stid;
  29. $this->mpid = $mpid;
  30. $this->pmid = $pmid;
  31. $this->numpname = $numpname;
  32. if ($times > 0)
  33. $this->times = $times;
  34. $this->auditoruid = $auditoruid;
  35. $this->filepath = $filepath;
  36. if ($ziphashcode > 0)
  37. $this->ziphashcode = $ziphashcode;
  38. $this->filehashcode = $filehashcode;
  39. $this->isnew = $isnew;
  40. $this->intime = time();
  41. return $this->insert();
  42. }
  43. }
  44. ?>