Example #1
0
         //set columnName = value where id = deviceId;
     }
     if (count($explode) == 3) {
         $columnName = $explode[0];
         $deviceId = $explode[1];
         $controller->updateDevice($deviceId, $columnName, $value, true);
         //set columnName = value where id = deviceId;
     }
     break;
 case "deleteDevice":
     $deviceId = decrypt($_POST['value']);
     $controller->deleteDevice($deviceId);
     break;
 case "addType":
     $value = $_POST['typeName'];
     $controller->createType($value);
     break;
 case "updateType":
     $crypto = decrypt($_POST['crypto']);
     $value = $_POST['value'];
     $explode = explode('|', $crypto);
     $typeId = $explode[1];
     $controller->updateType($typeId, $value);
     break;
 case "deleteType":
     $typeId = decrypt($_POST['value']);
     $controller->deleteType($typeId);
     break;
 case "addBrand":
     $value = $_POST['brandName'];
     $controller->createBrand($value);