Commit 00b10663 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Remove deprecated files.

parent 5dda30da
AuthUserFile /home/webapp/alumniform/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
require valid-user
<files "db.php">
require user admin
order deny,allow
deny from all
allow from 192.168.101.0/24
</files>
alumni:$apr1$ogXcqImm$vjgmXElZ0G1sAFMP5h2HJ0
admin:$apr1$TKQ7l9AU$E7B6md9.NOKqHQOUWQM2j1
<?
function print_headers()
{
print <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LRDE - Que devenez-vous ?</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
</head>
<body id="main_body" >
EOF;
}
function new_order($order)
{
if ($order == "ASC")
return "DESC";
else
return "ASC";
}
$fields = array(array("firstname", "Prénom"),
array("lastname", "Nom"),
array("email", "Email"),
array("blog", "Blog"),
array("promo", "Promo"),
array("major", "Majeur"),
array("dea_name", "DEA"),
array("dea_univ", "Université"),
array("phd_subject", "Sujet de Thèse"),
array("phd_year", "Année de thèse"),
array("phd_lab", "Labo"),
array("company", "Entreprise"),
array("job", "Job"),
array("city", "Ville"),
array("country", "Pays"),
array("ladr", "ladr"));
function display_result()
{
global $fields;
$sort = "lastname";
$order = "ASC";
if (isset($_GET[order]))
$order = $_GET[order];
if ($order != "ASC" && $order != "DESC")
$order = "ASC";
if (isset($_GET[sort]))
$sort = $_GET[sort];
if ($sort != "firstname" && $sort != "lastname" && $sort != "email"
&& $sort != "promo" && $sort != "major" && $sort != "dea_name"
&& $sort != "dea_univ" && $sort != "phd_subject" && $sort != "phd_year"
&& $sort != "phd_lab" && $sort != "company" && $sort != "job"
&& $sort != "city" && $sort != "country" && $sort != "ladr"
&& $sort != "blog")
die("Invalid sort column");
// Connect to DB
$db = mysql_connect('localhost', 'alumniform', 'MDHXU4CQBbbcdyxb') or die('Erreur de connexion '.mysql_error());
mysql_set_charset('utf8',$db);
mysql_select_db('alumniform',$db) or die('Erreur de selection '.mysql_error());
print "<font size=\"220%\">Annuaire des anciens</font>";
for ($promo = 2000; $promo < 2015; ++$promo)
{
$query ="SELECT * FROM alumniform.alumni WHERE promo='$promo' ORDER BY $sort $order";
// Query results
$result = mysql_query($query);
if (!$result)
die('Erreur SQL !'.$query.'<br>'.mysql_error());
if (mysql_num_rows($result) == 0)
continue;
print "<p align=\"left\"><font size=\"200%\">$promo</font></p>";
// Process data
$i = 0;
print "<table class=\"description\" border=\"1\" cellpadding=\"5\">";
print "<tr bgcolor=\"white\">";
foreach ($fields as $value)
print "<th><a href=\"$_SELF?sort=$value[0]&order=".new_order($order)."\">$value[1]</a></th>";
print "</tr>";
while ($row = mysql_fetch_assoc($result))
{
if ($i % 2)
$bgcolor = "#DDDDDD";
else
$bgcolor = "#EFEFEF";
print "<tr bgcolor=\"$bgcolor\">
<td>$row[firstname]</td>
<td>$row[lastname]</td>
<td>$row[email]</td>
<td><a href=\"$row[blog]\">$row[blog]</a></td>
<td>$row[promo]</td><td>$row[major]</td>
<td>$row[dea_name]</td>
<td>$row[dea_univ]</td>
<td>$row[phd_subject]</td>";
if ($row[phd_year] == 0)
print "<td></td>";
else
print "<td>$row[phd_year]</td>";
print "<td>$row[phd_lab]</td>
<td>$row[company]</td><td>$row[job]</td>
<td>$row[city]</td>
<td>$row[country]</td><td>$row[ladr]</td></tr>";
++$i;
}
print "</table><br><br>";
}
mysql_close();
}
print_headers();
display_result();
?>
\ No newline at end of file
<public:component>
<public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m)
{
if (filters[f])
{
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m }
}
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}
function doFix()
{
// Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
if (tagName == 'IMG')
{
if ((/\.png$/i).test(src))
{
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
filt(src, 'scale');
src = blankImg;
}
else if (src.indexOf(blankImg) < 0) filt();
}
else if (bgImg && bgImg != 'none')
{
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{
var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px';
style.backgroundImage = 'none';
filt(s, 'crop');
// IE link fix.
for (var n = 0; n < childNodes.length; n++)
if (childNodes[n].style) childNodes[n].style.position = 'relative';
}
else filt();
}
}
doFix();
</script>
</public:component>
\ No newline at end of file
<?
function print_header()
{
print <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LRDE - Que devenez-vous ?</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
</head>
<body id="main_body" >
<img id="top" src="images/top.png" alt="">
<div id="form_container">
EOF;
EOF;
}
function print_form()
{
print <<<EOF
<h1><a>Que devenez-vous ?</a></h1>
<form id="form_276058" class="appnitro" method="post" action="">
<div class="form_description">
<h2><img src="images/logo.png">&nbsp;Que devenez-vous ?</h2>
<p>Merci de prendre le temps de venir sur cette page! <br/>Dans le but de
mieux connaître votre parcours, merci de prendre 2 min pour
nous apporter les informations suivantes. <br/>Ces informations
seront conservées uniquement pour nous, permanents du
LRDE. Elles nous permettront de mieux connaître le parcours d&lsquo;un étudiant passé au labo, de valoriser le
labo et de garder contact avec vous (on ne sais jamais, un pôt est si vite arrivé!).
<br/></p> </div> <ul >
<h3>Qui es-tu ?</h3>
<li id="li_1" >
<span>
<label class="description" for="firstname">Prénom<font color="red">*</font> </label>
<input id="firstname" name="firstname" class="element text" type="text" maxlength="255" size="14" value=""/>
</span>
<span>
<label class="description" for="lastname">Nom<font color="red">*</font> </label>
<input id="lastname" name="lastname" class="element text" type="text" maxlength="255" value=""/>
</span>
<div>
<label class="description" for="email">Email actuel<font color="red">*</font> </label>
<input id="email" name="email" class="element text medium" type="text" maxlength="255" value=""/>
</div>
<label class="description" for="city">Ville<font color="red">*</font> </label>
<div>
<input id="city" name="city" class="element text medium" type="text" maxlength="255" value=""/>
</div>
<label class="description" for="country">Pays<font color="red">*</font> </label>
<div>
<input id="country" name="country" class="element text medium" type="text" maxlength="255" value=""/>
</div>
<label class="description" for="blog">Blog/Page perso</label>
<div>
<input id="blog" name="blog" class="element text medium" type="text" maxlength="255" value="http://"/>
</div>
</li>
<h3>Parcours professionnel</h3>
<li id="li_10" >
<span>
<label class="description" for="major">Spécialisation<font color="red">*</font> </label>
<select class="element select" id="major" name="major">
<option value="" selected="selected"></option>
<option value="CSI" >CSI</option>
<option value="GISTR" >GISTR</option>
<option value="MMA" >MMA</option>
<option value="SCIA" >SCIA</option>
<option value="SIGL" >SIGL</option>
<option value="SRS" >SRS</option>
<option value="TCOM" >TCOM</option>
</select>
</span>
<span>
<label class="description" for="promo">Promo<font color="red">*</font> </label>
<select class="element select" id="promo" name="promo">
<option value="" selected="selected"></option>
EOF;
// Printing different promos.
for ($i=2000; $i < 2012; ++$i)
print "<option value=\"$i\" >$i</option>";
print <<<EOF
</select>
</span>
</li> <li id="li_3" >
<span>
<label class="description" for="dea_name">Nom du DEA/Master</label>
<input id="dea_name" name="dea_name" class="element text" type="text" maxlength="255" value=""/>
</span>
<span>
<label class="description" for="dea_univ">Université du DEA/Master</label>
<input id="dea_univ" name="dea_univ" class="element text" type="text" maxlength="255" value=""/>
</span>
<p class="guidelines" id="guide_3"><small>Si vous avez effectué un DEA/Master après l&lsquo;EPITA, merci de le préciser ici.</small></p>
</li>
<li id="li_4" >
<span>
<label class="description" for="phd_subject">Sujet de Thèse </label>
<input id="phd_subject" name="phd_subject" class="element text" type="text" maxlength="255" value=""/>
</span>
<span>
<label class="description" for="phd_year">Année de thèse </label>
<select class="element select" id="phd_year" name="phd_year">
<option value="" selected="selected"></option>
EOF;
// Printing different promos.
for ($i=2003; $i < 2013; ++$i)
print "<option value=\"$i\" >$i</option>";
print <<<EOF
</select>
</span>
<span>
<label class="description" for="phd_lab">Lieu de la thèse </label>
<input id="phd_lab" name="phd_lab" class="element text" type="text" maxlength="255" value=""/>
</span><p class="guidelines" id="guide_4"><small>Si vous avez effectué une thèse merci de le préciser ici.</small></p>
</li>
<li id="li_5" >
<span>
<label class="description" for="company">Entreprise<font color="red">*</font> </label>
<input id="company" name="company" class="element text" type="text" maxlength="255" value=""/>
</span>
<span>
<label class="description" for="job">Poste<font color="red">*</font> </label>
<input id="job" name="job" class="element text" type="text" maxlength="255" value=""/>
</span>
</li><li id="li_8" >
<label class="description" for="ladr">Je suis partant pour témoigner de mon parcours dans un l&lsquo;Air De Rien spécial anciens. </label>
<span>
<input id="ladr" name="ladr" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="ladr">Oui</label>
</span>
</li>
<li class="buttons">
<input type="hidden" name="form_id" value="276058" />
<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>
<font color="red">*</font> : Champ obligatoire.
EOF;
}
function print_footer()
{
print <<< EOF
<center><h6>
<hr>
Les informations recueillies nous permettent de mieux connaître nos anciens.
<br>Elles font lobjet dun traitement informatique et sont destinées aux seuls permanents du laboratoire. En application des articles 39 et suivants de la loi du 6 janvier 1978 modifiée, vous bénéficiez dun droit daccès et de rectification aux informations qui vous concernent.
<br>Si vous souhaitez exercer ce droit et obtenir communication des informations vous concernant, veuillez vous adresser à : <a href="mailto:z@lrde.epita.fr">z@lrde.epita.fr</a>
<br><br></h6></center>
</div>
<img id="bottom" src="images/bottom.png" alt="">
</body>
</html>
EOF;
}
function process_data()
{
$db = mysql_connect('localhost', 'alumniform', 'MDHXU4CQBbbcdyxb') or die('Erreur de connexion '.mysql_error());
mysql_set_charset('utf8',$db);
mysql_select_db('alumniform',$db) or die('Erreur de selection '.mysql_error());
if (empty($_POST[firstname]) || empty($_POST[lastname]) || empty($_POST[email])
|| empty($_POST[promo]) || empty($_POST[major]) || empty($_POST[company])
|| empty($_POST[job]) || empty($_POST[country]) || empty($_POST[city]))
return false;
if ($_POST[blog] == "http://")
$blog = "";
else
$blog = $_POST[blog];
$query ="INSERT INTO alumniform.alumni (id, firstname, lastname,
email, blog, promo, major, dea_name, dea_univ, phd_subject,
phd_year, phd_lab, company, job, city, country, ladr)
VALUES
(NULL , '$_POST[firstname]',
'$_POST[lastname]',
'$_POST[email]',
'$blog',
'$_POST[promo]',
'$_POST[major]',
'$_POST[dea_name]',
'$_POST[dea_univ]',
'$_POST[phd_subject]',
'$_POST[phd_year]',
'$_POST[phd_lab]',
'$_POST[company]',
'$_POST[job]',
'$_POST[city]',
'$_POST[country]',
'$_POST[ladr]');";
mysql_query($query) or die('Erreur SQL !'.$query.'<br>'.mysql_error());
mysql_close();
return true;
}
function print_result()
{
print <<<EOF
<div class="form_description">
<form id="form_276058" class="appnitro" method="post" action="">
<center><h2>Merci pour ta réponse!
<br><br> A très bientôt pour le prochain pôt!</h2></center>
</form>
</div>
EOF;
}
function print_error()
{
print <<<EOF
<div class="form_description">
<form id="form_276058" class="appnitro" method="post" action="">
<center><h2><font color=red>Certains champs n&lsquo;ont pas été remplis! Merci
de revenir sur la page précédente pour les compléter.</font></h2></center>
</form>
</div>
EOF;
return true;
}
print_header();
if (!empty($_POST))
{
if (process_data())
print_result();
else
print_error();
}
else
print_form();
print_footer();
?>
\ No newline at end of file
body
{
background:#CDDCEC;
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
font-size:small;
margin:8px 0 16px;
text-align:center;
}
#form_container
{
background:#fff;
margin:0 auto;
text-align:left;
width:640px;
}
#top
{
display:block;
height:10px;
margin:10px auto 0;
width:650px;
}
#footer
{
width:640px;
clear:both;
color:#999999;
text-align:center;
width:640px;
padding-bottom: 15px;
font-size: 85%;
}
#footer a{
color:#999999;
text-decoration: none;
border-bottom: 1px dotted #999999;
}
#bottom
{
display:block;
height:10px;
margin:0 auto;
width:650px;
}
form.appnitro
{
margin:20px 20px 0;
padding:0 0 20px;
}
/**** Logo Section *****/
h1
{
background-color:#4B75B3;
margin:0;
min-height:0;
padding:0;
text-decoration:none;
text-indent:-8000px;
}
h1 a
{
display:block;
height:100%;
min-height:40px;
overflow:hidden;
}
img
{
behavior:url(css/iepngfix.htc);
border:none;
}
/**** Form Section ****/
.appnitro
{
font-family:Lucida Grande, Tahoma, Arial, Verdana, sans-serif;
font-size:small;
}
.appnitro li
{
width:61%;
}
form ul
{
font-size:100%;
list-style-type:none;
margin:0;
padding:0;
width:100%;
}
form li
{
display:block;
margin:0;
padding:4px 5px 2px 9px;
position:relative;
}