Location: PHPKode > projects > NADIN > nadin_e/nadinmodule/reclist.inc.php
<?php 
require_once('config.inc.php');
require_once('nadinmodule/functions.inc.php');
auth('vreclist') ?>
<h3 id="alphabet"></h3>

<?php
$path='./library';
$tunes='';
$letter='';
$oldletter='';

if ($handle = @opendir($path))  { 
   while (false !== ($dir = readdir($handle)))  { 
      if (substr($dir,0,1)!='.') $tunes.=$dir.$delimiter;
      }
   }


$tunes=explode($delimiter,$tunes);

$bbrecs='';

for ($i=0;$i<count($tunes);$i++) {


$path='./library/'.$tunes[$i];

if ($handle = @opendir($path))  { 
   while (false !== ($file = readdir($handle)))  { 

      if (substr($file,0,3)==strtoupper($bb) || substr($file,0,3)==strtolower($bb) || substr($file,0,3)==strtoupper('xyz') || substr($file,0,3)==strtolower('xyz')) $bbrecs.=$file.'/'.$tunes[$i].$delimiter;
      }
   }

}

$bbrecs=explode($delimiter,$bbrecs);

rsort($bbrecs);

for ($i=0;$i<count($bbrecs);$i++) {

$letter=substr($bbrecs[$i],0,14);


if($letter!=$oldletter) echo '<br /><h4><a name="'.$letter.'"></a>'.str_replace(strtolower('xyz').'_','',str_replace(strtoupper('xyz').'_','',str_replace(strtolower($bb).'_','',str_replace(strtoupper($bb).'_','',$letter)))).'</h4>

  <script>  document.getElementById("alphabet").innerHTML=document.getElementById("alphabet").innerHTML+"<a href=#'.$letter.'>'.str_replace(strtolower('xyz').'_','',str_replace(strtoupper('xyz').'_','',str_replace(strtolower($bb).'_','',str_replace(strtoupper($bb).'_','',str_replace(' ','&nbsp;',str_replace('-','&#8209;',$letter)))))).'</a> &nbsp; ";

  </script>

';
$oldletter=$letter;


$rec=explode('/',$bbrecs[$i]);

if (role('upaudio')) $upnow='&nbsp;<span style="color:#eee;font-weight:bold;cursor:pointer" onmouseover="this.style.background=\'green\'" onmouseout="this.style.background=\'#fff\'" title="manage Infos, Links, Files in'."\n".htmlXspecialchars(strtoupper(str_replace('_',' ',$rec[1]))).'" onclick="f1=window.open(\'nadinmodule/uploadaudio.php?i='.$i.'&tune='.rawurlencode($rec[1]).'\',\'manage\',\'toolbar=0,location=0,status=1,top=0,left=500,menubar=0,scrollbars=1,resizable=1,width=800,height=800\');f1.focus()">&nbsp;&#9998;&nbsp;</span>';

if ($bbrecs[$i]!='') echo '<a id="'.mkid2($rec[1]).'" href="get/file.php?c='.str_replace('library/','',$path).$rec[1].'/'.$rec[0].'" target="_blank">'.str_replace($letter,'',$rec[0]).'</a>'.$upnow.'<br />';	
}

?>
Return current item: NADIN