|
|
|
|
@ -861,9 +861,9 @@ $announcement_number = Database::num_rows($result); |
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
if (empty($_GET['origin']) OR $_GET['origin'] !== 'learnpath') { |
|
|
|
|
echo "\n\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; |
|
|
|
|
echo "<tr>\n"; |
|
|
|
|
echo "<td width=\"20%\" valign=\"top\">\n"; |
|
|
|
|
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; |
|
|
|
|
echo "<tr>"; |
|
|
|
|
echo "<td width=\"20%\" valign=\"top\">"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
@ -871,12 +871,12 @@ if (empty($_GET['origin']) OR $_GET['origin'] !== 'learnpath') { |
|
|
|
|
*/ |
|
|
|
|
//if (!$surveyid) { |
|
|
|
|
if ($display_title_list == true) { |
|
|
|
|
echo "<table>\n"; |
|
|
|
|
echo "<table>"; |
|
|
|
|
while ($myrow = Database::fetch_array($result)) { |
|
|
|
|
$title = $myrow['title']; |
|
|
|
|
$title = Security::remove_XSS($title); |
|
|
|
|
echo "<tr>\n"; |
|
|
|
|
echo "<td width=\"15%\">\n"; |
|
|
|
|
echo "<tr>"; |
|
|
|
|
echo "<td width=\"15%\">"; |
|
|
|
|
if ($myrow['visibility']==0) { |
|
|
|
|
$class="class=\"invisible\""; |
|
|
|
|
} else { |
|
|
|
|
@ -885,18 +885,18 @@ if (empty($_GET['origin']) OR $_GET['origin'] !== 'learnpath') { |
|
|
|
|
//validation when belongs to a session |
|
|
|
|
$session_img = api_get_session_image($myrow['session_id'], $_user['status']); |
|
|
|
|
|
|
|
|
|
echo Display::return_icon('lp_announcement.png', api_convert_and_format_date($myrow['end_date'], DATE_FORMAT_LONG), array('align' => 'absmiddle', 'Width' => '10', 'Height' => '10'))." <a style=\"text-decoration:none\" href=\"announcements.php?".api_get_cidreq()."#".$myrow['id']."\" ".$class.">" . api_trunc_str($title, $length) . "</a>\n" . $session_img; |
|
|
|
|
echo "</td>\n</tr>\n"; |
|
|
|
|
echo Display::return_icon('lp_announcement.png', api_convert_and_format_date($myrow['end_date'], DATE_FORMAT_LONG), array('align' => 'absmiddle', 'Width' => '10', 'Height' => '10'))." <a style=\"text-decoration:none\" href=\"announcements.php?".api_get_cidreq()."#".$myrow['id']."\" ".$class.">" . api_trunc_str($title, $length) . "</a>" . $session_img; |
|
|
|
|
echo "</td></tr>"; |
|
|
|
|
} |
|
|
|
|
echo "</table>\n"; |
|
|
|
|
echo "</table>"; |
|
|
|
|
} // end $display_title_list == true |
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') { |
|
|
|
|
echo "</td>\n"; |
|
|
|
|
echo "<td width=\"20\" background=\"../img/verticalruler.gif\"> </td>\n"; |
|
|
|
|
echo "</td>"; |
|
|
|
|
echo "<td width=\"20\" background=\"../img/verticalruler.gif\"> </td>"; |
|
|
|
|
// START RIGHT PART |
|
|
|
|
echo "<td valign=\"top\">\n"; |
|
|
|
|
echo "<td valign=\"top\">"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
@ -924,7 +924,7 @@ if ($display_form == true) { |
|
|
|
|
$title_to_modify = stripslashes($title_to_modify); |
|
|
|
|
|
|
|
|
|
// DISPLAY ADD ANNOUNCEMENT COMMAND |
|
|
|
|
echo '<form method="post" name="f1" enctype = "multipart/form-data" action="'.api_get_self().'?publish_survey='.Security::remove_XSS($surveyid).'&id='.Security::remove_XSS($_GET['id']).'&db_name='.$db_name.'&cidReq='.Security::remove_XSS($_GET['cidReq']).'" style="margin:0px;">'."\n"; |
|
|
|
|
echo '<form method="post" name="f1" enctype = "multipart/form-data" action="'.api_get_self().'?publish_survey='.Security::remove_XSS($surveyid).'&id='.Security::remove_XSS($_GET['id']).'&db_name='.$db_name.'&cidReq='.Security::remove_XSS($_GET['cidReq']).'" style="margin:0px;">'; |
|
|
|
|
if (empty($_GET['id'])) { |
|
|
|
|
$form_name = get_lang('AddAnnouncement'); |
|
|
|
|
} else { |
|
|
|
|
@ -1291,7 +1291,7 @@ if ($display_announcement_list && !$surveyid) { |
|
|
|
|
$iterator = 1; |
|
|
|
|
$bottomAnnouncement = $announcement_number; |
|
|
|
|
|
|
|
|
|
echo "<table width=\"100%\" class=\"data_table\">\n"; |
|
|
|
|
echo "<table width=\"100%\" class=\"data_table\">"; |
|
|
|
|
|
|
|
|
|
$displayed=array(); |
|
|
|
|
|
|
|
|
|
@ -1324,22 +1324,22 @@ if ($display_announcement_list && !$surveyid) { |
|
|
|
|
|
|
|
|
|
/* THE ICONS */ |
|
|
|
|
|
|
|
|
|
echo "<th>\n"; |
|
|
|
|
echo "<th>"; |
|
|
|
|
// anchoring |
|
|
|
|
echo "<a name=\"".(int)($myrow["id"])."\"></a>\n"; |
|
|
|
|
echo "<a name=\"".(int)($myrow["id"])."\"></a>"; |
|
|
|
|
// User or group icon |
|
|
|
|
if ($myrow['to_group_id']!== '0' and $myrow['to_group_id']!== 'NULL') { |
|
|
|
|
echo Display::return_icon('group.gif', get_lang('AnnounceSentToUserSelection'))."\n"; |
|
|
|
|
echo Display::return_icon('group.gif', get_lang('AnnounceSentToUserSelection')); |
|
|
|
|
} |
|
|
|
|
// the email icon |
|
|
|
|
if ($myrow['email_sent'] == '1') { |
|
|
|
|
echo Display::return_icon('email.gif', get_lang('AnnounceSentByEmail'))."\n"; |
|
|
|
|
echo Display::return_icon('email.gif', get_lang('AnnounceSentByEmail')); |
|
|
|
|
} |
|
|
|
|
echo "</th>\n"; |
|
|
|
|
echo "</th>"; |
|
|
|
|
|
|
|
|
|
/* TITLE */ |
|
|
|
|
|
|
|
|
|
echo "<th>".Security::remove_XSS($title)."</th>\n"; |
|
|
|
|
echo "<th>".Security::remove_XSS($title)."</th>"; |
|
|
|
|
echo "<th>" . get_lang("SentTo") . " : "; |
|
|
|
|
|
|
|
|
|
$sent_to = AnnouncementManager::sent_to('announcement', $myrow['id']); |
|
|
|
|
@ -1348,14 +1348,14 @@ if ($display_announcement_list && !$surveyid) { |
|
|
|
|
|
|
|
|
|
echo ' '.get_lang('By').' : '.str_replace(' ', ' ', api_get_person_name($user_info['firstName'], $user_info['lastName'])); |
|
|
|
|
echo "</th></tr>"; |
|
|
|
|
echo "<tr class='row_odd'>\n<td class=\"announcements_datum\" colspan=\"3\">"; |
|
|
|
|
echo "<tr class='row_odd'><td class=\"announcements_datum\" colspan=\"3\">"; |
|
|
|
|
echo get_lang('AnnouncementPublishedOn')," : ", api_convert_and_format_date($last_post_datetime, DATE_FORMAT_LONG, date_default_timezone_get()); |
|
|
|
|
echo "</td>\n</tr>\n"; |
|
|
|
|
echo "</td></tr>"; |
|
|
|
|
|
|
|
|
|
/* CONTENT */ |
|
|
|
|
|
|
|
|
|
echo "<tr class=\"$text_style\">\n<td colspan=\"3\">\n"; |
|
|
|
|
echo $content."</td>\n</tr>"; |
|
|
|
|
echo "<tr class=\"$text_style\"><td colspan=\"3\">"; |
|
|
|
|
echo $content."</td></tr>"; |
|
|
|
|
|
|
|
|
|
/* RESOURCES */ |
|
|
|
|
|
|
|
|
|
|