コード例 #1
0
    }
    
    ?>
    </TR>
    </TABLE>
    <br>
    <?
    # Add the Override instance
    # Add the Override instance
    if ($param) {
        ?>
            <TABLE>
            <TR><TH>SPECIFIC INSTANCE</TH></TR>
        <?
        $totalHosts = get_all_hosts_for_user($_SESSION['user']);
        $totalInstance = get_all_instances ($totalHosts, $param, $appClass);
        if (count($totalInstance)) {
        ?>
        <TD>
            <SELECT  name = "instance[]" multiple size="5">
        <?
            $indInstanceSet = "0";
            foreach ($totalInstance as $indInstance) {

                $indInstance = trim ($indInstance);
                if ($indInstance == "") {
                    next;
                }
                if ($indInstance == $instance) {
                    echo "<OPTION value = \"$indInstance\" SELECTED>$indInstance";
                    $indInstanceSet = "1";
コード例 #2
0
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/
/**
 * filename, brief description, date of creation, by whom
 * @copyright (C) 2005-2010 University of Sydney Digital Innovation Unit.
 * @link: http://HeuristScholar.org
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 * @package Heurist academic knowledge management system
 * @todo
 **/
/* Generate a Heurist API key for a given site */
require_once dirname(__FILE__) . "/../common/connect/applyCredentials.php";
$instances = get_all_instances();
$user_instances = array();
$logged_in = false;
foreach (array_keys($instances) as $instance) {
    if (@$_SESSION[($instance ? $instance . "." : "") . "heurist"]["user_name"]) {
        array_push($user_instances, $instance);
    }
}
if (count($user_instances) == 0) {
    header("Location: " . HEURIST_BASE_URL . "common/connect/login.php?last_uri=" . HEURIST_BASE_URL . "hapi/key.php");
}
if (count($user_instances) == 1 && $user_instances[0] == "" && $_SESSION["heurist"]["user_access"][$instances[""]["admingroup"]] != "admin") {
    header("Location: " . HEURIST_BASE_URL . "common/connect/login.php?last_uri=" . HEURIST_BASE_URL . "hapi/key.php");
}
?>