function Population2($id = null, $_populatie = null)
 {
     $this->id = $id;
     $this->_populatie = $_populatie;
     if (!isset($_populatie) && isset($id)) {
         // get a Population2 based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttSubExpression` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttSubExpression`, `I`
                               FROM `SubExpression`
                           ) AS fst
                       WHERE fst.`AttSubExpression` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = array();
             $me['populatie'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `populatie`\r\n                                                 FROM `SubExpression`\r\n                                                 JOIN  ( SELECT DISTINCT F0.`SubExpression`, F1.`display`\r\n                                                                FROM `contains4` AS F0, `Pair` AS F1\r\n                                                               WHERE F0.`Pair`=F1.`I`\r\n                                                            ) AS f1\r\n                                                   ON `f1`.`SubExpression`='" . addslashes($id) . "'\r\n                                                WHERE `SubExpression`.`I`='" . addslashes($id) . "'"));
             $this->set_populatie($me['populatie']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttSubExpression` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttSubExpression`, `I`
                               FROM `SubExpression`
                           ) AS fst
                       WHERE fst.`AttSubExpression` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 function Gebruiker($id = null, $_sessies = null)
 {
     $this->id = $id;
     $this->_sessies = $_sessies;
     if (!isset($_sessies) && isset($id)) {
         // get a Gebruiker based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttGebruiker` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttGebruiker`, `I`
                               FROM `Gebruiker`
                           ) AS fst
                       WHERE fst.`AttGebruiker` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = array();
             $me['sessies'] = firstCol(DB_doquer("SELECT DISTINCT `SessieTbl`.`Id` AS `sessies`\r\n                                               FROM `SessieTbl`\r\n                                              WHERE `SessieTbl`.`gebruiker`='" . addslashes($id) . "'"));
             $this->set_sessies($me['sessies']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttGebruiker` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttGebruiker`, `I`
                               FROM `Gebruiker`
                           ) AS fst
                       WHERE fst.`AttGebruiker` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 3
0
 function setupTop($title)
 {
     $this->addJs("document.title = '{$title} - azaka';");
     $this->db->qry("SELECT name, url, access FROM pages WHERE visible = 1");
     while ($row = $this->db->fetchLast()) {
         $this->l->additem($row['name'], $row['name'], $row['access']);
     }
     $this->addJs("document.getElementById('toolbar').innerHTML = '" . addSlashes($this->l->dispBar()) . "';");
 }
Esempio n. 4
0
 function Session($id = null, $court = null, $panel = null, $city = null, $judge = null, $clerk = null, $scheduled = null, $dateofoccurence = null, $cases = null)
 {
     $this->_id = $id;
     $this->_court = $court;
     $this->_panel = $panel;
     $this->_city = $city;
     $this->_judge = $judge;
     $this->_clerk = $clerk;
     $this->_scheduled = $scheduled;
     $this->_dateofoccurence = $dateofoccurence;
     $this->_cases = $cases;
     if (!isset($court) && isset($id)) {
         // get a Session based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttSession` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttSession`, `i`
                               FROM `session`
                           ) AS fst
                       WHERE fst.`AttSession` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `judge`.`session` AS `id`\n                                       , `session`.`location` AS `court`\n                                       , `session`.`panel`\n                                       , `session`.`clerk`\n                                       , `session`.`scheduled`\n                                       , `session`.`occured` AS `date of occurence`\n                                       , `f1`.`seatedin` AS `city`\n                                    FROM `judge`\n                                    LEFT JOIN `session` ON `session`.`i`='" . addslashes($id) . "'\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`i`, F1.`seatedin`\n                                                   FROM `session` AS F0, `court` AS F1\n                                                  WHERE F0.`location`=F1.`i`\n                                               ) AS f1\n                                      ON `f1`.`i`='" . addslashes($id) . "'\n                                   WHERE `judge`.`session`='" . addslashes($id) . "'"));
             $me['judge'] = firstCol(DB_doquer("SELECT DISTINCT `judge`.`party` AS `judge`\n                                             FROM `judge`\n                                            WHERE `judge`.`session`='" . addslashes($id) . "'"));
             $me['cases'] = DB_doquer("SELECT DISTINCT `process`.`legalcase` AS `id`\n                                     FROM `process`\n                                    WHERE `process`.`session`='" . addslashes($id) . "'");
             foreach ($me['cases'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , '" . addslashes($v0['id']) . "' AS `nr`\n                                      FROM `legalcase`\n                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['plaintiff'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `plaintiff`\n                                                   FROM `legalcase`\n                                                   JOIN `plaintiff` AS f1 ON `f1`.`legalcase`='" . addslashes($v0['id']) . "'\n                                                  WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['defendant'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `defendant`\n                                                   FROM `legalcase`\n                                                   JOIN `defendant` AS f1 ON `f1`.`LegalCase`='" . addslashes($v0['id']) . "'\n                                                  WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_court($me['court']);
             $this->set_panel($me['panel']);
             $this->set_city($me['city']);
             $this->set_judge($me['judge']);
             $this->set_clerk($me['clerk']);
             $this->set_scheduled($me['scheduled']);
             $this->set_dateofoccurence($me['date of occurence']);
             $this->set_cases($me['cases']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttSession` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttSession`, `i`
                               FROM `session`
                           ) AS fst
                       WHERE fst.`AttSession` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 5
0
 public function addSlashe($value)
 {
     if (!get_magic_quotes_gpc()) {
         // verifica se o addSlashes está automático no server
         return addSlashes($value);
         // insere \ nas aspas
     } else {
         return $value;
     }
 }
 function UserRule($id = null, $_uitleg = null, $_overtredingen = null, $_populatievansubexpressies = null, $_relaties = null, $_source = null, $_target = null, $_ganaarpattern = null, $_ganaarvorigeregel = null, $_ganaarvolgenderegel = null, $_Conceptueeldiagram = null)
 {
     $this->id = $id;
     $this->_uitleg = $_uitleg;
     $this->_overtredingen = $_overtredingen;
     $this->_populatievansubexpressies = $_populatievansubexpressies;
     $this->_relaties = $_relaties;
     $this->_source = $_source;
     $this->_target = $_target;
     $this->_ganaarpattern = $_ganaarpattern;
     $this->_ganaarvorigeregel = $_ganaarvorigeregel;
     $this->_ganaarvolgenderegel = $_ganaarvolgenderegel;
     $this->_Conceptueeldiagram = $_Conceptueeldiagram;
     if (!isset($_uitleg) && isset($id)) {
         // get a UserRule based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttUserRule` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttUserRule`, `I`
                               FROM `UserRule`
                           ) AS fst
                       WHERE fst.`AttUserRule` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `UserRule`.`I` AS `id`\r\n                                       , `UserRule`.`pattern` AS `ga naar pattern`\r\n                                       , `UserRule`.`previous` AS `ga naar vorige regel`\r\n                                       , `UserRule`.`next` AS `ga naar volgende regel`\r\n                                       , `f1`.`display` AS `uitleg`\r\n                                       , `f2`.`source`\r\n                                       , `f3`.`target`\r\n                                       , `f4`.`display` AS `Conceptueel diagram`\r\n                                    FROM `UserRule`\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `UserRule` AS F0, `Explanation` AS F1\r\n                                                  WHERE F0.`explanation`=F1.`I`\r\n                                               ) AS f1\r\n                                      ON `f1`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`source`\r\n                                                   FROM `UserRule` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f2\r\n                                      ON `f2`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`target`\r\n                                                   FROM `UserRule` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f3\r\n                                      ON `f3`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `UserRule` AS F0, `Picture` AS F1\r\n                                                  WHERE F0.`picture`=F1.`I`\r\n                                               ) AS f4\r\n                                      ON `f4`.`I`='" . addslashes($id) . "'\r\n                                   WHERE `UserRule`.`I`='" . addslashes($id) . "'"));
             $me['overtredingen'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `overtredingen`\r\n                                                     FROM `UserRule`\r\n                                                     JOIN  ( SELECT DISTINCT F0.`UserRule`, F1.`display`\r\n                                                                    FROM `violates2` AS F0, `Violation` AS F1\r\n                                                                   WHERE F0.`Violation`=F1.`I`\r\n                                                                ) AS f1\r\n                                                       ON `f1`.`UserRule`='" . addslashes($id) . "'\r\n                                                    WHERE `UserRule`.`I`='" . addslashes($id) . "'"));
             $me['populatie van subexpressies'] = firstCol(DB_doquer("SELECT DISTINCT `SubExpression`.`I` AS `populatie van subexpressies`\r\n                                                                   FROM `SubExpression`\r\n                                                                  WHERE `SubExpression`.`subexpressionOf`='" . addslashes($id) . "'"));
             $me['relaties'] = firstCol(DB_doquer("SELECT DISTINCT `morphisms1`.`Relation` AS `relaties`\r\n                                                FROM `UserRule`\r\n                                                JOIN `morphisms1` ON `morphisms1`.`UserRule`='" . addslashes($id) . "'\r\n                                               WHERE `UserRule`.`I`='" . addslashes($id) . "'"));
             $this->set_uitleg($me['uitleg']);
             $this->set_overtredingen($me['overtredingen']);
             $this->set_populatievansubexpressies($me['populatie van subexpressies']);
             $this->set_relaties($me['relaties']);
             $this->set_source($me['source']);
             $this->set_target($me['target']);
             $this->set_ganaarpattern($me['ga naar pattern']);
             $this->set_ganaarvorigeregel($me['ga naar vorige regel']);
             $this->set_ganaarvolgenderegel($me['ga naar volgende regel']);
             $this->set_Conceptueeldiagram($me['Conceptueel diagram']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttUserRule` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttUserRule`, `I`
                               FROM `UserRule`
                           ) AS fst
                       WHERE fst.`AttUserRule` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 7
0
 /**
  *
  * @ addslashes()
  * @param data $data
  * @return string $data
  * use '\' to transferred meaning
  * */
 public static function addslashes($data)
 {
     if (is_array($data)) {
         foreach ($data as $key => $value) {
             $data[$key] = self::addSlashes($value);
         }
     } else {
         $data = addSlashes(trim($data));
     }
     return $data;
 }
 function setNotes($employee, $semester, $requested, $registered, $notes)
 {
     global $db;
     try {
         $insertQuery = $db->prepare("INSERT INTO scheduleNotes (netID, semester, requestedHours, registeredHours, notes, guid) VALUES (:employee,:semester,:requested,:registered,:notes,:guid) ON DUPLICATE KEY UPDATE requestedHours=:requested1,registeredHours=:registered1,notes=:notes1");
         $success = $insertQuery->execute(array(':employee' => $employee, ':semester' => $semester, ':requested' => $requested, ':registered' => $registered, ':notes' => addSlashes($notes), ':guid' => newGuid(), ':requested1' => $requested, ':registered1' => $registered, ':notes1' => addSlashes($notes)));
     } catch (PDOException $e) {
         exit("error in query");
     }
     echo $success;
 }
 /**
  * tests find() with default executable
  */
 public function testFindWithSuffix()
 {
     putenv('PHP_PATH=');
     putenv('PHP_PEAR_PHP_BIN=');
     $f = new PhpExecutableFinder();
     $current = $f->find();
     //TODO maybe php executable is custom or even windows
     if (defined('PHP_WINDOWS_VERSION_BUILD')) {
         $this->assertTrue(is_executable($current));
         $this->assertTrue((bool) preg_match('/' . addSlashes(DIRECTORY_SEPARATOR) . 'php\\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable php with suffixes');
     }
 }
function insertUserToken($token)
{
    global $GMAIL;
    $userid = getMoodleIdFromSession($_COOKIE['MoodleSession']);
    mysql_connect($GMAIL->dbhost, $GMAIL->dbuser, $GMAIL->dbpassword);
    mysql_select_db($GMAIL->dbname);
    $token = addSlashes($token);
    $query = 'insert into credentials values("","' . $userid . '","' . $token . '");';
    $result = mysql_query($query);
    $row = mysql_fetch_row($result);
    mysql_close();
    header('Location: ' . $GMAIL->successRedirect);
}
Esempio n. 11
0
 function Magistrate($id = null, $court = null, $panel = null, $role = null, $Sessions = null)
 {
     $this->_id = $id;
     $this->_court = $court;
     $this->_panel = $panel;
     $this->_role = $role;
     $this->_Sessions = $Sessions;
     if (!isset($court) && isset($id)) {
         // get a Magistrate based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttParty` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttParty`, `i`
                               FROM `party`
                           ) AS fst
                       WHERE fst.`AttParty` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `party`.`i` AS `id`\n                                       , `party`.`actsas` AS `role`\n                                    FROM `party`\n                                   WHERE `party`.`i`='" . addslashes($id) . "'"));
             $me['court'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`court`\n                                             FROM `party`\n                                             JOIN  ( \n                                                          (SELECT DISTINCT Party, Court AS `court`\n                                                                FROM `clerk`\n                                                          ) UNION (SELECT DISTINCT F0.`party` AS `Party`, F1.`court`\n                                                                FROM `members` AS F0, `panel` AS F1\n                                                               WHERE F0.`Panel`=F1.`i`\n                                                          \n                                                          )\n                                                        ) AS f1\n                                               ON `f1`.`Party`='" . addslashes($id) . "'\n                                            WHERE `party`.`i`='" . addslashes($id) . "'"));
             $me['panel'] = firstCol(DB_doquer("SELECT DISTINCT `members`.`panel`\n                                             FROM `members`\n                                            WHERE `members`.`party`='" . addslashes($id) . "'"));
             $me['Sessions'] = DB_doquer("SELECT DISTINCT `f1`.`session` AS `id`\n                                        FROM `party`\n                                        JOIN  ( \n                                                     (SELECT DISTINCT party, session\n                                                           FROM `judge`\n                                                     ) UNION (SELECT DISTINCT clerk AS `party`, i AS `session`\n                                                           FROM `session`\n                                                     \n                                                     )\n                                                   ) AS f1\n                                          ON `f1`.`party`='" . addslashes($id) . "'\n                                       WHERE `party`.`i`='" . addslashes($id) . "'");
             foreach ($me['Sessions'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , `f2`.`clerk`\n                                         , `f3`.`scheduled`\n                                         , `f4`.`seatedin` AS `city`\n                                         , `f5`.`location`\n                                         , `f6`.`panel`\n                                      FROM `session`\n                                      LEFT JOIN `session` AS f2 ON `f2`.`i`='" . addslashes($v0['id']) . "'\n                                      LEFT JOIN `session` AS f3 ON `f3`.`i`='" . addslashes($v0['id']) . "'\n                                      LEFT JOIN  ( SELECT DISTINCT F0.`i`, F1.`seatedin`\n                                                     FROM `session` AS F0, `court` AS F1\n                                                    WHERE F0.`location`=F1.`i`\n                                                 ) AS f4\n                                        ON `f4`.`i`='" . addslashes($v0['id']) . "'\n                                      LEFT JOIN `session` AS f5 ON `f5`.`i`='" . addslashes($v0['id']) . "'\n                                      LEFT JOIN `session` AS f6 ON `f6`.`i`='" . addslashes($v0['id']) . "'\n                                     WHERE `session`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['judge'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `judge`\n                                               FROM `session`\n                                               JOIN `judge` AS f1 ON `f1`.`session`='" . addslashes($v0['id']) . "'\n                                              WHERE `session`.`i`='" . addslashes($v0['id']) . "'"));
                 $v1 = $v0['panel'];
                 $v0['panel'] = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v1) . "' AS `id`\n                                                  , `f2`.`court`\n                                               FROM `panel`\n                                               LEFT JOIN `panel` AS f2 ON `f2`.`i`='" . addslashes($v1) . "'\n                                              WHERE `panel`.`i`='" . addslashes($v1) . "'"));
             }
             unset($v0);
             $this->set_court($me['court']);
             $this->set_panel($me['panel']);
             $this->set_role($me['role']);
             $this->set_Sessions($me['Sessions']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttParty` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttParty`, `i`
                               FROM `party`
                           ) AS fst
                       WHERE fst.`AttParty` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 function Signal($id = null, $_source = null, $_target = null, $_relations = null, $_explanation = null, $_previous = null, $_next = null, $_pattern = null, $_contains = null)
 {
     $this->id = $id;
     $this->_source = $_source;
     $this->_target = $_target;
     $this->_relations = $_relations;
     $this->_explanation = $_explanation;
     $this->_previous = $_previous;
     $this->_next = $_next;
     $this->_pattern = $_pattern;
     $this->_contains = $_contains;
     if (!isset($_source) && isset($id)) {
         // get a Signal based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttSignal` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttSignal`, `I`
                               FROM `Signal`
                           ) AS fst
                       WHERE fst.`AttSignal` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `Signal`.`I` AS `id`\r\n                                       , `Signal`.`previous`\r\n                                       , `Signal`.`next`\r\n                                       , `Signal`.`pattern`\r\n                                       , `f1`.`source`\r\n                                       , `f2`.`target`\r\n                                       , `f3`.`display` AS `explanation`\r\n                                    FROM `Signal`\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`source`\r\n                                                   FROM `Signal` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f1\r\n                                      ON `f1`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`target`\r\n                                                   FROM `Signal` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f2\r\n                                      ON `f2`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `Signal` AS F0, `Explanation` AS F1\r\n                                                  WHERE F0.`explanation`=F1.`I`\r\n                                               ) AS f3\r\n                                      ON `f3`.`I`='" . addslashes($id) . "'\r\n                                   WHERE `Signal`.`I`='" . addslashes($id) . "'"));
             $me['relations'] = firstCol(DB_doquer("SELECT DISTINCT `morphisms2`.`Relation` AS `relations`\r\n                                                 FROM `Signal`\r\n                                                 JOIN `morphisms2` ON `morphisms2`.`Signal`='" . addslashes($id) . "'\r\n                                                WHERE `Signal`.`I`='" . addslashes($id) . "'"));
             $me['contains'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `contains`\r\n                                                FROM `Signal`\r\n                                                JOIN  ( SELECT DISTINCT F0.`Signal`, F1.`display`\r\n                                                               FROM `contains3` AS F0, `Pair` AS F1\r\n                                                              WHERE F0.`Pair`=F1.`I`\r\n                                                           ) AS f1\r\n                                                  ON `f1`.`Signal`='" . addslashes($id) . "'\r\n                                               WHERE `Signal`.`I`='" . addslashes($id) . "'"));
             $this->set_source($me['source']);
             $this->set_target($me['target']);
             $this->set_relations($me['relations']);
             $this->set_explanation($me['explanation']);
             $this->set_previous($me['previous']);
             $this->set_next($me['next']);
             $this->set_pattern($me['pattern']);
             $this->set_contains($me['contains']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttSignal` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttSignal`, `I`
                               FROM `Signal`
                           ) AS fst
                       WHERE fst.`AttSignal` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 13
0
 function Party($id = null, $cases = null, $role = null, $authorized = null)
 {
     $this->_id = $id;
     $this->_cases = $cases;
     $this->_role = $role;
     $this->_authorized = $authorized;
     if (!isset($cases) && isset($id)) {
         // get a Party based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttParty` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttParty`, `i`
                               FROM `party`
                           ) AS fst
                       WHERE fst.`AttParty` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `party`.`i` AS `id`\n                                       , `party`.`actsas` AS `role`\n                                    FROM `party`\n                                   WHERE `party`.`i`='" . addslashes($id) . "'"));
             $me['cases'] = DB_doquer("SELECT DISTINCT `f1`.`legalcase` AS `id`\n                                     FROM `party`\n                                     JOIN  ( \n                                                  (SELECT DISTINCT party, legalcase\n                                                        FROM `plaintiff`\n                                                  ) UNION (SELECT DISTINCT party, legalcase\n                                                        FROM `defendant`\n                                                  \n                                                  )\n                                                ) AS f1\n                                       ON `f1`.`party`='" . addslashes($id) . "'\n                                    WHERE `party`.`i`='" . addslashes($id) . "'");
             $me['authorized'] = DB_doquer("SELECT DISTINCT `f1`.`document` AS `id`\n                                          FROM `party`\n                                          JOIN `authby` AS f1 ON `f1`.`Party`='" . addslashes($id) . "'\n                                         WHERE `party`.`i`='" . addslashes($id) . "'");
             foreach ($me['cases'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , '" . addslashes($v0['id']) . "' AS `nr`\n                                         , `f3`.`areaoflaw` AS `area of law`\n                                      FROM `legalcase`\n                                      LEFT JOIN `legalcase` AS f3 ON `f3`.`i`='" . addslashes($v0['id']) . "'\n                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['type of case'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`casetype` AS `type of case`\n                                                      FROM `legalcase`\n                                                      JOIN  ( \n                                                                   (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appeal` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appealtoadmincourt` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `objection` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   \n                                                                   \n                                                                   )\n                                                                 ) AS f1\n                                                        ON `f1`.`legalcase`='" . addslashes($v0['id']) . "'\n                                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             foreach ($me['authorized'] as $i0 => &$v0) {
                 $v0['representative'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`Party` AS `representative`\n                                                        FROM `document`\n                                                        JOIN `writtenauthof` AS f1 ON `f1`.`document`='" . addslashes($v0['id']) . "'\n                                                       WHERE `document`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_cases($me['cases']);
             $this->set_role($me['role']);
             $this->set_authorized($me['authorized']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttParty` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttParty`, `i`
                               FROM `party`
                           ) AS fst
                       WHERE fst.`AttParty` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 14
0
function daoGetUser($username)
{
    if (isset($username)) {
        // something like this? necessary, mysql_dao could possibly do this?
        $username = addSlashes($username);
        $select = "SELECT username, password, email, firstname, lastname, webpage, birthdate, description ";
        $from = "FROM user ";
        $where = "WHERE username = " . $username;
        $query = $select . $from . $where;
        $userinfo = getArray($query);
        return new User($userinfo['username'], $userinfo['password'], $userinfo['email'], $userinfo['firstname'], $userinfo['lastname'], $userinfo['webpage'], $userinfo['birthdate'], $userinfo['description']);
    } else {
        //TODO: Error msg, no user.
    }
}
 /**
  * tests find() with default executable.
  */
 public function testFindWithSuffix()
 {
     if (defined('PHP_BINARY')) {
         $this->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
     }
     putenv('PHP_PATH=');
     putenv('PHP_PEAR_PHP_BIN=');
     $f = new PhpExecutableFinder();
     $current = $f->find();
     //TODO maybe php executable is custom or even Windows
     if ('\\' === DIRECTORY_SEPARATOR) {
         $this->assertTrue(is_executable($current));
         $this->assertTrue((bool) preg_match('/' . addSlashes(DIRECTORY_SEPARATOR) . 'php\\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes');
     }
 }
Esempio n. 16
0
 function City($id = null, $courtoffice = null, $jurisdiction = null, $courtofappeal = null, $sessions = null)
 {
     $this->_id = $id;
     $this->_courtoffice = $courtoffice;
     $this->_jurisdiction = $jurisdiction;
     $this->_courtofappeal = $courtofappeal;
     $this->_sessions = $sessions;
     if (!isset($courtoffice) && isset($id)) {
         // get a City based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttCity` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttCity`, `i`
                               FROM `city`
                           ) AS fst
                       WHERE fst.`AttCity` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `city`.`i` AS `id`\n                                       , `city`.`jurisdiction`\n                                       , `f1`.`district` AS `court of appeal`\n                                    FROM `city`\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`i`, F1.`district`\n                                                   FROM `city` AS F0, `court` AS F1\n                                                  WHERE F0.`jurisdiction`=F1.`i`\n                                               ) AS f1\n                                      ON `f1`.`i`='" . addslashes($id) . "'\n                                   WHERE `city`.`i`='" . addslashes($id) . "'"));
             $me['court office'] = firstCol(DB_doquer("SELECT DISTINCT `court`.`i` AS `court office`\n                                                    FROM `court`\n                                                   WHERE `court`.`seatedin`='" . addslashes($id) . "'"));
             $me['sessions'] = DB_doquer("SELECT DISTINCT `f1`.`i` AS `id`\n                                        FROM `city`\n                                        JOIN  ( SELECT DISTINCT F0.`seatedin`, F1.`i`\n                                                       FROM `court` AS F0, `session` AS F1\n                                                      WHERE F0.`i`=F1.`location`\n                                                   ) AS f1\n                                          ON `f1`.`seatedin`='" . addslashes($id) . "'\n                                       WHERE `city`.`i`='" . addslashes($id) . "'");
             foreach ($me['sessions'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , '" . addslashes($v0['id']) . "' AS `Session`\n                                         , `f3`.`scheduled`\n                                         , `f4`.`panel`\n                                      FROM `session`\n                                      LEFT JOIN `session` AS f3 ON `f3`.`i`='" . addslashes($v0['id']) . "'\n                                      LEFT JOIN `session` AS f4 ON `f4`.`i`='" . addslashes($v0['id']) . "'\n                                     WHERE `session`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['judge'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `judge`\n                                               FROM `session`\n                                               JOIN `judge` AS f1 ON `f1`.`session`='" . addslashes($v0['id']) . "'\n                                              WHERE `session`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_courtoffice($me['court office']);
             $this->set_jurisdiction($me['jurisdiction']);
             $this->set_courtofappeal($me['court of appeal']);
             $this->set_sessions($me['sessions']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttCity` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttCity`, `i`
                               FROM `city`
                           ) AS fst
                       WHERE fst.`AttCity` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 17
0
/**
  * This is the main function. 
  * It figures out if a list of quizzes, questions
  * or results should be displayed and displays the correct thing
  *
  * @see displayQuizInfo
  * @see [QuizSession::]getScore()
  *
  * @return string $displayString The correct page HTML
*/
function getPageHtml()
{
    // { datatables
    WW_addScript('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/' . 'jquery.dataTables.min.js');
    WW_addScript('/j/datatables-delay.js');
    WW_addCSS('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/' . 'jquery.dataTables.css');
    WW_addCSS('http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/' . 'jquery.dataTables_themeroller.css');
    // }
    // { The Script
    $displayString = '<script defer="defer">' . '$(function(){' . '$(\'#quizzesFrontend\').dataTable().fnSetFilteringDelay();' . '});' . '</script>';
    // }
    $quizzes = dbAll("SELECT DISTINCT \n\t\t\tquiz_quizzes.id, \n\t\t\tname, \n\t\t\tquiz_quizzes.description \n\t\t\tFROM quiz_quizzes, quiz_questions \n\t\t\tWHERE quiz_quizzes.id=quiz_questions.quiz_id \n\t\t\tand quiz_quizzes.enabled=1");
    $displayString = $displayString . '<form method="post">';
    $displayString = $displayString . '<table id="quizzesFrontend" 
										style="{width:100% postion:top}">';
    $displayString = $displayString . '<thead><tr>';
    $displayString = $displayString . '<th>Name</th>';
    $displayString = $displayString . '<th>Description</th>';
    $displayString = $displayString . '<th>&nbsp</th>';
    $displayString = $displayString . '</tr></thead>';
    $displayString = $displayString . '<tbody>';
    foreach ($quizzes as $quiz) {
        $quizId = $quiz['id'];
        $name = $quiz['name'];
        $topic = $quiz['description'];
        $id = $quiz['id'];
        $displayString = $displayString . '<tr>';
        $displayString = $displayString . displayQuizInfo($name, $topic, $id);
        $displayString = $displayString . '</tr>';
    }
    $displayString = $displayString . '</tbody></table>';
    $displayString = $displayString . '</form>';
    if (isset($_POST['take'])) {
        $id = $_POST['take'];
        $id = addSlashes($id);
        $quiz = new QuizSession($id);
        $_SESSION['id'] = $id;
        $quiz->chooseQuestions();
        $displayString = $quiz->getQuestionPageHtml();
    }
    if (isset($_POST['check'])) {
        $quiz = new QuizSession($_SESSION['id']);
        $displayString = $quiz->checkAnswers($_SESSION['questions'], $_POST);
    }
    return $displayString;
}
Esempio n. 18
0
 public static function getSearchGamesForPlayer($pack)
 {
     $pack->auth->permission = "read_write";
     if (!users::authenticateUser($pack->auth)) {
         return new return_package(6, NULL, "Failed Authentication");
     }
     $text = urldecode(addSlashes($pack->text));
     if ($text == "") {
         return new return_package(0, array());
     }
     //technically, returns ALL games. but that's ridiculous, so return none.
     $sql_games = dbconnection::queryArray("SELECT * FROM games WHERE (name LIKE '%{$text}%' OR description LIKE '%{$text}%') AND published = TRUE ORDER BY name ASC LIMIT " . $pack->page * 25 . ",25");
     $games = array();
     for ($i = 0; $i < count($sql_games); $i++) {
         $games[] = games::gameObjectFromSQL($sql_games[$i]);
     }
     return new return_package(0, $games);
 }
Esempio n. 19
0
 function install()
 {
     global $osC_Database;
     parent::install();
     $osC_Database->simpleQuery("CREATE TABLE IF NOT EXISTS `" . DB_TABLE_PREFIX . "transactions` (`id` int(11) unsigned NOT NULL auto_increment, `order_id` varchar(100) default NULL, `order_code` varchar(100) default NULL, `transaction_id` varchar(100) default NULL, `transaction_code` varchar(100) default NULL, `transaction_method` varchar(100) default NULL, `transaction_date` int(11) unsigned default NULL, `transaction_amount` decimal(10,2) unsigned default NULL, `transaction_description` varchar(100) default NULL, `transaction_status` varchar(16) default NULL, `transaction_url` varchar(255) default NULL, `transaction_payment_url` varchar(255) default NULL, `transaction_success_url` varchar(255) default NULL, `transaction_pending_url` varchar(255) default NULL, `transaction_failure_url` varchar(255) default NULL, `transaction_params` text, `transaction_log` text, PRIMARY KEY (`id`));");
     // Load gateway setings
     require_once realpath(dirname(__FILE__) . '/../../../') . '/ext/payments/ideal/config.php';
     $aGatewaySettings = gateway_getSettings();
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('iDEAL Module', 'MODULE_PAYMENT_IDEAL_STATUS', '-1', '" . addSlashes('<iframe src="' . HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . '/ext/payments/ideal/gateway_info.php" height="400" width="343" scrolling="no" frameborder="0"></iframe>') . "<b>Enable iDEAL Module</b>', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_IDEAL_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0' , now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Remove on PAYMENT CANCELLED', 'MODULE_PAYMENT_IDEAL_REMOVE_ORDER_ON_CANCELLED', '-1', 'Remove order when payment is cancelled.', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT SUCCESS', 'MODULE_PAYMENT_IDEAL_SUCCESS_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT PENDING', 'MODULE_PAYMENT_IDEAL_PENDING_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT OPEN', 'MODULE_PAYMENT_IDEAL_OPEN_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT CANCELLED', 'MODULE_PAYMENT_IDEAL_CANCELLED_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT EXPIRED', 'MODULE_PAYMENT_IDEAL_EXPIRED_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
     $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status on PAYMENT FAILURE', 'MODULE_PAYMENT_IDEAL_FAILURE_ORDER_STATUS_ID', '0', '', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
 }
Esempio n. 20
0
 function get_table_data($table, $limit = 5)
 {
     $table_fields = $this->get_table_fields($table);
     $res = $this->select_from_table($table, $limit);
     $data = array();
     while (($row = mysql_fetch_assoc($res)) !== false) {
         $i = 0;
         foreach ($row as $field => $val) {
             if (!$table_fields[$i]->numeric) {
                 $row[$field] = '"' . addSlashes($val) . '"';
             }
             $i++;
         }
         $data['row' . (count($data) + 1)] = $row;
     }
     mysql_free_result($res);
     return $data;
 }
 function Correspondence($id = null, $case = null, $type = null, $remark = null, $sentat = null, $receivedat = null)
 {
     $this->_id = $id;
     $this->_case = $case;
     $this->_type = $type;
     $this->_remark = $remark;
     $this->_sentat = $sentat;
     $this->_receivedat = $receivedat;
     if (!isset($case) && isset($id)) {
         // get a Correspondence based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttDocument` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttDocument`, `i`
                               FROM `document`
                           ) AS fst
                       WHERE fst.`AttDocument` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `document`.`i` AS `id`\n                                       , `document`.`documenttype` AS `type`\n                                       , `document`.`sent` AS `sent at`\n                                       , `document`.`received` AS `received at`\n                                    FROM `document`\n                                   WHERE `document`.`i`='" . addslashes($id) . "'"));
             $me['case'] = firstCol(DB_doquer("SELECT DISTINCT `casefile`.`legalcase` AS `case`\n                                            FROM `casefile`\n                                           WHERE `casefile`.`document`='" . addslashes($id) . "'"));
             $me['remark'] = firstCol(DB_doquer("SELECT DISTINCT `remark`.`text` AS `remark`\n                                              FROM `remark`\n                                             WHERE `remark`.`document`='" . addslashes($id) . "'"));
             $this->set_case($me['case']);
             $this->set_type($me['type']);
             $this->set_remark($me['remark']);
             $this->set_sentat($me['sent at']);
             $this->set_receivedat($me['received at']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttDocument` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttDocument`, `i`
                               FROM `document`
                           ) AS fst
                       WHERE fst.`AttDocument` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 function Rule($id = null, $_source = null, $_target = null, $_overtredingen = null, $_uitleg = null, $_pattern = null)
 {
     $this->id = $id;
     $this->_source = $_source;
     $this->_target = $_target;
     $this->_overtredingen = $_overtredingen;
     $this->_uitleg = $_uitleg;
     $this->_pattern = $_pattern;
     if (!isset($_source) && isset($id)) {
         // get a Rule based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttRule` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttRule`, `I`
                               FROM `Rule`
                           ) AS fst
                       WHERE fst.`AttRule` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `Rule`.`I` AS `id`\r\n                                       , `Rule`.`pattern`\r\n                                       , `f1`.`source`\r\n                                       , `f2`.`target`\r\n                                       , `f3`.`display` AS `uitleg`\r\n                                    FROM `Rule`\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`source`\r\n                                                   FROM `Rule` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f1\r\n                                      ON `f1`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`target`\r\n                                                   FROM `Rule` AS F0, `Type` AS F1\r\n                                                  WHERE F0.`type`=F1.`I`\r\n                                               ) AS f2\r\n                                      ON `f2`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `Rule` AS F0, `Explanation` AS F1\r\n                                                  WHERE F0.`explanation`=F1.`I`\r\n                                               ) AS f3\r\n                                      ON `f3`.`I`='" . addslashes($id) . "'\r\n                                   WHERE `Rule`.`I`='" . addslashes($id) . "'"));
             $me['overtredingen'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `overtredingen`\r\n                                                     FROM `Rule`\r\n                                                     JOIN  ( SELECT DISTINCT F0.`Rule`, F1.`display`\r\n                                                                    FROM `violates1` AS F0, `Violation` AS F1\r\n                                                                   WHERE F0.`Violation`=F1.`I`\r\n                                                                ) AS f1\r\n                                                       ON `f1`.`Rule`='" . addslashes($id) . "'\r\n                                                    WHERE `Rule`.`I`='" . addslashes($id) . "'"));
             $this->set_source($me['source']);
             $this->set_target($me['target']);
             $this->set_overtredingen($me['overtredingen']);
             $this->set_uitleg($me['uitleg']);
             $this->set_pattern($me['pattern']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttRule` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttRule`, `I`
                               FROM `Rule`
                           ) AS fst
                       WHERE fst.`AttRule` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 function Bestand($id = null, $_path = null, $_filesession = null, $_compilations = null)
 {
     $this->id = $id;
     $this->_path = $_path;
     $this->_filesession = $_filesession;
     $this->_compilations = $_compilations;
     if (!isset($_path) && isset($id)) {
         // get a Bestand based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttBestand` AS `Id`
                        FROM 
                           ( SELECT DISTINCT `Id` AS `AttBestand`, `Id`
                               FROM `BestandTbl`
                           ) AS fst
                       WHERE fst.`AttBestand` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `BestandTbl`.`Id` AS `id`\r\n                                       , `BestandTbl`.`path`\r\n                                       , `SessieTbl`.`Id` AS `filesession`\r\n                                    FROM `BestandTbl`\r\n                                    LEFT JOIN `SessieTbl` ON `SessieTbl`.`bestand`='" . addslashes($id) . "'\r\n                                   WHERE `BestandTbl`.`Id`='" . addslashes($id) . "'"));
             $me['compilations'] = DB_doquer("SELECT DISTINCT `ActieTbl`.`Id` AS `id`\r\n                                            FROM `ActieTbl`\r\n                                           WHERE `ActieTbl`.`object`='" . addslashes($id) . "'");
             foreach ($me['compilations'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\r\n                                         , '" . addslashes($v0['id']) . "' AS `id`\r\n                                         , `f3`.`type` AS `operatie`\r\n                                      FROM `ActieTbl`\r\n                                      LEFT JOIN `ActieTbl` AS f3 ON `f3`.`Id`='" . addslashes($v0['id']) . "'\r\n                                     WHERE `ActieTbl`.`Id`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_path($me['path']);
             $this->set_filesession($me['filesession']);
             $this->set_compilations($me['compilations']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttBestand` AS `Id`
                        FROM 
                           ( SELECT DISTINCT `Id` AS `AttBestand`, `Id`
                               FROM `BestandTbl`
                           ) AS fst
                       WHERE fst.`AttBestand` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 24
0
 function Process($id = null, $session = null, $case = null)
 {
     $this->_id = $id;
     $this->_session = $session;
     $this->_case = $case;
     if (!isset($session) && isset($id)) {
         // get a Process based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttProcess` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttProcess`, `i`
                               FROM `process`
                           ) AS fst
                       WHERE fst.`AttProcess` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `process`.`i` AS `id`\n                                       , `process`.`session`\n                                       , `process`.`legalcase` AS `case`\n                                    FROM `process`\n                                   WHERE `process`.`i`='" . addslashes($id) . "'"));
             $v0 = $me['session'];
             $me['session'] = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0) . "' AS `id`\n                                                  , `f2`.`location` AS `court`\n                                                  , `f3`.`clerk`\n                                                  , `f4`.`scheduled`\n                                                  , `f5`.`occured` AS `date of occurence`\n                                               FROM `session`\n                                               LEFT JOIN `session` AS f2 ON `f2`.`i`='" . addslashes($v0) . "'\n                                               LEFT JOIN `session` AS f3 ON `f3`.`i`='" . addslashes($v0) . "'\n                                               LEFT JOIN `session` AS f4 ON `f4`.`i`='" . addslashes($v0) . "'\n                                               LEFT JOIN `session` AS f5 ON `f5`.`i`='" . addslashes($v0) . "'\n                                              WHERE `session`.`i`='" . addslashes($v0) . "'"));
             $me['session']['judge'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `judge`\n                                                        FROM `session`\n                                                        JOIN `judge` AS f1 ON `f1`.`session`='" . addslashes($v0) . "'\n                                                       WHERE `session`.`i`='" . addslashes($v0) . "'"));
             $v0 = $me['case'];
             $me['case'] = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0) . "' AS `id`\n                                               , `f2`.`areaoflaw` AS `area of law`\n                                            FROM `legalcase`\n                                            LEFT JOIN `legalcase` AS f2 ON `f2`.`i`='" . addslashes($v0) . "'\n                                           WHERE `legalcase`.`i`='" . addslashes($v0) . "'"));
             $me['case']['type of case'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`casetype` AS `type of case`\n                                                            FROM `legalcase`\n                                                            JOIN  ( \n                                                                         (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                               FROM `appeal` AS F0, `legalcase` AS F1\n                                                                              WHERE F0.`legalcase1`=F1.`i`\n                                                                         ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                               FROM `appealtoadmincourt` AS F0, `legalcase` AS F1\n                                                                              WHERE F0.`legalcase1`=F1.`i`\n                                                                         ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                               FROM `objection` AS F0, `legalcase` AS F1\n                                                                              WHERE F0.`legalcase1`=F1.`i`\n                                                                         \n                                                                         \n                                                                         )\n                                                                       ) AS f1\n                                                              ON `f1`.`legalcase`='" . addslashes($v0) . "'\n                                                           WHERE `legalcase`.`i`='" . addslashes($v0) . "'"));
             $me['case']['session'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`session`\n                                                       FROM `legalcase`\n                                                       JOIN  ( SELECT DISTINCT F0.`legalcase`, F1.`session`\n                                                                      FROM `process` AS F0, `process` AS F1\n                                                                     WHERE F0.`i`=F1.`i`\n                                                                  ) AS f1\n                                                         ON `f1`.`legalcase`='" . addslashes($v0) . "'\n                                                      WHERE `legalcase`.`i`='" . addslashes($v0) . "'"));
             $this->set_session($me['session']);
             $this->set_case($me['case']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttProcess` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttProcess`, `i`
                               FROM `process`
                           ) AS fst
                       WHERE fst.`AttProcess` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 function Concept($id = null, $_beschrijving = null, $_populatie = null, $_toepassinginregels = null, $_Conceptueeldiagram = null)
 {
     $this->id = $id;
     $this->_beschrijving = $_beschrijving;
     $this->_populatie = $_populatie;
     $this->_toepassinginregels = $_toepassinginregels;
     $this->_Conceptueeldiagram = $_Conceptueeldiagram;
     if (!isset($_beschrijving) && isset($id)) {
         // get a Concept based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttConcept` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttConcept`, `I`
                               FROM `Concept`
                           ) AS fst
                       WHERE fst.`AttConcept` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `Concept`.`I` AS `id`\r\n                                       , `f1`.`display` AS `beschrijving`\r\n                                       , `f2`.`display` AS `Conceptueel diagram`\r\n                                    FROM `Concept`\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `Concept` AS F0, `Explanation` AS F1\r\n                                                  WHERE F0.`description`=F1.`I`\r\n                                               ) AS f1\r\n                                      ON `f1`.`I`='" . addslashes($id) . "'\r\n                                    LEFT JOIN  ( SELECT DISTINCT F0.`I`, F1.`display`\r\n                                                   FROM `Concept` AS F0, `Picture` AS F1\r\n                                                  WHERE F0.`picture`=F1.`I`\r\n                                               ) AS f2\r\n                                      ON `f2`.`I`='" . addslashes($id) . "'\r\n                                   WHERE `Concept`.`I`='" . addslashes($id) . "'"));
             $me['populatie'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `populatie`\r\n                                                 FROM `Concept`\r\n                                                 JOIN  ( SELECT DISTINCT F0.`Concept`, F1.`display`\r\n                                                                FROM `contains2` AS F0, `Atom` AS F1\r\n                                                               WHERE F0.`Atom`=F1.`I`\r\n                                                            ) AS f1\r\n                                                   ON `f1`.`Concept`='" . addslashes($id) . "'\r\n                                                WHERE `Concept`.`I`='" . addslashes($id) . "'"));
             $me['toepassing in regel(s)'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`UserRule` AS `toepassing in regel(s)`\r\n                                                              FROM `Concept`\r\n                                                              JOIN  ( SELECT DISTINCT F0.`source`, F2.`UserRule`\r\n                                                                             FROM \r\n                                                                                ( \r\n                                                                                  (SELECT DISTINCT source, I\r\n                                                                                        FROM `Type`\r\n                                                                                  ) UNION (SELECT DISTINCT target AS `source`, I\r\n                                                                                        FROM `Type`\r\n                                                                                  \r\n                                                                                  )\r\n                                                                                ) AS F0, `relvar` AS F1, `morphisms1` AS F2\r\n                                                                            WHERE F0.`I`=F1.`Type`\r\n                                                                              AND F1.`Relation`=F2.`Relation`\r\n                                                                         ) AS f1\r\n                                                                ON `f1`.`source`='" . addslashes($id) . "'\r\n                                                             WHERE `Concept`.`I`='" . addslashes($id) . "'"));
             $this->set_beschrijving($me['beschrijving']);
             $this->set_populatie($me['populatie']);
             $this->set_toepassinginregels($me['toepassing in regel(s)']);
             $this->set_Conceptueeldiagram($me['Conceptueel diagram']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttConcept` AS `I`
                        FROM 
                           ( SELECT DISTINCT `I` AS `AttConcept`, `I`
                               FROM `Concept`
                           ) AS fst
                       WHERE fst.`AttConcept` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 26
0
 function Document($id = null, $type = null, $case = null)
 {
     $this->_id = $id;
     $this->_type = $type;
     $this->_case = $case;
     if (!isset($type) && isset($id)) {
         // get a Document based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttDocument` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttDocument`, `i`
                               FROM `document`
                           ) AS fst
                       WHERE fst.`AttDocument` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `document`.`i` AS `id`\n                                       , `document`.`documenttype` AS `type`\n                                    FROM `document`\n                                   WHERE `document`.`i`='" . addslashes($id) . "'"));
             $me['case'] = DB_doquer("SELECT DISTINCT `casefile`.`legalcase` AS `id`\n                                    FROM `casefile`\n                                   WHERE `casefile`.`document`='" . addslashes($id) . "'");
             foreach ($me['case'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , `f2`.`areaoflaw` AS `area of law`\n                                      FROM `legalcase`\n                                      LEFT JOIN `legalcase` AS f2 ON `f2`.`i`='" . addslashes($v0['id']) . "'\n                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['type of case'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`casetype` AS `type of case`\n                                                      FROM `legalcase`\n                                                      JOIN  ( \n                                                                   (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appeal` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appealtoadmincourt` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `objection` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   \n                                                                   \n                                                                   )\n                                                                 ) AS f1\n                                                        ON `f1`.`legalcase`='" . addslashes($v0['id']) . "'\n                                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_type($me['type']);
             $this->set_case($me['case']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttDocument` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttDocument`, `i`
                               FROM `document`
                           ) AS fst
                       WHERE fst.`AttDocument` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
 /**
  * Editor k přidávání členů skupiny
  *
  * @param IEHost $host
  */
 public function __construct($host)
 {
     parent::__construct();
     $fieldName = $host->getmyKeyColumn();
     $initialContent = new EaseTWBPanel(_('rodiče hostu'));
     $addparentForm = $initialContent->addItem(new EaseTWBForm('addparent'));
     $addparentForm->addItem(new EaseTWBFormGroup(_('IP nebo Hostname'), new EaseHtmlInputTextTag('newparent')));
     $addparentForm->addItem(new EaseHtmlInputHiddenTag($fieldName, $host->getId()));
     $addparentForm->addItem(new EaseTWSubmitButton(_('Přidat rodiče'), 'success'));
     $initialContent->setTagCss(array('width' => '100%'));
     if (is_null($host->getMyKey())) {
         $initialContent->addItem(_('Nejprve je potřeba uložit záznam'));
     } else {
         $allParents = $host->getListing();
         unset($allParents[$host->getID()]);
         //Nenabízet sám sebe jako rodiče
         foreach ($allParents as $parentID => $parentInfo) {
             if ($parentInfo['register'] != 1) {
                 unset($allParents[$parentID]);
             }
         }
         $parentsAssigned = array();
         foreach ($host->getDataValue('parents') as $parentAssigned) {
             $parentID = EaseShared::myDbLink()->queryToValue('SELECT `' . $host->myKeyColumn . '` FROM ' . $host->myTable . ' WHERE `' . $host->nameColumn . '` = \'' . addSlashes($parentAssigned) . '\'');
             $parentsAssigned[$parentID][$host->nameColumn] = $parentAssigned;
             $parentsAssigned[$parentID][$host->myKeyColumn] = $parentID;
             unset($allParents[$parentID]);
         }
         if (count($allParents)) {
             foreach ($allParents as $parentID => $parentInfo) {
                 $initialContent->addItem($this->parentButton($parentInfo, 'plus', $host));
             }
         }
         if (count($parentsAssigned)) {
             $initialContent->addItem('</br>');
             foreach ($parentsAssigned as $parentID => $parentInfo) {
                 $initialContent->addItem($this->parentButton($parentInfo, 'remove', $host));
             }
         }
     }
     $this->addItem($initialContent);
 }
 public function isPasswordValid($password, $passwordConfirm)
 {
     try {
         // Error checking
         if ($password != $passwordConfirm) {
             throw new Exception('Passwords do not match');
         }
         if (strlen($password) < $this->FOGCore->getSetting('FOG_USER_MINPASSLENGTH')) {
             throw new Exception('Password too short');
         }
         if (preg_replace('/[' . preg_quote(addSlashes($this->FOGCore->getSetting('FOG_USER_VALIDPASSCHARS'))) . ']/', '', $password) != '') {
             throw new Exception('Invalid characters in password');
         }
         // Success
         return true;
     } catch (Exception $e) {
         throw new Exception($e->getMessage());
         // Fail
         return false;
     }
 }
Esempio n. 29
0
 function AreaOfLaw($id = null, $Cases = null)
 {
     $this->_id = $id;
     $this->_Cases = $Cases;
     if (!isset($Cases) && isset($id)) {
         // get a AreaOfLaw based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttAreaOfLaw` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttAreaOfLaw`, `i`
                               FROM `areaoflaw`
                           ) AS fst
                       WHERE fst.`AttAreaOfLaw` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = array();
             $me['Cases'] = DB_doquer("SELECT DISTINCT `legalcase`.`i` AS `id`\n                                     FROM `legalcase`\n                                    WHERE `legalcase`.`areaoflaw`='" . addslashes($id) . "'");
             foreach ($me['Cases'] as $i0 => &$v0) {
                 $v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n                                         , '" . addslashes($v0['id']) . "' AS `nr`\n                                      FROM `legalcase`\n                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
                 $v0['type of case'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`casetype` AS `type of case`\n                                                      FROM `legalcase`\n                                                      JOIN  ( \n                                                                   (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appeal` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `appealtoadmincourt` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   ) UNION (SELECT DISTINCT F0.`legalcase`, F1.`casetype`\n                                                                         FROM `objection` AS F0, `legalcase` AS F1\n                                                                        WHERE F0.`legalcase1`=F1.`i`\n                                                                   \n                                                                   \n                                                                   )\n                                                                 ) AS f1\n                                                        ON `f1`.`legalcase`='" . addslashes($v0['id']) . "'\n                                                     WHERE `legalcase`.`i`='" . addslashes($v0['id']) . "'"));
             }
             unset($v0);
             $this->set_Cases($me['Cases']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttAreaOfLaw` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttAreaOfLaw`, `i`
                               FROM `areaoflaw`
                           ) AS fst
                       WHERE fst.`AttAreaOfLaw` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }
Esempio n. 30
0
 function Panel($id = null, $court = null, $members = null, $sessions = null)
 {
     $this->_id = $id;
     $this->_court = $court;
     $this->_members = $members;
     $this->_sessions = $sessions;
     if (!isset($court) && isset($id)) {
         // get a Panel based on its identifier
         // check if it exists:
         $ctx = DB_doquer('SELECT DISTINCT fst.`AttPanel` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttPanel`, `i`
                               FROM `panel`
                           ) AS fst
                       WHERE fst.`AttPanel` = \'' . addSlashes($id) . '\'');
         if (count($ctx) == 0) {
             $this->_new = true;
         } else {
             $this->_new = false;
             // fill the attributes
             $me = firstRow(DB_doquer("SELECT DISTINCT `panel`.`i` AS `id`\n                                       , `panel`.`court`\n                                    FROM `panel`\n                                   WHERE `panel`.`i`='" . addslashes($id) . "'"));
             $me['members'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `members`\n                                               FROM `panel`\n                                               JOIN `members` AS f1 ON `f1`.`Panel`='" . addslashes($id) . "'\n                                              WHERE `panel`.`i`='" . addslashes($id) . "'"));
             $me['sessions'] = firstCol(DB_doquer("SELECT DISTINCT `session`.`i` AS `sessions`\n                                                FROM `session`\n                                               WHERE `session`.`panel`='" . addslashes($id) . "'"));
             $this->set_court($me['court']);
             $this->set_members($me['members']);
             $this->set_sessions($me['sessions']);
         }
     } else {
         if (isset($id)) {
             // just check if it exists
             $ctx = DB_doquer('SELECT DISTINCT fst.`AttPanel` AS `i`
                        FROM 
                           ( SELECT DISTINCT `i` AS `AttPanel`, `i`
                               FROM `panel`
                           ) AS fst
                       WHERE fst.`AttPanel` = \'' . addSlashes($id) . '\'');
             $this->_new = count($ctx) == 0;
         }
     }
 }