Example #1
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');
Example #2
0
      </div>
      <div class="panel-body">
        <?php 
echo select_from('LevelDesc', "ac_LevelDescsAchStds\n                            WHERE\n                              hSubject = ?\n                              AND\n                              hPathway = ?\n                              AND\n                              hSequence = ?\n                              AND\n                              hLevel = ?", $hArrayBroadPigeonhole);
?>
      </div>
    </div>
  </div>
  <div class="col-sm-6">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h2 class="panel-title">Achievement standard</h2>
      </div>
      <div class="panel-body">
        <?php 
echo select_from('AchStd', "ac_LevelDescsAchStds\n                            WHERE\n                              hSubject = ?\n                              AND\n                              hPathway = ?\n                              AND\n                              hSequence = ?\n                              AND\n                              hLevel = ?", $hArrayBroadPigeonhole);
?>
      </div>
    </div>
  </div>
</div>

<h2>Content descriptions</h2>

<?php 
$S = $Connection->prepare("SELECT GcShort FROM ac_GeneralCapabilities");
$S->execute();
$GcShortArray = $S->fetchAll(PDO::FETCH_COLUMN, 0);
$S = $Connection->prepare("SELECT CcpShort FROM ac_CrossCurriculumPriorities");
$S->execute();
$CcpShortArray = $S->fetchAll(PDO::FETCH_COLUMN, 0);
Example #3
0
// If that doesn’t work, see whether TempBlowfish lets us in
if (!$CorrectPassword) {
    $Query = "SELECT TempBlowfish\n              FROM framy_Blowfish\n              WHERE TempBlowfish IS NOT NULL\n                AND Expiry IS NOT NULL\n                AND PersonalId = (SELECT PersonalId FROM framy_Personal WHERE Email = :email)";
    // and expiry is after NOW() ?
    $Statement = $Connection->prepare($Query);
    $Statement->bindValue(':email', $Email);
    $Statement->execute();
    $Row = $Statement->fetchObject();
    $Statement->closeCursor();
    $CorrectPassword = password_verify($Password, $Row->tempblowfish);
    if ($CorrectPassword) {
        $Query2 = "UPDATE framy_Blowfish SET TempBlowfish = NULL,Expiry = NULL WHERE PersonalId = (SELECT PersonalId FROM framy_Personal WHERE Email = :email)";
        $Statement2 = $Connection->prepare($Query2);
        $Statement2->bindValue(':email', $Email);
        $Statement2->execute();
        $Statement2->closeCursor();
        // And force change the password
        $_SESSION['ForceChangePassword'] = 1;
    }
}
// If that doesn’t work, then we can’t get in.
// We are not logged in until the password is changed (if necessary)
if (isset($_SESSION['ForceChangePassword'])) {
    $_SESSION['LoggedIn'] = FALSE;
} else {
    $_SESSION['LoggedIn'] = $CorrectPassword;
}
if ($CorrectPassword) {
    $_SESSION['Email'] = $Email;
    $_SESSION['PersonalId'] = select_from('PersonalId', "framy_Personal WHERE Email = ?", array($Email));
}
Example #4
0
    unset($_SESSION['Ccp']);
    $NoWelcome = TRUE;
    include DIR_SESSION . 'ccp.php';
}
if (isset($_SESSION['GcTagging'])) {
    unset($_SESSION['GcTagging']);
    $NoWelcome = TRUE;
    include DIR_SESSION . 'gctagging.php';
}
if (isset($_SESSION['CcpTagging'])) {
    unset($_SESSION['CcpTagging']);
    $NoWelcome = TRUE;
    include DIR_SESSION . 'ccptagging.php';
}
if (!$NoWelcome) {
    $NameFirst = select_from('NameFirst', "framy_Personal WHERE PersonalId = {$_SESSION['PersonalId']}", []);
    $EchoWelcome = 1;
    if ($EchoWelcome) {
        ?>
      <p class="lead">Welcome, <?php 
        echo $NameFirst;
        ?>
</p>
      <h1>The Australian Curriculum</h1>
      <h2>F–10 Curriculum</h2>
      <div class="alert alert-warning" role="alert">
        <p>Until otherwise mentioned, this website incorporates version 8.1 of the Australian Curriculum. If you want to use version 7.5, please see <a href="http://www.australiancurriculum.edu.au/home/whats-changed">What’s changed</a> to see what’s different about it.</p>
      </div>
      <div class="row">
        <div class="col-sm-6">
          <div class="list-group">
Example #5
0
<?php

Config::write('app.hempty', '1B2M2Y8AsgTpgAmY7PhCfg');
Config::write('app.hsubject.mathematics', 'VAsh7Nsnb1CH7lhc7dbV0A');
Config::write('app.hlevel.year7', select_from('hlevel', "ac_Levels WHERE Level = 'Year 7'"));
Config::write('app.hlevel.year8', select_from('hlevel', "ac_Levels WHERE Level = 'Year 8'"));
Config::write('app.hlevel.year9', select_from('hlevel', "ac_Levels WHERE Level = 'Year 9'"));
Config::write('app.hlevel.year10', select_from('hlevel', "ac_Levels WHERE Level = 'Year 10'"));
Config::write('app.hlevel.year10a', select_from('hlevel', "ac_Levels WHERE Level = 'Year 10A'"));
Example #6
0
      </div>
      <div class="panel-body">
        <?php 
echo select_from('LevelDesc', "ac_m_LevelDescsAchStds WHERE Level = 'Year 9'");
?>
      </div>
    </div>
  </div>
  <div class="col-sm-6">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h2 class="panel-title">Achievement standard</h2>
      </div>
      <div class="panel-body">
        <?php 
echo select_from('AchStd', "ac_m_LevelDescsAchStds WHERE Level = 'Year 9'");
?>
      </div>
    </div>
  </div>
</div>
<h2>Content descriptions</h2>
<?php 
$Connection = get_connection();
$q0 = 'SELECT Strand,hStrand FROM ac_m_Strands';
$s0 = $Connection->prepare($q0);
$s0->execute();
foreach ($s0 as $row0) {
    echo "<h3>{$row0['strand']}</h3>";
    $q1 = "SELECT Substrand,hSubstrand FROM ac_m_Substrands\n         WHERE hStrand = :a";
    $s1 = $Connection->prepare($q1);