Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once('class.db.php');
require_once('class.dbaccess.php');
require_once('class.animales.php');
require_once('class.pdres.php');
require_once('class.extrs.php');
require_once('class.exiss.php');
class Pdre
{
public $Id;
public $IdPdre;
public $RAZA;
public $RGST; // TipoRegistro
public $VARI;
public $ASOC; // asocCodi
public $HBAE; // nroRegistro
public $CDPX;
public $RPEX; // RP
public $NOMB; // Nombre
public $CBAJ; // codiBaja
public $OBSI;
public $DADO;
public $PROP; // propietarios->numero
public $CRIA; // criadores->numero
public $TRAN;
public $ANLS;
public $RANA;
public $CALG;
public $APRB;
public $SIET;
public $DONA;
public $MELL;
public $TRNS;
public $TSER;
public $EMBA;
public $COLO;
public $RGSP;
public $VARP;
public $ASOP;
public $HBAP;
public $RPPD;
public $RGSM;
public $VARM;
public $ASOM;
public $HBAM;
public $RPMD;
public $RPTI;
public $FNAC; // NaciFecha
public $FBAJ; // fechaBaja
public $FESB;
public $FOBS;
public $FTRF;
public $FSER;
public $CPEL; // colorCodi
public $CCUE; // colorCodiCuerpo
public $CCAB; // colorCodiCabeza
public $CMIE; // colorCodiMiembros
public $RPNU;
public $APDO;
public $PENA;
public $PEDE;
public $PEFI;
public $EPNA;
public $EPDE;
public $EPFI;
public $NROC;
public $SIGLA;
public $SIGPA;
public $SIGMA;
public $PURE;
public $TANA;
public $IdProd;
public $IdPa;
public $IdMa;
public $IdPPdre;
public $IdPExtr;
public $IdEExis;
public $IdEExtr;
public function ParseFromArray(array $arr)
{
$this->Id = $arr['IdPdre'];
$this->IdPdre = $arr['IdPdre'];
$this->RAZA = $arr['RAZA'];
$this->RGST = $arr['RGST'];
$this->VARI = $arr['VARI'];
$this->ASOC = $arr['ASOC'];
$this->HBAE = $arr['HBAE'];
$this->CDPX = $arr['CDPX'];
$this->RPEX = $arr['RPEX'];
$this->NOMB = $arr['NOMB'];
$this->CBAJ = $arr['CBAJ'];
$this->OBSI = $arr['OBSI'];
$this->DADO = $arr['DADO'];
$this->PROP = $arr['PROP'];
$this->CRIA = $arr['CRIA'];
$this->TRAN = $arr['TRAN'];
$this->ANLS = $arr['ANLS'];
$this->RANA = $arr['RANA'];
$this->CALG = $arr['CALG'];
$this->APRB = $arr['APRB'];
$this->SIET = $arr['SIET'];
$this->DONA = $arr['DONA'];
$this->MELL = $arr['MELL'];
$this->TRNS = $arr['TRNS'];
$this->TSER = $arr['TSER'];
$this->EMBA = $arr['EMBA'];
$this->COLO = $arr['COLO'];
$this->RGSP = $arr['RGSP'];
$this->VARP = $arr['VARP'];
$this->ASOP = $arr['ASOP'];
$this->HBAP = $arr['HBAP'];
$this->RPPD = $arr['RPPD'];
$this->RGSM = $arr['RGSM'];
$this->VARM = $arr['VARM'];
$this->ASOM = $arr['ASOM'];
$this->HBAM = $arr['HBAM'];
$this->RPMD = $arr['RPMD'];
$this->RPTI = $arr['RPTI'];
$this->FNAC = $arr['FNAC'];
$this->FBAJ = $arr['FBAJ'];
$this->FESB = $arr['FESB'];
$this->FOBS = $arr['FOBS'];
$this->FTRF = $arr['FTRF'];
$this->FSER = $arr['FSER'];
$this->CPEL = $arr['CPEL'];
$this->CCUE = $arr['CCUE'];
$this->CCAB = $arr['CCAB'];
$this->CMIE = $arr['CMIE'];
$this->RPNU = $arr['RPNU'];
$this->APDO = $arr['APDO'];
$this->PENA = $arr['PENA'];
$this->PEDE = $arr['PEDE'];
$this->PEFI = $arr['PEFI'];
$this->EPNA = $arr['EPNA'];
$this->EPDE = $arr['EPDE'];
$this->EPFI = $arr['EPFI'];
$this->NROC = $arr['NROC'];
$this->SIGLA = $arr['SIGLA'];
$this->SIGPA = $arr['SIGPA'];
$this->SIGMA = $arr['SIGMA'];
$this->PURE = $arr['PURE'];
$this->TANA = $arr['TANA'];
$this->IdProd = $arr['IdProd'];
$this->IdPa = $arr['IdPa'];
$this->IdMa = $arr['IdMa'];
$this->IdPPdre = $arr['IdPPdre'];
$this->IdPExtr = $arr['IdPExtr'];
$this->IdEExis = $arr['IdEExis'];
$this->IdEExtr = $arr['IdEExtr'];
}
public function Save() {
$oPdres = new Pdres();
$oPdres->Update($this);
}
public function GetPadre() {
$oPdres = new Pdres();
$oExtrs = new Extrs();
if ($this->IdPPdre) {
return $oPdres->GetByID($this->IdPPdre);
}
if ($this->IdPExtr) {
return $oExtrs->GetById($this->IdPExtr);
}
if ($this->IdPa) {
$oAnimales = new Animales();
if ($oAnimal = $oAnimales->GetById($this->IdPa)) {
if ($oAnimal->IdPdre) {
if ($oPdre = $oPdres->GetByID($oAnimal->IdPdre)) {
$this->IdPPdre = $oPdre->IdPdre;
$this->Save();
}
return $oPdre;
}
if ($oAnimal->IdExtr) {
if ($oExtr = $oExtrs->GetById($oAnimal->IdExtr)) {
$this->IdPExtr = $oPdre->IdExtr;
$this->Save();
}
return $oExtr;
}
}
}
if ($this->ASOP == 0)
{
// EL PAPA ES NACIONAL
if ($oPdre = $oPdres->GetAnimalBySBA($this->HBAP, $this->RPPD)) {
$this->IdPPdre = $oPdre->IdPdre;
$this->Save();
}
return $oPdre;
}
else
{
// SINO ES EXTRANJERO
if ($oExtr = $oExtrs->GetAnimalBySBA($this->HBAP, $this->RPPD)) {
$this->IdPExtr = $oPdre->IdExtr;
$this->Save();
}
return $oExtr;
}
}
public function GetMadre() {
$oExiss = new Exiss();
$oExtrs = new Extrs();
if ($this->IdEExis) {
return $oExiss->GetById($this->IdEExis);
}
if ($this->IdEExtr) {
return $oExtrs->GetById($this->IdEExtr);
}
if ($this->IdMa) {
$oAnimales = new Animales();
if ($oAnimal = $oAnimales->GetById($this->IdMa)) {
if ($oAnimal->IdExis) {
if ($oExis = $oExiss->GetById($oAnimal->IdExis)) {
$this->IdEExis = $oExis->IdExis;
$this->Save();
}
return $oExis;
}
if ($oAnimal->IdExtr) {
if ($oExtr = $oExtrs->GetById($oAnimal->IdExtr)) {
$this->IdEExtr = $oPdre->IdExtr;
$this->Save();
}
return $oExtr;
}
}
}
if ($this->ASOM == 0)
{
// EL PAPA ES NACIONAL
if ($oExis = $oExiss->GetAnimalBySBA($this->HBAM, $this->RPMD)) {
$this->IdEExis = $oExis->IdExis;
$this->Save();
}
return $oExis;
}
else
{
// SINO ES EXTRANJERO
if ($oExtr = $oExtrs->GetAnimalBySBA($this->HBAM, $this->RPMD)) {
$this->IdPExtr = $oPdre->IdExtr;
$this->Save();
}
return $oExtr;
}
}
}
?>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat