/** @todo check if this function is used */
    static function display_unique_image_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect, $id, $questionId, $ans)
    {
        global $feedback_type;
        $imageType = in_array($answerType, array(UNIQUE_ANSWER, UNIQUE_ANSWER_IMAGE, UNIQUE_ANSWER_NO_OPTION)) ? 'radio' : 'checkbox';
        $image = $imageType . ($studentChoice ? '_on' : '_off');
        $image .= '.gif';
        $imageAnswer = $imageType . ($answerCorrect ? '_on' : '_off');
        $imageAnswer .= '.gif';
        ?>
    <tr>
        <tr>
		<td width="5%">
            <?php 
        Display::display_icon($image);
        ?>
		</td>
		<td width="5%">
            <?php 
        Display::display_icon($imageAnswer);
        ?>
		</td>
        <td width="40%">
            <?php 
        echo $answer;
        ?>
        </td>

        <?php 
        if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
            ?>
        <td width="20%">
            <?php 
            if ($studentChoice) {
                if ($answerCorrect) {
                    $color = 'green';
                    //echo '<span style="font-weight: bold; color: #008000;">'.nl2br(Text::make_clickable($answerComment)).'</span>';
                } else {
                    $color = 'black';
                    //echo '<span style="font-weight: bold; color: #FF0000;">'.nl2br(Text::make_clickable($answerComment)).'</span>';
                }
                echo '<span style="font-weight: bold; color: ' . $color . ';">' . nl2br(Text::make_clickable($answerComment)) . '</span>';
            } else {
                if ($answerCorrect) {
                    //echo '<span style="font-weight: bold; color: #000;">'.nl2br(Text::make_clickable($answerComment)).'</span>';
                } else {
                    //echo '<span style="font-weight: normal; color: #000;">'.nl2br(Text::make_clickable($answerComment)).'</span>';
                }
            }
            ?>
        </td>
        <?php 
            if ($ans == 1) {
                $comm = get_comments($id, $questionId);
            }
            ?>
        <?php 
        } else {
            ?>
        <td>&nbsp;</td>
        <?php 
        }
        ?>
    </tr>
        <?php 
    }
                        </a>
                        <a href="<?php 
            echo api_get_self();
            ?>
?sort=<?php 
            echo $sort;
            ?>
&action=delete_off_session&idChecked=<?php 
            echo $enreg['id'];
            ?>
" onclick="javascript:if(!confirm('<?php 
            echo get_lang('ConfirmYourChoice');
            ?>
')) return false;">
                            <?php 
            Display::display_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL);
            ?>
                        </a>
                    </td>
                </tr>
                <?php 
            $i = $i ? 0 : 1;
            $x++;
        }
        unset($Sessions);
        ?>
        </table>
        <br />
        <div align="left">
            <?php 
        if ($num > $limit) {
$interbreadcrumb[] = array("url" => 'course_list.php', "name" => get_lang('Courses'));
$table_course = Database::get_main_table(TABLE_MAIN_COURSE);
$code = Database::escape_string($_GET['code']);
$sql = "SELECT * FROM {$table_course} WHERE code = '" . $code . "'";
$res = Database::query($sql);
$course = Database::fetch_object($res);
$tool_name = $course->title . ' (' . $course->visual_code . ')';
Display::display_header($tool_name);
?>
    <div class="actions">
        <a href="<?php 
echo api_get_path(WEB_COURSE_PATH) . $course->directory;
?>
">
            <?php 
Display::display_icon('home.png', get_lang('CourseHomepage'), array(), ICON_SIZE_MEDIUM);
?>
        </a>
    </div>
<?php 
echo Display::page_header(get_lang('CourseUsage'));
$id_session = isset($_GET['id_session']) ? $_GET['id_session'] : 0;
$table = new SortableTableFromArray(get_course_usage($course->code, $id_session), 0, 20, 'usage_table');
$table->set_additional_parameters(array('code' => Security::remove_XSS($_GET['code'])));
$table->set_other_tables(array('user_table', 'class_table'));
$table->set_header(0, get_lang('Tool'), true);
$table->set_header(1, get_lang('NumberOfItems'), true);
$table->display();
/**
 * Show all users subscribed in this course
 */
 /**
  *
  * @param array $courses
  * @return bool
  */
 function display_list($courses)
 {
     if (empty($courses)) {
         return false;
     }
     $user_courses = $this->retrieve_user_courses();
     $display_coursecode = api_get_setting('display_coursecode_in_courselist') == 'true';
     $display_teacher = api_get_setting('display_teacher_in_courselist') == 'true';
     echo '<table cellpadding="4">';
     foreach ($courses as $key => $course) {
         $details = array();
         if ($display_coursecode) {
             $details[] = $course['visual_code'];
         }
         if ($display_teacher) {
             $details[] = $course['tutor'];
         }
         $details = implode(' - ', $details);
         $title = $course['title'];
         $href = api_get_path(WEB_COURSE_PATH) . $course['code'] . '/index.php';
         echo '<tr><td><b><a href="' . $href . '">' . "{$title}</a></b><br/>{$details}</td><td>";
         if (!api_is_anonymous()) {
             if ($course['registration_code']) {
                 Display::display_icon('passwordprotected.png', '', array('style' => 'float:left;'));
             }
             $this->display_subscribe_icon($course, $user_courses);
         }
         echo '</td></tr>';
     }
     echo '</table>';
     return true;
 }
            ?>
&course_code=<?php 
            echo urlencode($course_code);
            ?>
&sort=<?php 
            echo $sort;
            ?>
&action=add&idChecked[]=<?php 
            echo $enreg['user_id'];
            ?>
" onclick="javascript:if(!confirm('<?php 
            echo get_lang('ConfirmYourChoice');
            ?>
')) return false;">
                    <?php 
            Display::display_icon('add.png', get_lang('Add'), array(), ICON_SIZE_SMALL);
            ?>
                </a>
            <?php 
        }
        ?>

            </td>
        </tr>
        <?php 
        $i = $i ? 0 : 1;
    }
}
unset($Users);
?>
                    var $courseList = $('<ul>');
                    $.each(response, function (index, course) {
                        $courseList.append('<li><div><strong>' + course.name + '</strong><br>' + course.coachName + '</div></li>');
                    });

                    $container.append($courseList).show(250);
                }
            });
        }, function (e) {
            e.preventDefault();
            var $el = $(this);
            var $container = $el.prev('.course-list');
            $container.hide(250).empty();
            $el.children('img').remove();
            $el.prepend('<?php 
echo Display::display_icon('nolines_plus.gif');
?>
');
        });*/

        var getSessionId = function (el) {
            var parts = el.id.split('_');
            return parseInt(parts[1], 10);
        };

        <?php 
