本文整理汇总了PHP中getURLAddon函数的典型用法代码示例。如果您正苦于以下问题:PHP getURLAddon函数的具体用法?PHP getURLAddon怎么用?PHP getURLAddon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getURLAddon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<?php
if (isset($_POST["box_grades"])) {
foreach ($_POST["box_grades"] as $f_gscaleid) {
deleteGrade((int) $f_gscaleid);
}
} else {
$f_gscaleid = (int) readGetVar('gscaleid');
deleteGrade($f_gscaleid);
}
gotoLocation('grades.php' . getURLAddon('', array('action', 'confirmed', 'gscaleid')));
function deleteGrade($i_gscaleid)
{
global $g_db, $srv_settings;
if ($i_gscaleid > SYSTEM_GRADES_MAX_INDEX) {
if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests SET gscaleid=1 WHERE gscaleid=" . $i_gscaleid) === false) {
showDBError(__FILE__, 1);
}
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "gscales_grades WHERE gscaleid={$i_gscaleid}") === false) {
showDBError(__FILE__, 2);
}
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "gscales WHERE gscaleid={$i_gscaleid}") === false) {
showDBError(__FILE__, 3);
}
}
}
示例2: readGetVar
<?php
$f_groupid = (int) readGetVar('groupid');
$f_testids = explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('testids'));
$i_sql_where_addon = '';
if ($_GET["set"]) {
foreach ($f_testids as $i_testid) {
//9917//9917
$g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "groups_tests (groupid, testid) VALUES ({$f_groupid}, {$i_testid})");
}
} else {
reset($f_testids);
if (list(, $val) = each($f_testids)) {
$i_sql_where_addon .= "testid=" . (int) $val;
}
while (list(, $val) = each($f_testids)) {
$i_sql_where_addon .= " OR testid=" . (int) $val;
}
if ($i_sql_where_addon) {
$i_sql_where_addon = ' AND (' . $i_sql_where_addon . ')';
}
//9917//9917
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "groups_tests WHERE groupid={$f_groupid}" . $i_sql_where_addon) === false) {
showDBError(__FILE__, 2);
}
}
gotoLocation('test-manager.php' . getURLAddon('?action=groups', array('action', 'groupid', 'set')));
示例3: setCookieVar
setCookieVar('filter_reportsmanager_result_date', 0);
setCookieVar('filter_reportsmanager_result_datestart', 0);
setCookieVar('filter_reportsmanager_result_dateend', 0);
setCookieVar('filter_reportsmanager_id', '');
setCookieVar('filter_reportsmanager_testid', '');
setCookieVar('filter_reportsmanager_user_lastname', '');
setCookieVar('filter_reportsmanager_user_department', '');
setCookieVar('filter_reportsmanager_subjectid', '');
gotoLocation('reports-manager.php' . getURLAddon('?action=', array('action', 'id', 'user_lastname', 'user_department', 'testid')));
}
break;
case 'exportcsv':
if ($G_SESSION['access_reportsmanager'] > 1) {
include_once $DOCUMENT_PAGES . 'reports-manager-exportcsv.inc.php';
} else {
gotoLocation('reports-manager.php' . getURLAddon('?action=', array('action')));
}
break;
case 'preview':
case 'print':
include_once $DOCUMENT_PAGES . 'reports-manager-report-1.inc.php';
break;
default:
include_once $DOCUMENT_PAGES . 'reports-manager-1.inc.php';
}
} else {
$g_vars['page']['notifications'] = $lngstr['inf_cant_view_results'];
include_once $DOCUMENT_PAGES . 'home.inc.php';
}
} else {
$g_vars['page']['title'] = $lngstr['page_title_signin'];
示例4: str_replace
$i_strData = str_replace("\r", '', $i_strData);
$i_strData = str_replace(' ', '', $i_strData);
$i_nData = (int) $i_strData;
if ($i_nData < 0) {
$i_nData = 0;
}
$f_subjectid = $i_nData;
break;
}
$i_nCurrNearest = $i_nNextNearest;
$i_nCurrNearestPos = $i_nNextNearestPos;
}
if (!empty($f_question_text)) {
insertQuestion();
}
gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action')));
function NewValueApply($i_nAnswerType, $i_strValue)
{
global $f_answer_correct, $f_answer_percents;
switch ($i_nAnswerType) {
case QUESTION_TYPE_MULTIPLECHOICE:
case QUESTION_TYPE_TRUEFALSE:
case QUESTION_TYPE_MULTIPLEANSWER:
if (!is_array($f_answer_correct)) {
$f_answer_correct = array();
}
if (!is_array($f_answer_percents)) {
$f_answer_percents = array();
}
$i_nValue = (int) $i_strValue;
if ($i_nValue > 0 and $i_nValue <= MAX_ANSWER_COUNT) {
示例5: readGetVar
<?php
$f_testid = (int) readGetVar('testid');
$f_id = (int) readGetVar('id');
if ((int) readGetVar('set')) {
$g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "tests_attempts (testid, id, test_attempt_count) VALUES (" . $f_testid . ", " . $f_id . ", 0)");
$g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests_attempts SET test_attempt_count=999999 WHERE testid=" . $f_testid . " AND id=" . $f_id);
} else {
$g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "tests_attempts WHERE testid=" . $f_testid . " AND id=" . $f_id);
}
gotoLocation('reports-manager.php' . getURLAddon('?action=', array('action', 'testid', 'id', 'set')));
示例6: readGetVar
<?php
$f_id = (int) readGetVar('id');
$f_set = isset($_GET["set"]) ? (int) $_GET["set"] : 0;
if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "users SET user_enabled=" . $f_set . " WHERE id=" . $f_id) === false) {
showDBError(__FILE__, 1);
}
gotoLocation('users.php' . getURLAddon('', array('action', 'set')));
示例7: gotoLocation
if (isset($_POST['bsubmit']) || isset($_POST['bsubmit2'])) {
if ($G_SESSION['access_questionbank'] > 1) {
include_once $DOCUMENT_PAGES . "edit_questions-3.inc.php";
} else {
if (isset($_GET['testid'])) {
gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action', 'questionid')));
} else {
gotoLocation('question-bank.php' . getURLAddon('', array('action')));
}
}
} else {
if (isset($_POST['bcancel'])) {
if (isset($_GET['testid'])) {
gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action', 'questionid')));
} else {
gotoLocation('question-bank.php' . getURLAddon('', array('action')));
}
} else {
include_once $DOCUMENT_PAGES . "edit_questions-2.inc.php";
}
}
}
break;
case 'statsq':
$g_vars['page']['title'] = $lngstr['page_title_question_stats'] . $lngstr['item_separator'] . $g_vars['page']['title'];
if (isset($_GET['questionid']) || isset($_POST["box_questions"])) {
include_once $DOCUMENT_PAGES . "question-bank-2.inc.php";
} else {
gotoLocation('question-bank.php');
}
break;
示例8: getURLAddon
<?php
require_once "../inc/init.inc.php";
$i_url = '/guide.php' . getURLAddon();
if (!empty($_GET['language'])) {
$i_language = readGetVar('language');
} else {
$i_language = $srv_settings['language'];
}
if ($i_language != 'en' && $i_language != 'de' && $i_language != 'es') {
$i_language = 'en';
}
$i_url = $i_language . '' . $i_url;
gotoLocation($i_url);
示例9: readGetVar
<?php
$f_groupid = (int) readGetVar('groupid');
$f_ids = explode(SYSTEM_ARRAY_ITEM_SEPARATOR, readGetVar('ids'));
if ($_GET["set"]) {
foreach ($f_ids as $i_id) {
//9917//9917
$g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "groups_users (groupid, id) VALUES ({$f_groupid}, {$i_id})");
}
} else {
$i_sql_where_addon = '';
reset($f_ids);
if (list(, $val) = each($f_ids)) {
$i_sql_where_addon .= "id=" . (int) $val;
}
while (list(, $val) = each($f_ids)) {
$i_sql_where_addon .= " OR id=" . (int) $val;
}
if ($i_sql_where_addon) {
$i_sql_where_addon = ' AND (' . $i_sql_where_addon . ')';
}
//9917//9917
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "groups_users WHERE groupid={$f_groupid}" . $i_sql_where_addon) === false) {
showDBError(__FILE__, 2);
}
}
gotoLocation('users.php' . getURLAddon('?action=groups', array('action')));
示例10: gotoLocation
$i_confirm_url = 'groups.php?groupid=' . (int) $_GET['groupid'] . '&action=delete';
include_once $DOCUMENT_PAGES . "confirm.inc.php";
}
}
} else {
gotoLocation('groups.php' . getURLAddon('', array('action')));
}
break;
case 'edit':
$g_vars['page']['title'] = $lngstr['page_title_groups_settings'] . $lngstr['item_separator'] . $g_vars['page']['title'];
if (isset($_GET['groupid'])) {
if (isset($_POST['bsubmit'])) {
if ($G_SESSION['access_groups'] > 1) {
include_once $DOCUMENT_PAGES . "groups-3.inc.php";
} else {
gotoLocation('groups.php' . getURLAddon('', array('action')));
}
} else {
if (isset($_POST['bcancel'])) {
gotoLocation('groups.php');
} else {
include_once $DOCUMENT_PAGES . "groups-2.inc.php";
}
}
}
break;
default:
include_once $DOCUMENT_PAGES . "groups-1.inc.php";
}
} else {
$g_vars['page']['notifications'] = $lngstr['inf_cant_access_groups'];
示例11: foreach
<?php
if (isset($_POST["box_rtemplates"])) {
foreach ($_POST["box_rtemplates"] as $f_rtemplateid) {
deleteRTemplate((int) $f_rtemplateid);
}
} else {
$f_rtemplateid = (int) readGetVar('rtemplateid');
deleteRTemplate($f_rtemplateid);
}
gotoLocation('report-templates.php' . getURLAddon('', array('action', 'confirmed', 'rtemplateid')));
function deleteRTemplate($i_rtemplateid)
{
global $g_db, $srv_settings;
if ($i_rtemplateid > SYSTEM_RTEMPLATES_MAX_INDEX) {
if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests SET rtemplateid=0 WHERE rtemplateid={$i_rtemplateid}") === false) {
showDBError(__FILE__, 1);
}
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "rtemplates WHERE rtemplateid={$i_rtemplateid}") === false) {
showDBError(__FILE__, 2);
}
}
}
示例12: getURLAddon
}
if ($i_pageno <= $i_pageno_count - floor($nPageWindow / 2) && $nStartPage + $nPageWindow - 1 <= $i_pageno_count) {
$nEndPage = $nStartPage + $nPageWindow - 1;
} else {
$nEndPage = $i_pageno_count;
if ($nEndPage - $nPageWindow + 1 >= 1) {
$nStartPage = $nEndPage - $nPageWindow + 1;
}
}
$nRecordFrom = ($i_pageno - 1) * $i_limitcount + 1;
if ($i_pageno != $i_pageno_count) {
$nRecordTo = $i_pageno * $i_limitcount;
} else {
$nRecordTo = $i_recordcount;
}
$g_vars['page']['filter']['url_addon'] = getURLAddon('?action=filter', array('action'));
$g_vars['page']['filter']['result_date'] = $f_result_date;
$g_vars['page']['filter']['result_datestart_formatted'] = $f_result_datestart > 0 ? getDateLocal($lngstr['language']['calendar']['date_format'], $f_result_datestart) : '';
$g_vars['page']['filter']['result_dateend_formatted'] = $f_result_dateend > 0 ? getDateLocal($lngstr['language']['calendar']['date_format'], $f_result_dateend) : '';
if ($G_SESSION['access_reportsmanager'] > 1) {
$i_users = array('' => $lngstr['label_none']);
$i_rSet2 = $g_db->Execute("SELECT * FROM " . $srv_settings['table_prefix'] . "users");
if (!$i_rSet2) {
showDBError(__FILE__, 2);
} else {
while (!$i_rSet2->EOF) {
$i_users[$i_rSet2->fields['id']] = $i_rSet2->fields['username'];
$i_rSet2->MoveNext();
}
$i_rSet2->Close();
}
示例13: gotoLocation
$g_vars['page']['title'] = $lngstr['page_title_users_memberof'] . $lngstr['item_separator'] . $g_vars['page']['title'];
if (isset($_GET['id']) || isset($_POST['box_users']) || isset($_GET['ids'])) {
include_once $DOCUMENT_PAGES . 'manageusers-8.inc.php';
} else {
gotoLocation('users.php');
}
break;
case 'memberof':
if ($G_SESSION['access_users'] > 1 && $G_SESSION['access_groups'] > 1) {
if (isset($_GET['groupid']) && isset($_GET['ids'])) {
include_once $DOCUMENT_PAGES . 'manageusers-9.inc.php';
}
} else {
gotoLocation('users.php' . getURLAddon('?action=groups', array('action')));
}
break;
default:
if ($G_SESSION['access_users'] == 2 || $G_SESSION['access_users'] == 4) {
include_once $DOCUMENT_PAGES . 'manageusers-1.inc.php';
} else {
gotoLocation('users.php' . getURLAddon('?action=edit&id=' . $G_SESSION['id'], array('action', 'id')));
}
}
} else {
$g_vars['page']['notifications'] = $lngstr['inf_cant_access_users'];
include_once $DOCUMENT_PAGES . 'home.inc.php';
}
} else {
$g_vars['page']['title'] = $lngstr['page_title_signin'];
include_once $DOCUMENT_PAGES . 'signin-1.inc.php';
}
示例14: foreach
<?php
if (isset($_POST["box_users"])) {
foreach ($_POST["box_users"] as $f_id) {
deleteUser((int) $f_id);
}
} else {
$f_id = (int) readGetVar('id');
deleteUser($f_id);
}
gotoLocation('users.php' . getURLAddon('', array('action', 'confirmed')));
function deleteUser($i_id)
{
global $g_db, $srv_settings;
if ($i_id > SYSTEM_USER_MAX_INDEX) {
$g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "tests_attempts WHERE id=" . $i_id);
$i_rSet1 = $g_db->Execute("SELECT resultid FROM " . $srv_settings['table_prefix'] . "results WHERE id=" . $i_id);
if (!$i_rSet1) {
showDBError(__FILE__, 1);
} else {
while (!$i_rSet1->EOF) {
deleteResultRecord($i_rSet1->fields["resultid"]);
$i_rSet1->MoveNext();
}
$i_rSet1->Close();
}
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "results WHERE id=" . $i_id) === false) {
showDBError(__FILE__, 2);
}
//9917//9917
if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "groups_users WHERE id=" . $i_id) === false) {
示例15: switch
switch ($f_question_type) {
case QUESTION_TYPE_FILLINTHEBLANK:
$f_answer_feedback = array(1 => $g_db->qstr('', 0));
$f_answer_correct = array(1 => 1);
$f_answer_percents = array(1 => 100);
break;
}
include_once $DOCUMENT_PAGES . 'edit_questions-3-int.inc.php';
$f_answercount = (int) readPostVar('answercount');
if (isset($_GET['resultid'])) {
if (isset($_POST['bsubmit2'])) {
gotoLocation('question-bank.php' . getURLAddon('?action=createq&question_type=' . $f_question_type . '&subjectid=' . $f_subjectid . '&answercount=' . $f_answercount, array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
} else {
gotoLocation('reports-manager.php' . getURLAddon('?action=viewq', array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
}
} else {
if (isset($_GET['testid'])) {
$f_testid = (int) readGetVar('testid');
if (isset($_POST['bsubmit2'])) {
gotoLocation('question-bank.php' . getURLAddon('?action=createq&question_type=' . $f_question_type . '&subjectid=' . $f_subjectid . '&answercount=' . $f_answercount, array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
} else {
gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
}
} else {
if (isset($_POST['bsubmit2'])) {
gotoLocation('question-bank.php' . getURLAddon('?action=createq&question_type=' . $f_question_type . '&subjectid=' . $f_subjectid . '&answercount=' . $f_answercount, array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
} else {
gotoLocation('question-bank.php' . getURLAddon('', array('action', 'questionid', 'question_type', 'subjectid', 'answercount')));
}
}
}