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


PHP gotoLocation函数代码示例

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


在下文中一共展示了gotoLocation函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gotoLocation

                } else {
                    gotoLocation('email-templates.php');
                }
                break;
            case 'edit':
                $g_vars['page']['title'] = $lngstr['page_title_etemplates_edit'] . $lngstr['item_separator'] . $g_vars['page']['title'];
                if (isset($_GET['etemplateid'])) {
                    if (isset($_POST['bsubmit'])) {
                        if ($G_SESSION['access_emailtemplates'] > 1) {
                            include_once $DOCUMENT_PAGES . 'email-templates-3.inc.php';
                        } else {
                            gotoLocation('email-templates.php');
                        }
                    } else {
                        if (isset($_POST['bcancel'])) {
                            gotoLocation('email-templates.php');
                        } else {
                            include_once $DOCUMENT_PAGES . 'email-templates-2.inc.php';
                        }
                    }
                }
                break;
            default:
                include_once $DOCUMENT_PAGES . 'email-templates-1.inc.php';
        }
    } else {
        $g_vars['page']['notifications'] = $lngstr['inf_cant_access_emailtemplates'];
        include_once $DOCUMENT_PAGES . 'home.inc.php';
    }
} else {
    $g_vars['page']['title'] = $lngstr['page_title_signin'];
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:email-templates.php

示例2: time

<?php

$i_now = time();
$i_dateend = $i_now + 60 * 60 * 24 * 365 * 10 + 60 * 60 * 24 * 3;
if ($g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "tests (test_createdate, test_datestart, test_dateend, test_instructions, test_notes) VALUES(" . $i_now . ", " . $i_now . ", " . $i_dateend . ", '', '')") === false) {
    showDBError(__FILE__, 1);
}
$i_testid = (int) $g_db->Insert_ID($srv_settings['table_prefix'] . 'tests', 'testid');
gotoLocation('test-manager.php?testid=' . $i_testid . '&action=settings');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:9,代码来源:test-manager-4.inc.php

示例3: signoutUser

<?php 
require_once "inc/init.inc.php";
signoutUser();
gotoLocation('http://localhost/e-learning-website/index.php?option=com_wrapper&view=wrapper&Itemid=15');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:4,代码来源:signout.php

示例4: count

            $G_SESSION['yt_questionno'] = count($i_answered_questionids) + 1;
            $G_SESSION['yt_got_answers'] = $i_got_answers;
            $G_SESSION['yt_got_points'] = $i_got_points;
            $G_SESSION['yt_points_pending'] = $i_points_pending;
            $G_SESSION['yt_state'] = TEST_STATE_QSHOW;
            gotoLocation('test.php');
        } else {
            setCookieVar('pending_test_ids', '');
            setCookieVar('pending_test_result_ids', '');
            include_once $DOCUMENT_PAGES . 'home.inc.php';
        }
        exit;
    }
}
unregisterTestData();
if ($f_testid) {
    if (initATest($f_testid)) {
        setCookieVar('pending_test_ids', (string) $G_SESSION['testid']);
        setCookieVar('pending_test_result_ids', (string) $G_SESSION['resultid']);
        if ($G_SESSION['yt_state'] == TEST_STATE_TESTINTRO) {
            gotoLocation('test.php?action=instructions&testid=' . $f_testid);
        } else {
            gotoLocation('test.php');
        }
    } else {
        include_once $DOCUMENT_PAGES . 'home.inc.php';
    }
} else {
    $g_vars['page']['errors'] = $lngstr['err_no_test_selected'];
    include_once $DOCUMENT_PAGES . 'home.inc.php';
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-3.inc.php

示例5: showDBError

if ($i_rSet2 = $g_db->Execute("SELECT subjectid FROM " . $srv_settings['table_prefix'] . "subjects WHERE subjectid={$f_subjectid}")) {
    $sql_subject_exists = $i_rSet2->RecordCount() > 0;
} else {
    $sql_subject_exists = false;
}
if (!$sql_subject_exists) {
    $g_vars['page']['errors'] .= $lngstr['err_subject_doesnotexist'];
}
$strQrySet = "test_type=" . $f_test_type . ", subjectid=" . $f_subjectid . ", gscaleid=" . $f_gscaleid . ", rtemplateid=" . $f_rtemplateid . ", test_reportgradecondition=" . $f_test_reportgradecondition . ", result_etemplateid=" . $f_result_etemplateid . ", test_name=" . $f_test_name . ", test_code=" . $f_test_code . ", test_description=" . $f_test_description . ", test_time=" . $nTestTime . ", test_timeforceout={$f_test_timeforceout}, test_attempts={$f_test_attempts}, test_contentprotection={$f_test_contentprotection}, test_shuffleq={$f_test_shuffleq}, test_shufflea={$f_test_shufflea}, test_qsperpage={$f_test_qsperpage}, test_canreview={$f_test_canreview}, test_showqfeedback={$f_test_showqfeedback}, test_result_showgrade={$f_test_result_showgrade}, test_result_showgradefeedback={$f_test_result_showgradefeedback}, test_result_showanswers={$f_test_result_showanswers}, test_result_showpoints={$f_test_result_showpoints}, test_result_rtemplateid={$f_test_result_rtemplateid}, test_result_showhtml={$f_test_result_showhtml}, test_result_showpdf={$f_test_result_showpdf}, test_result_email={$f_test_result_email}, test_result_emailtouser={$f_test_result_emailtouser}, test_datestart={$f_test_datestart}, test_dateend={$f_test_dateend}, test_instructions={$f_test_instructions}, test_prevtestid={$f_test_prevtestid}, test_nexttestid={$f_test_nexttestid}, test_price={$f_test_price}, test_other_repeatuntilcorrect={$f_test_other_repeatuntilcorrect}, test_notes={$f_test_notes}, test_forall={$f_test_forall}, test_enabled={$f_test_enabled}";
if ($g_vars['page']['errors']) {
    include_once $DOCUMENT_PAGES . "test-manager-2.inc.php";
} else {
    if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests SET " . $strQrySet . " WHERE testid={$f_testid}") === false) {
        showDBError(__FILE__, 1);
    }
    //9917//9917
    if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "groups_tests WHERE testid=" . $f_testid) === false) {
        showDBError(__FILE__, 2);
    }
    foreach ($f_group as $i_groupid => $i_ischecked) {
        if ($i_ischecked) {
            //9917//9917
            $g_db->Execute("INSERT INTO " . $srv_settings['table_prefix'] . "groups_tests (groupid, testid) VALUES (" . $i_groupid . ", " . $f_testid . ")");
        }
    }
    if (isset($_POST['bsubmit2'])) {
        gotoLocation('test-manager.php' . getURLAddon('?action=editt', array('action')));
    } else {
        gotoLocation('test-manager.php' . getURLAddon('', array('action', 'testid')));
    }
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-manager-3.inc.php