if ($showSessions) {
    ?>
        $('#date').datepicker({
            dateFormat: 'yy-mm-dd'
        });
*/
?>

	<!-- PPT2LP -->
        <div class="chamilo-rapid">
        <div class="row">
            <div class="col-md-12">
                <?php 
echo Display::panel(get_lang('Ppt2lpDescription') . ' ' . get_lang('Ppt2lpVoiceRecordingNeedsRed5'), get_lang('Ppt2lp'));
?>
            </div>
        </div>
            <div class="row">
                <div class="col-md-5">
                    <?php 
Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class' => 'img-responsive'));
?>
                </div>
                <div class="col-md-7">
                    <form method="POST" class="form-horizontal" action="<?php 
echo api_get_self();
?>
">
						<?php 
$form = new FormValidator('ppt2lp');
$form->addElement('text', 'host', get_lang('Host'));
//$form -> addElement('html','<br /><br />');
$form->addElement('text', 'port', get_lang('Port'));
//$form -> addElement('html','<br /><br />');
$form->addElement('text', 'user', get_lang('UserOnHost'));
//$form -> addElement('html','<br /><br />');
Exemplo n.º 8
0
                Display::display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array('align' => 'absmiddle', 'hspace' => '3px'));
                ?>
</th>
                    <th><?php 
                echo get_lang('LatestAttemptAverageScore') . ' ';
                Display::display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array('align' => 'absmiddle', 'hspace' => '3px'));
                ?>
</th>
                    <th><?php 
                echo get_lang('Progress') . ' ';
                Display::display_icon('info3.gif', get_lang('LPProgressScore'), array('align' => 'absmiddle', 'hspace' => '3px'));
                ?>
</th>
                    <th><?php 
                echo get_lang('LastConnexion') . ' ';
                Display::display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array('align' => 'absmiddle', 'hspace' => '3px'));
                ?>
</th>
                    <?php 
                echo '<th>' . get_lang('Details') . '</th>';
                if (api_is_allowed_to_edit()) {
                    echo '<th>' . get_lang('ResetLP') . '</th>';
                }
                ?>
                </tr>
                <?php 
                $i = 0;
                while ($learnpath = Database::fetch_array($rs_lp)) {
                    $lp_id = intval($learnpath['id']);
                    $lp_name = $learnpath['name'];
                    $any_result = false;
Exemplo n.º 9
0
    $usage[] = array(get_lang(ucfirst(TOOL_LINK)), CourseManager::count_rows_course_table($table, $session_id, $course->id));
    // Announcements
    $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
    $usage[] = array(get_lang(ucfirst(TOOL_ANNOUNCEMENT)), CourseManager::count_rows_course_table($table, $session_id, $course->id));
    return $usage;
}
if (!isset($_GET['code'])) {
    api_not_allowed();
}
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array("url" => 'course_list.php', "name" => get_lang('Courses'));
$course_info = api_get_course_info($_GET['code']);
$tool_name = $course_info['title'] . ' (' . $course_info['visual_code'] . ')';
Display::display_header($tool_name);
echo '<div class="actions">';
echo '<a href="' . api_get_path(WEB_COURSE_PATH) . $course_info['directory'] . '">' . Display::display_icon('home.png', get_lang('CourseHomepage'), array(), ICON_SIZE_MEDIUM) . '</a>';
echo '</div>';
echo Display::page_header($tool_name);
echo Display::page_subheader(get_lang('CourseUsage'));
$id_session = isset($_GET['id_session']) ? $_GET['id_session'] : 0;
$table = new SortableTableFromArray(get_course_usage($course_info['code'], $id_session), 0, 20, 'usage_table');
$table->set_additional_parameters(array('code' => Security::remove_XSS($_GET['code'])));
$table->set_other_tables(array('user_table', 'class_table'));
$table->set_header(0, get_lang('Tool'), true);
$table->set_header(1, get_lang('NumberOfItems'), true);
$table->display();
/**
 * Show all users subscribed in this course
 */
echo Display::page_subheader(get_lang('Users'));
$table_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
Exemplo n.º 10
0
                ?>
</a>
                    <a href="<?php 
                echo api_get_self();
                ?>
?category=<?php 
                echo Security::remove_XSS($category);
                ?>
&amp;action=moveUp&amp;id=<?php 
                echo Security::remove_XSS($enreg['code']);
                ?>
&amp;tree_pos=<?php 
                echo $enreg['tree_pos'];
                ?>
"><?php 
                Display::display_icon('up.gif', get_lang('UpInSameLevel'));
                ?>
