本文整理汇总了PHP中getParameter函数的典型用法代码示例。如果您正苦于以下问题:PHP getParameter函数的具体用法?PHP getParameter怎么用?PHP getParameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getParameter函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: listarColaFax_json
function listarColaFax_json($smarty, $module_name, $local_templates_dir)
{
//TODO: falta ahcer un filtrado de los trabajos pendientes por organizaionc
// esto se puede hacer si se identifica a que modem pertence cada trajado
// en la cola. Cada trabajo listado tiene un correspondiente archivo
// en donde se describe a que modem pertenece. Seria de ller ese archivo
// si el trbajo es de envio se encuentra en /var/spool/hylafax/sendq/
// si el trabjo es de envio se encuentra en /var/spool/hylafax/recvq/
// el nombre del archivo seria qJID donde JID ES DE ID DEL JOB
session_commit();
$oldhash = getParameter('outputhash');
$html = NULL;
$startTime = time();
do {
$listaColaFax = enumerarFaxesPendientes();
$newhash = md5(serialize($listaColaFax));
if ($oldhash == $newhash) {
usleep(2 * 1000000);
} else {
$html = listarColaFax_raw($smarty, $module_name, $local_templates_dir, $listaColaFax);
}
} while ($oldhash == $newhash && time() - $startTime < 30);
$jsonObject = new PalosantoJSON();
$jsonObject->set_status($oldhash != $newhash ? 'CHANGED' : 'NOCHANGED');
$jsonObject->set_message(array('html' => $html, 'outputhash' => $newhash));
Header('Content-Type: application/json');
return $jsonObject->createJSON();
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:28,代码来源:index.php
示例2: listRepositories
function listRepositories($smarty, $module_name, $local_templates_dir, $arrConf)
{
$oRepositories = new PaloSantoRepositories();
$arrReposActivos = array();
$typeRepository = getParameter("typeRepository");
if (isset($_POST['submit_aceptar'])) {
foreach ($_POST as $key => $value) {
if (substr($key, 0, 5) == 'repo-') {
$arrReposActivos[] = substr($key, 5);
}
}
$oRepositories->setRepositorios($arrConf['ruta_repos'], $arrReposActivos, $typeRepository, $arrConf["main_repos"]);
}
$option["main"] = "";
$option["others"] = "";
$option["all"] = "";
$arrRepositorios = $oRepositories->getRepositorios($arrConf['ruta_repos'], $typeRepository, $arrConf["main_repos"]);
$limit = 40;
$total = count($arrRepositorios);
$oGrid = new paloSantoGrid($smarty);
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
$end = $oGrid->getEnd();
$arrData = array();
$version = $oRepositories->obtenerVersionDistro();
$arch = $oRepositories->obtenerArquitectura();
if (is_array($arrRepositorios)) {
for ($i = $offset; $i < $end; $i++) {
$activo = "";
if ($arrRepositorios[$i]['activo']) {
$activo = "checked='checked'";
}
$arrData[] = array("<input {$activo} name='repo-" . $arrRepositorios[$i]['id'] . "' type='checkbox' id='repo-{$i}' />", $valor = str_replace(array("\$releasever", "\$basearch"), array($version, $arch), $arrRepositorios[$i]['name']));
}
}
if (isset($typeRepository)) {
$oGrid->setURL("?menu={$module_name}&typeRepository={$typeRepository}");
$_POST["typeRepository"] = $typeRepository;
} else {
$oGrid->setURL("?menu={$module_name}");
$_POST["typeRepository"] = "main";
}
$arrGrid = array("title" => _tr("Repositories"), "icon" => "web/apps/{$module_name}/images/system_updates_repositories.png", "width" => "99%", "start" => $total == 0 ? 0 : $offset + 1, "end" => $end, "total" => $total, "columns" => array(0 => array("name" => _tr("Active"), "property1" => ""), 1 => array("name" => _tr("Name"), "property1" => "")));
$oGrid->customAction('submit_aceptar', _tr('Save/Update'));
$oGrid->addButtonAction("default", _tr('Default'), null, "defaultValues({$total},'{$version}','{$arch}')");
$FilterForm = new paloForm($smarty, createFilter());
$arrOpt = array("main" => _tr('Main'), "others" => _tr('Others'), "all" => _tr('All'));
if (isset($arrOpt[$typeRepository])) {
$valorfiltro = $arrOpt[$typeRepository];
} else {
$valorfiltro = _tr('Main');
}
$oGrid->addFilterControl(_tr("Filter applied ") . _tr("Repo") . " = " . $valorfiltro, $_POST, array("typeRepository" => "main"), true);
$htmlFilter = $FilterForm->fetchForm("{$local_templates_dir}/new.tpl", "", $_POST);
$oGrid->showFilter($htmlFilter);
$contenidoModulo = $oGrid->fetchGrid($arrGrid, $arrData);
return $contenidoModulo;
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:59,代码来源:index.php
示例3: performDelete
function performDelete()
{
validateUser();
withStatement("DELETE FROM DATA WHERE id=?", function ($statement) {
$id = getParameter(PARAMETER_ID, PARAMETER_REQUIRED);
$statement->bind_param("s", $id);
executeStatement($statement);
});
}
开发者ID:jan-berge-ommedal,项目名称:Thin-PHP-Backend,代码行数:9,代码来源:api.php
示例4: transferSessionIdToCookieAndRedirect
function transferSessionIdToCookieAndRedirect()
{
$sessionId = getParameter("sessionId");
if (isValidSessionId($sessionId)) {
debug("setting session cookie");
setcookie(COOKIE_SESSION_ID, $sessionId, time() + 60 * 60 * 24, "/", getDomainName());
$baseUrl = getBaseUrl();
debug("redirecting to: " . $baseUrl);
header("Location: " . $baseUrl . "/");
} else {
performLogout();
}
}
开发者ID:jan-berge-ommedal,项目名称:Thin-PHP-Backend,代码行数:13,代码来源:auth.php
示例5: display_form
function display_form($smarty, $module_name, $local_templates_dir)
{
require_once "libs/paloSantoForm.class.php";
if (getParameter('csvupload') != '') {
upload_csv($smarty, $module_name);
}
if (getParameter('delete_all') != '') {
delete_extensions($smarty, $module_name);
}
$smarty->assign(array('MODULE_NAME' => $module_name, 'LABEL_FILE' => _tr("File"), 'LABEL_UPLOAD' => _tr('Save'), 'LABEL_DOWNLOAD' => _tr("Download Extensions"), 'LABEL_DELETE' => _tr('Delete All Extensions'), 'CONFIRM_DELETE' => _tr("Are you really sure you want to delete all the extensions in this server?"), 'HeaderFile' => _tr("Header File Extensions Batch"), 'AboutUpdate' => _tr("About Update Extensions Batch")));
$oForm = new paloForm($smarty, array());
return $oForm->fetchForm("{$local_templates_dir}/extension.tpl", _tr('Extensions Batch'), $_POST);
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:13,代码来源:index.php
示例6: __construct
public function __construct()
{
function getParameter($name, $defaultValue)
{
if (isset($_GET[$name])) {
return urldecode($_GET[$name]);
} else {
return $defaultValue;
}
}
$version = intval(getParameter('v', '0'));
$androidId = getParameter('aid', '');
$statistics = new StatisticRepository();
$statistics->increaseVisits(StatisticRepository::REST_API, date('Y-m-d'), $version, $androidId);
}
开发者ID:pjanczyk,项目名称:lo1olkusz-website,代码行数:15,代码来源:ApiController.php
示例7: getData
function getData()
{
$tmpName = $_FILES['file']['tmp_name'];
assertNotEmpty($tmpName, "missing file");
$imageWidth = getParameter("imageWidth");
$imageHeight = getParameter("imageHeight");
$contentType = getContentType();
debug($contentType);
if (($contentType == "image/jpeg" || $contentType == "image/x-png" || $contentType == "image/png" || $contentType == "image/gif") && !empty($imageWidth) && !empty($imageHeight)) {
resizeImage($tmpName, $imageWidth, $imageHeight);
}
$fp = fopen($tmpName, 'r');
$length = filesize($tmpName);
debug("File size: {$length}");
$content = fread($fp, $length);
fclose($fp);
return $content;
}
开发者ID:jan-berge-ommedal,项目名称:Thin-PHP-Backend,代码行数:18,代码来源:upload.php
示例8: _moduleContent
function _moduleContent(&$smarty, $module_name)
{
//include module files
include_once "modules/{$module_name}/configs/default.conf.php";
global $arrConf;
load_language_module($module_name);
$arrConf = array_merge($arrConf, $arrConfig);
//folder path for custom templates
$base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
$templates_dir = isset($arrConfig['templates_dir']) ? $arrConfig['templates_dir'] : 'themes';
$local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
// Conexión a la base de datos CallCenter
$pDB = new paloDB($arrConf['cadena_dsn']);
switch (getParameter('action')) {
case 'new_user':
return nuevoUsuario($pDB, $smarty, $module_name, $local_templates_dir);
case 'edit_user':
return editarUsuario($pDB, $smarty, $module_name, $local_templates_dir);
case 'list_user':
default:
return listarUsuarios($pDB, $smarty, $module_name, $local_templates_dir);
}
}
开发者ID:hardikk,项目名称:HNH,代码行数:23,代码来源:index.php
示例9: getAction
function getAction()
{
if (getParameter("save_new")) {
//Get parameter by POST (submit)
return "save_new";
} else {
if (getParameter("save_edit")) {
return "save_edit";
} else {
if (getParameter("delete")) {
return "delete";
} else {
if (getParameter("new_open")) {
return "view_form";
} else {
if (getParameter("action") == "view") {
//Get parameter by GET (command pattern, links)
return "view_form";
} else {
if (getParameter("action") == "view_edit") {
return "view_form";
} else {
if (getParameter("action") == "call") {
return "call";
} else {
if (getParameter("action") == "loadBoxes") {
return "loadBoxes";
} else {
if (getParameter("action") == "voicemail") {
return "voicemail";
} else {
if (getParameter("action") == "hangup") {
return "hangup";
} else {
if (getParameter("action") == "getAllData") {
return "getAllData";
} else {
if (getParameter("action") == "refresh") {
return "refresh";
} else {
if (getParameter("action") == "savechange") {
return "savechange";
} else {
if (getParameter("action") == "savechange2") {
return "savechange2";
} else {
if (getParameter("action") == "saveresize") {
return "saveresize";
} else {
if (getParameter("action") == "loadArea") {
return "loadArea";
} else {
if (getParameter("action") == "saveEdit") {
return "saveEdit";
} else {
if (getParameter("action") == "addExttoQueue") {
return "addExttoQueue";
} else {
return "report";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
//cancel
}
开发者ID:hardikk,项目名称:HNH,代码行数:79,代码来源:index.php
示例10: getAction
function getAction()
{
global $arrPermission;
if (getParameter("update_hosts")) {
//Get parameter by POST (submit)
return in_array('edit', $arrPermission) ? 'save' : 'show';
} else {
return "show";
}
//cancel
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:11,代码来源:index.php
示例11: getAction
function getAction()
{
global $arrPermission;
if (getParameter("create_tg")) {
return in_array('create', $arrPermission) ? 'new_tg' : 'report';
} else {
if (getParameter("save_new")) {
//Get parameter by POST (submit)
return in_array('create', $arrPermission) ? 'save_new' : 'report';
} else {
if (getParameter("save_edit")) {
return in_array('edit', $arrPermission) ? 'save_edit' : 'report';
} else {
if (getParameter("delete")) {
return in_array('delete', $arrPermission) ? 'delete' : 'report';
} else {
if (getParameter("action") == "edit") {
//Get parameter by GET (command pattern, links)
return "edit";
} else {
if (getParameter("action") == "reloadAsterisk") {
return "reloadAasterisk";
} else {
return "report";
}
}
}
}
}
}
//cancel
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:32,代码来源:index.php
示例12: isExportAction
function isExportAction()
{
if (getParameter("exportcsv") == "yes") {
return true;
} else {
if (getParameter("exportpdf") == "yes") {
return true;
} else {
if (getParameter("exportspreadsheet") == "yes") {
return true;
} else {
return false;
}
}
}
}
开发者ID:veraveramanolo,项目名称:cpc2c_uio,代码行数:16,代码来源:paloSantoGrid.class.php
示例13: uninstallPaquete
function uninstallPaquete($arrConf)
{
$oPackages = new PaloSantoPackages($arrConf['ruta_yum']);
$paquete = getParameter("paquete");
$resultado = $oPackages->uninstallPackage($paquete);
$jsonObject = new PaloSantoJSON();
$jsonObject->set_status($resultado);
return $jsonObject->createJSON();
}
开发者ID:lordbasex,项目名称:elastix-gui,代码行数:9,代码来源:index.php
示例14: getParameter
<?php
include_once 'session_check.php';
include_once '../scripts/myErrorHandler.php';
include_once '../scripts/Database.php';
include_once '../scripts/utils.php';
$addResultText = "";
$code = getParameter('code');
if ($code != null) {
$code = strtoupper($_GET['code']);
$db = new Database();
if ($db->updateUserAccount($uid, $code) == true) {
$addResultText = "Dziękujemy za zakup<br/>";
include 'session_check.php';
} else {
$addResultText = "Podany kod jest niewłaściwy<br/>";
}
$db->destroy();
}
$user_login = "gościu";
// -1 aby nie proponować gościowi piosenki za darochę
$user_coins = -1;
if ($uid != null) {
$user_login = $rowUser['login'];
$user_coins = $rowUser['coins'];
}
trigger_error("user_coins: " . $user_coins, E_USER_NOTICE);
trigger_error("{$rowUser['coins']}: " . $rowUser['coins'], E_USER_NOTICE);
$wap_title = "mobiKAR";
include "add_head.php";
?>
开发者ID:bouda,项目名称:mobikar,代码行数:31,代码来源:start.php
示例15: assign_TicketDelivery
function assign_TicketDelivery(&$pDB)
{
// collect parameters
$sTicketId = trim(getParameter('ticket_id'));
$sUserId = trim(getParameter('user_id'));
$sNote = trim(getParameter('note'));
$response = array('action' => 'assign', 'message' => 'Phân công mã giao vé ' . $sTicketId . ' thành công');
$pTicket_Delivery = new Ticket_Delivery($pDB);
$result = $pTicket_Delivery->assignDelivery($sTicketId, $sUserId, $sNote);
// return json
if (!$result) {
$response['action'] = 'error';
$response['message'] = 'Lỗi: ' . $pTicket_Delivery->errMsg;
}
$json = new Services_JSON();
Header('Content-Type: application/json');
return $json->encode($response);
}
开发者ID:hardikk,项目名称:HNH,代码行数:18,代码来源:index.php
示例16: createActivity
function createActivity($userId, $timezone)
{
//Check
if (!parameterExists(APIKeys::$ACTIVITY_NAME) && !parameterExists(APIKeys::$ACTIVITY_DURATION)) {
displayError("Create Activity: Please supply an activity name and activty duration as part of the request");
} else {
if (!parameterExists(APIKeys::$ACTIVITY_NAME)) {
displayError("Create Activity: Please supply an activity name as part of the request");
} else {
if (!parameterExists(APIKeys::$ACTIVITY_DURATION)) {
displayError("Create Activity: Please supply an activity duration as part of the request");
}
}
}
//Get values
$activityName = getParameter(APIKeys::$ACTIVITY_NAME);
$activityDuration = getParameter(APIKeys::$ACTIVITY_DURATION);
//Create activity
$result = APIDb::createActivity($userId, $activityName, $activityDuration, $timezone);
//Show Response
response($result);
}
开发者ID:nikilster,项目名称:I,代码行数:22,代码来源:apiMethods.php
示例17: getAction
function getAction()
{
if (getParameter("edit")) {
return "edit";
} else {
if (getParameter("commit")) {
return "commit";
} else {
if (getParameter("show")) {
return "show";
} else {
if (getParameter("delete")) {
return "delete";
} else {
if (getParameter("new")) {
return "new";
} else {
if (getParameter("save")) {
return "save";
} else {
if (getParameter("delete")) {
return "delete";
} else {
if (getParameter("action") == "show") {
return "show";
} else {
if (getParameter("action") == "edit") {
return "edit";
} else {
if (getParameter("action") == "download_csv") {
return "download_csv";
} else {
if (getParameter("action") == "call2phone") {
return "call2phone";
} else {
if (getParameter("action") == "transfer_call") {
return "transfer_call";
} else {
if (getParameter("action") == "getImage") {
return "getImage";
} else {
return "report";
}
}
}
}
}
}
}
}
}
}
}
}
}
}
开发者ID:hardikk,项目名称:HNH,代码行数:56,代码来源:index.php
示例18: getAction
function getAction()
{
global $arrPermission;
if (getParameter("new_emaillist")) {
//Get parameter by POST (submit)
return in_array('create_list', $arrPermission) ? 'new_emaillist' : 'report';
} elseif (getParameter("save_newList")) {
return in_array('create_list', $arrPermission) ? 'save_newList' : 'report';
} elseif (getParameter("delete")) {
return in_array('delete_list', $arrPermission) ? 'delete' : 'report';
} elseif (getParameter("action") == "view_list") {
return "view_list";
} elseif (getParameter("save_mailmail_admin")) {
return in_array('edit_list', $arrPermission) ? 'saveMailmanSettings' : 'report';
} elseif (getParameter("action") == "mailman_settings") {
return in_array('edit_list', $arrPermission) ? 'mailman_settings' : 'report';
} elseif (getParameter("action") == "export") {
return "export";
} elseif (getParameter("return")) {
return "report";
} elseif (getParameter("new_memberlist")) {
return in_array('edit_list', $arrPermission) ? 'new_memberlist' : 'report';
} elseif (getParameter("save_newMember")) {
return in_array('edit_list', $arrPermission) ? 'save_newMember' : 'report';
} elseif (getParameter("remove_memberlist")) {
return in_array('edit_list', $arrPermission) ? 'remove_memberlist' : 'report';
} elseif (getParameter("action") == "view_memberlist" || getParameter("show")) {
return "view_memberlist";
} else {
return "report";
}
//cancel
}
开发者ID:netconstructor,项目名称:elastix-mt-gui,代码行数:33,代码来源:index.php
示例19: viewNote
function viewNote()
{
$sNoteId = trim(getParameter('view_note_id'));
if ($sNoteId == '' || is_null($sNoteId)) {
$response = 'Không có note id!';
$json = new Services_JSON();
Header('Content-Type: application/json');
return $json->encode($response);
}
global $arrConf;
$oCustomer = new getInfoMainConsole();
$oCustomer->callcenter_db_connect($arrConf['cadena_dsn']);
$result = $oCustomer->getNote($sNoteId);
// return json
if (!$result) {
$response['content'] = 'Lỗi: ' . $oCustomer->errMsg;
} else {
$response['note_id'] = $sNoteId;
$response['content'] = $result['note'];
//check permission
}
$json = new Services_JSON();
Header('Content-Type: application/json');
return $json->encode($response);
}
开发者ID:hardikk,项目名称:HNH,代码行数:25,代码来源:index.php
示例20: modificarCola
function modificarCola($pDB, $smarty, $module_name, $local_templates_dir)
{
$idCola = getParameter('id_queue');
if (is_null($idCola)) {
Header("Location: ?menu={$module_name}");
return '';
}
return formularioModificarCola($pDB, $smarty, $module_name, $local_templates_dir, $idCola);
}
开发者ID:hardikk,项目名称:HNH,代码行数:9,代码来源:index.php
注:本文中的getParameter函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论