Add Display::returnIconPath function instead of using custom /img/ path construction

1.10.x
jmontoya 10 years ago
parent ed12ba1500
commit c762b426da
  1. 8
      main/admin/user_list.php
  2. 6
      main/calendar/agenda_js.php
  3. 7
      main/document/slideshow.php
  4. 10
      main/help/faq.php
  5. 2
      main/inc/lib/api.lib.php
  6. 15
      main/inc/lib/diagnoser.lib.php
  7. 11
      main/inc/lib/display.lib.php
  8. 17
      main/inc/lib/formvalidator/FormValidator.class.php
  9. 17
      main/inc/lib/myspace.lib.php
  10. 2
      main/inc/lib/sessionmanager.lib.php
  11. 11
      main/inc/lib/tracking.lib.php
  12. 4
      main/inc/lib/usergroup.lib.php
  13. 4
      main/install/index.php
  14. 3
      main/mySpace/myStudents.php
  15. 4
      main/mySpace/student.php
  16. 18
      main/newscorm/learnpath.class.php
  17. 2
      main/social/group_topics.php
  18. 2
      main/social/group_view.php
  19. 2
      main/upload/form.scorm.php
  20. 6
      main/upload/upload_word.php

@ -73,21 +73,21 @@ function active_user(element_div) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$(ident).attr("src","'.api_get_path(WEB_IMG_PATH).'loading1.gif'.'"); }, //candy eye stuff
$(ident).attr("src","'.Display::returnIconPath('loading1.gif').'"); }, //candy eye stuff
type: "GET",
url: "'.api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=active_user",
data: "user_id="+user_id[1]+"&status="+status,
success: function(data) {
if (data == 1) {
$(ident).attr("src","'.api_get_path(WEB_IMG_PATH).'icons/16/accept.png'.'");
$(ident).attr("src", "'.Display::returnIconPath('accept.png').'");
$(ident).attr("title","'.get_lang('Lock').'");
}
if (data == 0) {
$(ident).attr("src","'.api_get_path(WEB_IMG_PATH).'icons/16/error.png'.'");
$(ident).attr("src","'.Display::returnIconPath('error.png').'");
$(ident).attr("title","'.get_lang('Unlock').'");
}
if (data == -1) {
$(ident).attr("src","'.api_get_path(WEB_IMG_PATH).'icons/16/warning.png'.'");
$(ident).attr("src", "'.Display::returnIconPath('warning.png').'");
$(ident).attr("title","'.get_lang('ActionNotAllowed').'");
}
}

