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


PHP xajaxResponse::addRemove方法代码示例

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


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

示例1: removeInput

function removeInput($aInputData)
{
    $sId = $aInputData['inputId'];
    $objResponse = new xajaxResponse();
    $objResponse->addRemove($sId);
    return $objResponse->getXML();
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:7,代码来源:createFormInputTest.php

示例2: skill_study

/**
*   技能学习 
*/
function skill_study($skill, $buildid)
{
    global $db, $phpEx, $phpbb_root_path, $user;
    $objResponse = new xajaxResponse();
    if (!$user->data['is_registered']) {
        $objResponse->addScript("location.reload();");
    } else {
        $sql = 'SELECT * FROM ' . BUILD_INFO . ' WHERE build_id=' . $buildid;
        $result = $db->sql_query($sql);
        $buildinfo = array();
        if ($row = $db->sql_fetchrow($result)) {
            $buildinfo = $row;
        } else {
            return $objResponse->getXML();
        }
        $db->sql_freeresult($result);
        $sql = 'SELECT skills.*,sys_skills.*,user_skills.* FROM ' . CONFRATERNITY_SKILLS . ' skills 
				 LEFT JOIN 	' . SYSTEM_SKILLS . '	sys_skills	ON(skills.skillid=sys_skills.skill_id)	
				 LEFT JOIN 	' . USERS_SKILLS . '	user_skills	ON(skills.skillid=user_skills.skill_id AND user_id=' . $user->data['user_id'] . ') 
			WHERE skills.skillid=' . $skill . ' AND skills.buildid=' . $buildinfo['build_id'] . ' AND sys_skills.sysbuild =' . $buildinfo['system_type'];
        $result = $db->sql_query($sql);
        if ($row = $db->sql_fetchrow($result)) {
            //如果已经拥有了技能,不用学习
            if ($row['skill_lv'] > 0) {
                return $objResponse->getXML();
            }
            if ($user->data['u_copper_coin'] < $row['price_c'] && $user->data['u_silver_coin'] < $row['price_s'] && $user->data['u_gold_coin'] < $row['price_g']) {
                $objResponse->addScript("msg(\"" . $user->lang['NO_CCOIN'] . "\")");
                return $objResponse->getXML();
            }
            $db->sql_transaction('begin');
            //符合要求,处理技能学习
            //扣用户的钱
            $sql = 'UPDATE ' . USER_EXINFO . ' SET u_copper_coin=u_copper_coin-' . $row['price_c'] . ',u_silver_coin=u_silver_coin-' . $row['price_s'] . '  ,u_gold_coin=u_gold_coin-' . $row['price_g'] . '  WHERE user_id=' . $user->data['user_id'];
            $db->sql_query($sql);
            //添加技能到用户表
            $sql = 'INSERT INTO ' . USERS_SKILLS . '(skill_id,user_id,skill_lv,sys_build)
				VALUES(' . $row['skillid'] . ',' . $user->data['user_id'] . ',1,' . $row['sysbuild'] . ')';
            $db->sql_query($sql);
            $db->sql_transaction('commit');
            $objResponse->addScript("msg(\"" . $user->lang['STUDY_SKILL_SUCESS'] . "\")");
            $objResponse->addRemove("skillli" . $row['skillid']);
        } else {
            //不符合要求,提示错误信息
            return $objResponse->getXML();
        }
        $db->sql_freeresult($result);
    }
    return $objResponse->getXML();
}
开发者ID:yunsite,项目名称:gloryroad,代码行数:53,代码来源:function_confraternity.php

示例3: getPrivateDialListNumber

/**
*  show phone numbers and dial button if there are phone numbers assigned to this agent
*  in diallist table
*  @param	extension		string			extension
*  @return	object				xajax response object
*/
function getPrivateDialListNumber($extension = null)
{
    global $locate, $db;
    $objResponse = new xajaxResponse();
    $count = astercrm::getDialNumCountByAgent($extension);
    if ($count == 0) {
        $objResponse->addAssign("spanDialList", "innerHTML", $locate->Translate("no_dial_list"));
        $objResponse->addAssign("divWork", "innerHTML", '');
        $objResponse->addAssign("btnWorkStatus", "value", "");
        $objResponse->addAssign("btnWork", "value", $locate->Translate("Start work"));
        $objResponse->addAssign("btnWork", "disabled", true);
        $_SESSION['curuser']['WorkStatus'] = '';
    } else {
        // add div
        $objResponse->addRemove("spanDialListRecords");
        $objResponse->addRemove("btnGetAPhoneNumber");
        $objResponse->addCreate("spanDialList", "div", "spanDialListRecords");
        $objResponse->addAssign("spanDialListRecords", "innerHTML", $locate->Translate("records_in_dial_list_table") . $count);
        // add start campaign button
        $objResponse->addCreateInput("spanDialList", "button", "btnGetAPhoneNumber", "btnGetAPhoneNumber");
        $objResponse->addAssign("btnGetAPhoneNumber", "value", $locate->Translate("get_a_phone_number"));
        $objResponse->addEvent("btnGetAPhoneNumber", "onclick", "btnGetAPhoneNumberOnClick();");
        if ($_SESSION['curuser']['WorkStatus'] == '') {
            $objResponse->addAssign("btnWorkStatus", "value", "");
            $objResponse->addAssign("btnWork", "value", $locate->Translate("Start work"));
            $objResponse->addAssign("btnWork", "disabled", false);
        }
    }
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:36,代码来源:portal.server.php

示例4: step1_selectGroup

function step1_selectGroup($group_id)
{
    $_SESSION['group_id'] = $group_id;
    $objResponse = new xajaxResponse(CHARSET);
    if (empty($_SESSION['group_id'])) {
        $objResponse->loadXML(reload('step2'));
    } else {
        $objResponse->loadXML(step1_HideGroups($group_id));
        $objResponse->loadXML(step1_ShowProducts($group_id));
        $objResponse->addRemove("group_id" . $group_id);
    }
    return $objResponse;
}
开发者ID:jwest00724,项目名称:AccountLab-Plus,代码行数:13,代码来源:ajaxFunctions.php

示例5: setFreeCall

function setFreeCall($id, $hiddenrecord, $note, $total, $discount)
{
    global $db;
    //$discount = 0.5;
    $objResponse = new xajaxResponse();
    $query = "SELECT * FROM mycdr WHERE id = {$id}";
    $row = $db->getRow($query);
    //print_r($row);exit;
    if ($row['credit'] > 0 && $row['setfreecall'] != 'yes') {
        $total = $total - $row['credit'];
    }
    $query = "UPDATE mycdr SET note = '" . $note . "', setfreecall = 'yes' WHERE id = {$id}";
    if ($db->query($query)) {
        if ($hiddenrecord == 'true') {
            $objResponse->addRemove('rcdr-' . $id);
        } else {
            $objResponse->addAssign("rprice-" . $id, "innerHTML", '0.00');
            $objResponse->addAssign("rcdr-" . $id, "style.background", '#d5c59f');
        }
    }
    $total_price = $total * (1 - $discount);
    $total_price = astercc::creditDigits($total_price, 2);
    $objResponse->addAssign("total_price", "innerHTML", $total_price);
    $objResponse->addAssign("total_price_ori", "value", $total);
    $objResponse->addAssign("formDiv", "style.visibility", "hidden");
    $objResponse->addAssign("formDiv", "innerHTML", '');
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:28,代码来源:systemstatus_simple.server.php

示例6: reloadSip

function reloadSip()
{
    global $locate;
    $objResponse = new xajaxResponse();
    if ($_SESSION['curuser']['usertype'] == 'reseller' || $_SESSION['curuser']['usertype'] == 'admin') {
        $myAsterisk = new Asterisk();
        $myAsterisk->execute("sip reload");
        $objResponse->addAlert($locate->Translate("sip conf reloaded"));
        $objResponse->addAssign('msgZone', 'innerHTML', ' ');
        $objResponse->addRemove('reload');
    }
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:13,代码来源:resellergroup.server.php


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