当前位置: 首页>>代码示例>>PHP>>正文


PHP xajaxResponse::loadXML方法代码示例

本文整理汇总了PHP中xajaxResponse::loadXML方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxResponse::loadXML方法的具体用法?PHP xajaxResponse::loadXML怎么用?PHP xajaxResponse::loadXML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xajaxResponse的用法示例。


在下文中一共展示了xajaxResponse::loadXML方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

/**
*  initialize page elements
*
*/
function init()
{
    $objResponse = new xajaxResponse();
    $objResponse->addAssign("divNav", "innerHTML", common::generateManageNav($skin, $_SESSION['curuser']['country'], $_SESSION['curuser']['language']));
    $objResponse->addAssign("divCopyright", "innerHTML", common::generateCopyright($skin));
    $objResponse->loadXML(initLocate());
    $objResponse->loadXML(initIni());
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:13,代码来源:preferences.server.php

示例2: init

/**
*  function to init import page
*
*
*  @return $objResponse
*
*/
function init($fileName)
{
    global $locate, $config;
    $objResponse = new xajaxResponse();
    $objResponse->addAssign("spanSelectFile", "innerHTML", $locate->Translate("please_select_file"));
    $file_list = getExistfilelist();
    $objResponse->addScript("addOption('filelist','0','" . $locate->Translate('select a existent file') . "');");
    foreach ($file_list as $file) {
        $objResponse->addScript("addOption('filelist','" . $file['fileid'] . "','" . $file['originalname'] . "');");
    }
    $objResponse->addAssign("btnUpload", "value", $locate->Translate("upload"));
    $objResponse->addAssign("btnImportData", "value", $locate->Translate("import"));
    $objResponse->addAssign("spanFileManager", "innerHTML", $locate->Translate("file_manager"));
    $objResponse->addAssign("hidOnUploadMsg", "value", $locate->Translate("uploading"));
    $objResponse->addAssign("hidOnSubmitMsg", "value", $locate->Translate("data_importing"));
    if ($_SESSION['curuser']['usertype'] == 'admin') {
        $tableList = "<select name='sltTable' id='sltTable' onchange='selectTable(this.value);' >\r\n\t\t\t\t\t\t\t<option value=''>" . $locate->Translate("selecttable") . "</option>\r\n\t\t\t\t\t\t\t<option value='resellerrate'>resellerrate</option>\r\n\t\t\t\t\t\t\t<option value='callshoprate'>callshoprate</option>\r\n\t\t\t\t\t\t\t<option value='myrate'>myrate</option>\r\n\t\t\t\t\t\t</select>";
    } elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
        $tableList = "<select name='sltTable' id='sltTable' onchange='selectTable(this.value);' >\r\n\t\t\t\t\t\t\t<option value=''>" . $locate->Translate("selecttable") . "</option>\r\n\t\t\t\t\t\t\t<option value='callshoprate'>callshoprate</option>\r\n\t\t\t\t\t\t\t<option value='myrate'>myrate</option>\r\n\t\t\t\t\t\t</select>";
    } elseif ($_SESSION['curuser']['usertype'] == 'groupadmin') {
        $tableList = "<select name='sltTable' id='sltTable' onchange='selectTable(this.value);' >\r\n\t\t\t\t\t\t\t<option value=''>" . $locate->Translate("selecttable") . "</option>\r\n\t\t\t\t\t\t\t<option value='myrate'>myrate</option>\r\n\t\t\t\t\t\t</select>";
    }
    $objResponse->addAssign("divTables", "innerHTML", $tableList);
    $objResponse->addAssign("divNav", "innerHTML", common::generateManageNav($skin));
    $objResponse->addAssign("divGrid", "innerHTML", '');
    //$objResponse->addScript("xajax_showDivMainRight(document.getElementById('hidFileName').value);");
    //$objResponse->loadXML(showDivMainRight($fileName));
    //$objResponse->addAssign("divDiallistImport", "innerHTML", '');
    $objResponse->addAssign("divCopyright", "innerHTML", common::generateCopyright($skin));
    $objResponse->loadXML(showDivMainRight($fileName));
    if ($_SESSION['curuser']['usertype'] == 'admin') {
        // add all reseller
        $res = astercrm::getAll('resellergroup');
        $objResponse->addScript("addOption('resellerid','0','" . $locate->Translate("All") . "');");
        while ($row = $res->fetchRow()) {
            if ($config['synchronize']['id_autocrement_byset'] && ($row['id'] < $config['local_host']['minId'] || $row['id'] > $config['local_host']['maxId'])) {
                continue;
            }
            $objResponse->addScript("addOption('resellerid','" . $row['id'] . "','" . $row['resellername'] . "');");
        }
    } elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
        // add self
        $objResponse->addScript("addOption('resellerid','" . $_SESSION['curuser']['resellerid'] . "','" . "" . "');");
        // add groups
        $objResponse->addScript("addOption('groupid','0','" . $locate->Translate("All") . "');");
        $res = astercrm::getAll('accountgroup', "resellerid", $_SESSION['curuser']['resellerid']);
        while ($row = $res->fetchRow()) {
            if ($config['synchronize']['id_autocrement_byset'] && ($row['id'] < $config['local_host']['minId'] || $row['id'] > $config['local_host']['maxId'])) {
                continue;
            }
            $objResponse->addScript("addOption('groupid','" . $row['id'] . "','" . $row['groupname'] . "');");
        }
    } else {
        // add self
        $objResponse->addScript("addOption('resellerid','" . $_SESSION['curuser']['resellerid'] . "','" . "" . "');");
        $objResponse->addScript("addOption('groupid','" . $_SESSION['curuser']['groupid'] . "','" . "" . "');");
    }
    $objResponse->addScript("setCampaign();");
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:67,代码来源:import.server.php

