Ejemplo n.º 1
0
function genSignalLogWindow($selectedRoleNr)
{
    echo "<div class=LogWindow id=SignalLog minimized=false><div class=MinMaxButton></div><div class=Title>" . ($selectedRoleNr == -1 ? "All signals" : "Signals for " . getRoleName($selectedRoleNr)) . "</div>";
    checkRoleRules($selectedRoleNr);
    echo "</div>";
}
Ejemplo n.º 2
0
 } else {
     if (isset($_REQUEST['testRule'])) {
         testRule($_REQUEST['testRule']);
     } else {
         if (isset($_REQUEST['ip'])) {
             echo $_SERVER['SERVER_ADDR'];
         } else {
             if (isset($_REQUEST['commands'])) {
                 echo '<div id="UpdateResults">';
                 dbStartTransaction();
                 emitLog("BEGIN");
                 processCommands();
                 // update database according to edit commands
                 // Process processRules first, because the ExecEngine may execute code while processing this stuff.
                 echo '<div id="ProcessRuleResults">';
                 checkRoleRules($selectedRoleNr);
                 echo '</div>';
                 // Run all stored procedures in the database
                 // Doing so AFTER running the ExecEngine allows any problems with stored procedures to be 'fixed'
                 // 2do this: create a rule with the same ruleexpression and handle the violation with th ExecEngine
                 runAllProcedures();
                 runAllProcedures();
                 echo '<div id="InvariantRuleResults">';
                 $invariantRulesHold = checkInvariantRules();
                 echo '</div>';
                 if ($invariantRulesHold) {
                     setTimeStamp();
                     emitLog("COMMIT");
                     dbCommitTransaction();
                 } else {
                     emitLog("ROLLBACK");