コード例 #1
0
ファイル: CreateRelationships.php プロジェクト: Zetetikos/SMS
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\Setup\Controller\SetupController as Setup;
session_start();
if (isset($_GET)) {
    $setup = new Setup();
    foreach ($_SESSION as $key => $value) {
        foreach ($value as $valu) {
            $setup->createRelationship($valu, $key, $key, $key);
        }
    }
}
コード例 #2
0
ファイル: Test.php プロジェクト: Zetetikos/SMS
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\Setup\Controller\SetupController as Setup;
// $controller = new SetupController();
// $controller->createTable("Students Of Chs", "Student's table");
// $controller->createField("Students of chs", "First Name", "varchar(10)", "Student's First Name");
// $controller->createField("Students of chs", "Last Name", "varchar(10)", "Student's Last Name");
// $controller->createField("Students of chs", "Middle Name", "varchar(10)", "Student's Middle Name");
// $controller->createField("Students of chs", "Date Of Birth", "datetime", "Student's Date Of Birth");
// $controller->createTable("Parent", "Parent Table");
$setup = new Setup();
//echo $setup->deleteDatabase();
print_r($setup->getTableFields("Staffs"));
コード例 #3
0
ファイル: process.php プロジェクト: Zetetikos/SMS
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\Setup\Controller\SetupController as Setup;
SESSION_START();
if (isset($_POST)) {
    $table = $_POST["table"];
    $name = $_POST["name"];
    $type = $_POST["type"];
    $setup = new Setup();
    try {
        switch ($type) {
            case "text":
                $type = "varchar(50)";
            case "name":
                $type = "varchar(20)";
            case "number":
                $type = "Integer";
            case "date":
                $type = "date";
            default:
                $type = "varchar(30)";
        }
        if ($_POST["id"] != "nil") {
            $setup->createField($table, $name, $type, "");
        } else {
            $setup->createTable($name, "");
            $setup->createField($name, $name, $type, "");
            // $setup->createField($table, $name."Id", "INTEGER", "");
            // $setup->createRelationship($table, $name, $name."Id", $name);
            $_SESSION[$name][] = $table;
コード例 #4
0
ファイル: CancelInstallation.php プロジェクト: Zetetikos/SMS
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\Setup\Controller\SetupController as Setup;
if (isset($_GET)) {
    $setup = new Setup();
    echo json_encode($setup->deleteDatabase());
}
コード例 #5
0
ファイル: TableColumns.php プロジェクト: Zetetikos/SMS
<?php

require $_SERVER["DOCUMENT_ROOT"] . '/vendor/autoload.php';
use SMS\App\Modules\Setup\Controller\SetupController as Setup;
if (isset($_GET)) {
    $table = $_GET["table"];
    $setup = new Setup();
    echo json_encode($setup->getTableFields($table));
}