Changeset 8195 for extensions
- Timestamp:
- Dec 19, 2010, 11:31:52 AM (14 years ago)
- Location:
- extensions/PHP_Optimisateur
- Files:
-
- 4 added
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/files/display_config.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 … … 24 24 <span class="title">'.l10n('Options').'</span> 25 25 <table> 26 <tr> 27 <td><b>'.l10n('silentORNOT').' :</b></td> 28 <td>'.l10n($silentORNOT).'</td> 29 </tr> 30 26 31 <tr> 27 32 <td><b>'.l10n('DIRhighORNOT').' :</b></td> … … 111 116 </tr> 112 117 </table> 113 </li> 114 <li> 115 <span class="title">'.l10n('PluginsBefore').'</span> 116 <ul>'; 117 foreach ($PluginsBefore as $name => $config) { 118 echo '<li> 119 <b>'.$name.' :</b> 120 <table>'; 121 foreach ($config as $key => $value) { 122 echo '<tr> 123 <td>'.$key.' :</td> 124 <td>'.bool_to_string($value).'</td> 125 </tr>'; 126 } 127 echo '</table> 128 </li>'; 129 } 130 echo '</ul> 131 </li> 132 <li> 133 <span class="title">'.l10n('PluginsProcess').'</span> 134 <ul>'; 135 foreach ($PluginsProcess as $name => $config) { 136 echo '<li> 137 <b>'.$name.' :</b> 138 <table>'; 139 foreach ($config as $key => $value) { 140 echo '<tr> 141 <td>'.$key.' :</td> 142 <td>'.bool_to_string($value).'</td> 143 </tr>'; 144 } 145 echo '</table> 146 </li>'; 147 } 148 echo '</ul> 149 </li> 150 <li> 151 <span class="title">'.l10n('PluginsAfter').'</span> 152 <ul>'; 153 foreach ($PluginsAfter as $name => $config) { 154 echo '<li> 155 <b>'.$name.' :</b> 156 <table>'; 157 foreach ($config as $key => $value) { 158 echo '<tr> 159 <td>'.$key.' :</td> 160 <td>'.bool_to_string($value).'</td> 161 </tr>'; 162 } 163 echo '</table> 164 </li>'; 165 } 166 echo '</ul> 167 </li> 168 </ul> 118 </li>'; 119 120 // Affichage des plugins, un bloc par mode 121 foreach (array('PluginsBefore','PluginsProcess','PluginsAfter') as $mode) { 122 echo '<li> 123 <span class="title">'.l10n($mode).'</span> 124 <ul>'; 125 // Un bloc par plugin 126 foreach (${$mode} as $name => $config) { 127 echo '<li>'; 128 echo '<b>'.$name.' :</b> 129 <table>'; 130 foreach ($config as $key => $value) { 131 echo '<tr> 132 <td>'.$key.' :</td> 133 <td>'.bool_to_string($value).'</td> 134 </tr>'; 135 } 136 echo '</table> 137 </li>'; 138 } 139 echo '</ul> 140 </li>'; 141 } 142 143 echo '</ul> 169 144 </div>'; 170 145 ?> -
extensions/PHP_Optimisateur/files/functions.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 -
extensions/PHP_Optimisateur/files/header.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 7 7 session_start(); 8 $APPversion = '1. 1';8 $APPversion = '1.2'; 9 9 $user_lang = GetLanguage(); 10 10 include('language/'.$user_lang['Lang'].'/'.$user_lang['Lang'].'.php'); … … 21 21 <body> 22 22 <div class="title"> 23 PHP Optimisateur '.$APPversion ;23 PHP Optimisateur '.$APPversion.' 24 24 25 <span class="lang">'; 25 26 foreach ($user_lang['languages'] as $key) { 26 echo '<a class="lang" href="index.php?Lang='.$key.'" ><img src="language/'.$key.'/'.$key.'.png"/></a>';27 echo '<a class="lang" href="index.php?Lang='.$key.'" title="'.$key.'"><img src="language/'.$key.'/'.$key.'.png"/></a>'; 27 28 } 29 echo '</span> 28 30 29 echo '</div>';31 </div>'; 30 32 ?> -
extensions/PHP_Optimisateur/files/style.css
r7993 r8195 31 31 border-color:#eee; 32 32 } 33 div.footer { 34 clear:both; 35 width:942px; 36 text-align:center; 37 font-size:0.9em; 38 border:none; 39 } 33 40 div.files li { 34 41 margin-top:0; … … 46 53 font-size:1.2em; 47 54 } 48 55 div.link { 56 border:none; 57 } 58 49 59 a { 50 color:#EF 9700;60 color:#EF8100; 51 61 text-decoration:none; 52 padding:0 10px; 53 float:right; 54 margin-bottom:1px; 62 font-size:1.2em; 63 font-style:italic; 55 64 } 56 65 a:hover { … … 58 67 border-bottom:1px dotted #555; 59 68 margin-bottom:0; 69 } 70 div.link a { 71 margin:0 10px; 72 float:right; 73 margin-bottom:1px; 74 } 75 span.lang a { 76 margin:-4px 10px; 77 float:right; 60 78 } 61 79 … … 80 98 -moz-border-radius:3px; 81 99 } 100 input[type="submit"], input[type="reset"] { 101 padding:2px 5px; 102 } 82 103 83 b.new:after { 84 content:' New !'; 104 b.new { 85 105 color:#0ABF00; 106 font-style:italic; 107 } 108 b.miss { 109 color:#BF0008; 86 110 font-style:italic; 87 111 } … … 93 117 } 94 118 95 t d{96 width:50%;119 table { 120 min-width:50%; 97 121 } 98 tr td:first-child { 99 text-align:right; 100 padding-right:5px; 122 td { 123 width:50%; 101 124 } 125 tr td:first-child { 126 text-align:right; 127 padding-right:5px; 128 } -
extensions/PHP_Optimisateur/index.php
r7994 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 … … 23 23 24 24 // Afficher la configuration 25 if (!$silentORNOT) { 26 include('files/display_config.php'); 27 } 25 include('files/display_config.php'); 28 26 29 27 // Dossiers … … 37 35 $Errors['ErrorFolderIn'] = true; 38 36 } 39 if ($silentORNOT) { 40 rrmdir($DIRsortie); // Si mode silencieux 41 mkdir($DIRsortie); // vidage automatique du dossier de sortie 42 } else if (!is_dir_empty($DIRsortie)) { 37 if (!is_dir_empty($DIRsortie) AND $silentORNOT == 'block') { 43 38 $Errors['ErrorFolderOut'] = true; 44 39 } 40 if (!file_exists('files\nconvert.exe')) { 41 $Errors['ErrorNconvert'] = true; 42 } 45 43 } 44 46 45 47 46 48 47 ### ERREURS ### 49 48 if (isset($Errors)) { 50 $i=0;51 49 foreach ($Errors as $key => $null) { 52 // Dégueulasse les ternaires à la suite ! mais j'aime ça 53 echo '<div class="error">'.l10n($key).' '.(($i==0)?'<a href="index.php">'.l10n('Back').'</a> '.(($key!='ErrorFile')?'<a href="setup.php">'.l10n('Config').'</a></div>':'</div>'):'</div>'); 54 $i++; 55 } 50 echo '<div class="error">'.l10n($key).'</div>'; 51 } 52 echo '<div class="link"><a href="index.php">» '.l10n('Back').'</a> <a href="setup.php">» '.l10n('Config').'</a></div>'; 56 53 } 57 54 … … 60 57 ### EXECUTION ### 61 58 if (isset($_GET['Process']) AND !isset($Errors)) { 62 59 // Si mode silencieux vidage automatique du dossier de sortie 60 if ($silentORNOT == 'erase') { 61 rrmdir($DIRsortie); 62 mkdir($DIRsortie); 63 } 64 65 63 66 ### Supprimer les caractères spéciaux - dossiers & fichiers ### 64 67 // Les caractères '%' et '$' sont systématiquement échappés, ca génère des bugs dans les noms de fichiers … … 84 87 85 88 86 ### Copyright ###89 ### Copyright & Options générales des conversion ### 87 90 $copyright = utf8_decode($copyright); 88 91 … … 98 101 $copyNormal = null; 99 102 } 103 104 $convOptions = '-ratio -rtype lanczos -rflag decr'; 100 105 101 106 … … 109 114 110 115 ### Processus principal ### 111 112 116 // Tableau avec les fichiers source 113 117 $FilesSource = array(); 114 118 recursive_readdir($DIRsource, 'FilesSource'); 119 115 120 // Tableau avec les fichiers de sortie 116 121 $FilesSortie = str_replace($DIRsource, $DIRsortie, $FilesSource); 117 122 123 // Boucle sur tous les fichiers 118 124 for ($i=0; $i<count($FilesSource); $i++) { 119 125 // Découpe le nom de fichier : dossier/fichier 120 126 preg_match('#(.*)/(.*)$#', $FilesSortie[$i], $matches); 121 # matches[1] = dossier sortie122 # matches[2] = fichier.ext127 $FileFolder = $matches[1]; 128 $FileName = $matches[2]; 123 129 124 130 // Crée les sous-dossiers de sortie & 'pwg_high' & 'thumbnail' 125 if (!file_exists($matches[1].'/pwg_high') AND $DIRhighORNOT) { 126 mkdir($matches[1].'/pwg_high', 0777, true); 127 } 128 if (!file_exists($matches[1].'/thumbnail')) { 129 mkdir($matches[1].'/thumbnail', 0777, true); 131 if (!file_exists($FileFolder.'/pwg_high') AND $DIRhighORNOT) { 132 mkdir($FileFolder.'/pwg_high', 0777, true); 133 } 134 if (!file_exists($FileFolder.'/thumbnail')) { 135 mkdir($FileFolder.'/thumbnail', 0777, true); 136 } 137 138 // Informations sur le fichier 139 exec('files\nconvert.exe -info "'.$FilesSource[$i].'"', $FileInfos); 140 for ($m=0; $m<=5; $m++) { 141 unset($FileInfos[$m]); 142 } 143 foreach ($FileInfos as $key) { 144 $a = explode(':', $key); 145 $FileInfos[trim($a[0])] = trim($a[1]); 130 146 } 131 147 … … 139 155 // Compresse les fichiers dans le dossier de sortie 140 156 if (!isset($BlockNormal)) { 141 exec(' nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$matches[1].'/'.$matches[2].'" -dpi 72 -ratio -rtype lanczos-resize '.$DIMnormal.' '.$DIMnormal.' '.$copyNormal.' "'.$FilesSource[$i].'"');157 exec('files\nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$FileFolder.'/'.$FileName.'" -dpi 72 '.$convOptions.' -resize '.$DIMnormal.' '.$DIMnormal.' '.$copyNormal.' "'.$FilesSource[$i].'"'); 142 158 } 143 159 if (!isset($BlockThumbnail)) { 144 exec(' nconvert.exe -q '.$Qthumbnail.' -out jpeg -o "'.$matches[1].'/thumbnail/'.$prefixe_mini.$matches[2].'" -dpi 72 -ratio -rtype lanczos -rflag decr-resize '.$DIMthumbnail.' '.$DIMthumbnail.' -rmeta -rexifthumb "'.$FilesSource[$i].'"');145 } 146 if ( $DIRhighORNOT AND !isset($BlockHigh)) {160 exec('files\nconvert.exe -q '.$Qthumbnail.' -out jpeg -o "'.$FileFolder.'/thumbnail/'.$prefixe_mini.$FileName.'" -dpi 72 '.$convOptions.'-resize '.$DIMthumbnail.' '.$DIMthumbnail.' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 161 } 162 if (!isset($BlockHigh) AND $DIRhighORNOT) { 147 163 if ($DIMhdORNOT) { 148 exec(' nconvert.exe -q '.$Qhd.' -out jpeg -o "'.$matches[1].'/pwg_high/'.$matches[2].'" -dpi '.$DPI.' -ratio -rtype lanczos -rflag decr-resize '.$DIMhd.' '.$DIMhd.' '.$copyHD.' "'.$FilesSource[$i].'"');164 exec('files\nconvert.exe -q '.$Qhd.' -out jpeg -o "'.$FileFolder.'/pwg_high/'.$FileName.'" -dpi '.$DPI.' '.$convOptions.' -resize '.$DIMhd.' '.$DIMhd.' '.$copyHD.' "'.$FilesSource[$i].'"'); 149 165 } else { 150 copy($FilesSource[$i], $ matches[1].'/pwg_high/'.$matches[2]);166 copy($FilesSource[$i], $FileFolder.'/pwg_high/'.$FileName); 151 167 } 152 168 } 153 169 154 170 // Réinitialise les bloqueurs 171 unset($FileInfos); 155 172 unset($BlockNormal); 156 173 unset($BlockThumbnail); 157 174 unset($BlockHigh); 158 159 } 160 161 if (!$silentORNOT) { 162 echo '<div class="files"> 163 <h2>'.l10n('Source files').'</h2> 164 <ul>'; 165 foreach ($FilesSource as $value) { 166 echo '<li>'.$value.'</li>'; 167 } 168 echo '</ul> 169 <i>'.l10n('%d files', count($FilesSource)).'</i> 170 </div>'; 171 } 175 } 176 177 178 ### Affichage des fichiers traités ### 179 echo '<div class="files"> 180 <h2>'.l10n('Source files').'</h2> 181 <ul>'; 182 foreach ($FilesSource as $value) { 183 echo '<li>'.$value.'</li>'; 184 } 185 echo '</ul> 186 <i>'.l10n('%d files', count($FilesSource)).'</i> 187 </div>'; 172 188 173 189 unset($FilesSource); … … 176 192 177 193 ### Supprime les dossiers vides et copie les fichiers index.php ### 178 // Tableau avec les dossiers de sortie179 194 $DirsSortie = array(); 180 195 recursive_readdir($DIRsortie, 'DirsSortie', true); … … 199 214 200 215 201 echo '<div class="finish">'.l10n('Finish %d seconds', intval((microtime(true)-$TIME_START))).' <a href="index.php">'.l10n('Back').'</a> <a href="setup.php">'.l10n('Config').'</a></div>'; 202 203 204 216 ### Message final ### 217 echo '<div class="finish">'.l10n('Finish %d seconds', intval((microtime(true)-$TIME_START))).'</div> 218 <div class="link"><a href="index.php">» '.l10n('Back').'</a> <a href="setup.php">» '.l10n('Config').'</a></div>'; 219 220 221 222 ### READY ### 205 223 } else if (!isset($Errors)) { 206 echo '<div class="finish">'.l10n('Ready').' <a href="index.php?Process=true">'.l10n('Launch').'</a> <a href="setup.php">'.l10n('Config').'</a></div>'; 224 echo '<div class="finish">'.l10n('Ready').' <span id="loader" style="display:none;float:right;margin:-8px 0 -10px 0;"><img src="files/loader.gif" /></span></div> 225 <div class="link"><a href="index.php?Process=true" onClick="document.getElementById(\'loader\').style.display=\'block\';">» '.l10n('Launch').'</a> <a href="setup.php">» '.l10n('Config').'</a></div>'; 207 226 } 208 227 209 echo '</body> 228 229 230 ### FIN ### 231 echo '<div class="footer"> 232 2010 - <a href="http://www.strangeplanet.fr">Damien Sorel</a> - <a href="http://fr.piwigo.org/forum/viewtopic.php?id=19117">Forum</a> 233 </div> 234 235 </body> 210 236 </html>'; 211 237 ?> -
extensions/PHP_Optimisateur/language/en/en.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 7 7 $Lang['ErrorFile'] = "Fatal error : Configuration file missing."; 8 8 $Lang['ErrorFolderIn'] = "Fatal error : Source folder empty."; 9 $Lang['ErrorFolderOut'] = "Fatal error : Exite folder not empty."; 9 $Lang['ErrorFolderOut'] = "Fatal error : Exit folder not empty."; 10 $Lang['ErrorNconvert'] = "The program nconvert.exe is unavailable."; 10 11 $Lang['Source files'] = "Files"; 11 12 $Lang['%d files'] = "%d files"; … … 20 21 $Lang['FolderOut'] = "Exit folder"; 21 22 $Lang['Options'] = "Options"; 22 $Lang['silentORNOT'] = " Silent mode";23 $Lang['silentORNOT'] = "If exit folder not empty"; 23 24 $Lang['DIRhighORNOT'] = "Create high-definition folders"; 24 25 $Lang['DIMhdORNOT'] = "Resize HD pictures"; … … 55 56 $Lang['left'] = "left"; 56 57 $Lang['right'] = "right"; 57 $Lang[''] = ""; 58 $Lang['erase'] = "Erase"; 59 $Lang['pass'] = "Continue"; 60 $Lang['block'] = "Block"; 61 $Lang['New !'] = " New !"; 62 $Lang['Missing !'] = " Missing !"; 63 $Lang['Reset'] = "Reset"; 64 $Lang['Valid'] = "Valid"; 58 65 ?> -
extensions/PHP_Optimisateur/language/fr/fr.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 … … 8 8 $Lang['ErrorFolderIn'] = "Erreur fatale : Dossier source vide."; 9 9 $Lang['ErrorFolderOut'] = "Erreur fatale : Dossier de sortie non vide."; 10 $Lang['ErrorNconvert'] = "Le programme nconvert.exe est introuvable."; 10 11 $Lang['Source files'] = "Fichiers"; 11 12 $Lang['%d files'] = "%d fichiers"; … … 20 21 $Lang['FolderOut'] = "Répertoire de sortie"; 21 22 $Lang['Options'] = "Options"; 22 $Lang['silentORNOT'] = " Mode silencieux";23 $Lang['silentORNOT'] = "Si dossier de sortie non vide"; 23 24 $Lang['DIRhighORNOT'] = "Créer le dossier haute définition"; 24 25 $Lang['DIMhdORNOT'] = "Redimensionner les images HD"; … … 55 56 $Lang['left'] = "gauche"; 56 57 $Lang['right'] = "droite"; 57 $Lang[''] = ""; 58 $Lang['erase'] = "Effacer"; 59 $Lang['pass'] = "Continuer"; 60 $Lang['block'] = "Bloquer"; 61 $Lang['New !'] = " Nouveau !"; 62 $Lang['Missing !'] = " Manquant !"; 63 $Lang['Reset'] = "Réinitialiser"; 64 $Lang['Valid'] = "Valider"; 58 65 ?> -
extensions/PHP_Optimisateur/plugins/convert_pan.php
r7991 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin ConvertPan|4 | Plugin ConvertPan 1.1 | 5 5 \***************************************/ 6 6 … … 12 12 $DIMthumbnailV = $DIMthumbnail/$PluginsProcess['convert_pan']['RatioPanThumb']; // Taille verticale des miniatures 13 13 14 if (strpos($matches[2], $NAMEpanorama) !== false) { 15 exec('nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$matches[1].'/'.$matches[2].'" -dpi 72 -ratio -rtype lanczos -resize 0 '.$DIMpanorama.' '.$copyNormal.' "'.$FilesSource[$i].'"'); 16 exec('nconvert.exe -q '.$Qthumbnail.' -out jpeg -o "'.$matches[1].'/thumbnail/'.$prefixe_mini.$matches[2].'" -dpi 72 -ratio -rtype lanczos -rflag decr -resize 0 '.$DIMthumbnailV.' -crop 0 0 '.$DIMthumbnail.' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 14 if (strpos($FileName, $NAMEpanorama) !== false) { 17 15 18 $BlockNormal = true; 19 $BlockThumbnail = true; 16 // on prend la miniature au milieu du panorama 17 $tmp_x = $FileInfos['Width'] * $DIMthumbnailV / $FileInfos['Height']; 18 $offset_x = ($tmp_x - $DIMthumbnail) / 2; 19 20 if (!isset($BlockNormal)) { 21 exec('files\nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$FileFolder.'/'.$FileName.'" -dpi 72 '.$convOptions.' -resize 0 '.$DIMpanorama.' '.$copyNormal.' "'.$FilesSource[$i].'"'); 22 $BlockNormal = true; 23 } 24 25 if (!isset($BlockThumbnail)) { 26 exec('files\nconvert.exe -q '.$Qthumbnail.' -out jpeg -o "'.$FileFolder.'/thumbnail/'.$prefixe_mini.$FileName.'" -dpi 72 '.$convOptions.' -resize 0 '.$DIMthumbnailV.' -crop '.$offset_x.' 0 '.$DIMthumbnail.' '.$DIMthumbnailV.' -rmeta -rexifthumb "'.$FilesSource[$i].'"'); 27 $BlockThumbnail = true; 28 } 20 29 } 21 30 ?> -
extensions/PHP_Optimisateur/plugins/create_folders_alpha.php
r7994 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin CretaFoldersAlpha|4 | Plugin CreateFoldersAlpha 1.0 | 5 5 \***************************************/ 6 6 -
extensions/PHP_Optimisateur/plugins/front2back_support.php
r7991 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin Front2Back Support|4 | Plugin Front2Back Support 1.1 | 5 5 \***************************************/ 6 6 … … 12 12 $MOVEverso = $PluginsProcess['front2back_support']['MOVEverso']; // Déplacer les images originales dans un sous dosssier 'verso' 13 13 14 if (strpos($matches[2], $NAMEverso) !== false) { 15 $matches[3] = str_replace($NAMEverso, '', $matches[2]); 16 # matches[3] = fichier sans verso 14 if (strpos($FileName, $NAMEverso) !== false) { 15 $FileNameClean = str_replace($NAMEverso, '', $FileName); 17 16 18 17 // Image normale 19 if (!file_exists($ matches[1].'/thumbnail/verso')) {20 mkdir($ matches[1].'/thumbnail/verso');18 if (!file_exists($FileFolder.'/thumbnail/verso')) { 19 mkdir($FileFolder.'/thumbnail/verso'); 21 20 } 22 exec(' nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$matches[1].'/thumbnail/verso/'.$matches[3].'" -dpi 72 -ratio -rtype lanczos-resize '.$DIMnormal.' '.$DIMnormal.' '.$copyNormal.' "'.$FilesSource[$i].'"');21 exec('files\nconvert.exe -q '.$Qnormal.' -out jpeg -o "'.$FileFolder.'/thumbnail/verso/'.$FileNameClean.'" -dpi 72 '.$convOptions.' -resize '.$DIMnormal.' '.$DIMnormal.' '.$copyNormal.' "'.$FilesSource[$i].'"'); 23 22 24 23 // Image hd 25 24 if ($DIRhighORNOT) { 26 if (!file_exists($ matches[1].'/pwg_high/verso')) {27 mkdir($ matches[1].'/pwg_high/verso');25 if (!file_exists($FileFolder.'/pwg_high/verso')) { 26 mkdir($FileFolder.'/pwg_high/verso'); 28 27 } 29 28 if ($DIMhdORNOT) { 30 exec(' nconvert.exe -q '.$Qhd.' -out jpeg -o "'.$matches[1].'/pwg_high/verso/'.$matches[3].'" -dpi '.$DPI.' -ratio -rtype lanczos -rflag decr-resize '.$DIMhd.' '.$DIMhd.' '.$copyHD.' "'.$FilesSource[$i].'"');29 exec('files\nconvert.exe -q '.$Qhd.' -out jpeg -o "'.$FileFolder.'/pwg_high/verso/'.$FileNameClean.'" -dpi '.$DPI.' '.$convOptions.' -resize '.$DIMhd.' '.$DIMhd.' '.$copyHD.' "'.$FilesSource[$i].'"'); 31 30 } else { 32 copy($FilesSource[$i], $ matches[1].'/pwg_high/verso/'.$matches[3]);31 copy($FilesSource[$i], $FileFolder.'/pwg_high/verso/'.$FileNameClean); 33 32 } 34 33 } … … 36 35 // Déplacement de l'image originale 37 36 if ($MOVEverso) { 38 $matches[4] = str_replace(substr($DIRsortie,0,-1), substr($DIRsource,0,-1), $matches[1]); 39 # matches[4] = dossier source 40 if (!file_exists($matches[4].'/verso')) { 41 mkdir($matches[4].'/verso', 0777, true); 37 $FileFolderSource = str_replace(substr($DIRsortie,0,-1), substr($DIRsource,0,-1), $FileFolder); 38 if (!file_exists($FileFolderSource.'/verso')) { 39 mkdir($FileFolderSource.'/verso', 0777, true); 42 40 } 43 rename($ matches[4].'/'.$matches[2], $matches[4].'/verso/'.$matches[3]);41 rename($FileFolderSource.'/'.$FileName, $FileFolderSource.'/verso/'.$FileNameClean); 44 42 } 45 43 -
extensions/PHP_Optimisateur/plugins/watermark.php
r7991 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Plugin Watermark|4 | Plugin Watermark 1.1 | 5 5 \***************************************/ 6 6 -
extensions/PHP_Optimisateur/setup.php
r7993 r8195 2 2 /***************************************\ 3 3 | PHP OPTIMISATEUR | 4 | Version 1. 1|4 | Version 1.2 | 5 5 \***************************************/ 6 6 7 7 include('files/functions.php'); 8 8 9 ### Création de nouveau fichier de configuration ### 9 10 ### NOUVELLE CONFIGURATION ### 10 11 if (isset($_POST['DIRsource'])) { 11 // Quelques traitements avant d'enregistrer12 // Quelques traitements 12 13 $_POST['copyCOLOR'] = implode(' ', $_POST['copyCOLOR']); 13 14 $_POST['copyPOS'] = implode('-', $_POST['copyPOS']); 14 if(!isset($_POST['PluginsBefore'])) $_POST['PluginsBefore'] = null; 15 if(!isset($_POST['PluginsProcess'])) $_POST['PluginsProcess'] = null; 16 if(!isset($_POST['PluginsAfter'])) $_POST['PluginsAfter'] = null; 15 16 // Plugins : ensembles existants même si vides & supprime les plugins manquants 17 foreach (array('PluginsBefore','PluginsProcess','PluginsAfter') as $mode) { 18 if (!isset($_POST[$mode])) { 19 $_POST[$mode] = null; 20 } else { 21 foreach ($_POST[$mode] as $name => $config) { 22 if (isset($config['delete'])) unset($_POST[$mode][$name]); 23 } 24 } 25 } 26 27 // Ajoute les / en fin d'URI 17 28 if (!preg_match('#(.*)/$#', $_POST['DIRsource'])) $_POST['DIRsource'] .= '/'; 18 29 if (!preg_match('#(.*)/$#', $_POST['DIRsortie'])) $_POST['DIRsortie'] .= '/'; … … 30 41 include('files/header.php'); 31 42 32 // Fichier de configuration 43 44 ### CONFIGURATION ### 33 45 if (!file_exists('config.xml')) { 34 46 $Errors['ErrorFile'] = true; 47 } else { 48 extract(load_config()); 35 49 } 36 50 … … 39 53 ### ERREURS ### 40 54 if (isset($Errors)) { 41 $i=0;42 55 foreach ($Errors as $key => $null) { 43 // Dégueulasse les ternaires à la suite ! mais j'aime ça 44 echo '<div class="error">'.l10n($key).' '.(($i==0)?'<a href="setup.php">'.l10n('Back').'</a></div>':'</div>'); 45 $i++; 56 echo '<div class="error">'.l10n($key).'</div>'; 46 57 } 58 echo '<div class="link"><a href="index.php">'.l10n('Back').'</a> <a href="setup.php">'.l10n('Config').'</a></div>'; 47 59 } 48 60 … … 51 63 ### EXECUTION ### 52 64 if (!isset($Errors)) { 53 // Configuration54 extract(load_config());55 56 $copyCOLOR = explode(' ', $copyCOLOR);57 $copyPOS = explode('-', $copyPOS);58 59 60 65 ### Gestion des nouveaux plugins ### 61 66 // Ajoute la configuration des plugins non-installés aux tableaux, il faut valider le formulaire pour les installer 62 67 $Plugins = glob('plugins/*.xml'); 63 $NewPlugins = array();64 68 65 69 foreach ($Plugins as $plugin) { … … 76 80 ${$plugin_mode}[$plugin_name] = $plugin; 77 81 $NewPlugins[$plugin_name] = true; 82 } else if (!file_exists('plugins/'.$plugin_name.'.php')) { 83 $MissingPlugins[$plugin_name] = true; 78 84 } 79 85 } 86 87 88 ### Gestion des plugins manquants ### 89 foreach (array('PluginsBefore','PluginsProcess','PluginsAfter') as $mode) { 90 foreach (${$mode} as $plugin_name => $config) { 91 if (!file_exists('plugins/'.$plugin_name.'.php')) { 92 $MissingPlugins[$plugin_name] = true; 93 } 94 } 95 } 80 96 81 97 82 98 ### Formulaire ### 99 $copyCOLOR = explode(' ', $copyCOLOR); 100 $copyPOS = explode('-', $copyPOS); 101 83 102 echo ' 84 103 <script type="text/javascript"> … … 91 110 92 111 <form action="setup.php" method="post"> 93 <div class="config"> 94 <h2>'.l10n('Configuration').'</h2> 95 <ul> 96 <li> 97 <span class="title">'.l10n('Folders').'</span> 98 <table> 99 <tr> 100 <td><b>'.l10n('FolderIn').' :</b></td> 101 <td><input type="text" name="DIRsource" value="'.$DIRsource.'"/></td> 102 </tr> 103 <tr> 104 <td><b>'.l10n('FolderOut').' :</b></td> 105 <td><input type="text" name="DIRsortie" value="'.$DIRsortie.'"/></td> 106 </tr> 107 </table> 108 </li> 109 <li> 110 <span class="title">'.l10n('Options').'</span> 111 <table> 112 <tr> 113 <td><b>'.l10n('silentORNOT').' :</b></td> 114 <td><input type="radio" name="silentORNOT" value="true" '.(($silentORNOT)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="silentORNOT" value="false" '.((!$silentORNOT)?'checked':'').'/> '.l10n('no').'</td> 115 </tr> 116 <tr> 117 <td><b>'.l10n('DIRhighORNOT').' :</b></td> 118 <td><input type="radio" name="DIRhighORNOT" value="true" '.(($DIRhighORNOT)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="DIRhighORNOT" value="false" '.((!$DIRhighORNOT)?'checked':'').'/> '.l10n('no').'</td> 119 </tr> 120 <tr> 121 <td><b>'.l10n('DIMhdORNOT').' :</b></td> 122 <td><input type="radio" name="DIMhdORNOT" value="true" '.(($DIMhdORNOT)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="DIMhdORNOT" value="false" '.((!$DIMhdORNOT)?'checked':'').'/> '.l10n('no').'</td> 123 </tr> 124 <tr> 125 <td><b>'.l10n('renameORNOT').' :</b></td> 126 <td><input type="radio" name="renameORNOT" value="true" '.(($renameORNOT)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="renameORNOT" value="false" '.((!$renameORNOT)?'checked':'').'/> '.l10n('no').'</td> 127 </tr> 128 <tr> 129 <td><b>'.l10n('indexORNOT').' :</b></td> 130 <td><input type="radio" name="indexORNOT" value="true" '.(($indexORNOT)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="indexORNOT" value="false" '.((!$indexORNOT)?'checked':'').'/> '.l10n('no').'</td> 131 </tr> 132 <tr> 133 <td><b>'.l10n('prefixe_mini').' :</b></td> 134 <td><input type="text" name="prefixe_mini" value="'.$prefixe_mini.'" size="8"/></td> 135 </tr> 136 </table> 137 </li> 138 <li> 139 <span class="title">'.l10n('Sizes and quality').'</span> 140 <table> 141 <tr> 142 <td><b>'.l10n('DIMhd').' :</b></td> 143 <td><input type="text" name="DIMhd" value="'.$DIMhd.'" size="4"/></td> 144 </tr> 145 <tr> 146 <td><b>'.l10n('DIMnormal').' :</b></td> 147 <td><input type="text" name="DIMnormal" value="'.$DIMnormal.'" size="3"/></td> 148 </tr> 149 <tr> 150 <td><b>'.l10n('DIMthumbnail').' :</b></td> 151 <td><input type="text" name="DIMthumbnail" value="'.$DIMthumbnail.'" size="3"/></td> 152 </tr> 153 <tr> 154 <td><b>'.l10n('Qhd').' :</b></td> 155 <td><input type="text" name="Qhd" value="'.$Qhd.'" size="3"/></td> 156 </tr> 157 <tr> 158 <td><b>'.l10n('Qnormal').' :</b></td> 159 <td><input type="text" name="Qnormal" value="'.$Qnormal.'" size="3"/></td> 160 </tr> 161 <tr> 162 <td><b>'.l10n('Qthumbnail').' :</b></td> 163 <td><input type="text" name="Qthumbnail" value="'.$Qthumbnail.'" size="3"/></td> 164 </tr> 165 <tr> 166 <td><b>'.l10n('DPI').' :</b></td> 167 <td><input type="text" name="DPI" value="'.$DPI.'" size="3"/></td> 168 </tr> 169 </table> 170 </li> 171 <li> 172 <span class="title">'.l10n('Copyright').'</span> 173 <table> 174 <tr> 175 <td><b>'.l10n('Content').' :</b></td> 176 <td><input type="text" name="copyright" value="'.$copyright.'"/></td> 177 </tr> 178 <tr> 179 <td><b>'.l10n('copyONhd').' :</b></td> 180 <td><input type="radio" name="copyONhd" value="true" '.(($copyONhd)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="copyONhd" value="false" '.((!$copyONhd)?'checked':'').'/> '.l10n('no').'</td> 181 </tr> 182 <tr> 183 <td><b>'.l10n('copyONnormal').' :</b></td> 184 <td><input type="radio" name="copyONnormal" value="true" '.(($copyONnormal)?'checked':'').'/> '.l10n('yes').' <input type="radio" name="copyONnormal" value="false" '.((!$copyONnormal)?'checked':'').'/> '.l10n('no').'</td> 185 </tr> 186 <tr> 187 <td><b>'.l10n('copyPOS%s', l10n('copyPOSv')).' :</b></td> 188 <td><input type="radio" name="copyPOS[0]" value="top" '.(($copyPOS[0]=='top')?'checked':'').'/> '.l10n('top').' <input type="radio" name="copyPOS[0]" value="center" '.(($copyPOS[0]=='center')?'checked':'').'/> '.l10n('center').' <input type="radio" name="copyPOS[0]" value="bottom" '.(($copyPOS[0]=='bottom')?'checked':'').'/> '.l10n('bottom').'</td> 189 </tr> 190 <tr> 191 <td><b>'.l10n('copyPOS%s', l10n('copyPOSh')).' :</b></td> 192 <td><input type="radio" name="copyPOS[1]" value="left" '.(($copyPOS[1]=='left')?'checked':'').'/> '.l10n('left').' <input type="radio" name="copyPOS[1]" value="center" '.(($copyPOS[1]=='center')?'checked':'').'/> '.l10n('center').' <input type="radio" name="copyPOS[1]" value="right" '.(($copyPOS[1]=='right')?'checked':'').'/> '.l10n('right').'</td> 193 </tr> 194 <tr> 195 <td><b>'.l10n('copySIZE').' :</b></td> 196 <td><input type="text" name="copySIZE" value="'.$copySIZE.'" size="5"/></td> 197 </tr> 198 <tr> 199 <td><b>'.l10n('copyCOLOR').' :</b></td> 200 <td> 201 <input type="text" name="copyCOLOR[0]" value="'.$copyCOLOR[0].'" size="3" onFocus="this.select();" onKeyUp="suivant(this,\'copyCOLOR[1]\', 3)"/> 202 <input type="text" name="copyCOLOR[1]" value="'.$copyCOLOR[1].'" size="3" onFocus="this.select();" onKeyUp="suivant(this,\'copyCOLOR[2]\', 3)"/> 203 <input type="text" name="copyCOLOR[2]" value="'.$copyCOLOR[2].'" size="3" onFocus="this.select();" /> 204 </td> 205 </tr> 206 <tr> 207 <td><b>'.l10n('copyFONT').' :</b></td> 208 <td><input type="text" name="copyFONT" value="'.$copyFONT.'"/></td> 209 </tr> 210 </table> 211 </li> 212 </ul> 213 </div> 214 215 <div class="config"> 216 <h2>'.l10n('Plugins').'</h2> 217 <ul> 218 <li> 219 <span class="title">'.l10n('PluginsBefore').'</span> 220 <ul>'; 221 foreach ($PluginsBefore as $name => $config) { 222 echo '<li> 223 <b class="'.((isset($NewPlugins[$name]))?'new':'').'">'.$name.' :</b> 224 <table>'; 225 foreach ($config as $key => $value) { 226 echo '<tr> 227 <td>'.$key.' :</td> 228 <td><input type="text" name="PluginsBefore['.$name.']['.$key.']" value="'.bool_to_string($value,1).'" size="7"/></td> 229 </tr>'; 230 } 231 echo '</table> 232 </li>'; 233 } 234 echo '</ul> 235 </li> 236 <li> 237 <span class="title">'.l10n('PluginsProcess').'</span> 238 <ul>'; 239 foreach ($PluginsProcess as $name => $config) { 240 echo '<li> 241 <b class="'.((isset($NewPlugins[$name]))?'new':'').'">'.$name.' :</b> 242 <table>'; 243 foreach ($config as $key => $value) { 244 echo '<tr> 245 <td>'.$key.' :</td> 246 <td><input type="text" name="PluginsProcess['.$name.']['.$key.']" value="'.bool_to_string($value,1).'" size="7"/></td> 247 </tr>'; 248 } 249 echo '</table> 250 </li>'; 251 } 252 echo '</ul> 253 </li> 254 <li> 255 <span class="title">'.l10n('PluginsAfter').'</span> 256 <ul>'; 257 foreach ($PluginsAfter as $name => $config) { 258 echo '<li> 259 <b class="'.((isset($NewPlugins[$name]))?'new':'').'">'.$name.' :</b> 260 <table>'; 261 foreach ($config as $key => $value) { 262 echo '<tr> 263 <td>'.$key.' :</td> 264 <td><input type="text" name="PluginsAfter['.$name.']['.$key.']" value="'.bool_to_string($value,1).'" size="7"/></td> 265 </tr>'; 266 } 267 echo '</table> 268 </li>'; 269 } 270 echo '</ul> 271 </li> 272 </ul> 273 </div> 274 275 <div class="finish"> 276 <input type="submit"/> <input type="reset"/> <a href="index.php">'.l10n('Back').'</a> 277 </div> 112 <div class="config"> 113 <h2>'.l10n('Configuration').'</h2> 114 <ul> 115 <li> 116 <span class="title">'.l10n('Folders').'</span> 117 <table> 118 <tr> 119 <td><b>'.l10n('FolderIn').' :</b></td> 120 <td><input type="text" name="DIRsource" value="'.$DIRsource.'"/></td> 121 </tr> 122 <tr> 123 <td><b>'.l10n('FolderOut').' :</b></td> 124 <td><input type="text" name="DIRsortie" value="'.$DIRsortie.'"/></td> 125 </tr> 126 </table> 127 </li> 128 <li> 129 <span class="title">'.l10n('Options').'</span> 130 <table> 131 <tr> 132 <td><b>'.l10n('silentORNOT').' :</b></td> 133 <td> 134 <input type="radio" name="silentORNOT" value="erase" '.(($silentORNOT=='erase')?'checked':'').'/> '.l10n('erase').' 135 <input type="radio" name="silentORNOT" value="block" '.(($silentORNOT=='block')?'checked':'').'/> '.l10n('block').' 136 <input type="radio" name="silentORNOT" value="pass" '.(($silentORNOT=='pass')?'checked':'').'/> '.l10n('pass').' 137 </td> 138 </tr> 139 <tr> 140 <td><b>'.l10n('DIRhighORNOT').' :</b></td> 141 <td> 142 <input type="radio" name="DIRhighORNOT" value="true" '.(($DIRhighORNOT)?'checked':'').'/> '.l10n('yes').' 143 <input type="radio" name="DIRhighORNOT" value="false" '.((!$DIRhighORNOT)?'checked':'').'/> '.l10n('no').' 144 </td> 145 </tr> 146 <tr> 147 <td><b>'.l10n('DIMhdORNOT').' :</b></td> 148 <td> 149 <input type="radio" name="DIMhdORNOT" value="true" '.(($DIMhdORNOT)?'checked':'').'/> '.l10n('yes').' 150 <input type="radio" name="DIMhdORNOT" value="false" '.((!$DIMhdORNOT)?'checked':'').'/> '.l10n('no').' 151 </td> 152 </tr> 153 <tr> 154 <td><b>'.l10n('renameORNOT').' :</b></td> 155 <td> 156 <input type="radio" name="renameORNOT" value="true" '.(($renameORNOT)?'checked':'').'/> '.l10n('yes').' 157 <input type="radio" name="renameORNOT" value="false" '.((!$renameORNOT)?'checked':'').'/> '.l10n('no').' 158 </td> 159 </tr> 160 <tr> 161 <td><b>'.l10n('indexORNOT').' :</b></td> 162 <td> 163 <input type="radio" name="indexORNOT" value="true" '.(($indexORNOT)?'checked':'').'/> '.l10n('yes').' 164 <input type="radio" name="indexORNOT" value="false" '.((!$indexORNOT)?'checked':'').'/> '.l10n('no').' 165 </td> 166 </tr> 167 <tr> 168 <td><b>'.l10n('prefixe_mini').' :</b></td> 169 <td><input type="text" name="prefixe_mini" value="'.$prefixe_mini.'" size="8"/></td> 170 </tr> 171 </table> 172 </li> 173 <li> 174 <span class="title">'.l10n('Sizes and quality').'</span> 175 <table> 176 <tr> 177 <td><b>'.l10n('DIMhd').' :</b></td> 178 <td><input type="text" name="DIMhd" value="'.$DIMhd.'" size="4"/></td> 179 </tr> 180 <tr> 181 <td><b>'.l10n('DIMnormal').' :</b></td> 182 <td><input type="text" name="DIMnormal" value="'.$DIMnormal.'" size="3"/></td> 183 </tr> 184 <tr> 185 <td><b>'.l10n('DIMthumbnail').' :</b></td> 186 <td><input type="text" name="DIMthumbnail" value="'.$DIMthumbnail.'" size="3"/></td> 187 </tr> 188 <tr> 189 <td><b>'.l10n('Qhd').' :</b></td> 190 <td><input type="text" name="Qhd" value="'.$Qhd.'" size="3"/></td> 191 </tr> 192 <tr> 193 <td><b>'.l10n('Qnormal').' :</b></td> 194 <td><input type="text" name="Qnormal" value="'.$Qnormal.'" size="3"/></td> 195 </tr> 196 <tr> 197 <td><b>'.l10n('Qthumbnail').' :</b></td> 198 <td><input type="text" name="Qthumbnail" value="'.$Qthumbnail.'" size="3"/></td> 199 </tr> 200 <tr> 201 <td><b>'.l10n('DPI').' :</b></td> 202 <td><input type="text" name="DPI" value="'.$DPI.'" size="3"/></td> 203 </tr> 204 </table> 205 </li> 206 <li> 207 <span class="title">'.l10n('Copyright').'</span> 208 <table> 209 <tr> 210 <td><b>'.l10n('Content').' :</b></td> 211 <td><input type="text" name="copyright" value="'.$copyright.'"/></td> 212 </tr> 213 <tr> 214 <td><b>'.l10n('copyONhd').' :</b></td> 215 <td> 216 <input type="radio" name="copyONhd" value="true" '.(($copyONhd)?'checked':'').'/> '.l10n('yes').' 217 <input type="radio" name="copyONhd" value="false" '.((!$copyONhd)?'checked':'').'/> '.l10n('no').' 218 </td> 219 </tr> 220 <tr> 221 <td><b>'.l10n('copyONnormal').' :</b></td> 222 <td> 223 <input type="radio" name="copyONnormal" value="true" '.(($copyONnormal)?'checked':'').'/> '.l10n('yes').' 224 <input type="radio" name="copyONnormal" value="false" '.((!$copyONnormal)?'checked':'').'/> '.l10n('no').' 225 </td> 226 </tr> 227 <tr> 228 <td><b>'.l10n('copyPOS%s', l10n('copyPOSv')).' :</b></td> 229 <td> 230 <input type="radio" name="copyPOS[0]" value="top" '.(($copyPOS[0]=='top')?'checked':'').'/> '.l10n('top').' 231 <input type="radio" name="copyPOS[0]" value="center" '.(($copyPOS[0]=='center')?'checked':'').'/> '.l10n('center').' 232 <input type="radio" name="copyPOS[0]" value="bottom" '.(($copyPOS[0]=='bottom')?'checked':'').'/> '.l10n('bottom').' 233 </td> 234 </tr> 235 <tr> 236 <td><b>'.l10n('copyPOS%s', l10n('copyPOSh')).' :</b></td> 237 <td> 238 <input type="radio" name="copyPOS[1]" value="left" '.(($copyPOS[1]=='left')?'checked':'').'/> '.l10n('left').' 239 <input type="radio" name="copyPOS[1]" value="center" '.(($copyPOS[1]=='center')?'checked':'').'/> '.l10n('center').' 240 <input type="radio" name="copyPOS[1]" value="right" '.(($copyPOS[1]=='right')?'checked':'').'/> '.l10n('right').' 241 </td> 242 </tr> 243 <tr> 244 <td><b>'.l10n('copySIZE').' :</b></td> 245 <td><input type="text" name="copySIZE" value="'.$copySIZE.'" size="5"/></td> 246 </tr> 247 <tr> 248 <td><b>'.l10n('copyCOLOR').' :</b></td> 249 <td> 250 <input type="text" name="copyCOLOR[0]" value="'.$copyCOLOR[0].'" size="3" onFocus="this.select();" onKeyUp="suivant(this,\'copyCOLOR[1]\', 3)"/> 251 <input type="text" name="copyCOLOR[1]" value="'.$copyCOLOR[1].'" size="3" onFocus="this.select();" onKeyUp="suivant(this,\'copyCOLOR[2]\', 3)"/> 252 <input type="text" name="copyCOLOR[2]" value="'.$copyCOLOR[2].'" size="3" onFocus="this.select();" /> 253 </td> 254 </tr> 255 <tr> 256 <td><b>'.l10n('copyFONT').' :</b></td> 257 <td><input type="text" name="copyFONT" value="'.$copyFONT.'"/></td> 258 </tr> 259 </table> 260 </li> 261 </ul> 262 </div> 263 264 <div class="config"> 265 <h2>'.l10n('Plugins').'</h2> 266 <ul>'; 267 // Affichage des plugins, un bloc par mode 268 foreach (array('PluginsBefore','PluginsProcess','PluginsAfter') as $mode) { 269 echo '<li> 270 <span class="title">'.l10n($mode).'</span> 271 <ul>'; 272 // Un bloc par plugin 273 foreach (${$mode} as $name => $config) { 274 echo '<li>'; 275 echo '<b>'.$name.' :</b>'; 276 277 // Cas spéciaux dans le titre(nouveau, manquant) 278 if (isset($NewPlugins[$name])) { 279 echo '<b class="new">'.l10n('New !').'</b>'; 280 } else if (isset($MissingPlugins[$name])) { 281 echo '<b class="miss">'.l10n('Missing !').'</b>'; 282 } 283 284 echo '<table>'; 285 // Si il est manquant on ne met que la checkbox de suppression 286 if (isset($MissingPlugins[$name])) { 287 echo '<tr> 288 <td>'.l10n('erase').' :</td> 289 <td><input type="checkbox" name="'.$mode.'['.$name.'][delete]" value="true" checked="checked"/></td> 290 </tr>'; 291 // sinon on affiche sa configuration 292 } else { 293 foreach ($config as $key => $value) { 294 echo '<tr> 295 <td>'.$key.' :</td> 296 <td><input type="text" name="'.$mode.'['.$name.']['.$key.']" value="'.bool_to_string($value,1).'" size="'.strlen(bool_to_string($value,1)).'"/></td> 297 </tr>'; 298 } 299 } 300 echo '</table> 301 </li>'; 302 } 303 echo '</ul> 304 </li>'; 305 } 306 307 echo '</ul> 308 </div> 309 310 <div class="finish"><input type="submit" value="'.l10n('Valid').'"/> <input type="reset" value="'.l10n('Reset').'"/></div> 311 <div class="link"><a href="index.php">» '.l10n('Back').'</a></div> 278 312 </form>'; 279 313 } 280 314 281 echo '</body> 315 316 317 ### FIN ### 318 echo '<div class="footer"> 319 2010 - <a href="http://www.strangeplanet.fr">Damien Sorel</a> - <a href="http://fr.piwigo.org/forum/viewtopic.php?id=19117">Forum</a> 320 </div> 321 322 </body> 282 323 </html>'; 283 324 ?>
Note: See TracChangeset
for help on using the changeset viewer.