Example #1
0
<?php

include_once 'apps/admin_session.php';
include_once 'includes/header.php';
/* begin logic */
$userID = 1;
// temporary
$dbf = new dbfunctions();
$dbf->query('SELECT * FROM cn_events');
$events = array();
while ($row = $dbf->next()) {
    $events[] = $row;
}
function populateEventsSelect($events)
{
    $output;
    foreach ($events as $v) {
        $output .= "<option value=\"{$v[0]}\">{$v[1]}</option>";
    }
    return $output;
}
function addQuestion($eventID, $userID, $questionName, $questionDesc, $tags)
{
    /* deal with tags first */
    $tags = str_replace(array(' ', "\t"), '', $tags);
    $a = explode(',', $tags);
    $tags = array();
    foreach ($a as $v) {
        if (!empty($v)) {
            $tags[] = $v;
        }
Example #2
0
 function __construct($debug = 0)
 {
     parent::__construct($debug);
 }