Просмотр файла script/lang_list.php

Размер файла: 1.1Kb
<?php
/*-----------------------------------------------------------------------------------------
mcGalleryPRO
All code is © 2003 Marc Cagninacci.
No files may be redistributed in whole or significant part.
----------------- mcgalleryPRO IS NOT FREE SOFTWARE -------------------
You should have receive a file called license.txt in this package
--------------------------------------------------------------------------------------------*/

         $aryLangs = array();
         $dirCurrent = dir('./lang');
         while($strFile = $dirCurrent->read()) {
           if (is_file('./lang/'.$strFile)) {
             $aryLangs[] = $strFile;
           }
         }
         $dirCurrent->close();

         if (count($aryLangs) > 1) { sort ($aryLangs); }

         $file = current($aryLangs);
         while ($file)
		  {
             $text = str_replace('.php','',$file);
             echo '<a href="index.php?language='.$text.'">';
             echo '<img src="images/'.$text.'.gif" border="0" alt="'.ucwords($text).'"></a>';
			 echo "\n";
           $file = next($aryLangs);
         }

?>