예제 #1
0
}
// error_log("REQ = " . print_r($_REQUEST, true));
$slice_name = NULL;
$project_id = NULL;
$message = NULL;
$slice_description = '';
include "tool-lookupids.php";
if (array_key_exists("slice_name", $_REQUEST)) {
    $slice_name = $_REQUEST['slice_name'];
}
if (array_key_exists("slice_description", $_REQUEST)) {
    $slice_description = $_REQUEST['slice_description'];
}
if (is_null($project_id) || $project_id == '') {
    $has_projects = false;
    $project_name = get_users_projects($user);
    $project_id_input = '';
    $show_breadcrumbs = false;
} else {
    $has_projects = true;
    $project_id_input = "<input type='hidden' name='project_id' value='{$project_id}'/>";
    $show_breadcrumbs = true;
}
if (!is_null($slice_name) && $slice_name == '') {
    error_log("createslice: missing slice name from GET");
    $_SESSION['lasterror'] = "Missing slice name: Slice name is required and must be non-empty.";
    $slice_name = NULL;
} else {
    if (!is_null($slice_name) && $slice_name != '' && !is_valid_slice_name($slice_name)) {
        error_log("createslice: invalid slice name from GET: " . $slice_name);
        $_SESSION['lasterror'] = "Invalid slice name '{$slice_name}': Use only alphanumeric plus hyphen (no leading hyphen), and at most 19 characters.";
<?php

/**
 * Licensed to The Apereo Foundation under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for
 * additional information regarding copyright ownership.
 * The Apereo Foundation licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Calls the function from the display library
require_once "../../../config.php";
require_once "../display_library.php";
require_once "../user_library.php";
if (empty($_SESSION['toolkits_logon_id'])) {
    die("Please login");
}
$_SESSION['sort_type'] = $_POST['sort_type'];
$workspace = get_users_projects($_SESSION['sort_type']);
echo $workspace;