Changeset 21048


Ignore:
Timestamp:
02/26/13 20:50:37 (6 years ago)
Author:
flop25
Message:

-compatibility 2.5 (only)

Location:
extensions/music_player
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/music_player/admin/admin.php

    r14095 r21048  
    4444           ///on vérife si ils n'existe pas déjà 
    4545           $rep = pwg_query('SELECT COUNT(*) AS result FROM '.MP_PLAYLIST.' WHERE url IN (\''.$value.'\') ;'); 
    46        $res = mysql_fetch_array($rep); 
     46       $res = pwg_db_fetch_array($rep); 
    4747           if ($res['result']!=0) 
    4848           { 
     
    111111  /// v 1.2 on ne cree que pour les nouveaux 
    112112  $rep = pwg_query('SELECT COUNT(*) AS result FROM '.MP_PLAYLIST.' WHERE url IN (\''.$value.'\') ;'); 
    113   $res = mysql_fetch_array($rep); 
     113  $res = pwg_db_fetch_array($rep); 
    114114  if ($res['result']!=0) 
    115115  { 
     
    148148  ////[ maj de la bdd  
    149149  $result = pwg_query('SELECT id FROM '.MP_PLAYLIST.' WHERE url IN (\''.$value.'\') ;'); 
    150   $data = mysql_fetch_array($result); 
     150  $data = pwg_db_fetch_array($result); 
    151151  $query = ' 
    152152UPDATE '.MP_PLAYLIST.' 
     
    241241 
    242242    $result = pwg_query('SELECT id FROM '.MP_PLAYLIST.' WHERE url IN (\''.$_POST['url_'.$n.''].'\') ;'); 
    243     $data_pl = mysql_fetch_assoc($result); 
     243    $data_pl = pwg_db_fetch_assoc($result); 
    244244        $rang=1; 
    245245 
     
    283283          
    284284     $result = pwg_query('SELECT id FROM '.MP_PLAYLIST.' WHERE url=\''.$url.'\' ;'); 
    285      $data_pl = mysql_fetch_assoc($result); 
     285     $data_pl = pwg_db_fetch_assoc($result); 
    286286          
    287287     $filename="./plugins/music_player/music/externe/".$data_pl['id'].".php"; 
     
    312312$query = 'SELECT id, url, texte FROM '.MP_PLAYLIST.' WHERE type IN (\'local\') ORDER BY id ;'; 
    313313$result = pwg_query($query); 
    314 while ($row = mysql_fetch_assoc($result)) { 
     314while ($row = pwg_db_fetch_assoc($result)) { 
    315315    array_push($playlist, $row); 
    316316} 
     
    333333$query = 'SELECT id, url, texte FROM '.MP_PLAYLIST.' WHERE type IN (\'externe\') ORDER BY id ;'; 
    334334$result = pwg_query($query); 
    335 while ($row = mysql_fetch_assoc($result)) { 
     335while ($row = pwg_db_fetch_assoc($result)) { 
    336336    array_push($playlist, $row); 
    337337} 
     
    437437{ 
    438438        $rep = pwg_query('SELECT texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$conf_lecteur[7].'\') ;'); 
    439         $pl = mysql_fetch_array($rep); 
     439        $pl = pwg_db_fetch_array($rep); 
    440440        $txt=$pl['texte']; 
    441441} 
  • extensions/music_player/admin/admin_edit.php

    r10294 r21048  
    3232  $query = 'SELECT texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_GET['id'].'\') ;'; 
    3333  $result = pwg_query($query); 
    34   $data = mysql_fetch_assoc($result); 
     34  $data = pwg_db_fetch_assoc($result); 
    3535  $txt = stripslashes($data['texte']); 
    3636  $template->append('edit_txt', 
     
    8080  $query = 'SELECT url, texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_GET['ex_id'].'\') ;'; 
    8181  $result = pwg_query($query); 
    82   $data = mysql_fetch_assoc($result); 
     82  $data = pwg_db_fetch_assoc($result); 
    8383  $txt = stripslashes($data['texte']); 
    8484  $url = stripslashes($data['url']); 
     
    111111  $query = 'SELECT pl_id, nom, url FROM '.MP_MUSIC.' WHERE id IN (\''.$_GET['music_id'].'\') ;'; 
    112112  $result = pwg_query($query); 
    113   $data = mysql_fetch_assoc($result); 
     113  $data = pwg_db_fetch_assoc($result); 
    114114  $nom = stripslashes($data['nom']); 
    115115  $url = stripslashes($data['url']); 
     
    131131  $query = 'SELECT pl_id, url, rang FROM '.MP_MUSIC.' WHERE id IN (\''.$_POST['id'].'\') ;'; 
    132132  $result = pwg_query($query); 
    133   $suppr = mysql_fetch_assoc($result); 
     133  $suppr = pwg_db_fetch_assoc($result); 
    134134  $url = stripslashes($suppr['url']); 
    135135   
     
    142142 
    143143  $rep = pwg_query('SELECT MAX(rang) AS max FROM '.MP_MUSIC.' WHERE pl_id='.$suppr['pl_id'].';'); 
    144   $rang = mysql_fetch_assoc($rep); 
     144  $rang = pwg_db_fetch_assoc($rep); 
    145145 
    146146  $i = $suppr['rang'] + 1; 
    147147  while ($i<=$rang['max']) { 
    148148    $rep = pwg_query('SELECT COUNT(*) AS result FROM '.MP_MUSIC.' WHERE rang IN (\''.$i.'\') AND pl_id IN (\''.$suppr['pl_id'].'\') ;'); 
    149     $res = mysql_fetch_array($rep); 
     149    $res = pwg_db_fetch_array($rep); 
    150150    if ($res['result'] != 0) 
    151151    { 
    152152      $query = 'SELECT id FROM '.MP_MUSIC.' WHERE rang IN (\''.$i.'\') AND pl_id IN (\''.$suppr['pl_id'].'\') ;'; 
    153153      $result = pwg_query($query); 
    154           $meme = mysql_fetch_assoc($result); 
     154          $meme = pwg_db_fetch_assoc($result); 
    155155          $i_inf = $i - 1 ; 
    156156          $query = 'UPDATE '.MP_MUSIC.' SET rang=\''.$i_inf.'\' WHERE id IN (\''.$meme['id'].'\') ;'; 
     
    166166  $query = 'SELECT pl_id, nom FROM '.MP_MUSIC.' WHERE id IN (\''.$_GET['suppr'].'\') ;'; 
    167167  $result = pwg_query($query); 
    168   $data = mysql_fetch_assoc($result); 
     168  $data = pwg_db_fetch_assoc($result); 
    169169  $template->append('suppr', 
    170170                               array('ID'=>$_GET['suppr'], 
     
    237237{ 
    238238 $rep = pwg_query('SELECT MAX(rang) AS max FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].';'); 
    239  $rg = mysql_fetch_assoc($rep); 
     239 $rg = pwg_db_fetch_assoc($rep); 
    240240 for($i=1; $i <= $_POST['nbr'] ; $i++) 
    241241 { 
     
    252252      $query = 'SELECT id, rang FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].' AND rang>='.$rang.' ORDER BY rang ;'; 
    253253      $result = pwg_query($query); 
    254       while ($sup = mysql_fetch_assoc($result)){ 
     254      while ($sup = pwg_db_fetch_assoc($result)){ 
    255255           
    256256            $n_rang = $sup['rang'] + 1 ; 
     
    284284  $query = 'SELECT url FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_POST['id_playlist'].'\') ;'; 
    285285  $result = pwg_query($query); 
    286   $dt = mysql_fetch_assoc($result); 
     286  $dt = pwg_db_fetch_assoc($result); 
    287287 
    288288/////[ recup music  
     
    313313           //$rep = pwg_query('SELECT COUNT(*) AS result FROM '.MP_MUSIC.' WHERE pl_id='.$_POST['id_playlist'].' AND url REGEXP \''.$nom_fichier.'\' ;');like '%".$recherche."%'" 
    314314           $rep = pwg_query('SELECT COUNT(*) AS result FROM '.MP_MUSIC.' WHERE pl_id='.$_POST['id_playlist'].' AND url LIKE \'%'.$nom_fichier.'%\' ;'); 
    315        $res = mysql_fetch_array($rep); 
     315       $res = pwg_db_fetch_array($rep); 
    316316           if ($res['result']==0) 
    317317           { 
     
    324324   
    325325  $rep = pwg_query('SELECT MAX(rang) AS max FROM '.MP_MUSIC.' WHERE pl_id='.$_POST['id_playlist'].';'); 
    326   $rang = mysql_fetch_assoc($rep); 
     326  $rang = pwg_db_fetch_assoc($rep); 
    327327  $n=$rang['max']+1; 
    328328 
     
    350350  $query = 'SELECT * FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].' ORDER BY rang ;'; 
    351351  $result = pwg_query($query); 
    352   while ($music = mysql_fetch_assoc($result)){ 
     352  while ($music = pwg_db_fetch_assoc($result)){ 
    353353  $url = stripslashes($music['url']); 
    354354   
     
    371371  $query = 'SELECT url FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_POST['id_playlist'].'\') ;'; 
    372372  $result = pwg_query($query); 
    373   $dt = mysql_fetch_assoc($result); 
     373  $dt = pwg_db_fetch_assoc($result); 
    374374 
    375375  $query = 'SELECT * FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].' ORDER BY rang ;'; 
     
    383383      $_xml .="\t<trackList>\r\n"; 
    384384 
    385       while ($music = mysql_fetch_assoc($result)){ 
     385      while ($music = pwg_db_fetch_assoc($result)){ 
    386386            $nom_fichier=stripslashes($music['nom']); 
    387387            $url=stripslashes($music['url']); 
     
    408408  $query = 'SELECT texte FROM '.MP_PLAYLIST.' WHERE id='.$_GET['music'].' ;'; 
    409409  $result = pwg_query($query); 
    410   $playlist = mysql_fetch_assoc($result); 
     410  $playlist = pwg_db_fetch_assoc($result); 
    411411   
    412412  $txt = stripslashes($playlist['texte']); 
     
    418418 
    419419  $rep = pwg_query('SELECT MAX(rang) AS max FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].';'); 
    420   $rang = mysql_fetch_assoc($rep); 
     420  $rang = pwg_db_fetch_assoc($rep); 
    421421     
    422422  $query = 'SELECT * FROM '.MP_MUSIC.' WHERE pl_id='.$_GET['music'].' ORDER BY rang ;'; 
    423423  $result = pwg_query($query); 
    424424  $num=0; 
    425    while ($music = mysql_fetch_assoc($result)){ 
     425   while ($music = pwg_db_fetch_assoc($result)){ 
    426426    $music_url = stripslashes($music['url']); 
    427427    $music_nom = stripslashes($music['nom']); 
  • extensions/music_player/admin/admin_img.php

    r3329 r21048  
    1111  $query = 'SELECT url, texte FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_GET['id'].'\') ;'; 
    1212  $result = pwg_query($query); 
    13   $data = mysql_fetch_assoc($result); 
     13  $data = pwg_db_fetch_assoc($result); 
    1414 
    1515 
  • extensions/music_player/admin/admin_suppr.php

    r3329 r21048  
    2626  $query = 'SELECT type FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_POST['id'].'\') ;'; 
    2727  $result = pwg_query($query); 
    28   $typ = mysql_fetch_assoc($result); 
     28  $typ = pwg_db_fetch_assoc($result); 
    2929  if ($typ['type']=="local") 
    3030  { 
    3131    $query = 'SELECT url FROM '.MP_PLAYLIST.' WHERE id IN (\''.$_POST['id'].'\') ;'; 
    3232    $result = pwg_query($query); 
    33     $dt = mysql_fetch_assoc($result); 
     33    $dt = pwg_db_fetch_assoc($result); 
    3434    $filename="./plugins/music_player/music/".$dt['url']."/"; 
    3535    if (file_exists($filename)) 
  • extensions/music_player/lecteur.php

    r9590 r21048  
    1818SELECT COUNT(*) AS result FROM '.GROUPS_TABLE.' 
    1919  WHERE name IN (\'music_group\') ;'; 
    20 $data_grp = mysql_fetch_array(pwg_query($query)); 
     20$data_grp = pwg_db_fetch_array(pwg_query($query)); 
    2121$exist_group = $data_grp['result'];    
    2222if ( $exist_group == 1 ) 
     
    2626        $result = pwg_query($query); 
    2727        $grp_id = array(); 
    28         while ($row = mysql_fetch_assoc($result)) { 
     28        while ($row = pwg_db_fetch_assoc($result)) { 
    2929                array_push($grp_id, $row); 
    3030        } 
     
    3333        { 
    3434                $query = 'SELECT id FROM '.GROUPS_TABLE.' WHERE name IN (\'music_group\') ;'; 
    35                 $rep = mysql_fetch_array(pwg_query($query)); 
     35                $rep = pwg_db_fetch_array(pwg_query($query)); 
    3636                if ($rep['id']==$grp['group_id'] ) 
    3737                { 
     
    9696$query = 'SELECT url, texte FROM '.MP_PLAYLIST.' WHERE type IN (\'local\') ORDER BY id ;'; 
    9797$result = pwg_query($query); 
    98 while ($row = mysql_fetch_assoc($result)) { 
     98while ($row = pwg_db_fetch_assoc($result)) { 
    9999    array_push($playlist, $row); 
    100100} 
     
    112112$query = 'SELECT id, texte FROM '.MP_PLAYLIST.' WHERE type IN (\'externe\') ORDER BY id ;'; 
    113113$result = pwg_query($query); 
    114 while ($row = mysql_fetch_assoc($result)) { 
     114while ($row = pwg_db_fetch_assoc($result)) { 
    115115    array_push($pl_ex, $row); 
    116116} 
     
    175175{ 
    176176$rep = pwg_query('SELECT url FROM '.MP_PLAYLIST.' WHERE id IN (\''.$conf_lecteur[7].'\') ;'); 
    177 $pl = mysql_fetch_array($rep); 
     177$pl = pwg_db_fetch_array($rep); 
    178178$url=$pl['url']; 
    179179$url='music/'.$url.'/'.$url.'.xml'; 
  • extensions/music_player/maintain.inc.php

    r12583 r21048  
    5858          WHERE type="" 
    5959  ;'; 
    60   $data_table = mysql_fetch_array(pwg_query($query)); 
     60  $data_table = pwg_db_fetch_array(pwg_query($query)); 
    6161  $exist = $data_table['result']; 
    6262  if ( $exist != 0 ) 
     
    6767    ;'; 
    6868    $result = pwg_query($query); 
    69     while ($data = mysql_fetch_assoc($result)) 
     69    while ($data = pwg_db_fetch_assoc($result)) 
    7070    { 
    7171     $query = ' 
     
    8383WHERE param IN (\'mp_lecteur\') 
    8484;'; 
    85  $data_table = mysql_fetch_array(pwg_query($query)); 
     85 $data_table = pwg_db_fetch_array(pwg_query($query)); 
    8686 $exist = $data_table['result']; 
    8787 if ( $exist == 0 ) 
     
    9898WHERE param IN (\'mp_lecteur\') 
    9999;'; 
    100  $data_conf = mysql_fetch_array(pwg_query($query)); 
     100 $data_conf = pwg_db_fetch_array(pwg_query($query)); 
    101101 $conf=explode(',', $data_conf['value']); 
    102102 $nbr=count($conf); 
     
    119119          WHERE param IN (\'mp_plugin\') 
    120120          ;'; 
    121 $data_table = mysql_fetch_array(pwg_query($query)); 
     121$data_table = pwg_db_fetch_array(pwg_query($query)); 
    122122$exist = $data_table['result']; 
    123123  if ( $exist == 0 ) 
     
    134134    WHERE param IN (\'mp_plugin\') 
    135135    ;'; 
    136     $data_conf = mysql_fetch_array(pwg_query($query)); 
     136    $data_conf = pwg_db_fetch_array(pwg_query($query)); 
    137137    $conf=explode(',', $data_conf['value']); 
    138138    $nbr=count($conf); 
Note: See TracChangeset for help on using the changeset viewer.