Location: PHPKode > scripts > Lyrics Submitter > lyrics-submitter/index.php
<?php
/////////////////////////////////
//Lyrics submitter by jakez     /
//Email: hide@address.com/
//Website: http://www.jakez.net /
/////////////////////////////////
 
 include ("config.php");

 echo ($Style);

 echo ($sHeaderHTML);

 $sDirectory = (opendir($dirpath));
 $lCount = (0);
  while ($sFile = readdir($sDirectory))
   {
      $sFiles[$lCount] = $sFile;
      $lCount++;
   }

 sort($sFiles);
 unset ($lCount);
 
  for ($lCount; $lCount <= count($sFiles); $lCount++)
   {
      $sFileTemp = ($sFiles["$lCount"]);
      $sStrLen = (strlen($file));
      $sExtTemp = (substr($sFileTemp, $sStrLen - (3), 3));
        if ($sExtTemp == "txt")
          {
             $sFileTemp = str_replace(".txt","",$sFileTemp);
             $sFileArray = (explode("-", $sFileTemp));
               if ($sFileArray[0] != "" && $sFileArray[1] != "")
                {
                   echo ($sBeforeHTML . "<a href=\"$sFileArray[0]-$sFileArray[1].txt\">$sFileArray[0]</a>" . $sAfterHTML . $sBeforeHTML . "<a href=\"$sFileArray[0]-$sFileArray[1].txt\">$sFileArray[1]</a>" . $sAfterHTML . $sSplitHTML);
                }
          }
   }
 echo ($sFooterHTML);
?>
Return current item: Lyrics Submitter