本文整理汇总了PHP中Province::getDescription方法的典型用法代码示例。如果您正苦于以下问题:PHP Province::getDescription方法的具体用法?PHP Province::getDescription怎么用?PHP Province::getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Province
的用法示例。
在下文中一共展示了Province::getDescription方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayPageHeading
function displayPageHeading()
{
$BarangayList = new SoapObject(NCCBIZ . "BarangayList.php", "urn:Object");
if (!($this->formArray["noBgys"] = $BarangayList->getBarangayCount("WHERE " . BARANGAY_TABLE . ".status='active'"))) {
$this->formArray["noBgys"] = 0;
}
$MunicipalityCityDetails = new SoapObject(NCCBIZ . "MunicipalityCityDetails.php", "urn:Object");
if (!($xmlStr = $MunicipalityCityDetails->getMunicipalityCityDetails($this->formArray["municipalityCityID"]))) {
exit("no municipality/city selected");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("no municipality/city selected");
} else {
$municipalityCity = new MunicipalityCity();
$municipalityCity->parseDomDocument($domDoc);
$this->formArray["municipalityCity"] = $municipalityCity->getDescription();
$this->formArray["provinceID"] = $municipalityCity->getProvinceID();
$ProvinceDetails = new SoapObject(NCCBIZ . "ProvinceDetails.php", "urn:Object");
if (!($xmlStr = $ProvinceDetails->getProvinceDetails($this->formArray["provinceID"]))) {
exit("no province associated with selected municipality/city");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
exit("no province associated with selected municipality/city");
} else {
$province = new Province();
$province->parseDomDocument($domDoc);
$this->formArray["province"] = $province->getDescription();
}
}
}
}
$quarterEndingDateArray = array("Q1" => "March 31", "Q2" => "June 30", "Q3" => "September 30", "Q4" => "December 31");
$quarterBeginningDateArray = array("Q1" => "January 1", "Q2" => "April 1", "Q3" => "July 1", "Q4" => "October 1");
$this->formArray["quarterEndingDate"] = $quarterEndingDateArray[$this->formArray["quarter"]];
$this->formArray["quarterBeginningDate"] = $quarterBeginningDateArray[$this->formArray["quarter"]];
}
示例2: initLocationDetails
function initLocationDetails($TempVar, $tempVar)
{
$getDetails = "get" . $TempVar . "Details";
$TempVarDetails = new SoapObject(NCCBIZ . $TempVar . "Details.php", "urn:Object");
if (!($xmlStr = $TempVarDetails->{$getDetails}($this->formArray[$tempVar . "ID"]))) {
// error xmlStr
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
switch ($tempVar) {
case "barangay":
$tempVarObject = new Barangay();
break;
case "district":
$tempVarObject = new District();
break;
case "municipalityCity":
$tempVarObject = new MunicipalityCity();
break;
case "province":
$tempVarObject = new Province();
break;
}
$tempVarObject->parseDomDocument($domDoc);
$this->formArray[$tempVar] = $tempVarObject->getDescription();
}
}
}
示例3: getProvince
function getProvince($provinceID)
{
$ProvinceDetails = new SoapObject(NCCBIZ . "ProvinceDetails.php", "urn:Object");
if (!($xmlStr = $ProvinceDetails->getProvinceDetails($provinceID))) {
$ret = "District DB empty";
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$ret = "error provinceXmlDoc";
} else {
$province = new Province();
$province->parseDomDocument($domDoc);
$ret = $province->getDescription();
}
}
return $ret;
}
示例4: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$this->tpl->set_var("MessageBlock", "");
$ProvinceDetails = new SoapObject(NCCBIZ . "ProvinceDetails.php", "urn:Object");
if (!($xmlStr = $ProvinceDetails->getProvinceDetails($this->formArray["provinceID"]))) {
$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 {
$province = new Province();
$province->parseDomDocument($domDoc);
$this->formArray["provinceID"] = $province->getProvinceID();
$this->formArray["code"] = $province->getCode();
$this->formArray["description"] = $province->getDescription();
$this->formArray["status"] = $province->getStatus();
}
}
break;
case "save":
if ($this->codeAlreadyExists() == true) {
$this->message = "Error. Cannot Save. Code already exists.";
$this->tpl->set_var("message", $this->message);
$this->tpl->parse("MessageBlock", "Message", true);
break;
} else {
$this->tpl->set_var("MessageBlock", "");
}
$ProvinceEncode = new SoapObject(NCCBIZ . "ProvinceEncode.php", "urn:Object");
if ($this->formArray["provinceID"] != "") {
$ProvinceDetails = new SoapObject(NCCBIZ . "ProvinceDetails.php", "urn:Object");
if (!($xmlStr = $ProvinceDetails->getProvinceDetails($this->formArray["provinceID"]))) {
exit("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 {
$province = new Province();
$province->parseDomDocument($domDoc);
$province->setProvinceID($this->formArray["provinceID"]);
$province->setCode($this->formArray["code"]);
$province->setDescription($this->formArray["description"]);
$province->setStatus($this->formArray["status"]);
$province->setDomDocument();
$doc = $province->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $ProvinceEncode->updateProvince($xmlStr))) {
exit("error update");
}
}
}
} else {
$province = new Province();
$province->setProvinceID($this->formArray["provinceID"]);
$province->setCode($this->formArray["code"]);
$province->setDescription($this->formArray["description"]);
$province->setStatus($this->formArray["status"]);
$province->setDomDocument();
$doc = $province->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $ProvinceEncode->saveProvince($xmlStr))) {
exit("error save");
}
}
$this->formArray["provinceID"] = $ret;
header("location: ProvinceClose.php" . $this->sess->url("") . $this->sess->add_query(array("provinceID" => $ret)));
//header("location: ProvinceEncode.php");
exit;
break;
case "cancel":
header("location: ProvinceClose.php" . $this->sess->url("") . $this->sess->add_query(array("provinceID" => $ret)));
//header("location: ProvinceList.php");
exit;
break;
default:
$this->tpl->set_block("rptsTemplate", "ProvinceID", "ProvinceIDBlock");
$this->tpl->set_var("ProvinceIDBlock", "");
$this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
$this->tpl->set_var("ACKBlock", "");
$this->tpl->set_var("MessageBlock", "");
}
$this->setForm();
$this->tpl->parse("templatePage", "rptsTemplate");
$this->tpl->finish("templatePage");
$this->tpl->p("templatePage");
}