Commit cfb05d95 authored by Antoine Tenart's avatar Antoine Tenart

kwain

parent ebd02c08
......@@ -104,10 +104,10 @@ else
{
$img = $topdir."images/icons/128/user.png";
if ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
$gal->add_item(
"<a href=\"../user.php?id_utilisateur=".$row['id_utilisateur']."\"><img src=\"$img\" alt=\"Photo\" height=\"105\"></a>",
......
......@@ -348,7 +348,7 @@ L'équipe info AE";
"ORDER BY `ae_carte`.`id_carte_ae`");
$printable['sev'] = array();
while ( $row = $req->get_row() )
if ( file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
if ( file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
$printable['sev'][]=$row['id_utilisateur'];
$req = new requete($site->db,
......@@ -360,7 +360,7 @@ L'équipe info AE";
"ORDER BY `ae_carte`.`id_carte_ae`");
$printable['mon'] = array();
while ( $row = $req->get_row() )
if ( file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
if ( file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
$printable['mon'][]=$row['id_utilisateur'];
$req = new requete($site->db,
......@@ -372,7 +372,7 @@ L'équipe info AE";
"ORDER BY `ae_carte`.`id_carte_ae`");
$printable['bel'] = array();
while ( $row = $req->get_row() )
if ( file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
if ( file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
$printable['bel'][]=$row['id_utilisateur'];
$print = new contents("PDFs &agrave; imprimer ");
......@@ -389,7 +389,7 @@ L'équipe info AE";
"ORDER BY `ae_carte`.`id_carte_ae`");
$nprintable = array();
while ( $row = $req->get_row() )
if ( !file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
if ( !file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
$nprintable[]=$row['id_utilisateur'];
$req = new requete($site->db,
......
......@@ -468,7 +468,7 @@ elseif ( $_REQUEST["action"] == "searchstudent" )
$ville->load_by_id($user->id_ville);
$pays->load_by_id($user->id_pays);
$cts->add(new image($user->prenom . " " . $user->nom,$topdir."/var/img/matmatronch/".$user->id.".identity.jpg","fiche_image"));
$cts->add(new image($user->prenom . " " . $user->nom,$topdir."/data/matmatronch/".$user->id.".identity.jpg","fiche_image"));
$cts->add_paragraph(
"<b>". $user->prenom . " " . $user->nom . "</b><br/>" .
$user->surnom."<br/>\n".
......
......@@ -84,8 +84,8 @@ while ( $row = $req->get_row() )
{
$img = $wwwtopdir."images/icons/128/user.png";
if ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = "/var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg";
if ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = "/data/matmatronch/".$row['id_utilisateur'].".identity.jpg";
if ( $row['desc_role'] )
$role = $row['desc_role'];
......
......@@ -173,10 +173,10 @@ while ( $row = $req->get_row() )
{
$img = $topdir."images/icons/128/user.png";
if ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
$history->add_element(strtotime($row['date_debut']),
"<a href=\"../user.php?id_utilisateur=".$row['id_utilisateur']."\"><img src=\"$img\" alt=\"Photo\" height=\"105\"></a>",
......
......@@ -244,10 +244,10 @@ if ( $_REQUEST["view"] == "trombino" || $limited )
{
$img = $topdir."images/icons/128/user.png";
if ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif ( file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif ( file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg") )
$img = $topdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
if ( $row['desc_role'] )
$role = $row['desc_role'];
......
......@@ -68,7 +68,7 @@ class productinfo extends stdcontents
$this->buffer .= "<img src=\"".$wwwtopdir."../d.php?id_file=".$product->id_file."&amp;action=download&amp;download=preview\" alt=\"\" class=\"fiche_image\" title=\"".$produit->nom."\" alt=\"".$produit->nom."\"/>\n";
}
else
$this->buffer .= "<img src=\"/var/img/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image\" />\n";
$this->buffer .= "<img src=\"/data/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image\" />\n";
$this->buffer .= "</div>";
......
......@@ -117,10 +117,10 @@ if ( isset($_REQUEST["id_election"]))
$cdts[$id_liste] .= "<div class=\"candidat\"><br/>";
if ( file_exists($topdir."var/img/matmatronch/".$srow['id_utilisateur'].".identity.jpg") )
$cdts[$id_liste] .= "<img src=\"/var/img/matmatronch/".$srow['id_utilisateur'].".identity.jpg\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
if ( file_exists($topdir."data/matmatronch/".$srow['id_utilisateur'].".identity.jpg") )
$cdts[$id_liste] .= "<img src=\"/data/matmatronch/".$srow['id_utilisateur'].".identity.jpg\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
else
$cdts[$id_liste] .= "<img src=\"/var/img/matmatronch/na.gif"."\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
$cdts[$id_liste] .= "<img src=\"/data/matmatronch/na.gif"."\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
$cdts[$id_liste] .= $srow['prenom_utl']." ".$srow['nom_utl'];
......@@ -228,10 +228,10 @@ if ( isset($_REQUEST["id_election"]))
$cdts[$id_liste] .= "<div class=\"candidat\"><input type=\"radio\" id=\"$idradio\" name=\"vote[$id_poste]\" value=\"".$srow['id_utilisateur']."\" /><br/>";
if ( file_exists($topdir."var/img/matmatronch/".$srow['id_utilisateur'].".identity.jpg") )
$cdts[$id_liste] .= "<img src=\"/var/img/matmatronch/".$srow['id_utilisateur'].".identity.jpg\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
if ( file_exists($topdir."data/matmatronch/".$srow['id_utilisateur'].".identity.jpg") )
$cdts[$id_liste] .= "<img src=\"/data/matmatronch/".$srow['id_utilisateur'].".identity.jpg\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
else
$cdts[$id_liste] .= "<img src=\"/var/img/matmatronch/na.gif"."\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
$cdts[$id_liste] .= "<img src=\"/data/matmatronch/na.gif"."\" alt=\"\" onclick=\"document.getElementById('$idradio').checked = true;\" /><br/>\n";
$cdts[$id_liste] .= $srow['prenom_utl']." ".$srow['nom_utl'];
......
......@@ -453,8 +453,8 @@ if ( isset($_REQUEST["pattern"] ) )
$buffer .= "<p class=\"funame\"><a href=\"#top\"><img src=\"".$topdir."images/forum/top.png\" /></a>&nbsp;&nbsp;<a href=\"".$wwwtopdir."user.php?id_utilisateur=".$row['id_utilisateur']."\">".htmlentities($row['alias_utl'],ENT_NOQUOTES,"UTF-8")."</a></p>\n";
$img=null;
if (file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg"))
$img = $wwwtopdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if (file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg"))
$img = $wwwtopdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
if ( !is_null($img) )
$buffer .= "<p class=\"fuimg\"><img src=\"".htmlentities($img,ENT_NOQUOTES,"UTF-8")."\" /></p>\n";
......
......@@ -164,12 +164,12 @@ elseif ( $_REQUEST['module']=="userfield" )
{
$buffer .= "<li><div class=\"imguser\"><img src=\"";
if (file_exists($topdir."var/img/matmatronch/".$id.".identity.jpg"))
$buffer .= $wwwtopdir."var/img/matmatronch/".$id.".identity.jpg";
elseif (file_exists($topdir."var/img/matmatronch/".$id.".jpg"))
$buffer .= $wwwtopdir."var/img/matmatronch/".$id.".jpg";
if (file_exists($topdir."data/matmatronch/".$id.".identity.jpg"))
$buffer .= $wwwtopdir."data/matmatronch/".$id.".identity.jpg";
elseif (file_exists($topdir."data/matmatronch/".$id.".jpg"))
$buffer .= $wwwtopdir."data/matmatronch/".$id.".jpg";
else
$buffer .= $wwwtopdir."var/img/matmatronch/na.gif";
$buffer .= $wwwtopdir."data/matmatronch/na.gif";
$buffer .= "\" /></div><a href=\"#\" onclick=\"userselect_set_user('$wwwtopdir','".$_REQUEST["ref"]."',$id,'".addslashes(htmlspecialchars($email))."'); return false;\">".htmlspecialchars($email)."</a></li>";
}
......@@ -192,10 +192,10 @@ elseif ( $_REQUEST['module']=="userinfo" )
if ( $user->id < 0 )
$user = &$site->user;
if (file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
echo "<img src=\"".$wwwtopdir."var/img/matmatronch/".$user->id.".jpg\" alt=\"\" />\n";
if (file_exists($topdir."data/matmatronch/".$user->id.".identity.jpg"))
echo "<img src=\"".$wwwtopdir."data/matmatronch/".$user->id.".jpg\" alt=\"\" />\n";
else
echo "<img src=\"".$wwwtopdir."var/img/matmatronch/na.gif"."\" alt=\"\" />\n";
echo "<img src=\"".$wwwtopdir."data/matmatronch/na.gif"."\" alt=\"\" />\n";
echo "<p class=\"nomprenom\">". $user->prenom . " " . $user->nom . "</p>";
if ( $user->surnom )
......
......@@ -48,7 +48,7 @@ $fiche->add_title(2,htmlentities($user->prenom." ".$user->nom,ENT_COMPAT,"UTF-8"
if (file_exists("/data/matmatronch/".$user->id.".identity.i.jpg"))
{
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".identity.i.jpg\" /></p>");
$fiche->puts("<p align=\"center\"><img src=\"/data/matmatronch/".$user->id.".identity.i.jpg\" /></p>");
}
else if (file_exists("/data/matmatronch/".$user->id.".identity.jpg"))
{
......@@ -56,11 +56,11 @@ else if (file_exists("/data/matmatronch/".$user->id.".identity.jpg"))
$dest = "/data/matmatronch/".$user->id.".identity.i.jpg";
print_r(exec("/usr/share/php5/exec/convert $src -thumbnail 64x64 -quality 95 $dest"));
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".identity.i.jpg\" /></p>");
$fiche->puts("<p align=\"center\"><img src=\"/data/matmatronch/".$user->id.".identity.i.jpg\" /></p>");
}
else if (file_exists("/data/matmatronch/".$user->id.".i.jpg"))
{
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".i.jpg\" /></p>");
$fiche->puts("<p align=\"center\"><img src=\"/data/matmatronch/".$user->id.".i.jpg\" /></p>");
}
else if (file_exists("/data/matmatronch/".$user->id.".jpg"))
{
......@@ -68,7 +68,7 @@ else if (file_exists("/data/matmatronch/".$user->id.".jpg"))
$dest = "/data/matmatronch/".$user->id.".i.jpg";
print_r(exec("/usr/share/php5/exec/convert $src -thumbnail 64x64 -quality 95 $dest"));
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".i.jpg\" /></p>");
$fiche->puts("<p align=\"center\"><img src=\"/data/matmatronch/".$user->id.".i.jpg\" /></p>");
}
......
......@@ -433,8 +433,8 @@ class sujetforum extends stdcontents
$this->buffer .= "<p class=\"funame\"><a href=\"#top\"><img src=\"".$topdir."images/forum/top.png\" /></a>&nbsp;&nbsp;<a href=\"".$wwwtopdir."user.php?id_utilisateur=".$row['id_utilisateur']."\">".htmlentities($row['alias_utl'],ENT_NOQUOTES,"UTF-8")."</a></p>\n";
$img=null;
if (file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg"))
$img = $wwwtopdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if (file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg"))
$img = $wwwtopdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
if ( !is_null($img) )
$this->buffer .= "<p class=\"fuimg\"><img src=\"".htmlentities($img,ENT_NOQUOTES,"UTF-8")."\" /></p>\n";
......@@ -563,8 +563,8 @@ class simplemessageforum extends stdcontents
$this->buffer .= "<p class=\"funame\"><a href=\"".$wwwtopdir."user.php?id_utilisateur=".$message->id_utilisateur."\">".htmlentities($row['alias_utl'], ENT_NOQUOTES,"UTF-8")."</a></p>\n";
$img=null;
if (file_exists($topdir."var/img/matmatronch/".$message->id_utilisateur.".jpg"))
$img = $wwwtopdir."var/img/matmatronch/".$message->id_utilisateur.".jpg";
if (file_exists($topdir."data/matmatronch/".$message->id_utilisateur.".jpg"))
$img = $wwwtopdir."data/matmatronch/".$message->id_utilisateur.".jpg";
if ( !is_null($img) )
$this->buffer .= "<p class=\"fuimg\"><img src=\"".htmlentities($img,ENT_NOQUOTES,"UTF-8")."\" /></p>\n";
......
......@@ -145,12 +145,12 @@ class fsearch extends stdcontents
$this->buffer .= '<li><div class="imguser"><img src="';
if (file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg"))
$this->buffer .= $wwwtopdir."var/img/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif (file_exists($topdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg"))
$this->buffer .= $wwwtopdir."var/img/matmatronch/".$row['id_utilisateur'].".jpg";
if (file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg"))
$this->buffer .= $wwwtopdir."data/matmatronch/".$row['id_utilisateur'].".identity.jpg";
elseif (file_exists($topdir."data/matmatronch/".$row['id_utilisateur'].".jpg"))
$this->buffer .= $wwwtopdir."data/matmatronch/".$row['id_utilisateur'].".jpg";
else
$this->buffer .= $wwwtopdir."var/img/matmatronch/na.gif";
$this->buffer .= $wwwtopdir."data/matmatronch/na.gif";
$this->buffer .= "\" /></div><a href=\"".$wwwtopdir."user.php?id_utilisateur=".$row['id_utilisateur']."\"><img src=\"".$wwwtopdir."images/icons/16/user.png\" class=\"icon\" alt=\"\" /> $nom</a></li>";
......
......@@ -109,35 +109,35 @@ class userinfo extends stdcontents
$this->buffer .= "<div class=\"photo\" style=\"height: 120px; float: left;\">";
if ($user->id && file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
if ($user->id && file_exists($topdir."data/matmatronch/".$user->id.".identity.jpg"))
{
$date_prise_vue = "";
$exif = @exif_read_data("/data/matmatronch/".$user->id.".identity.jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$size = getimagesize($topdir."var/img/matmatronch/".$user->id.".identity.jpg");
$size = getimagesize($topdir."data/matmatronch/".$user->id.".identity.jpg");
/* laissons une marge de 50px */
$width = $size[0] + 50;
$height = $size[1] + 75;
$this->buffer .= "<a href=\"javascript:openMatmatronch('".
$user->id."','".$width."','".$height."')\"><img src=\"".$topdir."var/img/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."\" alt=\"\" class=\"fiche_image\" title=\"Cliquez pour agrandir l'image\" alt=\"Cliquez pour agrandir l'image\"/></a>\n";
$user->id."','".$width."','".$height."')\"><img src=\"".$topdir."data/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."\" alt=\"\" class=\"fiche_image\" title=\"Cliquez pour agrandir l'image\" alt=\"Cliquez pour agrandir l'image\"/></a>\n";
}
elseif ( $user->id && file_exists($topdir."var/img/matmatronch/".$user->id.".jpg"))
elseif ( $user->id && file_exists($topdir."data/matmatronch/".$user->id.".jpg"))
{
$date_prise_vue = "";
$exif = @exif_read_data("/data/matmatronch/".$user->id.".jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$size = getimagesize($topdir."var/img/matmatronch/".$user->id.".jpg");
$size = getimagesize($topdir."data/matmatronch/".$user->id.".jpg");
/* laissons une marge de 50px */
$width = $size[0] + 50;
$height = $size[1] + 75;
$this->buffer .= "<a href=\"javascript:openMatmatronch('". $topdir. "','".
$user->id."','".$width."','".$height."')\"><img src=\"".$topdir."var/img/matmatronch/".$user->id.".jpg?".$date_prise_vue."\" alt=\"\" class=\"fiche_image\" title=\"Cliquez pour agrandir l'image\" alt=\"Cliquez pour agrandire l'image\"/></a>\n";
$user->id."','".$width."','".$height."')\"><img src=\"".$topdir."data/matmatronch/".$user->id.".jpg?".$date_prise_vue."\" alt=\"\" class=\"fiche_image\" title=\"Cliquez pour agrandir l'image\" alt=\"Cliquez pour agrandire l'image\"/></a>\n";
}
else
$this->buffer .= "<img src=\"/var/img/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image\" />\n";
$this->buffer .= "<img src=\"/data/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image\" />\n";
$this->buffer .= "</div>";
......@@ -369,12 +369,12 @@ class userinfo extends stdcontents
}
$this->buffer .= "</div>";
if (file_exists($topdir."var/img/matmatronch/".$user->id.".jpg"))
$this->buffer .= "<img src=\"".$topdir."/var/img/matmatronch/".$user->id.".jpg\" class=\"fiche_image_full\"/>\n";
elseif (file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
$this->buffer .= "<img src=\"".$topdir."/var/img/matmatronch/".$user->id.".identity.jpg\" class=\"fiche_image_full\"/>\n<br /><i>(Photo MatMatronch non pr&eacute;sente&nbsp;!)</i>\n";
if (file_exists($topdir."data/matmatronch/".$user->id.".jpg"))
$this->buffer .= "<img src=\"".$topdir."/data/matmatronch/".$user->id.".jpg\" class=\"fiche_image_full\"/>\n";
elseif (file_exists($topdir."data/matmatronch/".$user->id.".identity.jpg"))
$this->buffer .= "<img src=\"".$topdir."/data/matmatronch/".$user->id.".identity.jpg\" class=\"fiche_image_full\"/>\n<br /><i>(Photo MatMatronch non pr&eacute;sente&nbsp;!)</i>\n";
else
$this->buffer .= "<img src=\"/var/img/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image_full\" />\n";
$this->buffer .= "<img src=\"/data/matmatronch/na.gif"."\" alt=\"\" class=\"fiche_image_full\" />\n";
$this->buffer .= "<br/><br/><div class=\"citation\" style=\"width: 250px; text-align: center;\"><i>".$user->citation."</i></div>";
$this->buffer .= "</div>";
......@@ -443,7 +443,7 @@ class userinfov2 extends stdcontents
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$img = "/var/img/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue;
$img = "/data/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue;
$imgclass="idimg";
}
......@@ -467,28 +467,28 @@ class userinfov2 extends stdcontents
$this->buffer .= "<div class=\"switchphoto\">";
$this->buffer .= "<div class=\"photommt\">";
if (file_exists($topdir."var/img/matmatronch/".$user->id.".jpg"))
if (file_exists($topdir."data/matmatronch/".$user->id.".jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."var/img/matmatronch/".$user->id.".jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."var/img/matmatronch/".$user->id.".jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo\" /></a>";
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."data/matmatronch/".$user->id.".jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."data/matmatronch/".$user->id.".jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo\" /></a>";
}
else
$this->buffer .= "<img src=\"".$topdir."images/icons/128/blackbox.png"."\" class=\"switchnone\" alt=\"Photo\" />";
$this->buffer .= "</div>\n";
$this->buffer .= "<div class=\"photoid\">";
if (file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
if (file_exists($topdir."data/matmatronch/".$user->id.".identity.jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".identity.jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."var/img/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."var/img/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo d'identite\" /></a>";
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."data/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."data/matmatronch/".$user->id.".identity.jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo d'identite\" /></a>";
}
else
$this->buffer .= "<img src=\"".$topdir."images/icons/128/blackbox.png"."\" class=\"switchnone\" alt=\"Photo d'identite\" />";
......@@ -501,8 +501,8 @@ class userinfov2 extends stdcontents
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."var/img/matmatronch/".$user->id.".blouse.mini.jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."var/img/matmatronch/".$user->id.".blouse.mini.jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo de la blouse\" /></a>";
$this->buffer .= "<a href=\"#\" onclick=\"switchphoto('mmtphoto$numFiche','".$realpath."data/matmatronch/".$user->id.".blouse.mini.jpg?".$date_prise_vue."'); return false;\">";
$this->buffer .= "<img src=\"".$topdir."data/matmatronch/".$user->id.".blouse.mini.jpg?".$date_prise_vue."\" class=\"switch\" alt=\"Photo de la blouse\" /></a>";
}
else
$this->buffer .= "<img src=\"".$topdir."images/icons/128/blackbox.png"."\" class=\"switchnone\" alt=\"Photo de la blouse\" />";
......
......@@ -1868,10 +1868,10 @@ L'équipe info AE";
}
*/
if ( file_exists($topdir."var/img/matmatronch/".$this->id.".identity.jpg"))
if ( file_exists($topdir."data/matmatronch/".$this->id.".identity.jpg"))
{
echo "PHOTO;TYPE=JPEG;BASE64:\n";
echo " ".chunk_split(base64_encode(file_get_contents($topdir."var/img/matmatronch/".$this->id.".identity.jpg")),76,"\n ");
echo " ".chunk_split(base64_encode(file_get_contents($topdir."data/matmatronch/".$this->id.".identity.jpg")),76,"\n ");
echo "\n";
}
echo "END:VCARD\n";
......@@ -1887,11 +1887,11 @@ L'équipe info AE";
{
global $topdir;
if ( file_exists($topdir."var/img/matmatronch/".$this->id.".identity.jpg"))
return "var/img/matmatronch/".$this->id.".identity.jpg";
if ( file_exists($topdir."data/matmatronch/".$this->id.".identity.jpg"))
return "data/matmatronch/".$this->id.".identity.jpg";
if ( file_exists($topdir."var/img/matmatronch/".$this->id.".jpg"))
return "var/img/matmatronch/".$this->id.".jpg";
if ( file_exists($topdir."data/matmatronch/".$this->id.".jpg"))
return "data/matmatronch/".$this->id.".jpg";
return "images/icons/128/unknown.png";
}
......@@ -2214,19 +2214,19 @@ L'équipe info AE";
foreach($no_matter as $table)
new delete($this->dbrw,$table,array("id_utilisateur"=>$this->id));
$p1 = $topdir."var/img/matmatronch/".$this->id.".identity.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".identity.jpg";
if ( file_exists($p1) )
unlink($p1);
$p1 = $topdir."var/img/matmatronch/".$this->id.".jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".jpg";
if ( file_exists($p1) )
unlink($p1);
$p1 = $topdir."var/img/matmatronch/".$this->id.".blouse.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".blouse.jpg";
if ( file_exists($p1) )
unlink($p1);
$p1 = $topdir."var/img/matmatronch/".$this->id.".blouse.mini.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".blouse.mini.jpg";
if ( file_exists($p1) )
unlink($p1);
......@@ -2364,26 +2364,26 @@ L'équipe info AE";
//5- Procède aux opérations sur fichiers
$p1 = $topdir."var/img/matmatronch/".$this->id.".identity.jpg";
$p2 = $topdir."var/img/matmatronch/".$replacement->id.".identity.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".identity.jpg";
$p2 = $topdir."data/matmatronch/".$replacement->id.".identity.jpg";
if ( !file_exists($p2) && file_exists($p1) )
rename($p1,$p2);
$p1 = $topdir."var/img/matmatronch/".$this->id.".jpg";
$p2 = $topdir."var/img/matmatronch/".$replacement->id.".jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".jpg";
$p2 = $topdir."data/matmatronch/".$replacement->id.".jpg";
if ( !file_exists($p2) && file_exists($p1) )
rename($p1,$p2);
$p1 = $topdir."var/img/matmatronch/".$this->id.".blouse.jpg";
$p2 = $topdir."var/img/matmatronch/".$replacement->id.".blouse.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".blouse.jpg";
$p2 = $topdir."data/matmatronch/".$replacement->id.".blouse.jpg";
if ( !file_exists($p2) && file_exists($p1) )
rename($p1,$p2);
$p1 = $topdir."var/img/matmatronch/".$this->id.".blouse.mini.jpg";
$p2 = $topdir."var/img/matmatronch/".$replacement->id.".blouse.mini.jpg";
$p1 = $topdir."data/matmatronch/".$this->id.".blouse.mini.jpg";
$p2 = $topdir."data/matmatronch/".$replacement->id.".blouse.mini.jpg";
if ( !file_exists($p2) && file_exists($p1) )
rename($p1,$p2);
......
......@@ -149,10 +149,10 @@ class external_client
break;
}
if ( !file_exists($topdir."var/img/matmatronch/".$user->id.$ext.".jpg") )
if ( !file_exists($topdir."data/matmatronch/".$user->id.$ext.".jpg") )
$this->error("Photo inexsistante de type".$type);
$this->img = imagecreatefromjpeg($topdir."var/img/matmatronch/".$user->id.$ext.".jpg");
$this->img = imagecreatefromjpeg($topdir."data/matmatronch/".$user->id.$ext.".jpg");
if (!$this->img)
$this->error("Erreur dans la conversion de l'image en flux");
......
......@@ -96,7 +96,7 @@ class pdfcarteae extends FPDF
$this->Image($this->img_front[$infos['type_carte']],$x,$y,$this->width,$this->height);
$src = "../var/img/matmatronch/".$infos['id'].".identity.jpg";
$src = "../data/matmatronch/".$infos['id'].".identity.jpg";
$this->Image($src,
$x+$this->pos[$infos['type_carte']]['photo']['x'],
......
......@@ -249,8 +249,8 @@ class annonce_box extends stdcontents
$this->buffer .= "</div> \n</div>";
}
if( file_exists($topdir."var/img/matmatronch/".$usr->id.".identity.jpg") )
$img = $topdir."var/img/matmatronch/".$usr->id.".identity.jpg";
if( file_exists($topdir."data/matmatronch/".$usr->id.".identity.jpg") )
$img = $topdir."data/matmatronch/".$usr->id.".identity.jpg";
else
$img = $topdir."/images/icons/128/unknown.png";
$this->buffer .= "<div class=\"desc_user_photo\"> <img src=\"$img\" width=80 alt=\"Photo de $usr->prenom $usr->nom\" /></div>\n ";
......
......@@ -102,7 +102,7 @@ if (isset($_REQUEST["simplesearch"])) {
"<div class=\"utl\">\n".
"<b>".$row["prenom_utl"]." ".$row["nom_utl"]."</b>\n<br/>\n".
"<b>".$row["surnom_utbm"]."</b>\n<br/>\n".
"<img src=\"/var/img/matmatronch/".$row["id_utilisateur"].".identity.jpg?".$date_prise_vue."\"/>\n".
"<img src=\"/data/matmatronch/".$row["id_utilisateur"].".identity.jpg?".$date_prise_vue."\"/>\n".
"<a href=\"mailto:".$row["email_utl"]."\">".$row["email_utl"]."</a>\n<br/>\n".
"<a href=\"tel:".$row["tel_portable_utl"]."\">".$row["tel_portable_utl"]."</a>\n<br/>\n".
"</div>\n"
......
......@@ -42,7 +42,7 @@ if ( $_REQUEST["page"] == "avatars" )
if ( $_REQUEST["action"] == "agree" )
{
$id = intval(array_shift($ids));
copy("../var/img/matmatronch/".$id.".jpg","../var/img/matmatronch/".$id.".identity.jpg");
copy("../data/matmatronch/".$id.".jpg","../data/matmatronch/".$id.".identity.jpg");
}
elseif ( $_REQUEST["action"] == "reject" )
{
......@@ -57,7 +57,7 @@ if ( $_REQUEST["page"] == "avatars" )
$site->start_page("matmatronch","Administration");
$cts = new contents("Photos manquantes");
$cts->add_paragraph("<img src=\"../var/img/matmatronch/".$id.".jpg\" />");
$cts->add_paragraph("<img src=\"../data/matmatronch/".$id.".jpg\" />");
$cts->add_paragraph("<a href=\"?page=avatars&amp;action=reject&amp;id_utilisateurs=$ids\">Refuser</a>");
$cts->add_paragraph("<a href=\"?page=avatars&amp;action=agree&amp;id_utilisateurs=$ids\">Accepter</a>");
......@@ -91,13 +91,13 @@ $sas_todo=array();
$user = new utilisateur($site->db);
while ( $row = $req->get_row() )
{
if ( !file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
if ( !file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".identity.jpg"))
{
$user->_load_all($row);
$info = "";
if ( file_exists("../var/img/matmatronch/" . $row['id_utilisateur'] .".jpg"))
if ( file_exists("../data/matmatronch/" . $row['id_utilisateur'] .".jpg"))
{
$info = ", avartar disponible";
$avatar_todo[] = $user->id;
......
......@@ -55,7 +55,7 @@ echo "<title>Photo Matmatronch</title>
echo "<center>";
echo "<a href=\"javascript:window.close()\">".
"<img src=\"".$topdir."var/img/matmatronch/" .
"<img src=\"".$topdir."data/matmatronch/" .
$id .".jpg\" style=\"margin-bottom: 0.5em; margin-top: 0.5em;\">".
"</a><br/>";
if (!empty($citation) && isset($citation))
......
......@@ -51,9 +51,9 @@ class comment_contents extends stdcontents
$comment["prenom_utl"]." ".$comment["nom_utl"]
)."</a></p>\n";
if (file_exists($wwwtopdir."var/img/matmatronch/".$comment['id_commentateur'].".identity.jpg"))
if (file_exists($wwwtopdir."data/matmatronch/".$comment['id_commentateur'].".identity.jpg"))
{
$img = $wwwtopdir."var/img/matmatronch/".$comment['id_commentateur'].".identity.jpg";
$img = $wwwtopdir."data/matmatronch/".$comment['id_commentateur'].".identity.jpg";
$this->buffer .= "\t\t<p class=\"tuimg\"><img src=\"".htmlentities($img,ENT_NOQUOTES,"UTF-8")."\" /></p>";
}
$this->buffer .= "\t</div>\n";
......
......@@ -773,9 +773,9 @@ if ( $_REQUEST["page"] == "edit" && $can_edit )
$frm->add_hidden("action","setphotos");
$subfrm = new form("mmt",null,null,null,"Avatar");
if ( file_exists( $topdir."var/img/matmatronch/".$user->id.".jpg") )
if ( file_exists( $topdir."data/matmatronch/".$user->id.".jpg") )
{
$subfrm->add_info("<img src=\"".$topdir."var/img/matmatronch/".$user->id.".jpg?".filemtime($topdir."var/img/matmatronch/".$user->id.".jpg")."\" alt=\"\" width=\"100\" /><br/>");
$subfrm->add_info("<img src=\"".$topdir."data/matmatronch/".$user->id.".jpg?".filemtime($topdir."data/matmatronch/".$user->id.".jpg")."\" alt=\"\" width=\"100\" /><br/>");
}
$subfrm->add_file_field ( "mmtfile", "Fichier" );
$subfrm->add_checkbox("delete_mmt","Supprimer mon avatar");
......@@ -783,9 +783,9 @@ if ( $_REQUEST["page"] == "edit" && $can_edit )
$subfrm = new form("idt",null,null,null,"Photo identit&eacute; (carte AE et matmatronch)");
if ( file_exists( $topdir."var/img/matmatronch/".$user->id.".identity.jpg") )
if ( file_exists( $topdir."data/matmatronch/".$user->id.".identity.jpg") )
{
$subfrm->add_info("<img src=\"".$topdir."var/img/matmatronch/".$user->id.".identity.jpg?".filemtime($topdir."var/img/matmatronch/".$user->id.".identity.jpg")."\" alt=\"\" width=\"100\" /><br/>");
$subfrm->add_info("<img src=\"".$topdir."data/matmatronch/".$user->id.".identity.jpg?".filemtime($topdir."data/matmatronch/".$user->id.".identity.jpg")."\" alt=\"\" width=\"100\" /><br/>");
if ($site->user->is_asso_role ( 27, 1 ) || $site->user->is_in_group("gestion_ae"))
{
......@@ -812,8 +812,8 @@ if ( $_REQUEST["page"] == "edit" && $can_edit )
$frm->add_hidden("action","setblouse");
$subfrm = new form("blouse",null,null,null,"Photo de la blouse");
if ( file_exists( $topdir."var/img/matmatronch/".$user->id.".blouse.mini.jpg") )
$subfrm->add_info("<img src=\"".$topdir."var/img/matmatronch/".$user->id.".blouse.mini.jpg\" alt=\"\" width=\"100\" /><br/>");
if ( file_exists( $topdir."data/matmatronch/".$user->id.".blouse.mini.jpg") )
$subfrm->add_info("<img src=\"".$topdir."data/matmatronch/".$user->id.".blouse.mini.jpg\" alt=\"\" width=\"100\" /><br/>");
$subfrm->add_file_field ( "blousefile", "Fichier" );
$subfrm->add_checkbox("delete_blouse","Supprimer la photo de ma blouse");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment