本文整理汇总了PHP中firstCol函数的典型用法代码示例。如果您正苦于以下问题:PHP firstCol函数的具体用法?PHP firstCol怎么用?PHP firstCol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了firstCol函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Overtredingen
function Overtredingen($_deregel = null, $_decardinaliteitseigenschap = null, $_dehomogeneeigenschap = null)
{
$this->_deregel = $_deregel;
$this->_decardinaliteitseigenschap = $_decardinaliteitseigenschap;
$this->_dehomogeneeigenschap = $_dehomogeneeigenschap;
if (!isset($_deregel)) {
// get a Overtredingen based on its identifier
// fill the attributes
$me = array();
$me['de regel'] = DB_doquer("SELECT DISTINCT `f1`.`UserRule` AS `id`\r\n FROM ( SELECT DISTINCT fst.`UserRule`\r\n FROM \r\n ( SELECT DISTINCT F0.`I`, F1.`UserRule`\r\n FROM \r\n ( SELECT DISTINCT TODO.`I`, TODO.`I` AS i1 FROM `Violation` AS TODO WHERE TODO.`User`='" . $GLOBALS['ctxenv']['User'] . "'AND TODO.`Script`='" . $GLOBALS['ctxenv']['Script'] . "'\r\n ) AS F0, `violates2` AS F1\r\n WHERE F0.`I1`=F1.`Violation`\r\n ) AS fst\r\n WHERE fst.`UserRule` IS NOT NULL\r\n ) AS f1");
$me['de cardinaliteitseigenschap'] = DB_doquer("SELECT DISTINCT `f1`.`MultiplicityRule` AS `id`\r\n FROM ( SELECT DISTINCT fst.`MultiplicityRule`\r\n FROM \r\n ( SELECT DISTINCT F0.`I`, F1.`MultiplicityRule`\r\n FROM \r\n ( SELECT DISTINCT TODO.`I`, TODO.`I` AS i1 FROM `Violation` AS TODO WHERE TODO.`User`='" . $GLOBALS['ctxenv']['User'] . "'AND TODO.`Script`='" . $GLOBALS['ctxenv']['Script'] . "'\r\n ) AS F0, `violates3` AS F1\r\n WHERE F0.`I1`=F1.`Violation`\r\n ) AS fst\r\n WHERE fst.`MultiplicityRule` IS NOT NULL\r\n ) AS f1");
$me['de homogene eigenschap'] = DB_doquer("SELECT DISTINCT `f1`.`HomogeneousRule` AS `id`\r\n FROM ( SELECT DISTINCT fst.`HomogeneousRule`\r\n FROM \r\n ( SELECT DISTINCT F0.`I`, F1.`HomogeneousRule`\r\n FROM \r\n ( SELECT DISTINCT TODO.`I`, TODO.`I` AS i1 FROM `Violation` AS TODO WHERE TODO.`User`='" . $GLOBALS['ctxenv']['User'] . "'AND TODO.`Script`='" . $GLOBALS['ctxenv']['Script'] . "'\r\n ) AS F0, `violates4` AS F1\r\n WHERE F0.`I1`=F1.`Violation`\r\n ) AS fst\r\n WHERE fst.`HomogeneousRule` IS NOT NULL\r\n ) AS f1");
foreach ($me['de regel'] as $i0 => &$v0) {
$v0['wordt overtreden door'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `wordt overtreden door`\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($v0['id']) . "'\r\n WHERE `UserRule`.`I`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
foreach ($me['de cardinaliteitseigenschap'] as $i0 => &$v0) {
$v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\r\n , `f2`.`display` AS `eigenschap`\r\n , `f3`.`on` AS `van relatie`\r\n FROM `MultiplicityRule`\r\n LEFT JOIN ( SELECT DISTINCT F0.`I`, F1.`display`\r\n FROM `MultiplicityRule` AS F0, `Prop` AS F1\r\n WHERE F0.`property`=F1.`I`\r\n ) AS f2\r\n ON `f2`.`I`='" . addslashes($v0['id']) . "'\r\n LEFT JOIN `MultiplicityRule` AS f3 ON `f3`.`I`='" . addslashes($v0['id']) . "'\r\n WHERE `MultiplicityRule`.`I`='" . addslashes($v0['id']) . "'"));
$v0['wordt overtreden door'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `wordt overtreden door`\r\n FROM `MultiplicityRule`\r\n JOIN ( SELECT DISTINCT F0.`MultiplicityRule`, F1.`display`\r\n FROM `violates3` AS F0, `Violation` AS F1\r\n WHERE F0.`Violation`=F1.`I`\r\n ) AS f1\r\n ON `f1`.`MultiplicityRule`='" . addslashes($v0['id']) . "'\r\n WHERE `MultiplicityRule`.`I`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
foreach ($me['de homogene eigenschap'] as $i0 => &$v0) {
$v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\r\n , `f2`.`display` AS `eigenschap`\r\n , `f3`.`on` AS `van relatie`\r\n FROM `HomogeneousRule`\r\n LEFT JOIN ( SELECT DISTINCT F0.`I`, F1.`display`\r\n FROM `HomogeneousRule` AS F0, `Prop` AS F1\r\n WHERE F0.`property`=F1.`I`\r\n ) AS f2\r\n ON `f2`.`I`='" . addslashes($v0['id']) . "'\r\n LEFT JOIN `HomogeneousRule` AS f3 ON `f3`.`I`='" . addslashes($v0['id']) . "'\r\n WHERE `HomogeneousRule`.`I`='" . addslashes($v0['id']) . "'"));
$v0['wordt overtreden door'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`display` AS `wordt overtreden door`\r\n FROM `HomogeneousRule`\r\n JOIN ( SELECT DISTINCT F0.`HomogeneousRule`, F1.`display`\r\n FROM `violates4` AS F0, `Violation` AS F1\r\n WHERE F0.`Violation`=F1.`I`\r\n ) AS f1\r\n ON `f1`.`HomogeneousRule`='" . addslashes($v0['id']) . "'\r\n WHERE `HomogeneousRule`.`I`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
$this->set_deregel($me['de regel']);
$this->set_decardinaliteitseigenschap($me['de cardinaliteitseigenschap']);
$this->set_dehomogeneeigenschap($me['de homogene eigenschap']);
}
}
示例2: Gebruiker
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;
}
}
}
示例3: Population2
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;
}
}
}
示例4: Session
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;
}
}
}
示例5: UserRule
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;
}
}
}
示例6: Concepten
function Concepten($_Conceptenlijst = null)
{
$this->_Conceptenlijst = $_Conceptenlijst;
if (!isset($_Conceptenlijst)) {
// get a Concepten based on its identifier
// fill the attributes
$me = array();
$me['Conceptenlijst'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`I` AS `Conceptenlijst`\r\n FROM ( SELECT DISTINCT fst.`I`\r\n FROM \r\n ( SELECT DISTINCT TODO.`I`, TODO.`I` AS i1 FROM `Concept` AS TODO WHERE TODO.`User`='" . $GLOBALS['ctxenv']['User'] . "'AND TODO.`Script`='" . $GLOBALS['ctxenv']['Script'] . "'\r\n ) AS fst\r\n WHERE fst.`I` IS NOT NULL\r\n ) AS f1"));
$this->set_Conceptenlijst($me['Conceptenlijst']);
}
}
示例7: Magistrate
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;
}
}
}
示例8: CaseParties
function CaseParties($Plaintiffs = null, $Defendants = null)
{
$this->_Plaintiffs = $Plaintiffs;
$this->_Defendants = $Defendants;
if (!isset($Plaintiffs)) {
// get a CaseParties based on its identifier
// fill the attributes
$me = array();
$me['Plaintiffs'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `Plaintiffs`\n FROM ( SELECT DISTINCT fst.`party`\n FROM \n ( SELECT DISTINCT F0.`party` AS `party1`, F1.`party`\n FROM `plaintiff` AS F0, `plaintiff` AS F1\n WHERE F0.`legalcase`=F1.`legalcase`\n ) AS fst\n WHERE fst.`party` IS NOT NULL\n ) AS f1"));
$me['Defendants'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `Defendants`\n FROM ( SELECT DISTINCT fst.`party`\n FROM \n ( SELECT DISTINCT F0.`party` AS `party1`, F1.`party`\n FROM `defendant` AS F0, `defendant` AS F1\n WHERE F0.`LegalCase`=F1.`LegalCase`\n ) AS fst\n WHERE fst.`party` IS NOT NULL\n ) AS f1"));
$this->set_Plaintiffs($me['Plaintiffs']);
$this->set_Defendants($me['Defendants']);
}
}
示例9: Signal
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;
}
}
}
示例10: Party
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;
}
}
}
示例11: Sessions
function Sessions($Sessions = null)
{
$this->_Sessions = $Sessions;
if (!isset($Sessions)) {
// get a Sessions based on its identifier
// fill the attributes
$me = array();
$me['Sessions'] = DB_doquer("SELECT DISTINCT `f1`.`Session` AS `id`\n FROM ( SELECT DISTINCT csnd.i AS `Session`\n FROM `session` AS csnd\n ) AS f1");
foreach ($me['Sessions'] as $i0 => &$v0) {
$v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n , '" . addslashes($v0['id']) . "' AS `nr`\n , `f3`.`panel`\n , `f4`.`location` AS `court`\n , `f5`.`seatedin` AS `city`\n , `f6`.`clerk`\n , `f7`.`scheduled`\n , `f8`.`occured` AS `date of occurence`\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 LEFT JOIN ( SELECT DISTINCT F0.`i`, F1.`seatedin`\n FROM `session` AS F0, `court` AS F1\n WHERE F0.`location`=F1.`i`\n ) AS f5\n ON `f5`.`i`='" . addslashes($v0['id']) . "'\n LEFT JOIN `session` AS f6 ON `f6`.`i`='" . addslashes($v0['id']) . "'\n LEFT JOIN `session` AS f7 ON `f7`.`i`='" . addslashes($v0['id']) . "'\n LEFT JOIN `session` AS f8 ON `f8`.`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_Sessions($me['Sessions']);
}
}
示例12: Panels
function Panels($Panels = null)
{
$this->_Panels = $Panels;
if (!isset($Panels)) {
// get a Panels based on its identifier
// fill the attributes
$me = array();
$me['Panels'] = DB_doquer("SELECT DISTINCT `f1`.`Panel` AS `id`\n FROM ( SELECT DISTINCT csnd.i AS `Panel`\n FROM `panel` AS csnd\n ) AS f1");
foreach ($me['Panels'] as $i0 => &$v0) {
$v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n , '" . addslashes($v0['id']) . "' AS `panel`\n , `f3`.`court`\n FROM `panel`\n LEFT JOIN `panel` AS f3 ON `f3`.`i`='" . addslashes($v0['id']) . "'\n WHERE `panel`.`i`='" . addslashes($v0['id']) . "'"));
$v0['members'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`party` AS `members`\n FROM `panel`\n JOIN `members` AS f1 ON `f1`.`Panel`='" . addslashes($v0['id']) . "'\n WHERE `panel`.`i`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
$this->set_Panels($me['Panels']);
}
}
示例13: Overzicht
function Overzicht($_Patternlijst = null)
{
$this->_Patternlijst = $_Patternlijst;
if (!isset($_Patternlijst)) {
// get a Overzicht based on its identifier
// fill the attributes
$me = array();
$me['Patternlijst'] = DB_doquer("SELECT DISTINCT `f1`.`I` AS `id`\r\n FROM ( SELECT DISTINCT fst.`I`\r\n FROM \r\n ( SELECT DISTINCT TODO.`I`, TODO.`I` AS i1 FROM `Pattern` AS TODO WHERE TODO.`User`='" . $GLOBALS['ctxenv']['User'] . "'AND TODO.`Script`='" . $GLOBALS['ctxenv']['Script'] . "'\r\n ) AS fst\r\n WHERE fst.`I` IS NOT NULL\r\n ) AS f1");
foreach ($me['Patternlijst'] as $i0 => &$v0) {
$v0['regels die overtreden worden'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`UserRule` AS `regels die overtreden worden`\r\n FROM `Pattern`\r\n JOIN ( SELECT DISTINCT F0.`pattern`, F2.`UserRule`\r\n FROM `UserRule` AS F0, `violates2` AS F1, `violates2` AS F2\r\n WHERE F0.`I`=F1.`UserRule`\r\n AND F1.`Violation`=F2.`Violation`\r\n ) AS f1\r\n ON `f1`.`pattern`='" . addslashes($v0['id']) . "'\r\n WHERE `Pattern`.`I`='" . addslashes($v0['id']) . "'"));
$v0['relaties waarvan een eigenschap overtreden wordt'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`on` AS `relaties waarvan een eigenschap overtreden wordt`\r\n FROM `Pattern`\r\n JOIN ( \r\n (SELECT DISTINCT F0.`pattern`, F4.`on`\r\n FROM `Relation` AS F0, `MultiplicityRule` AS F1, `violates3` AS F2, `violates3` AS F3, `MultiplicityRule` AS F4\r\n WHERE F0.`I`=F1.`on`\r\n AND F1.`I`=F2.`MultiplicityRule`\r\n AND F2.`Violation`=F3.`Violation`\r\n AND F3.`MultiplicityRule`=F4.`I`\r\n ) UNION (SELECT DISTINCT F0.`pattern`, F4.`on`\r\n FROM `Relation` AS F0, `HomogeneousRule` AS F1, `violates4` AS F2, `violates4` AS F3, `HomogeneousRule` AS F4\r\n WHERE F0.`I`=F1.`on`\r\n AND F1.`I`=F2.`HomogeneousRule`\r\n AND F2.`Violation`=F3.`Violation`\r\n AND F3.`HomogeneousRule`=F4.`I`\r\n \r\n )\r\n ) AS f1\r\n ON `f1`.`pattern`='" . addslashes($v0['id']) . "'\r\n WHERE `Pattern`.`I`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
$this->set_Patternlijst($me['Patternlijst']);
}
}
示例14: InterestedParties
function InterestedParties($Interestedparties = null)
{
$this->_Interestedparties = $Interestedparties;
if (!isset($Interestedparties)) {
// get a InterestedParties based on its identifier
// fill the attributes
$me = array();
$me['Interested parties'] = DB_doquer("SELECT DISTINCT `f1`.`party` AS `id`\n FROM ( SELECT DISTINCT fst.`party`\n FROM \n ( \n (SELECT DISTINCT F0.`party` AS `party1`, F1.`party`\n FROM `plaintiff` AS F0, `plaintiff` AS F1\n WHERE F0.`legalcase`=F1.`legalcase`\n ) UNION (SELECT DISTINCT F0.`party` AS `party1`, F1.`party`\n FROM `defendant` AS F0, `defendant` AS F1\n WHERE F0.`LegalCase`=F1.`LegalCase`\n \n )\n ) AS fst\n WHERE fst.`party` IS NOT NULL\n ) AS f1");
foreach ($me['Interested parties'] as $i0 => &$v0) {
$v0 = firstRow(DB_doquer("SELECT DISTINCT '" . addslashes($v0['id']) . "' AS `id`\n , '" . addslashes($v0['id']) . "' AS `name`\n , `f3`.`actsas` AS `role`\n FROM `party`\n LEFT JOIN `party` AS f3 ON `f3`.`i`='" . addslashes($v0['id']) . "'\n WHERE `party`.`i`='" . addslashes($v0['id']) . "'"));
$v0['representative'] = firstCol(DB_doquer("SELECT DISTINCT `f1`.`Party` AS `representative`\n FROM `party`\n JOIN ( SELECT DISTINCT F0.`Party`\n FROM `authby` AS F0, `writtenauthof` AS F1\n WHERE F0.`document`=F1.`document`\n ) AS f1\n ON `f1`.`Party`='" . addslashes($v0['id']) . "'\n WHERE `party`.`i`='" . addslashes($v0['id']) . "'"));
}
unset($v0);
$this->set_Interestedparties($me['Interested parties']);
}
}
示例15: City
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;
}
}
}