Commit 7ff66d0f authored by Antoine Tenart's avatar Antoine Tenart

kwain

parent c7fe6ac4
......@@ -92,8 +92,8 @@ if ( $_REQUEST["action"] == "genfact" )
$asso->load_by_id($row['id_asso']);
if ( !$asso->is_valid() )
continue;
if(file_exists("/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".jpg"))
$logo="/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".jpg";
if(file_exists("/var/www/ae2/data/img/logos/".$asso->nom_unix.".jpg"))
$logo="/var/www/ae2/data/img/logos/".$asso->nom_unix.".jpg";
else
$logo="";
if($asso->id==1)//ae
......@@ -159,8 +159,8 @@ elseif ( $_REQUEST["action"] == "genonefact" )
$facturing_infos = array ('name' => $asso->nom,
'addr' => explode("\n",utf8_decode($asso->adresse_postale)));
if(file_exists("/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".jpg"))
$facturing_infos['logo'] = "/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".jpg";
if(file_exists("/var/www/ae2/data/img/logos/".$asso->nom_unix.".jpg"))
$facturing_infos['logo'] = "/var/www/ae2/data/img/logos/".$asso->nom_unix.".jpg";
$date_facturation = date("d/m/Y", mktime ( 0, 0, 0, substr($month,4)+1, 1, substr($month,0,4)));
......
......@@ -119,15 +119,15 @@ else if ( isset($_REQUEST["id_asso"]) )
}
}
else if ( is_dir("/var/www/ae/www/ae2/var/img") && $_REQUEST['action'] == "setlogo" )
else if ( is_dir("/var/www/ae2/data/img") && $_REQUEST['action'] == "setlogo" )
{
if ( is_uploaded_file($_FILES['logofile']['tmp_name']) )
{
$src = $_FILES['logofile']['tmp_name'];
$dest_small ="/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".small.png";
$dest_icon = "/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".icon.png";
$dest_full = "/var/www/ae/www/ae2/var/img/logos/".$asso->nom_unix.".jpg";
$dest_small ="/var/www/ae2/data/img/logos/".$asso->nom_unix.".small.png";
$dest_icon = "/var/www/ae2/data/img/logos/".$asso->nom_unix.".icon.png";
$dest_full = "/var/www/ae2/data/img/logos/".$asso->nom_unix.".jpg";
exec(escapeshellcmd("/usr/share/php5/exec/convert $src -thumbnail 80x80 $dest_small"));
exec(escapeshellcmd("/usr/share/php5/exec/convert $src -resize 48x48 -size 48x48 xc:transparent +swap -gravity center -composite $dest_icon"));
......@@ -229,10 +229,6 @@ else if ( isset($_REQUEST["id_asso"]) )
}
/*$img = "/var/img/logos/".$asso->nom_unix.".small.png";
if ( file_exists("/var/www/ae/www/ae2".$img) )
$cts->add(new image($asso->nom, $img, "newsimg"));*/
$page = new page($site->db);
$page->load_by_pagename("activites:".$asso->nom_unix);
......@@ -274,9 +270,9 @@ else if ( isset($_REQUEST["id_asso"]) )
$gal = new gallery($vocable,"clubsgal");
while ( $row = $req->get_row() )
{
$img = "/var/img/logos/".$row['nom_unix_asso'].".small.png";
$img = "/data/img/logos/".$row['nom_unix_asso'].".small.png";
if ( !file_exists("/var/www/ae/www/ae2".$img) )
if ( !file_exists("/var/www/ae2".$img) )
{
$gal->add_item(
"<a href=\"asso.php?id_asso=".$row['id_asso']."\">&nbsp;<img src=\"images/icons/128/asso.png\" alt=\"\" class=\"nope\" />&nbsp;</a>",
......
......@@ -35,7 +35,7 @@ require_once ("./include/answer.inc.php");
/* fonction rapide de log des retours */
function log_success ($message)
{
$fp = fopen("/var/www/ae/www/ae2/e-boutic/.autorep.log", "a+");
$fp = fopen("/var/www/ae2/e-boutic/.autorep.log", "a+");
fwrite($fp, $message . "\n");
fclose($fp);
}
......
......@@ -96,15 +96,15 @@ if ( $_REQUEST["action"] == "generate" )
$barcode = $row['cbar_objet'];
$name = $row['nom_objet'];
$src = "/var/www/ae/www/ae2/var/img/logos/".$row['nom_unix_asso_gest'].".png";
$logo = "/var/www/ae/www/ae2/var/img/logos/".$row['nom_unix_asso_gest'].".jpg";
$src = "/var/www/ae2/data/img/logos/".$row['nom_unix_asso_gest'].".png";
$logo = "/var/www/ae2/data/img/logos/".$row['nom_unix_asso_gest'].".jpg";
if ( !file_exists($logo) && file_exists($src) )
exec(escapeshellcmd("/usr/share/php5/exec/convert $src -background white $logo"));
if ( !file_exists($logo) )
{
$src = "/var/www/ae/www/ae2/var/img/logos/".$row['nom_unix_asso_prop'].".png";
$logo = "/var/www/ae/www/ae2/var/img/logos/".$row['nom_unix_asso_prop'].".jpg";
$src = "/var/www/ae2/data/img/logos/".$row['nom_unix_asso_prop'].".png";
$logo = "/var/www/ae2/data/img/logos/".$row['nom_unix_asso_prop'].".jpg";
if ( !file_exists($logo) && file_exists($src) )
exec(escapeshellcmd("/usr/share/php5/exec/convert $src -background white $logo"));
......
......@@ -192,8 +192,8 @@ abstract class newslister extends stdcontents
{
if ( $row['id_asso'] )
{
$img = "/var/img/logos/".$row['nom_unix_asso'].".icon.png";
if ( !file_exists("/var/www/ae/www".$img) )
$img = "/data/img/logos/".$row['nom_unix_asso'].".icon.png";
if ( !file_exists("/var/www/ae2".$img) )
$img = $wwwtopdir."images/default/news.icon.png";
}
else
......@@ -249,7 +249,7 @@ abstract class newslister extends stdcontents
if ( $row['id_asso'] )
{
$img = "<a href=\"asso.php?id_asso=".$row['id_asso']."\"><img src=\"/var/img/logos/".$row['nom_unix_asso'].".icon.png\" alt=\"\" class=\"nvlicon\" /></a>";
if ( !file_exists("/var/www/ae/www/ae2/var/img/logos/".$row['nom_unix_asso'].".icon.png") )
if ( !file_exists("/var/www/ae2/data/img/logos/".$row['nom_unix_asso'].".icon.png") )
$img = "<a href=\"asso.php?id_asso=".$row['id_asso']."\"><img src=\"".$wwwtopdir."images/default/news.icon.png\" alt=\"\" class=\"nvlicon\" /></a>";
}
else
......
......@@ -475,7 +475,7 @@ class galaxy
$img2 = imagecreatetruecolor($this->width/100,$this->height/100);
imagecopyresampled($img2,$img,0,0,0,0,$this->width/100,$this->height/100,$this->width/50,$this->height/50);
if(is_writable("/var/www/ae/www/ae2/var/"))
if(is_writable("/var/www/var/"))
imagepng($img2,$mini_target);
imagedestroy($img2);
imagedestroy($img);
......
......@@ -32,7 +32,7 @@ $timing["all"] -= microtime(true);
setlocale(LC_ALL,"fr_FR.UTF8");
if( !strncmp('/var/www/ae/www/taiste', $_SERVER['SCRIPT_FILENAME'], 22) )
if( !strncmp('/var/www/taiste', $_SERVER['SCRIPT_FILENAME'], 22) )
$GLOBALS["taiste"] = true;
else
$GLOBALS["taiste"] = false;
......
......@@ -45,7 +45,7 @@ class img_watermark
var $opacity;
function img_watermark ($image_to_mark,
$watermark = "/var/www/ae/www/var/img/ae_watermark.png",
$watermark = "/data/img/ae_watermark.png",
$opacity = 9)
{
$this->opacity = $opacity;
......
<?
exit();
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
require_once($topdir."include/site.inc.php");
......
......@@ -6,7 +6,7 @@ if(!isset($argc))
/*
* Daily at 4am (04h)
*/
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
require_once($topdir. "include/site.inc.php");
......
......@@ -24,7 +24,7 @@
if (!isset ($argc))
exit ();
$_SERVER['SCRIPT_FILENAME']='/var/www/ae/www/ae2/phpcron';
$_SERVER['SCRIPT_FILENAME']='/var/www/ae2/phpcron';
$topdir = $_SERVER['SCRIPT_FILENAME'].'/../';
require_once ($topdir.'include/site.inc.php');
......
......@@ -21,7 +21,7 @@
* 02111-1307, USA.
*/
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
$topdir="../";
require_once ($topdir. "include/site.inc.php");
......
......@@ -2,7 +2,7 @@
if(!isset($argc))
exit();
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
/*
* hourly
......
......@@ -2,7 +2,7 @@
if(!isset($argc))
exit();
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
require_once($topdir. "include/site.inc.php");
......
<?php
if(!isset($argc))
exit();
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/ae2/phpcron";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/phpcron";
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
require_once($topdir. "include/site.inc.php");
......
......@@ -24,7 +24,7 @@
*/
$topdir = "../";
define('MAGPIE_CACHE_DIR', '/var/www/ae/www/var/cache/planet/');
define('MAGPIE_CACHE_DIR', '/var/www/var/cache/planet/');
define('MAGPIE_CACHE_ON', true);
define('MAGPIE_CACHE_AGE', 70*60); //une heure et dix minutes (le cache est regénéré automatiquement)
define('MAGPIE_OUTPUT_ENCODING', "UTF-8");
......
......@@ -28,8 +28,8 @@ require_once($topdir. "include/site.inc.php");
require_once($topdir . "include/cts/user.inc.php");
// Ne pas oublier le dernier '/'
define('SAVE_DIR', '/var/www/ae/www/var/tmp/');
define('OUTPUT_DIR', '/var/www/ae/www/var/tmp/matmat/');
define('SAVE_DIR', '/var/www/var/tmp/');
define('OUTPUT_DIR', '/var/www/var/tmp/matmat/');
$site = new site ();
......@@ -40,7 +40,7 @@ $site->start_page("none","Administration");
if(isset($_POST['action'])
&& $_POST['action']=='bloubiboulga'
&& is_dir("/var/www/ae/www/ae2/var/img")
&& is_dir("/var/www/ae2/data/img")
&& file_exists (SAVE_DIR.$_POST['zipeuh']))
{
mkdir(OUTPUT_DIR);
......@@ -90,7 +90,7 @@ if(isset($_POST['action'])
$cts = new contents("Administration/Import massif de photos matmatronch");
$frm = new form("photos","?",true,"POST","Et paf les photos");
$frm->add_hidden("action","bloubiboulga");
$frm->add_text_field ( "zipeuh", 'Nom du fichier (à balancer dans /var/www/ae/www/var/tmp/)', '', true);
$frm->add_text_field ( "zipeuh", 'Nom du fichier (à balancer dans /var/www/var/tmp/)', '', true);
$frm->add_text_field ( "rotate", 'Rotation à appliquer en degré', '+90', true);
$frm->add_checkbox ( "carteae", "Les boulets qui ont fait les photos ont utilisé les numéros de carte AE" );
$frm->add_submit("paff","Et paf!");
......
......@@ -6,7 +6,7 @@
if(!isset($_SERVER['SCRIPT_FILENAME']))
{
$_SERVER['SCRIPT_FILENAME']="/var/www/ae/www/taiste/temp";
$_SERVER['SCRIPT_FILENAME']="/var/www/ae2/taiste/temp";
$topdir=$_SERVER['SCRIPT_FILENAME']."/../";
}
else
......@@ -118,7 +118,7 @@ foreach($photos as $id)
if($bouh)
{
exec("/bin/tar czf /tmp/".$asso->nom_unix.".tar.gz /tmp/".$asso->nom_unix);
exec("/bin/mv /tmp/".$asso->nom_unix.".tar.gz /var/www/ae/www/var/");
exec("/bin/mv /tmp/".$asso->nom_unix.".tar.gz /var/www/var/");
exec("/bin/rm -Rf /tmp/".$asso->nom_unix);
}
......
......@@ -107,15 +107,15 @@ if(isset($_POST["action"]) && $_POST["action"]=="merge")
/* on déplace les photos matmat */
/* avatar forum */
$_photo = "/var/www/ae/www/var/matmatronch/" . $id . ".jpg";
$_photo = "/var/www/ae2/data/matmatronch/" . $id . ".jpg";
if(file_exists($_photo))
@unlink($_photo);
/* photo mmt */
$_photo = "/var/www/ae/www/var/matmatronch/" . $id . ".identity.jpg";
$photo = "/var/www/ae/www/var/matmatronch/" . $_id . ".identity.jpg";
$_identityi = "/var/www/ae/www/var/matmatronch/" . $id . ".identity.i.jpg";
$identityi = "/var/www/ae/www/var/matmatronch/" . $_id . ".identity.i.jpg";
$_photo = "/var/www/ae2/data/matmatronch/" . $id . ".identity.jpg";
$photo = "/var/www/ae2/data/matmatronch/" . $_id . ".identity.jpg";
$_identityi = "/var/www/ae2/data/matmatronch/" . $id . ".identity.i.jpg";
$identityi = "/var/www/ae2/data/matmatronch/" . $_id . ".identity.i.jpg";
if(!file_exists($photo) && file_exists($_photo))
{
@copy($_photo, $photo);
......@@ -128,8 +128,8 @@ if(isset($_POST["action"]) && $_POST["action"]=="merge")
}
/* blouse */
$_photo = "/var/www/ae/www/var/matmatronch/" . $id . ".blouse.jpg";
$_blousemini = "/var/www/ae/www/var/matmatronch/" . $id . ".blouse.mini.jpg";
$_photo = "/var/www/ae2/data/matmatronch/" . $id . ".blouse.jpg";
$_blousemini = "/var/www/ae2/data/matmatronch/" . $id . ".blouse.mini.jpg";
if(file_exists($_photo))
{
@unlink($_photo);
......
......@@ -480,7 +480,7 @@ elseif ( $_REQUEST["action"] == "serviceident" && $can_edit )
$user->gen_serviceident();
}
if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/var/www/ae/www/ae2/var/img") )
if ( $_REQUEST["action"] == "setphotos" && $can_edit && is_dir("/data/matmatronch/") )
{
$dest_idt = "/data/matmatronch/".$user->id.".identity.jpg";
if ( is_uploaded_file($_FILES['idtfile']['tmp_name']) )
......
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