当前位置: 首页>>代码示例>>PHP>>正文


PHP getParameter函数代码示例

本文整理汇总了PHP中getParameter函数的典型用法代码示例。如果您正苦于以下问题:PHP getParameter函数的具体用法?PHP getParameter怎么用?PHP getParameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getParameter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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&#x119;kujemy za zakup<br/>";
        include 'session_check.php';
    } else {
        $addResultText = "Podany kod jest niew&#x142;a&#x15b;ciwy<br/>";
    }
    $db->destroy();
}
$user_login = "go&#x15b;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


注:本文中的getParameter函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。