當前位置: 首頁>>代碼示例>>PHP>>正文


PHP xajaxResponse::getXML方法代碼示例

本文整理匯總了PHP中xajaxResponse::getXML方法的典型用法代碼示例。如果您正苦於以下問題:PHP xajaxResponse::getXML方法的具體用法?PHP xajaxResponse::getXML怎麽用?PHP xajaxResponse::getXML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在xajaxResponse的用法示例。


在下文中一共展示了xajaxResponse::getXML方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editvote

function editvote($eV)
{
    global $db;
    $resp = new xajaxResponse();
    $i = 0;
    foreach ($eV['id'] as $v) {
        $db->query("UPDATE `vote` SET custom1='" . m_addslashes($eV['zd1'][$i]) . "',custom2='" . m_addslashes($eV['zd2'][$i]) . "' WHERE id=" . $v . "") or error('Unable to update vote.', __FILE__, __LINE__, $db->error());
        $i++;
    }
    $resp->alert("更新成功");
    return $resp->getXML();
}
開發者ID:haseok86,項目名稱:millkencode,代碼行數:12,代碼來源:vote_manager.php

示例2: window_save_position

function window_save_position($element, $x, $y)
{
    // Instantiate the xajaxResponse object
    $response = new xajaxResponse();
    if (!$element or !$x or !$y) {
        return $response->getXML();
    }
    // Search the DB
    if ($x > 0 and $y > 0 and $x < 3000 and $y < 3000) {
        $_SESSION['window_position']["{$element}_x"] = $x;
        $_SESSION['window_position']["{$element}_y"] = $y;
    }
    return $response->getXML();
}
開發者ID:edt82,項目名稱:ona,代碼行數:14,代碼來源:drag.inc.php

示例3: suggest

function suggest($type, $q, $el_input, $el_suggest)
{
    // Instantiate the xajaxResponse object
    $response = new xajaxResponse();
    if (!$type or !$q or !$el_input or !$el_suggest) {
        return $response->getXML();
    }
    // Make sure the requested function is defined
    $function = 'suggest_' . $type;
    if (function_exists($function)) {
        return $function($q, $el_input, $el_suggest);
    }
    return $response->getXML();
}
開發者ID:edt82,項目名稱:ona,代碼行數:14,代碼來源:suggest.inc.php

示例4: ws_delete

function ws_delete($window_name, $form = '')
{
    global $base, $include, $conf, $self, $onadb;
    // Check permissions
    if (!(auth('host_del') or auth('subnet_del'))) {
        $response = new xajaxResponse();
        $response->addScript("alert('Permission denied!');");
        return $response->getXML();
    }
    // If an array in a string was provided, build the array and store it in $form
    $form = parse_options_string($form);
    // Instantiate the xajaxResponse object
    $response = new xajaxResponse();
    $js = '';
    // Run the module
    list($status, $output) = run_module('tag_del', array('tag' => $form['id'], 'commit' => 'Y'));
    // If the module returned an error code display a popup warning
    if ($status) {
        $js .= "alert('Delete failed. " . preg_replace('/[\\s\']+/', ' ', $self['error']) . "');";
    } else {
        // If there's (refresh) js, send it to the browser
        if ($form['js']) {
            $js .= $form['js'];
        }
    }
    // Return an XML response
    $response->addScript($js);
    return $response->getXML();
}
開發者ID:edt82,項目名稱:ona,代碼行數:29,代碼來源:edit_tag.inc.php

示例5: testRegularFunction

function testRegularFunction($formData)
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("formData: " . print_r($formData, true));
    $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)));
    return $objResponse->getXML();
}
開發者ID:hostinger,項目名稱:revive-adserver,代碼行數:7,代碼來源:preFunctionTest.php

示例6: removeInput

function removeInput($aInputData)
{
    $sId = $aInputData['inputId'];
    $objResponse = new xajaxResponse();
    $objResponse->addRemove($sId);
    return $objResponse->getXML();
}
開發者ID:Spark-Eleven,項目名稱:revive-adserver,代碼行數:7,代碼來源:createFormInputTest.php

示例7: test

function test()
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("hallo");
    $objResponse->addAssign('testButton', 'label', 'Success!');
    return $objResponse->getXML();
}
開發者ID:udistrital,項目名稱:PROVEEDOR_PRODUCCION,代碼行數:7,代碼來源:xulServer.php

示例8: testClassMethod

 function testClassMethod($formData)
 {
     $objResponse = new xajaxResponse();
     $objResponse->addAlert("This is a class method.");
     $objResponse->addAlert("formData: " . print_r($formData, true));
     $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)));
     return $objResponse->getXML();
 }
開發者ID:dapfru,項目名稱:gladiators,代碼行數:8,代碼來源:registerObjectTest.php

示例9: disconnectUser

function disconnectUser($dn_name, $us_login)
{
    global $auth;
    $objResponse = new xajaxResponse();
    $auth->disconnectUser($dn_name, $us_login);
    $objResponse->addScript("document.location='connected_users.php'");
    return $objResponse->getXML();
}
開發者ID:r3-gis,項目名稱:EcoGIS,代碼行數:8,代碼來源:connected_users.php

示例10: testForm

function testForm($formData, $strText)
{
    global $useEncoding, $htmlEntities;
    $objResponse = new xajaxResponse($useEncoding, $htmlEntities);
    $objResponse->addAlert("formData: " . print_r($formData, true) . $strText);
    $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true)) . '<br /><br />' . $strText);
    return $objResponse->getXML();
}
開發者ID:yunsite,項目名稱:gloryroad,代碼行數:8,代碼來源:charEncodingTest.php

示例11: myErrorRiddenFunction

