本文整理汇总了PHP中TD类的典型用法代码示例。如果您正苦于以下问题:PHP TD类的具体用法?PHP TD怎么用?PHP TD使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TD类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPropertyTypeFromOD
function getPropertyTypeFromOD($od)
{
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
$td = new TD();
if ($domDoc = domxml_open_mem($xmlStr)) {
$td->parseDomDocument($domDoc);
$propertyType = $td->getPropertyType();
}
}
}
switch ($propertyType) {
case "Land":
$propertyType = "L/P";
break;
case "ImprovementsBuildings":
$propertyType = "I/B";
break;
case "Machineries":
$propertyType = "M";
break;
default:
$propertyType = "-";
break;
}
return $propertyType;
}
示例2: generateTDHistory
function generateTDHistory($tdID)
{
$td = new TD();
$td->selectRecord($tdID);
$afsID = $td->getAfsID();
// echo("afsID=$afsID<br>");
$afs = new AFS();
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
// echo("odID=$odID<br>");
$condition = sprintf(" WHERE presentODID='%s' ", fixQuotes($odID));
$odHistoryRecords = new ODHistoryRecords();
$odHistoryRecords->selectRecords($condition);
if (count($odHistoryRecords->arrayList) > 0) {
// echo("count>0<br>");
foreach ($odHistoryRecords->arrayList as $key => $odHistory) {
$previousODID = $odHistory->getPreviousODID();
$presentODID = $odHistory->getPresentODID();
$previousAFS = new AFS();
$previousAFS->selectRecord($afsID = "", $limit = "", $previousODID);
$previousAFSID = $previousAFS->getAfsID();
$previousTD = new TD();
$previousTD->selectRecord($tdID = "", $previousAFSID);
$previousTDID = $previousTD->getTdID();
$this->tdHistory[] = $previousTD;
$this->generateTDHistory($previousTDID);
}
} else {
//echo("count==0<br>");
return false;
}
}
示例3: Main
function Main()
{
$fp = fopen("batchCalculate.log", "w") or die("Couldn't create new file");
$rptopID = isset($_POST['rptopID']) ? $_POST['rptopID'] : $_GET['rptopID'];
if (is_array($rptopID)) {
foreach ($rptopID as $key => $id) {
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($id))) {
exit("xml failed");
} else {
fwrite($fp, "\r\nrptopid: " . $id . "\r\n");
if (!($domDoc = domxml_open_mem($xmlStr))) {
echo "error xmlDoc";
} else {
$rptop = new RPTOP();
$td = new TD();
$rptop->parseDomDocument($domDoc);
foreach ($rptop as $key => $rvalue) {
if ($key == "tdArray") {
$tdCtr = 0;
if (count($rvalue)) {
foreach ($rvalue as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$taxDue = new Dues($tvalue->getTdID(), $rptop->getTaxableYear());
$taxDue->setBasic($assessedValue);
$taxDue->setSEF($assessedValue);
$taxDue->setIdleStatus($idleStatus);
if ($taxDue->getIdleStatus()) {
$taxDue->setIdle($assessedValue);
} else {
$taxDue->setIdle(0);
}
$taxDue->store();
echo $id;
echo "=>";
echo $tvalue->getTdID();
echo "<br>";
fwrite($fp, "TD: " . $tvalue->getTdID() . "...PROCESSED COMPLETE\r\n");
$tdCtr++;
}
}
}
}
}
}
}
header("Location: batchCalculateDone.php" . $this->sess->url(""));
exit;
}
}
示例4: getOdIDFromTdID
function getOdIDFromTdID($tdID)
{
$ret = false;
$td = new TD();
if ($td->selectRecord($tdID)) {
$afsID = $td->getAfsID();
if ($afs = new AFS()) {
$afs->selectRecord($afsID);
$odID = $afs->getOdID();
$ret = $odID;
}
}
return $ret;
}
示例5: getTDNumber
function getTDNumber($tdID, $backtaxTDID)
{
if ($tdID != "") {
$td = new TD();
$td->selectRecord($tdID);
$tdNumber = $td->getTaxDeclarationNumber();
} else {
if ($backtaxTDID != "") {
$backtaxTD = new BacktaxTD();
$backtaxTD->selectRecord("", $backtaxTDID);
$tdNumber = $backtaxTD->getTDNumber();
}
}
return $tdNumber;
}
示例6: getPropertyTypeFromOD
function getPropertyTypeFromOD($od)
{
$AFSEncode = new SoapObject(NCCBIZ . "AFSEncode.php", "urn:Object");
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if ($afsID = $AFSEncode->getAfsID($od->getOdID())) {
if ($xmlStr = $TDDetails->getTDFromAfsID($afsID)) {
$td = new TD();
if ($domDoc = domxml_open_mem($xmlStr)) {
$td->parseDomDocument($domDoc);
return $td->getPropertyType();
}
}
}
return false;
}
示例7: email_fw_webmail_box
function email_fw_webmail_box($USER_ID)
{
$EMAIL_FW_WEBMAIL_BOX = "";
$FROM_MAIL_ID = "";
$FROM_WEBMAIL_BOX_DEFAULT = "";
$EMAIL_FW_WEBMAIL_BOX_ARRAY = array();
$query = "select * from webmail where USER_ID='" . $USER_ID . "' and EMAIL_PASS!='' order by IS_DEFAULT desc";
$cursor = exequery(TD::conn(), $query);
while ($ROW = mysql_fetch_array($cursor)) {
$MAIL_ID = $ROW['MAIL_ID'];
$EMAIL = $ROW['EMAIL'];
$IS_DEFAULT = $ROW['IS_DEFAULT'];
$RECV_FW = $ROW['RECV_FW'];
if ($FROM_WEBMAIL_BOX_DEFAULT == "") {
$FROM_WEBMAIL_BOX_DEFAULT = $EMAIL;
$FROM_MAIL_ID = $MAIL_ID;
}
if ($RECV_FW == 1) {
$EMAIL_FW_WEBMAIL_BOX .= $EMAIL . ",";
}
}
$EMAIL_FW_WEBMAIL_BOX_ARRAY[] = $FROM_WEBMAIL_BOX_DEFAULT;
$EMAIL_FW_WEBMAIL_BOX_ARRAY[] = $EMAIL_FW_WEBMAIL_BOX;
$EMAIL_FW_WEBMAIL_BOX_ARRAY[] = $FROM_MAIL_ID;
return $EMAIL_FW_WEBMAIL_BOX_ARRAY;
}
示例8: displayTD
function displayTD($afsID)
{
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if (!($xmlStr = $TDDetails->getTDFromAfsID($this->formArray["afsID"]))) {
// xml failed
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
$td = new TD();
$td->parseDomDocument($domDoc);
$this->formArray["previousOwner"] = $td->getPreviousOwner();
$this->formArray["previousAssessedValue"] = $td->getPreviousAssessedValue();
}
}
}
示例9: add_task
function add_task($file, $code)
{
$qry = "SELECT * FROM office_task WHERE TASK_CODE='{$code}'";
$csr = exequery(TD::conn(), $qry);
if ($row = mysql_fetch_array($csr)) {
} else {
$qry = "INSERT INTO `office_task` (`TASK_TYPE`, `INTERVAL`, `EXEC_TIME`, `LAST_EXEC`,\n\t\t\t\t`EXEC_FLAG`, `EXEC_MSG`, `TASK_URL`, `TASK_NAME`, `TASK_DESC`, `TASK_CODE`, `USE_FLAG`,\n\t\t\t\t`SYS_TASK`, `EXT_DATA`) VALUES(\n\t\t\t\t'0',\n\t\t\t\t1,\n\t\t\t\t'00:00:00',\n\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t1,\n\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t'{$file}',\n\t\t\t\t'即时通讯离线消息推送',\n\t\t\t\t'定时将OA精灵离线消息推送到微信企业号',\n\t\t\t\t'{$code}',\n\t\t\t\t'1',\n\t\t\t\t'0',\n\t\t\t\t'')";
exequery(TD::conn(), $qry);
//Add system parameter
include_once "inc/utility_all.php";
add_sys_para(array("WEIXINQY_MSGCHECK_TIME" => ""));
}
}
示例10: getAfsID
function getAfsID($tdID)
{
$td = new TD();
$td->selectRecord($tdID);
$propertyID = $td->propertyID;
$propertyType = $td->propertyType;
switch ($propertyType) {
case "Land":
$property = new Land();
break;
case "PlantsTrees":
$property = new PlantsTrees();
break;
case "ImprovementsBuildings":
$property = new ImprovementsBuildings();
break;
case "Machineries":
$property = new Machineries();
break;
}
$property->selectRecord($propertyID);
$afsID = $property->afsID;
return $afsID;
}
示例11: createUser
public function createUser($user_id)
{
$user_ids = "";
$user_arr = explode(",", $user_id);
foreach ($user_arr as $key => $value) {
$user_ids .= "'" . $value . "',";
}
$user_ids = rtrim($user_ids, ",");
$sync = array();
$query = "SELECT USER_ID,USER_NAME,DEPT_ID,DEPT_ID_OTHER,USER_PRIV_NAME,USER_PRIV,MOBIL_NO,SEX,TEL_NO_DEPT,EMAIL FROM USER where USER_ID IN (" . $user_ids . ")";
$cursor = exequery(TD::conn(), $query);
while ($ROW = mysql_fetch_array($cursor)) {
$USER_ID = $ROW['USER_ID'];
$USER_NAME = $ROW['USER_NAME'];
$DEPT_ID = $ROW['DEPT_ID'];
$DEPT_ID_OTHER = $ROW['DEPT_ID_OTHER'];
$USER_PRIV_NAME = $ROW['USER_PRIV_NAME'];
$USER_PRIV = $ROW['USER_PRIV'];
$MOBIL_NO = $ROW['MOBIL_NO'];
$SEX = $ROW['SEX'];
$TEL_NO_DEPT = $ROW['TEL_NO_DEPT'];
$EMAIL = $ROW['EMAIL'];
if ($EMAIL == "" && !preg_match("/^([+-]?)\\d*\\.?\\d+\$/", $MOBIL_NO)) {
$sync['failed'][] = sprintf("%s(%s)", $USER_NAME, $this->deptinfo[$DEPT_ID]['dept_name']);
} else {
$_dept = array();
$_dept[] = $this->deptinfo[$DEPT_ID]['weixin_dept_id'];
if ($DEPT_ID_OTHER != "") {
$_dept_arr = array_filter(explode(",", $DEPT_ID_OTHER));
foreach ($_dept_arr as $key => $value) {
$_dept[] = $this->deptinfo[$value]['weixin_dept_id'];
}
}
$rs = $this->postData($this->url['create'], array("userid" => $USER_ID, "name" => $USER_NAME, "department" => $_dept, "position" => $USER_PRIV_NAME, "mobile" => preg_match("/^([+-]?)\\d*\\.?\\d+\$/", $MOBIL_NO) ? $MOBIL_NO : "", "gender" => $SEX, "tel" => $TEL_NO_DEPT, "email" => $EMAIL));
if ($rs['errcode'] == 0) {
$sync['success'][] = sprintf("%s(%s)", $USER_NAME, $this->deptinfo[$DEPT_ID]['dept_name']);
} else {
if ($rs['errcode'] == 60102) {
$sync['exists'][] = sprintf("%s(%s)", $USER_NAME, $this->deptinfo[$DEPT_ID]['dept_name']);
}
}
}
}
parent::logs("user_import", serialize($sync));
return array("success" => count($sync['success']), "failed" => count($sync['failed']), "exists" => count($sync['exists']));
}
示例12: getTDArrayFromCompany
function getTDArrayFromCompany($companyID)
{
$this->setDB();
$sql = sprintf("SELECT DISTINCT(Owner.odID) as odID" . " FROM Owner,OwnerCompany " . " WHERE " . " Owner.ownerID = OwnerCompany.ownerID AND " . " OwnerCompany.companyID = '%s' ", $companyID);
$this->db->query($sql);
while ($this->db->next_record()) {
$od = new OD();
if ($od->selectRecord($this->db->f("odID"))) {
$this->ODArray[] = $od;
$afs = new AFS();
if ($afs->selectRecord("", "", $od->getOdID(), "")) {
$td = new TD();
if ($td->selectRecord("", $afs->getAfsID(), "", "", "")) {
$tdArray[] = $td;
}
}
}
}
if (!is_array($tdArray)) {
$tdArray = false;
}
return $tdArray;
}
示例13: displayTD
function displayTD($afsID)
{
$this->tpl->set_block("rptsTemplate", "TDTable", "TDTableBlock");
$this->tpl->set_block("rptsTemplate", "TDDBEmpty", "TDDBEmptyBlock");
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if (!($xmlStr = $TDDetails->getTDFromAfsID($this->formArray["afsID"]))) {
$this->tpl->set_var("tdID", "");
$this->tpl->set_var("TDTableBlock", "");
$this->tpl->parse("TDDBEmptyBlock", "TDDBEmpty", true);
} else {
//echo $xmlStr;
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_var("tdID", "");
$this->tpl->set_var("TDTableBlock", "");
$this->tpl->parse("TDDBEmptyBlock", "TDDBEmpty", true);
} else {
$td = new TD();
$td->parseDomDocument($domDoc);
// update Cancels/CanceledBy TDNumber
$td = $this->updateTDCancelsTDNumber($td);
$td = $this->updateTDCanceledByTDNumber($td);
$this->formArray["tdID"] = $td->tdID;
$this->formArray["taxDeclarationNumber"] = $td->taxDeclarationNumber;
//provincialAssessor
if (is_numeric($td->provincialAssessor)) {
$provincialAssessor = new Person();
$provincialAssessor->selectRecord($td->provincialAssessor);
$this->formArray["provincialAssessor"] = $provincialAssessor->getFullName();
} else {
$this->formArray["provincialAssessor"] = $td->provincialAssessor;
}
//provincialAssessorDate
if ($td->provincialAssessorDate) {
list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $td->provincialAssessorDate);
$this->formArray["pa_yearValue"] = removePreZero($dateArr["year"]);
eval(MONTH_ARRAY);
//$monthArray
$this->formArray["pa_month"] = $monthArray[removePreZero($dateArr["month"])];
$this->formArray["pa_dayValue"] = removePreZero($dateArr["day"]);
} else {
$this->formArray["pa_yearValue"] = "";
$this->formArray["pa_month"] = "";
$this->formArray["pa_dayValue"] = "";
}
//cityMunicipalAssessor
if (is_numeric($td->cityMunicipalAssessor)) {
$cityMunicipalAssessor = new Person();
$cityMunicipalAssessor->selectRecord($td->cityMunicipalAssessor);
$this->formArray["cityMunicipalAssessor"] = $cityMunicipalAssessor->getFullName();
} else {
$this->formArray["cityMunicipalAssessor"] = $td->cityMunicipalAssessor;
}
//cityMunicipalAssessorDate
if ($td->cityMunicipalAssessorDate) {
list($dateArr["year"], $dateArr["month"], $dateArr["day"]) = explode("-", $td->cityMunicipalAssessorDate);
$this->formArray["cm_yearValue"] = removePreZero($dateArr["year"]);
eval(MONTH_ARRAY);
//$monthArray
$this->formArray["cm_month"] = $monthArray[removePreZero($dateArr["month"])];
$this->formArray["cm_dayValue"] = removePreZero($dateArr["day"]);
} else {
$this->formArray["cm_yearValue"] = "";
$this->formArray["cm_month"] = "";
$this->formArray["cm_dayValue"] = "";
}
$this->formArray["cancelsTDNumber"] = $td->cancelsTDNumber;
$this->formArray["canceledByTDNumber"] = $td->canceledByTDNumber;
$this->formArray["taxBeginsWithTheYear"] = $td->taxBeginsWithTheYear;
$this->formArray["ceasesWithTheYear"] = $td->ceasesWithTheYear;
//enteredInRPARForBy
if (is_numeric($td->enteredInRPARForBy)) {
$enteredInRPARForBy = new Person();
$enteredInRPARForBy->selectRecord($td->enteredInRPARForBy);
$this->formArray["enteredInRPARForBy"] = $enteredInRPARForBy->getFullName();
} else {
$this->formArray["enteredInRPARForBy"] = $td->enteredInRPARForBy;
}
$this->formArray["enteredInRPARForYear"] = $td->enteredInRPARForYear;
$this->formArray["previousOwner"] = $td->previousOwner;
$this->formArray["previousAssessedValue"] = $td->previousAssessedValue;
$this->tpl->set_var("previousOwner", $td->previousOwner);
if ($td->previousAssessedValue != "") {
$this->tpl->set_var("previousAssessedValue", number_format(toFloat($td->previousAssessedValue), 2, ".", ","));
}
$this->tpl->set_var("TDDBEmptyBlock", "");
$this->tpl->parse("TDTableBlock", "TDTable", true);
}
}
}
示例14: getTD
function getTD($tdID)
{
$TDDetails = new SoapObject(NCCBIZ . "TDDetails.php", "urn:Object");
if (!($xmlStr = $TDDetails->getTD($tdID))) {
// error xmlStr
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
// error domDoc
} else {
$td = new TD();
$td->parseDomDocument($domDoc);
return $td;
}
}
}
示例15: Main
function Main()
{
$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();
$td = new TD();
$rptop->parseDomDocument($domDoc);
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_a($value, Assessor)) {
$this->tpl->set_var("cityAssessorID", $value->getAssessorID());
$this->tpl->set_var("cityAssessorName", $value->getFullName());
$this->formArray["cityAssessorName"] = $value->getFullName();
} else {
$this->tpl->set_var($key, "");
}
break;
case "cityTreasurer":
if (is_a($value, Assessor)) {
$this->tpl->set_var("cityTreasurerID", $value->getAssessorID());
$this->tpl->set_var("cityTreasurerName", $value->getFullName());
$this->formArray["cityTreasurerName"] = $value->getFullName();
} else {
$this->tpl->set_var($key, "");
}
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;
//echo("count=".count($value)."<br>");
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");
$this->tpl->set_block("TDList", "Machineries", "MachineriesBlock");
foreach ($value as $tkey => $tvalue) {
$td->selectRecord($tvalue->getTdID());
$assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
$propertyType = $td->getPropertyType();
$afsID = $td->getAfsID();
$afs = new AFS();
$afs->selectRecord($afsID);
$PropertyIndexNumber = $afs->getPropertyIndexNumber();
$idleStatus = $td->getIdleStatus();
$formAssessedValue = number_format($td->getAssessedValue(), 2);
if ($propertyType == "Land") {
$formValues['assessedValueLand'] = $formAssessedValue;
$formValues['assessedValueOthers'] = "";
} else {
$formValues['assessedValueLand'] = "";
$formValues['assessedValueOthers'] = $formAssessedValue;
}
$formValues['assessedValue'] = $formAssessedValue;
$formValues['propertyType'] = $propertyType;
$taxDue = new Dues($tvalue->getTdID(), $this->formArray['taxableYear']);
$taxDue->setBasic($assessedValue);
$taxDue->setSEF($assessedValue);
$taxDue->setIdleStatus($idleStatus);
if ($taxDue->getIdleStatus()) {
$taxDue->setIdle($assessedValue);
} else {
$taxDue->setIdle(0);
}
$taxDue->store();
$dueValues['basic'] = number_format($taxDue->getBasic(), 2);
//.........这里部分代码省略.........