本文整理汇总了PHP中xajaxResponse::call方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxResponse::call方法的具体用法?PHP xajaxResponse::call怎么用?PHP xajaxResponse::call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajaxResponse
的用法示例。
在下文中一共展示了xajaxResponse::call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setAutoComplete
function setAutoComplete($block, $check = false)
{
$objResponse = new xajaxResponse();
if (!(hasPermissions('adm') && hasPermissions('mailer'))) {
return $objResponse;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/Digest/DigestFactory.php';
if (!in_array($block, DigestFactory::$types)) {
return $objResponse;
}
$digestBlock = new $block();
$digestBlock->setCheck($check);
if (!$digestBlock->isAutoComplete()) {
return $objResponse;
}
$auto = $digestBlock->setFieldAutoComplete();
if ($auto) {
ob_start();
$digestBlock->displayBlock();
$html = ob_get_clean();
$objResponse->assign($block . $digestBlock->getNum(), 'innerHTML', $html);
$objResponse->call('setInitPosition');
$objResponse->call('initNaviButton', $block . $digestBlock->getNum());
$objResponse->call('initCheckSelect', $block . $digestBlock->getNum());
} else {
$objResponse->call('alert', 'Нет данных для автозаполнения');
return $objResponse;
}
return $objResponse;
}
示例2: select_customer
function select_customer($id)
{
$JSResponse = new xajaxResponse();
$nodes_location = LMSDB::getInstance()->GetAll('SELECT n.id, n.name, location FROM vnodes n WHERE ownerid = ? ORDER BY n.name ASC', array($id));
$JSResponse->call('update_nodes_location', (array) $nodes_location);
return $JSResponse;
}
示例3: do_reload_shift
function do_reload_shift()
{
$objResponse = new xajaxResponse();
reload_shift();
$objResponse->call('xajax_load_nav');
$objResponse->call('xajax_load_footer');
switch ($_SESSION['curPage']) {
case '1':
$objResponse->call('xajax_load_residents()');
break;
case '2':
$objResponse->call('xajax_load_guests()');
break;
}
return $objResponse;
}
示例4: getMessageTemplates
function getMessageTemplates($tmpltype)
{
global $LMS;
$result = new xajaxResponse();
$templates = $LMS->GetMessageTemplates($tmpltype);
$result->call('messageTemplatesReceived', $templates);
return $result;
}
示例5: roundTrip
function roundTrip($nTimes)
{
global $timer;
global $trips;
$objResponse = new xajaxResponse();
if ($nTimes < $trips) {
$nTimes += 1;
$objResponse->script('xajax_roundTrip(' . $nTimes . ');');
$objResponse->assign('submittedDiv', 'innerHTML', 'Working...');
} else {
$objResponse->assign('submittedDiv', 'innerHTML', 'Done');
}
$timer->stop();
$objResponse->call('accumulateTime', $timer->timeElapsed());
$objResponse->call('printTime');
return $objResponse;
}
示例6: load_shifts
function load_shifts()
{
$objResponse = new xajaxResponse();
$text .= gen_shifts();
$objResponse->call('xajax_load_nav', "4");
$objResponse->assign("middle_wrapper", "innerHTML", $text);
return $objResponse;
}
示例7: getMessageTemplate
function getMessageTemplate($tmplid)
{
global $DB;
$result = new xajaxResponse();
$message = $DB->GetOne('SELECT message FROM templates WHERE id = ?', array($tmplid));
$result->call('messageTemplateReceived', $message);
return $result;
}
示例8: delNodeLock
function delNodeLock($nodeid, $id) {
global $DB;
$result = new xajaxResponse();
$DB->Execute('DELETE FROM nodelocks WHERE id = ?', array($id));
$result->call('xajax_getNodeLocks', $nodeid);
$result->assign('nodelocktable', 'disabled', false);
return $result;
}
示例9: select_producer
function select_producer($id)
{
$JSResponse = new xajaxResponse();
$models = LMSDB::getInstance()->GetAll('
SELECT id, name
FROM netdevicemodels
WHERE netdeviceproducerid = ?
ORDER BY name', array($id));
$JSResponse->call('update_models', (array) $models);
return $JSResponse;
}
示例10: delProf
/**
* @see hh::delProf()
*/
function delProf($hh_field, $prof_id, $hh_spec_id) {
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/professions.php");
$objResponse = new xajaxResponse();
$hh = new hh();
$hh_field = intval($hh_field);
$hh_spec_id = intval($hh_spec_id);
$prof_id = intval($prof_id);
$hh->delProf($hh_field, $prof_id, $hh_spec_id);
$objResponse->call("delProf", NULL, $hh_field, $prof_id, $hh_spec_id);
return $objResponse;
}
示例11: callFunction
function callFunction()
{
$value = 'no value provided';
if (0 < func_num_args()) {
$args = func_get_args();
$value = $args[0];
}
$objResponse = new xajaxResponse();
$objResponse->call('this.myFunction', null, 0, -10.5, 'abc', true, false, $value);
return $objResponse;
}
示例12: connect_nodes
function connect_nodes($nodeids, $deviceid, $linktype, $linktechnology, $linkspeed)
{
global $DB;
$JSResponse = new xajaxResponse();
$DB->BeginTrans();
foreach ($nodeids as $nodeid) {
$DB->Execute("UPDATE nodes SET netdev = ?, port = 0, linktype = ?, linktechnology = ?, linkspeed = ? WHERE id = ?", array($deviceid, $linktype, $linktechnology, $linkspeed, $nodeid));
}
$DB->CommitTrans();
$JSResponse->call('operation_finished');
return $JSResponse;
}
示例13: getUsersForGroup
function getUsersForGroup($groupid)
{
$JSResponse = new xajaxResponse();
if (empty($groupid)) {
$users = null;
} else {
$users = LMSDB::getInstance()->GetCol('SELECT u.id FROM users u
JOIN userassignments ua ON ua.userid = u.id
WHERE u.deleted = 0 AND u.access = 1 AND ua.usergroupid = ?', array($groupid));
}
$JSResponse->call('update_user_selection', $users);
return $JSResponse;
}
示例14: FPEP_getTab
/**
* Получить станицу с выбором работ для таба.
*
* @param bool $params
*
* @return \xajaxResponse
*/
function FPEP_getTab($params)
{
$objResponse = new xajaxResponse();
$uid = get_uid(false);
if ($uid > 0 && !is_emp() && is_pro()) {
$query = http_build_query($params);
$params['is_ajax'] = true;
require_once ABS_PATH . '/freelancers/widgets/FreelancersPreviewEditorPopup.php';
$freelancersPreviewEditorPopup = new FreelancersPreviewEditorPopup($params);
$html = $freelancersPreviewEditorPopup->render();
$objResponse->call("window.popups_factory.getPopup('freelancersPreviewEditorPopup').showTabContent", $freelancersPreviewEditorPopup->getCurrentTab(), $html, $query);
}
return $objResponse;
}
示例15: save_field
function save_field($name, $value)
{
global $user, $userlib;
if (!$user) {
return false;
}
$objResponse = new xajaxResponse();
$result = $userlib->set_user_field($name, $value);
if (!$result) {
$objResponse->alert("nao foi possivel editar o campo {$name}");
} else {
$objResponse->call('exibeCampo', $name, $value);
}
return $objResponse;
}