Example #1
0
     echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;">';
     echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;urlview=' . Security::remove_XSS($newurlview) . '">';
     echo Display::return_icon('view_remove.png') . '&nbsp;&nbsp;' . Security::remove_XSS($myrow['category_title']) . '</a><br />&nbsp;&nbsp;&nbsp;' . $myrow['description'];
     echo '</th>';
     if (api_is_allowed_to_edit(null, true)) {
         if ($session_id == $myrow['session_id']) {
             echo '<th>';
             showcategoryadmintools($myrow['id']);
             echo '</th>';
         } else {
             echo '<th>' . get_lang('EditionNotAvailableFromSession');
         }
     }
     echo '</tr>';
     echo '</table>';
     echo showlinksofcategory($myrow['id']);
     echo '</tr>';
 } else {
     echo '<tr>';
     echo '<table class="data_table">';
     echo '<tr>';
     echo '<th width="81%" style="font-weight: bold; text-align:left;padding-left: 5px;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;urlview=';
     echo is_array($view) ? implode('', $view) : $view;
     echo '">' . Display::return_icon('view_tree.png') . ' &nbsp;&nbsp;' . Security::remove_XSS($myrow['category_title']) . $session_img;
     echo '</a><br />&nbsp;&nbsp;&nbsp;';
     echo $myrow['description'];
     if (api_is_allowed_to_edit(null, true)) {
         echo '<th style="text-align:center;">';
         showcategoryadmintools($myrow['id']);
         echo '</th>';
     }
Example #2
0
                            <a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;urlview=$newurlview$tinymce_params$socialview_param' class='open-category'>" . q($myrow->name) . "</a>";
                if (!empty($description)) {
                    $tool_content .= "<br><span class='link-description'>$description</span></th>";
                } else {
                    $tool_content .= "</th>";
                }

                if ($display_tools) {
                    $tool_content .= "<td class='option-btn-cell'>";
                    showcategoryadmintools($myrow->id);
                    $tool_content .= "</td>";
                }

                $tool_content .= "</tr>";

                showlinksofcategory($myrow->id);
                if ($links_num == 1) {
                    $tool_content .= "<tr><td class='text-left not_visible nocategory-link'> - $langNoLinkInCategory - </td>" .
                        ($display_tools? '<td></td>': '') . "<tr>";
                }

            } else {
                $tool_content .= "<tr class='link-subcategory-title'><th class = 'text-left category-link'>".icon('fa-folder-o', $showall)
                    . "&nbsp;<a href='$_SERVER[SCRIPT_NAME]?course=$course_code&amp;urlview=";
                $tool_content .= is_array($view) ? implode('', $view) : $view;
                $tool_content .= $tinymce_params . "' class='open-category'>" . q($myrow->name) . "</a>";
                $description = standard_text_escape($myrow->description);
                if (!empty($description)) {
                    $tool_content .= "<br><span class='link-description'>$description</span</th>";
                } else {
                    $tool_content .= "</th>";