Exemple #1
0
function getLogState()
{
    if (getSessionVar('login')) {
        return getSessionVar('userID');
    } else {
        return false;
    }
}
Exemple #2
0
/**
 * Displays error message with proper formatting
 *
 * @param string $mesg - error to display [optional] default = session's error
 * @return void
 */
function printError($mesg = null)
{
    // check if we have a warning
    if (empty($mesg)) {
        // get from session variable if one exists
        $mesg = getSessionVar('error');
    }
    // make sure we have a warning
    if (!empty($mesg)) {
        // show warning
        print "<div style='color:red;'><b>Error!</b> ";
        // check if message is an array
        if (is_array($mesg)) {
            foreach ($mesg as $m) {
                print "<li> {$m}</li>";
            }
        } else {
            print $mesg;
        }
        print "</div>";
    }
    // delete session variable now
    delSessionVar('error');
}
Exemple #3
0
<?php

include_once "../Controller/functions.php";
/**
 * Created by Latendresse Antoine && Yannick Delaire.
 * Date: 11/16/15
 */
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
getSessionVar();
showHeader("Gestionnaire d'images");
verifyConnected();
?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <title>All your photos organized and easy to find</title>
        <link href='https://fonts.googleapis.com/css?family=Roboto:500' rel='stylesheet' type='text/css'>
        <link href="../Styles/style.css" rel="stylesheet" media="all" type="text/css">
        <link rel="apple-touch-icon" sizes="57x57" href="ico/apple-icon-57x57.png">
        <link rel="apple-touch-icon" sizes="60x60" href="ico/apple-icon-60x60.png">
        <link rel="apple-touch-icon" sizes="72x72" href="ico/apple-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="76x76" href="ico/apple-icon-76x76.png">
        <link rel="apple-touch-icon" sizes="114x114" href="ico/apple-icon-114x114.png">
        <link rel="apple-touch-icon" sizes="120x120" href="ico/apple-icon-120x120.png">
        <link rel="apple-touch-icon" sizes="144x144" href="ico/apple-icon-144x144.png">
        <link rel="apple-touch-icon" sizes="152x152" href="ico/apple-icon-152x152.png">
        <link rel="apple-touch-icon" sizes="180x180" href="ico/apple-icon-180x180.png">
        <link rel="icon" type="image/png" sizes="192x192"  href="ico/android-icon-192x192.png">
Exemple #4
0
<?php

session_start();
include 'globalfunctions.php';
$SessionId = $_POST['CLICKA_currentSessionId'];
$CurrentUserId = getSessionUser($SessionId);
$FormId = getSessionVar($SessionId, "currentlySelectedForm");
$getForm = $Mysql->query("SELECT * FROM forms WHERE Id='{$FormId}'");
$rsForm = $getForm->fetch_assoc();
$BackgroundColour = $rsForm['BackgroundColour'];
$FormBackground = $rsForm['FormBackground'];
$getFormInputs = $Mysql->query("SELECT * FROM forms_inputs WHERE FormId='{$FormId}' ORDER BY SortNum ASC");
?>
<script type="text/javascript">

function scriptLoaded() {

       $('#formChosen').modal('hide');

    document.getElementById('topbartext').innerHTML = "<button type=\"button\" class=\"btn btn-warning\" onclick=\"exitFormEntry()\" style=\"height:20px;padding-top:0px;\">Exit</button> Fill Out: <?php 
echo $rsForm['FormName'];
?>
"
    document.getElementById('sidenav').style.display="none"
    document.body.style.backgroundColor = "#<?php 
echo $BackgroundColour;
?>
";
    document.getElementById('page-wrapper').style.marginLeft="0px"
    document.getElementById('page-wrapper').style.backgroundColor="#<?php 
echo $BackgroundColour;