</a>
                <?php 
                echo $enreg['name'];
                ?>
                    (<?php 
                echo $enreg['children_count'];
                ?>
 <?php 
                echo get_lang('CategoriesNumber');
                ?>
 - <?php 
                echo $enreg['nbr_courses'];
                ?>
 <?php 
Exemplo n.º 11
0
        <td>
        <table>
            <tr>
              <td width="220">
              <table id="smallcalendar" class="data_table">
                  <tr id="title">
                    <td width="10%"><a href="#"><?php 
Display::display_icon('action_prev.png');
?>
</a></td>
                    <td width="80%" colspan="5" align="center"><?php 
echo $months_long[6];
?>
 2010</td>
                    <td width="10%"><a href="#"><?php 
Display::display_icon('action_next.png');
?>
</a></td>
                  </tr>
                  <tr>
                    <td class="weekdays"><?php 
echo $week_days_short[1];
?>
</td>
                    <td class="weekdays"><?php 
echo $week_days_short[2];
?>
</td>
                    <td class="weekdays"><?php 
echo $week_days_short[3];
?>
Exemplo n.º 12
0
            $sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp
    	            WHERE c_id = {$info_course['real_id']}
                    ORDER BY lp.display_order";
        }
        $rs_lp = Database::query($sql_lp);
        if (Database :: num_rows($rs_lp) > 0) {
            ?>
            <!-- LPs-->
            <table class="data_table">
            <tr>
                <th><?php echo get_lang('Learnpaths');?></th>
                <th><?php echo get_lang('Time').' '; Display :: display_icon('info3.gif', get_lang('TotalTimeByCourse'), array ('align' => 'absmiddle', 'hspace' => '3px')); ?></th>
                <th><?php echo get_lang('AverageScore').' '; Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInAllAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th>
                <th><?php echo get_lang('LatestAttemptAverageScore').' '; Display :: display_icon('info3.gif', get_lang('AverageIsCalculatedBasedInTheLatestAttempts'), array ( 'align' => 'absmiddle', 'hspace' => '3px')); ?></th>
                <th><?php echo get_lang('Progress').' '; Display :: display_icon('info3.gif', get_lang('LPProgressScore'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th>
                <th><?php echo get_lang('LastConnexion').' '; Display :: display_icon('info3.gif', get_lang('LastTimeTheCourseWasUsed'), array ('align' => 'absmiddle','hspace' => '3px')); ?></th>
                <?php
                echo '<th>'.get_lang('Details').'</th>';
                if (api_is_allowed_to_edit()) {
                    echo '<th>'.get_lang('ResetLP').'</th>';
                }
                ?>
            </tr>
            <?php

            $i = 0;
            while ($learnpath = Database :: fetch_array($rs_lp)) {

                $lp_id = intval($learnpath['id']);
                $lp_name = $learnpath['name'];
                $any_result = false;
		}
		buttoncheck = 0;
		return " ' . get_lang('All') . ' ";
	}
}
</script>';
$annee = $_GET['annee'];
$composante = $_GET['composante'];
$etape = $_GET['etape'];
$course = $_POST['course'];
// form1 annee = 0; composante= 0 etape = 0
//if ($annee == "" && $composante == "" && $etape == "") {
if (empty($annee) && empty($course)) {
    Display::display_header($tool_name);
    echo '<div style="align:center">';
    Display::display_icon('group.gif', get_lang('LDAPSelectFilterOnUsersOU'));
    echo get_lang('LDAPSelectFilterOnUsersOU');
    //echo '<em>'.get_lang('ToDoThisYouMustEnterYearComponentAndComponentStep').'</em><br />';
    ///echo get_lang('FollowEachOfTheseStepsStepByStep').'<br />';
    echo '<form method="get" action="' . api_get_self() . '"><br />';
    echo '<em>' . get_lang('LDAPOUAttributeFilter') . ' :</em> ';
    echo '<input  type="text" name="annee" size="4" maxlength="30" value="' . $annee_base . '"><br />';
    echo '<input type="submit" value="' . get_lang('Submit') . '">';
    echo '</form>';
    echo '</div>';
} elseif (!empty($annee) && empty($course)) {
    Display::display_header($tool_name);
    echo '<div style="align:center">';
    echo Display::return_icon('course.gif', get_lang('SelectCourseToImportUsersTo')) . ' ' . get_lang('SelectCourseToImportUsersTo') . '<br />';
    echo '<form method="post" action="' . api_get_self() . '?annee=' . Security::remove_XSS($annee) . '"><br />';
    echo '<select name="course">';
Exemplo n.º 14
0
            <!-- notice block -->


                <div class="panel-group" id="notice-block" role="tablist" aria-multiselectable="true">
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingOne">
                            <h4 class="panel-title">
                                <a role="button" data-toggle="collapse" data-parent="#notice-block" href="#notice-list" aria-expanded="true" aria-controls="notice-list">
                                    <?php 
        echo get_lang('Notice');
        ?>
                                    <a class="pull-right" href="<?php 
        echo $selfUrl;
        ?>
?action=edit_notice"><?php 
        Display::display_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL);
        ?>
</a>
                                </a>
                            </h4>
                        </div>
                        <div id="notice-list" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                            <div class="panel-body">
                                <?php 
        $home_notice = '';
        if (file_exists($homep . $noticef . '_' . $lang . $ext)) {
            $home_notice = @(string) file_get_contents($homep . $noticef . '_' . $lang . $ext);
        } else {
            $home_notice = @(string) file_get_contents($homep . $noticef . $ext);
        }
        $home_notice = api_to_system_encoding($home_notice, api_detect_encoding(strip_tags($home_notice)));
/**
 * This function allows the platform admin to choose the default stylesheet
 * @author Patrick Cool <*****@*****.**>, Ghent University
*/
function handle_stylesheets()
{
    global $_configuration;
    // Current style
    $currentstyle = api_get_setting('stylesheets');
    $is_style_changeable = false;
    if ($_configuration['access_url'] != 1) {
        $style_info = api_get_settings('stylesheets', '', 1, 0);
        $url_info = api_get_access_url($_configuration['access_url']);
        if ($style_info[0]['access_url_changeable'] == 1 && $url_info['active'] == 1) {
            $is_style_changeable = true;
            echo '<div class="actions" id="stylesheetuploadlink">';
            Display::display_icon('theme_add.gif');
            echo '<a href="" onclick="document.getElementById(\'newstylesheetform\').style.display = \'block\'; document.getElementById(\'stylesheetuploadlink\').style.display = \'none\';return false; ">' . get_lang('UploadNewStylesheet') . '</a>';
            echo '</div>';
        }
    } else {
        $is_style_changeable = true;
        echo '<div class="actions" id="stylesheetuploadlink">';
        Display::display_icon('theme_add.gif');
        echo '<a href="" onclick="document.getElementById(\'newstylesheetform\').style.display = \'block\'; document.getElementById(\'stylesheetuploadlink\').style.display = \'none\';return false; ">' . get_lang('UploadNewStylesheet') . '</a>';
        echo '</div>';
    }
    $form = new FormValidator('stylesheet_upload', 'post', 'settings.php?category=stylesheets&showuploadform=true');
    $form->addElement('text', 'name_stylesheet', get_lang('NameStylesheet'), array('size' => '40', 'maxlength' => '40'));
    $form->addRule('name_stylesheet', get_lang('ThisFieldIsRequired'), 'required');
    $form->addElement('file', 'new_stylesheet', get_lang('UploadNewStylesheet'));
    $allowed_file_types = array('css');
    $form->addRule('new_stylesheet', get_lang('InvalidExtension') . ' (' . implode(',', $allowed_file_types) . ')', 'filetype', $allowed_file_types);
    $form->addRule('new_stylesheet', get_lang('ThisFieldIsRequired'), 'required');
    $form->addElement('style_submit_button', 'stylesheet_upload', get_lang('Ok'), array('class' => 'save'));
    if ($form->validate() and is_writable(api_get_path(SYS_CODE_PATH) . 'css/')) {
        $values = $form->exportValues();
        $picture_element =& $form->getElement('new_stylesheet');
        $picture = $picture_element->getValue();
        upload_stylesheet($values, $picture);
        Display::display_confirmation_message(get_lang('StylesheetAdded'));
    } else {
        if (!is_writable(api_get_path(SYS_CODE_PATH) . 'css/')) {
            Display::display_error_message(api_get_path(SYS_CODE_PATH) . 'css/' . get_lang('IsNotWritable'));
        } else {
            if ($_GET['showuploadform'] == 'true') {
                echo '<div id="newstylesheetform">';
            } else {
                echo '<div id="newstylesheetform" style="display: none;">';
            }
            // uploading a new stylesheet
            if ($_configuration['access_url'] == 1) {
                $form->display();
            } else {
                if ($is_style_changeable) {
                    $form->display();
                }
            }
            echo '</div>';
        }
    }
    // Preview of the stylesheet
    echo '<div><iframe src="style_preview.php" width="100%" height="300" name="preview"></iframe></div>';
    echo '<form name="stylesheets" method="post" action="' . api_get_self() . '?category=' . Security::remove_XSS($_GET['category']) . '">';
    if ($handle = @opendir(api_get_path(SYS_PATH) . 'main/css/')) {
        $counter = 1;
        while (false !== ($style_dir = readdir($handle))) {
            if (substr($style_dir, 0, 1) == '.') {
                continue;
            }
            $dirpath = api_get_path(SYS_PATH) . 'main/css/' . $style_dir;
            if (is_dir($dirpath)) {
                if ($style_dir != '.' && $style_dir != '..') {
                    if ($currentstyle == $style_dir or $style_dir == 'dokeos_classic' and !$currentstyle) {
                        $selected = 'checked="checked"';
                    } else {
                        $selected = '';
                    }
                    $show_name = get_lang(str_replace(' ', '', ucwords(str_replace('_', ' ', $style_dir))));
                    if ($is_style_changeable) {
                        echo "<input type=\"radio\" name=\"style\" value=\"" . $style_dir . "\" " . $selected . " onClick=\"parent.preview.location='style_preview.php?style=" . $style_dir . "';\"/>";
                        echo '<a href="style_preview.php?style=' . $style_dir . '" target="preview">' . $show_name . '</a>';
                    } else {
                        echo '<a href="style_preview.php?style=' . $style_dir . '" target="preview">' . $show_name . '</a>';
                    }
                    //echo '<div id="Layer'.$counter.'" style="position:relative; width:687px; z-index:2; visibility: hidden;">';
                    //echo '<a href="#" onClick="MM_showHideLayers(\'Layer'.$counter.'\',\'\',\'hide\')">'.get_lang('Close').'</a>';
                    //echo '<iframe src="style_preview.php?style='.$file.'" width="100%" style="float:right;"></iframe></div>';
                    echo "<br />\n";
                    $counter++;
                }
            }
        }
        @closedir($handle);
    }
    if ($is_style_changeable) {
        echo '<button class="save" type="submit" name="submit_stylesheets"> ' . get_lang('SaveSettings') . ' </button></form>';
    }
}
Exemplo n.º 16
0
        <!-- Author image preview -->
        <div id="author_image">
            <div id="author_icon">
                <?php
                if ($_SESSION['oLP']->get_preview_image() != '') {
                    $picture = getimagesize(api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/learning_path/images/'.$_SESSION['oLP']->get_preview_image());
                    $style = null;
                    if ($picture['1'] < 96) {
                        $style = ' style="padding-top:'.((94 -$picture['1'])/2).'px;" ';
                    }
                    $size = ($picture['0'] > 104 && $picture['1'] > 96 )? ' width="104" height="96" ': $style;
                    $my_path = $_SESSION['oLP']->get_preview_image_path();
                    echo '<img src="'.$my_path.'">';
                } else {
                    echo Display :: display_icon('unknown_250_100.jpg');
                }
                ?>
            </div>
            <div id="lp_navigation_elem">
                <?php echo $navigation_bar; ?>
                <div id="progress_bar">
                    <?php echo $progress_bar; ?>
                </div>
            </div>
        </div>
        <!-- end image preview Layout -->

        <div id="author_name">
            <?php echo $_SESSION['oLP']->get_author(); ?>
        </div>
        $renderer =& $form->defaultRenderer();
        $renderer->setHeaderTemplate('');
        $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>');
        $renderer->setCustomElementTemplate('<tr><td>{element}</td></tr>');
        $renderer->setRequiredNoteTemplate('');
        $form->addElement('hidden', 'formSent', '1');
        $default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
        $form->addHtmlEditor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
        $form->addButtonSave(get_lang('Save'));
        $form->setDefaults($default);
        $form->display();
        break;
    default:
        //Form of language
        api_display_language_form();
        echo '&nbsp;&nbsp;<a href="' . api_get_self() . '?action=edit_top">' . Display::display_icon('edit.gif', get_lang('Edit')) . '</a> <a href="' . api_get_self() . '?action=edit_top">' . get_lang('EditNotice') . '</a>';
        $open = '';
        if (file_exists($homep . $topf . '_' . $lang . $ext)) {
            $open = @(string) file_get_contents($homep . $topf . '_' . $lang . $ext);
        } else {
            $open = @(string) file_get_contents($homep . $topf . $ext);
        }
        $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
        if (!empty($open)) {
            echo '<div class="well_border">';
            echo $open;
            echo '</div>';
        }
        $form->display();
        break;
}
		<div id="extension_header_ppt2lp" class="accordion_header">
			<a href="#"><?php 
echo get_lang('Ppt2lp');
?>
</a>
		</div>
		<div id="extension_content_ppt2lp" style="display:none" class="accordion_content">
			<?php 
echo get_lang('Ppt2lpDescription') . ' ' . get_lang('Ppt2lpVoiceRecordingNeedsRed5');
?>
<br /><br />
			<table width="100%">
				<tr>
					<td valign="top" align="center">
						<?php 
Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'));
?>
					</td>
					<td align="center" width="50%">
						<form method="POST" action="<?php 
echo api_get_self();
?>
">
						<?php 
$form = new FormValidator('ppt2lp');
$form->addElement('text', 'host', get_lang('Host'));
$form->addElement('html', '<br /><br />');
$form->addElement('text', 'port', get_lang('Port'));
$form->addElement('html', '<br /><br />');
$form->addElement('text', 'user', get_lang('UserOnHost'));
$form->addElement('html', '<br /><br />');
Exemplo n.º 19
0
    }
    // Create directory
    if (!$is_certificate_mode) {
        ?>
        <a href="<?php 
        echo api_get_self();
        ?>
?<?php 
        echo api_get_cidreq();
        ?>
&id=<?php 
        echo $document_id;
        ?>
&createdir=1">
        <?php 
        Display::display_icon('new_folder.png', get_lang('CreateDir'), '', ICON_SIZE_MEDIUM);
        ?>
</a>
        <?php 
    }
}
$table_footer = '';
$total_size = 0;
if (isset($docs_and_folders) && is_array($docs_and_folders)) {
    if (api_get_group_id() == 0 || (api_is_allowed_to_edit() || GroupManager::is_subscribed(api_get_user_id(), api_get_group_id()) || GroupManager::is_tutor_of_group(api_get_user_id(), api_get_group_id()) || UserManager::is_admin(api_get_user_id()))) {
        // Create a sortable table with our data
        $sortable_data = array();
        $count = 1;
        foreach ($docs_and_folders as $key => $document_data) {
            $row = array();
            $row['id'] = $document_data['id'];
Exemplo n.º 20
0
Display::display_icon('tool_delete.gif', get_lang('recycle_course'));
?>
&nbsp;&nbsp;<a href="../coursecopy/recycle_course.php?<?php 
echo api_get_cidreq();
?>
"><?php 
echo get_lang('recycle_course');
?>
</a></div>
<div class="sectioncomment"><?php 
echo get_lang('DescriptionRecycleCourse');
?>
</div>

<div class="sectiontitle"><?php 
Display::display_icon('delete.gif', get_lang('DelCourse'));
?>
&nbsp;&nbsp;<a href="../course_info/delete_course.php?<?php 
echo api_get_cidreq();
?>
"><?php 
echo get_lang('DelCourse');
?>
</a></div>
<div class="sectioncomment"><?php 
echo get_lang('DescriptionDeleteCourse');
?>
</div>

<?php 
// Footer
Exemplo n.º 21
0
                $edit_link = ' <a href="' . api_get_self() . '?action=edit_tabs&amp;link_index=' . $tab_counter . '" ><span>' . Display::return_icon('edit.gif', get_lang('Edit')) . '</span></a>';
                $delete_link = ' <a href="' . api_get_self() . '?action=delete_tabs&amp;link_index=' . $tab_counter . '"  onclick="javascript: if(!confirm(\'' . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;"><span>' . Display::return_icon('delete.gif', get_lang('Delete')) . '</span></a>';
                $tab_string = str_replace(array('href="' . api_get_path(WEB_PATH) . 'index.php?include=', '</li>'), array('href="' . api_get_path(WEB_CODE_PATH) . 'admin/' . basename(api_get_self()) . '?action=open_link&link=', $edit_link . $delete_link . '</li>'), $enreg);
                $tab_string = str_replace(array('<li>', '</li>', 'class="hide_menu"', 'hide_menu'), '', $tab_string);
                $link_list .= Display::tag('li', $tab_string, array('class' => 'list-group-item'));
                $tab_counter++;
            }
        }
        ?>
            <div class="actions">
		<a href="<?php 
        echo api_get_self();
        ?>
?action=insert_tabs">
                    <?php 
        Display::display_icon('addd.gif', get_lang('InsertLink'));
        echo get_lang('InsertLink');
        ?>
                </a>
            </div>
            <?php 
        echo '<ul id="list-hiperlink" class="list-group">';
        echo $link_list;
        echo '</ul>';
        ?>
        </div>
    </div>
</section>
<?php 
        break;
}
Exemplo n.º 22
0
    }
    echo '</td>';
    echo '	<td>' . $tool_name . '</td>';
    echo '	<td>' . $row['number_of_options'] . '</td>';
    echo '	<td>';
    echo '		<a href="' . api_get_path(WEB_CODE_PATH) . 'survey/question.php?' . api_get_cidreq() . '&amp;action=edit&amp;type=' . $row['type'] . '&amp;survey_id=' . $survey_id . '&amp;question_id=' . $row['question_id'] . '">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>';
    echo '		<a href="' . api_get_path(WEB_CODE_PATH) . 'survey/survey.php?' . api_get_cidreq() . '&amp;action=delete&amp;survey_id=' . $survey_id . '&amp;question_id=' . $row['question_id'] . '" onclick="javascript:if(!confirm(\'' . addslashes(api_htmlentities(get_lang("DeleteSurveyQuestion") . '?', ENT_QUOTES, $charset)) . '\')) return false;">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>';
    if ($question_counter > 1) {
        echo '		<a href="' . api_get_path(WEB_CODE_PATH) . 'survey/survey.php?' . api_get_cidreq() . '&amp;action=moveup&amp;survey_id=' . $survey_id . '&amp;question_id=' . $row['question_id'] . '">' . Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL) . '</a>';
    } else {
        Display::display_icon('up_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
    }
    if ($question_counter < $question_counter_max) {
        echo '		<a href="' . api_get_path(WEB_CODE_PATH) . 'survey/survey.php?' . api_get_cidreq() . '&amp;action=movedown&amp;survey_id=' . $survey_id . '&amp;question_id=' . $row['question_id'] . '">' . Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL) . '</a>';
    } else {
        Display::display_icon('down_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
    }
    echo '	</td>';
    $question_counter++;
    if ($is_survey_type_1) {
        echo '<td>' . ($row['survey_group_pri'] == 0 ? get_lang('Secondary') : get_lang('Primary')) . '</td>';
        echo '<td>' . ($row['survey_group_pri'] == 0 ? $groups[$row['survey_group_sec1']] . '-' . $groups[$row['survey_group_sec2']] : $groups[$row['survey_group_pri']]) . '</td>';
    }
    echo '</tr>';
}
echo '</table>';
if ($is_survey_type_1) {
    echo '<br /><br /><b>' . get_lang('ManageGroups') . '</b><br /><br />';
    if (in_array($_GET['sendmsg'], array('GroupUpdatedSuccessfully', 'GroupDeletedSuccessfully', 'GroupCreatedSuccessfully'))) {
        echo Display::display_confirmation_message(get_lang($_GET['sendmsg']), false);
    }
Exemplo n.º 23
0
                        var $container = $el.prev('.course-list');
                        var $courseList = $('<ul>');
                        $.each(response, function (index, course) {
                            $courseList.append('<li><div><strong>' + course.name + '</strong><br>' + course.coachName + '</div></li>');
                        });

                        $container.append($courseList).show(250);
                    }
                });
            }, function (e) {
                e.preventDefault();
                var $el = $(this);
                var $container = $el.prev('.course-list');
                $container.hide(250).empty();
                $el.children('img').remove();
                $el.prepend('<?php echo Display::display_icon('nolines_plus.gif'); ?>');
            });

            var getSessionId = function (el) {
                var parts = el.id.split('_');
                return parseInt(parts[1], 10);
            };

            <?php if ($showSessions) { ?>
            $('#date').datepicker({
                dateFormat: 'yy-mm-dd'
            });
            <?php } ?>
        });
    </script>
