本文整理汇总了PHP中Person::selectRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP Person::selectRecord方法的具体用法?PHP Person::selectRecord怎么用?PHP Person::selectRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Person
的用法示例。
在下文中一共展示了Person::selectRecord方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPerson
function getPerson($personID)
{
$person = new Person();
if ($person->selectRecord($personID)) {
return $person;
} 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: selectRecords
function selectRecords($condition = " ORDER BY TRIM(Person.lastName), TRIM(Person.firstName), TRIM(Person.middleName) ASC LIMIT 0,10")
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(OwnerPerson.personID) as personID" . " FROM OwnerPerson,Person " . " WHERE OwnerPerson.personID = Person.personID " . " %s;", $condition);
$this->db->query($sql);
while ($this->db->next_record()) {
$person = new Person();
$person->selectRecord($this->db->f("personID"));
$this->arrayList[] = $person;
}
}
示例4: getPersonDetails
function getPersonDetails($personID)
{
$person = new Person();
$person->selectRecord($personID);
if (!($domDoc = $person->getDomDocument())) {
return false;
} else {
$xmlStr = $domDoc->dump_mem(true);
return $xmlStr;
}
}
示例5: selectPersonRecords
function selectPersonRecords($condition = "")
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(OwnerPerson.personID) as personID" . " FROM OwnerPerson,Person " . " WHERE OwnerPerson.personID = Person.personID " . " %s;", $condition);
$this->db->query($sql);
$personRecords = new PersonRecords();
while ($this->db->next_record()) {
$person = new Person();
$person->selectRecord($this->db->f("personID"));
$personRecords->arrayList[] = $person;
}
if (is_array($personRecords->arrayList)) {
return $personRecords;
} else {
return false;
}
}
示例6: setPersonList
function setPersonList()
{
$db = new DB_RPTS();
$db1 = new DB_RPTS();
$db->query("SELECT DISTINCT personID from OwnerPerson inner join Owner on Owner.ownerID=OwnerPerson.ownerID where Owner.rptopID <> ''");
$this->tpl->set_block("rptsTemplate", "Owner", "oBlk");
for ($i = 0; $db->next_record(); $i++) {
$personID = $db->f("personID");
$person = new Person();
if ($person->selectRecord($personID)) {
//$setPersonArray($person);
$this->tpl->set_var(ownerName, $person->getFullName());
$this->tpl->set_var(ownerID, $personID);
}
$this->tpl->parse("oBlk", "Owner", true);
}
}
示例7: 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;
}
示例8: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "remove":
//echo "removeOwnerRPTOP(".$this->formArray["rptopID"].",".$this->formArray["ownerID"].",".$this->formArray["personID"].",".$this->formArray["companyID"].")";
$OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
if (count($this->formArray["personID"]) || count($this->formArray["companyID"])) {
if (!($deletedRows = $OwnerList->removeOwnerRPTOP($this->formArray["rptopID"], $this->formArray["ownerID"], $this->formArray["personID"], $this->formArray["companyID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
//echo "SOAP failed";
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
header("location: RPTOPDetails.php" . $this->sess->url("") . $this->sess->add_query(array("rptopID" => $this->formArray["rptopID"])));
exit;
break;
default:
$this->tpl->set_var("msg", "");
}
//select
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($this->formArray["rptopID"]))) {
exit("xml failed");
} 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();
$rptop->parseDomDocument($domDoc);
//print_r($rptop);
foreach ($rptop as $key => $value) {
switch ($key) {
case "owner":
//$RPTOPEncode = new SoapObject(NCCBIZ."RPTOPEncode.php", "urn:Object");
if (is_a($value, "Owner")) {
$this->formArray["ownerID"] = $rptop->owner->getOwnerID();
$xmlStr = $rptop->owner->domDocument->dump_mem(true);
if (!$xmlStr) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$this->displayOwnerList($domDoc);
}
}
} else {
$this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
$this->tpl->set_var("PersonListBlock", "");
$this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
$this->tpl->set_var("CompanyListBlock", "");
}
break;
case "cityAssessor":
if (is_numeric($value)) {
$cityAssessor = new Person();
$cityAssessor->selectRecord($value);
$this->tpl->set_var("cityAssessorID", $cityAssessor->getPersonID());
$this->tpl->set_var("cityAssessorName", $cityAssessor->getFullName());
$this->formArray["cityAssessorName"] = $cityAssessor->getFullName();
} else {
$cityAssessor = $value;
$this->tpl->set_var("cityAssessorID", $cityAssessor);
$this->tpl->set_var("cityAssessorName", $cityAssessor);
$this->formArray["cityAssessorName"] = $cityAssessor;
}
break;
case "cityTreasurer":
if (is_numeric($value)) {
$cityTreasurer = new Person();
$cityTreasurer->selectRecord($value);
$this->tpl->set_var("cityTreasurerID", $cityTreasurer->getPersonID());
$this->tpl->set_var("cityTreasurerName", $cityTreasurer->getFullName());
$this->formArray["cityTreasurerName"] = $cityTreasurer->getFullName();
} else {
$cityTreasurer = $value;
$this->tpl->set_var("cityTreasurerID", $cityTreasurer);
$this->tpl->set_var("cityTreasurerName", $cityTreasurer);
$this->formArray["cityTreasurerName"] = $cityTreasurer;
}
break;
case "tdArray":
//$this->tpl->set_block("rptsTemplate", "defaultTDList", "defaultTDListBlock");
//$this->tpl->set_block("rptsTemplate", "toggleTDList", "toggleTDListBlock");
//$this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
//$this->tpl->set_block("TDList", "BacktaxesList", "BacktaxesListBlock");
$tdCtr = 0;
if (count($value)) {
$this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
$this->tpl->set_var("TDDBEmptyBlock", "");
/*
$this->tpl->set_block("TDList", "Land", "LandBlock");
$this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
//.........这里部分代码省略.........
示例9: displayDetails
function displayDetails($value)
{
//print_r($value);
foreach ($value as $lkey => $lvalue) {
switch ($lkey) {
case "propertyAdministrator":
if (is_a($lvalue, Person)) {
list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $lvalue->getBirthday());
$this->tpl->set_var("personID", $lvalue->getPersonID());
$this->tpl->set_var("lastName", $lvalue->getLastName());
$this->tpl->set_var("firstName", $lvalue->getFirstName());
$this->tpl->set_var("middleName", $lvalue->getMiddleName());
$this->tpl->set_var("gender", $lvalue->getGender());
$this->tpl->set_var("birth_year", removePreZero($dateArr["year"]));
$this->tpl->set_var("birth_month", removePreZero($dateArr["month"]));
$this->tpl->set_var("birth_day", removePreZero($dateArr["day"]));
$this->tpl->set_var("maritalStatus", $lvalue->getMaritalStatus());
$this->tpl->set_var("tin", $lvalue->getTin());
if (is_a($lvalue->addressArray[0], "address")) {
$this->tpl->set_var("addressID", $lvalue->addressArray[0]->getAddressID());
$this->tpl->set_var("number", $lvalue->addressArray[0]->getNumber());
$this->tpl->set_var("street", $lvalue->addressArray[0]->getStreet());
$this->tpl->set_var("barangay", $lvalue->addressArray[0]->getBarangay());
$this->tpl->set_var("district", $lvalue->addressArray[0]->getDistrict());
$this->tpl->set_var("municipalityCity", $lvalue->addressArray[0]->getMunicipalityCity());
$this->tpl->set_var("province", $lvalue->addressArray[0]->getProvince());
}
$this->tpl->set_var("telephone", $lvalue->getTelephone());
$this->tpl->set_var("mobileNumber", $lvalue->getMobileNumber());
$this->tpl->set_var("email", $lvalue->getEmail());
} else {
$this->tpl->set_var($lkey, "");
}
break;
case "verifiedBy":
if (is_numeric($lvalue)) {
$verifiedBy = new Person();
$verifiedBy->selectRecord($lvalue);
$this->tpl->set_var("verifiedByID", $verifiedBy->getPersonID());
$this->tpl->set_var("verifiedByName", $verifiedBy->getFullName());
} else {
$verifiedBy = $lvalue;
$this->tpl->set_var("verifiedByID", $verifiedBy);
$this->tpl->set_var("verifiedByName", $verifiedBy);
}
break;
case "plottingsBy":
if (is_numeric($lvalue)) {
$plottingsBy = new Person();
$plottingsBy->selectRecord($lvalue);
$this->tpl->set_var("plottingsByID", $plottingsBy->getPersonID());
$this->tpl->set_var("plottingsByName", $plottingsBy->getFullName());
} else {
$plottingsBy = $lvalue;
$this->tpl->set_var("plottingsByID", $plottingsBy);
$this->tpl->set_var("plottingsByName", $plottingsBy);
}
break;
case "notedBy":
if (is_numeric($lvalue)) {
$notedBy = new Person();
$notedBy->selectRecord($lvalue);
$this->tpl->set_var("notedByID", $notedBy->getPersonID());
$this->tpl->set_var("notedByName", $notedBy->getFullName());
} else {
$notedBy = $lvalue;
$this->tpl->set_var("notedByID", $notedBy);
$this->tpl->set_var("notedByName", $notedBy);
}
break;
case "appraisedBy":
if (is_numeric($lvalue)) {
$appraisedBy = new Person();
$appraisedBy->selectRecord($lvalue);
$this->tpl->set_var("appraisedByID", $appraisedBy->getPersonID());
$this->tpl->set_var("appraisedByName", $appraisedBy->getFullName());
} else {
$appraisedBy = $lvalue;
$this->tpl->set_var("appraisedByID", $appraisedBy);
$this->tpl->set_var("appraisedByName", $appraisedBy);
}
break;
case "appraisedByDate":
if (true) {
list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $lvalue);
$this->tpl->set_var("as_yearValue", removePreZero($dateArr["year"]));
eval(MONTH_ARRAY);
//$monthArray
$this->tpl->set_var("as_month", $monthArray[removePreZero($dateArr["month"])]);
$this->tpl->set_var("as_dayValue", removePreZero($dateArr["day"]));
} else {
$this->tpl->set_var("as_yearValue", "");
$this->tpl->set_var("as_month", "");
$this->tpl->set_var("as_dayValue", "");
}
break;
case "recommendingApproval":
if (is_numeric($lvalue)) {
$recommendingApproval = new Person();
$recommendingApproval->selectRecord($lvalue);
//.........这里部分代码省略.........
示例10: selectRecord
function selectRecord($propertyID)
{
if ($propertyID == "") {
return;
}
$this->setDB();
$sql = sprintf("SELECT * FROM %s WHERE propertyID=%s;", IMPROVEMENTSBUILDINGS_TABLE, $propertyID);
$this->db->query($sql);
//echo $sql;
$improvementsBuildings = new ImprovementsBuildings();
if ($this->db->next_record()) {
foreach ($this->db->Record as $key => $value) {
switch ($key) {
case "propertyAdministrator":
$propertyAdministrator = new Person();
if ($propertyAdministrator->selectRecord($value)) {
$this->{$key} = $propertyAdministrator;
} else {
$this->{$key} = "";
}
break;
default:
$this->{$key} = $value;
}
}
$this->setDomDocument();
$ret = true;
} else {
$ret = false;
}
return $ret;
}
示例11: displayTDDetails
function displayTDDetails()
{
$afsID = $this->formArray["afsID"];
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if (!($xmlStr = $TDDetails->getTD("", $afsID, "", ""))) {
// error xml
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
$td = new TD();
$td->parseDomDocument($domDoc);
$this->formArray["taxDeclarationNumber"] = $td->getTaxDeclarationNumber();
$this->formArray["memoranda"] = $td->getMemoranda();
$this->formArray["cancelsTDNumber"] = $td->getCancelsTDNumber();
//cityMunicipalAssessor
if (is_numeric($td->getCityMunicipalAssessor())) {
$cityMunicipalAssessor = new Person();
$cityMunicipalAssessor->selectRecord($td->cityMunicipalAssessor);
$this->formArray["cityAssessor"] = $cityMunicipalAssessor->getFullName();
} else {
$this->formArray["cityAssessor"] = $td->getCityMunicipalAssessor;
}
$this->formArray["propertyType"] = $td->getPropertyType();
}
}
}
示例12: initMasterSignatoryList
function initMasterSignatoryList($TempVar, $tempVar)
{
$this->tpl->set_block("rptsTemplate", $TempVar . "List", $TempVar . "ListBlock");
$UserList = new SoapObject(NCCBIZ . "UserList.php", "urn:Object");
if (!($xmlStr = $UserList->getUserList(0, " WHERE " . AUTH_USER_MD5_TABLE . ".userType REGEXP '1\$' AND " . AUTH_USER_MD5_TABLE . ".status='enabled'"))) {
// error xmlStr
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
$UserRecords = new UserRecords();
$UserRecords->parseDomDocument($domDoc);
$list = $UserRecords->getArrayList();
foreach ($list as $key => $user) {
$person = new Person();
$person->selectRecord($user->personID);
$this->tpl->set_var("id", $user->personID);
$this->tpl->set_var("name", $person->getFullName());
$this->initSelected($tempVar . "ID", $user->personID);
$this->tpl->parse($TempVar . "ListBlock", $TempVar . "List", true);
}
}
}
}
示例13: getFullName
function getFullName()
{
$person = new Person();
$person->selectRecord($this->personID);
return $person->getFullName();
}
示例14: displayMachineriesList
function displayMachineriesList($machineriesList)
{
$totAcqCst = 0;
$totOthers = 0;
$totMrktVal = 0;
$totalMarketValue = 0;
$totalAssessmentValue = 0;
if (count($machineriesList)) {
$i = 0;
foreach ($machineriesList as $key => $machineries) {
if ($i == 0) {
// $this->formArray["arpNumber"] = $machineries->getArpNumber();
// $this->formArray["propertyIndexNumber"] = $machineries->getPropertyIndexNumber();
$this->formArray["taxability"] = $machineries->getTaxability();
$this->formArray["effectivity"] = $machineries->getEffectivity();
$this->formArray["buildingPIN"] = $machineries->getBuildingPin();
$this->formArray["landPIN"] = $machineries->getLandPin();
$this->formArray["memoranda"] = $machineries->getMemoranda();
if (is_a($machineries->propertyAdministrator, Person)) {
$this->formArray["userAdmin"] = $machineries->propertyAdministrator->getFullName();
if (is_a($machineries->propertyAdministrator->addressArray[0], "address")) {
$address1 = $machineries->propertyAdministrator->addressArray[0]->getNumber();
$address1 .= " " . $machineries->propertyAdministrator->addressArray[0]->getStreet();
$address1 .= ", " . $machineries->propertyAdministrator->addressArray[0]->getBarangay();
$address2 = $machineries->propertyAdministrator->addressArray[0]->getDistrict();
$address2 .= ", " . $machineries->propertyAdministrator->addressArray[0]->getMunicipalityCity();
$address2 .= ", " . $machineries->propertyAdministrator->addressArray[0]->getProvince();
$this->formArray["userAdminAddress"] = $address1 . " " . $address2;
}
$this->formArray["userAdminTelNo"] = $machineries->propertyAdministrator->getTelephone();
}
// recommendingApproval
if (is_numeric($machineries->recommendingApproval)) {
$recommendingApproval = new Person();
$recommendingApproval->selectRecord($machineries->recommendingApproval);
$this->formArray["cityAssessor"] = $recommendingApproval->getFullName();
$this->recommendingApproval = $recommendingApproval->getFullName();
} else {
$recommendingApproval = $machineries->recommendingApproval;
$this->formArray["cityAssessor"] = $recommendingApproval;
$this->recommendingApproval = $recommendingApproval;
}
$this->formArray["dateCityAssessor"] = $machineries->getRecommendingApprovalDate();
// approvedBy
if (is_numeric($machineries->approvedBy)) {
$approvedBy = new Person();
$approvedBy->selectRecord($machineries->approvedBy);
$this->formArray["provincialAssessor"] = $approvedBy->getFullName();
$this->approvedBy = $approvedBy->getFullName();
} else {
$approvedBy = $land->approvedBy;
$this->formArray["provincialAssessor"] = $approvedBy;
$this->approvedBy = $approvedBy;
}
$this->formArray["dateProvAssessor"] = $machineries->getApprovedByDate();
// appraisedBy (assessedBy)
if (is_numeric($machineries->appraisedBy)) {
$appraisedBy = new Person();
$appraisedBy->selectRecord($machineries->appraisedBy);
$this->formArray["assessedBy"] = $appraisedBy->getFullName();
$this->appraisedBy = $appraisedBy->getFullName();
} else {
$appraisedBy = $machineries->appraisedBy;
$this->formArray["assessedBy"] = $appraisedBy;
$this->appraisedBy = $appraisedBy;
}
$this->formArray["dateAssessedBy"] = $machineries->getAppraisedByDate();
}
if ($i < 9) {
$this->formArray["tbl1Desc" . ($i + 1)] = $machineries->machineryDescription;
$this->formArray["tbl2Desc" . ($i + 1)] = $machineries->machineryDescription;
$this->formArray["brandNo" . ($i + 1)] = $machineries->brand . " " . $machineries->modelNumber;
$this->formArray["capacity" . ($i + 1)] = $machineries->capacity;
$this->formArray["dateAcquired" . ($i + 1)] = $machineries->dateAcquired;
$this->formArray["condAcq" . ($i + 1)] = $machineries->conditionWhenAcquired;
$this->formArray["lifeEst" . ($i + 1)] = $machineries->estimatedEconomicLife;
$this->formArray["lifeRem" . ($i + 1)] = $machineries->remainingEconomicLife;
$this->formArray["dateInst" . ($i + 1)] = $machineries->dateOfInstallation;
$this->formArray["dateOper" . ($i + 1)] = $machineries->dateOfOperation;
$this->formArray["remarks" . ($i + 1)] = $machineries->remarks;
$this->formArray["units" . ($i + 1)] = $machineries->numberOfUnits;
$this->formArray["acqCost" . ($i + 1)] = $machineries->acquisitionCost;
$this->formArray["freight" . ($i + 1)] = $machineries->freightCost;
$this->formArray["insurnc" . ($i + 1)] = $machineries->insuranceCost;
$this->formArray["instaln" . ($i + 1)] = $machineries->installationCost;
$this->formArray["others" . ($i + 1)] = $machineries->othersCost;
$this->formArray["mrktVal" . ($i + 1)] = $machineries->marketValue;
$this->formArray["depr" . ($i + 1)] = $machineries->depreciation;
$this->formArray["depMVal" . ($i + 1)] = $machineries->depreciatedMarketValue;
$totAcqCst = $totAcqCst + toFloat($machineries->acquisitionCost);
$totOthers = $totOthers + toFloat($machineries->othersCost);
$totMrktVal = $totMrktVal + toFloat($machineries->marketValue);
$totalMarketValue = $totMrktVal;
$totalAssessmentValue = $totalAssessmentValue + toFloat($machineries->assessedValue);
}
$i++;
}
}
$this->formArray["totAcqCst"] = $totAcqCst;
$this->formArray["totOthers"] = $totOthers;
//.........这里部分代码省略.........
示例15: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "remove":
//echo "removeOwnerRPTOP(".$this->formArray["rptopID"].",".$this->formArray["ownerID"].",".$this->formArray["personID"].",".$this->formArray["companyID"].")";
$OwnerList = new SoapObject(NCCBIZ . "OwnerList.php", "urn:Object");
if (count($this->formArray["personID"]) || count($this->formArray["companyID"])) {
if (!($deletedRows = $OwnerList->removeOwnerRPTOP($this->formArray["rptopID"], $this->formArray["ownerID"], $this->formArray["personID"], $this->formArray["companyID"]))) {
$this->tpl->set_var("msg", "SOAP failed");
//echo "SOAP failed";
} else {
$this->tpl->set_var("msg", $deletedRows . " records deleted");
}
} else {
$this->tpl->set_var("msg", "0 records deleted");
}
header("location: RPTOPDetails.php" . $this->sess->url("") . $this->sess->add_query(array("rptopID" => $this->formArray["rptopID"])));
exit;
break;
default:
$this->tpl->set_var("msg", "");
}
//select
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($this->formArray["rptopID"]))) {
exit("xml failed");
} 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();
$rptop->parseDomDocument($domDoc);
//print_r($rptop);
foreach ($rptop as $key => $value) {
switch ($key) {
case "owner":
//$RPTOPEncode = new SoapObject(NCCBIZ."RPTOPEncode.php", "urn:Object");
if (is_a($value, "Owner")) {
$this->formArray["ownerID"] = $rptop->owner->getOwnerID();
$xmlStr = $rptop->owner->domDocument->dump_mem(true);
if (!$xmlStr) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$this->displayOwnerList($domDoc);
}
}
} else {
$this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
$this->tpl->set_var("PersonListBlock", "");
$this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
$this->tpl->set_var("CompanyListBlock", "");
}
break;
case "cityAssessor":
if (is_numeric($value)) {
$cityAssessor = new Person();
$cityAssessor->selectRecord($value);
$this->tpl->set_var("cityAssessorID", $cityAssessor->getPersonID());
$this->tpl->set_var("cityAssessorName", $cityAssessor->getFullName());
$this->formArray["cityAssessorName"] = $cityAssessor->getFullName();
} else {
$cityAssessor = $value;
$this->tpl->set_var("cityAssessorID", $cityAssessor);
$this->tpl->set_var("cityAssessorName", $cityAssessor);
$this->formArray["cityAssessorName"] = $cityAssessor;
}
break;
case "cityTreasurer":
if (is_numeric($value)) {
$cityTreasurer = new Person();
$cityTreasurer->selectRecord($value);
$this->tpl->set_var("cityTreasurerID", $cityTreasurer->getPersonID());
$this->tpl->set_var("cityTreasurerName", $cityTreasurer->getFullName());
$this->formArray["cityTreasurerName"] = $cityTreasurer->getFullName();
} else {
$cityTreasurer = $value;
$this->tpl->set_var("cityTreasurerID", $cityTreasurer);
$this->tpl->set_var("cityTreasurerName", $cityTreasurer);
$this->formArray["cityTreasurerName"] = $cityTreasurer;
}
break;
case "tdArray":
$this->tpl->set_block("rptsTemplate", "defaultTDList", "defaultTDListBlock");
$this->tpl->set_block("rptsTemplate", "toggleTDList", "toggleTDListBlock");
$this->tpl->set_block("rptsTemplate", "TDList", "TDListBlock");
$tdCtr = 0;
if (count($value)) {
$this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
$this->tpl->set_var("TDDBEmptyBlock", "");
/*
$this->tpl->set_block("TDList", "Land", "LandBlock");
$this->tpl->set_block("TDList", "PlantsTrees", "PlantsTreesBlock");
$this->tpl->set_block("TDList", "ImprovementsBuildings", "ImprovementsBuildingsBlock");
//.........这里部分代码省略.........