示例3: showOutput

function showOutput()
{
    $testResponse = new xajaxResponse();
    $testResponse->addAlert("Hello");
    //	$testResponseOutput = htmlspecialchars($testResponse->getXML());
    $testResponse2 = new xajaxResponse();
    $testResponse2->loadXML($testResponse->getXML());
    $testResponse2->addReplace("this", "is", "a", "replacement");
    $testResponseOutput = htmlspecialchars($testResponse2->getXML());
    $objResponse = new xajaxResponse();
    $objResponse->addAssign("submittedDiv", "innerHTML", $testResponseOutput);
    return $objResponse;
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:13,代码来源:xajaxResponseTest.php

示例4: processRequests


//.........这里部分代码省略.........
                 $bFoundFunction = false;
                 $objResponse = new xajaxResponse();
                 $objResponse->addAlert("Incorrect Request Type.");
                 $sResponse = $objResponse->getXML();
             }
         }
     }
     if ($bFoundFunction) {
         for ($i = 0; $i < sizeof($aArgs); $i++) {
             // If magic quotes is on, then we need to strip the slashes from the args
             if (get_magic_quotes_gpc() == 1 && is_string($aArgs[$i])) {
                 $aArgs[$i] = stripslashes($aArgs[$i]);
             }
             if (stristr($aArgs[$i], "<xjxobj>") != false) {
                 $aArgs[$i] = $this->_xmlToArray("xjxobj", $aArgs[$i]);
             } else {
                 if (stristr($aArgs[$i], "<xjxquery>") != false) {
                     $aArgs[$i] = $this->_xmlToArray("xjxquery", $aArgs[$i]);
                 } else {
                     if ($this->bDecodeUTF8Input) {
                         $aArgs[$i] = $this->_decodeUTF8Data($aArgs[$i]);
                     }
                 }
             }
         }
         if ($this->sPreFunction) {
             $mPreResponse = $this->_callFunction($this->sPreFunction, array($sFunctionNameForSpecial, $aArgs));
             if (is_array($mPreResponse) && $mPreResponse[0] === false) {
                 $bEndRequest = true;
                 $sPreResponse = $mPreResponse[1];
             } else {
                 $sPreResponse = $mPreResponse;
             }
             if (is_a($sPreResponse, "xajaxResponse")) {
                 $sPreResponse = $sPreResponse->getXML();
             }
             if ($bEndRequest) {
                 $sResponse = $sPreResponse;
             }
         }
         if (!$bEndRequest) {
             if (!$this->_isFunctionCallable($sFunctionName)) {
                 $objResponse = new xajaxResponse();
                 $objResponse->addAlert("The Registered Function {$sFunctionName} Could Not Be Found.");
                 $sResponse = $objResponse->getXML();
             } else {
                 if ($bFunctionIsCatchAll) {
                     $aArgs = array($sFunctionNameForSpecial, $aArgs);
                 }
                 $sResponse = $this->_callFunction($sFunctionName, $aArgs);
             }
             if (is_a($sResponse, "xajaxResponse")) {
                 $sResponse = $sResponse->getXML();
             }
             if (!is_string($sResponse) || strpos($sResponse, "<xjx>") === FALSE) {
                 $objResponse = new xajaxResponse();
                 $objResponse->addAlert("No XML Response Was Returned By Function {$sFunctionName}.");
                 $sResponse = $objResponse->getXML();
             } else {
                 if ($sPreResponse != "") {
                     $sNewResponse = new xajaxResponse($this->sEncoding, $this->bOutputEntities);
                     $sNewResponse->loadXML($sPreResponse);
                     $sNewResponse->loadXML($sResponse);
                     $sResponse = $sNewResponse->getXML();
                 }
             }
         }
     }
     $sContentHeader = "Content-type: text/xml;";
     if ($this->sEncoding && strlen(trim($this->sEncoding)) > 0) {
         $sContentHeader .= " charset=" . $this->sEncoding;
     }
     header($sContentHeader);
     if ($this->bErrorHandler && !empty($GLOBALS['xajaxErrorHandlerText'])) {
         $sErrorResponse = new xajaxResponse();
         $sErrorResponse->addAlert("** PHP Error Messages: **" . $GLOBALS['xajaxErrorHandlerText']);
         if ($this->sLogFile) {
             $fH = @fopen($this->sLogFile, "a");
             if (!$fH) {
                 $sErrorResponse->addAlert("** Logging Error **\n\nxajax was unable to write to the error log file:\n" . $this->sLogFile);
             } else {
                 fwrite($fH, "** xajax Error Log - " . strftime("%b %e %Y %I:%M:%S %p") . " **" . $GLOBALS['xajaxErrorHandlerText'] . "\n\n\n");
                 fclose($fH);
             }
         }
         $sErrorResponse->loadXML($sResponse);
         $sResponse = $sErrorResponse->getXML();
     }
     if ($this->bCleanBuffer) {
         while (@ob_end_clean()) {
         }
     }
     print $sResponse;
     if ($this->bErrorHandler) {
         restore_error_handler();
     }
     if ($this->bExitAllowed) {
         exit;
     }
 }