示例6: gotoLocation

<?php

include_once $DOCUMENT_PAGES . 'test-saveresults.inc.php';
gotoLocation('test.php?action=results');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:4,代码来源:test-finish.inc.php

示例7: showDBError

if ($i_questiontype == QUESTION_TYPE_ESSAY) {
    if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "results_answers SET result_answer_points=" . $f_points . ", result_answer_iscorrect=" . ($f_notdefined ? IGT_ANSWER_IS_UNDEFINED : ($f_points >= $i_questionpoints ? IGT_ANSWER_IS_CORRECT : ($f_points > 0 ? IGT_ANSWER_IS_PARTIALLYCORRECT : IGT_ANSWER_IS_INCORRECT))) . ", result_answer_feedback=" . $f_feedback . " WHERE resultid=" . $f_resultid . " AND result_answerid=" . $f_answerid) === false) {
        showDBError(__FILE__, 5);
    }
    $i_testpoints_max = 0;
    $i_rSet6 = $g_db->Execute("SELECT result_pointsmax FROM " . $srv_settings['table_prefix'] . "results WHERE resultid=" . $f_resultid);
    if (!$i_rSet6) {
        showDBError(__FILE__, 6);
    } else {
        if (!$i_rSet6->EOF) {
            $i_testpoints_max = $i_rSet6->fields["result_pointsmax"];
        }
        $i_rSet6->Close();
    }
    $i_rSet7 = $g_db->Execute("SELECT SUM(result_answer_points) as testpoints FROM " . $srv_settings['table_prefix'] . "results_answers WHERE resultid=" . $f_resultid);
    if (!$i_rSet7) {
        showDBError(__FILE__, 7);
    } else {
        if (!$i_rSet7->EOF) {
            $i_testpoints_new = $i_rSet7->fields['testpoints'];
        }
        $i_rSet7->Close();
    }
    $i_percents = $i_testpoints_max != 0 ? round($i_testpoints_new / $i_testpoints_max * 100) : 100;
    $i_grade = calcResultGrade($i_gscaleid, $i_percents);
    if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "results SET result_points=" . $i_testpoints_new . ", gscaleid=" . $i_gscaleid . ", gscale_gradeid=" . $i_grade['gradeid'] . " WHERE resultid=" . $f_resultid) === false) {
        showDBError(__FILE__, 9);
    }
}
gotoLocation('reports-manager.php?resultid=' . $f_resultid . '&action=viewq');
开发者ID:skyview059,项目名称:e-learning-website,代码行数:30,代码来源:reports-manager-5.inc.php

示例8: readGetVar

<?php

