Changeset 10294
- Timestamp:
- Apr 11, 2011, 2:04:35 PM (14 years ago)
- Location:
- extensions/music_player
- Files:
-
- 3 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; } -
extensions/music_player/admin/admin_edit.php
r6985 r10294 26 26 pwg_query($query); 27 27 $page['infos'][]=l10n('mp_msg_edit1'); 28 //$mp_msgs[] = $lang['mp_msg_edit1'];29 28 30 29 } … … 139 138 $filename="./plugins/music_player/".$url; 140 139 unlink($filename); 141 //$mp_msgs[] = $lang['mp_msg_edit5'].$url;142 140 $page['infos'][]=l10n('mp_msg_edit5').$url; 143 141 } … … 162 160 }//while 163 161 pwg_query('DELETE FROM '.MP_MUSIC.' WHERE id IN (\''.$_POST['id'].'\')'); 164 // $mp_msgs[] = $lang['mp_msg_edit4'].$url;165 162 $page['infos'][]=l10n('mp_msg_edit4').$url; 166 163 } … … 215 212 pwg_query($query); 216 213 217 //$mp_msgs[] = $lang['mp_msg_edit3'];218 214 $page['infos'][]=l10n('mp_msg_edit3'); 219 215 } … … 275 271 ;'; 276 272 pwg_query($query); 277 //$mp_msgs[] = $lang['mp_msg_admin_4'].$url;278 273 $page['infos'][]=l10n('mp_msg_admin_4').$url; 279 274 } … … 364 359 $music['url']=addslashes($music['url']); 365 360 pwg_query('DELETE FROM '.MP_MUSIC.' WHERE url IN (\''.$music['url'].'\')'); 366 //$mp_msgs[] = $lang['mp_msg_edit4'].$url;367 361 $page['infos'][]=l10n('mp_msg_edit4').$url; 368 362 } … … 406 400 } 407 401 fwrite($file, $_xml); 408 409 // $mp_msgs[] = $lang['mp_msg_edit2'];410 402 $page['infos'][]=l10n('mp_msg_edit2'); 411 403 } … … 479 471 480 472 // +-----------------------------------------------------------------------+ 481 // | affichage des msg | 482 // +-----------------------------------------------------------------------+ 483 /* 484 if (count($mp_msgs) > 0) 485 { 486 $template->append('mp_msgs',array()); 487 foreach ($mp_msgs as $mp_msg) 488 { 489 $template->append('mp_msgs.mp_msg', 490 array('MP_MSG'=>$mp_msg)); 491 } 492 } 493 */ 473 // | affichage | 474 // +-----------------------------------------------------------------------+ 494 475 $template->set_filename('plugin_admin_content', $m_p->plugin_path.'template/admin_edit.tpl'); 495 476 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); -
extensions/music_player/template/admin_edit.tpl
r3329 r10294 5 5 <h2>Music player / {$PLAYLIST}</h2> 6 6 </div> 7 <!--8 <div class="header_msgs">9 <p>mp_msgs.mp_msg.MP_MSG</p>10 </div>11 -->12 7 {foreach from=$edit_txt item=edit_txt} 13 8 <form action="" method="post" name="edit_txt">
Note: See TracChangeset
for help on using the changeset viewer.