Changeset 10294 for extensions/music_player/admin/admin.php
- Timestamp:
- Apr 11, 2011, 2:04:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/music_player/admin/admin.php
r6985 r10294 357 357 $conf_plugin = explode("," , $conf['mp_plugin']); 358 358 359 ////envoi 359 // +-----------------------------------------------------------------------+ 360 // | changement de config | 361 // +-----------------------------------------------------------------------+ 360 362 if (isset($_POST['envoi_config']) ){ 361 363 if ($_POST['envoi_config']=='lecteur') 362 364 { 363 if ( $_POST['style']=='NULL')365 if (isset($_POST['style']) and $_POST['style']=='NULL') 364 366 { 365 367 $style=$conf_lecteur['9']; … … 370 372 } 371 373 372 if ( $_POST['mp_miniature']=="true")374 if (isset($_POST['mp_miniature']) and $_POST['mp_miniature']=="true") 373 375 { 374 $conf_lecteur = array( 375 $_POST['h_tt'], 376 $_POST['l_tt'], 377 $_POST['h'], 378 $_POST['mp_miniature'], 379 $_POST['l'], 380 $_POST['mp_shuffle'], 381 $_POST['mp_repeat'], 382 $_POST['mp_autostart'], 383 $_POST['mp_autoscroll'], 384 $style, 385 $_POST['various_style'], 386 ); 376 $h = $_POST['h_tt']; 387 377 } 388 378 else 389 379 { 390 380 $h = $_POST['h_tt'] - 20;//pour un affichage correct la playlist doit faire la hauteur totale moins les 20px de la barre 391 $conf_lecteur = array(392 $_POST['h_tt'],393 $_POST['l_tt'],394 $h,395 $_POST['mp_miniature'],396 '0',397 $_POST['mp_shuffle'],398 $_POST['mp_repeat'],399 $_POST['mp_autostart'],400 $_POST['mp_autoscroll'],401 $style,402 $_POST['various_style'],403 );404 381 } 405 $newconf_lecteur = implode ("," , $conf_lecteur); 382 383 $newconf_lecteur = (isset($_POST['h_tt']) and !empty($_POST['h_tt'])) ? $_POST['h_tt'] : '148'; 384 $newconf_lecteur .= (isset($_POST['l_tt']) and !empty($_POST['l_tt'])) ? ','.$_POST['l_tt'] : ',300'; 385 $newconf_lecteur .= (isset($_POST['h_tt']) and !empty($_POST['h_tt'])) ? ','.$h : ',128'; 386 $newconf_lecteur .= (isset($_POST['mp_miniature'])) ? ',true' : ',false'; 387 if (!isset($_POST['l']) or empty($_POST['l'])) 388 { 389 $newconf_lecteur .= ',128'; 390 } 391 elseif (isset($_POST['mp_miniature']) and $_POST['mp_miniature']=="true") 392 { 393 $newconf_lecteur .= ','.$_POST['l']; 394 } 395 else 396 { 397 $newconf_lecteur .= ',0'; 398 } 399 $newconf_lecteur .= (isset($_POST['mp_shuffle'])) ? ',true' : ',false'; 400 $newconf_lecteur .= (isset($_POST['mp_repeat'])) ? ',true' : ',false'; 401 $newconf_lecteur .= ','.$_POST['mp_autostart']; 402 $newconf_lecteur .= (isset($_POST['mp_autoscroll'])) ? ',true' : ',false'; 403 $newconf_lecteur .= ','.$style; 404 $newconf_lecteur .= (isset($_POST['various_style'])) ? ',true' : ',false'; 406 405 $query = ' 407 406 UPDATE '.CONFIG_TABLE.' … … 417 416 if ($_POST['envoi_config']=='plugin' or isset($_POST['foot'])) 418 417 { 419 $conf_plugin = array( 420 $_POST['evidence'], 421 $_POST['head'], 422 $_POST['foot'], 423 $_POST['h_pop'], 424 $_POST['l_pop'], 425 ); 426 $newconf_plugin = implode ("," , $conf_plugin); 418 $newconf_plugin = (isset($_POST['evidence'])) ? 'true' : 'false'; 419 $newconf_plugin .= (isset($_POST['head'])) ? ',true' : ',false'; 420 $newconf_plugin .= (isset($_POST['foot'])) ? ',true' : ',false'; 421 $newconf_plugin .= (isset($_POST['h_pop']) and !empty($_POST['h_pop'])) ? ','.$_POST['h_pop'] : ',260'; 422 $newconf_plugin .= (isset($_POST['l_pop']) and !empty($_POST['l_pop'])) ? ','.$_POST['l_pop'] : ',400'; 427 423 $query = ' 428 424 UPDATE '.CONFIG_TABLE.' … … 437 433 } 438 434 load_conf_from_db(); 439 435 $conf_lecteur = explode("," , $conf['mp_lecteur']); 436 $conf_plugin = explode("," , $conf['mp_plugin']); 440 437 $check='checked="checked"'; 441 438 if ($conf_lecteur[3]=='true') { $miniature=$check; } else { $miniature=NULL; }
Note: See TracChangeset
for help on using the changeset viewer.