本文整理汇总了PHP中quickGet函数的典型用法代码示例。如果您正苦于以下问题:PHP quickGet函数的具体用法?PHP quickGet怎么用?PHP quickGet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了quickGet函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: quickDisplay
function quickDisplay($actions = array(), $params = array())
{
$statusTable = getStatusTable();
$n = null;
$coh_id = isset($_GET['coh_id']) ? $_GET['coh_id'] : $this->db_coh['id'];
$params = array_merge($params, array('cmd_id' => $_GET['cmd_id'], 'bundle_id' => quickGet('bundle_id'), 'coh_id' => $coh_id, 'uuid' => quickGet('uuid'), 'from' => 'msc|logs|viewLogs', 'tab' => 'tablogs', 'hostname' => $this->db_coh['host']));
foreach ($this->values as $col) {
if ($col[2]) {
if ($n) {
$n->addExtraInfo(array($col[1]), $col[0]);
} else {
$n = new ListInfos(array($col[1]), $col[0]);
}
}
}
$n->setParamInfo(array($params));
$n->first_elt_padding = 0;
$n->disableFirstColumnActionLink();
$n->addActionItem(new ActionPopupItem(_T("Start", "msc"), "msctabsplay", "start", "msc", "base", "computers"));
if ($this->db_coh['current_state'] == 'scheduled') {
$n->addActionItem(new ActionPopupItem(_T("Stop", "msc"), "msctabsstop", "stop", "msc", "base", "computers"));
}
foreach ($actions as $a) {
$n->addActionItem($a);
}
$n->col_width = array("50px", "50px", "50px", "50px", "50px", "50px", "50px", "50px", "50px");
$n->drawTable(0);
print "<br/>";
}
示例2: addQuery
function addQuery($Form, $p, $pack, $field = 'Installed+software', $limit = 3, $extracriterion = '', $style = '')
{
$module = in_array('inventory', $_SESSION['modulesList']) ? 'inventory' : 'glpi';
$criterion = clean(quickGet('add_param'));
$auto = new Autocomplete($p[0], 'main.php?module=pkgs&submod=pkgs&action=ajaxAutocompleteSearch', $module, $field, $value = $pack[$p[0]], $limit, $extracriterion);
$tooltip = _T('Please type 3 characters for suggestion.<br>
Wildcard is \'%\', %text% matches any string containing \'text\'.<br>
If unsure, leave Vendor and Version fields blank.', pkgs);
$Form->add(new TrFormElement($p[1], $auto, array('class' => 'associateinventory', 'style' => $style, 'tooltip' => $tooltip)), array("value" => $pack[$p[0]]));
}
示例3: quickGet
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "modules/dyngroup/includes/includes.php";
$gid = quickGet('gid');
$group = new Group($gid, true);
$machine = quickGet('hostname');
$uuid = quickGet('objectUUID');
if (quickGet('valid')) {
$group->delMember(array("{$uuid}" => array("uuid" => $uuid)));
header("Location: " . urlStrRedirect("base/computers/display", array('gid' => $gid)));
exit;
}
?>
<h2><?php
echo _T("Remove a computer", "dyngroup");
?>
</h2> <?php
?>
<form action="<?php
echo urlStr("base/computers/remove_machine", array('gid' => $gid, 'hostname' => $machine, 'objectUUID' => $uuid));
?>
" method="post">
示例4: array
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require "localSidebar.php";
require "graph/navbar.inc.php";
require_once "modules/pulse2/includes/utilities.php";
# for quickGet method
require_once "modules/pkgs/includes/xmlrpc.php";
$package = array();
$p_api_id = base64_decode(quickGet('p_api'));
$pid = base64_decode(quickGet('pid'));
$plabel = base64_decode(quickGet('plabel'));
$pversion = base64_decode(quickGet('pversion'));
$mode = quickGet('mode');
$random_dir = base64_decode(quickGet('random_dir'));
$level = 0;
if ($mode == "creation") {
$level = 1;
}
#if (isset($_POST["bassoc"]) || isset($_POST["bempty"])) {
$cbx = array($random_dir);
#if (!isset($_POST["bempty"])) {
# /* Get selected directory only if the user don't want to create an
# empty package */
# /* FIXME: maybe this cbx stuff is no more needed ? */
# foreach ($_POST as $post => $v) {
# if (preg_match("/cbx_/", $post) > 0) {
# $cbx[] = preg_replace("/cbx_/", "", $post);
# }
# }
示例5: jQuery
var name = jQuery(this).attr('name');
var value = jQuery(this).val();
var input = jQuery(this);
// Special case: computername regex
var cname_regex = /^([a-zA-Z0-9][a-zA-Z0-9-_]*[a-zA-Z0-9])$/;
if (name=='computer_name' && !cname_regex.test(value)) {
alert('<?php
print _T('Invalid hostname', 'glpi');
?>
');
return;
}
// Posting ajax request
jQuery.get('<?php
echo urlStrRedirect("base/computers/ajaxSetGlpiEditableValue");
?>
&uuid=<?php
echo quickGet('uuid');
?>
&name='+name+'&value='+value).success(function(){
var label = jQuery('label.editableField[name="'+name+'"]').first();
label.html(value).show();
input.hide();
});
});
</script>
示例6: quickGet
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require "modules/base/computers/localSidebar.php";
require "graph/navbar.inc.php";
require_once "modules/dyngroup/includes/includes.php";
$gid = quickGet('gid');
if (!$gid) {
// TODO !!
$request = quickGet('request');
$r = new Request();
$r->parse($request);
$result = new Result($r, $group->getBool());
$result->replyToRequest();
$result->displayResListInfos();
} else {
$group = getPGobject($gid, true);
if (isset($items[$gid])) {
$item = $items[$gid];
} else {
$item = null;
}
if ($group->type == 0) {
__my_header(sprintf(_T("Group '%s' content", "dyngroup"), $group->getName()), $sidemenu, $item, $group);
} else {
示例7: list
$_params['finished'] = $history;
}
list($count, $cmds) = displayLogs($_params);
} else {
$_params = array('uuid' => $uuid, 'min' => $start, 'max' => $start + $maxperpage, 'filt' => $filter);
if ($history == 1 || $history == 0) {
$_params['finished'] = $history;
}
list($count, $cmds) = displayLogs($_params);
$areCommands = True;
}
$action = "viewLogs";
} elseif ($gid) {
# FIXME: same thing to do on groups
if ($_GET['cmd_id']) {
$_params = array('gid' => $gid, 'b_id' => quickGet('bundle_id'), 'cmd_id' => $_GET['cmd_id'], 'min' => $start, 'max' => $start + $maxperpage, 'filt' => $filter);
if ($history == 1 || $history == 0) {
$_params['finished'] = $history;
}
if (isset($_GET['cbx_state'])) {
$_params['state'] = $_GET['cbx_state'];
}
list($count, $cmds) = displayLogs($_params);
} else {
$_params = array('gid' => $gid, 'b_id' => $_GET['bundle_id'], 'min' => $start, 'max' => $start + $maxperpage, 'filt' => $filter);
if ($history == 1 || $history == 0) {
$_params['finished'] = $history;
}
list($count, $cmds) = displayLogs($_params);
$areCommands = True;
}
示例8: format
{
width: 250px;
}
-->
</style>
<?php
}
}
/* class */
function format($computer)
{
return array("hostname" => $computer[1]["cn"][0], "uuid" => $computer[1]["objectUUID"][0]);
}
$id = quickGet('gid');
$group = new Group($id, true);
if (isset($_POST["lpmembers"])) {
$right = unserialize(base64_decode($_POST["lpmembers"]));
$machines = unserialize(base64_decode($_POST["lpmachines"]));
}
if (isset($_POST["bdelmachine_x"])) {
if (isset($_POST["members"])) {
foreach ($_POST["members"] as $member) {
$ma = preg_split("/##/", $member);
unset($right[$member]);
}
}
} elseif (isset($_POST["baddmachine_x"])) {
if (isset($_POST["machines"])) {
foreach ($_POST["machines"] as $machine) {
示例9: quickGet
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "modules/pulse2/includes/utilities.php";
# for quickGet method
require_once "modules/dyngroup/includes/dyngroup.php";
$name = quickGet('groupname');
$gid = quickGet('gid');
$location = quickGet('location');
ob_end_clean();
/* The two following lines make the CSV export works for IE 6.x on HTTPS ! */
header("Pragma: ");
header("Cache-Control: ");
header("Content-type: text/txt");
header('Content-Disposition: attachment; filename="' . $name . '.csv"');
function get_first($val)
{
return $val[0];
}
function get_second($val)
{
return _T($val[1], "base");
}
function get_values($h, $values)
示例10: quickGet1
function quickGet1($s)
{
return quickGet($s, false, false);
}
示例11: displayBreadCrumb
displayBreadCrumb();
$coh->quickDisplay(array(), $params);
//array(new ActionItem(_T("Details", "msc"),"msctabs","detail","msc", "base", "computers")));
// display the command on host details
$coh_id = $_GET['coh_id'];
$ch = new CommandHistory($coh_id);
$ch->display();
} elseif (strlen($_GET['cmd_id'])) {
# Display a specific command for a specific group
// =========+> HERE DEPLOY ON GROUP
$params = array('tab' => quickGet('tab'), 'gid' => $_GET['gid']);
if (isset($_history)) {
$params['history'] = $_history;
}
$bdlink = '';
if (quickGet('bundle_id')) {
$params['bundle_id'] = $_GET['bundle_id'];
// FIXME: the following part (esp. $act) seems to always be overriden by the code below ?!
$bdl = new Bundle($_GET['bundle_id']);
displayBreadCrumb();
$act = $bdl->quickDisplay(array(new ActionItem(_T("Details", "msc"), "viewLogs", "detail", "msc", "msc", "logs")), $params);
$bdlink = "&bundle_id=" . $_GET['bundle_id'];
}
if ($_GET['cmd_id'] == -2) {
new NotifyWidgetFailure(_T("The group you are working on is empty.", "msc"));
}
// display just the selected command
$cmd = new Command($_GET['cmd_id']);
displayBreadCrumb();
$act = $cmd->quickDisplay();
if ($act) {
示例12: ob_end_clean
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "modules/dyngroup/includes/xmlrpc.php";
require_once "modules/pulse2/includes/utilities.php";
# for quickGet method
ob_end_clean();
$module = quickGet("modulename");
$criterion = quickGet("criterion");
$search = quickGet("data");
$extracriterion = quickGet("extracriterion");
$field = quickGet("field");
if (!$search) {
$search = '';
}
$res = array();
if (strlen($search) >= 2) {
//TODO: the limit should be passed as an argument, moreover it is already partly controlled by 'min keyword length' in autocomplete.php
if (strlen($extracriterion)) {
if (in_array('inventory', $_SESSION['modulesList'])) {
$criterion = $field == 'Qsoftware' ? 'Software/Company:ProductName' : $criterion;
$res = getPossiblesValuesForCriterionInModuleFuzzyWhere($module, $criterion, $extracriterion, $search);
} else {
$res = getPossiblesValuesForCriterionInModuleFuzzyWhere($module, $criterion, $search, $extracriterion);
}
} else {
$res = getPossiblesValuesForCriterionInModuleFuzzy($module, $criterion, $search);
示例13: ob_end_clean
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "modules/dyngroup/includes/xmlrpc.php";
require_once "modules/pulse2/includes/utilities.php";
# for quickGet method
ob_end_clean();
$module = quickGet("modulename");
$criterion = quickGet("criterion");
$search = quickGet("data");
if (!$search) {
$search = '';
}
$value1 = quickGet("value1");
$res = array();
if (strlen($search) > 2) {
if (strlen($value1)) {
$res = getPossiblesValuesForCriterionInModuleFuzzyWhere($module, $criterion, $value1, $search);
} else {
$res = getPossiblesValuesForCriterionInModuleFuzzy($module, $criterion, $search);
}
}
header("Content-type: application/json");
$output = array_combine($res, $res);
print json_encode($output);
return;
print '<ul>';
foreach ($res as $items) {
?>
示例14: quickGet
}
}
return;
} else {
/* Form displaying */
$from = quickGet('from');
$hostname = quickGet("hostname");
$groupname = quickGet("groupname");
$uuid = quickGet("uuid");
$cmd_id = quickGet("cmd_id");
$coh_id = quickGet("coh_id");
$gid = quickGet("gid");
$bundle_id = quickGet('bundle_id');
$cmd = command_detail($cmd_id);
$name = $cmd['title'];
if (!$name && quickGet('title')) {
$name = $_GET['title'];
}
$action_type = _T('action', 'msc');
if (strlen($bundle_id)) {
$action_type = _T('bundle', 'msc');
}
if (strlen($gid) && !strlen($coh_id)) {
$title = sprintf(_T("Start %s %s on this group", 'msc'), $action_type, $name);
} else {
$title = sprintf(_T("Start %s %s on host %s", 'msc'), $action_type, $name, $hostname);
}
$f = new PopupForm($title, 'startPopupForm');
$f->add(new HiddenTpl("name"), array("value" => $hostname, "hide" => True));
$f->add(new HiddenTpl("from"), array("value" => $from, "hide" => True));
$f->add(new HiddenTpl("cmd_id"), array("value" => $cmd_id, "hide" => True));
示例15: idGet
function idGet()
{
return quickGet('id');
}