Modification sur la saisie des logos

This commit is contained in:
Michael RICOIS 2010-07-02 12:59:08 +00:00
parent 86df0c1a5c
commit 7605bbb216
3 changed files with 8 additions and 9 deletions

View File

@ -82,6 +82,9 @@ switch ( $action ) {
$output = '<div style="text-align:center;">';
$output.= '<img src="logos/'.$logo.'&uid='.time().'"/>';
$output.= '<br/>';
$output.= '<a id="logo_crop" href="/?page=saisieajax&q=logo/crop/'.
$logo.'">Editer l\'image</a>';
$output.= '<br/>';
$output.= '<a href="#" id="logo_delete" alt="'.$logo.'">'.
'Supprimer le logo existant</a>';
$output.= '</div>';

View File

@ -20,18 +20,17 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
}
if ( !empty($ext) ){
// on copie le fichier dans le dossier de destination
$name_file = 'tmp_'.$siren.'.'.$ext;
$name_file = $siren.'.'.$ext;
if ( file_exists(PATH_LOGOS . $name_file) ){
unlink(PATH_LOGOS . $name_file);
}
if( !move_uploaded_file($tmp_file, PATH_LOGOS . $name_file) ) {
$output.= '';
} else {
$output.= '<p>Fichier récupérer.</p>';
$output.= '<img src="logos/'.$name_file.'&uid='.time().'" />';
$output.= '<br/>';
$output.= '<a id="logo_save" href="/?page=saisieajax&q=logo/save/'.$name_file.'">Sauvegarder l\'image</a>';
$output.= '<br/>';
$output.= '<a id="logo_crop" href="/?page=saisieajax&q=logo/crop/'.$name_file.'">Editer l\'image</a>';
$output.= '<a id="logo_crop" href="/?page=saisieajax&q=logo/crop/'.
$name_file.'">Editer l\'image</a>';
}
} else {
$output.= '';

View File

@ -24,10 +24,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST')
fclose($fp);
$output = '<div style="text-align:center;">';
$output.= '<p>Fichier récupérer.</p>';
$output.= '<br/>';
$output.= '<a id="logo_save" href="/?page=saisieajax&q=logo/save/'.
$name_file.'">Sauvegarder l\'image</a>';
$output.= '<img src="logos/'.$name_file.'&uid='.time().'" />';
$output.= '<br/>';
$output.= '<a id="logo_crop" href="/?page=saisieajax&q=logo/crop/'.
$name_file.'">Editer l\'image</a>';