Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once('class.dbaccess.php');
require_once('class.zona.php');
require_once('class.page.php');
class Zonas extends DBAccess
{
public function GetAll(array $filter = NULL, Page $oPage = NULL)
{
$sql = "SELECT v.*";
$sql.= " FROM tblZonas v";
$sql.= " ORDER BY Nombre ASC";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oZona = new Zona();
$oZona->ParseFromArray($oRow);
array_push($arr, $oZona);
$oRes->MoveNext();
}
return $arr;
}
public function GetById($IdZona)
{
$sql = "SELECT *";
$sql.= " FROM tblZonas v";
$sql.= " WHERE IdZona = " . DB::Number($IdZona);
if (!($oRes = $this->GetQuery($sql)))
return false;
if (!($oRow = $oRes->GetRow()))
return false;
$oZona = new Zona();
$oZona->ParseFromArray($oRow);
return $oZona;
}
public function Create(Video $oVideo)
{
$arr = array
(
'videoID' => DB::Number($oVideo->videoID),
'video' => DB::String($oVideo->video)
);
if (!$this->Insert('videos', $arr))
return false;
return $oVideo;
}
public function Update(Video $oVideo)
{
$where = " videoID = " . DB::Number($oVideo->videoID);
$arr = array
(
'video' => DB::String($oVideo->video)
);
if (!DBAccess::Update('videos', $arr, $where))
return false;
return $oVideo;
}
public function Delete($videoID)
{
if (!DBAccess::$db->Begin())
return false;
$where = " videoID = " . DB::Number($videoID);
if (!DBAccess::Delete('videos', $where))
{
DBAccess::$db->Rollback();
return false;
}
DBAccess::$db->Commit();
return true;
}
}
?>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat