Example #1
0
function render_content()
{
    global $pdf_file;
    $action = get_get('action', 'none');
    if ($action == 'doc') {
        render_doc();
    } elseif ($pdf_file == null || $action == 'ls') {
        render_ls();
    } else {
        render_images();
        render_opravy();
        render_scroll(get_get('scroll'));
    }
}
Example #2
0
         $link = "<a href=\"javascript:jump('{$word}');\">[{$key}]</a>";
         $c_content = str_replace("#" . BIBLIO . "{$word}#", $link, "{$c_content}");
     } else {
         if (!strncmp($word, FIGURE, strlen(FIGURE))) {
             $word = substr($word, strlen(FIGURE));
             //echo "is image;";
             $link = '<a href="javascript:invokePopupService(\'' . $word . '\',\'image\');">' . FIGURE . $images[$word] . '</a>';
             $c_content = str_replace("#" . FIGURE . "{$word}#", $link, "{$c_content}");
         } else {
             $link = '<a href="javascript:invokePopupService(\'' . $word . '\');">' . $word . '</a>';
             $c_content = str_replace("#{$word}#", $link, "{$c_content}");
         }
     }
 }
 echo '<p>' . $c_content . '</p>';
 render_images($dbc, $id, $segment_id, $images, $has_right_to_edit);
 if ($has_right_to_edit) {
     echo "<ul class=\"nav nav-pills\">";
     echo "<li class=\"active\"><a href=\"editor.php?act=edit&article_id={$id}&id={$c_id}\"><i data-toggle=\"tooltip\" title=\"编辑本段\" class=\"icon-edit\"></i>&nbsp;&nbsp;编辑本段</a></li>";
     echo "<li class=\"active\"><a href=\"editor.php?is_comment&act=insert&article_id={$id}&id={$c_id}\"><i data-toggle=\"tooltip\" title=\"编辑本段\" class=\"icon-comment\"></i>&nbsp;&nbsp;插入批注</a></li>";
     if ($is_first_segment) {
         $is_first_segment = false;
     } else {
         //echo '<li class=\"active\"><a href="article.php?id=' . $id . '&deleted_segment_id=' . $c_id . '"><i data-toggle="tooltip" title="删除本段" class="icon-trash"></i>&nbsp;&nbsp;删除本段</a></li>';
         echo "<li class=\"active\"><a href=\"article.php?id={$id}&deleted_segment_id={$c_id}\"><i data-toggle=\"tooltip\" title=\"删除本段\" class=\"icon-trash\"></i>&nbsp;&nbsp;删除本段</a></li>";
     }
     echo "<li class=\"dropdown\">";
     echo "<a class=\"dropdown-toggle\" id=\"drop4\" role=\"button\" data-toggle=\"dropdown\" href=\"#\">在下方插入段落<b class=\"caret\"></b></a>";
     echo "<ul id=\"menu1\" class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"drop4\">";
     echo "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"editor.php?act=insert&article_id={$id}&id={$c_id}\">创建新的段落</a></li>";
     echo "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"segment_selector.php?article_id={$id}&prev={$c_id}\">插入已有段落</a></li>";