Example #1
0
<?php

require_once 'global.php';
require_once '../sources/userIndexClass.php';
$module = new Form();
$module->initForm();
Example #2
0
}
if (!isset($checked_note)) {
    $checked_note = "";
}
if (!isset($checked_all)) {
    $checked_all = "";
}
// vito, 10 june 2009
if ($checked_standard == "" && $checked_note == "" && $checked_all == "") {
    $checked_all = 'checked';
}
$form_dataHa = array(array('label' => translateFN('Nome') . "<br>", 'type' => 'text', 'name' => 's_node_name', 'size' => '20', 'maxlength' => '40', 'value' => $s_node_name), array('label' => translateFN('Keywords') . "<br>", 'type' => 'text', 'name' => 's_node_title', 'size' => '20', 'maxlength' => '40', 'value' => $s_node_title), array('label' => translateFN('Testo') . "<br>", 'type' => 'textarea', 'name' => 's_node_text', 'size' => '40', 'maxlength' => '80', 'value' => $s_node_text), array('label' => '', 'type' => 'submit', 'name' => 'submit', 'value' => translateFN('Cerca')));
$fObj = new Form();
$action = whoami() . ".php";
/*set get method to prevent the confirmation data on back button's browser*/
$fObj->initForm($action, 'GET');
$fObj->setForm($form_dataHa);
$search_form = $fObj->getForm();
$Simple_searchLink = "<a href='search.php'>Ricerca semplice</a>";
/* 6.
recupero informazioni aggiornate relative all'utente
ymdhms: giorno e ora attuali
*/
/*

if ((is_object($userObj)) && (!AMA_dataHandler::isError($userObj))) {
if (empty($userObj->error_msg)){
$user_messages = $userObj->get_messagesFN($sess_id_user);
$user_agenda = $userObj->get_agendaFN($sess_id_user);
}
else {
Example #3
0
    header("Cache-Control: no-store, no-cache, must-revalidate");
    // HTTP/1.1
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    // HTTP/1.0
    //header("Content-Type: text/plain");
    header("Content-Type: text/html");
    //header("Content-Length: ".filesize($name));
    header("Content-Disposition: attachment; filename={$name_tmp}");
    echo $log_text;
    exit;
} else {
    $date = today_dateFN() . " " . today_timeFN() . "\n";
    $log_form = new Form();
    $log_data = array(array('label' => "", 'type' => 'textarea', 'name' => 'log_today', 'rows' => '10', 'cols' => '80', 'wrap' => 'virtual', 'value' => $date), array('label' => "", 'type' => 'hidden', 'name' => 'log_text', 'value' => $log_text), array('label' => '', 'type' => 'submit', 'name' => 'Submit', 'value' => 'Salva'));
    $log_form->initForm("{$http_root_dir}/browsing/mylog.php", "POST", "multipart/form-data");
    $log_form->setForm($log_data);
    $log_data = $log_form->getForm();
    $log_data .= $log_text;
}
$export_log_link = "<a href={$http_root_dir}/browsing/mylog.php?op=export>" . translateFN("Esporta") . "</a><br/>";
// Who's online
// $online_users_listing_mode = 0 (default) : only total numer of users online
// $online_users_listing_mode = 1  : username of users
// $online_users_listing_mode = 2  : username and email of users
$online_users_listing_mode = 2;
$online_users = ADALoggableUser::get_online_usersFN($sess_id_course_instance, $online_users_listing_mode);
/*
 $online_users_listing_mode = 0;

// vito 19 gennaio 2009
Example #4
0
 function add_tag($existing_tagsAr)
 {
     $dh = $GLOBALS['dh'];
     $error = $GLOBALS['error'];
     $sess_id_course = $GLOBALS['sess_id_course'];
     $sess_id_node = $GLOBALS['sess_id_node'];
     $sess_id_user = $GLOBALS['sess_id_user'];
     $debug = $GLOBALS['debug'];
     $existing_tagAr = array('bello', 'interessante', 'confuso', 'dubbio');
     /*	
     		    array(
                               'label'=>'Tag',
                               'type'=>'text',
                               'name'=>'description',
                               'value'=>translateFN('Descrizione del nodo')
                               ),
     */
     $data = array(array('label' => '', 'type' => 'hidden', 'name' => 'id_node', 'value' => $sess_id_node), array('label' => '', 'type' => 'submit', 'name' => 'Submit', 'value' => translateFN('Salva')), array('label' => '', 'type' => 'hidden', 'name' => 'id_user', 'value' => $sess_id_user), array('label' => '', 'type' => 'hidden', 'name' => 'op', 'value' => 'update'));
     // versione con select
     $select_field = array('label' => 'Tag', 'type' => 'select', 'name' => 'booomark_title', 'value' => $existing_tagsAr);
     // versione con input
     $input_field = array('label' => 'Tag', 'type' => 'text', 'name' => 'booomark_title', 'value' => translateFN("Tag"));
     if (!is_array($existing_tagsAr)) {
         array_unshift($data, $input_field);
     } else {
         array_unshift($data, $select_field);
     }
     $f = new Form();
     $f->initForm("tags.php", "POST", "Edit");
     $f->setForm($data);
     $formatted_data .= $f->getForm();
     //."</td></tr>";
     return $formatted_data;
 }
Example #5
0
    $test_db = AMATestDataHandler::instance(MultiPort::getDSN($_SESSION['sess_selected_tester']));
    $res = $test_db->test_getNodes(array('id_nodo_riferimento' => $nodeObj->id));
    if (!empty($res) && count($res) == 1 && !AMA_DataHandler::isError($res)) {
        $node = array_shift($res);
        /*Remove the last item to NavigationHistory to increase the value of back button correctly*/
        $_SESSION['sess_navigation_history']->removeLastItem();
        header('Location: ' . MODULES_TEST_HTTP . '/index.php?id_test=' . $node['id_nodo']);
        exit;
    }
}
// search
// versione con campo UNICO
$l_search = 'standard_node';
$form_dataHa = array(array('label' => translateFN('Parola') . "<br>", 'type' => 'text', 'name' => 's_node_text', 'size' => '20', 'maxlength' => '40', 'value' => isset($s_node_text) ? $s_node_text : null), array('label' => '', 'type' => 'hidden', 'name' => 'l_search', 'value' => isset($l_search) ? $l_search : null), array('label' => '', 'type' => 'submit', 'name' => 'submit', 'value' => translateFN('Cerca')));
$fObj = new Form();
$fObj->initForm("search.php?op=lemma", "POST");
$fObj->setForm($form_dataHa);
$search_form = $fObj->getForm();
/**
* Backurl: if user bookmarked an address and tried to get it directly...
*
 if (isset($_SESSION['sess_backurl'])) {
 unset($_SESSION['sess_backurl']);
 }

 if (!isset($_SESSION['sess_id_user'])) {
 $_SESSION['sess_backurl'] = $_SERVER['REQUEST_URI'];
 header("Location: $http_root_dir"); // to login page
 exit();
 }
*/