1
0

RunningTransfer.transmission.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /* $Id: RunningTransfer.transmission.php 3318 2008-01-11 22:17:19Z danez $ */
  3. /*******************************************************************************
  4. LICENSE
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License (GPL)
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  14. *******************************************************************************/
  15. /**
  16. * class RunningTransferTransmission for transmission-client
  17. */
  18. class RunningTransferTransmission extends RunningTransfer
  19. {
  20. /**
  21. * ctor
  22. *
  23. * @param $psLine
  24. * @return RunningTransferTransmission
  25. */
  26. function RunningTransferTransmission($psLine) {
  27. global $cfg;
  28. // ps-parse
  29. if (strlen($psLine) > 0) {
  30. while (strpos($psLine," ") > 0)
  31. $psLine = str_replace(" ",' ',trim($psLine));
  32. $arr = explode(' ',$psLine);
  33. $this->processId = $arr[0];
  34. $this->transferFile = str_replace($cfg['transfer_file_path'],'',$arr[(count($arr) - 1)]);
  35. $this->filePath = substr($this->transferFile,0,strrpos($this->transferFile,"/")+1);
  36. foreach ($arr as $key =>$value) {
  37. if ($value == '-O')
  38. $this->transferowner = $arr[$key+1];
  39. }
  40. $this->args = str_replace("-","",$this->args);
  41. $this->args = substr($this->args,0,strlen($this->args));
  42. }
  43. }
  44. }
  45. ?>