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 Extr
{
public $IdExtr;
public $RAZA;
public $HBAE;
public $RPEX;
public $RGST;
public $NOMB;
public $SEXO;
public $ASOX;
public $ASOC;
public $HBEX;
public $RPET;
public $ASOP;
public $HBAP;
public $RGSP;
public $RPPD;
public $ASOM;
public $HBAM;
public $RGSM;
public $RPMD;
public $ANLS;
public $RANA;
public $CDPX;
public $NROC;
public $REGI;
public $CALI;
public $VARI;
public $APRB;
public $TANA;
public $PURE;
public $FNAC;
public $CPEL;
public $CCUE;
public $CCAB;
public $CMIE;
public $IdProd;
public $IdPa;
public $IdMa;
public $IdPPdre;
public $IdPExtr;
public $IdEExis;
public $IdEExtr;
public function ParseFromArray(array $arr)
{
$this->IdExtr = $arr['IdExtr'];
$this->RAZA = $arr['RAZA'];
$this->HBAE = $arr['HBAE'];
$this->RPEX = $arr['RPEX'];
$this->RGST = $arr['RGST'];
$this->NOMB = $arr['NOMB'];
$this->SEXO = $arr['SEXO'];
$this->ASOX = $arr['ASOX'];
$this->ASOC = $arr['ASOC'];
$this->HBEX = $arr['HBEX'];
$this->RPET = $arr['RPET'];
$this->ASOP = $arr['ASOP'];
$this->HBAP = $arr['HBAP'];
$this->RGSP = $arr['RGSP'];
$this->RPPD = $arr['RPPD'];
$this->ASOM = $arr['ASOM'];
$this->HBAM = $arr['HBAM'];
$this->RGSM = $arr['RGSM'];
$this->RPMD = $arr['RPMD'];
$this->ANLS = $arr['ANLS'];
$this->RANA = $arr['RANA'];
$this->CDPX = $arr['CDPX'];
$this->NROC = $arr['NROC'];
$this->REGI = $arr['REGI'];
$this->CALI = $arr['CALI'];
$this->VARI = $arr['VARI'];
$this->APRB = $arr['APRB'];
$this->PURE = $arr['PURE'];
$this->FNAC = $arr['FNAC'];
$this->CPEL = $arr['CPEL'];
$this->CCUE = $arr['CCUE'];
$this->CCAB = $arr['CCAB'];
$this->CMIE = $arr['CMIE'];
$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() {
$oExtrs = new Extrs();
$oExtrs->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