Beispiel #1
0
 public function getMainMenu($path = "")
 {
     $files = scandir("sql/{$path}");
     foreach ($files as $index => $file) {
         if ($file != "." && $file != "..") {
             if (isset($_POST['sqlfile']) && $_POST['sqlfile'] == $file) {
                 $sql = new CSQLFile($file);
                 return $sql->readFileParts();
             }
         }
     }
 }
Beispiel #2
0
<?php

error_reporting(E_ALL);
$_GET['p'] = 'createtable';
include 'CDatabase.php';
include 'CSQLFile.php';
include 'CSQLFileMenu.php';
$db = new CDatabase('test', 'database');
$sql = new CSQLFile('måns');
$filemenu = new CSQLFileMenu();
$res = $sql->readFileParts($_GET['p']);
echo $sql->executeStatements();
echo $filemenu->getMainMenu();