forked from science-ation/science-ation
Reorganize the left side menu, and add a new generic login page that lets you choose who you are and takes the user to the appropriate login page
This commit is contained in:
parent
95c559fa08
commit
e4ed9f8772
@ -124,7 +124,7 @@ require_once("../dialog.inc.php");
|
|||||||
echo "<tr><td colspan=\"7\"> </td></tr>\n";
|
echo "<tr><td colspan=\"7\"> </td></tr>\n";
|
||||||
}
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td colspan=\"2\"><a onclick=\"return SFIABDialog(event,'fundraising_types.php',300,230)\" href=\"#\">add fund type</a></td>";
|
echo "<td colspan=\"2\"><a onclick=\"return SFIABDialog(event,'fundraising_types.php',400,250)\" href=\"#\">add fund type</a></td>";
|
||||||
echo "<td colspan=\"4\" style=\"font-weight: bold; text-align: right;\">".i18n("Total Net Position")."</td><td style=\"text-align: right; font-weight: bold;\">".format_money($totaldiff)."</td></tr>\n";
|
echo "<td colspan=\"4\" style=\"font-weight: bold; text-align: right;\">".i18n("Total Net Position")."</td><td style=\"text-align: right; font-weight: bold;\">".format_money($totaldiff)."</td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
|
@ -488,12 +488,14 @@ echo "</div>";
|
|||||||
<?
|
<?
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/index.php\">".i18n("Home Page").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/index.php\">".i18n("Home Page").'</a></li>';
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/important_dates.php\">".i18n("Important Dates").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/important_dates.php\">".i18n("Important Dates").'</a></li>';
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/register_participants.php\">".i18n("Participant Registration").'</a></li>';
|
|
||||||
echo $registrationconfirmationlink;
|
echo $registrationconfirmationlink;
|
||||||
|
/*
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/register_participants.php\">".i18n("Participant Registration").'</a></li>';
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=judge\">".i18n("Judges Registration").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=judge\">".i18n("Judges Registration").'</a></li>';
|
||||||
if($config['volunteer_enable'] == 'yes') {
|
if($config['volunteer_enable'] == 'yes') {
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=volunteer\">".i18n("Volunteer Registration").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=volunteer\">".i18n("Volunteer Registration").'</a></li>';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/committees.php\">".i18n("Committee").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/committees.php\">".i18n("Committee").'</a></li>';
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/winners.php\">".i18n("Winners").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/winners.php\">".i18n("Winners").'</a></li>';
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
@ -501,60 +503,46 @@ echo "</div>";
|
|||||||
<br />
|
<br />
|
||||||
<ul class="mainnav">
|
<ul class="mainnav">
|
||||||
<?
|
<?
|
||||||
if($_SESSION['users_type'] == 'committee')
|
if($_SESSION['users_type'] == 'committee') {
|
||||||
{
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_personal.php\">".i18n("My Profile").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/committee_main.php\">".i18n("Committee Home").'</a></li>';
|
||||||
if(committee_auth_has_access("admin")){
|
if(committee_auth_has_access("admin")){
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_personal.php\">".i18n("My Profile").'</a></li>';
|
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/admin/\">".i18n("Fair Administration").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/admin/\">".i18n("Fair Administration").'</a></li>';
|
||||||
}
|
}
|
||||||
if(committee_auth_has_access("config")){
|
if(committee_auth_has_access("config")){
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/config/\">".i18n("SFIAB Configuration").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/config/\">".i18n("Configuration").'</a></li>';
|
||||||
}
|
}
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=logout\">".i18n("Logout").'</a></li>';
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=logout\">".i18n("Committee Logout").'</a></li>';
|
} else if($_SESSION['users_type']=="judge") {
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_personal.php\">".i18n("My Profile").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/register_judges_main.php\">".i18n("Judge Home").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=logout\">".i18n("Logout").'</a></li>';
|
||||||
|
} else if($_SESSION['users_type']=="volunteer") {
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_personal.php\">".i18n("My Profile").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/volunteer_main.php\">".i18n("Volunteer Home").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=logout\">".i18n("Logout").'</a></li>';
|
||||||
|
} else if($_SESSION['users_type']=="sponsor") {
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_personal.php\">".i18n("My Profile").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/sponsor_main.php\">".i18n("Sponsor Home").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?action=logout\">".i18n("Logout").'</a></li>';
|
||||||
|
} else if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']) {
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/schoolaccess.php\">".i18n("School Home").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/schoolaccess.php?action=logout\">".i18n("Logout").'</a></li>';
|
||||||
|
}
|
||||||
|
else if($_SESSION['registration_number'] && $_SESSION['registration_id']) {
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/register_participants_main.php\">".i18n("Participant Home").'</a></li>';
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/register_participants.php?action=logout\">".i18n("Logout")."</a></li>\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=committee\">".i18n("Committee Login").'</a></li>';
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/login.php\">".i18n("Login/Register").'</a></li>';
|
||||||
}
|
}
|
||||||
?></ul>
|
?></ul>
|
||||||
<br />
|
|
||||||
<ul class="mainnav">
|
|
||||||
<?
|
|
||||||
if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
|
|
||||||
{
|
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/schoolaccess.php\">".i18n("School Access").'</a></li>';
|
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/schoolaccess.php?action=logout\">".i18n("School Logout").'</a></li>';
|
|
||||||
} else {
|
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/schoolaccess.php\">".i18n("School Login").'</a></li>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config['fairs_enable'] == 'yes' && $config['fairs_allow_login'] == 'yes') {
|
|
||||||
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=fair\">".i18n("{$config['fairs_name']} Fair Login").'</a></li>';
|
|
||||||
}
|
|
||||||
?></ul>
|
|
||||||
<br />
|
|
||||||
<ul class="mainnav">
|
|
||||||
<?
|
|
||||||
if($_SESSION['registration_number'] && $_SESSION['registration_id'])
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<li><a href="<?=$config['SFIABDIRECTORY']?>/register_participants.php?action=logout"><?=i18n("Registration Logout")?></a></li><?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="aligncenter">
|
<div class="aligncenter">
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
if(count($config['languages'])>1) {
|
||||||
if(count($config['languages'])>1)
|
|
||||||
{
|
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<form name=\"languageselect\" method=\"get\" action=\"".$_SERVER['PHP_SELF']."\">";
|
echo "<form name=\"languageselect\" method=\"get\" action=\"".$_SERVER['PHP_SELF']."\">";
|
||||||
echo "<select name=\"switchlanguage\" onchange=\"document.forms.languageselect.submit()\">\n";
|
echo "<select name=\"switchlanguage\" onchange=\"document.forms.languageselect.submit()\">\n";
|
||||||
foreach($config['languages'] AS $key=>$val)
|
foreach($config['languages'] AS $key=>$val) {
|
||||||
{
|
|
||||||
if($_SESSION['lang']==$key) $selected="selected=\"selected\""; else $selected="";
|
if($_SESSION['lang']==$key) $selected="selected=\"selected\""; else $selected="";
|
||||||
|
|
||||||
echo "<option $selected value=\"$key\">$val</option>";
|
echo "<option $selected value=\"$key\">$val</option>";
|
||||||
|
74
login.php
Normal file
74
login.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?
|
||||||
|
/*
|
||||||
|
This file is part of the 'Science Fair In A Box' project
|
||||||
|
SFIAB Website: http://www.sfiab.ca
|
||||||
|
|
||||||
|
Copyright (C) 2008 James Grant <james@lightbox.org>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation, version 2.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
require_once("common.inc.php");
|
||||||
|
send_header("Login/Register");
|
||||||
|
|
||||||
|
echo i18n("Please choose one of the following:");
|
||||||
|
echo "<br />\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo "<h4>Participant</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"register_participants.php?type=judge\">I am a participant</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
|
||||||
|
echo "<h4>Judge</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"user_login.php?type=judge\">I am a judge and I already have an account</a></li>\n";
|
||||||
|
echo "<li><a href=\"user_new.php?type=judge\">I am a new judge and would like to register to judge</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
|
||||||
|
echo "<h4>Sponsor</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"user_login.php?type=sponsor\">I am an existing sponsor</a></li>\n";
|
||||||
|
echo "<li><a href=\"user_new.php?type=sponsor\">I would like to become a sponsor</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
|
||||||
|
echo "<h4>Teacher/School</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"schoolaccess.php\">I am a teacher or science fair coordinator at a school</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
|
||||||
|
if($config['volunteer_enable'] == 'yes') {
|
||||||
|
echo "<h4>Volunteer</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"user_login.php?type=sponsor\">I am a volunteer and I already have an account</a></li>\n";
|
||||||
|
echo "<li><a href=\"user_new.php?type=sponsor\">I am a new volunteer and would like to help out</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<h4>Committee</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"user_login.php?type=committee\">I am a committee member</a></li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
|
||||||
|
if($config['fairs_enable'] == 'yes' && $config['fairs_allow_login'] == 'yes') {
|
||||||
|
echo "<h4>Other Fair</h4>\n";
|
||||||
|
echo "<ul style=\"margin-top: 0px;\">";
|
||||||
|
echo "<li><a href=\"{$config['SFIABDIRECTORY']}/user_login.php?type=fair\">".i18n("{$config['fairs_name']} Fair Login").'</a></li>';
|
||||||
|
echo "</ul>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
send_footer();
|
||||||
|
?>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user