if(empty($arry)){
$sql2 = "SELECT age FROM member WHERE logname = '".$_session[user_login]."' AND pw = '".$_session[pass_login]."'";
$result2 = mysql_query($sql2);
{
if ($result2 <= $k){
$qr1 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '15' AND age <= '20'";
$qrs1 = mysql_query($qr1);
$arry = mysql_fetch_array($qrs1);
$index1 = array_search(max($arry),$arry);
slider($index1);
} else if ($result2 <= $l){
$qr2 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '21' AND age <= '25'";
$qrs2 = mysql_query($qr2);
$arry = mysql_fetch_array($qrs2);
$index2 = array_search(max($arry),$arry);
slider($index2);
} else if ($result2 <= $m){
$qr3 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '26' AND age <= '30'";
$qrs3 = mysql_query($qr3);
$arry = mysql_fetch_array($qrs3);
$index3= array_search(max($arry),$arry);
slider($index3);
} else if ($result2 <= $n){
$qr4 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '31' AND age <= '35'";
$qrs4 = mysql_query($qr4);
$arry = mysql_fetch_array($qrs4);
$index4 = array_search(max($arry),$arry);
slider($index4);
} else if ($result2 <= $o){
$qr5 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '36' AND age <= '40'";
$qrs5 = mysql_query($qr5);
$arry = mysql_fetch_array($qrs5);
$index5 = array_search(max($arry),$arry);
slider($index5);
} else if ($result2 <= $p){
$qr6 = "SELECT sum(gload1) as 'g1',sum(gload2) as 'g2',sum(gload3) as 'g3',sum(gload4) as 'g4',sum(gload5) as 'g5',sum(gload6) as 'g6',sum(gload7) as 'g7',sum(gload8) as 'g8',sum(gload9) as 'g9',sum(gload10) as 'g10' FROM member WHERE age >= '41' AND age <= '45'";
$qrs6 = mysql_query($qr6);
$arry = mysql_fetch_array($qrs6);
$index6 = array_search(max($arry),$arry);
slider($index6);
}else {
$index = array_search(max($arry),$arry);
if($index == $a)
{
echo "<img src=images/01/01.jpg>";
echo "<img src=images/01/02.jpg>";
echo "<img src=images/01/03.jpg>";
echo "<img src=images/01/04.jpg>";
}else if($index == $b){
echo "<img src=images/02/01.jpg>";
echo "<img src=images/02/02.jpg>";
echo "<img src=images/03/03.jpg>";
echo "<img src=images/04/04.jpg>";
}else if($index == $c){
echo "<img src=images/03/01.jpg>";
echo "<img src=images/03/02.jpg>";
echo "<img src=images/03/03.jpg>";
echo "<img src=images/03/04.jpg>";
}else if($index == $d){
echo "<img src=images/04/01.jpg>";
echo "<img src=images/04/02.jpg>";
echo "<img src=images/04/03.jpg>";
echo "<img src=images/04/04.jpg>";
}else if($index == $e){
echo "<img src=images/05/01.jpg>";
echo "<img src=images/05/02.jpg>";
echo "<img src=images/05/03.jpg>";
echo "<img src=images/05/04.jpg>";
}else if($index == $f){
echo "<img src=images/06/01.jpg>";
echo "<img src=images/06/02.jpg>";
echo "<img src=images/06/03.jpg>";
echo "<img src=images/06/04.jpg>";
}else if($index == $g){
echo "<img src=images/07/01.jpg>";
echo "<img src=images/07/02.jpg>";
echo "<img src=images/07/03.jpg>";
echo "<img src=images/07/04.jpg>";
}else if($index == $h){
echo "<img src=images/08/01.jpg>";
echo "<img src=images/08/02.jpg>";
echo "<img src=images/08/03.jpg>";
echo "<img src=images/08/04.jpg>";
}else if($index == $i){
echo "<img src=images/09/01.jpg>";
echo "<img src=images/09/02.jpg>";
echo "<img src=images/09/03.jpg>";
echo "<img src=images/09/04.jpg>";
}else if($index == $j){
echo "<img src=images/10/01.jpg>";
echo "<img src=images/10/02.jpg>";
echo "<img src=images/10/03.jpg>";
echo "<img src=images/10/04.jpg>";