Example #1
0
/**
 * Render navigation
 *
 * @param string $db database name
 * @param string|null $collection collection name
 * @param boolean $extend if extend the parameters
 */
function render_navigation($db, $collection = null, $extend = true)
{
    $dbpath = url("db.index", array("db" => $db));
    $navigation = '<a href="' . url("server.databases") . '"><img src="' . rock_theme_path() . '/images/world.png" width="14" align="absmiddle"/> ' . rock_lang("databases") . '</a> &raquo; <a href="' . $dbpath . '"><img src="' . rock_theme_path() . '/images/database.png" width="14" align="absmiddle"/> ' . $db . "</a>";
    if (!is_null($collection)) {
        $navigation .= " &raquo; <a href=\"" . url("collection.index", $extend ? xn() : array("db" => $db, "collection" => $collection)) . "\">";
        $navigation .= '<img src="' . rock_theme_path() . '/images/' . r_get_collection_icon($collection) . '.png" width="14" align="absmiddle"/> ';
        $navigation .= $collection . "</a>";
    }
    echo $navigation;
}
Example #2
0
            ?>
						<li><input type="text" class="r_search_box" placeholder="keyword"/></li>
						<?php 
            foreach ($tables as $table => $count) {
                ?>
						<li class="collection"><a href="<?php 
                h(url("collection.index", array("db" => $db["name"], "collection" => $table)));
                ?>
" target="right" cname="<?php 
                h($table);
                ?>
"><img src="<?php 
                render_theme_path();
                ?>
/images/<?php 
                echo r_get_collection_icon($table);
                ?>
.png" width="14" align="absmiddle"/> <span class="name_text"><?php 
                h($table);
                ?>
</span></a> (<span class="count"><?php 
                h($count);
                ?>
</span>)</li>
						<?php 
            }
            ?>
					<?php 
        } else {
            ?>
						<li><?php