Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 353 → Rev 354

/web/intercept.php
10,7 → 10,7
# notice and this permission notice is included in all copies or
# substantial portions of the software.
 
$organisme = "rexy";
$organisme = "etrs-ssic";
# Redirects from CoovaChilli (chilli daemon) :
# Response to login:
# success : if login successful
25,7 → 25,7
# Default : it was not a form request
 
# Shared secret used to encrypt challenge with radius.
$uamsecret = "CkWpFL3f";
$uamsecret = "bZBMKhn2";
 
# URL loaded after success authenticates (let blank for browser defaults)
$adminurl = "";
438,10 → 438,13
}
}
</script>
<link rel=\"stylesheet\" href=\"/css/style.css\" type=\"text/css\">
<link rel=\"stylesheet\" href=\"/css/style_intercept.css\" type=\"text/css\">
</head>
<body onLoad=\"javascript:doOnLoad($result,'$loginpath?res=popup2&uamip=$uamip&uamport=$uamport&userurl=$userurl&redirurl=$redirurl&timeleft=$timeleft','$userurl','$redirurl','$timeleft')\" OnbeforeUnload=\"javascript:DecO($result)\">";
 
<body onLoad=\"javascript:doOnLoad($result,'$loginpath?res=popup2&uamip=$uamip&uamport=$uamport&userurl=$userurl&redirurl=$redirurl&timeleft=$timeleft','$userurl','$redirurl','$timeleft')\" OnbeforeUnload=\"javascript:DecO($result)\">
<center>";
#Modifications par stephane ERARD le 30 11 2010
# begin debugging
# print "<center>THE INPUT by GET method (for debugging):<br>";
# foreach ($_GET as $key => $value) {
457,7 → 460,8
 
