本文整理汇总了PHP中GetParameter函数的典型用法代码示例。如果您正苦于以下问题:PHP GetParameter函数的具体用法?PHP GetParameter怎么用?PHP GetParameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetParameter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetParameters
function GetParameters($params)
{
global $clr, $allowTransparency, $transparent, $locale;
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$clr = ValidateColorString(GetParameter($params, 'CLR'));
$allowTransparency = GetIntParameter($params, 'ALLOWTRANS') == 1;
$transparent = GetIntParameter($params, 'TRANS') == 1;
}
示例2: GetParameters
function GetParameters($params)
{
global $tgt, $popup, $dwf, $locale;
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$tgt = GetIntParameter($params, 'TGT');
$popup = GetIntParameter($params, 'POPUP');
$dwf = GetIntParameter($params, 'DWF');
}
示例3: GetParameters
function GetParameters($params)
{
global $mapName, $sessionId, $dwf, $locale;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
$popup = GetIntParameter($params, 'POPUP');
$dwf = GetIntParameter($params, 'DWF');
}
示例4: GetParameters
function GetParameters($params)
{
global $taskPane, $sessionId, $webLayoutId, $dwf, $locale, $mapName;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$webLayoutId = ValidateResourceId(GetParameter($params, 'WEBLAYOUT'));
$dwf = GetIntParameter($params, 'DWF');
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
}
示例5: GetParameters
function GetParameters($params)
{
global $sessionId, $webLayout, $pageName, $dwf, $locale;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$webLayout = ValidateResourceId(GetParameter($params, 'WEBLAYOUT'));
$dwf = GetIntParameter($params, 'DWF') == 1;
$pageName = GetParameter($params, 'PAGE');
}
示例6: GetParameters
function GetParameters($params)
{
global $target, $cmdIndex, $clientWidth, $mapName, $sessionId, $popup, $us, $locale;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
$popup = GetIntParameter($params, 'POPUP');
$us = GetParameter($params, 'US');
}
示例7: GetParameters
function GetParameters($params)
{
global $locale, $mapFrame;
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
if (isset($params['MAPFRAME'])) {
$mapFrame = ValidateFrameName(GetParameter($params, 'MAPFRAME'));
} else {
$mapFrame = "parent";
}
}
示例8: GetParameters
function GetParameters($params)
{
global $mapName, $sessionId, $mapFrame, $locale;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
if (isset($params['MAPFRAME'])) {
$mapFrame = ValidateFrameName(GetParameter($params, 'MAPFRAME'));
} else {
$mapFrame = "parent";
}
}
示例9: GetParameters
function GetParameters($params)
{
global $target, $cmdIndex, $clientWidth, $mapName, $sessionId, $total, $popup, $locale;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
$target = GetIntParameter($params, 'TGT');
$popup = GetIntParameter($params, 'POPUP');
$cmdIndex = GetIntParameter($params, 'CMDINDEX');
$clientWidth = GetIntParameter($params, 'WIDTH');
$total = GetDoubleParameter($params, 'TOTAL');
$units = GetParameter($params, 'UNITS');
}
示例10: GetParameters
function GetParameters($params)
{
global $cmdIndex, $target, $clientWidth, $layerId, $popup, $locale;
global $mapName, $sessionId, $filter, $matchLimit;
$sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
$locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
$mapName = ValidateMapName(GetParameter($params, 'MAPNAME'));
$cmdIndex = GetIntParameter($params, 'CMDINDEX');
$target = GetIntParameter($params, 'TGT');
$popup = GetIntParameter($params, 'POPUP');
$clientWidth = GetIntParameter($params, 'WIDTH');
$matchLimit = GetIntParameter($params, 'MR');
$layerId = GetParameter($params, 'LAYER');
$filter = GetParameter($params, 'FILTER');
}
示例11: UpdatePreOpen
function UpdatePreOpen($TournamentID)
{
// checks if the structure of the database is consistent
// CheckDbStructure();
$DbVersion = GetParameter('DBUpdate');
$rs = safe_r_SQL("SELECT ToDbVersion, ToType, ToNumSession FROM Tournament WHERE ToId='{$TournamentID}'");
$row = safe_fetch($rs);
$version = $row->ToDbVersion;
if ($version < '2010-11-26 15:50:00') {
updateEnTimeStamp_20101126($TournamentID);
to_save_version($TournamentID, '2010-11-26 15:50:00');
}
if ($version < '2010-12-11 20:30:00') {
recalculateIndividuals_20101211($TournamentID);
to_save_version($TournamentID, '2010-12-11 20:30:00');
}
if ($version < '2011-02-16 15:42:00') {
// metto a posto il numero max di persone nei team
calcMaxTeamPerson_20110216($TournamentID);
// ricalcolo le rank a squadra
recalculateTeamRanking_20110216($TournamentID);
to_save_version($TournamentID, '2011-02-16 15:42:00');
}
if ($version < '2011-03-09 14:38:00') {
initTourGoldsXNineChars_20110309($TournamentID);
to_save_version($TournamentID, '2011-03-09 14:38:00');
}
if ($version < '2011-04-15 15:55:00') {
RecalcFinRank_20110415($TournamentID);
to_save_version($TournamentID, '2011-04-15 15:55:00');
}
if ($version < '2012-01-11 10:20:00') {
Update3DIta_20120111($TournamentID);
to_save_version($TournamentID, '2012-01-11 10:20:00');
}
if ($version < '2012-01-24 15:16:00') {
$q = insertIntoGridForF2F_21($TournamentID);
$rs2 = safe_w_sql($q, false, array(1062));
to_save_version($TournamentID, '2012-01-24 15:16:00');
}
if ($version < '2012-05-18 07:10:00') {
safe_w_sql("update Divisions set DivWaDivision=DivId, DivRecDivision=DivId where DivWaDivision='' or DivRecDivision=''");
safe_w_sql("update Classes set ClWaClass=ClId, ClRecClass=ClId where ClWaClass='' or ClRecClass=''");
safe_w_sql("update Events set EvWaCategory=EvCode, EvRecCategory=EvCode where EvWaCategory='' or EvRecCategory=''");
to_save_version($TournamentID, '2012-05-18 07:10:00');
}
if ($version < '2013-12-19 12:30:00') {
// Updating DistanceInformation
require_once 'Modules/Sets/lib.php';
require_once 'Tournament/Fun_ManSessions.inc.php';
$Distances = getDistanceArrays($row->ToType);
$q = safe_r_sql("select SesAth4Target, SesOrder from Session where SesTournament={$TournamentID}");
while ($r = safe_fetch($q)) {
CreateDistanceInformation($TournamentID, $Distances, 0, $r->SesAth4Target, $r->SesOrder);
}
to_save_version($TournamentID, '2013-12-19 12:30:00');
}
if ($version < '2014-03-22 14:00:00') {
UpdateWinLose_20140322($TournamentID);
to_save_version($TournamentID, '2014-03-22 14:00:00');
}
if ($version < '2014-04-01 00:00:00') {
UpdateItaRules_20140401($TournamentID);
to_save_version($TournamentID, '2014-04-01 00:00:00');
}
if ($version < '2014-05-23 16:00:00') {
safe_w_sql("update Scheduler\n\t\t\tleft join Session on SchTournament=SesTournament and SchSesOrder=SesOrder and SchSesType=SesType\n\t\t\tset SchDay=date(SchDateStart), SchStart=time(SchDateStart), SchDuration=TIMESTAMPDIFF(MINUTE, SchDateStart, SchDateEnd), SchText=SchDescr, SchTitle=SesName\n\t\t\twhere SchTournament={$TournamentID}");
$q = safe_r_sql("select * from Scheduler where SchTournament={$TournamentID} and SchDay>0 and SchStart>0 order by SchDay, SchStart, SchOrder desc");
$oldKeys = array();
while ($r = safe_fetch($q)) {
$good = true;
$key = $r->SchDay . '|' . $r->SchStart;
while (in_array($key, $oldKeys)) {
$key++;
$good = false;
}
$oldKeys[] = $key;
if (!$good) {
$SQL = "update Scheduler set SchStart='" . substr($key, -8) . "' where SchDay='{$r->SchDay}' and SchStart='{$r->SchStart}' and SchDuration='{$r->SchDuration}' and SchSesOrder={$r->SchSesOrder} and SchOrder={$r->SchOrder} and SchSesType='{$r->SchSesType}' limit 1";
safe_w_sql($SQL);
}
}
to_save_version($TournamentID, '2014-04-01 00:00:00');
}
to_save_version($TournamentID, $DbVersion);
}
示例12: db_save_version
function db_save_version($newversion)
{
//Aggiorno alla versione attuale SOLO le gare che erano alla versione immediatamente precedente
$oldDbVersion = GetParameter('DBUpdate');
safe_w_sql("UPDATE Tournament SET ToDbVersion='{$newversion}' WHERE ToDbVersion='{$oldDbVersion}'");
SetParameter('DBUpdate', $newversion);
SetParameter('SwUpdate', ProgramVersion);
}
示例13: filesize
$filesize = filesize($_FILES['Gara']['tmp_name']);
// ini_set('memory_limit',sprintf('%sM',max(128,intval(log($filesize)*18))));
include 'Common/Fun_TourDelete.php';
$TourId = tour_import($_FILES['Gara']['tmp_name']);
// if an ID is returned then everything is fine!
if ($TourId) {
header('Location: ' . $CFG->ROOT_DIR . 'Common/TourOn.php?ToId=' . $TourId . '&BackTo=' . $CFG->ROOT_DIR . 'Main.php');
exit;
}
die(get_text('IncompatibleVersions', 'Tournament', '<a href="http://www.ianseo.net/">Ianseo.net</a>'));
}
$JS_SCRIPT = array('<script type="text/javascript" src="' . $CFG->ROOT_DIR . 'Common/Fun_JS.inc.js"></script>');
$PAGE_TITLE = get_text('TournamentImport', 'Tournament');
include 'Common/Templates/head.php';
$onclick = '';
if (GetParameter('TourBusy')) {
$onclick = ' onclick="return(confirm(\'' . str_replace("\n", '\\n', addslashes(get_text('TourBusy', 'Tournament'))) . '\'))"';
}
//$onclick=' onclick="return(confirm(\'Ciao\'))"';
?>
<div align="center">
<div class="medium">
<form method="POST" enctype="multipart/form-data">
<table class="Tabella">
<tr><th class="Title" colspan="2"><?php
print get_text('TournamentImport', 'Tournament');
?>
</th></tr>
<tr class="Spacer"><td colspan="2"></td></tr>
<tr><th class="SubTitle"><?php
echo get_text('SelFile2Imp', 'HTT');
示例14: tour_import
function tour_import($filename)
{
// Tabelle che hanno il codice Tournament
$tabs_on_tour = array('AccColors' => 'Ac', 'AccEntries' => 'AE', 'AccPrice' => 'AP', 'ACL' => 'Acl', 'AclDetails' => 'AclDt', 'AvailableTarget' => 'At', 'Awards' => 'Aw', 'Awarded' => 'Aw', 'BackNumber' => 'Bn', 'CasScore' => 'CaS', 'CasTeam' => 'Ca', 'CasTeamFinal' => 'CTF', 'CasTeamTarget' => 'CTT', 'Classes' => 'Cl', 'ClubTeam' => 'CT', 'ClubTeamScore' => 'CTS', 'Countries' => 'Co', 'Divisions' => 'Div', 'DistanceInformation' => 'Di', 'Emails' => 'Em', 'Entries' => 'En', 'EventClass' => 'Ec', 'Events' => 'Ev', 'Individuals' => 'Ind', "F2FGrid" => 'F2F', "F2FEntries" => "F2F", "F2FFinal" => "F2F", 'FinalReportA' => 'Fra', 'Finals' => 'Fin', 'FinSchedule' => 'FS', 'FinTraining' => 'Ft', 'FinTrainingEvent' => 'Fte', 'FinWarmup' => 'Fw', 'HhtData' => 'Hd', 'HhtEvents' => 'He', 'HhtSetup' => 'Hs', 'IdCardElements' => 'Ice', 'IdCards' => 'Ic', 'Images' => 'Im', 'ModulesParameters' => 'Mp', 'RecTournament' => 'Rt', 'Reviews' => 'Rev', 'SubClass' => 'Sc', 'TargetFaces' => 'Tf', 'TeamComponent' => 'Tc', 'TeamFinals' => 'Tf', 'TeamFinComponent' => 'Tfc', 'Teams' => 'Te', 'TournamentDistances' => 'Td', 'TournamentInvolved' => 'Ti', 'TourRecords' => 'Tr', 'TVContents' => 'TVC', 'TVOut' => 'TV', 'TVParams' => 'TVP', 'TVRules' => 'TVR', 'TVSequence' => 'TVS', 'Session' => 'Ses', 'Scheduler' => 'Sch', 'Eliminations' => 'El', 'VegasAwards' => 'Va');
// Tabelle che hanno il codice Countries
$tab_to_country = array('CasTeam' => 'CaTeam', 'ClubTeam' => 'CTTeam', 'Entries' => array('EnCountry', 'EnCountry2', 'EnCountry3'), 'TeamComponent' => 'TcCoId', 'TeamFinals' => 'TfTeam', 'TeamFinComponent' => 'TfcCoId', 'Teams' => 'TeCoId');
// Tabelle che hanno il codice Entries
$tab_to_entry = array('AccEntries' => 'AEId', 'Awarded' => 'AwEntry', 'ElabQualifications' => 'EqId', 'Eliminations' => 'ElId', 'ExtraData' => 'EdId', 'Individuals' => 'IndId', "F2FEntries" => "F2FEnId", "F2FFinal" => "F2FEnId", 'Finals' => 'FinAthlete', 'HhtData' => 'HdEnId', 'Photos' => 'PhEnId', 'Qualifications' => 'QuId', 'TeamComponent' => 'TcId', 'TeamFinComponent' => 'TfcId', 'Vegas' => 'VeId');
// Tabelle che dipendono SOLO da Tournament
$tabs_only_tour = array('AccColors', 'AccPrice', 'ACL', 'AclDetails', 'AvailableTarget', 'Awards', 'BackNumber', 'CasScore', 'CasTeamFinal', 'CasTeamTarget', 'Classes', 'ClubTeamScore', 'DistanceInformation', 'Divisions', 'Emails', 'EventClass', 'Events', 'F2FGrid', 'FinalReportA', 'FinSchedule', 'FinTraining', 'FinTrainingEvent', 'FinWarmup', 'HhtEvents', 'HhtSetup', 'IdCardElements', 'IdCards', 'Images', 'ModulesParameters', 'RecTournament', 'Reviews', 'SubClass', 'TargetFaces', 'TournamentDistances', 'TournamentInvolved', 'TourRecords', 'TVContents', 'TVOut', 'TVParams', 'TVRules', 'TVSequence', 'Session', 'Scheduler', 'Eliminations', 'VegasAwards');
$Gara = unserialize(gzuncompress(implode('', file($filename))));
// If is not compatible, exits
if ($Gara['Tournament']['ToDbVersion'] > GetParameter('DBUpdate')) {
return false;
}
require_once 'UpdateTournament.inc.php';
$Gara = UpdateTournament($Gara);
// CONTROLLA SE C'E' UN TORNEO CON LO STESSO CODICE E LO SEGA!
$q = safe_r_sql("select ToId from Tournament where ToCode=" . strsafe_db($Gara['Tournament']['ToCode']));
if ($r = safe_fetch($q)) {
// esiste un tournament con lo stesso codice... ranzo tutto!
tour_delete($r->ToId);
}
// Inserisce il torneo
$quer = array();
foreach ($Gara['Tournament'] as $key => $val) {
if ($key != 'ToId') {
$quer[] = "{$key}=" . strsafe_db($val);
// if($key=='ToImgL') debug_svela(array('SAFE' => strsafe_db($val), '','','','','', 'ORG' => $val));
}
}
safe_w_sql("Insert into Tournament set " . implode(', ', $quer));
$TourId = safe_w_last_id();
if (debug) {
echo "Inserito Tournament<br />";
}
// aggiusta il nuovo valore del torneo nell'array...
foreach ($tabs_on_tour as $tab => $code) {
if (isset($Gara[$tab])) {
foreach ($Gara[$tab] as $key => $val) {
$Gara[$tab][$key][$code . 'Tournament'] = $TourId;
}
if (debug) {
echo "Aggiornato Tournament Nr. in tabella {$tab}<br />";
}
}
}
// inserisce le tabelle che hanno SOLO il tournament
foreach ($tabs_only_tour as $tab) {
if (isset($Gara[$tab])) {
foreach ($Gara[$tab] as $record) {
$query = array();
foreach ($record as $key => $val) {
$query[] = "{$key} = " . strsafe_db($val);
}
safe_w_sql("insert into {$tab} set " . implode(', ', $query) . " on duplicate key update " . implode(', ', $query));
}
}
if (debug) {
echo "Inserita tabella {$tab}<br />";
}
}
// inserisce i paesi e mantieni l'array per il cambio country
$Countries = array();
if (array_key_exists('Countries', $Gara) && is_array($Gara['Countries']) && count($Gara['Countries']) > 0) {
foreach ($Gara['Countries'] as $record) {
$query = array();
foreach ($record as $key => $val) {
if ($key != 'CoId') {
$query[] = "{$key} = " . strsafe_db($val);
}
}
safe_w_sql("insert into Countries set " . implode(', ', $query));
$Countries[$record['CoId']] = safe_w_last_id();
}
if (debug) {
echo "Inserita tabella Countries<br />";
}
}
//aggiorna CoParent1 della Countries stessa
$tmpSql = "SELECT DISTINCT CoParent1 FROM Countries WHERE CoTournament=" . $TourId . " AND CoParent1!=0";
$tmpRs = safe_r_sql($tmpSql);
if (safe_num_rows($tmpRs) != 0) {
while ($tmpRow = safe_fetch($tmpRs)) {
safe_w_sql("UPDATE Countries SET CoParent1=" . $Countries[$tmpRow->CoParent1] . " WHERE CoParent1=" . $tmpRow->CoParent1 . " AND CoTournament=" . $TourId);
}
safe_free_result($tmpRs);
}
//aggiorna CoParent2 della Countries stessa
$tmpSql = "SELECT DISTINCT CoParent2 FROM Countries WHERE CoTournament=" . $TourId . " AND CoParent2!=0";
$tmpRs = safe_r_sql($tmpSql);
if (safe_num_rows($tmpRs) != 0) {
while ($tmpRow = safe_fetch($tmpRs)) {
safe_w_sql("UPDATE Countries SET CoParent2=" . $Countries[$tmpRow->CoParent2] . " WHERE CoParent2=" . $tmpRow->CoParent2 . " AND CoTournament=" . $TourId);
}
safe_free_result($tmpRs);
}
// aggiorna i paesi nelle tabelle che ne fanno uso
foreach ($tab_to_country as $tab => $field) {
if (array_key_exists($tab, $Gara)) {
//.........这里部分代码省略.........
示例15: isset
$regex_match .= "htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|";
$regex_match .= "blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|";
$regex_match .= "symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\\-|longcos|pantech|gionee|^sie\\-|portalmmm|";
$regex_match .= "jig\\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\\s*mobi|opera\\*mini|320x320|240x320|176x220";
$regex_match .= ")/i";
// echo '<pre>';
// print_r(preg_split($regex_match, strtolower($_SERVER['HTTP_USER_AGENT'])));
// echo '<br />';
// print_r($_SERVER);
// echo '</pre><br />WAP '.$_SERVER['HTTP_X_WAP_PROFILE'].'<br />Profile '.$_SERVER['HTTP_PROFILE'].'<br />Agent '.$_SERVER['HTTP_USER_AGENT'].'<br />';
// exit;
return isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']) || preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));
}
CheckTourSession(true);
// tiro fuori i parametri dei timer
$param = GetParameter('SpkTimer');
$tmp = explode(';', $param);
$timers = array();
$colors = array();
for ($i = 0; $i < count($tmp); ++$i) {
list($t, $c) = explode('|', $tmp[$i]);
if ($t != '#') {
$timers[$i] = $t;
}
if ($c != '#') {
$colors[$i] = $c;
}
}
/*print '<pre>';
print_r($timers);
print_r($colors);