|
|
|
@ -263,91 +263,105 @@ if (is_array($forumCategories)) { |
|
|
|
|
$forumCategory['cat_title'] = get_lang('WithoutCategory'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '<table class="forum_table">'; |
|
|
|
|
echo '<thead>'; |
|
|
|
|
echo '<tr><th class="forum_head" colspan="5">'; |
|
|
|
|
echo '<a href="viewforumcategory.php?'.api_get_cidreq( |
|
|
|
|
).'&forumcategory='.intval( |
|
|
|
|
$forumCategory['cat_id'] |
|
|
|
|
).'" '.class_visible_invisible($forumCategory['visibility']).'>'. |
|
|
|
|
prepare4display($forumCategory['cat_title']).$session_displayed. |
|
|
|
|
'</a>'.$session_img.'<br />'; |
|
|
|
|
if ($forumCategory['cat_comment'] != '' && trim( |
|
|
|
|
$forumCategory['cat_comment'] |
|
|
|
|
) != ' ' |
|
|
|
|
) { |
|
|
|
|
echo '<span class="forum_description">'.prepare4display( |
|
|
|
|
$forumCategory['cat_comment'] |
|
|
|
|
).'</span>'; |
|
|
|
|
} |
|
|
|
|
echo '</th>'; |
|
|
|
|
echo '<th style="vertical-align: top;" align="center" >'; |
|
|
|
|
if (!empty($forumCategory['cat_id'])) { |
|
|
|
|
if (api_is_allowed_to_edit( |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
|
) && !($forumCategory['session_id'] == 0 && intval( |
|
|
|
|
$sessionId |
|
|
|
|
) != 0) |
|
|
|
|
) { |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
).'&action=edit&content=forumcategory&id='.intval( |
|
|
|
|
$forumCategory['cat_id'] |
|
|
|
|
).'">'.Display::return_icon( |
|
|
|
|
'edit.png', |
|
|
|
|
get_lang('Edit'), |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
).'&action=delete&content=forumcategory&id='.intval( |
|
|
|
|
$forumCategory['cat_id'] |
|
|
|
|
)."\" onclick=\"javascript:if(!confirm('".addslashes( |
|
|
|
|
api_htmlentities( |
|
|
|
|
|
|
|
|
|
$html = ''; |
|
|
|
|
$iconsEdit = ''; |
|
|
|
|
$idCategory = $forumCategory['cat_id']; |
|
|
|
|
$urlCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.intval($idCategory); |
|
|
|
|
$titleCategory = Display::tag( |
|
|
|
|
'a', |
|
|
|
|
$forumCategory['cat_title'], |
|
|
|
|
array( |
|
|
|
|
'href' => $urlCategory, |
|
|
|
|
'class' => return_visible_invisible($forumCategory['visibility']) |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$descriptionCategory = $forumCategory['cat_comment']; |
|
|
|
|
|
|
|
|
|
if (!empty($idCategory)){ |
|
|
|
|
if (api_is_allowed_to_edit(false, true) && !($forumCategory['session_id'] == 0 && intval($sessionId) != 0)){ |
|
|
|
|
$iconsEdit.= '<a href="'.api_get_self().'?'.api_get_cidreq() |
|
|
|
|
.'&action=edit&content=forumcategory&id='.intval($idCategory). |
|
|
|
|
'">'.Display::return_icon( |
|
|
|
|
'edit.png', |
|
|
|
|
get_lang('Edit'), |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
).'</a>'; |
|
|
|
|
$iconsEdit.='<a href="'.api_get_self().'?'.api_get_cidreq(). |
|
|
|
|
'&action=delete&content=forumcategory&id='. intval($idCategory). |
|
|
|
|
"\" onclick=\"javascript:if(!confirm('". addslashes(api_htmlentities( |
|
|
|
|
get_lang('DeleteForumCategory'), |
|
|
|
|
ENT_QUOTES |
|
|
|
|
) |
|
|
|
|
)."')) return false;\">".Display::return_icon( |
|
|
|
|
)). |
|
|
|
|
"')) return false;\">". |
|
|
|
|
Display::return_icon( |
|
|
|
|
'delete.png', |
|
|
|
|
get_lang('Delete'), |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
).'</a>'; |
|
|
|
|
display_visible_invisible_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($forumCategory['cat_id'])), |
|
|
|
|
strval(intval($forumCategory['visibility'])) |
|
|
|
|
); |
|
|
|
|
display_lock_unlock_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($forumCategory['cat_id'])), |
|
|
|
|
strval(intval($forumCategory['locked'])) |
|
|
|
|
); |
|
|
|
|
display_up_down_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($forumCategory['cat_id'])), |
|
|
|
|
$forumCategories |
|
|
|
|
); |
|
|
|
|
). |
|
|
|
|
'</a>'; |
|
|
|
|
$iconsEdit .= return_visible_invisible_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($idCategory)), |
|
|
|
|
strval(intval($forumCategory['visibility'])) |
|
|
|
|
); |
|
|
|
|
$iconsEdit .= return_lock_unlock_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($$idCategory)), |
|
|
|
|
strval(intval($forumCategory['locked'])) |
|
|
|
|
); |
|
|
|
|
$iconsEdit .= return_up_down_icon( |
|
|
|
|
'forumcategory', |
|
|
|
|
strval(intval($idCategory)), |
|
|
|
|
$forumCategories |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo '</th>'; |
|
|
|
|
echo '</tr>'; |
|
|
|
|
echo '</thead>'; |
|
|
|
|
|
|
|
|
|
$html .= '<div class="category-forum">'; |
|
|
|
|
$html .= Display::tag( |
|
|
|
|
'div', |
|
|
|
|
$iconsEdit, |
|
|
|
|
array( |
|
|
|
|
'class' => 'pull-right' |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
$icoCategory = Display::return_icon( |
|
|
|
|
'forum_blue.png', |
|
|
|
|
get_lang( |
|
|
|
|
$forumCategory['cat_title'] |
|
|
|
|
), |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_MEDIUM |
|
|
|
|
); |
|
|
|
|
$html .= '<h3>' . $icoCategory . $titleCategory . '</h3>'; |
|
|
|
|
|
|
|
|
|
if ($descriptionCategory != '' && trim($descriptionCategory) != ' ') { |
|
|
|
|
$html .= '<div class="forum-description">'.$descriptionCategory.'</div>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$html .= '</div>'; |
|
|
|
|
echo $html; |
|
|
|
|
|
|
|
|
|
echo '<div class="forum_display">'; |
|
|
|
|
if (!empty($forumsInCategory)) { |
|
|
|
|
|
|
|
|
|
// Step 4: The interim headers (for the forum). |
|
|
|
|
echo '<tr class="forum_header">'; |
|
|
|
|
/* echo '<tr class="forum_header">'; |
|
|
|
|
echo '<td></td>'; |
|
|
|
|
echo '<td>'.get_lang('Forum').'</td>'; |
|
|
|
|
echo '<td>'.get_lang('Topics').'</td>'; |
|
|
|
|
echo '<td>'.get_lang('Posts').'</td>'; |
|
|
|
|
echo '<td>'.get_lang('LastPosts').'</td>'; |
|
|
|
|
echo '<td>'.get_lang('Actions').'</td>'; |
|
|
|
|
echo '</tr>'; |
|
|
|
|
echo '</tr>'; */ |
|
|
|
|
|
|
|
|
|
// Step 5: We display all the forums in this category. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($forum_list as $forum) { |
|
|
|
|
// Here we clean the whatnew_post_info array a little bit because to display the icon we |
|
|
|
|
// test if $whatsnew_post_info[$forum['forum_id']] is empty or not. |
|
|
|
@ -368,6 +382,7 @@ if (is_array($forumCategories)) { |
|
|
|
|
|
|
|
|
|
// Note: This can be speed up if we transform the $forum_list |
|
|
|
|
// to an array that uses the forum_category as the key. |
|
|
|
|
|
|
|
|
|
if (isset($forum['forum_category']) && |
|
|
|
|
$forum['forum_category'] == $forumCategory['cat_id'] |
|
|
|
|
) { |
|
|
|
@ -395,67 +410,53 @@ if (is_array($forumCategories)) { |
|
|
|
|
|
|
|
|
|
if ($show_forum) { |
|
|
|
|
$form_count++; |
|
|
|
|
$mywhatsnew_post_info = isset($whatsnew_post_info[$forum['forum_id']]) ? $whatsnew_post_info[$forum['forum_id']] : null; |
|
|
|
|
$mywhatsnew_post_info = isset($whatsnew_post_info[$forum['forum_id']]) ? |
|
|
|
|
$whatsnew_post_info[$forum['forum_id']] : null; |
|
|
|
|
|
|
|
|
|
$html = '<div class="panel panel-default forum">'; |
|
|
|
|
$html .= '<div class="panel-body">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$forum_image = ''; |
|
|
|
|
$imgForum = ''; |
|
|
|
|
// Showing the image |
|
|
|
|
if (!empty($forum['forum_image'])) { |
|
|
|
|
|
|
|
|
|
$image_path = api_get_path( |
|
|
|
|
WEB_COURSE_PATH |
|
|
|
|
).api_get_course_path( |
|
|
|
|
).'/upload/forum/images/'.$forum['forum_image']; |
|
|
|
|
) . api_get_course_path() . '/upload/forum/images/' . $forum['forum_image']; |
|
|
|
|
$image_size = api_getimagesize($image_path); |
|
|
|
|
|
|
|
|
|
$img_attributes = ''; |
|
|
|
|
if (!empty($image_size)) { |
|
|
|
|
if ($image_size['width'] > 100 || $image_size['height'] > 100) { |
|
|
|
|
//limit display width and height to 100px |
|
|
|
|
$img_attributes = ' style="width:100px" width="100px" height="100px"'; |
|
|
|
|
$td_width = 100; |
|
|
|
|
} else { |
|
|
|
|
$td_width = $image_size['width']; |
|
|
|
|
} |
|
|
|
|
$forum_image = "<img src=\"$image_path\" $img_attributes>"; |
|
|
|
|
//limit display width and height to 100px |
|
|
|
|
$img_attributes = ' style="width:80px" height="80px"'; |
|
|
|
|
$imgForum = "<img src=\"$image_path\" $img_attributes>"; |
|
|
|
|
} else { |
|
|
|
|
$forum_image = ''; |
|
|
|
|
$td_width = 20; |
|
|
|
|
$imgForum = ''; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
echo '<td width="'.$td_width.'px">'; |
|
|
|
|
echo $forum_image; |
|
|
|
|
|
|
|
|
|
$forum_image = $imgForum; |
|
|
|
|
} else { |
|
|
|
|
echo '<td width="20px">'; |
|
|
|
|
if ($forum['forum_of_group'] !== '0') { |
|
|
|
|
if (is_array( |
|
|
|
|
$mywhatsnew_post_info |
|
|
|
|
) && !empty($mywhatsnew_post_info) |
|
|
|
|
) { |
|
|
|
|
echo Display::return_icon( |
|
|
|
|
'forumgroupnew.gif' |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
echo Display::return_icon( |
|
|
|
|
'forumgroup.gif', |
|
|
|
|
get_lang('GroupForum') |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($forum['forum_of_group'] == '0') { |
|
|
|
|
$forum_image = Display::return_icon( |
|
|
|
|
'forum_group.png', |
|
|
|
|
get_lang('GroupForum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_LARGE |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
if (is_array( |
|
|
|
|
$mywhatsnew_post_info |
|
|
|
|
) && !empty($mywhatsnew_post_info) |
|
|
|
|
) { |
|
|
|
|
echo Display::return_icon( |
|
|
|
|
'forum.gif', |
|
|
|
|
get_lang('Forum') |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
echo Display::return_icon('forum.gif'); |
|
|
|
|
} |
|
|
|
|
$forum_image = Display::return_icon( |
|
|
|
|
'forum.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_LARGE |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '</td>'; |
|
|
|
|
|
|
|
|
|
// Validation when belongs to a session |
|
|
|
|
$session_img = api_get_session_image( |
|
|
|
|
$forum['session_id'], |
|
|
|
@ -463,8 +464,10 @@ if (is_array($forumCategories)) { |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if ($forum['forum_of_group'] != '0') { |
|
|
|
|
$my_all_groups_forum_name = isset($all_groups[$forum['forum_of_group']]['name']) ? $all_groups[$forum['forum_of_group']]['name'] : null; |
|
|
|
|
$my_all_groups_forum_id = isset($all_groups[$forum['forum_of_group']]['id']) ? $all_groups[$forum['forum_of_group']]['id'] : null; |
|
|
|
|
$my_all_groups_forum_name = isset($all_groups[$forum['forum_of_group']]['name']) ? |
|
|
|
|
$all_groups[$forum['forum_of_group']]['name'] : null; |
|
|
|
|
$my_all_groups_forum_id = isset($all_groups[$forum['forum_of_group']]['id']) ? |
|
|
|
|
$all_groups[$forum['forum_of_group']]['id'] : null; |
|
|
|
|
$group_title = api_substr( |
|
|
|
|
$my_all_groups_forum_name, |
|
|
|
|
0, |
|
|
|
@ -485,29 +488,84 @@ if (is_array($forumCategories)) { |
|
|
|
|
} |
|
|
|
|
$forum['forum_of_group'] == 0 ? $groupid = '' : $groupid = $forum['forum_of_group']; |
|
|
|
|
|
|
|
|
|
echo '<td><a href="viewforum.php?'.api_get_cidreq( |
|
|
|
|
).'&gidReq='.intval($groupid).'&forum='.intval( |
|
|
|
|
$forum['forum_id'] |
|
|
|
|
).'" '.class_visible_invisible( |
|
|
|
|
strval(intval($forum['visibility'])) |
|
|
|
|
).'>'; |
|
|
|
|
$number_threads = isset($forum['number_of_threads']) ? $forum['number_of_threads'] : 0; |
|
|
|
|
$number_posts = isset($forum['number_of_posts']) ? $forum['number_of_posts'] : 0; |
|
|
|
|
|
|
|
|
|
$html .= '<div class="row">'; |
|
|
|
|
$html .= '<div class="col-md-6">'; |
|
|
|
|
$html .= '<div class="col-md-3">'; |
|
|
|
|
$html .= '<div class="number-post">'.$forum_image .'<p>' . $number_posts . ' ' . get_lang('Posts') . '</p></div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
$html .= '<div class="col-md-9">'; |
|
|
|
|
$iconForum = Display::return_icon( |
|
|
|
|
'forum_yellow.png', |
|
|
|
|
get_lang($forumCategory['cat_title']), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_MEDIUM |
|
|
|
|
); |
|
|
|
|
$linkForum = ''; |
|
|
|
|
$linkForum .= Display::tag( |
|
|
|
|
'a', |
|
|
|
|
$forum['forum_title'], |
|
|
|
|
array ( |
|
|
|
|
'href'=>'viewforum.php?' . api_get_cidreq().'&gidReq=' . intval($groupid).'&forum=' . intval( |
|
|
|
|
$forum['forum_id']), |
|
|
|
|
'class' => return_visible_invisible( strval( intval($forum['visibility']) ) ) ) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Forum title |
|
|
|
|
echo prepare4display( |
|
|
|
|
$forum['forum_title'] |
|
|
|
|
).$session_displayed.'</a>'.$forum_title_group_addition.'<br />'; |
|
|
|
|
$html .= '<h3 class="title">' . $iconForum . $linkForum . '</h3>'; |
|
|
|
|
|
|
|
|
|
echo '<span class="forum_description">'.prepare4display( |
|
|
|
|
$forum['forum_comment'] |
|
|
|
|
).'</span>'; |
|
|
|
|
echo '</td>'; |
|
|
|
|
$html .= Display::tag( |
|
|
|
|
'p', |
|
|
|
|
strip_tags($forum['forum_comment']), |
|
|
|
|
array( |
|
|
|
|
'class'=>'description' |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
// The number of topics and posts. |
|
|
|
|
$number_threads = isset($forum['number_of_threads']) ? $forum['number_of_threads'] : null; |
|
|
|
|
$number_posts = isset($forum['number_of_posts']) ? $forum['number_of_posts'] : null; |
|
|
|
|
if ($forum['forum_of_group'] !== '0') { |
|
|
|
|
$iconEmpty=''; |
|
|
|
|
$newPost=''; |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$newPost = ' '. |
|
|
|
|
Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$newPost = $iconEmpty; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) { |
|
|
|
|
$newPost = ' '. |
|
|
|
|
Display::return_icon( |
|
|
|
|
'alert.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
$newPost = $iconEmpty; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '<td>'.$number_threads.'</td>'; |
|
|
|
|
echo '<td>'.$number_posts.'</td>'; |
|
|
|
|
$html .= '<div class="col-md-6">'; |
|
|
|
|
$html .= '<div class="row">'; |
|
|
|
|
$html .= '<div class="col-md-2">'; |
|
|
|
|
$html .= Display::return_icon( |
|
|
|
|
'post-forum.png', |
|
|
|
|
get_lang('Forum'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
$html .= ' ' . $number_threads . '<br>'.$newPost.'</div>'; |
|
|
|
|
$html .= '<div class="col-md-6">'; |
|
|
|
|
|
|
|
|
|
// The last post in the forum. |
|
|
|
|
if ($forum['last_poster_name'] != '') { |
|
|
|
@ -526,23 +584,27 @@ if (is_array($forumCategories)) { |
|
|
|
|
$userinfo['username'] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
echo '<td nowrap="nowrap">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($forum['last_post_id'])) { |
|
|
|
|
echo api_convert_and_format_date( |
|
|
|
|
$forum['last_post_date'] |
|
|
|
|
).'<br /> '.get_lang( |
|
|
|
|
'By' |
|
|
|
|
).' '.display_user_link( |
|
|
|
|
$html .= Display::return_icon( |
|
|
|
|
'post-item.png', |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_TINY |
|
|
|
|
).' '. |
|
|
|
|
api_convert_and_format_date($forum['last_post_date']). |
|
|
|
|
'<br /> ' . get_lang('By').' '. |
|
|
|
|
display_user_link( |
|
|
|
|
$poster_id, |
|
|
|
|
$name, |
|
|
|
|
'', |
|
|
|
|
$username |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
echo '</td>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '<div class="col-md-4">'; |
|
|
|
|
|
|
|
|
|
echo '<td class="td_actions">'; |
|
|
|
|
if (api_is_allowed_to_edit( |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
@ -550,15 +612,15 @@ if (is_array($forumCategories)) { |
|
|
|
|
$sessionId |
|
|
|
|
) != 0) |
|
|
|
|
) { |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
).'&action=edit&content=forum&id='.$forum['forum_id'].'">'. |
|
|
|
|
$html .= '<a href="'.api_get_self() . '?' . api_get_cidreq( |
|
|
|
|
).'&action=edit&content=forum&id='.$forum['forum_id'] . '">'. |
|
|
|
|
Display::return_icon( |
|
|
|
|
'edit.png', |
|
|
|
|
get_lang('Edit'), |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
).'</a>'; |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
) . '</a>'; |
|
|
|
|
$html .= '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
).'&action=delete&content=forum&id='.$forum['forum_id']."\" onclick=\"javascript:if(!confirm('".addslashes( |
|
|
|
|
api_htmlentities( |
|
|
|
|
get_lang('DeleteForum'), |
|
|
|
@ -571,56 +633,71 @@ if (is_array($forumCategories)) { |
|
|
|
|
array(), |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
).'</a>'; |
|
|
|
|
display_visible_invisible_icon( |
|
|
|
|
$html .= return_visible_invisible_icon( |
|
|
|
|
'forum', |
|
|
|
|
$forum['forum_id'], |
|
|
|
|
$forum['visibility'] |
|
|
|
|
); |
|
|
|
|
display_lock_unlock_icon( |
|
|
|
|
$html .= return_lock_unlock_icon( |
|
|
|
|
'forum', |
|
|
|
|
$forum['forum_id'], |
|
|
|
|
$forum['locked'] |
|
|
|
|
); |
|
|
|
|
display_up_down_icon( |
|
|
|
|
$html .= return_up_down_icon( |
|
|
|
|
'forum', |
|
|
|
|
$forum['forum_id'], |
|
|
|
|
$forumsInCategory |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$iconnotify = 'send_mail.gif'; |
|
|
|
|
$session_forum_notification = isset($_SESSION['forum_notification']['forum']) ? $_SESSION['forum_notification']['forum'] : false; |
|
|
|
|
$iconnotify = 'notification_mail_na.png'; |
|
|
|
|
$session_forum_notification = isset($_SESSION['forum_notification']['forum']) ? |
|
|
|
|
$_SESSION['forum_notification']['forum'] : false; |
|
|
|
|
if (is_array($session_forum_notification)) { |
|
|
|
|
if (in_array( |
|
|
|
|
$forum['forum_id'], |
|
|
|
|
$session_forum_notification |
|
|
|
|
)) { |
|
|
|
|
$iconnotify = 'send_mail_checked.gif'; |
|
|
|
|
$iconnotify = 'notification_mail.png'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!api_is_anonymous( |
|
|
|
|
) && api_is_allowed_to_session_edit(false, true) |
|
|
|
|
) { |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
$html .= '<a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
|
).'&action=notify&content=forum&id='.$forum['forum_id'].'">'. |
|
|
|
|
Display::return_icon( |
|
|
|
|
$iconnotify, |
|
|
|
|
get_lang('NotifyMe') |
|
|
|
|
).'</a>'; |
|
|
|
|
get_lang('NotifyMe'), |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
) . '</a>'; |
|
|
|
|
} |
|
|
|
|
echo '</td></tr>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
echo $html; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
echo '<tr><td>'.get_lang( |
|
|
|
|
echo '<div class="alert alert-warning">'.get_lang( |
|
|
|
|
'NoForumInThisCategory' |
|
|
|
|
).'</td>'.(api_is_allowed_to_edit( |
|
|
|
|
).'</div>'.(api_is_allowed_to_edit( |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
|
) ? '<td colspan="6"></td>' : '<td colspan="6"></td>').'</tr>'; |
|
|
|
|
) ? '<div>' : '</div>').'</div>'; |
|
|
|
|
} |
|
|
|
|
echo '</table>'; |
|
|
|
|
|
|
|
|
|
echo '</div>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Display:: display_footer(); |
|
|
|
|