本文整理汇总了PHP中Http::build_query方法的典型用法代码示例。如果您正苦于以下问题:PHP Http::build_query方法的具体用法?PHP Http::build_query怎么用?PHP Http::build_query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Http
的用法示例。
在下文中一共展示了Http::build_query方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setURL
function setURL($url = '', $vars = '')
{
if ($url) {
if (strpos($url, '?') === false) {
$url .= '?';
}
} else {
$url = THISPAGE . '?';
}
if ($vars && is_array($vars)) {
$vars = Http::build_query($vars);
}
$this->url = $url . $vars;
}
示例2: __call
function __call($name, $args)
{
global $cfg;
$rv = null;
if ($this->user && is_callable(array($this->user, $name))) {
$rv = $args ? call_user_func_array(array($this->user, $name), $args) : call_user_func(array($this->user, $name));
}
if ($rv) {
return $rv;
}
$tag = substr($name, 3);
switch (strtolower($tag)) {
case 'ticket_link':
return sprintf('%s/view.php?%s', $cfg->getBaseUrl(), Http::build_query(array('auth' => $this->getAuthToken()), false));
break;
}
return false;
}
示例3: array
if($api && $_REQUEST['a']!='add'){
$title=__('Update API Key');
$action='update';
$submit_text=__('Save Changes');
$info=$api->getHashtable();
$qs += array('id' => $api->getId());
}else {
$title=__('Add New API Key');
$action='add';
$submit_text=__('Add Key');
$info['isactive']=isset($info['isactive'])?$info['isactive']:1;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="apikeys.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('API Key');?>
<i class="help-tip icon-question-sign" href="#api_key"></i>
</h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('API Key is auto-generated. Delete and re-add to change the key.');?></em>
</th>
</tr>
示例4: __
<a id="selectToggle" href="#ckb"><?php echo __('Toggle');?></a>
<?php }else{
echo '<i>';
echo $ferror?Format::htmlchars($ferror):__('Query returned 0 results.');
echo '</i>';
} ?>
</td>
</tr>
</tfoot>
</table>
<?php
if ($num>0) { //if we actually had any tickets returned.
echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' ';
echo sprintf('<a class="export-csv no-pjax" href="?%s">%s</a>',
Http::build_query(array(
'a' => 'export', 'h' => $hash,
'status' => $_REQUEST['status'])),
__('Export'));
echo ' <i class="help-tip icon-question-sign" href="#export"></i></div>';
} ?>
</form>
</div>
<div style="display:none;" class="dialog" id="confirm-action">
<h3><?php echo __('Please Confirm');?></h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<p class="confirm-action" style="display:none;" id="mark_overdue-confirm">
<?php echo __('Are you sure you want to flag the selected tickets as <font color="red"><b>overdue</b></font>?');?>
</p>
<div><?php echo __('Please confirm to continue.');?></div>
示例5: array
$action='update';
$submit_text=__('Save Changes');
$info=$template->getInfo();
$info['tpl_id']=$template->getId();
$qs += array('tpl_id' => $template->getId());
}else {
$title=__('Add New Template');
$action='add';
$submit_text=__('Add Template');
$info['isactive']=isset($info['isactive'])?$info['isactive']:0;
$info['lang_id'] = $cfg->getSystemLanguage();
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="templates.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="tpl_id" value="<?php echo $info['tpl_id']; ?>">
<h2><?php echo __('Email Template');?></h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('Template information');?></em>
</th>
</tr>
</thead>
<tbody>
示例6: array
$action='update';
$submit_text=__('Update');
$info=$rule->getInfo();
$info['id']=$rule->getId();
$qs += array('id' => $rule->getId());
}else {
$title=__('Add New Email Address to Ban List');
$action='add';
$submit_text=__('Add');
$info['isactive']=isset($info['isactive'])?$info['isactive']:1;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="banlist.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Manage Email Ban Rule');?>
<i class="help-tip icon-question-sign" href="#ban_list"></i>
</h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('Valid email address required');?></em>
</th>
</tr>
示例7: sprintf
<span style="color:lightgray">|</span>
<?php
}
}
if ($closedTickets) {
?>
<i class="icon-file-text"></i>
<a class="state <?php
if ($status == 'closed') {
echo 'active';
}
?>
"
href="?<?php
echo Http::build_query(array('a' => 'search', 'status' => 'closed'));
?>
">
<?php
echo __('Closed');
if ($closedTickets > 0) {
echo sprintf(' (%d)', $closedTickets);
}
?>
</a>
<?php
}
?>
</small>
</div>
</h1>
示例8: array
$info=$topic->getInfo();
$info['id']=$topic->getId();
$info['pid']=$topic->getPid();
$qs += array('id' => $topic->getId());
} else {
$title=__('Add New Help Topic');
$action='create';
$submit_text=__('Add Topic');
$info['isactive']=isset($info['isactive'])?$info['isactive']:1;
$info['ispublic']=isset($info['ispublic'])?$info['ispublic']:1;
$info['form_id'] = Topic::FORM_USE_PARENT;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="helptopics.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Help Topic');?></h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('Help Topic Information');?>
<i class="help-tip icon-question-sign" href="#help_topic_information"></i></em>
</th>
</tr>
</thead>
示例9: __
if (!($page = $config->hasCustomConfig())) {
if ($config)
$form = $config->getForm();
if ($form && $_POST)
$form->isValid();
}
$title = __('Update Plugin');
$action = 'update';
$submit_text = __('Save Changes');
$info = $plugin->ht;
}
$info = Format::htmlchars(($errors && $_POST) ? $_POST : $info);
?>
<form action="?<?php echo Http::build_query(array('id' => $_REQUEST['id'])); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Manage Plugin'); ?>
<br/><small><?php echo $plugin->getName(); ?></small></h2>
<h3><?php echo __('Configuration'); ?></h3>
<?php
if ($page)
$config->renderCustomConfig();
elseif ($form) { ?>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<tbody>
<?php $form->render(); ?>
</tbody></table>
示例10: array
$qs += array('id' => $dept->getId());
} else {
$title=__('Add New Department');
$action='create';
$submit_text=__('Create Dept');
$info['ispublic']=isset($info['ispublic'])?$info['ispublic']:1;
$info['ticket_auto_response']=isset($info['ticket_auto_response'])?$info['ticket_auto_response']:1;
$info['message_auto_response']=isset($info['message_auto_response'])?$info['message_auto_response']:1;
if (!isset($info['group_membership']))
$info['group_membership'] = 1;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="departments.php?<?php echo Http::build_query($qs); ?>" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Department');?></h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('Department Information');?></em>
</th>
</tr>
</thead>
<tbody>
示例11: array
$info['id']=$canned->getId();
$qs += array('id' => $canned->getId());
// Replace cid: scheme with downloadable URL for inline images
$info['response'] = $canned->getResponseWithImages();
$info['notes'] = Format::viewableImages($info['notes']);
}else {
$title=__('Add New Canned Response');
$action='create';
$submit_text=__('Add Response');
$info['isenabled']=isset($info['isenabled'])?$info['isenabled']:1;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="canned.php?<?php echo Http::build_query($qs); ?>" method="post" id="save" enctype="multipart/form-data">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Canned Response')?>
<i class="help-tip icon-question-sign" href="#canned_response"></i></h2>
<table class="form_table fixed" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr><td></td><td></td></tr> <!-- For fixed table layout -->
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><?php echo __('Canned response settings');?></em>
</th>
</tr>
示例12: array
$submit_text=__('Save Changes');
$info=$group->getInfo();
$info['id']=$group->getId();
$info['depts']=$group->getDepartments();
$qs += array('id' => $group->getId());
}else {
$title=__('Add New Group');
$action='create';
$submit_text=__('Create Group');
$info['isactive']=isset($info['isactive'])?$info['isactive']:1;
$info['can_create_tickets']=isset($info['can_create_tickets'])?$info['can_create_tickets']:1;
$qs += array('a' => $_REQUEST['a']);
}
$info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
?>
<form action="groups.php?<?php echo Http::build_query($qs); ?>" method="post" id="save" name="group">
<?php csrf_token(); ?>
<input type="hidden" name="do" value="<?php echo $action; ?>">
<input type="hidden" name="a" value="<?php echo Format::htmlchars($_REQUEST['a']); ?>">
<input type="hidden" name="id" value="<?php echo $info['id']; ?>">
<h2><?php echo __('Group Access and Permissions');?></h2>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4><?php echo $title; ?></h4>
<em><strong><?php echo __('Group Information');?></strong>: <?php echo __("Disabled group will limit agents' access. Admins are exempted.");?></em>
</th>
</tr>
</thead>
<tbody>
示例13: __
<?php
} else {
echo '<i>';
echo $ferror ? Format::htmlchars($ferror) : __('Query returned 0 results.');
echo '</i>';
}
?>
</td>
</tr>
</tfoot>
</table>
<?php
if ($num > 0) {
//if we actually had any tickets returned.
echo '<div> ' . __('Page') . ':' . $pageNav->getPageLinks() . ' ';
echo sprintf('<a class="export-csv no-pjax" href="?%s">%s</a>', Http::build_query(array('a' => 'export', 'h' => $hash, 'status' => $_REQUEST['status'])), __('Export'));
echo ' <i class="help-tip icon-question-sign" href="#export"></i></div>';
}
?>
</form>
</div>
<div style="display:none;" class="dialog" id="confirm-action">
<h3><?php
echo __('Please Confirm');
?>
</h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<p class="confirm-action" style="display:none;" id="mark_overdue-confirm">
<?php
示例14: __
$form = $config->getForm();
}
if ($form && $_POST) {
$form->isValid();
}
}
$title = __('Update Plugin');
$action = 'update';
$submit_text = __('Save Changes');
$info = $plugin->ht;
}
$info = Format::htmlchars($errors && $_POST ? $_POST : $info);
?>
<form action="?<?php
echo Http::build_query(array('id' => $_REQUEST['id']));
?>
" method="post" id="save">
<?php
csrf_token();
?>
<input type="hidden" name="do" value="<?php
echo $action;
?>
">
<input type="hidden" name="id" value="<?php
echo $info['id'];
?>
">
<h2><?php
echo __('Manage Plugin');
示例15: str_replace
}
$order_column = $order_column ? $order_column : 'canned.title';
if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
$order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ? $order : 'ASC';
if ($order_column && strpos($order_column, ',')) {
$order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(*) FROM ' . CANNED_TABLE . ' canned ');
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('canned.php', $qs);
//Ok..lets roll...create the actual query
$qstr .= '&order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$query = "{$sql} GROUP BY canned.canned_id ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
$res = db_query($query);
if ($res && ($num = db_num_rows($res))) {
$showing = $pageNav->showing() . ' ' . _N('premade response', 'premade responses', $total);
} else {
$showing = __('No premade responses found!');
}
?>
<div class="pull-left" style="width:700px;padding-top:5px;">
<h2><?php
echo __('Canned Responses');