} // are we working on a view? let's check once here $target_table_type = $target_table ? $db->getTypeOfTable($target_table) : null; //- HTML: sidebar echo '<table class="body_tbl" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top" class="left_td" style="width:100px; padding:9px 2px 9px 9px;">'; echo "<div id='leftNav'>"; echo "<h1><a href='" . PAGE . "'>"; echo "<span id='logo'>" . PROJECT . "</span> <span id='version'>v" . VERSION . "</span>"; echo "</a></h1>"; echo "<div id='headerlinks'>"; echo "<a href='javascript:void' onclick='openHelp(\"top\");'>" . $lang['docu'] . "</a> | "; echo "<a href='http://www.gnu.org/licenses/gpl.html' target='_blank'>" . $lang['license'] . "</a> | "; echo "<a href='" . PROJECT_URL . "' target='_blank'>" . $lang['proj_site'] . "</a>"; echo "</div>"; //- HTML: database list $db->print_db_list(); echo "<fieldset style='margin:15px;'><legend>"; echo "<a href='" . PAGE . "'"; if (!$target_table) { echo " class='active_table'"; } echo ">" . htmlencode($currentDB['name']) . "</a>"; echo "</legend>"; //- HTML: table list $query = "SELECT type, name FROM sqlite_master WHERE type='table' OR type='view' ORDER BY name"; $result = $db->selectArray($query); $j = 0; for ($i = 0; $i < sizeof($result); $i++) { if (substr($result[$i]['name'], 0, 7) != "sqlite_" && $result[$i]['name'] != "") { echo "<span class='sidebar_table'>[" . $lang[$result[$i]['type'] == 'table' ? 'tbl' : 'view'] . "]</span> "; echo "<a href='?action=row_view&table=" . urlencode($result[$i]['name']) . "'";