Beispiel #1
0
                    $_msg .= htmlentities($db_name) . ", ";
                } else {
                    $_err = 1;
                    $_msg = $db->error;
                }
            }
        }
    }
} else {
    // get all dbs
    $_q = "SHOW DATABASES {$search};";
    if ($data = $db->query($_q)) {
        while ($_d = $data->fetch_array()) {
            $db_data[] = $_d;
        }
        $_total = count($db_data);
    }
    if ($_total > 0) {
        // pagination
        $perP = (int) $_SESSION['perp'] == 0 ? "10" : (int) $_SESSION['perp'];
        $_pag = new pagination();
        $db_dt = $_pag->generate($db_data, $perP);
        foreach ($db_dt as $db_d) {
            $db_dat[] = $db_d;
        }
    }
}
$pma->title = $lang->databases;
include $pma->tpl . "header.tpl";
include $pma->tpl . "main.tpl";
include $pma->tpl . "footer.tpl";
Beispiel #2
0
if ($nr == '0') {
    echo $lang["no_tables"] . " !";
} else {
    echo "<form action='mtb.php?k={$k}' method='post' align='left'>";
    while ($row = mysql_fetch_row($result)) {
        $vmi[] = $row[0];
    }
    // calculate tbl size and rows
    $result = mysql_query("SHOW TABLE STATUS");
    function convert($size)
    {
        $unit = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
        return @round($size / pow(1024, $i = floor(log($size, 1024))), 2) . ' ' . $unit[$i];
    }
    while ($row = mysql_fetch_array($result)) {
        $total_size = convert($row["Data_length"] + $row["Index_length"]);
        $size[$row['Name']] = $total_size . "^" . $row['Rows'];
    }
    include 'pagination.class.php';
    $pagination = new pagination();
    $vmi = $pagination->generate($vmi, $perp);
    foreach ($vmi as $tb) {
        $a = explode("^", $size[$tb]);
        echo "<input type='checkbox' name='tb[]' value='{$tb}'> <a href='table.php?k={$k}&tb={$tb}'>" . htmlentities($tb) . "</a> | " . $a[0] . " | " . ($a[1] == 1 ? '1 ' . $lang["row"] : $a[1] . ' ' . $lang["rows"]) . "<br/>";
    }
    echo "<br/>\r\n<select name='act'>\r\n<option value=''>" . $lang["With_selected"] . "...</option>\r\n<option value='DROP'>" . $lang["Drop"] . "</option>\r\n<option value='EXPORT'>" . $lang["Export"] . "</option>\r\n<option value='EMPTY'>" . $lang["Empty"] . "</option>\r\n<option value='RENAME'>" . $lang["Rename"] . "</option>\r\n</select>\r\n<input type='submit' value='" . $lang["Go"] . "'></form><p align='left'>";
    echo $pagination->links();
    mysql_free_result($result);
}
echo "<br/>- - -<br/>\r\n<form action='?' align='left'>" . $lang["Show"] . "<input type='text' name='perp' value='{$perp}' size='3'> <input type='hidden' value='{$k}' name='k'> <input type='submit' value='" . $lang["Per_Page"] . "'> </form><br/>\r\n<a href='addtable.php?k={$k}'>" . $lang["Add_table"] . "</a> | \r\n<a href='sql.php?k={$k}'>" . $lang["Sql_code"] . "</a> | \r\n<a href='export.php?k={$k}'>" . $lang["Export"] . "</a> | \r\n<a href='upl.php?k={$k}'>" . $lang["Upload_sql"] . "</a> |\r\n<a href='import.php?k={$k}'>" . $lang["Import_sql"] . "</a> | \r\n<a href='data/index.php?k={$k}'>" . $lang["Files"] . "</a><br/>\r\n <br/> {$nr} " . strtolower($lang["tables"]) . "\r\n</div>";
include 'foot.php';
Beispiel #3
0
    if (!$ff) {
        header("Location: ?");
    }
    foreach ($ff as $f) {
        if ($_POST['ok']) {
            @unlink($f);
            $_msg .= basename($f) . ", ";
        } else {
            $_m .= "<input type='hidden' name='i[]' value='{$f}'>";
        }
    }
} else {
    $files = glob("data/{$search}");
    $_total = count($files) - 1;
    // files - index.php
    if ($_total > 0) {
        // pagination
        $perP = (int) $_SESSION['perp'] == 0 ? "10" : (int) $_SESSION['perp'];
        $_pag = new pagination();
        $f_dt = $_pag->generate($files, $perP);
        foreach ($f_dt as $f_dt) {
            if ($f_dt != 'data/index.php') {
                $fl_dt[] = $f_dt;
            }
        }
    }
}
$pma->title = $lang->Files;
include $pma->tpl . "header.tpl";
include $pma->tpl . "files.tpl";
include $pma->tpl . "footer.tpl";