[4293] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | Plugin Name : Look_Like_GBO 2 | |
---|
[6241] | 4 | // | Plugin Version : 2.1.A | |
---|
[4293] | 5 | // | File Version : 0.1 | |
---|
| 6 | // | Plugin Version author : Ex-FTB | |
---|
| 7 | // | Plugin description : | |
---|
| 8 | // | Ce plugin permet d'afficher les miniatures au survol des boutons | |
---|
| 9 | // | de navigation. This plugin allows display thumbnail under buton | |
---|
| 10 | // +-----------------------------------------------------------------------+ |
---|
| 11 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 12 | // | it under the terms of the GNU General Public License as published by | |
---|
| 13 | // | the Free Software Foundation | |
---|
| 14 | // | | |
---|
| 15 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 16 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 17 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 18 | // | General Public License for more details. | |
---|
| 19 | // | | |
---|
| 20 | // | You should have received a copy of the GNU General Public License | |
---|
| 21 | // | along with this program; if not, write to the Free Software | |
---|
| 22 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 23 | // | USA. | |
---|
| 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | |
---|
| 26 | // *************************************** |
---|
| 27 | // ** Plugin Administration panel setup ** |
---|
| 28 | // *************************************** |
---|
| 29 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
[4524] | 30 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
| 31 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
| 32 | // Setup plugin Language |
---|
| 33 | load_language('plugin.lang', LLGBO_PATH); |
---|
[4603] | 34 | include(LLGBO_PATH.'defaultvalues.php'); |
---|
| 35 | |
---|
[6259] | 36 | /* ****************************************************** */ |
---|
| 37 | /* Plugin template initialisation for admin panel display */ |
---|
| 38 | /* ****************************************************** */ |
---|
[6283] | 39 | global $template,$prefixeTable, $conf,$lang; |
---|
[6259] | 40 | {$template->assign( 'LLGBO_VERSION' , LLGBO_INFO_VERSION);} |
---|
| 41 | $me = get_plugin_data($plugin_id); |
---|
| 42 | $template->assign('LLGBOINFO',''); |
---|
[10453] | 43 | $template->assign('LLGBO_PATH',LLGBO_PATH); |
---|
[6259] | 44 | // |
---|
[6283] | 45 | $query =" SELECT ID FROM ".$prefixeTable."themes where id like '%gally%' " ; |
---|
[6259] | 46 | $result = pwg_query($query); |
---|
| 47 | while ($row = pwg_db_fetch_assoc($result)) |
---|
| 48 | { $template->assign( 'GALLY', 'Msg'); } |
---|
| 49 | // |
---|
[4524] | 50 | // +-----------------------------------------------------------------------+ |
---|
| 51 | // | Tabssheet |
---|
| 52 | // +-----------------------------------------------------------------------+ |
---|
| 53 | if (!isset($_GET['tab'])) |
---|
| 54 | { $page['tab'] = 'manage';} |
---|
| 55 | else |
---|
| 56 | {$page['tab'] = $_GET['tab'];} |
---|
| 57 | |
---|
| 58 | $tabsheet = new tabsheet(); |
---|
| 59 | $tabsheet->add('manage', |
---|
| 60 | l10n('llgbo_M_manage'), |
---|
| 61 | $my_base_url.'&tab=manage'); |
---|
[4603] | 62 | $disptabtooltip = 'false'; |
---|
[4574] | 63 | $disptabframe = 'false'; |
---|
| 64 | $disptabheader = 'false'; |
---|
[6259] | 65 | $tabsheet->select($page['tab']); |
---|
[4574] | 66 | if (!isset($_POST['llgbo_frame']) ) |
---|
| 67 | {$disptabframe = $conf['LLGBO_SETTINGS'][0] ;} |
---|
| 68 | else |
---|
| 69 | {$disptabframe = $_POST['llgbo_frame'];} |
---|
[4603] | 70 | |
---|
| 71 | if ((!isset($_POST['llgbo_tooltip_disp'])) or (!isset($_POST['llgbo_exifunderbt']) ) or ( !isset($_POST['llgbo_usemap_thumb']) )) |
---|
| 72 | { if (($conf['LLGBO_SETTINGS'][1] == 'true' ) or ($conf['LLGBO_SETTINGS'][2] == 'true') |
---|
| 73 | or ($conf['LLGBO_SETTINGS'][4] == 'true' )) |
---|
| 74 | { $disptabtooltip = 'true';} } |
---|
| 75 | else |
---|
| 76 | {if (($_POST['llgbo_tooltip_disp'] == 'true' ) or ($_POST['llgbo_exifunderbt'] == 'true') |
---|
| 77 | or ($_POST['llgbo_usemap_thumb'] == 'true' )) |
---|
| 78 | { $disptabtooltip = 'true';} } |
---|
| 79 | |
---|
| 80 | |
---|
[4574] | 81 | if (!isset($_POST['llgbo_header']) ) |
---|
| 82 | {$disptabheader = $conf['LLGBO_SETTINGS'][6] ;} |
---|
| 83 | else |
---|
| 84 | {$disptabheader = $_POST['llgbo_header'];} |
---|
[4524] | 85 | |
---|
[4603] | 86 | if ($disptabtooltip == 'true'){ |
---|
| 87 | $tabsheet->add('tooltip', |
---|
| 88 | l10n('llgbo_M_tooltip'), |
---|
| 89 | $my_base_url.'&tab=tooltip');} |
---|
| 90 | |
---|
| 91 | |
---|
[4574] | 92 | if (($disptabframe == 'true')) |
---|
[4524] | 93 | {$tabsheet->add('frame', |
---|
| 94 | l10n('llgbo_M_frame'), |
---|
| 95 | $my_base_url.'&tab=frame');} |
---|
[4574] | 96 | |
---|
| 97 | if (($disptabheader == 'true')) |
---|
| 98 | {$tabsheet->add('header', |
---|
| 99 | l10n('llgbo_M_header'), |
---|
| 100 | $my_base_url.'&tab=header');} |
---|
[4524] | 101 | |
---|
| 102 | $tabsheet->assign(); |
---|
| 103 | if ($page['tab'] == 'manage') |
---|
| 104 | {$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminsettings.tpl') );} |
---|
| 105 | if ($page['tab'] == 'tooltip') |
---|
| 106 | {$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_admintooltip.tpl') );} |
---|
| 107 | if ($page['tab'] == 'frame' ) |
---|
| 108 | {$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminframe.tpl') );} |
---|
[4574] | 109 | if ($page['tab'] == 'header' ) |
---|
| 110 | {$template->set_filenames( array('llgbo_admin_content' => dirname(__FILE__).'/llgbo_adminheader.tpl') );} |
---|
[4524] | 111 | $tabsheet->select($page['tab']); |
---|
[4293] | 112 | |
---|
[4524] | 113 | |
---|
[4293] | 114 | |
---|
[10453] | 115 | |
---|
[4293] | 116 | // Update configuration settings in database |
---|
[4524] | 117 | ////// SETTINGS |
---|
| 118 | if (($page['tab'] == 'manage') or ( !isset($_GET['tab']))){ |
---|
| 119 | if ( isset($_POST['submit']) ) |
---|
| 120 | { |
---|
| 121 | if (!isset($_POST['llgbo_frame'])) {$_POST['llgbo_frame'] = 'false';} |
---|
[4591] | 122 | if (!isset($_POST['llgbo_tooltip_disp'])) {$_POST['llgbo_tooltip_disp'] = 'false';} |
---|
[4524] | 123 | if (!isset($_POST['llgbo_exifunderbt'])) {$_POST['llgbo_exifunderbt'] = 'false';} |
---|
[14421] | 124 | if (!isset($_POST['llgbo_jquery'])) {$_POST['llgbo_jquery'] = 'false';} |
---|
| 125 | |
---|
[4524] | 126 | if (!isset($_POST['llgbo_usemap_thumb'])) {$_POST['llgbo_usemap_thumb'] = 'false';} |
---|
| 127 | if (!isset($_POST['llgbo_title_frame'])) {$_POST['llgbo_title_frame'] = 'false';} |
---|
| 128 | if (!isset($_POST['llgbo_header'])) {$_POST['llgbo_header'] = 'false';} |
---|
| 129 | if (!isset($_POST['llgbo_maintain_header'])) {$_POST['llgbo_maintain_header'] = '';} |
---|
| 130 | if (!isset($_POST['llgbo_allinfo'])) {$_POST['llgbo_allinfo'] = 'false';} |
---|
[14421] | 131 | if (!isset($_POST['llgbo_free'])) {$_POST['llgbo_free'] = 'false';} |
---|
[6241] | 132 | |
---|
[4603] | 133 | if (!isset($_POST['llgbo_always_displayexif'])) {$_POST['llgbo_always_displayexif'] = 'false';} //10 |
---|
[4524] | 134 | $param_llgbo = array($_POST['llgbo_frame'], |
---|
[4591] | 135 | $_POST['llgbo_tooltip_disp'], $_POST['llgbo_exifunderbt'], |
---|
[14421] | 136 | $_POST['llgbo_jquery'], $_POST['llgbo_usemap_thumb'], |
---|
[4524] | 137 | $_POST['llgbo_title_frame'], $_POST['llgbo_header'], |
---|
| 138 | $_POST['llgbo_maintain_header'], $_POST['llgbo_allinfo'], |
---|
[14421] | 139 | $_POST['llgbo_free'] ,$_POST['llgbo_always_displayexif'] |
---|
[4524] | 140 | ); |
---|
| 141 | $llgbo_new_value = implode ("," , $param_llgbo); |
---|
| 142 | $query = ' |
---|
| 143 | UPDATE ' . CONFIG_TABLE . ' |
---|
| 144 | SET value="'.$llgbo_new_value. '" |
---|
| 145 | WHERE param="LLGBO" |
---|
| 146 | LIMIT 1'; |
---|
| 147 | pwg_query($query); |
---|
| 148 | $template->assign('LLGBOINFO','llgbo_info'); |
---|
| 149 | $conf['LLGBO_SETTINGS'] = explode ("," ,$llgbo_new_value); |
---|
| 150 | } |
---|
[4603] | 151 | if ( isset($_POST['reset']) ) |
---|
| 152 | { $conf['LLGBO_SETTINGS'] = explode ("," ,$plugvalues);} |
---|
[4293] | 153 | |
---|
[4524] | 154 | // Reload settings for correct display after update |
---|
| 155 | if ($conf['LLGBO_SETTINGS'][0] == 'true') |
---|
| 156 | {$template->assign( 'LLGBO_FRAME' , 'true');} else {$template->assign( 'LLGBO_FRAME' , 'false');} |
---|
| 157 | if ($conf['LLGBO_SETTINGS'][1] == 'true') |
---|
| 158 | {$template->assign( 'LLGBO_TOOLTIP_DISP' , 'true');} else {$template->assign( 'LLGBO_TOOLTIP_DISP' , "false");} |
---|
| 159 | if ($conf['LLGBO_SETTINGS'][2] == 'true') |
---|
| 160 | {$template->assign('LLGBO_EXIFUNDERBT' , 'true');} else {$template->assign( 'LLGBO_EXIFUNDERBT' , "false");} |
---|
| 161 | if ($conf['LLGBO_SETTINGS'][3] == 'true') |
---|
[14421] | 162 | {$template->assign( array( 'LLGBO_JQUERY' => 'true'));} else { $template->assign( array( 'LLGBO_JQUERY' => "false"));} |
---|
[4524] | 163 | if ($conf['LLGBO_SETTINGS'][4] == 'true') |
---|
| 164 | {$template->assign( array( 'LLGBO_USEMAP_THUMB' => 'true'));} else { $template->assign( array( 'LLGBO_USEMAP_THUMB' => "false"));} |
---|
| 165 | if ($conf['LLGBO_SETTINGS'][5] == 'true') |
---|
| 166 | {$template->assign( array( 'LLGBO_TITLE_FRAME' => 'true'));} else { $template->assign( array( 'LLGBO_TITLE_FRAME' => "false"));} |
---|
| 167 | if ($conf['LLGBO_SETTINGS'][6] == 'true') |
---|
| 168 | {$template->assign( array( 'LLGBO_HEADER' => 'true'));} else { $template->assign( array( 'LLGBO_HEADER' => "false"));} |
---|
| 169 | $template->assign(array( 'LLGBO_MAINTAIN_HEADER' => $conf['LLGBO_SETTINGS'][7])); |
---|
| 170 | if ($conf['LLGBO_SETTINGS'][8] == 'true') |
---|
| 171 | {$template->assign(array( 'LLGBO_ALLINFO' => 'true'));} else { $template->assign( array( 'LLGBO_ALLINFO' => "false"));} |
---|
| 172 | if ($conf['LLGBO_SETTINGS'][9] == 'true') |
---|
[14421] | 173 | {$template->assign(array( 'LLGBO_FREE' => 'true'));} else { $template->assign(array( 'LLGBO_FREE' => "false"));} |
---|
[4603] | 174 | if ($conf['LLGBO_SETTINGS'][10] == 'true') |
---|
| 175 | {$template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => 'true'));} else { $template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => "false"));} |
---|
| 176 | |
---|
[10453] | 177 | } |
---|
[4524] | 178 | /////////////////////////////////////////////////////////////////////////////////////// |
---|
| 179 | //// TOOLTIP |
---|
| 180 | /////////////////////////////////////////////////////////////////////////////////////// |
---|
| 181 | if ($page['tab'] == 'tooltip') { |
---|
| 182 | if ( isset($_POST['save']) or isset($_POST['preview'])) |
---|
| 183 | { |
---|
| 184 | if (!isset($_POST['llgbo_tooltip_width'])) {$_POST['llgbo_tooltip_width'] = '150';} |
---|
| 185 | if (!isset($_POST['llgbo_tooltip_size'])) {$_POST['llgbo_tooltip_size'] = '2';} |
---|
| 186 | if (!isset($_POST['llgbo_tooltip_bordercolor'])) {$_POST['llgbo_tooltip_bordercolor'] = '#fff';} |
---|
| 187 | if (!isset($_POST['llgbo_tooltip_backgroundcolor'])) {$_POST['llgbo_tooltip_backgroundcolor'] = '#000';} |
---|
| 188 | if (!isset($_POST['llgbo_tooltip_titlecolor'])) {$_POST['llgbo_tooltip_titlecolor'] = '#c92';} |
---|
| 189 | if (!isset($_POST['llgbo_tooltip_color'])) {$_POST['llgbo_tooltip_color'] = '#dadada';} |
---|
| 190 | |
---|
| 191 | $param_llgbo_tooltip = array( |
---|
| 192 | $_POST['llgbo_tooltip_width'], $_POST['llgbo_tooltip_size'] , |
---|
| 193 | $_POST['llgbo_tooltip_bordercolor'], $_POST['llgbo_tooltip_backgroundcolor'], |
---|
| 194 | $_POST['llgbo_tooltip_titlecolor'], $_POST['llgbo_tooltip_color']); |
---|
| 195 | $llgbo_newtooltip_value = implode ("," , $param_llgbo_tooltip); |
---|
| 196 | |
---|
| 197 | if ( isset($_POST['save']) ) |
---|
| 198 | { $query = ' |
---|
| 199 | UPDATE ' . CONFIG_TABLE . ' |
---|
| 200 | SET value="'.$llgbo_newtooltip_value.'" |
---|
| 201 | WHERE param="LLGBOTOOLTIP" |
---|
| 202 | LIMIT 1'; |
---|
| 203 | pwg_query($query); |
---|
| 204 | $template->assign('LLGBOINFO','llgbo_info'); |
---|
| 205 | } |
---|
| 206 | $conf['LLGBO_TOOLTIP'] = explode ("," ,$llgbo_newtooltip_value); |
---|
| 207 | } |
---|
[4603] | 208 | |
---|
| 209 | if ( isset($_POST['reset']) ) |
---|
| 210 | { $conf['LLGBO_TOOLTIP'] = explode ("," ,$ttvalues);} |
---|
| 211 | |
---|
[4524] | 212 | // Reload settings for correct display after update |
---|
| 213 | if (isset($conf['LLGBO_TOOLTIP'][0])) {$template->assign(array( 'LLGBO_TOOLTIP_WIDTH' => $conf['LLGBO_TOOLTIP'][0]));} |
---|
| 214 | if (isset($conf['LLGBO_TOOLTIP'][1])) {$template->assign(array( 'LLGBO_TOOLTIP_SIZE' => $conf['LLGBO_TOOLTIP'][1]));} |
---|
| 215 | if (isset($conf['LLGBO_TOOLTIP'][2])) {$template->assign(array( 'LLGBO_TOOLTIP_BORDERCOLOR' => $conf['LLGBO_TOOLTIP' ][2]));} |
---|
| 216 | if (isset($conf['LLGBO_TOOLTIP'][3])) {$template->assign(array( 'LLGBO_TOOLTIP_BACKGROUNDCOLOR' => $conf['LLGBO_TOOLTIP'][3]));} |
---|
| 217 | if (isset($conf['LLGBO_TOOLTIP'][4])) {$template->assign(array( 'LLGBO_TOOLTIP_TITLECOLOR' => $conf['LLGBO_TOOLTIP'][4]));} |
---|
| 218 | if (isset($conf['LLGBO_TOOLTIP'][5])) {$template->assign(array( 'LLGBO_TOOLTIP_COLOR' => $conf['LLGBO_TOOLTIP'][5]));} |
---|
[10453] | 219 | $template ->assign ('stylett',' |
---|
| 220 | <! --- LLGBO tooltip css--> |
---|
| 221 | <style type="text/css"> |
---|
| 222 | div#toolTip {background:'.$conf['LLGBO_TOOLTIP'][3].';color:'.$conf['LLGBO_TOOLTIP'][5].';border:'.$conf['LLGBO_TOOLTIP'][1].'px solid '.$conf['LLGBO_TOOLTIP'][2].';padding:8px;min-height:1em; |
---|
| 223 | -moz-border-radius:20px;border-radius:20px;-moz-box-shadow: 0px 0px 35px '.$conf['LLGBO_TOOLTIP'][2].' inset ;-webkit-box-shadow:0px 0px 35px '.$conf['LLGBO_TOOLTIP'][2].' inset } |
---|
| 224 | div#toolTip p {margin:0;padding:0;color:'.$conf['LLGBO_TOOLTIP'][5].';font-size:0.8em;font-family:Verdana,Arial,Helvetica,sans-serif;text-align:left} |
---|
| 225 | div#toolTip p em {display:block;margin-top:3px;font-style:normal;font-weight:bold;text-align:left} |
---|
| 226 | div#toolTip p.title {color:'.$conf['LLGBO_TOOLTIP'][4].';text-align:center;padding:0 0 3px 0;} |
---|
| 227 | </style>'); |
---|
| 228 | } |
---|
[4293] | 229 | |
---|
[4524] | 230 | /////////////////////////////////////////////// |
---|
| 231 | ///// FRAME |
---|
| 232 | ///////////////////////////////////////////////// |
---|
| 233 | if ($page['tab'] == 'frame') { |
---|
| 234 | if ( isset($_POST['save']) or isset($_POST['preview'])) |
---|
| 235 | { |
---|
| 236 | if (!isset($_POST['llgbo_title_frame_color'])) {$_POST['llgbo_title_frame_color'] = '#16195f';} |
---|
| 237 | for ($i = 0 ;$i < 16 ; $i++) |
---|
| 238 | { if (!isset($_POST['llgbo_frame_bdcolor'.$i])) {$_POST['llgbo_frame_bdcolor'.$i] = '#fff' ;} |
---|
| 239 | if (!isset($_POST['llgbo_frame_bdsize'.$i])) {$_POST['llgbo_frame_bdsize'.$i] = '1' ;} |
---|
| 240 | } |
---|
| 241 | |
---|
| 242 | $param_llgbo_frame = array( |
---|
| 243 | $_POST['llgbo_title_frame_color'], |
---|
| 244 | $_POST['llgbo_frame_bdcolor0'], $_POST['llgbo_frame_bdsize0'], |
---|
| 245 | $_POST['llgbo_frame_bdcolor1'], $_POST['llgbo_frame_bdsize1'], |
---|
| 246 | $_POST['llgbo_frame_bdcolor2'], $_POST['llgbo_frame_bdsize2'], |
---|
| 247 | $_POST['llgbo_frame_bdcolor3'], $_POST['llgbo_frame_bdsize3'], |
---|
| 248 | $_POST['llgbo_frame_bdcolor4'], $_POST['llgbo_frame_bdsize4'], |
---|
| 249 | $_POST['llgbo_frame_bdcolor5'], $_POST['llgbo_frame_bdsize5'], |
---|
| 250 | $_POST['llgbo_frame_bdcolor6'], $_POST['llgbo_frame_bdsize6'], |
---|
| 251 | $_POST['llgbo_frame_bdcolor7'], $_POST['llgbo_frame_bdsize7'], |
---|
| 252 | $_POST['llgbo_frame_bdcolor8'], $_POST['llgbo_frame_bdsize8'], |
---|
| 253 | $_POST['llgbo_frame_bdcolor9'], $_POST['llgbo_frame_bdsize9'], |
---|
| 254 | $_POST['llgbo_frame_bdcolor10'], $_POST['llgbo_frame_bdsize10'], |
---|
| 255 | $_POST['llgbo_frame_bdcolor11'], $_POST['llgbo_frame_bdsize11'], |
---|
| 256 | $_POST['llgbo_frame_bdcolor12'], $_POST['llgbo_frame_bdsize12'], |
---|
| 257 | $_POST['llgbo_frame_bdcolor13'], $_POST['llgbo_frame_bdsize13'], |
---|
| 258 | $_POST['llgbo_frame_bdcolor14'], $_POST['llgbo_frame_bdsize14'], |
---|
| 259 | $_POST['llgbo_frame_bdcolor15'], $_POST['llgbo_frame_bdsize15'] |
---|
| 260 | ); |
---|
| 261 | $llgbo_newframe_value = implode ("," , $param_llgbo_frame); |
---|
| 262 | |
---|
| 263 | if ( isset($_POST['save']) ) |
---|
| 264 | { |
---|
| 265 | $query = ' |
---|
| 266 | UPDATE ' . CONFIG_TABLE . ' |
---|
| 267 | SET value="'.$llgbo_newframe_value.'" |
---|
| 268 | WHERE param="LLGBOFRAME" |
---|
| 269 | LIMIT 1'; |
---|
| 270 | pwg_query($query); |
---|
| 271 | $template->assign('LLGBOINFO','llgbo_info'); |
---|
| 272 | } |
---|
| 273 | $conf['LLGBO_FRAME'] = explode ("," ,$llgbo_newframe_value ); |
---|
[4293] | 274 | } |
---|
[4603] | 275 | if ( isset($_POST['reset']) ) |
---|
| 276 | { $conf['LLGBO_FRAME'] = explode ("," ,$frvalues );} |
---|
[4591] | 277 | if ( isset($_POST['previewsample']) ) |
---|
| 278 | { if (isset($_POST['sample'])) { //print_r($_POST); |
---|
| 279 | if ($_POST['sample'] == "GOLD") |
---|
| 280 | { $llgbo_sample = "#f6e1ac,#d0a641,2,#b08827,1,#f3ead8,5,#9c740e,1,#553b00,1,#5e4400,1,#684d07,1,#977424,1,#95772b,1,#896611,1,#674e13,3,#8e784b,1,#e0c992,2,#e8cb8b,1,#af9045,1,#8a6612,1";} |
---|
| 281 | if ($_POST['sample'] == "WHITE") |
---|
| 282 | { $llgbo_sample = "#16195f,#ffffff,3,#040404,1,#ffffff,7,#ffffff,1,#fdfdfd,1,#fcfcfc,1,#fafafa,1,#eaeaea,1,#d3d3d3,1,#bababa,1,#9f9f9f,1,#858585,1,#777777,1,#646464,1,#575757,1,#474747,1";} |
---|
| 283 | if ($_POST['sample'] == "BLACK") |
---|
| 284 | { $llgbo_sample = "#9f7a09,#090909,3,#fafafa,1,#0b0b0b,4,#0c0c0c,4,#1f1f20,1,#29292b,1,#343435,1,#3f3f41,1,#4a4a4b,1,#555557,1,#616163,1,#6d6d6e,1,#79797a,1,#848485,1,#919192,1,#9d9d9e,1";} |
---|
| 285 | if ($_POST['sample'] == "METAL") |
---|
| 286 | { $llgbo_sample = "#111111,#e8e8e8,2,#babdbf,1,#4a4c4d,3,#a3a7aa,2,#a8acaf,2,#adb2b4,1,#b3b8ba,1,#c0c4c6,2,#c6c9cc,1,#c8cbcd,1,#c5c9cb,1,#c9cdcf,1,#cdd1c2,1,#cdd1c2,1,#b1b3da,1,#666e83,1";} |
---|
| 287 | if ($_POST['sample'] == "BLUE") |
---|
| 288 | { $llgbo_sample = "#000000,#e8e8e8,2,#b6d0d5,1,#fafefe,9,#a3a7aa,1,#a8acaf,1,#404b54,1,#32403d,1,#b1b7c3,1,#4c5970,1,#303d4e,1,#566662,2,#96abb1,1,#737479,1,#d2d2d7,1,#6e716b,1,#5a5b5c,1";} |
---|
| 289 | if ($_POST['sample'] == "B_W") |
---|
| 290 | { $llgbo_sample = "#e8cb8b,#fcf6e9,11,#171112,9,#352c2d,1,#fcf6e9,1,#000000,3,#171112,3,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0";} |
---|
[16754] | 291 | if ($_POST['sample'] == "IVORY") |
---|
| 292 | { $llgbo_sample = "#16195f,#f4f4f4,4,#685008,1,#e0e0df,5,#d6d6d4,1,#cbcbca,1,#c0c0be,1,#b5b5b4,1,#aaaaa8,1,#9e9e9c,1,#929291,1,#868685,1,#7b7b7a,1,#6e6e6d,1,#626261,1,#555555,1,#4a4a4a,1";} |
---|
[4596] | 293 | if ($_POST['sample'] != "MY_LAST_VALUES") |
---|
| 294 | { $conf['LLGBO_FRAME'] = explode ("," ,$llgbo_sample ); } |
---|
| 295 | } |
---|
[4591] | 296 | } |
---|
| 297 | |
---|
[4524] | 298 | // FRAME |
---|
| 299 | if (isset($conf['LLGBO_FRAME'][0])) {$template->assign(array( 'LLGBO_TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0]));} |
---|
| 300 | for ($i = 0 ;$i < 16 ; $i++) |
---|
| 301 | { $x = 1 + ( 2 * $i); |
---|
| 302 | if (isset($conf['LLGBO_FRAME'][$x])) {$template->assign(array( 'LLGBO_FRAME_BDCOLOR'.$i => $conf['LLGBO_FRAME'][$x]));} |
---|
| 303 | if (isset($conf['LLGBO_FRAME'][$x+1])) {$template->assign(array( 'LLGBO_FRAME_BDSIZE'.$i => $conf['LLGBO_FRAME'][$x+1]));} |
---|
| 304 | } |
---|
| 305 | /// re draw frame after update |
---|
| 306 | Draw_frame(); |
---|
| 307 | } |
---|
[4574] | 308 | /////////////////////////////////////////////// |
---|
| 309 | ///// HEADER |
---|
| 310 | ///////////////////////////////////////////////// |
---|
| 311 | if ($page['tab'] == 'header') { |
---|
| 312 | if ( isset($_POST['submit'])) |
---|
| 313 | { if (!isset($_POST['llgbo_header_home'])) {$_POST['llgbo_header_home'] = 'true';} |
---|
| 314 | if (!isset($_POST['llgbo_header_category'])) {$_POST['llgbo_header_category'] = 'true';} |
---|
| 315 | if (!isset($_POST['llgbo_header_category_filter_recent'])) {$_POST['llgbo_header_category_filter_recent'] = 'true';} |
---|
| 316 | if (!isset($_POST['llgbo_header_category_flat'])) {$_POST['llgbo_header_category_flat'] = 'true';} |
---|
| 317 | if (!isset($_POST['llgbo_header_category_posted_monthly'])) {$_POST['llgbo_header_category_posted_monthly'] = 'true';} |
---|
| 318 | if (!isset($_POST['llgbo_header_picture'])) {$_POST['llgbo_header_picture'] = 'true';} |
---|
| 319 | if (!isset($_POST['llgbo_header_additional_page'])) {$_POST['llgbo_header_additional_page'] = 'true';} |
---|
| 320 | if (!isset($_POST['llgbo_header_most_visited'])) {$_POST['llgbo_header_most_visited'] = 'true';} |
---|
| 321 | if (!isset($_POST['llgbo_header_best_rated'])) {$_POST['llgbo_header_best_rated'] = 'true';} |
---|
| 322 | if (!isset($_POST['llgbo_header_list'])) {$_POST['llgbo_header_list'] = 'true';} |
---|
| 323 | if (!isset($_POST['llgbo_header_recent_pics'])) {$_POST['llgbo_header_recent_pics'] = 'true';} |
---|
| 324 | if (!isset($_POST['llgbo_header_created_monthly_calendar'])) {$_POST['llgbo_header_created_monthly_calendar'] = 'true';} |
---|
| 325 | if (!isset($_POST['llgbo_header_tags'])) {$_POST['llgbo_header_tags'] = 'true';} |
---|
| 326 | if (!isset($_POST['llgbo_header_search'])) {$_POST['llgbo_header_search'] = 'true';} |
---|
| 327 | if (!isset($_POST['llgbo_header_comments'])) {$_POST['llgbo_header_comments'] = 'true';} |
---|
| 328 | if (!isset($_POST['llgbo_header_about'])) {$_POST['llgbo_header_about'] = 'true';} |
---|
| 329 | if (!isset($_POST['llgbo_header_notification'])) {$_POST['llgbo_header_notification'] = 'true';} |
---|
| 330 | if (!isset($_POST['llgbo_header_register'])) {$_POST['llgbo_header_register'] = 'true';} |
---|
| 331 | if (!isset($_POST['llgbo_header_identification'])) {$_POST['llgbo_header_identification'] = 'true';} |
---|
| 332 | if (!isset($_POST['llgbo_header_favorites'])) {$_POST['llgbo_header_favorites'] = 'true';} |
---|
| 333 | if (!isset($_POST['llgbo_header_recent_cats'])) {$_POST['llgbo_header_recent_cats'] = 'true';} |
---|
[15076] | 334 | if (!isset($_POST['llgbo_header_thePiwiShackControllerPage'])) {$_POST['llgbo_header_thePiwiShackControllerPage'] = 'true';} |
---|
[4574] | 335 | |
---|
| 336 | $param_llgbo_header = array( |
---|
| 337 | $_POST['llgbo_header_home'], $_POST['llgbo_header_category'] , |
---|
| 338 | $_POST['llgbo_header_category_filter_recent'], $_POST['llgbo_header_category_flat'], |
---|
| 339 | $_POST['llgbo_header_category_posted_monthly'], $_POST['llgbo_header_picture'], |
---|
| 340 | $_POST['llgbo_header_additional_page'], $_POST['llgbo_header_most_visited'], |
---|
| 341 | $_POST['llgbo_header_best_rated'] , $_POST['llgbo_header_list'], |
---|
| 342 | $_POST['llgbo_header_recent_pics'], $_POST['llgbo_header_created_monthly_calendar'], |
---|
| 343 | $_POST['llgbo_header_tags'], $_POST['llgbo_header_search'], |
---|
| 344 | $_POST['llgbo_header_comments'], $_POST['llgbo_header_about'], |
---|
| 345 | $_POST['llgbo_header_notification'], $_POST['llgbo_header_register'], |
---|
| 346 | $_POST['llgbo_header_identification'], $_POST['llgbo_header_favorites'], |
---|
[15076] | 347 | $_POST['llgbo_header_recent_cats'], $_POST['llgbo_header_thePiwiShackControllerPage']); |
---|
[4574] | 348 | $llgbo_newheader_value = implode ("," , $param_llgbo_header); |
---|
| 349 | |
---|
| 350 | $query = ' |
---|
| 351 | UPDATE ' . CONFIG_TABLE . ' |
---|
| 352 | SET value="'.$llgbo_newheader_value.'" |
---|
| 353 | WHERE param="LLGBOHEADER" |
---|
| 354 | LIMIT 1'; |
---|
| 355 | pwg_query($query); |
---|
| 356 | $template->assign('LLGBOINFO','llgbo_info'); |
---|
| 357 | |
---|
| 358 | $conf['LLGBO_HEADER'] = explode ("," ,$llgbo_newheader_value); |
---|
| 359 | } |
---|
[4603] | 360 | if ( isset($_POST['reset']) ) |
---|
| 361 | { $conf['LLGBO_HEADER'] = explode ("," ,$headvalues);} |
---|
[4574] | 362 | // Reload settings for correct display after update |
---|
| 363 | if (isset($conf['LLGBO_HEADER'][0])) {$template->assign(array( 'LLGBO_HEADER_HOME' => $conf['LLGBO_HEADER'][0]));} |
---|
| 364 | if (isset($conf['LLGBO_HEADER'][1])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY' => $conf['LLGBO_HEADER'][1]));} |
---|
| 365 | if (isset($conf['LLGBO_HEADER'][2])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FILTER_RECENT' => $conf['LLGBO_HEADER' ][2]));} |
---|
| 366 | if (isset($conf['LLGBO_HEADER'][3])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_FLAT' => $conf['LLGBO_HEADER'][3]));} |
---|
| 367 | if (isset($conf['LLGBO_HEADER'][4])) {$template->assign(array( 'LLGBO_HEADER_CATEGORY_POSTED_MONTHLY' => $conf['LLGBO_HEADER'][4]));} |
---|
| 368 | if (isset($conf['LLGBO_HEADER'][5])) {$template->assign(array( 'LLGBO_HEADER_PICTURE' => $conf['LLGBO_HEADER'][5]));} |
---|
| 369 | if (isset($conf['LLGBO_HEADER'][6])) {$template->assign(array( 'LLGBO_HEADER_ADDITIONAL_PAGE' => $conf['LLGBO_HEADER'][6]));} |
---|
| 370 | if (isset($conf['LLGBO_HEADER'][7])) {$template->assign(array( 'LLGBO_HEADER_MOST_VISITED' => $conf['LLGBO_HEADER'][7]));} |
---|
| 371 | if (isset($conf['LLGBO_HEADER'][8])) {$template->assign(array( 'LLGBO_HEADER_BEST_RATED' => $conf['LLGBO_HEADER' ][8]));} |
---|
| 372 | if (isset($conf['LLGBO_HEADER'][9])) {$template->assign(array( 'LLGBO_HEADER_LIST' => $conf['LLGBO_HEADER' ][9]));} |
---|
| 373 | if (isset($conf['LLGBO_HEADER'][10])) {$template->assign(array( 'LLGBO_HEADER_RECENT_PICS' => $conf['LLGBO_HEADER'][10]));} |
---|
| 374 | if (isset($conf['LLGBO_HEADER'][11])) {$template->assign(array( 'LLGBO_HEADER_TAGS' => $conf['LLGBO_HEADER'][11]));} |
---|
| 375 | if (isset($conf['LLGBO_HEADER'][12])) {$template->assign(array( 'LLGBO_HEADER_CREATED_MONTHLY_CALENDAR' => $conf['LLGBO_HEADER'][12]));} |
---|
| 376 | if (isset($conf['LLGBO_HEADER'][13])) {$template->assign(array( 'LLGBO_HEADER_SEARCH' => $conf['LLGBO_HEADER'][13]));} |
---|
| 377 | if (isset($conf['LLGBO_HEADER'][14])) {$template->assign(array( 'LLGBO_HEADER_COMMENTS' => $conf['LLGBO_HEADER'][14]));} |
---|
| 378 | if (isset($conf['LLGBO_HEADER'][15])) {$template->assign(array( 'LLGBO_HEADER_ABOUT' => $conf['LLGBO_HEADER'][15]));} |
---|
| 379 | if (isset($conf['LLGBO_HEADER'][16])) {$template->assign(array( 'LLGBO_HEADER_NOTIFICATION' => $conf['LLGBO_HEADER' ][16]));} |
---|
| 380 | if (isset($conf['LLGBO_HEADER'][17])) {$template->assign(array( 'LLGBO_HEADER_REGISTER' => $conf['LLGBO_HEADER'][17]));} |
---|
| 381 | if (isset($conf['LLGBO_HEADER'][18])) {$template->assign(array( 'LLGBO_HEADER_IDENTIFICATION' => $conf['LLGBO_HEADER'][18]));} |
---|
| 382 | if (isset($conf['LLGBO_HEADER'][19])) {$template->assign(array( 'LLGBO_HEADER_FAVORITES' => $conf['LLGBO_HEADER'][19]));} |
---|
| 383 | if (isset($conf['LLGBO_HEADER'][20])) {$template->assign(array( 'LLGBO_HEADER_RECENT_CATS' => $conf['LLGBO_HEADER'][20]));} |
---|
[15076] | 384 | if (isset($conf['LLGBO_HEADER'][21])) {$template->assign(array( 'LLGBO_HEADER_THEPIWISHACKCONTROLLERPAGE' => $conf['LLGBO_HEADER'][21]));} |
---|
[4293] | 385 | |
---|
[4574] | 386 | } |
---|
| 387 | |
---|
[4524] | 388 | $template->assign_var_from_handle( 'ADMIN_CONTENT', 'llgbo_admin_content'); |
---|
| 389 | ////////////////////////// |
---|
| 390 | function Draw_frame() |
---|
| 391 | {global $conf ,$template; |
---|
| 392 | $bd = 0; |
---|
| 393 | $frame_begin =''; |
---|
| 394 | $frame_end=''; |
---|
| 395 | |
---|
| 396 | for ($i = 0 ;$i < 16 ; $i++) |
---|
| 397 | { $x = 1 + ( 2 * $i); |
---|
[4293] | 398 | |
---|
[4524] | 399 | if ((isset($conf['LLGBO_FRAME'][$x+1])) and ($conf['LLGBO_FRAME'][$x+1] > 0)) |
---|
| 400 | { $frame_begin = '<div id="gbo'.$i.'" style="border: '.$conf['LLGBO_FRAME'][$x+1].'px solid '.$conf['LLGBO_FRAME'][$x].'">'."\n".$frame_begin; |
---|
| 401 | $frame_end = $frame_end .' </div>'; } |
---|
[4293] | 402 | |
---|
[4524] | 403 | } |
---|
| 404 | $template->assign('FRAME_BEGIN', $frame_begin); |
---|
| 405 | $template->assign('FRAME_END', $frame_end); |
---|
| 406 | } |
---|
[4293] | 407 | ?> |
---|