Ejemplo n.º 1
0
    private function updateSessionActivity($in_sessid)
    {
        //
        // make sure we have a database connection.
        //
        $conn = DBH::opretForbindelse();
        try {
            $sessid = $this->escape_string($in_sessid);
            $querystr = <<<EOQUERY
UPDATE loggedinusers SET lastupdate = NOW()
  WHERE sessionid = '{$in_sessid}'
EOQUERY;
            $results = @$conn->query($querystr);
            if ($results === FALSE) {
                throw new DatabaseErrorException($conn->error);
            }
        } catch (Exception $e) {
            throw $e;
        }
    }
Ejemplo n.º 2
0
<?php

$beerid = $_REQUEST['beerid'];
$usermgr = new UserManager();
$userid = $usermgr->sessionLoggedIn(session_id());
$conn = DBH::opretForbindelse();
$query = "SELECT * FROM beer WHERE userid = {$userid} AND tablebeerid = {$beerid}";
$result = $conn->query($query);
$aroma_1 = 61;
$udseende_1 = 62;
$smag_1 = 63;
$mundfylde_1 = 64;
$helhedsindtryk_1 = 65;
$aroma_2 = 71;
$udseende_2 = 72;
$smag_2 = 73;
$mundfylde_2 = 74;
$helhedsindtryk_2 = 75;
$aroma_3 = 81;
$udseende_3 = 82;
$smag_3 = 83;
$mundfylde_3 = 84;
$helhedsindtryk_3 = 85;
$definition = $result->fetch_assoc();
echo <<<htmltekst

<script type="text/javascript">
\$(function () {

    \$('#container').highcharts({
                
Ejemplo n.º 3
0
 public function brewDelete($in_brewid)
 {
     $conn = DBH::opretForbindelse();
     try {
         $qstr = "DELETE FROM brew WHERE brew_id = {$in_brewid}";
         $result = @$conn->query($qstr);
         if ($result === FALSE) {
             throw new DatabaseErrorException($conn->error);
         }
     } catch (Exception $e) {
         if (isset($conn)) {
             $conn->close();
         }
         throw $e;
     }
     //
     // clean up and go home!
     //
     $conn->close();
 }