FTP -> GIT Diff
This commit is contained in:
@@ -112,7 +112,7 @@ class Form {
|
||||
* [render function whitch dysplay generated form]
|
||||
*/
|
||||
function render(){
|
||||
self::addInput(InputTypes::SUBMIT, 'formSubmit', '', 'Submit', 'Submit');
|
||||
self::addInput(InputTypes::SUBMIT, 'formSubmit', '', '', 'Submit');
|
||||
$form = '<form '.$this->formName.$this->formId.$this->method.$this->action.'">';
|
||||
$form .= $this->formContent;
|
||||
$form .= '</form>';
|
||||
|
29
app/models/managers/Pluginmanager.php
Normal file
29
app/models/managers/Pluginmanager.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
class PluginManager
|
||||
{
|
||||
public function load(){
|
||||
$dir = $_SERVER['DOCUMENT_ROOT'] . BASEDIR . '/backup/';
|
||||
|
||||
$pluginsFiles = scandir ($dir);
|
||||
foreach ($pluginsFiles as $key => $pluginFile) {
|
||||
$className = str_replace(".zip", "", $pluginsFiles);
|
||||
if(class_exists($className)){
|
||||
(new $className)->make();
|
||||
}
|
||||
}
|
||||
|
||||
$sleepTime = DeviceManager::getDeviceById($deviceId)['sleep_time'];
|
||||
|
||||
$LastRecordTime = new DateTime(RecordManager::getLastRecord($subDeviceId, 1)['time']);
|
||||
$interval = $LastRecordTime->diff(new DateTime());
|
||||
$hours = $interval->format('%h');
|
||||
$minutes = $interval->format('%i');
|
||||
$lastSeen = ($hours * 60 + $minutes);
|
||||
|
||||
if ($lastSeen > $sleepTime || $sleepTime == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -66,10 +66,6 @@ class SubDeviceManager
|
||||
}
|
||||
}
|
||||
|
||||
public static function editSubDevicesByDevice ($deviceId, $subDeviceParameters) {
|
||||
DB::edit('subdevices', $subDeviceParameters, 'WHERE device_id=?', array ($deviceId));
|
||||
}
|
||||
|
||||
public static function remove($subDeviceId)
|
||||
{
|
||||
RecordManager::cleanSubdeviceRecords($subDeviceId);
|
||||
|
Reference in New Issue
Block a user