Beispiel #1
0
if (isset($_GET['rmvclss'])) {
    Classes::rmvclasses($_GET['rmvclss']);
}
$sessionexst = ClassSession::find_by_id($_GET['sid']);
if (!$sessionexst) {
    redirect_to("index.php");
}
//Adding a session to the db
if (isset($_POST['sid'])) {
    Classes::addclasstodatabase($_POST['class-date'], $_POST['class-time'], $_POST['spots'], $_POST['sid'], $_POST['note']);
}
if (isset($_POST['cls_id'])) {
    Classes::updateclass($_POST['cls_id'], $_POST['class-date'], $_POST['class-time'], $_POST['spots'], $_POST['note']);
}
//finding the info on the class session
$currentclasssession = ClassSession::find_by_id($_GET['sid']);
$loggedinuser = User::showmeuser($_SESSION['user_id']);
include '../includes/pagestructure.php';
include '../includes/smartbanner.php';
include '../includes/smartnav.php';
adminhead('Welcome to Urban Illustration');
admintopbar();
?>
 <div id="content">
     
 		<div id="maincontent">
        	<div class="textcontentalone"><p>Welcome, <?php 
if (isset($loggedinuser)) {
    echo $loggedinuser;
}
?>
Beispiel #2
0
<?php

require_once "includesmain/session.php";
require_once "includesmain/functions.php";
require_once "includesmain/database.php";
require_once "includesmain/class.php";
require_once "includesmain/client.php";
require_once "includesmain/class_session.php";
require_once "securimage/securimage.php";
require_once "includesmain/datemanager.php";
$securimage = new Securimage();
$activesession = ClassSession::getactivesession();
$classtojoin = Classes::find_by_id($_GET['join']);
$sessiontojoin = ClassSession::find_by_id($classtojoin->sessionid);
if (isset($_POST['p_firstname'])) {
    if (!$securimage->check($_POST['captcha_code'])) {
        $captchaerror = TRUE;
    } else {
        $mailtotest = $database->escape_value($_POST['email']);
        $alreadyclient = Client::find_by_email($mailtotest);
        if ($alreadyclient) {
            if ($_POST['k_firstname'] == $alreadyclient->k_firstname) {
                $kidalreadyregistered = true;
            }
        }
        if (!$kidalreadyregistered) {
            Client::addclienttodatabase($_POST['clsid'], $_POST['p_firstname'], $_POST['p_lastname'], $_POST['k_firstname'], $_POST['k_lastname'], $_POST['phone'], $_POST['email'], $_POST['coupon']);
            $insertedid = $database->insert_id();
            redirect_to('view-details.php?tclt=' . $insertedid . '&cls=' . $_POST['clsid']);
        } else {
            redirect_to('complete.php');
Beispiel #3
0
<p>Welcome, <?php 
if (isset($loggedinuser)) {
    echo $loggedinuser;
}
?>
 <a href="?lgt=1">Log Out</a></p>
<h2>Available Sessions</h2>
<table id="tbschedualdisplay">
<tr class="tabletitle"><td>Session Name</td><td>Starting Date</td><td>Status</td><td>Update</td><td>Delete</td></tr>
<?php 
ClassSession::displaysessions();
?>
</table>
<?php 
if (isset($_GET['s_upd'])) {
    $updatesession = ClassSession::find_by_id($_GET['s_upd']);
    ?>
<h2><a>Update Session:</a></h2>
<form action="index.php" method="post">
<input type="hidden" value="<?php 
    echo $updatesession->id;
    ?>
" name="s_id" />
Session Name:  <input type="text" maxlength="40" name="u_session_name"  value="<?php 
    echo $updatesession->name;
    ?>
"/>
Starting Date: <input type="text" maxlength="40" name="date" value="<?php 
    echo DateManager::displaydatefromtmstp($updatesession->s_date);
    ?>
"/>