3
/include/functions.php OK ??????
SOS
function lx_alphaArray ()
{
global $xoopsUser, $xoopsDB, $xoopsModule;
$alphabet = array ("0", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
"V", "W", "X", "Y", "Z");
$alpha = array();
$num = count($alphabet) - 1;
for ($a = 0; $a <= $num; $a++ )
{
$letterlinks = array();
$initial = $alphabet[$a];
$sql = $xoopsDB -> query ( "SELECT * FROM " . $xoopsDB ->
prefix ( "lxentries") . " WHERE init = '$initial' " );
$howmany = $xoopsDB -> getRowsNum( $sql );
$letterlinks['total'] = $howmany;
$letterlinks['id'] = $alphabet[$a];
$letterlinks['linktext'] = $alphabet[$a];
$alpha['initial'][] = $letterlinks;
}
return $alpha;
}