function myErrorRiddenFunction()
{
    $value = $silly['nuts'];
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("Bad array value: {$value}");
    include "file_doesnt_exist.php";
    return $objResponse->getXML();
}
開發者ID:dapfru,項目名稱:gladiators,代碼行數:8,代碼來源:errorHandlingTest.php

示例12: confirmTest

function confirmTest()
{
    $objResponse = new xajaxResponse();
    $objResponse->addAlert("Here is an alert.");
    $objResponse->addConfirmCommands(2, "Are you sure you want to show two (2) more alerts?");
    $objResponse->addAlert("This will only happen if the user presses OK.");
    $objResponse->addAlert("This also will only happen if the user presses OK.");
    $objResponse->addAlert("This will always happen.");
    return $objResponse->getXML();
}
開發者ID:Spark-Eleven,項目名稱:revive-adserver,代碼行數:10,代碼來源:confirmTest.php

示例13: submitForm

function submitForm($elems, $doneFunc = 'AjaxFormObj.checkDone', $errFunc = 'AjaxFormObj.checkError')
{
    global $lbl, $txt;
    $auth = R3AuthInstance::get();
    $fieldDescr = array('app_code' => array(MISSING_FIELD => !isset($txt['missing_fld_app']) ? _("Il campo 'applicazione' e' obbligatorio") : $txt['missing_fld_app'], INVALID_FIELD => "Il campo 'codice' contiene caratteri non validi. Solo lettere e numeri sono accettati", PK_ERROR => "Il campo 'codice' immesso esiste gia'"), 'app_name' => array(MISSING_FIELD => "Il campo 'nome' e' obbligatorio"));
    // print_r($elems);
    $elems = AjaxSplitArray($elems);
    //print_r($elems);
    $objResponse = new xajaxResponse();
    $error = array();
    try {
        if ($elems['act'] == 'add') {
            /** add a new acname */
            foreach (explode(',', str_replace(';', ',', $elems['ac_verb'])) as $verb) {
                $auth->addACName($elems['app_code'], strtoupper(trim($verb)), strtoupper(trim($elems['ac_name'])), trim($elems['ac_descr']), trim($elems['ac_order']), strtoupper($elems['ac_active']) == 'T', array('ac_type' => strtoupper($elems['ac_type'])));
            }
        } else {
            if ($elems['act'] == 'mod') {
                /** modify an acname */
                $auth->modACName($elems['old_app_code'], $elems['old_ac_verb'], $elems['old_ac_name'], $elems['app_code'], strtoupper(trim($elems['ac_verb'])), strtoupper(trim($elems['ac_name'])), trim($elems['ac_descr']), trim($elems['ac_order']), strtoupper($elems['ac_active']) == 'T', array('ac_type' => strtoupper($elems['ac_type'])));
            } else {
                if ($elems['act'] == 'del') {
                    /** delete an acname */
                    $auth->delACName($elems['app_code'], $elems['ac_verb'], $elems['ac_name']);
                } else {
                    throw new Exception('Invalid action');
                }
            }
        }
    } catch (EPermissionDenied $e) {
        $error['element'][] = '';
        $error['message'][] = $e->getMessage();
    } catch (EDatabaseError $e) {
        $error['element'][] = '';
        $error['message'][] = "Database error: " . $e->getMessage();
    } catch (EInputError $e) {
        $error['element'][] = $e->getField();
        if (isset($fieldDescr[$e->getField()][$e->getCode()])) {
            $error['message'][] = $fieldDescr[$e->getField()][$e->getCode()];
        } else {
            $error['message'][] = $e->getMessage();
        }
    } catch (Exception $e) {
        $error['element'][] = '';
        $error['message'][] = 'Generic error: ' . $e->getMessage();
    }
    // Action
    if (count($error) > 0) {
        $errText = (!isset($txt['err_store_failed']) ? _("Salvataggio fallito") . ":" : $txt['err_store_failed']) . "\n - " . implode("\n - ", $error['message']);
        $objResponse->addScriptCall($errFunc, $errText, $error['element'][0]);
    } else {
        $objResponse->addScriptCall($doneFunc);
    }
    return $objResponse->getXML();
}
開發者ID:r3-gis,項目名稱:EcoGIS,代碼行數:55,代碼來源:acnames_edit_ajax.php

示例14: objectscount

function objectscount($fid, $confid)
{
    $objResponse = new xajaxResponse();
    $pp = do_objectscount($fid, $confid);
    //½«ÌíÈëÊýÁ¿
    $objResponse->addAssign("objectnum", "disabled", false);
    $objResponse->addAssign("objectnum", "value", $pp);
    $objResponse->addAssign("max", "value", $pp);
    $objResponse->addAssign("doit", "disabled", false);
    return $objResponse->getXML();
}
開發者ID:yunsite,項目名稱:gloryroad,代碼行數:11,代碼來源:confraternity.server.php

示例15: testForm

function testForm($strText, $formData, $arrArray)
{
    global $useEncoding, $htmlEntities;
    $objResponse = new xajaxResponse($useEncoding, $htmlEntities);
    $data = "Text:\n" . $strText;
    $data .= "\n\nFormData:\n" . print_r($formData, true);
    $data .= "\n\nArray:\n" . print_r($arrArray, true);
    $objResponse->addAlert($data);
    $objResponse->addAssign("submittedDiv", "innerHTML", "<pre>" . $data . "</pre>");
    return $objResponse->getXML();
}
開發者ID:udistrital,項目名稱:PROVEEDOR_PRODUCCION,代碼行數:11,代碼來源:charEncodingTest.php


注:本文中的xajaxResponse::getXML方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。