<?php
require_once ('../../includes/configuration/conf.php');
defined( 'app_killer' ) or die( 'Restricted access' );
?>
<?php
echo '
<script type="text/javascript">
var NOnumbershere=new RegExp(/\d/);
var NOsymbolshere=new RegExp(/[+.,*ª!"·$%&()= ?¿¡º^`´ç;:_-]/);
function check_text_field2(event)
{
thefield=event;
thevalue=thefield.value;
thevaluetolower=thevalue.toLowerCase();
check();
}
function check()
{
if (NOnumbershere.test(thevaluetolower) == true)
{
thefield.className="incorrect_field";
}
else if (NOsymbolshere.test(thevaluetolower) == true)
{
thefield.className="incorrect_field";
}
else if (thevaluetolower.length <= 1)
{
thefield.className="incorrect_field";
}
else
{
thefield.className="correct_field";
}
}
</script>
';
?>
<style type="text/css">
.formcontainer
{
width:500px;
}
.consoleoferrors
{
text-align:left;
width:auto;
height:auto;
position:fixed;
top:auto;
bottom:auto;
right:10px;
background:red;
color:white;
}
.consoleoferrors2
{
text-align:left;
width:auto;
height:auto;
position:fixed;
bottom:10px
right:10px;
background:red;
color:white;
}
.correct_field
{
padding-right:18px;
background:url("images/correct_field.png") no-repeat 100% 0;
}
.incorrect_field
{
padding-right:18px;
background:url("images/incorrect_field.png") no-repeat 100% 0;
}
form.registration fieldset
{
margin-bottom: 10px;
background: url("images/form-fieldset.gif") repeat-x scroll left bottom transparent;
}
form.registration legend
{
padding: 0 2px;
font-weight: bold;
}
form.registration label
{
display: inline-block;
line-height: 1.8;
vertical-align: top;
width: 200px;
}
form.registration fieldset ol
{
margin: 0;
padding: 0;
}
form.registration fieldset li
{
list-style: none;
padding: 5px;
margin: 0;
background: url("form-divider.gif") repeat-x scroll left bottom transparent;
}
form.registration fieldset fieldset
{
border: none;
margin: 3px 0 0;
}
form.registration fieldset fieldset legend
{
padding: 0 0 5px;
font-weight: normal;
}
form.registration fieldset fieldset label
{
display: block;
width: auto;
margin-left: 123px;
}
form.registration em
{
font-weight: bold;
font-style: normal;
color: #f00;
}
form.registration fieldset input
{
border-top:0px;
border-right:0px;
border-left:medium #85b9e9 double;
border-bottom:medium #85b9e9 double;
}
*
{
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
}
a:hover
{
background:
#ffffff;
text-decoration:none;
}
a.tooltip span
{
display:none;
padding:2px 3px;
margin-left:8px;
width:auto;
}
a.tooltip:hover span
{
display:inline;
position:absolute;
border:1px solid #cccccc;
background:#ffffff;
color:#6c6c6c;
}
</style>
<?php
//variables.php
$regular_text_fields=array ($name, $onames, $lastn1, $lastn2);
$email_text_fields=array ($email, $emailc);
$password_text_fields=array ($password, $passwordc);
$field_labels=array ($name, $onames, $lastn1, $lastn2, $email, $emailc, $password, $passwordc);
$counter_f_l=0;
$field_labelstt=array ($namett, $onamestt, $lastn1tt, $lastn2tt, $emailtt, $emailctt, $passwordtt, $passwordctt);
$counter_f_l_tt=0;
$counter_r_t_f=0;
$counter2_r_t_f=4;
$counter_e_t_f=0;
$counter2_e_t_f=2;
$counter_p_t_f=0;
$counter2_p_t_f=2;
?>
<div id="formcontainer">
<form id="registration" class="registration" action="../../../libraries/users/students/reg_post.php" method="post" name="registration">
<fieldset>
<legend><?php echo "$userdata"; ?></legend>
<ol>
<input type="hidden" value="1" id="buttonvalue">
<?php
//build_form.php
while ($counter2_r_t_f>0)
{
$counter2_r_t_f --;
echo '<li><label for="' . $field_labels[$counter_f_l] . '">' . $regular_text_fields[$counter_r_t_f] . '</label><input type="text" name="' . $field_labels[$counter_f_l] . '" id="' . $field_labels[$counter_f_l] . '" onkeyup="check_text_field2(this)"><a class="tooltip"><img align="right" src="../../templates/site/basic/images/icons/info.png"/><span>' . $field_labelstt[$counter_f_l_tt] . '</span></a></li>';
$counter_r_t_f ++;
$counter_f_l_tt ++;
}
while ($counter2_e_t_f>0)
{
$counter2_e_t_f --;
echo '<li><label for="' . $field_labels[$counter_f_l] . '">' . $email_text_fields[$counter_e_t_f] . '</label><input type="text" name="' . $field_labels[$counter_f_l] . '" id="' . $field_labels[$counter_f_l] . '"><a class="tooltip"><img align="right" src="../../templates/site/basic/images/icons/info.png"/><span>' . $field_labelstt[$counter_f_l_tt] . '</span></a></li>';
$counter_e_t_f ++;
$counter_f_l_tt ++;
}
while ($counter2_p_t_f>0)
{
$counter2_p_t_f --;
echo '<li><label for="' . $field_labels[$counter_f_l] . '">' . $password_text_fields[$counter_p_t_f] . '</label><input type="text" name="' . $field_labels[$counter_f_l] . '" id="' . $field_labels[$counter_f_l] . '"><a class="tooltip"><img align="right" src="../../templates/site/basic/images/icons/info.png"/><span>' . $field_labelstt[$counter_f_l_tt] . '</span></a></li>';
$counter_p_t_f ++;
$counter_f_l_tt ++;
}
?>
</ol>
</fieldset>
</form>
</div>
Bookmarks