Ejemplo n.º 1
0
<?php

require 'config.php';
require 'lib.php';
connectdb();
if (array_key_exists('username', $_POST)) {
    OnLogin2('index.php');
    ShowForm();
    die;
}
require_login('index.php');
echo GetHeader('Εμφάνιση ερωτήσεων') . '<body>';
if (array_key_exists('answer', $_GET)) {
    OnGrade($_GET['answer'], $_SESSION['userid']);
}
ShowForm();
function ShowForm()
{
    ComputeTimerStudent($resttime, $question, $questiontext, $md5, $infoanswer);
    if ($resttime <= 0) {
        $divanswervisibility = ' style="visibility: hidden"';
    } else {
        $divanswervisibility = '';
    }
    $divtimerhtml = "Υπόλοιπο χρόνου: {$resttime} δευτερόλεπτα";
    $divquestionhtml = $questiontext;
    ?>
	<div id="divmd5" style="visibility: hidden">
		<?php 
    echo $md5;
    ?>
Ejemplo n.º 2
0
 * @todo none
 */
//start the session
session_start();
//include common.php
include 'common.php';
//declare the constant THIS_PAGE as the current page
define('THIS_PAGE', basename($_SERVER['PHP_SELF']));
//set the pre-determined passphrase that users must enter into the form
$passphrase = "abc123";
//check if the session has already started and the user is already logged in
if (!isset($_SESSION['loggedin'])) {
    //if user is not logged in, check if the form has been submitted
    if (isset($_POST['submit'])) {
        //form has been submitted - check if password entered in form matches $passphrase
        if ($_POST['password'] == $passphrase) {
            //password entered in form matches $passphrase - log user in and show content of index.php (don't die).
            $_SESSION['loggedin'] = true;
        } else {
            //password entered doesn't match passphrase- show form with error message and die (don't show content of index.php)
            $message = "The password you entered is incorrect. Please try again";
            echo ShowForm($message);
            die;
        }
    } else {
        //form has not been submitted yet - show form with empty $message span and die (don't show content of index.php)
        $message = "";
        echo ShowForm($message);
        die;
    }
}
Ejemplo n.º 3
0
    $message = ShowForm();
} elseif ($_POST['s'] == 5) {
    if (!InitExixst()) {
        $error_message = CheckForm();
    } else {
        unset($_POST['sql_option']['Fresh Installation']);
    }
    if (empty($error_message)) {
        $next_step = 6;
        WriteConfigurationFile();
        $process_title = "Prepare Database";
        $message = ShowFormSQL();
    } else {
        $next_step = 5;
        $process_title = "Application Setting";
        $message = ShowForm();
    }
} elseif ($_POST['s'] == 6) {
    if (!empty($_POST['sql_select'])) {
        $next_step = 7;
        $process_title = "Prepare Database";
        $message = ExecuteSQL($_POST['sql_select']);
    } else {
        $next_bt = "";
        $process_title = "Installation Complete";
        $message = Finish();
    }
} elseif ($_POST['s'] == 7) {
    $next_bt = "";
    $process_title = "Installation Complete";
    $message = Finish();
Ejemplo n.º 4
0
</form>
<?php 
    $doc = JFactory::getDocument();
    $doc->addScriptDeclaration("window.hikashop.ready( function() {document.getElementById('compra').submit();});");
}
# End of function ShowForm
?>

<div class="hikashop_servired_end" id="hikashop_servired_end">
	<span id="hikashop_servired_end_message" class="hikashop_servired_end_message">
		<?php 
echo JText::sprintf('PLEASE_WAIT_BEFORE_REDIRECTION_TO_X', $this->payment_name) . '<br/>' . JText::_('CLICK_ON_BUTTON_IF_NOT_REDIRECTED');
?>
	</span>
	<span id="hikashop_servired_end_spinner" class="hikashop_servired_end_spinner">
		<img src="<?php 
echo HIKASHOP_IMAGES . 'spinner.gif';
?>
" />
	</span>
	<br/>
<?php 
if ($this->currency->currency_code == 'USD') {
    $currency = '840';
} else {
    $currency = '978';
}
ShowForm($this->amount_total, $currency, 'mi producto', $this->id_pedido, $this->methods, $this->method_id);
?>
</div>