Example #1
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 {
$user_messages = $userObj->error_msg;
Example #2
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 #3
0
}
/*
 *  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;
$id_course_instance = isset($id_course_instance) ? $id_course_instance : null;
$online_users = ADALoggableUser::get_online_usersFN($id_course_instance, $online_users_listing_mode);
/*
 * Search form (redirects to search.php)
 */
$search_data = array(array('label' => isset($search_label) ? $search_label : null, 'type' => 'text', 'name' => 's_node_name', 'size' => '20', 'maxlength' => '40', 'value' => ""), array('label' => '', 'type' => 'submit', 'name' => 'Submit', 'value' => translateFN('Cerca')), array('label' => '', 'type' => 'hidden', 'name' => 'l_search', 'size' => '20', 'maxlength' => '40', 'value' => isset($node_type) ? $node_type : null));
$fObj = new Form();
$fObj->setForm($search_data);
$search_form = $fObj->getForm();
$banner = (include ROOT_DIR . '/include/banner.inc.php');
//show course istance name if isn't empty - valerio
if (!empty($courseInstanceObj->title)) {
    $course_title .= ' - ' . $courseInstanceObj->title;
}
if ($userObj->tipo == AMA_TYPE_STUDENT && $self_instruction) {
    $user_type = $user_type . ' livello ' . $user_level;
    $user_level = '';
    $layout_dataAr['JS_filename'] = array(ROOT_DIR . '/js/include/menu_functions.js');
}
/*
* Last access link
*/
if (isset($_SESSION['sess_id_course_instance'])) {
Example #4
0
    // 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
//$online_users = User::get_online_usersFN($id_course_instance,$online_users_listing_mode);