本文整理汇总了PHP中Company::getCompanyID方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::getCompanyID方法的具体用法?PHP Company::getCompanyID怎么用?PHP Company::getCompanyID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Company
的用法示例。
在下文中一共展示了Company::getCompanyID方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Main
function Main($referer = "")
{
if (!$referer || !isset($referer)) {
$referer = "OwnerList.php";
}
$this->tpl->set_var("referer", $referer);
switch ($this->formArray["formAction"]) {
case "save" || "view" || "viewOnly":
$this->tpl->set_var("referer", $referer);
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$this->formArray["companyID"] = $company->getCompanyID();
$this->formArray["companyName"] = $company->getCompanyName();
$this->formArray["tin"] = $company->getTin();
$this->formArray["telephone"] = $company->getTelephone();
$this->formArray["fax"] = $company->getFax();
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$this->formArray["addressID"] = $address->getAddressID();
$this->formArray["number"] = $address->getNumber();
$this->formArray["street"] = $address->getStreet();
$this->formArray["barangay"] = $address->getBarangay();
$this->formArray["district"] = $address->getDistrict();
$this->formArray["municipalityCity"] = $address->getMunicipalitycity();
$this->formArray["province"] = $address->getProvince();
}
$this->formArray["email"] = $company->getEmail();
$this->formArray["website"] = $company->getWebsite();
}
}
if ($this->formArray["formAction"] == "viewOnly") {
$this->tpl->set_block("rptsTemplate", "ViewOnly", "ViewOnlyBlock");
$this->tpl->set_var("ViewOnlyBlock", "");
}
break;
case "cancel":
//header("location: CompanyList.php");
exit;
break;
default:
$this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
$this->tpl->set_var("ACKBlock", "");
}
//*/
$this->setForm();
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}
示例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: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$this->formArray["companyID"] = $company->getCompanyID();
$this->formArray["companyName"] = $company->getCompanyName();
$this->formArray["tin"] = $company->getTin();
$this->formArray["telephone"] = $company->getTelephone();
$this->formArray["fax"] = $company->getFax();
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$this->formArray["addressID"] = $address->getAddressID();
$this->formArray["number"] = $address->getNumber();
$this->formArray["street"] = $address->getStreet();
$this->formArray["barangay"] = $address->getBarangay();
$this->formArray["district"] = $address->getDistrict();
$this->formArray["municipalityCity"] = $address->getMunicipalitycity();
$this->formArray["province"] = $address->getProvince();
}
$this->formArray["email"] = $company->getEmail();
$this->formArray["website"] = $company->getWebsite();
}
}
break;
case "save":
$CompanyEncode = new SoapObject(NCCBIZ . "CompanyEncode.php", "urn:Object");
if ($this->formArray["companyID"] != "") {
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
}
//$company->selectRecord($this->formArray["companyID"]);
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTin($this->formArray["tin"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->updateCompany($xmlStr))) {
exit("error update");
}
}
}
} else {
$address = new Address();
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$company = new Company();
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setTin($this->formArray["tin"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->saveCompany($xmlStr, $this->formArray["ownerID"]))) {
exit("error save");
//.........这里部分代码省略.........
示例4: 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)) {
//.........这里部分代码省略.........
示例5: 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);
//.........这里部分代码省略.........