Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('../../logowanie.php');
- function tabele()
- {
- GLOBAL $polaczenie;
- $tabele='';
- $sql="SHOW TABLES;";
- $sql = mysqli_query($polaczenie, $sql);
- $licz =1;
- while($tab=mysqli_fetch_array($sql))
- {
- $tabele.= $tab[0].'<input type="checkbox" value="'.$tab[0].'" name="ch'.$licz.'"><br>';
- $licz++;
- }
- $tabele.='<input type="hidden" name="licz" value="'.$licz.'">';
- return $tabele;
- }
- function pokaz()
- {
- $wiersze=file($_GET['p']);
- $w='';
- foreach($wiersze as $wiersz)
- {
- $w.=$wiersz;
- }
- return $w;
- }
- if(isset($_POST['submit']))
- {
- $tabele='';
- $data =date('Y-m-d_H:i:s');
- $akcja=$_POST['akcja'];
- $licz = $_POST['licz'];
- for($i = 1; $i<$licz; $i++)
- {
- $tabele.= @$_POST['ch'.$i].' ';
- }
- //echo $tabele.' '.$akcja;
- echo (`mysqlcheck --check zsp1_patrykd $tabele --user=$login --password=$haslo`);
- echo '<hr>';
- echo(`mysqldump --user=$login --password=$haslo zsp1_patrykd $tabele $akcja > kopia_$data.sql`);
- }
- if(isset($_GET['u']))
- {
- unlink($_GET['u']);
- }
- ?>
- <html>
- <head>
- </head>
- <body>
- <form method="POST">
- <?php
- echo tabele();
- ?>
- <select name="akcja">
- <option value="">Wszystkie</option>
- <option value="--no-create-info">--no-create-info</option>
- <option value="--no-date">--no-date</option>
- </select>
- <input type="submit" name="submit" value="KOPIA">
- </form>
- <?php
- $katalog='./';
- $plik=scandir($katalog,1);
- foreach($plik as $plik)
- {
- if($plik!='.' AND $plik != '..' AND $plik != 'index.php')
- {
- echo '<a href="?p='.$plik.'">'.$plik.'</a> |<a href="?u='.$plik.'">U</a>|'.filesize($plik).' b<br>';
- }
- }
- if(isset($_GET['p']))
- {
- echo '<textarea style="width:100%;height:500px;">';
- echo pokaz();
- echo '</textarea>';
- }
- ?>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement