Changeset 3663 for extensions/Flash_Gallery/admin
- Timestamp:
- Jul 22, 2009, 12:34:42 AM (15 years ago)
- Location:
- extensions/Flash_Gallery/admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Flash_Gallery/admin/add_module.php
r3531 r3663 41 41 WHERE id = ' . $_GET['edit'] . ';'); 42 42 43 // Force le submit pour sauvegarder les données éventuellement modifiées lors du RAZ des paramètres. Pas de redirection dans ce cas 44 $_POST['submit'] = 'no_redirect'; 43 45 } 44 46 … … 57 59 else 58 60 { 59 // id, pos, name, descr, type, datas, users, groups, show_title, on_home, on_cats, cats, recurs_cats, replace_thumb, replace_cats, height, transparent, id_line60 61 $module_name = $_POST['module_name']; 61 62 $desc = (!empty($_POST['module_desc']) ? '"' . $_POST['module_desc'] . '"' : 'NULL'); … … 78 79 79 80 $height = (!empty($_POST['flashgal_height']) ? '"'.$_POST['flashgal_height'].'"' : "NULL"); 81 $maxcomment = (!empty($_POST['flashgal_max_comment']) ? '"'.$_POST['flashgal_max_comment'].'"' : "0");; 80 82 81 // $sav_datas = (!empty($datas) ? '"' . addslashes(serialize($datas)) . '"' : 'NULL');82 83 $sav_ext_datas = (!empty($ext_datas) ? '"' . addslashes(serialize($ext_datas)) . '"' : 'NULL'); 83 84 … … 96 97 if (isset($_GET['edit'])) 97 98 { 98 // // id, pos, name, descr, type, datas, users, groups, show_title, on_home, on_cats, cats, recurs_cats, replace_thumb, replace_cats, height, transparent99 99 100 100 pwg_query(' … … 118 118 transparent=' . $transparent .', 119 119 fullscreen=' . $fullscreen .', 120 bgcolor="' . $bgcolor .'" 120 bgcolor="' . $bgcolor .'", 121 maxcomment=' . $maxcomment . ' 121 122 122 123 WHERE id = ' . $_GET['edit'] . ';'); … … 132 133 133 134 $query = ' 134 INSERT INTO ' . FLASHGAL_TABLE . ' ( id, pos, name, descr, type, datas, ext_datas, users, groups, show_title, on_home, on_home_global, on_cats, cats, recurs_cats, replace_thumb, replace_cats, height, transparent, fullscreen, bgcolor )135 INSERT INTO ' . FLASHGAL_TABLE . ' ( id, pos, name, descr, type, datas, ext_datas, users, groups, show_title, on_home, on_home_global, on_cats, cats, recurs_cats, replace_thumb, replace_cats, height, transparent, fullscreen, bgcolor, maxcomment) 135 136 VALUES (' . $next_element_id . ' , 136 137 ' . $pos . ', … … 153 154 ' . $transparent .', 154 155 ' . $fullscreen .', 155 "' . $bgcolor .'" 156 "' . $bgcolor .'", 157 ' . $maxcomment . ' 156 158 );'; 157 159 … … 161 163 } 162 164 163 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 165 if ($_POST['submit'] != 'no_redirect') 166 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 164 167 } 165 168 } … … 194 197 'replace_thumb_CHECKED' => ($module['replace_thumb'] == 'true' ? 'checked="checked"' : ''), 195 198 'replace_cats_CHECKED' => ($module['replace_cats'] == 'true' ? 'checked="checked"' : ''), 196 'ENABLERESTORE' => true 199 'ENABLERESTORE' => true, 200 'FLASHGAL_MAX_COMMENT' => (isset($module['maxcomment']) ? $module['maxcomment'] : '0') 197 201 198 202 )); … … 218 222 'FLASHGAL_FULLSCREEN' => 'checked="checked"', 219 223 'FLASHGAL_BGCOLOR' => '#FFFFFF', 220 'ENABLERESTORE' => false 221 224 'ENABLERESTORE' => false, 225 'FLASHGAL_MAX_COMMENT' => '0' 222 226 223 227 )); … … 239 243 } 240 244 241 /// 242 // tiico : ajouter la récupération des données par défaut (présentes dans le fichier module.inc.php) 243 /// 245 246 // Recuperation des données pour les informations a parametrer dans le flux 244 247 foreach ($module_data['datas'] as $key => $value) 245 248 { … … 247 250 { 248 251 $template->append( 'FlashGal_Param', array( 249 // $key => true,250 252 'name' => $key, // nom du parametre 251 253 'lib' => l10n($key), // libelle du parametre … … 267 269 true); 268 270 269 // $datas = array($key => $datas[$key]);270 271 271 272 272 // Configuration supplémentaire du module (dans le cas ou il y a d'autres parametres) -
extensions/Flash_Gallery/admin/admin.php
r3531 r3663 51 51 } 52 52 53 //cyclage sur le parametre on_home 54 if (isset($_GET['id']) and isset($_GET['home']) and !is_adviser()) 55 { 56 $home = $_GET['home']; 57 $global = isset($_GET['global']) ? $_GET['global'] : 'selective'; 58 // ordre : homeOFF -> HomeON -> HomeONGlobal 59 if ($home == 'true' and $global == 'selective') 60 $global = 'global'; 61 elseif ($home == 'true' and $global == 'global') 62 $home = 'false'; 63 else 64 { 65 $home = 'true'; 66 $global = 'selective'; 67 } 68 69 pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 70 SET on_home="' . $home. '", on_home_global="' . $global . '" 71 WHERE id=' . $_GET['id'] . ' LIMIT 1'); 72 73 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 74 } 75 //cyclage sur le parametre on_cats 76 if (isset($_GET['id']) and isset($_GET['cats']) and !is_adviser()) 77 { 78 // ordre : catsOFF -> catsON 79 pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 80 SET on_cats="' . ($_GET['cats'] == 'true' ? 'false' : 'true'). '" 81 WHERE id=' . $_GET['id'] . ' LIMIT 1'); 82 83 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 84 } 85 86 if (isset($_GET['id']) and isset($_GET['recurs']) and !is_adviser()) 87 { 88 // ordre : recursOFF -> recursON 89 pwg_query( 'UPDATE ' . FLASHGAL_TABLE . ' 90 SET recurs_cats="' . ($_GET['recurs'] == 'true' ? 'false' : 'true'). '" 91 WHERE id=' . $_GET['id'] . ' LIMIT 1'); 92 93 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php'); 94 } 95 53 96 //Récupération des modules disponibles 54 97 $modules = get_flashgal_modules(); -
extensions/Flash_Gallery/admin/manage.php
r3531 r3663 53 53 'ICON_INFO' => FLASHGAL_PATH . 'img/infos.png', 54 54 'SCREEN' => FLASHGAL_PATH . '/modules/'. $module['type'].'/screenshot.jpg', 55 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadd_module.php&type=' . $module['type'] . '&edit=' . $module['id'], 56 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 55 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadd_module.php&type=' . $module['type'] . '&edit=' . $module['id'], 56 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 57 'U_HOME' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php&id=' . $module['id'] .'&home=' . $module['on_home'] . '&global=' .$module['on_home_global'], 58 'U_CATS' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php&id=' . $module['id'] .'&cats=' . $module['on_cats'], 59 'U_RECURS' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . FLASHGAL_DIR . '%2Fadmin%2Fadmin.php&id=' . $module['id'] .'&recurs=' . $module['recurs_cats'], 57 60 )); 58 61 } -
extensions/Flash_Gallery/admin/template/add_module.tpl
r3531 r3663 75 75 <td colspan="3"><input type="checkbox" name="show_title" value="1" {$show_title_CHECKED}> {'flashgal_show_title'|@translate}</td> 76 76 </tr> 77 <tr><td ><br></td></tr>77 <tr><td colspan="3"> </td></tr> 78 78 79 79 <tr> … … 81 81 <td colspan="2"><input type="text" size="3" maxlength="3" value="{$FLASHGAL_HEIGHT}" name="flashgal_height"> px</td> 82 82 </tr> 83 <tr><td colspan="3"> </td></tr> 84 <tr> 85 <td> </td> 86 <td colspan="2"> 87 - <input type="checkbox" name="flashgal_transparent" {$FLASHGAL_TRANSPARENT}/> {'flashgal_transparent'|@translate} 88 </td> 89 </tr> 83 90 <tr> 84 91 <td> {'flashgal_cfg_option'|@translate} </td> 85 92 <td colspan="2"> 86 - <input type="checkbox" name="flashgal_transparent" {$FLASHGAL_TRANSPARENT}/> {'flashgal_transparent'|@translate}87 <br/>88 93 - <input type="checkbox" name="flashgal_fullscreen" {$FLASHGAL_FULLSCREEN}/> {'flashgal_fullscreen'|@translate} 89 <br/> 94 </td> 95 <tr> 96 <td> </td> 97 <td colspan="2"> 90 98 - {'flashgal_bgcolor'|@translate} <input type="text" size="7" maxlength="7" name="flashgal_bgcolor" class="colorwell" value="{$FLASHGAL_BGCOLOR}" /> 91 <br/> 99 </td> 100 </tr> 101 <tr> 102 <td> </td> 103 <td colspan="2"> 92 104 - <input type="checkbox" name="flashgal_recurs_cats" {$FLASHGAL_RECURS_CATS}/> {'flashgal_recurs_cats'|@translate} 93 105 </td> 94 </tr> 95 <tr> 96 <td></td> 97 <td><br><hr></td> 98 <td></td> 106 <tr><td colspan="3"> </td></tr> 107 <tr><td colspan="3"> </td></tr> 108 109 </table> 110 <table> 111 <tr> 112 <td></td> 113 <td><br><hr></td> 114 <td></td> 99 115 </tr> 100 116 <tr> … … 232 248 <td> </td> 233 249 </tr> 250 <tr> 251 <td> <b>%ID</b> : <input type="text" size="1" maxlength="1" value="{$FLASHGAL_MAX_COMMENT}" name="flashgal_max_comment" /> {'img_comment_legend'|@translate} </td> 252 <td> </td> 253 <td> </td> 254 </tr> 234 255 </table> 235 256 -
extensions/Flash_Gallery/admin/template/manage.tpl
r3531 r3663 79 79 {if $module.TYPE != 'MainBlock'} 80 80 <ul class="categoryActions"> 81 <li>< img src="{$module.ON_HOME}" title="{$module.ON_HOME_LIB}"/></li>82 <li>< img src="{$module.ON_CATS}" title="{$module.ON_CATS_LIB}"/></a></li>83 <li>< img src="{$module.RECURS_CATS}" title="{$module.RECURS_CATS_LIB}"/></a></li>81 <li><a href="{$module.U_HOME}" title="{$module.ON_HOME_LIB}"><img src="{$module.ON_HOME}" title="{$module.ON_HOME_LIB}"/></a></li> 82 <li><a href="{$module.U_CATS}" title="{$module.ON_CATS_LIB}"><img src="{$module.ON_CATS}" title="{$module.ON_CATS_LIB}"/></a></li> 83 <li><a href="{$module.U_RECURS}" title="{$module.RECURS_CATS_LIB}"><img src="{$module.RECURS_CATS}" title="{$module.RECURS_CATS_LIB}"/></a></li> 84 84 85 85 <li><a href="{$module.U_EDIT}" title="{'flashgal_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'flash_edit'|@translate}"/></a></li>
Note: See TracChangeset
for help on using the changeset viewer.