Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once('class.dbaccess.php');
require_once('class.zonaeleccion.php');
require_once('class.page.php');
class ZonasElecciones extends DBAccess
{
public function GetAll(array $filter = NULL, Page $oPage = NULL)
{
$sql = "SELECT v.*";
$sql.= " FROM tblZonasElecciones v";
$sql.= " ORDER BY IdZona ASC";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oZonaEleccion = new ZonaEleccion();
$oZonaEleccion->ParseFromArray($oRow);
array_push($arr, $oZonaEleccion);
$oRes->MoveNext();
}
return $arr;
}
public function GetById($IdZona)
{
$sql = "SELECT *";
$sql.= " FROM tblZonasElecciones v";
$sql.= " WHERE IdZona = " . DB::Number($IdZona);
if (!($oRes = $this->GetQuery($sql)))
return false;
if (!($oRow = $oRes->GetRow()))
return false;
$oZonaEleccion = new ZonaEleccion();
$oZonaEleccion->ParseFromArray($oRow);
return $oZonaEleccion;
}
public function Create(Video $oVideo)
{
$arr = array
(
'videoID' => DB::Number($oVideo->videoID),
'video' => DB::String($oVideo->video)
);
if (!$this->Insert('tblZonasElecciones', $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('tblZonasElecciones', $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