本文整理汇总了PHP中tool_origin函数的典型用法代码示例。如果您正苦于以下问题:PHP tool_origin函数的具体用法?PHP tool_origin怎么用?PHP tool_origin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tool_origin函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
$_POST['definition'][$i] = $addslashes($_POST['definition'][$i]);
$_POST['related_term'][$i] = $addslashes($_POST['related_term'][$i]);
$terms_sql .= "(NULL, {$_SESSION['course_id']}, '{$_POST[word][$i]}', '{$_POST[definition][$i]}', {$_POST[related_term][$i]})";
}
}
}
if ($missing_fields) {
$missing_fields = implode(', ', $missing_fields);
$msg->addError(array('EMPTY_FIELDS', $missing_fields));
}
if (!$msg->containsErrors()) {
$sql = "INSERT INTO %sglossary VALUES {$terms_sql}";
$result = queryDB($sql, array(TABLE_PREFIX), false, false);
$msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
$return_url = $_SESSION['tool_origin']['url'];
tool_origin('off');
header('Location: ' . $return_url);
exit;
}
$_GET['pcid'] = $_POST['pcid'];
}
$onload = 'document.form.title0.focus();';
unset($word);
$num_terms = 1;
$sql = "SELECT * FROM %sglossary WHERE course_id=%d ORDER BY word";
$rows_g = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id']));
require AT_INCLUDE_PATH . 'header.inc.php';
$savant->assign('rows_g', $rows_g);
$savant->assign('num_terms', $num_terms);
$savant->display('instructor/glossary/add.tmpl.php');
require AT_INCLUDE_PATH . 'footer.inc.php';
示例2: define
<?php
define('AT_INCLUDE_PATH', '../../../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
tool_origin();
$sql = "SELECT forum_id, title FROM %sforums";
$rows_forums = queryDB($sql, array(TABLE_PREFIX));
if (count($rows_forums) == 0) {
$msg->addInfo('NO_FORUMS');
require AT_INCLUDE_PATH . 'header.inc.php';
exit;
}
require AT_INCLUDE_PATH . 'header.inc.php';
?>
<form name='forumExp' action='send_zip_archive.php' method='post'>
<div class='input-form'>
<div class='row'>
<h3><?php
echo _AT('farchive_select_forum');
?>
</h3>
</div>
<div class='row'>
<select name='selForum' id='selForum'>
<?php
$course_id = $_SESSION['course_id'];
// ---Get course forums for the specific course id
$courseOptions = "";
示例3: define
/****************************************************************/
/* ATutor */
/****************************************************************/
/* Copyright (c) 2002-2010 */
/* Inclusive Design Institute */
/* http://atutor.ca */
/* */
/* This program is free software. You can redistribute it and/or*/
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation. */
/****************************************************************/
// $Id$
define('AT_INCLUDE_PATH', '../../../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
authenticate(AT_PRIV_STYLES);
tool_origin($_SERVER['HTTP_REFERER']);
if (isset($_POST['up'])) {
$up = key($_POST['up']);
$_new_modules = array();
if (isset($_POST['main'])) {
foreach ($_POST['main'] as $m) {
if ($m == $up) {
$last_m = array_pop($_new_modules);
$_new_modules[] = $m;
$_new_modules[] = $last_m;
} else {
$_new_modules[] = $m;
}
}
$_POST['main'] = $_new_modules;
}