本文整理汇总了PHP中get_parameter函数的典型用法代码示例。如果您正苦于以下问题:PHP get_parameter函数的具体用法?PHP get_parameter怎么用?PHP get_parameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_parameter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbmgr_main
function dbmgr_main()
{
echo '<link rel="stylesheet" href="include/styles/dbmanager.css" type="text/css" />';
$sql = (string) get_parameter('sql');
$clean_output = get_parameter("clean_output", 0);
if ($clean_output == 0) {
echo "<h1>" . __('Extensions') . " » " . __('Database interface');
$html_report_image = print_html_report_image("index.php?sec=godmode&sec2=godmode/setup/dbmanager&sql={$sql}", __("Report"));
if ($html_report_image) {
echo " " . $html_report_image;
}
echo "</h1>";
echo '<div class="note_simple">';
echo __("This is an advanced extension to interface with Integria IMS database directly using native SQL sentences. Please note that <b>you can damage</b> your Integria IMS installation if you don't know </b>exactly</b> what are you doing, this means that you can severily damage your setup using this extension. This extension is intended to be used <b>only by experienced users</b> with a depth knowledgue of Integria IMS.");
echo '</div>';
echo "<br />";
echo __("Some samples of usage:") . " <blockquote><em>SHOW STATUS;<br />DESCRIBE tincidencia<br />SELECT * FROM tincidencia<br />UPDATE tincidencia SET sla_disabled = 1 WHERE inicio < '2010-01-10 00:00:00';</em></blockquote>";
echo "<br /><br />";
echo "<form method='post' action=''>";
print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES));
echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>";
print_submit_button(__('Execute SQL'), '', false, 'class="sub next"');
echo "</div>";
echo "</form>";
} else {
echo "<form method='post' action=''>";
print_textarea('sql', 2, 40, html_entity_decode($sql, ENT_QUOTES));
echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>";
print_submit_button(__('Execute SQL'), '', false, 'class="sub next"');
echo "</div>";
echo "</form>";
}
// Processing SQL Code
if ($sql == '') {
return;
}
echo "<br />";
echo "<hr />";
echo "<br />";
$error = '';
$result = dbmanager_query($sql, $error);
if ($result === false) {
echo '<strong>An error has occured when querying the database.</strong><br />';
echo $error;
return;
}
if (!is_array($result)) {
echo "<strong>Output: <strong>" . $result;
return;
}
$table->width = '90%';
$table->class = 'dbmanager';
$table->head = array_keys($result[0]);
$table->data = $result;
print_table($table);
}
示例2: project_do_mylist
/**
* project_do_mylist - List of projects available to the logged user
*/
function project_do_mylist()
{
global $PARAMS, $SOAP, $LOG;
if (get_parameter($PARAMS, "help")) {
return;
}
// Fetch the user ID from the database
$params = array("user_ids" => array($SOAP->getSessionUser()));
$res = $SOAP->call("getUsersByName", $params);
if ($error = $SOAP->getError()) {
exit_error($error, $SOAP->faultcode);
}
$user_id = $res[0]["user_id"];
$params = array("user_id" => $user_id);
$res = $SOAP->call("userGetGroups", $params);
if ($error = $SOAP->getError()) {
exit_error($error, $SOAP->faultcode);
}
show_output($res);
}
示例3: ranks
function ranks()
{
$name = get_parameter("name");
$ranks = "";
// read 'ranks.txt' file line by line, extract a line that contains a matching 'name' parameter value
// 'ranks.txt' file을 한줄 한줄 읽고, 'name' 매개변수의 값을 가진 줄(line)을 추출하시오
$names_array = file("ranks.txt");
foreach ($names_array as $line) {
$tmp_name = explode(" ", $line)[0];
if ($tmp_name === $name) {
$ranks .= $line;
break;
}
}
if ($ranks) {
// emit a retured ranking data from the 'generate_xml' function as an output in XML data format
// 'generate_xml' 함수에서 반화하는 랭킹 데이터를 XML 데이터 형식으로 만들어 내보내시오
return generate_xml($ranks);
} else {
header("HTTP/1.1 410 Gone");
die("HTTP/1.1 410 Gone - There is no data for this name/gender.");
}
}
示例4: get_parameter
break;
case "details":
include "contact_manage.php";
break;
case "files":
include "contact_files.php";
break;
case "activity":
include "contact_activity.php";
break;
default:
include "contact_manage.php";
}
if ($id == 0 && !$new_contact) {
$search_text = (string) get_parameter('search_text');
$id_company = (int) get_parameter('id_company', 0);
$where_clause = "WHERE 1=1";
if ($search_text != "") {
$where_clause .= " AND (fullname LIKE '%{$search_text}%' OR email LIKE '%{$search_text}%' OR phone LIKE '%{$search_text}%' OR mobile LIKE '%{$search_text}%') ";
}
if ($id_company) {
$where_clause .= sprintf(' AND id_company = %d', $id_company);
}
$search_params = "&search_text={$search_text}&id_company={$id_company}";
$table->width = '99%';
$table->class = 'search-table';
$table->style = array();
$table->style[0] = 'font-weight: bold;';
$table->data = array();
$table->data[0][0] = print_input_text("search_text", $search_text, "", 15, 100, true, __('Search'));
$params = array();
示例5: audit_db
// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars
global $config;
if (check_login() != 0) {
audit_db("Noauth", $config["REMOTE_ADDR"], "No authenticated access", "Trying to access ticket viewer");
require "general/noaccess.php";
exit;
}
$id_nota = get_parameter("id", 0);
$id_incident = get_parameter("id_inc", 0);
// ********************************************************************
// Note detail of $id_note
// ********************************************************************
$sql4 = 'SELECT * FROM tnota WHERE id_nota = ' . $id_nota;
$res4 = mysql_query($sql4);
if ($row3 = mysql_fetch_array($res4)) {
echo "<div class='notetitle'>";
// titulo
$timestamp = $row3["timestamp"];
$nota = $row3["nota"];
$id_usuario_nota = $row3["id_usuario"];
$avatar = get_db_value("avatar", "tusuario", "id_usuario", $id_usuario_nota);
// Show data
echo "<img src='images/avatars/" . $avatar . ".png' class='avatar_small'> ";
echo " <a href='index.php?sec=users&sec2=operation/users/user_edit&id={$id_usuario_nota}'>";
示例6: check_login
// This program 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.
global $config;
check_login ();
// Get parameters
$id_project = get_parameter ('id_project');
$id_task = get_parameter ('id_task', -1);
$project_manager = get_db_value ('id_owner', 'tproject', 'id', $id_project);
$operation = (string) get_parameter ('operation');
$title = get_parameter ("title", "");
$description = get_parameter ("description", "");
// ACL
$task_permission = get_project_access ($config["id_user"], $id_project, $id_task, false, true);
if (!$task_permission["manage"]) {
audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to task email report without permission");
no_permission();
}
if ($operation == "generate_email") {
$task_participants = get_db_all_rows_sql ("SELECT direccion, nombre_real FROM tusuario, trole_people_task WHERE tusuario.id_usuario = trole_people_task.id_user AND trole_people_task.id_task = $id_task");
$participants ="";
foreach ($task_participants as $participant){
$participant["direccion"];
$text = ascii_output ($description);
$subject = ascii_output ($title);
示例7: main_control
function main_control()
{
// These globals are used in the HTML template
global $current_player, $history;
global $heading, $name_white, $name_black;
global $show_command_form, $flip_board;
global $preset_from_value, $preset_to_value, $id_focus;
global $chess_board_markup, $history_markup, $promotion_dialog_markup;
global $board_encoded, $game_title, $turn_nr;
global $history_next, $history_prev;
global $href_this, $href_player, $href_flip;
global $game_state_link, $hmw_home_link;
// Initialize a bit
$promotion_popup = false;
//...NYI Show pawn promotion dialog
$show_command_form = true;
// Show the move input dialog
$game_status = IN_PROGRESS;
// The game has not ended yet
$heading = '';
// "White's move" caption
$game_title = '';
// Current game info for page title
$game_state_link = '';
// "Send this link"-link ..
$hmw_home_link = '';
// .. corrected for my stupid router
//... Remember an initial double move of a pawn
$get_en_passant = get_parameter(GET_EN_PASSANT);
$new_en_passant = '';
// Retreive GET data
$flip_board = isset($_GET[GET_FLIP_BOARD]);
$history = get_parameter(GET_HISTORY);
$goto = get_parameter(GET_GOTO);
$name_white = get_parameter(GET_WHITE, DEFAULT_NAME_WHITE);
$name_black = get_parameter(GET_BLACK, DEFAULT_NAME_BLACK);
if (get_parameter(GET_PLAYER, GET_WHITE) != GET_WHITE) {
// &player set, but not to "white", is taken as "black"
$current_player = BLACKS_MOVE;
} else {
$current_player = WHITES_MOVE;
}
// Load base positions of pieces
$base_array = decode_board(get_parameter(GET_BASE_BOARD, INITIAL_BOARD_CODED));
// Trace history (Reconstruct the current board from initial positions)
//...list( $board_array, $tie_info ) = decode_history(
$board_array = decode_history($base_array, $history, $goto);
// Execute given command
// Retreive FORM input
// Move: "from" and "to" must be field names
// Edit: "from" must be the code character for a piece and "to" a field
$clickable = $selected = array();
$redirect_after_move = false;
$cmd_piece = get_parameter(GET_FROM);
$cmd_from = strtoupper(get_parameter(GET_FROM));
// Retreive commands
$cmd_to = strtoupper(get_parameter(GET_TO));
if ($cmd_from == $cmd_to) {
// Deselect a piece
$cmd_from = $cmd_to = '';
}
if ($cmd_from == '') {
$cmd_to = '';
}
// Never allow only TO command
// Exec: Editor
if (strlen($cmd_from) == 1 && valid_field_name($cmd_to)) {
if (strpos(WHITE_PIECES . BLACK_PIECES, $cmd_from) !== false) {
list($row, $col) = field_to_rowcol($cmd_to);
if ($base_array[$row][$col] == $cmd_piece) {
// Delete existing piece
$base_array[$row][$col] = '';
} else {
if ($base_array[$row][$col] == '') {
// Add new piece
$base_array[$row][$col] = $cmd_piece;
}
}
#$base_array = $board_array;
$redirect_after_move = true;
}
// No other commands with FROM being only one char.
$cmd_from = $cmd_to = '';
}
// Make sure, no invalid data is being processed as a move
if (!valid_field_name($cmd_from)) {
$cmd_from = '';
}
if (!valid_field_name($cmd_to)) {
$cmd_to = '';
}
// Exec: Move
if ($cmd_from != '' && $cmd_to != '') {
$turn_nr = i_to_round($history);
if ($turn_nr - floor($turn_nr) == 0.5) {
$turn_nr = floor($turn_nr);
$color = 'Black';
} else {
$color = 'White';
}
//.........这里部分代码省略.........
示例8: get_db_sql
}
}
// Delete group
if ($delete_group) {
$name = get_db_sql("SELECT nombre FROM tgrupo WHERE id_grupo = {$id}");
$sql = sprintf('DELETE FROM tgrupo WHERE id_grupo = %d', $id);
$result = process_sql($sql);
if ($result === false) {
echo '<h3 class="error">' . __('There was a problem deleting group') . '</h3>';
} else {
audit_db($config["id_user"], $config["REMOTE_ADDR"], "Group management", "Deleted group '{$name}'");
echo '<h3 class="suc">' . __('Successfully deleted') . '</h3>';
}
}
$offset = get_parameter("offset", 0);
$search_text = get_parameter("search_text", "");
echo "<table class='search-table' style='width: 99%;'><form name='bskd' method=post action='index.php?sec=users&sec2=godmode/grupos/lista_grupos'>";
echo "<td>";
echo "<b>" . __('Search text') . "</b> ";
print_input_text("search_text", $search_text, '', 40, 0, false);
echo "</td>";
echo "<td>";
print_submit_button(__('Search'), '', false, 'class="sub next"', false, false);
echo "</td>";
echo "</table></form>";
$groups = get_db_all_rows_sql("SELECT * FROM tgrupo WHERE nombre LIKE '%{$search_text}%' ORDER BY nombre");
$groups = print_array_pagination($groups, "index.php?sec=users&sec2=godmode/grupos/lista_grupos");
print_groups_table($groups);
echo '<form method="post" action="index.php?sec=users&sec2=godmode/grupos/configurar_grupo">';
echo '<div class="button" style="width: ' . $table->width . '">';
print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"');
示例9: check_login
// GNU General Public License for more details.
global $config;
check_login();
require_once 'include/functions_tags.php';
if (!dame_admin($config["id_user"])) {
audit_db("ACL Violation", $config["REMOTE_ADDR"], "No administrator access", "Trying to access setup");
require "general/noaccess.php";
exit;
}
echo "<h1>" . __("Tags management") . "</h1>";
// Tag info
$id = (int) get_parameter('id');
$name = (string) get_parameter('name');
$colour = (string) get_parameter('colour');
// Actions
$action = (string) get_parameter('action');
$create = $action === 'create';
$update = $action === 'update';
$delete = $action === 'delete';
if ($create || $update || $delete) {
$crud_operation = array();
$crud_operation['result'] = false;
$crud_operation['message'] = '';
}
// Data processing
if ($create) {
// name and colour required
if (!empty($name) && !empty($colour)) {
if (!exists_tag_name($name)) {
try {
$values = array(TAGS_TABLE_NAME_COL => $name, TAGS_TABLE_COLOUR_COL => $colour);
示例10: process_sql_update
$result = process_sql_update($external_table, $values, array($key => $key_value));
if ($result) {
echo "<h3 class='suc'>" . __('Updated row') . "</h3>";
} else {
echo "<h3 class='error'>" . __('There was a problem updating row') . "</h3>";
}
}
if ($insert_row) {
$fields = get_db_all_rows_sql("DESC " . $external_table);
$key = get_parameter('key');
if ($fields == false) {
$fields = array();
}
foreach ($fields as $field) {
if ($field['Field'] != $key) {
$values[$field['Field']] = get_parameter($field['Field']);
}
}
$result_insert = process_sql_insert($external_table, $values);
if ($result_insert) {
echo "<h3 class='suc'>" . __('Inserted row') . "</h3>";
} else {
echo "<h3 class='error'>" . __('There was a problem inserting row') . "</h3>";
}
}
echo "<h1>" . __('External table management') . "</h1>";
$table->width = '98%';
$table->class = 'search-table';
$table->id = "external-editor";
$table->data = array();
$ext_tables = inventories_get_external_tables($id_object_type);
示例11: __
if (!$id) {
echo '<h3 class="error">' . __('Could not be created') . '</h3>';
} else {
echo '<h3 class="suc">' . __('Successfully created') . '</h3>';
//insert_event ("OBJECT TYPE CREATED", $id, 0, $name);
audit_db($config["id_user"], $config["REMOTE_ADDR"], "Inventory Management", "Created object {$id} - {$name}");
}
$id = 0;
}
// Update
if ($update_object) {
$name = (string) get_parameter("name");
$icon = (string) get_parameter("icon");
$min_stock = (int) get_parameter("min_stock");
$description = (string) get_parameter("description");
$show_in_list = (int) get_parameter("show_in_list");
$sql = sprintf('UPDATE tobject_type SET name = "%s", icon = "%s", min_stock = %d,
description = "%s", show_in_list = %d WHERE id = %s', $name, $icon, $min_stock, $description, $show_in_list, $id);
$result = process_sql($sql);
if (!$result) {
echo "<h3 class='error'>" . __('Could not be updated') . "</h3>";
} else {
echo "<h3 class='suc'>" . __('Successfully updated') . "</h3>";
//insert_event ("PRODUCT UPDATED", $id, 0, $name);
audit_db($config["id_user"], $config["REMOTE_ADDR"], "Inventory Management", "Updated object {$id} - {$name}");
}
}
// Delete
if ($delete_object) {
// Move parent who has this product to 0
$sql = sprintf('DELETE FROM tobject_type_field WHERE id_object_type = %d', $id);
示例12: get_parameter
$labela = get_parameter("labela", "");
$labelb = get_parameter("labelb", "");
$valuea = get_parameter("a", 0);
$valueb = get_parameter("b", 0);
$valuec = get_parameter("c", 0);
$lite = get_parameter("lite", 0);
$date_from = get_parameter("date_from", 0);
$date_to = get_parameter("date_to", 0);
$mode = get_parameter("mode", 1);
$percent = get_parameter("percent", 0);
$days = get_parameter("days", 0);
$type = get_parameter("type", "");
$background = get_parameter("background", "#ffffff");
$id_incident = get_parameter("id_incident");
$period = get_parameter("period");
$ajax = get_parameter("is_ajax");
if ($type == "incident_a") {
incident_peruser($width, $height);
} elseif ($type == "workunit_task") {
graph_workunit_task($width, $height, $id_task);
} elseif ($type == "workunit_user") {
graph_workunit_user($width, $height, $id_user, $date_from);
} elseif ($type == "workunit_project_user") {
graph_workunit_project_user($width, $height, $id_user, $date_from, $date_to);
} elseif ($type == "project_tree") {
project_tree($id_project, $id_user);
} elseif ($type == "all_project_tree") {
all_project_tree($id_user, $completion, $project_kind);
} elseif ($type == "sla_slicebar") {
if ($ajax) {
echo graph_sla_slicebar($id_incident, $period, $width, $height);
示例13: get_parameter
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program 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.
if (check_login () != 0) {
audit_db ("Noauth", $config["REMOTE_ADDR"], "No authenticated access","Trying to access ticket viewer");
require ("general/noaccess.php");
exit;
}
$id_incident = (int) get_parameter ('id');
$incidents = incidents_get_incident_childs ($id_incident, false);
if (count ($incidents) == 0) {
echo ui_print_error_message (__('There\'s no tickets associated to this ticket'), '', true, 'h3', true);
}
else {
$table = new StdClass();
$table->class = 'listing';
$table->width = '100%';
$table->head = array ();
$table->head[0] = __('ID');
$table->head[1] = __('Name');
$table->head[2] = __('Group');
示例14: ob_clean
// as published by the Free Software Foundation; version 2
// This program 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.
global $config;
require_once 'include/functions_mail.php';
ob_clean();
$check_transport = (bool) get_parameter('check_transport');
$change_template_alert = (bool) get_parameter('change_template_alert');
if ($check_transport) {
$proto = (string) get_parameter('proto');
$host = (string) get_parameter('host');
$port = (int) get_parameter('port');
$user = (string) get_parameter('user');
$pass = (string) get_parameter('pass');
$transport_conf = array();
if (!empty($host)) {
$transport_conf['host'] = $host;
if (!empty($port)) {
$transport_conf['port'] = $port;
}
if (!empty($user)) {
$transport_conf['user'] = $user;
}
if (!empty($pass)) {
$transport_conf['pass'] = $pass;
}
if (!empty($proto)) {
$transport_conf['proto'] = $proto;
}
示例15: olc_seo_url
function olc_seo_url($url)
{
//W. Kaiser - Search friendly URLs
if (USE_SEO) {
$slash_pos = strrpos($url, SLASH);
if ($slash_pos !== false) {
$slash_pos++;
}
$pos = strrpos($url, QUESTION);
if ($pos !== false) {
$url_b = substr($url, 0, $pos);
$parameters = substr($url, $pos + 1);
} else {
$url_b = $url;
$parameters = EMPTY_STRING;
}
$url_b = basename($url_b);
global $seo_urls_to_convert, $seo_action_parameter;
//URLs are built like:
//http://www.server.de/olcommerce/seo-processor-par1-val1-par2-val2-...-parn-valn.htm
//e.g.: http://www.server.de/olcommerce/seo-products_info-products_id-144.htm
global $seo_array_1, $seo_array_2;
if (DO_SEO_EXTENDED) {
global $seo_search, $seo_replace;
$add_parameters = EMPTY_STRING;
$processor_type = EMPTY_STRING;
if ($url_b == FILENAME_PRODUCT_INFO) {
$rewritten = true;
$products_id = get_parameter($parameters, 'products_id', $add_parameters);
if ($products_id) {
if (strpos($add_parameters, 'add_product') == false) {
$processor_type = 'p';
} else {
$processor_type = 'a';
$add_parameters = EMPTY_STRING;
}
$url_par = preg_replace($seo_search, $seo_replace, olc_get_products_name($products_id)) . SEMI_COLON . $products_id;
}
} elseif ($url_b == FILENAME_DEFAULT) {
global $seo_categories;
$check_parameter = 'BUYproducts_id';
$products_id = get_parameter($parameters, $check_parameter, $add_parameters);
if ($products_id) {
$processor_type = 'b';
$url_par = strtolower(olc_get_products_name($products_id, SESSION_LANGUAGE_ID));
$url_par = preg_replace($seo_search, $seo_replace, $url_par) . SEMI_COLON . $products_id;
$add_parameters = str_replace('action=buy_now', EMPTY_STRING, $add_parameters);
if ($add_parameters[0] == AMP) {
$add_parameters = substr($add_parameters, 1);
}
} else {
$category_id = get_parameter($parameters, 'cPath', $add_parameters);
if ($category_id) {
$processor_type = 'k';
$url_par = EMPTY_STRING;
$category_id = explode(UNDERSCORE, $category_id);
$categories = sizeof($category_id);
for ($i = 0; $i < $categories; $i++) {
if ($url_par) {
$url_par .= SEO_SEPARATOR;
}
$url_par .= preg_replace($seo_search, $seo_replace, $seo_categories[$category_id[$i]]);
}
} else {
$manufacturer_id = get_parameter($parameters, 'manufacturers_id', $add_parameters);
if ($manufacturer_id) {
$processor_type = 'm';
$manufacturers = olc_get_manufacturers();
foreach ($manufacturers as $manufacturer_id) {
if ($manufacturer_id['id'] == $manufacturer_id) {
$maname = $manufacturer_id['text'];
break;
}
}
$url .= shopstat_hrefManulink($maname, $manufacturer_id, $url);
} else {
$filter_id = get_parameter($parameters, 'filter_id', $add_parameters);
if ($filter_id) {
} else {
//return $url;
}
}
}
}
} elseif ($url_b == FILENAME_CONTENT) {
$content_id = get_parameter($parameters, 'coID', $add_parameters);
if ($content_id) {
$processor_type = 'c';
$url_par = 'content' . SEMI_COLON . $content_id;
}
} else {
//return $url;
}
if (!$processor_type) {
/*
$url_par=explode(PHP,$url);
$url_par=$url_par[0];
$pos=strrpos($url_par,SLASH);
if ($pos!==false)
{
//.........这里部分代码省略.........