Location: PHPKode > projects > QuickTicket > quickticket/qti_user_new.php
<?php

/**
* PHP versions 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to hide@address.com so we can mail you a copy immediately.
*
* @package    QuickTicket
* @author     Philippe Vandenberghe <hide@address.com>
* @copyright  2008-2012 The PHP Group
* @version    2.5 build:20101222
*/

session_start();
require_once('bin/qti_init.php');
if ( !$oVIP->CanView('V0') ) HtmlPage(11);
$oHtml->scripts = array();

// INITIALISE

include(GetLang().'qti_reg.php');

$oVIP->selfurl = 'qti_user_new.php';
$oVIP->selfname = $L['Register'];

// --------
// EXECUTE FORM
// --------

if ( isset($_POST['ok']) )
{
  if ( !isset($_POST['agreed']) )
  {
    include('qti_p_header.php');
    $oHtml->Msgbox($oVIP->selfname,array(),array('id'=>'login_header'),array('id'=>'login'));
    $strFile=GetLang().'sys_not_agree.txt';
    if ( file_exists($strFile) ) { include($strFile); } else { echo 'Rules not agreed...'; }
    echo '<p><a href="',Href(),'">',$L['Register'],'</a></p>';
    $oHtml->Msgbox();
    include('qti_p_footer.php');
    Exit;
  }
  $oHtml->Redirect('qti_form_reg.php'.(QTI_USE_COPPA ? '?c='.$_POST['child'] : ''),$L['Register']);
}

// --------
// HTML START
// --------

$oHtml->links[] = '<link rel="stylesheet" type="text/css" href="'.$_SESSION[QT]['skin_dir'].'/qti_main2.css" />';

include('qti_p_header.php');

echo '
<div class="scrollmessage">
';

$strFile = GetLang().'sys_rules.txt';
if ( file_exists($strFile) ) { include($strFile); } else { echo "Missing file:<br />$strFile"; }

echo '
</div>
';

echo '
<form method="post" action="',Href(),'"><p><input type="checkbox" id="agreed" name="agreed" /> <label for="agreed"><b>&nbsp;',$L['Agree'],'</b></label></p>
';
$oHtml->Msgbox($oVIP->selfname,array('style'=>'width:300px'),array('id'=>'login_header'),array('id'=>'login'));
echo '<p>';
if ( QTI_USE_COPPA )
{
echo '<input type="radio" id="child1" name="child" value="2" checked="checked" /><label for="child1">',$L['I_am_child'],'</label><br />',N;
echo '<input type="radio" id="child0" name="child" value="0" /><label for="child0">',$L['I_am_not_child'],'</label><br />',N;
}
else
{
echo $L['Proceed'];
}
echo '</p><p><input type="submit" name="ok" value="',$L['Ok'],'" /></p>';
$oHtml->Msgbox();
echo'
</form>
';

// HTML END

include('qti_p_footer.php');

?>
Return current item: QuickTicket