@ -144,9 +144,9 @@ if ($region_value == 'en') {
}
$tpl->assign('region_value', $region_value);
$export_icon = api_get_path(WEB_IMG_PATH).'img/export.png';
$export_icon_low = api_get_path(WEB_IMG_PATH).'img/export_low_fade.png';
$export_icon_high = api_get_path(WEB_IMG_PATH).'img/export_high_fade.png';
$export_icon = Display::return_icon('export.png', null, null, null, null, true, false);
$export_icon_low = Display::return_icon('export_low_fade.png', null, null, null, null, true, false);
$export_icon_high = Display::return_icon('export_high_fade.png', null, null, null, null, true, false);
$tpl->assign(
'export_ical_confidential_icon',

@ -72,11 +72,12 @@ if ($slide_id != 'all') {
// Back forward buttons
if ($slide == 0) {
$imgp = 'action_prev_na.png';
$first = '<img src="'.api_get_path(WEB_IMG_PATH).'action_first_na.png">';
$first = Display::return_icon('action_first_na.png');
} else {
$imgp = 'action_prev.png';
$first = '<a href="slideshow.php?slide_id=0&curdirpath='.$pathurl.'">
<img src="'.api_get_path(WEB_IMG_PATH).'action_first.png" title="'.get_lang('FirstSlide').'" alt="'.get_lang('FirstSlide').'"></a>';
'.Display::return_icon('action_first.png', get_lang('FirstSlide')).'
</a>';
}
// First slide
@ -176,7 +177,7 @@ if ($slide_id == 'all') {
$jpg_quality = 75; // from 0 to 100 (default is 75). More quality less compression
$directory_thumbnails = $sys_course_path.$_course['path'].'/document'.$folder.'.thumbs/';
//Other parameters only for show tumbnails
$row_items = 4;//only in slideshow.php
$number_image = 7;//num icons cols to show

@ -13,7 +13,7 @@ $help_name = isset($_GET['open']) ? Security::remove_XSS($_GET['open']) : null;
Display :: display_header(get_lang('Faq'));
if (api_is_platform_admin()) {
echo '&nbsp;<a href="faq.php?edit=true"><img src="'.api_get_path(WEB_IMG_PATH).'edit.png" /></a>';
echo '&nbsp;<a href="faq.php?edit=true">'.Display::return_icon('edit.png').'</a>';
}
echo Display::page_header(get_lang('Faq'));
@ -21,7 +21,13 @@ echo Display::page_header(get_lang('Faq'));
$faq_file = 'faq.html';
if (!empty($_GET['edit']) && $_GET['edit'] == 'true' && api_is_platform_admin()) {
$form = new FormValidator('set_faq', 'post', 'faq.php?edit=true');
$form->addHtmlEditor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300'));
$form->addHtmlEditor(
'faq_content',
null,
false,
false,
array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300')
);
$form->addButtonSave(get_lang('Ok'), 'faq_submit');
$faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/faq.html');
$faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));

@ -1888,7 +1888,7 @@ function api_format_course_array($course_data)
if (file_exists(api_get_path(SYS_COURSE_PATH).$course_data['directory'].'/course-pic.png')) {
$url_image = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/course-pic.png';
} else {
$url_image = Display::return_icon('session_default.png', null, null, null, null, true, false);
$url_image = Display::returnIconPath('session_default.png');
}
$_course['course_image_large'] = $url_image;

@ -352,7 +352,16 @@ class Diagnoser
/**
* Additional functions needed for fast integration
*/
public function build_setting($status, $section, $title, $url, $current_value, $expected_value, $formatter, $comment, $img_path = null) {
public function build_setting(
$status,
$section,
$title,
$url,
$current_value,
$expected_value,
$formatter,
$comment
) {
switch ($status) {
case self :: STATUS_OK :
$img = 'bullet_green.png';
@ -368,11 +377,7 @@ class Diagnoser
break;
}
if (! $img_path) {
$img_path = api_get_path(WEB_IMG_PATH);
}
$image = Display::return_icon($img, $status);
//$image = '<img src="' . $img_path . $img . '" alt="' . $status . '" />';
$url = $this->get_link($title, $url);
$formatted_current_value = $current_value;

@ -696,6 +696,17 @@ class Display
echo self::return_icon($image, $alt_text, $additional_attributes, $size);
}
/**
* Gets the path of an icon
*
* @param string $icon
* @return string
*/
public static function returnIconPath($icon)
{
return Display::return_icon($icon, null, null, null, null, true, false);
}
/**
* This public function returns the htmlcode for an icon
*

@ -851,7 +851,7 @@ EOT;
$label = get_lang('PleaseStandBy');
}
$this->with_progress_bar = true;
$this->updateAttributes("onsubmit=\"javascript: myUpload.start('dynamic_div','" . api_get_path(WEB_IMG_PATH) . "progress_bar.gif','" . $label . "','" . $this->getAttribute('id') . "')\"");
$this->updateAttributes("onsubmit=\"javascript: myUpload.start('dynamic_div','".Display::returnIconPath('progress_bar.gif')."','" . $label . "','" . $this->getAttribute('id') . "')\"");
$this->addElement('html', '<script language="javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/upload.js" type="text/javascript"></script>');
$this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . (abs(intval($delay)) * 1000) . ');</script>');
}
@ -882,12 +882,13 @@ EOT;
// Add div-element where the progress bar is to be displayed
$this->addElement('html', '
<div id="dynamic_div_container" style="display:none">
<div id="dynamic_div_label">' . get_lang('UploadFile') . '</div>
<div id="dynamic_div_frame" style="width:214px; height:12px; border:1px solid grey; background-image:url(' . api_get_path(WEB_IMG_PATH) . 'real_upload_frame.gif);">
<div id="dynamic_div_filled" style="width:0%;height:100%;background-image:url(' . api_get_path(WEB_IMG_PATH) . 'real_upload_step.gif);background-repeat:repeat-x;background-position:center;"></div>
</div>
</div>');
<div id="dynamic_div_container" style="display:none">
<div id="dynamic_div_label">' . get_lang('UploadFile') . '</div>
<div id="dynamic_div_frame" style="width:214px; height:12px; border:1px solid grey; background-image:url(' . Display::returnIconPath('real_upload_frame.gif').');">
<div id="dynamic_div_filled" style="width:0%;height:100%;background-image:url(' . api_get_path(WEB_IMG_PATH) . 'real_upload_step.gif);background-repeat:repeat-x;background-position:center;"></div>
</div>
</div>'
);
if ($wait_after_upload) {
$this->addElement('html', '
@ -896,7 +897,7 @@ EOT;
' . get_lang('SlideshowConversion') . '
</div>
<div id="dynamic_div_waiter_frame">
<img src="' . api_get_path(WEB_IMG_PATH) . 'real_upload_frame.gif" />
'.Display::return_icon('real_upload_frame.gif').'
</div>
</div>
');

@ -463,7 +463,9 @@ class MySpace
$table_row[] = $nb_students;
$table_row[] = $nb_courses;
$table_row[] = $nb_sessions;
$table_row[] = '<a href="session.php?id_coach='.$coaches['user_id'].'"><img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
$table_row[] = '<a href="session.php?id_coach='.$coaches['user_id'].'">
'.Display::return_icon('2rightarrow.png').'
</a>';
$all_datas[] = $table_row;
if ($is_western_name_order) {
@ -2167,7 +2169,8 @@ class MySpace
//set the "from" value to know if I access the Reporting by the chamilo tab or the course link
$table_row[] = '<center><a href="../../tracking/courseLog.php?cidReq=' .$course_code.'&from=myspace&id_session='.$session_id.'">
<img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>
'.Display::return_icon('2rightarrow.png').'
</a>
</center>';
$csv_content[] = array(
api_html_entity_decode($row_course[1], ENT_QUOTES, $charset),
@ -2894,9 +2897,9 @@ class MySpace
}
//TODO add course name
$sql = "SELECT
$sql = "SELECT
a.login_course_date as col0,
u.username as col1,
u.username as col1,
" . (
$is_western_name_order ? "
u.firstname AS col2,
@ -2906,8 +2909,8 @@ class MySpace
u.firstname AS col3,
" ) . "
a.logout_course_date,
c.title,
c.code,
c.title,
c.code,
u.user_id
FROM $track_e_course_access a
INNER JOIN $user u ON a.user_id = u.user_id
@ -2922,7 +2925,7 @@ class MySpace
$sql .= " LIMIT $from,$numberItems";
$result = Database::query($sql);
//$clicks = Tracking::get_total_clicks_by_session();
//$clicks = Tracking::get_total_clicks_by_session();
$data = array();
while ($user = Database::fetch_assoc($result)) {

@ -3157,7 +3157,7 @@ class SessionManager
if (Database::num_rows($result) > 0) {
$sysUploadPath = api_get_path(SYS_UPLOAD_PATH). 'sessions/';
$webUploadPath = api_get_path(WEB_UPLOAD_PATH). 'sessions/';
$imgPath = api_get_path(WEB_IMG_PATH) . 'session_default_small.png';
$imgPath = Display::returnIconPath('session_default_small.png');
$tableExtraFields = Database::get_main_table(TABLE_EXTRA_FIELD);
$sql = "SELECT id FROM " . $tableExtraFields . "

@ -955,22 +955,22 @@ class Tracking
if ($origin != 'tracking') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
<img src="' . Display::returnIconPath('quiz_na.gif').'" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
</td>';
} else {
$output .= '<td>
<a href="../exercice/exercise_show.php?origin=' . $origin . '&id=' . $my_exe_id . '&cidReq=' . $courseCode . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
<img src="' . Display::returnIconPath('quiz.gif').'" alt="' . get_lang('ShowAttempt') . '" title="' . get_lang('ShowAttempt') . '">
</a></td>';
}
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz_na.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></td>';
<img src="' . Display::returnIconPath('quiz_na.gif').'" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></td>';
} else {
$output .= '<td>
<a href="../exercice/exercise_show.php?cidReq=' . $courseCode . '&origin=correct_exercise_in_lp&id=' . $my_exe_id . '" target="_parent">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></a></td>';
<img src="' . Display::returnIconPath('quiz.gif').'" alt="' . get_lang('ShowAndQualifyAttempt') . '" title="' . get_lang('ShowAndQualifyAttempt') . '"></a></td>';
}
}
}
@ -1579,7 +1579,8 @@ class Tracking
$last_login_date = api_convert_and_format_date($last_login_date, DATE_FORMAT_SHORT);
$icon = api_is_allowed_to_edit() ?
'<a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'&cidReq='.$courseInfo['code'].'" title="'.get_lang('RemindInactiveUser').'">
<img src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" /> </a>'
'.Display::return_icon('messagebox_warning.gif').'
</a>'
: null;
return $icon. Display::label($last_login_date, 'warning');
} else {

@ -1371,7 +1371,7 @@ class UserGroup extends Model
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = api_get_path(WEB_IMG_PATH).$picture_file;
$picture['file'] = Display::returnIconPath($picture_file);
return $picture;
}
@ -1409,7 +1409,7 @@ class UserGroup extends Model
if (file_exists($file) && !is_dir($file)) {
$picture['file'] = $image_array['dir'].$picture_file;
} else {
$picture['file'] = api_get_path(WEB_IMG_PATH).'unknown_group.png';
$picture['file'] = Display::returnIconPath('unknown_group.png');
}
}
return $picture;

@ -343,10 +343,10 @@ if ($encryptPassForm == '1') {
$(".advanced_parameters").click(function() {
if ($("#id_contact_form").css("display") == "none") {
$("#id_contact_form").css("display","block");
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_hide.gif" alt="<?php echo get_lang('Hide') ?>" title="<?php echo get_lang('Hide')?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo Display::returnIconPath('div_hide.gif'); ?>" alt="<?php echo get_lang('Hide') ?>" title="<?php echo get_lang('Hide')?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
} else {
$("#id_contact_form").css("display","none");
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo api_get_path(WEB_IMG_PATH) ?>div_show.gif" alt="<?php echo get_lang('Show') ?>" title="<?php echo get_lang('Show') ?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
$("#img_plus_and_minus").html('&nbsp;<img src="<?php echo Display::returnIconPath('div_show.gif'); ?>" alt="<?php echo get_lang('Show') ?>" title="<?php echo get_lang('Show') ?>" style ="vertical-align:middle" >&nbsp;<?php echo get_lang('ContactInformation') ?>');
}
});
});

@ -1063,7 +1063,8 @@ if (!empty($student_id)) {
$id_last_attempt = Database :: result($result_last_attempt, 0, 0);
if ($count_attempts > 0)
echo '<a href="../exercice/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'">
<img src="' . api_get_path(WEB_IMG_PATH) . 'quiz.gif" border="0" /> </a>';
'.Display::return_icon('quiz.gif').'
</a>';
}
echo '</td>';

@ -159,10 +159,10 @@ function get_users($from, $limit, $column, $direction)
if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
$detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'">
<img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
'.Display::return_icon('2rightarrow.png').'</a>';
} else {
$detailsLink = '<a href="myStudents.php?student='.$student_id.'">
<img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
'.Display::return_icon('2rightarrow.png').'</a>';
}
$lostPasswordLink = '';

@ -8727,18 +8727,18 @@ class learnpath
function toggle_tool(tool, id){
if(document.getElementById(tool+"_"+id+"_content").style.display == "none"){
document.getElementById(tool+"_"+id+"_content").style.display = "block";
document.getElementById(tool+"_"+id+"_opener").src = "' . api_get_path(WEB_IMG_PATH) . 'remove.gif";
document.getElementById(tool+"_"+id+"_opener").src = "' . Display::returnIconPath('remove.gif').'";
} else {
document.getElementById(tool+"_"+id+"_content").style.display = "none";
document.getElementById(tool+"_"+id+"_opener").src = "' . api_get_path(WEB_IMG_PATH) . 'add.gif";
document.getElementById(tool+"_"+id+"_opener").src = "'.Display::returnIconPath('add.gif').'";
}
}
</script>
<ul class="lp_resource">
<li class="lp_resource_element">
<img alt="" src="../img/linksnew.gif" style="margin-right:5px;width:16px"/>
<a href="'.api_get_path(REL_CODE_PATH).'link/link.php?'.$courseIdReq.
'&action=addlink&lp_id='.$this->lp_id.'" title="'.get_lang('LinkAdd').'">'.get_lang('LinkAdd').'</a>
<img alt="" src="'.Display::returnIconPath('linksnew.gif').' style="margin-right:5px;width:16px"/>
<a href="'.api_get_path(WEB_CODE_PATH).'link/link.php?'.$courseIdReq.'&action=addlink&lp_id='.$this->lp_id.'" title="'.get_lang('LinkAdd').'">'.
get_lang('LinkAdd').'</a>
</li>';
foreach ($categorizedLinks as $categoryId => $links) {
$linkNodes = null;
@ -8762,7 +8762,7 @@ class learnpath
'<li>
<a style="cursor:hand" onclick="javascript: toggle_tool(\''.TOOL_LINK.'\','.$categoryId.')"
style="vertical-align:middle">
<img src="'.api_get_path(WEB_IMG_PATH).'add.gif" id="'.TOOL_LINK.'_'.$categoryId.'_opener"
<img src="'.Display::returnIconPath('add.gif').'" id="'.TOOL_LINK.'_'.$categoryId.'_opener"
align="absbottom" />
</a>
<span style="vertical-align:middle">'.Security::remove_XSS($categories[$categoryId]).'</span>
@ -8812,10 +8812,10 @@ class learnpath
function toggle_forum(forum_id){
if(document.getElementById("forum_"+forum_id+"_content").style.display == "none"){
document.getElementById("forum_"+forum_id+"_content").style.display = "block";
document.getElementById("forum_"+forum_id+"_opener").src = "' . api_get_path(WEB_IMG_PATH) . 'remove.gif";
document.getElementById("forum_"+forum_id+"_opener").src = "' . Display::returnIconPath('remove.gif').'";
} else {
document.getElementById("forum_"+forum_id+"_content").style.display = "none";
document.getElementById("forum_"+forum_id+"_opener").src = "' . api_get_path(WEB_IMG_PATH) . 'add.gif";
document.getElementById("forum_"+forum_id+"_opener").src = "' . Display::returnIconPath('add.gif').'";
}
}
</script>';
@ -8828,7 +8828,7 @@ class learnpath
$return .= ' </a>';
$return .= '<img alt="" src="../img/lp_forum.gif" style="margin-right:5px;" title="" />';
$return .= '<a style="cursor:hand" onclick="javascript: toggle_forum(' . $forum['forum_id'] . ')" style="vertical-align:middle">
<img src="' . api_get_path(WEB_IMG_PATH) . 'add.gif" id="forum_' . $forum['forum_id'] . '_opener" align="absbottom" />
<img src="' . Display::returnIconPath('add.gif').'" id="forum_' . $forum['forum_id'] . '_opener" align="absbottom" />
</a>
<a href="' . api_get_self() . '?'.api_get_cidreq().'&action=add_item&type=' . TOOL_FORUM . '&forum_id=' . $forum['forum_id'] . '&lp_id=' . $this->lp_id . '" style="vertical-align:middle">' .
Security :: remove_XSS($forum['forum_title']) . '</a>';

@ -134,7 +134,7 @@ function add_image_form() {
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.api_get_path(WEB_IMG_PATH).'delete.gif\"></a>";
document.getElementById("filepath_"+counter_image).innerHTML = "<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />&nbsp;<a href=\"javascript:remove_image_form("+id_elem1+")\"><img src=\"'.Display::returnIconPath('delete.gif').'\"></a>";
if (filepaths.childNodes.length == 3) {
var link_attach = document.getElementById("link-more-attach");

@ -65,7 +65,7 @@ function add_image_form() {
document.getElementById("filepath_"+counter_image).innerHTML = "\n\
<input type=\"file\" name=\"attach_"+counter_image+"\" size=\"20\" />\n\
<a href=\"javascript:remove_image_form("+id_elem1+")\">\n\
<img src=\"' . api_get_path(WEB_IMG_PATH) . 'delete.gif\">\n\
<img src=\"' . Display::returnIconPath('delete.gif').'\">\n\
</a>\n\
";

@ -59,7 +59,7 @@ $form = new FormValidator(
)
);
$form->addElement('header', $nameTools);
$form->addLabel(null, Display::img(api_get_path(WEB_IMG_PATH).'scorm_logo.jpg'));
$form->addLabel(null, Display::return_icon('scorm_logo.jpg', null, ['style' => 'width:230px;height:100px']));
$form->addElement('hidden', 'curdirpath', $path);
$form->addElement('hidden', 'tool', $my_tool);
$form->addElement('file', 'user_file', get_lang('FileToUpload'));

@ -112,10 +112,12 @@ $s_style_error="border-width: 1px;
color: #000;";
echo '<div style="'.$s_style.'"><div style="float:left; margin-right:10px;"><img src="'.api_get_path(WEB_IMG_PATH)."message_normal.gif".'" alt="'.$alt_text.'" '.$attribute_list.' /></div><div style="margin-left: 43px">'.$message.'</div></div>';
echo '<div style="'.$s_style.'"><div style="float:left; margin-right:10px;">
<img src="'.Display::returnIconPath('message_normal.gif').'" alt="'.$alt_text.'" '.$attribute_list.' /></div><div style="margin-left: 43px">'.$message.'</div></div>';
if (!empty($errorMessage)) {
echo '<div style="'.$s_style_error.'"><div style="float:left; margin-right:10px;"><img src="'.api_get_path(WEB_IMG_PATH)."message_error.gif".'" alt="'.$alt_text.'" '.$attribute_list.' /></div><div style="margin-left: 43px">'.$errorMessage.'</div></div>';
echo '<div style="'.$s_style_error.'"><div style="float:left; margin-right:10px;">
<img src="'.Display::returnIconPath('message_error.gif').'" alt="'.$alt_text.'" '.$attribute_list.' /></div><div style="margin-left: 43px">'.$errorMessage.'</div></div>';
}
$form = new FormValidator('update_course', 'POST', '', '', 'style="margin: 0;"');

Loading…
Cancel
Save