forked from science-ation/science-ation
fix indentation in student_editor
This commit is contained in:
parent
8b3cd2a289
commit
dc326ccf86
@ -24,7 +24,7 @@
|
||||
<?
|
||||
require_once('../common.inc.php');
|
||||
require_once('../user.inc.php');
|
||||
user_auth_required('committee', 'admin');
|
||||
$auth_type = user_auth_required(array('fair','committee'), 'admin');
|
||||
|
||||
$registrations_id = intval($_GET['id']);
|
||||
$action = $_GET['action'];
|
||||
@ -158,16 +158,14 @@ function students_load()
|
||||
global $registrations_id;
|
||||
global $config;
|
||||
|
||||
|
||||
|
||||
//now query and display
|
||||
$q=mysql_query("SELECT * FROM students WHERE registrations_id='".$registrations_id."' AND year='".$config['FAIRYEAR']."'");
|
||||
//now query and display
|
||||
$q=mysql_query("SELECT * F ROM students WHERE registrations_id='".$registrations_id."' AND year='".$config['FAIRYEAR']."'");
|
||||
echo mysql_error();
|
||||
|
||||
$numfound=mysql_num_rows($q);
|
||||
$numfound=mysql_num_rows($q);
|
||||
|
||||
$numtoshow = intval($_GET['numstudents']);
|
||||
if($numtoshow == 0) $numtoshow=$numfound;
|
||||
$numtoshow = intval($_GET['numstudents']);
|
||||
if($numtoshow == 0) $numtoshow=$numfound;
|
||||
|
||||
|
||||
echo "<form>";
|
||||
@ -185,7 +183,7 @@ if($numtoshow == 0) $numtoshow=$numfound;
|
||||
echo "</form>";
|
||||
|
||||
echo "<form id=\"students_form\" >";
|
||||
for($x=1;$x<=$numtoshow;$x++) {
|
||||
for($x=1;$x<=$numtoshow;$x++) {
|
||||
$studentinfo=mysql_fetch_object($q);
|
||||
echo "<h3>".i18n("Student %1 Details",array($x))."</h3>";
|
||||
//if we have a valid student, set their ID, so we can UPDATE when we submit
|
||||
@ -203,8 +201,7 @@ for($x=1;$x<=$numtoshow;$x++) {
|
||||
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$studentinfo->lastname\" />".REQUIREDFIELD."</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
if($config['participant_student_personal']=="yes") {
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Gender")."</td><td>";
|
||||
echo "<select name=\"sex[$x]\">";
|
||||
@ -214,7 +211,7 @@ if($config['participant_student_personal']=="yes")
|
||||
if($studentinfo->sex=="female") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"female\">".i18n("Female")."</option>\n";
|
||||
echo "</select>".REQUIREDFIELD;
|
||||
}
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td></td><td></td>\n";
|
||||
echo "</tr>\n";
|
||||
@ -222,19 +219,19 @@ if($config['participant_student_personal']=="yes")
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$studentinfo->email\" />".REQUIREDFIELD."</td>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo " <td>".i18n("City")."</td><td><input type=\"text\" name=\"city[$x]\" value=\"$studentinfo->city\" />".REQUIREDFIELD."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td></td>";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</tr>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Address")."</td><td><input type=\"text\" name=\"address[$x]\" value=\"$studentinfo->address\" />".REQUIREDFIELD."</td>\n";
|
||||
echo " <td>".i18n($config['provincestate'])."</td><td>";
|
||||
@ -263,8 +260,8 @@ if($config['participant_student_personal']=="yes")
|
||||
emit_year_selector("year[$x]",$year,$minyearselect,$maxyearselect);
|
||||
echo "</td><td>".REQUIREDFIELD."</td></tr></table>\n";
|
||||
echo "</td>\n";
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
echo "<tr>";
|
||||
|
||||
echo " <td>".i18n("Grade")."</td><td colspan=\"3\">\n";
|
||||
@ -302,14 +299,14 @@ else
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo "<tr>\n";
|
||||
echo "<td>".i18n("Medical Alert Info")."</td><td colspan=\"3\">";
|
||||
echo "<input name=\"medicalalert[$x]\" type=\"text\" size=\"50\" value=\"$studentinfo->medicalalert\" />";
|
||||
echo "</td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if($config['participant_student_foodreq']=="yes")
|
||||
{
|
||||
@ -373,9 +370,9 @@ if($config['participant_student_personal']=="yes")
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
}
|
||||
echo "<br />";
|
||||
echo i18n("WARNING! If you make a change to the grade that would affect the project number, you must update the project number manually, it will NOT be automatically updated");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo i18n("WARNING! If you make a change to the grade that would affect the project number, you must update the project number manually, it will NOT be automatically updated");
|
||||
echo "<br />";
|
||||
echo "<input type=\"button\" id=\"students_save\" value=\"".i18n("Save Student Information")."\" />\n";
|
||||
echo "</form>";
|
||||
echo "<br />";
|
||||
|
Loading…
Reference in New Issue
Block a user