开发者ID:jwest00724,项目名称:AccountLab-Plus,代码行数:101,代码来源:xajax.inc.php

示例5: skipDiallist

function skipDiallist($dialnumber, $diallistid)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $row = astercrm::getRecordByID($diallistid, 'diallist');
    if ($row['dialnumber'] != '') {
        $row['callresult'] = 'skip';
        astercrm::deleteRecord($row['id'], "diallist");
        $row['dialednumber'] = $phoneNum;
        $row['dialedby'] = $_SESSION['curuser']['extension'];
        $row['trytime'] = $row['trytime'] + 1;
        astercrm::insertNewDialedlist($row);
    } else {
        $objResponse->addAlert($locate->translate("Option failed"));
        return $objResponse;
    }
    $objResponse->addScript("xajax_clearPopup()");
    $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:20,代码来源:portal.server.php

示例6: pay

function pay($form_data)
{
    global $BL, $INVOICE_DATA;
    prepareFinalData($INVOICE_DATA, $form_data);
    $objResponse = new xajaxResponse(CHARSET);
    //$objResponse->addConfirmCommands(1,$BL->props->lang['confirm_submit']);
    $objResponse->loadXML(reload('step7', 'step7'));
    return $objResponse;
}
开发者ID:jwest00724,项目名称:AccountLab-Plus,代码行数:9,代码来源:ajaxFunctions.php

