本文整理汇总了PHP中Display::display_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::display_icon方法的具体用法?PHP Display::display_icon怎么用?PHP Display::display_icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::display_icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_unique_image_answer
/** @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> </td>
<?php
}
?>
</tr>
<?php
}
示例2: api_get_self
</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) {
示例3: array
$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
*/
示例4: display_list
/**
*
* @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;
}
示例5: urlencode
?>
&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);
?>
示例6: function
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'
});
示例7: get_lang
*/
?>
<!-- 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 />');
示例8: get_lang
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;
示例9: array
$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);
示例10: api_get_self
?>
</a>
<a href="<?php
echo api_get_self();
?>
?category=<?php
echo Security::remove_XSS($category);
?>
&action=moveUp&id=<?php
echo Security::remove_XSS($enreg['code']);
?>
&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
示例11:
<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];
?>
示例12: array
$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;
示例13: get_lang
}
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">';
示例14: get_lang
<!-- 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)));
示例15: handle_stylesheets
/**
* This function allows the platform admin to choose the default stylesheet
* @author Patrick Cool <patrick.cool@UGent.be>, 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>';
}
}