echo "<a href='" . PAGE . "?view=vacuum' ";
 if ($view == "vacuum") {
     echo "class='tab_pressed'";
 } else {
     echo "class='tab'";
 }
 echo ">Vacuum</a>";
 echo "<div style='clear:both;'></div>";
 echo "<div id='main'>";
 if ($view == "structure") {
     $query = "SELECT sqlite_version() AS sqlite_version";
     $queryVersion = $db->select($query);
     $realVersion = $queryVersion['sqlite_version'];
     echo "<b>Database name</b>: " . $db->getName() . "<br/>";
     echo "<b>Path to database</b>: " . $db->getPath() . "<br/>";
     echo "<b>Size of database</b>: " . $db->getSize() . "<br/>";
     echo "<b>Database last modified</b>: " . $db->getDate() . "<br/>";
     echo "<b>SQLite version</b>: " . $realVersion . "<br/>";
     echo "<b>SQLite extension</b>: " . $db->getType() . "<br/>";
     echo "<b>PHP version</b>: " . phpversion() . "<br/><br/>";
     $query = "SELECT name FROM sqlite_master WHERE type='table' 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'] != "") {
             $j++;
         }
     }
     if ($j == 0) {
         echo "No tables in database.<br/><br/>";
     } else {
Example #2
0
 }
 if (isset($extension_not_allowed)) {
     echo "<div class='confirm' style='margin:10px 20px;'>";
     echo $lang['extension_not_allowed'] . ': ';
     echo implode(', ', array_map('htmlencode', $allowed_extensions));
     echo '<br />' . $lang['add_allowed_extension'];
     echo "</div><br/>";
 }
 if ($auth->isPasswordDefault()) {
     echo "<div class='confirm' style='margin:20px 0px;'>";
     echo sprintf($lang['warn_passwd'], is_readable('phpliteadmin.config.php') ? 'phpliteadmin.config.php' : PAGE) . "<br />" . $lang['warn0'];
     echo "</div>";
 }
 echo "<b>" . $lang['db_name'] . "</b>: " . htmlencode($db->getName()) . "<br/>";
 echo "<b>" . $lang['db_path'] . "</b>: " . htmlencode($db->getPath()) . "<br/>";
 echo "<b>" . $lang['db_size'] . "</b>: " . $db->getSize() . " KB<br/>";
 echo "<b>" . $lang['db_mod'] . "</b>: " . $db->getDate() . "<br/>";
 echo "<b>" . $lang['sqlite_v'] . "</b>: " . $realVersion . "<br/>";
 echo "<b>" . $lang['sqlite_ext'] . "</b> " . helpLink($lang['help1']) . ": " . $db->getType() . "<br/>";
 echo "<b>" . $lang['php_v'] . "</b>: " . phpversion() . "<br/>";
 echo "<b>" . PROJECT . " " . $lang["ver"] . "</b>: " . VERSION;
 echo " <a href='" . PROJECT_URL . "' target='_blank' id='oldVersion' style='display: none;' class='warning'>" . $lang['new_version'] . "</a><br/><br/>";
 echo "<script type='text/javascript'>checkVersion('" . VERSION . "','" . VERSION_CHECK_URL . "');</script>";
 if (isset($_GET['sort']) && ($_GET['sort'] == 'type' || $_GET['sort'] == 'name')) {
     $_SESSION[COOKIENAME . 'sortTables'] = $_GET['sort'];
 }
 if (isset($_GET['order']) && ($_GET['order'] == 'ASC' || $_GET['order'] == 'DESC')) {
     $_SESSION[COOKIENAME . 'orderTables'] = $_GET['order'];
 }
 $query = "SELECT type, name FROM sqlite_master WHERE (type='table' OR type='view') AND name!='' AND name NOT LIKE 'sqlite_%'";
 $queryAdd = "";
Example #3
0
 }
 if (isset($extension_not_allowed)) {
     echo "<div class='confirm' style='margin:10px 20px;'>";
     echo $lang['extension_not_allowed'] . ': ';
     echo implode(', ', array_map('htmlencode', $allowed_extensions));
     echo '<br />' . $lang['add_allowed_extension'];
     echo "</div><br/>";
 }
 if ($auth->isPasswordDefault()) {
     echo "<div class='confirm' style='margin:20px 0px;'>";
     echo sprintf($lang['warn_passwd'], is_readable('phpliteadmin.config.php') ? 'phpliteadmin.config.php' : PAGE) . "<br />" . $lang['warn0'];
     echo "</div>";
 }
 echo "<strong>" . $lang['databaseName'] . "</strong>: " . htmlencode($db->getName()) . "<br/>";
 echo "<strong>" . $lang['db_path'] . "</strong>: " . htmlencode($db->getPath()) . "<br/>";
 echo "<strong>" . $lang['db_size'] . "</strong>: " . $db->getSize() . " KB<br/>";
 echo "<strong>" . $lang['db_mod'] . "</strong>: " . $db->getDate() . "<br/>";
 echo "<strong>" . $lang['sqlite_v'] . "</strong>: " . $realVersion . "<br/>";
 echo "<strong>" . $lang['sqlite_ext'] . "</strong> " . helpLink($lang['help1']) . ": " . $db->getType() . "<br/>";
 echo "<strong>" . $lang['php_v'] . "</strong>: " . phpversion() . "<br/>";
 echo "<strong>" . PROJECT . " " . $lang["ver"] . "</strong>: " . VERSION;
 echo " <a href='" . PROJECT_URL . "' target='_blank' id='oldVersion' style='display: none;' class='warning'>" . $lang['new_version'] . "</a><br/><br/>";
 echo "<script type='text/javascript'>checkVersion('" . VERSION . "','" . VERSION_CHECK_URL . "');</script>";
 if (isset($_GET['sort']) && ($_GET['sort'] == 'type' || $_GET['sort'] == 'name')) {
     $_SESSION[COOKIENAME . 'sortTables'] = $_GET['sort'];
 }
 if (isset($_GET['order']) && ($_GET['order'] == 'ASC' || $_GET['order'] == 'DESC')) {
     $_SESSION[COOKIENAME . 'orderTables'] = $_GET['order'];
 }
 $query = "SELECT type, name FROM sqlite_master WHERE (type='table' OR type='view') AND name!='' AND name NOT LIKE 'sqlite_%'";
 $queryAdd = "";