Ejemplo n.º 1
0
<?php

require '../includes/config.php';
adminOnly($user->role);
head([]);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $errors = [];
    $error_count = 0;
    if (isset($_POST['actie']) and $_POST['actie'] == 'toevoegen') {
        $name = input($_POST['name']);
        $materials_id = input($_POST['materials_id']);
        $sizes_id = input($_POST['sizes_id']);
        $fonts_id = input($_POST['fonts_id']);
        $colors_id = input($_POST['colors_id']);
        $extras_id = input($_POST['extras_id']);
        $text1_bold = input($_POST['text1_bold']);
        $text1_cursive = input($_POST['text1_cursive']);
        $text2_bold = input($_POST['text2_bold']);
        $text2_cursive = input($_POST['text2_cursive']);
        $text3_bold = input($_POST['text3_bold']);
        $text3_cursive = input($_POST['text3_cursive']);
        $text3_align = input($_POST['text3_align']);
        $text4_bold = input($_POST['text4_bold']);
        $text4_cursive = input($_POST['text4_cursive']);
        $text4_align = input($_POST['text4_align']);
        $text5_bold = input($_POST['text5_bold']);
        $text5_cursive = input($_POST['text5_cursive']);
        $text5_align = input($_POST['text5_align']);
        $text6_bold = input($_POST['text6_bold']);
        $text6_cursive = input($_POST['text6_cursive']);
        $text7_bold = input($_POST['text7_bold']);
Ejemplo n.º 2
0
<?php

// access control
require_once 'loginFunctions.php';
adminOnly();
// only allow tool use when logged in
// needed for this tool
$root = '../';
// gets us to the root
require_once $root . 'Code/shuffleFunctions.php';
// load shuffle functions
// making a place to store all variables (storing inside admin is best because it will be wiped on logout)
$_SESSION['admin']['shuffleTester'] = array();
$store =& $_SESSION['admin']['shuffleTester'];
// save selected file if in URL
if (isset($_GET['shuffleFile'])) {
    $store['loc'] = $root . 'Experiment/' . $_GET['shuffleFile'];
    $store['get'] = $_GET['shuffleFile'];
    $store['name'] = substr($store['loc'], strrpos($store['loc'], '/') + 1);
}
// set defaults if values have not been set
if (!isset($store['loc'])) {
    $store['loc'] = '';
    $store['get'] = '';
    $store['name'] = '';
}
// scan for stimuli and procedure files
$ShuffleFolders = array('Stimuli' => array(), 'Procedure' => array());
foreach ($ShuffleFolders as $type => $empty) {
    $searching = scandir($root . 'Experiment/' . $type . '/');
    foreach ($searching as $item => $path) {