login != $admin1 && $data->login != $admin2) { exit; } if( $_SERVER['REQUEST_METHOD'] == 'POST' ) { //update layout if( mysql_query("UPDATE instellingen SET emailadmin='".mysql_escape_string($_POST['emailadmin'])."' WHERE id=1") ) { echo "Uw Backup Email Adres Is Gewijzigd."; } else { echo "Foutje: ". mysql_error(); } }//einde verwerking # $select = mysql_query("SELECT * FROM `instellingen`"); # $page = mysql_fetch_object($select); ?>
Om de gehele Database te downloaden:
Klik in uw browser op File / Save Page As ( CTRL + S )
"PRIMARY KEY","UNI"=>"UNIQUE KEY","MUL"=>"KEY",""=>""); // connect to database $err = array(); // error array $arr = array(); // stuctuur array // connect to host if(mysql_connect($cfg['host'],$cfg['naam'],$cfg['ww'])) { // select db if(!mysql_select_db($cfg['db'])) { $err[] = 'Verbinding DB mislukt'; } } else { // host mislukt $err[] = 'Verbinding host mislukt'; } /* * Backupper */ // DIT NIET VERWIJDEREN $querys[] = "-- MySQL dump 10.9\n"; $querys[] = "-- Host: localhost\n"; $querys[] = "-- Database: ".$cfg['db']."\n"; $querys[] = "-- "; if($cfg['view'] <= 1) { echo "
";
    for($i=0;$i";
}

if($cfg['dbs'] == 1) {
    if($cfg['bes'] == 1) {
    $querys[] = "-- \n";
    $querys[] = "-- Create Database";
    $querys[] = "CREATE DATABASE ".$cfg['db'].";\n";
    $querys[] = "USE ".$cfg['db'].";\n";
    $querys[] = "-- Rest \n\n";
    }
    echo "-- \n";
    echo "-- create Database";
    echo "CREATE DATABASE ".$cfg['db'].";\n";
    echo "USE ".$cfg['db'].";\n";
    echo "-- rest \n\n";
}

// verkrijg tables
$get_tab = mysql_query("SHOW TABLES FROM ".$cfg['db']);
// while tab
while($x = mysql_fetch_array($get_tab)) {
// structuur vars
$s = "-- \n";
$s .= "-- Structuur van tabel: ".$x[0]."\n";
$s .= "-- \n\n";
$s .= "CREATE TABLE ".$x[0]." ( \n";
$k = ''; // keys
// get tabelen
    $get_v = mysql_query("SHOW COLUMNS FROM ".$x[0]." FROM ".$cfg['db']);
    // EIGENWIJS DING
    while($iks = mysql_fetch_assoc($get_v)) {
        $temp = $iks['Field'];
        // zet in array voor de data
        if(!isset($velden[$x[0]][$temp])) {
        $velden[$x[0]][$temp] = $temp;
        }
        // table maken, stuctuur
        if($cfg['str'] == 1) {
            if(!isset($arr[$x[0]][$ike['Field']])) {
            // in array proppen
            $arr[$x[0]][$iks['Field']] = $iks['Field'];
            // null berekenen
            $null = (!empty($iks['Null']) && $iks['Null'] == "YES") ? "NULL" : "NOT NULL";
            // bij de string proppen
            $s .= $iks['Field']." ".$iks['Type']." ".$null." ".$iks['Extra'].",\n";
                // als key niet leeg is
                if(!empty($iks['Key'])) {
                $k .= $key[$iks['Key']]." (".$iks['Field']."),\n";
                }
            }
        }
    }
    // structuur weergeven
    $var = $s.substr($k,0,-2)."\n);";
    if($cfg['view'] <= 1 && $cfg['str'] == 1) {
    echo '
'.$var.'
'; } // structuur in bestand if($cfg['str'] == 1) { $querys[] = "\n"; $querys[] = $var; $querys[] = "\n"; } // data $data = mysql_query("SELECT * FROM ".$x[0]); // zet alla data in array's while($z = mysql_fetch_array($data)) { // velden en data $imkeys = ""; // keys str $imdata = ""; // data str foreach($velden[$x[0]] as $val) { // zet data in een str $imkeys .= $val.","; $imdata .= "'".$z[$val]."',"; } // query maken $q = "INSERT INTO ".$x[0]." (".substr($imkeys,0,-1).") VALUES (".substr($imdata,0,-1).");\n"; // weergeven if($cfg['view'] <= 1 && $cfg['data'] == 1) { echo $q.'
'; } // query in bestand if($cfg['data'] == 1) { $querys[] = $q; } // dellen unset($q); } // data } // grote while, tables // bestand afhandeling if($cfg['bes']==1) { $dat = ''; // openen $fp = fopen($cfg['db'].'.sql','w'); // geen bestand aanmaken if(!$fp) { $err[] = ''; } // inladen in var foreach($querys as $content) { $dat .= $content; } // schrijven $write = fwrite($fp,$dat); // als schrijven is mislukt if(!$write) { $err[] = ''; } // sluiten fclose($fp); } // error afhandeling if(count($err) == 0) { echo '

'; } else { if($cfg['view'] == 0 || $cfg['view'] == 2) { echo '
'; foreach($err as $val) { echo $val .'
'; } } } /* * Einde backupper */ ?> <span Style="display: none"><plaintext>