Exemplo n.º 24
0
	//
	var applet = document.getElementById("nanogong");
	var ret = applet.sendGongRequest( "PostToForm", urlnanogong, "voicefile", cookie, "temp");//'PostToForm', postURL, inputname, cookie, filename

	if (ret == null)  {
	    alert(lang_failled_to_submit);
	} else {
	    alert(lang_submitted+"\n"+ret);
	    $("#status").attr('value', '1');
	}
}
</script>

<?php 
echo '<div align="center">';
Display::display_icon('microphone.png', get_lang('PressRecordButton'), '', '128');
echo '<br/>';
echo '<applet id="nanogong" archive="' . api_get_path(WEB_LIBRARY_PATH) . 'nanogong/nanogong.jar" code="gong.NanoGong" width="250" height="95" ALIGN="middle">';
//echo '<param name="ShowRecordButton" value="false" />'; // default true
// echo '<param name="ShowSaveButton" value="false" />'; //you can save in local computer | (default true)
//echo '<param name="ShowSpeedButton" value="false" />'; // default true
//echo '<param name="ShowAudioLevel" value="false" />'; //  it displays the audiometer | (default true)
echo '<param name="ShowTime" value="true" />';
// default false
//echo '<param name="Color" value="#C0E0FF" />'; // default #FFFFFF
//echo '<param name="StartTime" value="10.5" />';
//echo '<param name="EndTime" value="65" />';
echo '<param name="AudioFormat" value="ImaADPCM" />';
// ImaADPCM (more speed), Speex (more compression)|(default Speex)
//echo '<param name="SamplingRate" value="32000" />';//Quality for ImaADPCM (low 8000, medium 11025, normal 22050, hight 44100) OR Quality for Speex (low 8000, medium 16000, normal 32000, hight 44100) | (default 44100)
//echo '<param name="MaxDuration" value="60" />';
Exemplo n.º 25
0
    $result = '<div class="filler-report">' . "\n";
    $result .= '<h3>' . $output[0]['title'] . '</h3>' . "\n";
    $result .= '<table>';
    foreach ($output as $line) {
        $result .= '<tr>';
        $result .= '<td class="filler-report-data-init">' . $line['line-init'] . ' </td><td class="filler-report-data">' . $line['line-info'] . '</td>';
        $result .= '</tr>';
    }
    $result .= '</table>';
    $result .= '</div>';
    Display::display_normal_message($result, false);
}
?>
<div class="well_border">
  <h4><?php 
