echo '<td><a href="article.php?id=' . $row['id'] . '">' . $row['title'] . '</a>'; if ($recycle) { echo ' <a href="' . $_SERVER['PHP_SELF'] . '?recycle=' . $row['id'] . '"><i class="icon-share"></i></a>'; } echo '</td>'; echo '<td>' . get_abstract($dbc, $row['id']) . '</td>'; echo '<td>' . $row['create_time'] . '</td>'; //echo '<a class="btn" href="article.php?id=' . $row['id'] . '"><i class="icon-edit"></i></a>'; if ($role == 'creator') { if ($recycle) { echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?delete=' . $row['id'] . '"><i class="icon-trash"></i></a>'; } else { echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?recycle=' . $row['id'] . '"><i class="icon-trash"></i></a></td></tr>'; } } if ($role == 'publisher') { if (is_published($dbc, $row['id'])) { echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?revoke=' . $row['id'] . '"><i class="icon-thumbs-down"></i></a></td></tr>'; } else { echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?publish=' . $row['id'] . '"><i class="icon-thumbs-up"></i></a></td></tr>'; } } } ?> </tbody> </table> <?php } else { render_warning('没有可显示的综述!您可以创建新的综述。'); }
</ul> <div class="clr"></div> </div> <div class="b"><div class="b"><div class="b"></div></div></div> </div><?php } ?> <div id="element-box"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <table cellspacing="0" width="100%"> <tbody> <tr valign="top"><?php if (is_published("leftmenu")) { ?> <td width="20px"> <fieldset id="treeview" style="width:185px;"><?php include "includes/leftmenu.php"; ?> </fieldset> </td><?php } ?> <td> <fieldset style="min-height:280px;"><?php if ($p == "") {
/** * return the list of files that are published */ function get_book_files($book_toc, $cache) { $result = array(); // debug('book_toc', $book_toc); // debug('cache', $cache); foreach ($book_toc as $item) { // TODO: only do this if it's not in the book_toc from the cache or it is in the cache_update // debug('item', $item); $published = array(); foreach ($item['title'] as $key => $value) { $filename_md = $item['directory'] . '-' . $key . '.md'; $filename_html = $item['directory'] . '-' . $key . '.html'; if (is_published($item, $key, $cache)) { $published[$key] = array('raw' => $item['directory'] . '/' . $filename_md, 'render' => array('source' => 'md', 'target' => 'html', 'filename' => $item['directory'] . '/' . $filename_html)); } } $items = array(); if (!empty($item['items'])) { $items = get_book_files($item['items'], $cache); } if (!empty($published) || !empty($items)) { $result[$item['directory']] = array('published' => $published); $result = array_merge($result, $items); } } return $result; }