本文整理汇总了PHP中Company::selectRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::selectRecord方法的具体用法?PHP Company::selectRecord怎么用?PHP Company::selectRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Company
的用法示例。
在下文中一共展示了Company::selectRecord方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCompany
function getCompany($companyID)
{
$company = new Company();
if ($company->selectRecord($companyID)) {
return $company;
} else {
return false;
}
}
示例2: Main
function Main()
{
switch ($this->formArray["ownerType"]) {
case "Person":
$this->tpl->set_block("rptsTemplate", "CompanyDetails", "CompanyDetailsBlock");
$this->tpl->set_var("CompanyDetailsBlock", "");
$person = new Person();
$person->selectRecord($this->formArray["id"]);
$this->tpl->set_var("id", $person->getPersonID());
$this->tpl->set_var("lastName", $person->getLastName());
$this->tpl->set_var("firstName", $person->getFirstName());
$this->tpl->set_var("middleName", $person->getMiddleName());
$this->tpl->set_var("gender", $person->getGender());
$this->tpl->set_var("birthday", $person->getBirthday());
$this->tpl->set_var("maritalStatus", $person->getMaritalStatus());
$this->tpl->set_var("tin", $person->getTin());
$address = $person->addressArray[0];
if (is_a($address, Address)) {
$this->tpl->set_var("fullAddress", $address->getFullAddress());
}
$this->tpl->set_var("telephone", $person->getTelephone());
$this->tpl->set_var("mobileNumber", $person->getMobileNumber());
$this->tpl->set_var("email", $person->getEmail());
break;
case "Company":
$this->tpl->set_block("rptsTemplate", "PersonDetails", "PersonDetailsBlock");
$this->tpl->set_var("PersonDetailsBlock", "");
$company = new Company();
$company->selectRecord($this->formArray["id"]);
$this->tpl->set_var("id", $company->getCompanyID());
$this->tpl->set_var("companyName", $company->getCompanyName());
$this->tpl->set_var("tin", $company->getTin());
$this->tpl->set_var("telephone", $company->getTelephone());
$this->tpl->set_var("fax", $company->getFax());
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$this->tpl->set_var("fullAddress", $address->getFullAddress());
}
$this->tpl->set_var("email", $company->getEmail());
$this->tpl->set_var("website", $company->getWebsite());
break;
default:
exit("No Person/Company selected. <a href='OwnerList.php" . $this->sess->url("") . "'>Click here</a> to go back to the Owner List.");
break;
}
$this->tpl->set_var("ownerType", $this->formArray["ownerType"]);
$this->tpl->set_var("uname", $this->user["uname"]);
$this->tpl->set_var("today", date("F j, Y"));
$this->setPageDetailPerms();
$this->tpl->set_var("Session", $this->sess->url(""));
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}
示例3: getCompanyDetails
function getCompanyDetails($companyID)
{
$company = new Company();
$company->selectRecord($companyID);
if (!($domDoc = $company->getDomDocument())) {
return false;
} else {
$xmlStr = $domDoc->dump_mem(true);
return $xmlStr;
}
}
示例4: selectRecords
function selectRecords($condition = " ORDER BY TRIM(Company.companyName) ASC LIMIT 0,10")
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(OwnerCompany.companyID) as companyID" . " FROM OwnerCompany,Company " . " WHERE OwnerCompany.companyID = Company.companyID " . " %s;", $condition);
$this->db->query($sql);
while ($this->db->next_record()) {
$company = new Company();
$company->selectRecord($this->db->f("companyID"));
$this->arrayList[] = $company;
}
}
示例5: setCompanyList
function setCompanyList()
{
$db = new DB_RPTS();
$db1 = new DB_RPTS();
$db->query("SELECT DISTINCT companyID from OwnerCompany inner join Owner on Owner.ownerID=OwnerCompany.ownerID where Owner.rptopID <> ''");
$this->tpl->set_block("rptsTemplate", "Company", "cBlk");
for ($i = 0; $db->next_record(); $i++) {
$companyID = $db->f("companyID");
$company = new Company();
if ($company->selectRecord($companyID)) {
//$setPersonArray($person);
$this->tpl->set_var(companyName, $company->getCompanyName());
$this->tpl->set_var(companyID, $companyID);
}
$this->tpl->parse("cBlk", "Company", true);
}
}
示例6: getOwnerName
function getOwnerName($ownerType, $id)
{
$ownerName = "";
switch ($ownerType) {
case "Person":
$person = new Person();
$person->selectRecord($id);
$ownerName = $person->getName();
$this->tpl->set_var("openWin", "PersonDetails.php" . $this->sess->url("") . "&personID=" . $id . "&formAction=viewOnly");
break;
case "Company":
$company = new Company();
$company->selectRecord($id);
$ownerName = $company->getCompanyName();
$this->tpl->set_var("openWin", "CompanyDetails.php" . $this->sess->url("") . "&companyID=" . $id . "&formAction=viewOnly");
break;
}
return $ownerName;
}
示例7: Main
function Main()
{
$this->getSignatory();
if (is_array($this->formArray["personCompanyIDArray"])) {
$this->tpl->set_block("rptsTemplate", "Page", "PageBlock");
foreach ($this->formArray["personCompanyIDArray"] as $personCompanyID) {
$this->tpl->set_var("pageNumber", $this->pageNumber);
switch ($this->formArray["ownerType"]) {
case "Company":
$company = new Company();
$company->selectRecord($personCompanyID);
$nameList = $company->getCompanyName();
break;
case "Person":
default:
$person = new Person();
$person->selectRecord($personCompanyID);
$nameList = $person->getName();
break;
}
$this->tpl->set_var("nameList", $nameList);
$tdNumberList = "";
$tdArray = $this->getTDArrayFromOwner($personCompanyID);
if (is_array($tdArray)) {
foreach ($tdArray as $td) {
if ($tdNumberList != "") {
$tdNumberList .= "\n";
}
$tdNumberList .= $this->getTDNumberListLine($td);
}
}
$this->tpl->set_var("tdNumberList", $tdNumberList);
$this->tpl->parse("PageBlock", "Page", true);
$this->pageNumber++;
}
} else {
exit("no owners selected");
}
$this->setLguDetails();
$this->setForm();
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$testpdf = new PDFWriter();
$testpdf->setOutputXML($this->tpl->get("templatePage"), "test");
if (isset($this->formArray["print"])) {
$testpdf->writePDF($name);
//,$this->formArray["print"]);
} else {
$testpdf->writePDF($name);
}
}
示例8: selectRecord
function selectRecord($ownerID)
{
if ($ownerID == "") {
return;
}
$this->setDB();
$sql = sprintf("SELECT * FROM %s WHERE ownerID=%s;", OWNER_TABLE, $ownerID);
$this->db->query($sql);
if ($this->db->next_record()) {
$this->ownerID = $this->db->f("ownerID");
$this->rptopID = $this->db->f("rptopID");
$sql = sprintf("SELECT personID FROM %s WHERE ownerID=%s;", OWNER_PERSON_TABLE, $ownerID);
$this->db->query($sql);
while ($this->db->next_record()) {
$person = new Person();
if ($person->selectRecord($this->db->f("personID"))) {
$this->setPersonArray($person);
}
}
$sql = sprintf("SELECT companyID FROM %s WHERE ownerID=%s;", OWNER_COMPANY_TABLE, $ownerID);
$this->db->query($sql);
while ($this->db->next_record()) {
$company = new Company();
if ($company->selectRecord($this->db->f("companyID"))) {
$this->setCompanyArray($company);
}
}
//print_r($this);
$this->setDomDocument();
$ret = true;
} else {
$ret = false;
}
return $ret;
}
示例9: selectRecords
function selectRecords($condition = " ORDER BY companyName ASC LIMIT 0,10")
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(" . OWNER_COMPANY_TABLE . ".companyID) as companyID, " . COMPANY_TABLE . ".companyName as companyName " . " FROM " . OWNER_COMPANY_TABLE . "," . COMPANY_TABLE . " " . " WHERE " . OWNER_COMPANY_TABLE . ".companyID = " . COMPANY_TABLE . ".companyID " . " %s;", $condition);
$this->db->query($sql);
while ($this->db->next_record()) {
$company = new Company();
$company->selectRecord($this->db->f("companyID"));
$this->arrayList[] = $company;
}
if (is_array($this->arrayList)) {
return true;
} else {
return false;
}
}
示例10: searchRecords
function searchRecords($searchKey, $fields, $limit)
{
$condition = "where (";
foreach ($fields as $key => $value) {
if ($key == 0) {
$condition = $condition . $value . " like '%" . $searchKey . "%'";
} else {
$condition = $condition . "or " . $value . " like '%" . $searchKey . "%' ";
}
}
$sql = sprintf("select * from %s %s;", COMPANY_TABLE, $condition . ") ORDER BY companyName ASC " . $limit);
$this->setDB();
$this->db->query($sql);
while ($this->db->next_record()) {
$company = new Company();
$company->selectRecord($this->db->f("companyID"));
$this->arrayList[] = $company;
}
if (count($this->arrayList) > 0) {
$this->setDomDocument();
return true;
} else {
return false;
}
}
示例11: selectRecords
function selectRecords()
{
foreach ($this->formArray["companyID"] as $companyID) {
$company = new Company();
$company->selectRecord($companyID);
$this->arrayList[] = $company;
}
}
示例12: Main
function Main()
{
$this->formArray['currentDate'] = date("F d, Y");
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
#test values
//$this->formArray['municipalityCityID']=1;
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray['municipalityCityID']))) {
#echo($xmlStr);
//exit("xml failed for municipality");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=2");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$MunicipalityCity = new MunicipalityCity();
$MunicipalityCity->parseDomDocument($domDoc);
$this->formArray['municipality'] = $MunicipalityCity->getDescription();
}
}
#test values
//$this->formArray['ownerID']=5;
#echo("ownerID=".$this->formArray['ownerID']."<br>");
// $this->displayOwnerList($this->formArray['ownerID']);
#test values
//$this->formArray["rptopID"]=15;
if ($this->formArray['personID'] != "") {
$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerNo, $person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['personID'];
$db->query($sql);
} else {
$company = new Company();
$company->selectRecord($this->formArray['companyID']);
$this->tpl->set_var(ownerName, $company->getCompanyName());
$this->tpl->set_var(ownerNo, $company->getCompanyID());
$address = $company->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['companyID'];
$db->query($sql);
}
/*$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName,$person->getFullName());
$this->tpl->set_var(ownerNo,$person->getTin());
$address = $person->addressArray[0];
$this->tpl->set_var(ownerAddress,$address->getNumber() ." ".$address->getStreet()." ".$address->getBarangay()." ".$address->getDistrict()." ".$address->getMunicipalitycity()." ".$address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=".$this->formArray['personID'];
$db->query($sql);*/
$this->tpl->set_block("rptsTemplate", "ROW", "RowBlk");
for ($i = 0; $db->next_record(); $i++) {
$rptopID = $db->f("rptopID");
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($rptopID))) {
// exit("xml failed for RPTOP");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=1");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
$this->formArray['payableYear'] = $rptop->getTaxableYear();
$rptopID = $rptop->getRptopID();
if ($key == "tdArray") {
$tdCtr = 0;
if (count($value)) {
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$TaxDeclarationNumber = $td->getTaxDeclarationNumber();
// $this->tpl->set_var(kind,$propertyType);
// $this->tpl->set_var(currentTDNo,$TaxDeclarationNumber);
/* $dues = new Dues();
$dues->create($td->getTdID(), "","","","2003");
$this->tpl->set_var(basic,$dues->getBasic());
$totBasic += $dues->getBasic();
$this->tpl->set_var(sef,$dues->getSEF());
$totSEF += $dues->getSEF();
$this->tpl->set_var(total,$dues->getSEF()+$dues->getBasic());
$totTaxDue += $dues->getSEF()+$dues->getBasic();*/
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
if (count($addr)) {
//.........这里部分代码省略.........
示例13: Main
function Main()
{
$this->formArray['currentDate'] = date("F d, Y");
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
#test values
//$this->formArray['municipalityCityID']=1;
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray['municipalityCityID']))) {
#echo($xmlStr);
exit("xml failed for municipality");
//header("Location: ".$this->sess->url("ViewSOA.php")."&status=2");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$MunicipalityCity = new MunicipalityCity();
$MunicipalityCity->parseDomDocument($domDoc);
$this->formArray['municipality'] = $MunicipalityCity->getDescription();
}
}
if ($this->formArray['personID'] != "") {
$person = new Person();
$person->selectRecord($this->formArray['personID']);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerNo, $person->getTin());
$address = $person->addressArray[0];
if (is_object($address)) {
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
} else {
$this->tpl->set_var(ownerAddress, "");
}
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['personID'];
$db->query($sql);
} else {
$company = new Company();
$company->selectRecord($this->formArray['companyID']);
$this->tpl->set_var(ownerName, $company->getCompanyName());
$this->tpl->set_var(ownerNo, $company->getCompanyID());
$address = $company->addressArray[0];
$this->tpl->set_var(ownerAddress, $address->getNumber() . " " . $address->getStreet() . " " . $address->getBarangay() . " " . $address->getDistrict() . " " . $address->getMunicipalitycity() . " " . $address->getProvince());
$db = new DB_RPTS();
$sql = "SELECT rptopID FROM Owner inner join OwnerPerson on Owner.ownerID=OwnerPerson.ownerID WHERE Owner.rptopID <> '' AND OwnerPerson.personID=" . $this->formArray['companyID'];
$db->query($sql);
}
$ypos = 325;
$this->tpl->set_block("rptsTemplate", "ROW", "RowBlk");
for ($i = 0; $db->next_record(); $i++) {
$rptopID = $db->f("rptopID");
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($rptopID))) {
// exit("xml failed for RPTOP");
header("Location: " . $this->sess->url("ViewSOA.php") . "&status=1");
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $value) {
$this->formArray['payableYear'] = $rptop->getTaxableYear();
$rptopID = $rptop->getRptopID();
if ($key == "tdArray") {
$tdCtr = 0;
if (count($value)) {
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$TaxDeclarationNumber = $td->getTaxDeclarationNumber();
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$od = new OD();
$od->selectRecord($afs->getOdID());
$addr = $od->getLocationAddress();
if (count($addr)) {
$location = strtoupper($addr->getNumber() . " " . substr($addr->getBarangay(), 0, 4) . " " . substr($addr->getMunicipalityCity(), 0, 3) . " " . substr($addr->getProvince(), 0, 3));
$munCityID = $addr->getMunicipalityCityID();
}
if (count($afs->landArray)) {
foreach ($afs->landArray as $afsKey => $afsValue) {
$actualUse = $afsValue->getActualUse();
$landActualUses = new LandActualUses();
$landActualUses->selectRecord($actualUse);
$Code = $landActualUses->getCode();
}
}
if (count($afs->improvementsBuildingsArray)) {
foreach ($afs->improvementsBuildingsArray as $afsKey => $afsValue) {
$actualUse = $afsValue->getActualUse();
$improvementsBuildingsActualUses = new improvementsBuildingsActualUses();
$improvementsBuildingsActualUses->selectRecord($actualUse);
$Code = $improvementsBuildingsActualUses->getCode();
}
}
if ($munCityID == $this->formArray['municipalityCityID']) {
$this->tpl->set_var(location, $location);
//.........这里部分代码省略.........
示例14: selectCompanyRecords
function selectCompanyRecords($condition = "")
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(OwnerCompany.companyID) as companyID" . " FROM OwnerCompany,Company " . " WHERE OwnerCompany.companyID = Company.companyID " . " %s;", $condition);
$this->db->query($sql);
$companyRecords = new CompanyRecords();
while ($this->db->next_record()) {
$company = new Company();
$company->selectRecord($this->db->f("companyID"));
$companyRecords->arrayList[] = $company;
}
if (is_array($companyRecords->arrayList)) {
return $companyRecords;
} else {
return false;
}
}
示例15: getOwnerName
function getOwnerName($ownerID)
{
$address1 = "";
$address2 = "";
$db = new DB_RPTS();
// person
$sql = "SELECT " . "Person.personID as personID " . ",Person.firstName as firstName " . ",Person.middleName as middleName " . ", Person.lastName as lastName " . "FROM" . " " . PERSON_TABLE . ", " . OWNER_PERSON_TABLE . " WHERE" . " " . PERSON_TABLE . ".personID = " . OWNER_PERSON_TABLE . ".personID" . " AND" . " " . OWNER_PERSON_TABLE . ".ownerID = " . $ownerID;
$db->query($sql);
while ($db->next_record()) {
if ($db->f("middleName") != "") {
$middleInitial = substr($db->f("middleName"), 0, 1) . ".";
$fullName = $db->f("firstName") . " " . $middleInitial . " " . $db->f("lastName");
} else {
$fullName = $db->f("firstName") . " " . $db->f("lastName");
}
$ownerNamesArray[] = $fullName;
if ($address1 == "" && $address2 == "") {
$personID = $db->f("personID");
$person = new Person();
$person->selectRecord($personID);
$address = $person->addressArray[0];
if (is_a($address, Address)) {
if ($address->getNumber() != "" && $address->getNumber() != " " && $address->getNumber() != "-" && $address->getNumber() != "--") {
$this->formArray["address1"] = $address->getNumber();
}
if ($address->getStreet() != "" && $address->getStreet() != " " && $address->getStreet() != "-" && $address->getStreet() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= " " . $address->getStreet();
} else {
$this->formArray["address1"] = $address->getStreet();
}
}
if ($address->getBarangay() != "" && $address->getBarangay() != " " && $address->getBarangay() != "-" && $address->getBarangay() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= ", " . $address->getBarangay();
} else {
$this->formArray["address1"] = $address->getBarangay();
}
}
if ($address->getDistrict() != "" && $address->getDistrict() != " " && $address->getDistrict() != "-" && $address->getDistrict() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= ", " . $address->getDistrict();
} else {
$this->formArray["address1"] = $address->getDistrict();
}
}
if ($address->getMunicipalityCity() != "" && $address->getMunicipalityCity() != " " && $address->getMunicipalityCity() != "-" && $address->getMunicipalityCity() != "--") {
$this->formArray["address2"] = $address->getMunicipalityCity();
}
if ($address->getProvince() != "" && $address->getProvince() != " " && $address->getProvince() != "-" && $address->getProvince() != "--") {
if ($this->formArray["address2"] != "") {
$this->formArray["address2"] .= ", " . $address->getProvince();
} else {
$this->formArray["address2"] = $address->getProvince();
}
}
}
}
}
unset($db);
$db = new DB_RPTS();
// company
$sql = "SELECT " . "Company.companyID as companyID " . ",Company.companyName as companyName " . "FROM" . " " . COMPANY_TABLE . ", " . OWNER_COMPANY_TABLE . " WHERE" . " " . COMPANY_TABLE . ".companyID = " . OWNER_COMPANY_TABLE . ".companyID" . " AND" . " " . OWNER_COMPANY_TABLE . ".ownerID = " . $ownerID;
$db->query($sql);
while ($db->next_record()) {
$ownerNamesArray[] = $db->f("companyName");
if ($address1 == "" && $address2 == "") {
$companyID = $db->f("companyID");
$company = new Company();
$company->selectRecord($companyID);
$address = $company->addressArray[0];
if (is_a($address, Address)) {
if ($address->getNumber() != "" && $address->getNumber() != " " && $address->getNumber() != "-" && $address->getNumber() != "--") {
$this->formArray["address1"] = $address->getNumber();
}
if ($address->getStreet() != "" && $address->getStreet() != " " && $address->getStreet() != "-" && $address->getStreet() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= " " . $address->getStreet();
} else {
$this->formArray["address1"] = $address->getStreet();
}
}
if ($address->getBarangay() != "" && $address->getBarangay() != " " && $address->getBarangay() != "-" && $address->getBarangay() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= ", " . $address->getBarangay();
} else {
$this->formArray["address1"] = $address->getBarangay();
}
}
if ($address->getDistrict() != "" && $address->getDistrict() != " " && $address->getDistrict() != "-" && $address->getDistrict() != "--") {
if ($this->formArray["address1"] != "") {
$this->formArray["address1"] .= ", " . $address->getDistrict();
} else {
$this->formArray["address1"] = $address->getDistrict();
}
}
if ($address->getMunicipalityCity() != "" && $address->getMunicipalityCity() != " " && $address->getMunicipalityCity() != "-" && $address->getMunicipalityCity() != "--") {
$this->formArray["address2"] = $address->getMunicipalityCity();
}
if ($address->getProvince() != "" && $address->getProvince() != " " && $address->getProvince() != "-" && $address->getProvince() != "--") {
//.........这里部分代码省略.........