示例7: waitingCalls

function waitingCalls($myValue)
{
    global $db, $config;
    $locate = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'portal');
    $objResponse = new xajaxResponse();
    $curid = trim($myValue['curid']);
    // to improve system efficiency
    /**************************
    **************************/
    //	modified 2007/10/30 by solo
    //  start
    //print_r($_SESSION);exit;
    //if ($_SESSION['curuser']['channel'] == '')
    $call = asterEvent::checkNewCall($curid, $_SESSION['curuser']['extension'], $_SESSION['curuser']['channel'], $_SESSION['curuser']['agent']);
    //else
    //	$call = asterEvent::checkNewCall($curid,$_SESSION['curuser']['channel']);
    //  end
    if ($call['status'] == '') {
        $title = $locate->Translate("waiting");
        $status = 'idle';
        //$call['curid'] = $curid;
        $direction = '';
        $info = $locate->Translate("extension") . $_SESSION['curuser']['extension'] . "-" . $locate->Translate("stand_by");
    } elseif ($call['status'] == 'incoming') {
        //incoming calls here
        $title = $call['callerid'];
        $stauts = 'ringing';
        $direction = 'in';
        $info = $locate->Translate("incoming") . ' ' . $call['callerid'];
        $trunk = split("-", $call['callerChannel']);
        //print_r($trunk);exit;
        $trunk_name = split('@', $trunk[0]);
        $info = $info . ' channel: ' . $trunk_name[0];
        // get trunk info
        $mytrunk = astercrm::getTrunkinfo($trunk[0], $call['didnumber']);
        if ($mytrunk) {
            $infomsg = "<strong>" . $mytrunk['trunkname'] . "</strong><br>";
            $infomsg .= mb_substr(astercrm::db2html($mytrunk['trunknote']), 0, 10, "UTF-8") . '...';
            if ($call['didnumber'] != '') {
                $infomsg .= "&nbsp;|" . $locate->Translate("Callee id") . "&nbsp;:&nbsp;<b>" . $call['didnumber'] . "</b>";
            }
            $objResponse->addAssign('divTrunkinfo', "innerHTML", $infomsg);
        } else {
            $trunk_name = split('@', $trunk[0]);
            $infomsg = $locate->Translate("no information get for trunk") . ": " . $trunk_name[0];
            $objResponse->addAssign('divTrunkinfo', "innerHTML", $infomsg);
        }
        $objResponse->addAssign("iptSrcNumber", "value", $call['callerid']);
        $objResponse->addAssign("iptCallerid", "value", $call['callerid']);
        $objResponse->addAssign("btnHangup", "disabled", false);
        if ($config['system']['pop_up_when_dial_in']) {
            if (strlen($call['callerid']) > $config['system']['phone_number_length'] && $call['callerid'] != '<unknown>') {
                if ($myValue['popup'] == 'yes') {
                    if ($config['system']['enable_external_crm'] == false) {
                        $objResponse->loadXML(getContact($call['callerid']));
                        if ($config['system']['browser_maximize_when_pop_up'] == true) {
                            $objResponse->addScript('maximizeWin();');
                        }
                    } else {
                        //use external link
                        $myurl = $config['system']['external_crm_url'];
                        $myurl = preg_replace("/\\%method/", "dial_in", $myurl);
                        $myurl = preg_replace("/\\%callerid/", $call['callerid'], $myurl);
                        $myurl = preg_replace("/\\%calleeid/", $_SESSION['curuser']['extension'], $myurl);
                        if ($config['system']['open_new_window'] == false) {
                            $mycrm = '<iframe id="mycrm" name="mycrm" src="' . $myurl . '" width="100%"  frameBorder=0 scrolling=auto height="100%"></iframe>';
                            $objResponse->addAssign("divCrm", "innerHTML", $mycrm);
                        } else {
                            $javascript = "openwindow('" . $myurl . "')";
                            $objResponse->addScript($javascript);
                        }
                    }
                }
            } else {
            }
        }
    } elseif ($call['status'] == 'dialout') {
        //dailing out here
        $title = $call['callerid'];
        $status = 'dialing';
        $direction = 'out';
        $info = $locate->Translate("dial_out") . ' ' . $call['callerid'];
        $objResponse->addAssign("iptCallerid", "value", $call['callerid']);
        $objResponse->addAssign("btnHangup", "disabled", false);
        if ($call['didnumber'] != '') {
            $didinfo = $locate->Translate("Callee id") . "&nbsp;:&nbsp;" . $call['didnumber'];
            $objResponse->addAssign('divDIDinfo', 'innerHTML', $didinfo);
        }
        if ($config['system']['pop_up_when_dial_out']) {
            if (strlen($call['callerid']) > $config['system']['phone_number_length']) {
                if ($myValue['popup'] == 'yes') {
                    if ($config['system']['enable_external_crm'] == false) {
                        $objResponse->loadXML(getContact($call['callerid']));
                        if ($config['system']['browser_maximize_when_pop_up'] == true) {
                            $objResponse->addScript('maximizeWin();');
                        }
                    } else {
                        //use external link
                        $myurl = $config['system']['external_crm_url'];
                        $myurl = preg_replace("/\\%method/", "dial_out", $myurl);
//.........这里部分代码省略.........
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:astercrmclient.server.php

示例8: saveDiallistMain

function saveDiallistMain($f)
{
    global $locate;
    $objResponse = new xajaxResponse();
    if ($f['dialnumber'] == '' || empty($f['dialnumber'])) {
        $objResponse->addAlert($locate->Translate("Dialnumber can not be empty"));
        return $objResponse->getXML();
    }
    if ($f['campaignid'] == '') {
        $objResponse->addAlert($locate->Translate("Must select a campaign"));
        return $objResponse->getXML();
    }
    // check if the assign number belong to this group
    if ($_SESSION['curuser']['usertype'] != 'admin') {
        $flag = false;
        if ($_SESSION['curuser']['usertype'] == 'groupadmin') {
            if ($f['assign'] == '') {
                $flag = true;
            } else {
                foreach ($_SESSION['curuser']['memberExtens'] as $extension) {
                    if ($extension == $f['assign']) {
                        $flag = true;
                        break;
                    }
                }
            }
        } else {
            if ($_SESSION['curuser']['extension'] == $f['assign']) {
                $flag = true;
            }
        }
        if (!$flag) {
            $objResponse->addAlert('"' . $locate->Translate("Cant insert, please confirm the assign number is in your group") . '"');
            return $objResponse->getXML();
        }
    }
    $id = Customer::insertNewDiallist($f);
    if ($id) {
        $objResponse->addAlert($locate->Translate("Add diallist succeed"));
        $objResponse->addAssign("formaddDiallistInfo", "style.visibility", "hidden");
        $objResponse->addClear("formaddDiallistInfo", "innerHTML");
        $objResponse->addScript("xajax_showDiallist('" . $_SESSION['curuser']['extension'] . "',0,0,5,'','','','formDiallistPannel','','');");
        $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
    } else {
        $objResponse->addAlert($locate->Translate("Add diallist failed"));
    }
    return $objResponse->getXML();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:48,代码来源:astercrm.server.common.php


注:本文中的xajaxResponse::loadXML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。