Пример #1
0
 public function __construct($organisationId)
 {
     parent::__construct($organisationId);
     $this->bandwidthTotal = ModelActivity::getBandwidthByDate($organisationId);
     $this->bandwidthMonth = ModelActivity::getBandwidthByDate($organisationId, date('01-m-Y'));
     $this->bandwidthTotal = ModelActivity::getBandwidthByDate($organisationId);
     $this->bandwidthToday = ModelActivity::getBandwidthByDate($organisationId, Date::toDate());
     $this->bandwidthMonth = ModelActivity::getBandwidthByDate($organisationId, date('01-m-Y'));
     $this->bandwidthTotal = ModelActivity::getBandwidthByDate($organisationId);
     $this->masterImagesToday = ModelActivity::getMasterImagesBydate($organisationId, Date::toDate());
     $this->masterImagesMonth = ModelActivity::getMasterImagesBydate($organisationId, date('01-m-Y'));
     $this->masterImagesTotal = ModelActivity::getMasterImagesBydate($organisationId);
     $this->rendersToday = ModelActivity::getRendersByDate($organisationId, Date::toDate());
     $this->rendersMonth = ModelActivity::getRendersByDate($organisationId, date('01-m-Y'), date('01-m-Y'));
     $this->rendersTotal = ModelActivity::getRendersByDate($organisationId);
     if ($this->isPostBack()) {
         $action = strtolower($this->input('action'));
         if ($action === 'delete') {
             $this->organisation->deleted = !$this->organisation->deleted;
         }
         if ($action === 'disable') {
             $this->organisation->disabled = !$this->organisation->disabled;
         }
         $this->organisation->update();
         $this->setMessage(lang('Organisation updated'), 'success');
         response()->refresh();
     }
 }
Пример #2
0
 public function __construct($organisationId, $invoiceId = null)
 {
     parent::__construct($organisationId);
     $this->invoices = OrganisationInvoice::getByOrganisationId($this->organisation->id);
     if ($invoiceId !== null) {
         $this->invoice = OrganisationInvoice::getById($invoiceId);
     }
     if ($this->isPostBack()) {
         if ($this->invoice && $this->invoice->hasRow()) {
             $this->update();
         } else {
             $this->save();
         }
     }
 }
Пример #3
0
 public function __construct($organisationId)
 {
     parent::__construct($organisationId);
     $this->organisationId = $organisationId;
     $this->masterImagesOnly = $this->input('master');
     $this->startDate = $this->input('start_date');
     $this->endDate = $this->input('end_date');
     $this->sourceId = $this->input('source');
     $this->max = 50;
     $this->page = $this->input('page', 0);
     // IsGetBack, $_GET it? forever alone..
     if (count($_GET)) {
         $this->get->source->addValidation([new ValidateInputNotNullOrEmpty(), new ValidateInputInteger()]);
         $this->get->start_date->addValidation(new ValidateInputDate());
         $this->get->end_date->addValidation(new ValidateInputDate());
         if (!$this->hasErrors()) {
             $this->activity = ModelActivity::getByOrganisationId($organisationId, $this->startDate, $this->endDate, $this->sourceId, $this->masterImagesOnly, $this->max, $this->page);
         }
     }
 }