Пример #1
0
}
if ($pk) {
    $q = "SELECT * FROM " . $req->get('table') . " WHERE id = " . $req->get('id');
} else {
    $q = "SELECT * FROM " . $req->get('table') . " WHERE ROWID = " . $req->get('id');
}
$sql->qo($q);
$res = $sql->fo_one();
// var_dump($res);
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - edit record');
$head->setCss('./css/psa.css');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$i = 0;
$inp = new Input();
$inp->setName('data_id');
$inp->setValue($req->get('id'));
$inp->setType('hidden');
$data_table = new Input();
Пример #2
0
// PAGING
if (!$sessie->isS('bottom')) {
    $sessie->setS('bottom', 0);
}
$sql = new LitePDO('sqlite:' . $sessie->getS('psa-dir') . '/' . $sessie->getS('psa-db') . '.' . $sessie->getS('psa-ext') . '');
$q = "SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name";
$sql->qo($q);
$res = $sql->fo();
// echo "BOTTOM WAARDE  : <b><h1>".$sessie->getS('bottom')."</h1></b>";
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - database schema');
$head->setCss('./css/psa.css', 'screen');
$head->setCss('./css/psaprint.css', 'print');
$head->setjs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
if (!$res) {
    $body->line('no tables defined yet');
} else {
    foreach ($res as $item) {
        $body->line('<div class="schema"><h3>' . $item->name . '</h3>');
        $q_fields = "PRAGMA table_info('" . $item->name . "')";
        $sql->qo($q_fields);
        $res_fields = $sql->fo();
        $table = new Table();