maelzerdata TOMMPS
Das multi-user, multi-Instanz Framework
schnelle Entwicklung, einfache Implementierung - gerüstet für jeden Anwendungsfall
$glob = new Globals
if($glob -> hasRight("ZEIGE.DIALOG") == false){
echo '<div class="failure">Fehlender Entrypoint \'ZEIGE.DIALOG\'</div>';
die();
}
Zugriffssteuerung auf einen Dialogbutton:
$glob = new Globals
if($glob -> hasRight("KANN.LOESCHEN") == true){
echo '<inut type="submit" value="löschen"/>';
}
Zugriff auf einen Systemparameter:
$glob = new Globals
$intervall = (int)$glob -> getParam("INTERVALL");
Link zum Laden eines Dialogs
<a href="#" onclick="loadDialogue('Startseite', ''); return true">
Startseite
</a>
Wechsel eines Moduls
<a href="#"
onclick="loadModuleAndDialogue('Anderes Module', 'Startseite', '');
return true">
Startseite
</a>
Wechsel eines Dialogs mit Übergabe einer alphanummerischen ID
<a href="#"
onclick="loadModuleAndDialogue('Anderes Module', 'Startseite', 'ID_NUMMER');
return true">
Startseite
</a>
<?php
$id = $_SESSION['current_id'];
// $id ist ID_NUMMER;
?>
Datenbankzugriff
// Einzelwert
$val = null;
$sql = 'SELECT [SPALTE] FROM ' . $con->dbPref . '[TABELLENNAME] ...';
$con = new Connector;
$val = $con -> getValue($sql);
// Datenreihe
$val = array;
$sql = 'SELECT [SPALTE] FROM ' . $con->dbPref . '[TABELLENNAME] ...';
$con = new Connector;
$val = $con -> getRow($sql);
for($i = 0; $i < sizeof($val); $i++){
echo $val[$i] . '';
}
// Datenmatrix (mehrdim. Array)
$val = array;
$spalte1 = null;
$spalte2 = null;
$sql = 'SELECT [SPALTE1,SPALTE2 ...] FROM ' . $con->dbPref . '[TABELLE]';
$con = new Connector;
$val = $con -> getRow($sql);
for($i = 0; $i < sizeof($val); $i++){
$spalte1 = $val[$i][0];
$spalte1 = $val[$i][1];
echo $spalte1 . ' ' . $spalte2 . '';
}
// Datenmanipulationen
$con = new Connector;
$sql = 'UPDATE ' . $con -> dbPref . '[TABELLENNAME] ...';
$con -> update($sql); // $con -> insert($sql); | $con -> delete($sql);