$type_selected = null; } if (!isset($object_selected)) { $object_selected = null; } $tool_content .= "\r\n <div class='form-wrapper'>\r\n <form class='form-horizontal' role='form' method='post' action='{$_SERVER['SCRIPT_NAME']}' onsubmit=\"return checkrequired(this, 'antitle');\" style='display:inline'>\r\n <input type='hidden' name='id' value='{$eventToModify}'>\r\n <div class='form-group'>\r\n <label for='newTitle' class='col-sm-2 control-label'>{$langEventTitle}:</label>\r\n <div class='col-sm-10'>\r\n <input class='form-control' type='text' name='newTitle' id='newTitle' value='{$titleToModify}' placeholder='{$langEventTitle}'>\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='newContent' class='col-sm-2 control-label'>{$langEventBody}:</label>\r\n <div class='col-sm-10'>\r\n " . rich_text_editor('newContent', 4, 20, $contentToModify) . "\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='startdate' class='col-sm-2 control-label'>{$langDate}:</label>\r\n <div class='col-sm-10'>\r\n <input class='form-control' type='text' name='startdate' id='startdate' value='{$datetimeToModify}'>\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='duration' class='col-sm-2 control-label'>{$langDuration}:</label>\r\n <div class='col-sm-10'>\r\n <input class='form-control' type='text' name='duration' id='duration' value='{$durationToModify}'>\r\n </div>\r\n </div>"; if (!isset($_GET['modify'])) { $tool_content .= "\r\n <div class='form-group'>\r\n <label for='frequencynumber' class='col-sm-2 control-label'>{$langRepeat} {$langEvery}:</label>\r\n <div class='col-sm-2'>\r\n <select class='form-control' name='frequencynumber' id='frequencynumber'>\r\n <option value='0'>{$langSelectFromMenu}</option>"; for ($i = 1; $i < 10; $i++) { $tool_content .= "<option value=\"{$i}\">{$i}</option>"; } $tool_content .= "</select>\r\n </div>\r\n <div class='col-sm-2'>\r\n <select class='form-control' name='frequencyperiod'>\r\n <option value=''>{$langSelectFromMenu}...</option>\r\n <option value='D'>{$langDays}</option>\r\n <option value='W'>{$langWeeks}</option>\r\n <option value='M'>{$langMonthsAbstract}</option>\r\n </select>\r\n </div>\r\n <label for='enddate' class='col-sm-2 control-label'>{$langUntil}:</label>\r\n <div class='col-sm-2'>\r\n <input class='form-control' type='text' name='enddate' id='enddate' value=''>\r\n </div> \r\n </div>"; } if (!isset($_GET['addAdminEvent']) && !isset($_GET['admin'])) { $eventtype = 'personal'; $tool_content .= "\r\n <div class='form-group'>\r\n <label for='startdate' class='col-sm-2 control-label'>{$langReferencedObject}:</label>\r\n <div class='col-sm-10'>\r\n " . References::build_object_referennce_fields($gen_type_selected, $course_selected, $type_selected, $object_selected) . "\r\n </div>\r\n </div>"; } else { $eventtype = 'admin'; $selectedvis = array(0 => "", USER_TEACHER => "", USER_STUDENT => "", USER_GUEST => ""); if (isset($visibility_level)) { $selectedvis[$visibility_level] = "selected"; } $tool_content .= "\r\n <div class='form-group'>\r\n <label for='startdate' class='col-sm-2 control-label'>{$langShowTo}:</label>\r\n <div class='col-sm-10'>\r\n <select class='form-control' name='visibility_level'>\r\n <option value='0' {$selectedvis['0']}>{$langShowToAdminsOnly}</option>\r\n <option value=\"" . USER_TEACHER . "\" " . $selectedvis[USER_TEACHER] . ">{$langShowToAdminsandProfs}</option>\r\n <option value=\"" . USER_STUDENT . "\" " . $selectedvis[USER_STUDENT] . ">{$langShowToAllregistered}</option>\r\n <option value=\"" . USER_GUEST . "\" " . $selectedvis[USER_GUEST] . ">{$langShowToAll}</option>\r\n </select>\r\n </div>\r\n </div>"; } $tool_content .= "\r\n <div class='form-group'>\r\n <div class='col-sm-10 col-sm-offset-2'>\r\n <input class='btn btn-primary' type='submit' name='submitEvent' value='{$langAdd}'>\r\n <a class='btn btn-default' href='index.php'>{$langCancel}</a>\r\n </div>\r\n </div> \r\n </form>\r\n</div>\r\n <form method='POST' action='{$_SERVER['SCRIPT_NAME']}?delete={$eventToModify}&et={$eventtype}' accept-charset='UTF-8' style='display:inline'>\r\n <a class='btn btn-danger' data-toggle='modal' data-target='#confirmAction' data-title='{$langConfirmDelete}' data-message='{$langDelEventConfirm}' data-cancel-txt='{$langCancel}' data-action-txt='{$langDelete}' data-action-class='btn-danger'>{$langDelete}</a>\r\n </form> \r\n "; } else { /* display actions toolbar */ $tool_content .= action_bar(array(array('title' => $langAddEvent, 'url' => "{$_SERVER['SCRIPT_NAME']}?addEvent=1", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success'), array('title' => $langAddAdminEvent, 'url' => "{$_SERVER['SCRIPT_NAME']}?addAdminEvent=1", 'icon' => 'fa-plus-circle', 'show' => $is_admin, 'button-class' => 'btn-success', 'level' => 'primary-label'), array('title' => $langiCalExport, 'url' => "icalendar.php", 'icon' => 'fa-calendar', 'level' => 'primary'))); } /* display events */ $day = isset($_GET['day']) ? intval($_GET['day']) : null;
<label for='enddate' class='col-sm-2 control-label'>$langUntil:</label> <div class='col-sm-4'> <div class='input-group'> <input class='form-control' type='text' name='enddate' id='enddate' value='$enddate' type='text' > <div class='input-group-addon'><span class='add-on'><i class='fa fa-calendar fa-fw'></i></span></i></div> </div> </div> </div> </div>"; if (!isset($_GET['addAdminEvent']) && !isset($_GET['admin'])) { $eventtype = 'personal'; $tool_content .= " <div class='form-group'> <label for='startdate' class='col-sm-2 control-label'>$langReferencedObject:</label> <div class='col-sm-10'> " . References::build_object_referennce_fields($gen_type_selected, $course_selected, $type_selected, $object_selected) . " </div> </div>"; } else { $eventtype = 'admin'; $selectedvis = array(0 => "", USER_TEACHER => "", USER_STUDENT => "", USER_GUEST => ""); if (isset($visibility_level)) { $selectedvis[$visibility_level] = "selected"; } $tool_content .= " <div class='form-group'> <label for='startdate' class='col-sm-2 control-label'>$langShowTo:</label> <div class='col-sm-10'> <select class='form-control' name='visibility_level'> <option value=\"" . USER_STUDENT . "\" " . $selectedvis[USER_STUDENT] . ">$langShowToAllregistered</option> <option value=\"" . USER_GUEST . "\" " . $selectedvis[USER_GUEST] . ">$langShowToAll</option>
if (!isset($titleToModify)) { $titleToModify = ""; } if (!isset($gen_type_selected)) { $gen_type_selected = null; } if (!isset($course_selected)) { $course_selected = null; } if (!isset($type_selected)) { $type_selected = null; } if (!isset($object_selected)) { $object_selected = null; } $tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => $_SERVER['SCRIPT_NAME']))) . "\r\n <div class='form-wrapper'>\r\n <form class='form-horizontal' role='form' method='post' action='{$_SERVER['SCRIPT_NAME']}' onsubmit=\"return checkrequired(this, 'antitle');\">\r\n <fieldset>\r\n <div class='form-group'>\r\n <label for='newTitle' class='col-sm-2 control-label'>{$langNoteTitle}:</label>\r\n <div class='col-sm-10'>\r\n <input name='newTitle' type='text' class='form-control' id='newTitle' value='" . q($titleToModify) . "' placeholder='{$langNoteTitle}'>\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='newContent' class='col-sm-2 control-label'>{$langNoteBody}:</label>\r\n <div class='col-sm-10'>\r\n " . rich_text_editor('newContent', 4, 20, $contentToModify) . "\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='refobjgentype' class='col-sm-2 control-label'>{$langReferencedObject}:</label>\r\n <div class='col-sm-10'>\r\n " . References::build_object_referennce_fields($gen_type_selected, $course_selected, $type_selected, $object_selected) . "\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <div class='col-sm-10 col-sm-offset-2'>\r\n <input class='btn btn-primary' type='submit' name='submitNote' value='{$langAdd}'> \r\n <a class='btn btn-default' href='{$_SERVER['SCRIPT_NAME']}'>{$langCancel}</a>\r\n </div>\r\n </div> \r\n <input type='hidden' name='id' value='{$noteToModify}' />\r\n </fieldset>\r\n </form></div>"; } elseif (isset($_GET['nid'])) { $tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => $_SERVER['SCRIPT_NAME']))); $note = Notes::get_note(intval($_GET['nid'])); $navigation[] = array("url" => "{$_SERVER['SCRIPT_NAME']}", "name" => $langNotes); $pageName = q($note->title); $tool_content .= "\r\n <div class='panel panel-action-btn-default'>\r\n <div class='panel-heading'>\r\n <div class='pull-right'>" . action_button(array(array('title' => $langModify, 'url' => "{$_SERVER['SCRIPT_NAME']}?modify={$note->id}", 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?delete={$note->id}", 'confirm' => $langSureToDelNote, 'class' => 'delete', 'icon' => 'fa-times'))) . "</div>\r\n <h3 class='panel-title'>{$note->title}</h3>\r\n </div>\r\n <div class='panel-body'>\r\n <div class='label label-success'>" . claro_format_locale_date($dateFormatLong, strtotime($note->date_time)) . "</div><br><br>\r\n {$note->content}\r\n </div>\r\n </div>"; } else { /* display actions toolbar */ $tool_content .= action_bar(array(array('title' => $langAddNote, 'url' => "{$_SERVER['SCRIPT_NAME']}?addNote=1", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success'))); /* display notes */ //$notelist = isset($_GET['nid']) ? array(Notes::get_note(intval($_GET['nid']))) : Notes::get_user_notes(); if (isset($_GET['course'])) { $cid = course_code_to_id($_GET['course']); $notelist = Notes::get_all_course_notes($cid); } else {