$f_gscaleid = (int) readGetVar('gscaleid');
$f_gscale_gradeid = (int) readGetVar('gscale_gradeid');
$i_gradecount = getRecordCount($srv_settings['table_prefix'] . 'gscales_grades', "gscaleid=" . $f_gscaleid);
if ($f_gscale_gradeid < $i_gradecount) {
    $g_db->Execute("LOCK TABLES " . $srv_settings['table_prefix'] . "gscales_grades WRITE");
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "gscales_grades SET gscale_gradeid=0 WHERE gscale_gradeid=" . ($f_gscale_gradeid + 1) . " AND gscaleid=" . $f_gscaleid);
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "gscales_grades SET gscale_gradeid=gscale_gradeid+1 WHERE gscale_gradeid=" . $f_gscale_gradeid . " AND gscaleid=" . $f_gscaleid);
    $g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "gscales_grades SET gscale_gradeid=" . $f_gscale_gradeid . " WHERE gscale_gradeid=0 AND gscaleid=" . $f_gscaleid);
    $g_db->Execute("UNLOCK TABLES");
}
gotoLocation('grades.php' . getURLAddon('?action=edit', array('action')));
开发者ID:skyview059,项目名称:e-learning-website,代码行数:13,代码来源:grades-12.inc.php

示例9: 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')));
开发者ID:skyview059,项目名称:e-learning-website,代码行数:11,代码来源:reports-manager-6.inc.php

示例10: readGetVar

<?php

$f_testid = (int) readGetVar('testid');
$f_set = isset($_GET['set']) ? (int) $_GET['set'] : 0;
if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests SET test_enabled={$f_set} WHERE testid={$f_testid}") === false) {
    showDBError(__FILE__, 1);
}
gotoLocation('test-manager.php' . getURLAddon('', array('action', 'testid', 'confirmed', 'set')));
开发者ID:skyview059,项目名称:e-learning-website,代码行数:8,代码来源:test-manager-6.inc.php

示例11: 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);
开发者ID:skyview059,项目名称:e-learning-website,代码行数:14,代码来源:guide.php

示例12: 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) {
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:manageusers-5.inc.php

示例13: foreach

<?php

if (isset($_POST["box_subjects"])) {
    foreach ($_POST["box_subjects"] as $f_subjectid) {
        deletesubject((int) $f_subjectid);
    }
} else {
    $f_subjectid = (int) readGetVar('subjectid');
    deletesubject($f_subjectid);
}
gotoLocation('subjects.php' . getURLAddon('', array('action', 'confirmed')));
function deletesubject($i_subjectid)
{
    global $g_db, $srv_settings;
    if ($i_subjectid > SYSTEM_SUBJECTS_MAX_INDEX) {
        if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "tests SET subjectid=1 WHERE subjectid=" . $i_subjectid) === false) {
            showDBError(__FILE__, 1);
        }
        if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "questions SET subjectid=1 WHERE subjectid=" . $i_subjectid) === false) {
            showDBError(__FILE__, 2);
        }
        if ($g_db->Execute("DELETE FROM " . $srv_settings['table_prefix'] . "subjects WHERE subjectid={$i_subjectid}") === false) {
            showDBError(__FILE__, 3);
        }
    }
}
开发者ID:skyview059,项目名称:e-learning-website,代码行数:26,代码来源:subjects-5.inc.php

示例14: readGetVar

<?php

$f_gscaleid = (int) readGetVar('gscaleid');
$f_gscale_gradeid = (int) readGetVar('gscale_gradeid');
$f_grade_name = readPostVar('grade_name');
$f_grade_name = $g_db->qstr($f_grade_name, get_magic_quotes_gpc());
$f_grade_description = readPostVar('grade_description');
$f_grade_description = $g_db->qstr($f_grade_description, get_magic_quotes_gpc());
$f_grade_feedback = readPostVar('grade_feedback');
$f_grade_feedback = $g_db->qstr($f_grade_feedback, get_magic_quotes_gpc());
$f_grade_from = (double) readPostVar('grade_from');
if ($f_grade_from < 0) {
    $f_grade_from = 0;
}
if ($f_grade_from > 100) {
    $f_grade_from = 100;
}
$f_grade_to = (double) readPostVar('grade_to');
if ($f_grade_to < 0) {
    $f_grade_to = 0;
}
if ($f_grade_to > 100) {
    $f_grade_to = 100;
}
if ($g_db->Execute("UPDATE " . $srv_settings['table_prefix'] . "gscales_grades SET grade_name={$f_grade_name}, grade_description={$f_grade_description}, grade_feedback={$f_grade_feedback}, grade_from='{$f_grade_from}', grade_to='{$f_grade_to}' WHERE gscaleid={$f_gscaleid} AND gscale_gradeid={$f_gscale_gradeid}") === false) {
    showDBError(__FILE__, 2);
}
gotoLocation('grades.php?action=edit&gscaleid=' . $f_gscaleid);
开发者ID:skyview059,项目名称:e-learning-website,代码行数:28,代码来源:grades-8.inc.php

示例15: 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) {
开发者ID:skyview059,项目名称:e-learning-website,代码行数:31,代码来源:test-manager-11.inc.php


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