Commit fe64329e authored by Antoine Tenart's avatar Antoine Tenart

revert

parent 638ed087
......@@ -46,26 +46,26 @@ $fiche->add_title(1,"AE - Matmatronch");
$fiche->add_title(2,htmlentities($user->prenom." ".$user->nom,ENT_COMPAT,"UTF-8"));
if (file_exists("/data/matmatronch/".$user->id.".identity.i.jpg"))
if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.i.jpg"))
{
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".identity.i.jpg\" /></p>");
}
else if (file_exists("/data/matmatronch/".$user->id.".identity.jpg"))
else if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg"))
{
$src = "/data/matmatronch/".$user->id.".identity.jpg";
$dest = "/data/matmatronch/".$user->id.".identity.i.jpg";
$src = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg";
$dest = "/var/www/ae/www/ae2/var/img/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>");
}
else if (file_exists("/data/matmatronch/".$user->id.".i.jpg"))
else if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".i.jpg"))
{
$fiche->puts("<p align=\"center\"><img src=\"/var/img/matmatronch/".$user->id.".i.jpg\" /></p>");
}
else if (file_exists("/data/matmatronch/".$user->id.".jpg"))
else if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".jpg"))
{
$src = "/data/matmatronch/".$user->id.".jpg";
$dest = "/data/matmatronch/".$user->id.".i.jpg";
$src = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".jpg";
$dest = "/var/www/ae/www/ae2/var/img/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>");
......
......@@ -112,7 +112,7 @@ class userinfo extends stdcontents
if ($user->id && file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
{
$date_prise_vue = "";
$exif = @exif_read_data("/data/matmatronch/".$user->id.".identity.jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/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");
......@@ -125,7 +125,7 @@ class userinfo extends stdcontents
elseif ( $user->id && file_exists($topdir."var/img/matmatronch/".$user->id.".jpg"))
{
$date_prise_vue = "";
$exif = @exif_read_data("/data/matmatronch/".$user->id.".jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/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");
......@@ -437,9 +437,9 @@ class userinfov2 extends stdcontents
$img = $topdir."images/icons/128/unknown.png";
$date_prise_vue = "";
if (file_exists("/data/matmatronch/".$user->id.".identity.jpg"))
if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".identity.jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
......@@ -469,7 +469,7 @@ class userinfov2 extends stdcontents
$this->buffer .= "<div class=\"photommt\">";
if (file_exists($topdir."var/img/matmatronch/".$user->id.".jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
......@@ -483,7 +483,7 @@ class userinfov2 extends stdcontents
$this->buffer .= "<div class=\"photoid\">";
if (file_exists($topdir."var/img/matmatronch/".$user->id.".identity.jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".identity.jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
......@@ -495,9 +495,9 @@ class userinfov2 extends stdcontents
$this->buffer .= "</div>\n";
$this->buffer .= "<div class=\"photoblouse\">";
if (file_exists("/data/matmatronch/".$user->id.".blouse.mini.jpg"))
if (file_exists("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".blouse.mini.jpg"))
{
$exif = @exif_read_data("/data/matmatronch/".$user->id.".blouse.mini.jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".blouse.mini.jpg", 0, true);
if ( $exif["FILE"]["FileDateTime"] )
$date_prise_vue = $exif["FILE"]["FileDateTime"];
......
......@@ -396,7 +396,7 @@ if(!defined("MOBILE")) {
if ( $carte->is_valid() )
{
if ( $carte->etat_vie_carte == CETAT_ATTENTE &&
!file_exists("/data/matmatronch/" . $this->user->id .".identity.jpg") )
!file_exists("/var/www/ae/www/ae2/var/img/matmatronch/" . $this->user->id .".identity.jpg") )
{
$elements[] = "<a href=\"".$topdir."user.php?see=photos&page=edit\"><b>Vous devez ajouter une photo</b> pour que votre carte AE soit imprimée.</a>";
}
......
......@@ -95,7 +95,7 @@ if (isset($_REQUEST["simplesearch"])) {
$cts->add_title (1, "Résultats");
while ($row = $req->get_row()) {
$exif = @exif_read_data("/data/matmatronch/".$row["id_utilisateur"].".jpg", 0, true);
$exif = @exif_read_data("/var/www/ae/www/ae2/var/img/matmatronch/".$row["id_utilisateur"].".jpg", 0, true);
$date_prise_vue = $exif["FILE"]["FileDateTime"] ? $exif["FILE"]["FileDateTime"] : '';
$cts->puts(
......
......@@ -254,7 +254,7 @@ if ( $_REQUEST["action"] == "majprofil" && ( ( !isset($_REQUEST["setpassword"])
$cts->add_paragraph("Nous attirons votre attention sur les &eacute;l&eacute;ments suivants :");
if ( $user->utbm && !$user->ancien_etudiant && !file_exists("/data/matmatronch/" . $user->id .".identity.jpg") )
if ( $user->utbm && !$user->ancien_etudiant && !file_exists("/var/www/ae/www/ae2/var/img/matmatronch/" . $user->id .".identity.jpg") )
{
$cts->add_title(2,"Vous n'avez pas de photo d'identité");
......@@ -277,7 +277,7 @@ if ( $_REQUEST["action"] == "majprofil" && ( ( !isset($_REQUEST["setpassword"])
if ( $carte->is_valid() )
{
if ( $carte->etat_vie_carte == CETAT_ATTENTE &&
!file_exists("/data/matmatronch/" . $user->id .".identity.jpg") )
!file_exists("/var/www/ae/www/ae2/var/img/matmatronch/" . $user->id .".identity.jpg") )
{
$cts->add_title(2,"Votre carte AE");
$cts->add_paragraph("Vous devez ajouter une photo pour que votre carte AE soit imprimée.");
......
......@@ -75,9 +75,9 @@ if(isset($_POST['action'])
$id = $user->id;
if ($avatar)
exec("/usr/share/php5/exec/convert ".OUTPUT_DIR.$f." -rotate ".$rotation." -thumbnail 225x300 /data/matmatronch/".$id.".jpg");
exec("/usr/share/php5/exec/convert ".OUTPUT_DIR.$f." -rotate ".$rotation." -thumbnail 225x300 /var/www/ae/www/ae2/var/img/matmatronch/".$id.".jpg");
else
exec("/usr/share/php5/exec/convert ".OUTPUT_DIR.$f." -rotate ".$rotation." -thumbnail 225x300 /data/matmatronch/".$id.".identity.jpg");
exec("/usr/share/php5/exec/convert ".OUTPUT_DIR.$f." -rotate ".$rotation." -thumbnail 225x300 /var/www/ae/www/ae2/var/img/matmatronch/".$id.".identity.jpg");
}
}
// Delete temp img
......
......@@ -482,7 +482,7 @@ elseif ( $_REQUEST["action"] == "serviceident" && $can_edit )
if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/var/www/ae/www/ae2/var/img") )
{
$dest_idt = "/data/matmatronch/".$user->id.".identity.jpg";
$dest_idt = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg";
if ( is_uploaded_file($_FILES['idtfile']['tmp_name']) )
{
$src = $_FILES['idtfile']['tmp_name'];
......@@ -494,7 +494,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/var/www/ae/www/
}
}
$dest_mmt = "/data/matmatronch/".$user->id.".jpg";
$dest_mmt = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".jpg";
if( isset($_REQUEST['delete_mmt']) && file_exists($dest_mmt))
unlink($dest_mmt);
if ( is_uploaded_file($_FILES['mmtfile']['tmp_name']) )
......@@ -503,7 +503,7 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/var/www/ae/www/
exec("/usr/share/php5/exec/convert $src -thumbnail 225x300 $dest_mmt");
}
$dest_idt = "/data/matmatronch/".$user->id.".identity.jpg";
$dest_idt = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".identity.jpg";
if(isset($_REQUEST['delete_idt']) && file_exists($dest_idt)
&& ($site->user->is_asso_role ( 27, 1 )
|| $site->user->is_in_group("gestion_ae")))
......@@ -515,8 +515,8 @@ if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/var/www/ae/www/
if ( $_REQUEST["action"] == "setblouse" && $can_edit )
{
$dest = "/data/matmatronch/".$user->id.".blouse.jpg";
$dest_mini = "/data/matmatronch/".$user->id.".blouse.mini.jpg";
$dest = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".blouse.jpg";
$dest_mini = "/var/www/ae/www/ae2/var/img/matmatronch/".$user->id.".blouse.mini.jpg";
if( isset($_REQUEST['delete_blouse']) && file_exists($dest))
{
unlink($dest);
......@@ -1273,7 +1273,7 @@ else
{
$cts->add_title(2, "Cotisation AE");
if ($can_edit && !file_exists("/data/matmatronch/" . $user->id .".identity.jpg"))
if ($can_edit && !file_exists("/var/www/ae/www/ae2/var/img/matmatronch/" . $user->id .".identity.jpg"))
$cts->add_paragraph("<img src=\"".$topdir."images/actions/delete.png\"><b>ATTENTION</b>: " .
"<a href=\"user.php?see=photos&amp;page=edit&amp;id_utilisateur=".$user->id.
"\">Photo d'identit&eacute; non pr&eacute;sente !</a>");
......
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