if ($result == 2) {
echo "
<h1 style=\"text-align: center;\">$R_loginfailed</h1>";
<DIV id=\"logon\">
<h2>$R_loginfailed</h2>";
if ($reply) {
#traitement du reply ...
echo "<center> $reply </BR></BR></center>";
466,65 → 470,73
 
if ($result == 5) {
echo "
<h1 style=\"text-align: center;\">$organisme</h1>
<h1 style=\"text-align: center;\">$R_loggedcont</h1>";
<DIV id=\"logon\">
<h1>$organisme</h1>
<h2>$R_loggedcont</h2>";
}
 
if ($result == 2 || $result == 5) {
echo "
<form name=\"form1\" method=\"post\" action=\"$loginpath\">
<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
<center>
<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">
<tr>
<td rowspan=\"4\" align=\"center\" width=\"25%\" ><img src=\"/images/logo-alcasar.png\"></td>
<td width=\"50%\" align=\"center\"> &nbsp;&nbsp;&nbsp;&nbsp;$R_user&nbsp;<input STYLE=\"font-family: Arial\" type=\"text\" name=\"UserName\" size=\"20\" maxlength=\"32\"></td>
<td rowspan=\"4\" align=\"center\" width=\"25%\"><img src=\"/images/organisme.png\"></td>
</tr><tr>
<td width=\"50%\" align=\"center\">$R_password&nbsp;<input STYLE=\"font-family: Arial\" type=\"password\" name=\"Password\" size=\"20\" maxlength=\"32\"></td>
</tr><tr>
<td width=\"50%\" align=\"center\" height=\"23\"><input type=\"submit\" name=\"button\" value=\"$R_boutonO\" onClick=\"javascript:popUp('$loginpath?res=popup1&uamip=$uamip&uamport=$uamport')\"></td>
</tr><tr>
<td width=\"50%\" align=\"center\"><H6><a href=\"https://$uamip/pass/\">$R_passwordchg</H6></td>
</tr><tr>
<td align=\"center\" colspan=\"4\"><font color=\"red\"><b>$R_loggedin_stringl0</b></td>
</tr><tr>
<td align=\"left\" colspan=\"4\"><b></td>
</tr><tr>
<td align=\"center\" colspan=\"4\"><font color=\"black\"><b>$R_loggedin_stringl1</b></font></td>
</tr><tr>
<td align=\"left\" colspan=\"4\"><b>
<li>
$R_loggedin_stringl2</li>
<li>
$R_loggedin_stringl3</li>
<li>
$R_loggedin_stringl4</li>
<li>
$R_loggedin_stringl5</li>
<hr>
$R_ca_1 <a href=\"/certs/certificat_alcasar_ca.crt\">$R_ca_2</a> $R_ca_3 <a href=\"/alcasar-certificat.pdf\">$R_ca_4</a>
</b></td>
</tr>
</table>
<IMG id=\"logo-alcasar\" src=\"/images/logo-alcasar.png\">
<form name=\"form1\" method=\"post\" action=\"$loginpath\">
<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
<TABLE id=\"boite-logon\">
<TR>
<TD width=\"20%\" rowspan=\"4\"><IMG id=\"logo-organ\" src=\"/images/organisme.png\"></TD>
<TD width=\"30%\" align=\"right\">$R_user</TD>
<TD width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\"></TD>
</TR>
<TR>
<TD align=\"right\">$R_password</TD>
<TD align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></TD>
</TR>
<TR>
<TD height=\"23\" colSpan=\"2\" align=\"middle\"><INPUT value=\"$R_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$loginpath?res=popup1&uamip=$uamip&uamport=$uamport')\"></TD>
</TR>
<TR>
<TD colSpan=2 align=middle><H6><A href=\"https://$uamip/pass/\">$R_passwordchg</A></H6></TD>
</TR>
</TABLE>
<TABLE id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
<TR>
<TD align=\"middle\"><FONT color=\"red\"><B>$R_loggedin_stringl0</B></FONT></TD>
</TR>
<TR>
<TD align=\"middle\"><FONT color=\"black\"><B>$R_loggedin_stringl1</B></FONT></TD>
</TR>
<TR>
<TD align=\"left\">
<UL>
<LI>$R_loggedin_stringl2</LI>
<LI>$R_loggedin_stringl4</LI>
<LI>$R_loggedin_stringl3</LI>
<LI>$R_loggedin_stringl5</LI>
</UL>
<P id=\"aide-certif\">
$R_ca_1 <A href=\"/certs/certificat_alcasar_ca.crt\">$R_ca_2</a> $R_ca_3 <a href=\"/alcasar-certificat.pdf\">$R_ca_4</A>
</P>
</TD>
</TR>
</TABLE>
</DIV>
</center>
</form>
</body>
</html>";
}
 
#Fin des modifications
if ($result == 1) {
echo "
<table>
<table id=\"auth_reussi\">
<tr>
<td>
<img height=\"150\" src=\"/images/logo-alcasar.png\">
</td>
<td>
<h2 style=\"text-align: center;\">$R_login</h2>
<p class=\"text_auth\">$R_login</p>
</td>
</tr>";
if ($reply) {
541,17 → 553,17
 
if (($result == 4) || ($result == 12)) {
echo "
<table>
<table id=\"auth_reussi\">
<tr>
<td>
<img height=\"150\" src=\"/images/logo-alcasar.png\">
</td>
<td>
<h2 style=\"text-align: center;\">$R_login</h2>
<p class=\"text_auth\">$R_login</p>
</td>
</tr>
<tr><td colspan=2><center>
<h2><a href=\"http://$uamip:$uamport/logoff\">$R_logout</a></h2>
<p class=\"lien_deco\"><a href=\"http://$uamip:$uamport/logoff\">$R_logout</a></p>
</center></td></tr>
</table>
</body>
560,7 → 572,7
 
if ($result == 11) {
echo "
<h1 style=\"text-align: center;\">$R_loggingin</h1>
<h2 style=\"text-align: center;\">$R_loggingin</h2>
<center>$R_wait</center>
</body>
</html>";
569,7 → 581,7
if (($result == 3) || ($result == 13)) {
echo "
<center>
<h1 style=\"text-align: center;\">$R_loggedout</h1>
<p class=\"log_out\">$R_loggedout</p>
<FORM>
<INPUT TYPE=\"button\" VALUE=\"$R_boutonF\" onClick=\"window.close()\">
</FORM></CENTER>
/web/images/fond-bdd.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/images/fond.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+image/png
\ No newline at end of property
/web/acc/backup/sauvegarde.php
0,0 → 1,129
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><!-- written by Rexy -->
<HEAD>
<TITLE>Sauvegarde</TITLE>
<link rel="stylesheet" href="/css/style.css" type="text/css">
</HEAD>
<body>
<?
# choice of language
$Language = "en";
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2));}
if ($Language == 'fr'){
$l_backups = "Sauvegarde";
$l_user_db_save = "Sauvegarder la base des usagers";
$l_system_iso = "Cr&eacute;er une image ISO &agrave; chaud du syst&egrave;me";
$l_execute = "Ex&eacute;cuter";
$l_warning = "(attention, la cr&eacute;ation de l'image ISO du syst&egrave;me dure plusieurs dizaines de minutes)";
$l_backup_files = "Fichiers disponibles pour archivage";
$l_firewall_log = "Journaux du parefeu (Firewall)";
$l_users_db_files = "Base des usagers";
$l_iso_files = "images ISO du syst&egrave;me";
}
else {
$l_backups = "Backups";
$l_user_db_save = "Save the users database";
$l_system_iso = "Create a system iso image";
$l_execute = "Execute";
$l_warning = "(warning, the creation of the system iso image takes few minutes)";
$l_backup_files = "Archive backup files";
$l_firewall_log = "Firewall log files";
$l_users_db_files = "Users database";
$l_iso_files = "System ISO images";
}
function taille_fichier($fichier)
{
$taille_fichier = filesize($fichier);
if ($taille_fichier >= 1073741824){
$taille_fichier = round($taille_fichier / 1073741824 * 100) / 100 . " Go";}
elseif ($taille_fichier >= 1048576){
$taille_fichier = round($taille_fichier / 1048576 * 100) / 100 . " Mo";}
elseif ($taille_fichier >= 1024){
$taille_fichier = round($taille_fichier / 1024 * 100) / 100 . " Ko";}
else {$taille_fichier = $taille_fichier . " o";}
return $taille_fichier;
}
?>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><? echo $l_backups;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left">
<FORM action="sauvegarde.php" method=POST><b>
<select name='choix'></b>
<option value="sauvegarde_DB"><?echo "$l_user_db_save";?>
<option value="archivage_logs"><?echo "$l_firewall_log";?>
<option value="image_ISO"><?echo "$l_system_iso";?>
</select>
<input type=submit value="<?echo "$l_execute";?>">
</FORM>
<?echo "$l_warning";?>
</td></tr>
</TABLE>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th><?echo "$l_backup_files";?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<TR align="center">
<TD><b><?echo "$l_firewall_log";?></b></TD>
<TD><b><?echo "$l_users_db_files";?></b></TD>
<TD><b><?echo "$l_iso_files";?></b></TD>
</TR><TR align="center">
<?
if (isset($_POST['choix'])){
switch ($_POST['choix']){
case 'sauvegarde_DB' :
exec ("sudo /usr/local/sbin/alcasar-mysql.sh -dump");
break;
case 'archivage_logs' :
exec ("sudo /usr/local/bin/alcasar-log-export.sh -30");
break;
case 'image_ISO' :
exec ("sudo /usr/local/bin/alcasar-mondo.sh");
break;
}
}
$dir[0]="logs/firewall";
$dir[1]="base";
$dir[2]="ISO";
$j=0;
$nb=count($dir);
while ($j != $nb)
{
echo "<TD>";
$rep = opendir("/var/Save/".$dir[$j]);
$i=0; unset ($liste_f);
while ( $file = readdir($rep) )
{
if ($file != '.' && $file != '..')
{
$liste_f[$i] = $file;
$i++;
}
}
closedir($rep);
if ($i == 0)
{
echo "vide";
}
else
{
sort($liste_f);
while ( $i > 0)
{
$i--;
echo "<a href=\"/save/$dir[$j]/$liste_f[$i]\">$liste_f[$i]</A> (";echo taille_fichier("/var/Save/".$dir[$j]."/".$liste_f[$i]);echo ")<BR>";
}
}
echo "</TD>";
$j++;
}
?>
</tr>
</TABLE>
</BODY>
</HTML>
/web/css/style_intercept.css
0,0 → 1,133
/* règles générales */
 
:link, :visited, :hover:link, :hover:visited {
FONT-FAMILY: "DejaVu Sans";
COLOR: #000000;
}
 
H1, H2, #aide-certif {
TEXT-ALIGN: center;
padding: 0px;
margin: 3px;
}
P, UL, LI{
TEXT-ALIGN: justify;
}
INPUT {
BACKGROUND-COLOR: white;
}
 
BODY {
BACKGROUND-IMAGE: url(/images/fond.png);
BACKGROUND-REPEAT: repeat-x;
TEXT-ALIGN: center;
FONT-FAMILY: "DejaVu Sans";
COLOR: #666666;
FONT-SIZE: 12px;
BACKGROUND-COLOR: #666666;
MARGIN: 0px;
}
H1 {
COLOR: #666666;
FONT-SIZE: 55px;
}
H2 {
COLOR: #000000;
FONT-SIZE: 30px;
}
H6, #aide-certif{
FONT-SIZE: 100%;
}
UL {
MARGIN: 5px;
PADDING-BOTTOM: 5px;
PADDING-LEFT: 10px;
PADDING-RIGHT: 115px;
PADDING-TOP: 5px;
}
LI {
LIST-STYLE-TYPE: square;
PADDING-TOP: 2px;
}
TABLE {
FONT-SIZE: 90%;
}
IMG {
HEIGHT: 150px;
}
INPUT {
BORDER: #666666 1px solid;
PADDING: 2px;
FONT-FAMILY: Arial;
HEIGHT: 22px;
}
 
/* Taille et position des logos */
 
#logo-alcasar {
POSITION: absolute;
BOTTOM: 25px;
RIGHT: 5px;
HEIGHT: 130px;
}
#logo-organ {
POSITION: relative;
TOP: 0px;
RIGHT: -10px;
MAX-WIDTH: 150px;
MAX-HEIGHT: 150px;
}
 
/* Placement et proportion de la boite de saisie et de l'aide */
 
#logon {
POSITION: relative;
WIDTH: 620px;
TOP: 20px;
border: 1px #efefef solid;
background-color: white;
}
 
#boite-logon {
BACKGROUND-IMAGE: url(/images/fond-bdd.png);
BORDER: #999999 1px solid;
PADDING: 10px;
WIDTH: 420px;
BACKGROUND-REPEAT: repeat-x;
HEIGHT: 189px;
COLOR: black;
}
#boite-logon TD {
PADDING-TOP: 10px;
}
#boite-info {
BORDER: 0px;
MARGIN-TOP: 25px;
WIDTH: 580px;
PADDING-TOP: 10px;
}
/*Boite de dialogue de deconnection*/
 
#auth_reussi {
WIDTH: 450px;
BACKGROUND-COLOR: white;
MARGIN-TOP: 12px;
PADDING-TOP: 5px;
PADDING-LEFT: 10px;
PADDING-RIGHT: 10px;
PADDING-BOTTOM: 0px;
BORDER: 1px #efefef solid;
}
.text_auth {
FONT-SIZE: 20px;
}
.lien_deco {
TEXT-ALIGN: center;
FONT-SIZE: 18px;
}
.log_out {
FONT-SIZE: 24px;
TEXT-ALIGN: center;
COLOR: white;
PADDING-TOP: 30px;
}