Tigrigna
$count=0;
$arraystring="";
$array04="";
$dir_name = "./.";
$dir = opendir($dir_name);
while ($file_name = readdir($dir)) {
if (($file_name != "." && $file_name != ".."))
{
if (substr($file_name,-6) == '04.ram' || substr($file_name,-5) == '04.rm'){
$array04 .= "$file_name,";
}else{
$arraystring .= "$file_name,";
}
$count++;
}
}
function cmp ($a, $b) {
$tmp[0]=strtoupper($a);
$tmp[1]=strtoupper($b);
rsort($tmp);
#sort($tmp);
return (strcmp(strtoupper($tmp[1]) , strtoupper($b))) ? 1 : -1;
}
$arraystring = substr($arraystring,0,-1);
$array04 = substr($array04,0,-1);
for($i=0;$i<$count;$i++){
$linksrc[$i] = explode(",",$arraystring);
$linksr4[$i] = explode(",",$array04);
}
usort($linksrc[0], "cmp");
usort($linksr4[0], "cmp");
for($t=0;$t$nsource ";
}
}
echo " ";
for($j=0;$j$nsource ";
}
}
closedir($dir);
?>
|
English
$count=0;
$arraystring="";
$array04="";
$dir_name = "./english/.";
$dir = opendir($dir_name);
while ($file_name = readdir($dir)) {
if (($file_name != "." && $file_name != ".."))
{
if (substr($file_name,-6) == '04.ram' || substr($file_name,-5) == '04.rm'){
$array04 .= "$file_name,";
}else{
$arraystring .= "$file_name,";
}
$count++;
}
}
$arraystring = substr($arraystring,0,-1);
$array04 = substr($array04,0,-1);
for($i=0;$i<$count;$i++){
$linksrc[$i] = explode(",",$arraystring);
$linksr4[$i] = explode(",",$array04);
}
usort($linksrc[0], "cmp");
usort($linksr4[0], "cmp");
for($t=0;$t$nsource ";
}
}
echo " ";
for($j=0;$j$nsource ";
}
}
closedir($dir);
?>
|
Amharic
$count=0;
$arraystring="";
$array04="";
$dir_name = "./amharic/.";
$dir = opendir($dir_name);
while ($file_name = readdir($dir)) {
if (($file_name != "." && $file_name != ".."))
{
if (substr($file_name,-6) == '04.ram' || substr($file_name,-5) == '04.rm'){
$array04 .= "$file_name,";
}else{
$arraystring .= "$file_name,";
}
$count++;
}
}
$arraystring = substr($arraystring,0,-1);
$array04 = substr($array04,0,-1);
for($i=0;$i<$count;$i++){
$linksrc[$i] = explode(",",$arraystring);
$linksr4[$i] = explode(",",$array04);
}
usort($linksrc[0], "cmp");
usort($linksr4[0], "cmp");
for($t=0;$t$nsource ";
}
}
echo " ";
for($j=0;$j$nsource ";
}
}
closedir($dir);
?>
|