Esempio n. 1
0
function dump_query($q, $array = NULL, $tableclass = NULL)
{
    $Connection = get_connection();
    $s = $Connection->prepare($q);
    if (is_null($array)) {
        $s->execute();
    } else {
        $s->execute($array);
    }
    return dump_result($s, $tableclass);
}
Esempio n. 2
0
<?php

$Gc = strtoupper($_SESSION['cont']);
$Connection = get_connection();
$LongName = select_from('GeneralCapability', 'ac_GeneralCapabilities WHERE GcShort = ?', array($Gc));
echo "<div class=\"alert alert-info\">This page is ugly, I know. But it provides the information in an easy to use table. I’m working on fixing this.</div>";
echo "<h1>{$LongName}</h1>";
echo "<h2>Learning Continuum</h2>";
echo "<p>Typically, by the end of Foundation Year, students achieve Level 1.<br />";
echo "Typically, by the end of Year 2, students achieve Level 2.<br />";
echo "Typically, by the end of Year 4, students achieve Level 3.<br />";
echo "Typically, by the end of Year 6, students achieve Level 4.<br />";
echo "Typically, by the end of Year 8, students achieve Level 5.<br />";
echo "Typically, by the end of Year 10, students achieve Level 6.</p>";
$Q = "\nSELECT\n  Code AS \"Subelement\",\n  Level1 AS \"Level 1\",\n  Level1a AS \"Level 1a\",\n  Level1b AS \"Level 1b\",\n  Level1c AS \"Level 1c\",\n  Level1d AS \"Level 1d\",\n  Level1e AS \"Level 1e\",\n  Level2 AS \"Level 2\",\n  Level3 AS \"Level 3\",\n  Level4 AS \"Level 4\",\n  Level5 AS \"Level 5\",\n  Level6 AS \"Level 6\"\nFROM\n  CROSSTAB\n  (\n    '\n      SELECT\n        HumanCode,\n        ContinuaLevel,\n        Point\n      FROM\n        ac_ContinuaPoints\n        JOIN\n        ac_Subelements_HumanCode\n         ON subelhumancode = humancode\n      WHERE\n        HumanCode LIKE ''{$Gc}%''\n      ORDER BY\n        HumanCode\n    ',\n    '\n      SELECT\n        ContinuaLevel\n      FROM\n        ac_ContinuaLevels\n      ORDER BY\n        ContLevOrd\n    '\n  ) AS CT\n    (\n      Code TEXT,\n      Level1 TEXT,\n      Level1a TEXT,\n      Level1b TEXT,\n      Level1c TEXT,\n      Level1d TEXT,\n      Level1e TEXT,\n      Level2 TEXT,\n      Level3 TEXT,\n      Level4 TEXT,\n      Level5 TEXT,\n      Level6 TEXT\n    )\n  JOIN\n  ac_Subelements_HumanCode\n    ON Code = SubelHumanCode\nORDER BY\n  TagOrd,\n  ElementCode,\n  SubelementCode\n";
$S = $Connection->prepare($Q);
// $S->bindValue(':a',$Gc."%",PDO::PARAM_STR);
$S->execute();
dump_result($S, 'table-bordered table-condensed');
Esempio n. 3
0
<?php

include 'inc.php';
doassert($_GET['assert']);
?>
<html>
<head>
	<title>Surrogafier Testing</title>
	<link href="assert.css" rel="stylesheet" type="text/css" />
	<style> body { font-size: 12px; line-height: 14px; } </style>
</head>
<body>
<?php 
dump_result();
?>
</body>
</html>