Display::display_icon('bug.gif', 'DataFiller');
echo ' ' . api_ucfirst(get_lang('DataFiller'));
?>
</h4>
  <div><?php 
echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');
?>
</div>
  <ul>
    <li><a href="filler.php?fill=users"><?php 
echo get_lang('FillUsers');
?>
</a></li>
    <li><a href="filler.php?fill=courses"><?php 
echo get_lang('FillCourses');
?>
Exemplo n.º 26
0
            <!-- up /down icons-->
            <?php if ($key > 0) { ?>
                    <a href="courses.php?action=<?php echo $action; ?>&amp;move=up&amp;course=<?php echo $course['code']; ?>&amp;category=<?php echo $course['user_course_cat']; ?>&amp;sec_token=<?php echo $stok; ?>">
                    <?php echo Display::display_icon('up.png', get_lang('Up'),'',22) ?>
                    </a>
            <?php } else {
                    echo Display::display_icon('up_na.png', get_lang('Up'),'',22);
                  }

                  if ($key < $number_of_courses - 1) { ?>
                    <a href="courses.php?action=<?php echo $action; ?>&amp;move=down&amp;course=<?php echo $course['code']; ?>&amp;category=<?php echo $course['user_course_cat']; ?>&amp;sec_token=<?php echo $stok; ?>">
                    <?php echo Display::display_icon('down.png', get_lang('Down'),'',22); ?>
                    </a>
            <?php } else {
                    echo Display::display_icon('down_na.png', get_lang('Down'),'',22);
                  }?>
                </div>
                 <div style="float:left; margin-right:10px;">
                  <!-- cancel subscrioption-->
            <?php if ($course['status'] != 1) {
                    if ($course['unsubscr'] == 1) {
            ?>
                    <!-- changed link to submit to avoid action by the search tool indexer -->
                    <form action="<?php echo api_get_self(); ?>" method="post" onsubmit="javascript: if (!confirm('<?php echo addslashes(api_htmlentities(get_lang("ConfirmUnsubscribeFromCourse"), ENT_QUOTES, api_get_system_encoding())) ?>')) return false;">
                        <input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
                        <input type="hidden" name="unsubscribe" value="<?php echo $course['code']; ?>" />
                        <button class="btn" value="<?php echo get_lang('Unsubscribe'); ?>" name="unsub">
                            <?php echo get_lang('Unsubscribe'); ?>
                        </button>
                    </form>
Exemplo n.º 27
0
function show_add_form($id = '')
{
    global $MonthsLong;
    $htmlHeadXtra[] = to_javascript();
    // the default values for the forms
    if ($_GET['originalresource'] !== 'no') {
        $day = date('d');
        $month = date('m');
        $year = date('Y');
        $hours = 9;
        $minutes = '00';
        $end_day = date('d');
        $end_month = date('m');
        $end_year = date('Y');
        $end_hours = 17;
        $end_minutes = '00';
        $repeat = false;
    } else {
        // we are coming from the resource linker so there might already have been some information in the form.
        // When we clicked on the button to add resources we stored every form information into a session and now we
        // are doing the opposite thing: getting the information out of the session and putting it into variables to
        // display it in the forms.
        $form_elements = $_SESSION['formelements'];
        $day = $form_elements['day'];
        $month = $form_elements['month'];
        $year = $form_elements['year'];
        $hours = $form_elements['hour'];
        $minutes = $form_elements['minutes'];
        $end_day = $form_elements['end_day'];
        $end_month = $form_elements['end_month'];
        $end_year = $form_elements['end_year'];
        $end_hours = $form_elements['end_hours'];
        $end_minutes = $form_elements['end_minutes'];
        $title = $form_elements['title'];
        $content = $form_elements['content'];
        $id = $form_elements['id'];
        $to = $form_elements['to'];
        $repeat = $form_elements['repeat'];
    }
    //	switching the send to all/send to groups/send to users
    if ($_POST['To']) {
        $day = $_POST['fday'];
        $month = $_POST['fmonth'];
        $year = $_POST['fyear'];
        $hours = $_POST['fhour'];
        $minutes = $_POST['fminute'];
        $end_day = $_POST['end_fday'];
        $end_month = $_POST['end_fmonth'];
        $end_year = $_POST['end_fyear'];
        $end_hours = $_POST['end_fhour'];
        $end_minutes = $_POST['end_fminute'];
        $title = $_POST['title'];
        $content = $_POST['content'];
        // the invisible fields
        $action = $_POST['action'];
        $id = $_POST['id'];
        $repeat = !empty($_POST['repeat']) ? true : false;
    }
    // if the id is set then we are editing an agenda item
    if (is_int($id)) {
        //echo "before get_agenda_item".$_SESSION['allow_individual_calendar'];
        $item_2_edit = get_agenda_item($id);
        $title = $item_2_edit['title'];
        $content = $item_2_edit['content'];
        // start date
        $item_2_edit['start_date'] = api_get_local_time($item_2_edit['start_date']);
        // start date
        list($datepart, $timepart) = split(" ", $item_2_edit['start_date']);
        list($year, $month, $day) = explode("-", $datepart);
        list($hours, $minutes, $seconds) = explode(":", $timepart);
        // end date
        $item_2_edit['end_date'] = api_get_local_time($item_2_edit['end_date']);
        list($datepart, $timepart) = split(" ", $item_2_edit['end_date']);
        list($end_year, $end_month, $end_day) = explode("-", $datepart);
        list($end_hours, $end_minutes, $end_seconds) = explode(":", $timepart);
        // attachments
        //edit_added_resources("Agenda", $id);
        $to = $item_2_edit['to'];
        //echo "<br />after get_agenda_item".$_SESSION['allow_individual_calendar'];
    }
    $content = stripslashes($content);
    $title = stripslashes($title);
    // we start a completely new item, we do not come from the resource linker
    if ($_GET['originalresource'] !== "no" and $_GET['action'] == "add") {
        $_SESSION["formelements"] = null;
    }
    ?>

<!-- START OF THE FORM  -->
<form enctype="multipart/form-data"  action="<?php 
    echo api_get_self() . '?origin=' . Security::remove_XSS($_GET['origin']) . '&amp;action=' . Security::remove_XSS($_GET['action']);
    ?>
" method="post" name="new_calendar_item">
<input type="hidden" name="id" value="<?php 
    if (isset($id)) {
        echo $id;
    }
    ?>
" />
<input type="hidden" name="action" value="<?php 
    if (isset($_GET['action'])) {
        echo Security::remove_XSS($_GET['action']);
    }
    ?>
" />
<input type="hidden" name="sort" value="asc" />
<input type="hidden" name="submit_event" value="ok" />
<?php 
    echo '<legend>';
    echo (isset($id) and $id != '') ? get_lang('ModifyCalendarItem') : get_lang("AddCalendarItem");
    echo '<legend>';
    ?>
<table border="0" cellpadding="5" cellspacing="0" width="80%" id="newedit_form">
	<!-- START date and time -->
<tr>
<div>
<table border="0" width="100%">
				<tr><td colspan="4">
					<div id="err_date" style="display:none;color:red"></div>
					<div id="err_start_date" style="display:none;color:red"></div>
				</td></tr>
				<td width="10%">
					<!-- date: 1 -> 31 -->
					<nobr><?php 
    echo get_lang('StartDate') . ": ";
    ?>
</nobr>
				</td>
				<td width="35%">
					<select name="fday" onchange="javascript:document.new_calendar_item.end_fday.value=this.value;">
							<?php 
    // small loop for filling all the dates
    // 2do: the available dates should be those of the selected month => february is from 1 to 28 (or 29) and not to 31
    foreach (range(1, 31) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        // the current day is indicated with [] around the date
        if ($value == $day) {
            echo " <option value=\"" . $value . "\" selected> " . $i . " </option>";
        } else {
            echo "<option value=\"{$value}\">{$i}</option>";
        }
    }
    ?>
					</select>
					<!-- month: january -> december -->
					<select name="fmonth" onchange="javascript:document.new_calendar_item.end_fmonth.value=this.value;">
					<?php 
    for ($i = 1; $i <= 12; $i++) {
        // values have to have double digits
        if ($i <= 9) {
            $value = "0" . $i;
        } else {
            $value = $i;
        }
        if ($value == $month) {
            echo " <option value=\"" . $value . "\" selected>" . $MonthsLong[$i - 1] . "</option>\n";
        } else {
            echo " <option value=\"" . $value . "\">" . $MonthsLong[$i - 1] . "</option>\n";
        }
    }
    ?>
					</select>
					<select name="fyear" onchange="javascript:document.new_calendar_item.end_fyear.value=this.value;">
										<option value="<?php 
    echo $year - 1;
    ?>
"><?php 
    echo $year - 1;
    ?>
</option>
											<option value="<?php 
    echo $year;
    ?>
" selected="selected"><?php 
    echo $year;
    ?>
</option>
											<?php 
    echo "\n";
    for ($i = 1; $i <= 5; $i++) {
        $value = $year + $i;
        echo "<option value=\"{$value}\">{$value}</option>\n";
    }
    ?>
					</select>
					<a href="javascript:openCalendar('new_calendar_item','f')"><?php 
    Display::display_icon('calendar_select.gif', get_lang('Select'), array('style' => 'vertical-align: middle;'));
    ?>
</a>
					</td>
					<td width="10%">
						<nobr><?php 
    echo get_lang('StartTime') . ": \n";
    ?>
</nobr>
					</td>
					<td>
						<select name="fhour" onchange="javascript:document.new_calendar_item.end_fhour.value=this.value;">
							<!-- <option value="--">--</option> -->
							<?php 
    echo "\n";
    foreach (range(0, 23) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        // the current hour is indicated with [] around the hour
        if ($hours == $value) {
            echo "<option value=\"" . $value . "\" selected> " . $value . " </option>\n";
        } else {
            echo "<option value=\"{$value}\">{$value}</option>\n";
        }
    }
    ?>
						</select>

						<select name="fminute" onchange="javascript:document.new_calendar_item.end_fminute.value=this.value;">
							<!-- <option value="<?php 
    echo $minutes;
    ?>
"><?php 
    echo $minutes;
    ?>
</option> -->
							<!-- <option value="--">--</option> -->
							<?php 
    foreach (range(0, 59) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        if ($minutes == $value) {
            echo "<option value=\"" . $value . "\" selected> " . $value . " </option>";
        } else {
            echo "<option value=\"{$value}\">{$value}</option>";
        }
    }
    ?>
						</select>
					</td>

</div>
</tr>
			<!-- END date and time -->
<tr>
<div>
					<tr><td colspan="4"><div id="err_end_date" style="display:none;color:red"></div></td></tr>
					<td >
							<!-- date: 1 -> 31 -->
							<nobr><?php 
    echo get_lang('EndDate') . ": ";
    ?>
</nobr>
					</td>
					<td  >
						<select name="end_fday">
							<?php 
    // small loop for filling all the dates
    // 2do: the available dates should be those of the selected month => february is from 1 to 28 (or 29) and not to 31
    echo "\n";
    foreach (range(1, 31) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        // the current day is indicated with [] around the date
        if ($value == $end_day) {
            echo " <option value=\"" . $value . "\" selected> " . $i . " </option>\n";
        } else {
            echo " <option value=\"" . $value . "\">" . $i . "</option>\n";
        }
    }
    ?>
						</select>
							<!-- month: january -> december -->
						<select name="end_fmonth">
                            <?php 
    echo "\n";
    foreach (range(1, 12) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        if ($value == $end_month) {
            echo " <option value=\"" . $value . "\" selected>" . $MonthsLong[$i - 1] . "</option>\n";
        } else {
            echo " <option value=\"" . $value . "\">" . $MonthsLong[$i - 1] . "</option>\n";
        }
    }
    ?>
						</select>
						<select name="end_fyear">
                            <option value="<?php 
    echo $end_year - 1;
    ?>
"><?php 
    echo $end_year - 1;
    ?>
</option>
                            <option value="<?php 
    echo $end_year;
    ?>
" selected> <?php 
    echo $end_year;
    ?>
 </option>
                            <?php 
    echo "\n";
    for ($i = 1; $i <= 5; $i++) {
        $value = $end_year + $i;
        echo "<option value=\"{$value}\">{$value}</option>\n";
    }
    ?>
						</select>
						<a href="javascript:openCalendar('new_calendar_item', 'end_f')"><?php 
    Display::display_icon('calendar_select.gif', get_lang('Select'), array('style' => 'vertical-align: middle;'));
    ?>
</a>
					</td>
					<td >
						<nobr><?php 
    echo get_lang('EndTime') . ": \n";
    ?>
</nobr>
					</td>
					<td >
						<select name="end_fhour">
							<!-- <option value="--">--</option> -->
							<?php 
    echo "\n";
    foreach (range(0, 23) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        // the current hour is indicated with [] around the hour
        if ($end_hours == $value) {
            echo "<option value=\"" . $value . "\" selected> " . $value . " </option>\n";
        } else {
            echo "<option value=\"" . $value . "\"> " . $value . " </option>\n";
        }
    }
    ?>
						</select>

						<select name="end_fminute">
							<!-- <option value="<?php 
    echo $end_minutes;
    ?>
"><?php 
    echo $end_minutes;
    ?>
</option> -->
							<!-- <option value="--">--</option> -->
							<?php 
    foreach (range(0, 59) as $i) {
        // values have to have double digits
        $value = $i <= 9 ? '0' . $i : $i;
        if ($minutes == $value) {
            echo "<option value=\"" . $value . "\" selected> " . $value . " </option>";
        } else {
            echo "<option value=\"{$value}\">{$value}</option>";
        }
    }
    ?>
						</select>
						<br>
				</td>
</div>
</tr>
<tr><td colspan="4">
<hr noshade="noshade" color="#cccccc" />
	<div id="err_title" style="display:none;color:red"></div>
</td></tr>
<tr class="subtitle">
		<td colspan="4" valign="top"><?php 
    echo get_lang('ItemTitle');
    ?>
 :
			<!--<div style='margin-left: 80px'><textarea name="title" cols="50" rows="2" wrap="virtual" style="vertical-align:top; width:75%; height:50px;"><?php 
    if (isset($title)) {
        echo $title;
    }
    ?>
</textarea></div>-->
			<input type="text" size="60" name="title" value="<?php 
    if (isset($title)) {
        echo $title;
    }
    ?>
" />
		</td>
	</tr>

	<tr>
		<td colspan="4">

			<?php 
    require_once api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php";
    $oFCKeditor = new FCKeditor('content');
    $oFCKeditor->ToolbarSet = 'GlobalAgenda';
    $oFCKeditor->Width = '100%';
    $oFCKeditor->Height = '175';
    $oFCKeditor->Value = $content;
    $return = $oFCKeditor->CreateHtml();
    echo $return;
    ?>
		</td>
	</tr>
	<!--<?php 
    /* ADDED BY UGENT, Patrick Cool, march 2004 */
    ?>
	<tr>
		<td colspan="4">
	    <?php 
    //onclick="selectAll(this.form.elements[6],true)"
    //				show_addresource_button('onclick="selectAll(this.form.elements[6],true)"');
    ?>
		</td>
	</tr>-->
	<?php 
    //if ($_SESSION['addedresource'])
    echo "<tr>\n";
    echo "<td colspan=\"4\">\n";
    //echo display_resources(0);//--------------------------------------------------------
    $test = $_SESSION['addedresource'];
    echo "</td>\n</tr>\n";
    /* END ADDED BY UGENT, Patrick Cool, march 2004 */
    if (empty($id)) {
        ?>

    <tr>
      <td colspan="4" />
    </tr>
    <?php 
    }
    //only show repeat fields if adding, not if editing
    ?>
	<tr>
		<td colspan="4">
		<?php 
    if ($_GET['action'] == 'edit') {
        $class = 'save';
        $text = get_lang('ModifyEvent');
    } else {
        $class = 'add';
        $text = get_lang('AddEvent');
    }
    ?>
		<button type="button" class="add" value="<?php 
    echo get_lang('Ok');
    ?>
" onclick="validate_date()" ><?php 
    echo $text;
    ?>
</button>

		</td>
	</tr>
</table>
</form>
<?php 
}