<?


    $dummy = 0;
    incoh();
    GraphicAdmin();
    MainMenu();
    Max_OpenTable();
    $result1 = $db->sql_query("SELECT id_aide, user_name_aide, time, aide_probleme FROM ".$prefix."_nsnhelp_help  order by time DESC");
    if (!$db->sql_numrows($result)){
    echo "<center><font class=\"content\"><b>"._NO_HELP."</b></center>\n";
    }
    else {
    echo "<center><font class=\"content\"><b>"._LIST_HELP."</b></font><br /><br />$addFonction<table width=\"100%\" border=\"1\" bgcolor=\"\">\n";
    echo "<tr><td bgcolor=\"#01FF13\">"._NO_CONSULTER."</td><td bgcolor=\"#F0BA38\">"._YA_CONSULT."</td><td bgcolor=\"#FF0000\">"._PROBLEM_CONSULT."</td><tr></table><table width=\"100%\" border=\"1\" bgcolor=\"\">\n";
    while (list($id_aide, $user_name_aide, $timehelp, $aide_probleme) = $db->sql_fetchrow($result1)) {
    $result2 = $db->sql_query("SELECT count(*) FROM ".$prefix."_nsnhelp_admin where id_aide='$id_aide'");
    $nbTotal = mysql_fetch_array($result2);
    $nbParCat = $nbTotal[0];
    $dadate = BenDate($timehelp, $currentlang);
    if($aide_probleme == 0){$color = "#01FF13";} elseif ($aide_probleme == 1){$color = "#F0BA38";} else {$color = "#FF0000";}
    if($radminsuper == 1){
    echo "<form action=\"".$admin_file.".php?op=DeleteAide\" method=\"post\">";
    echo "<input type=\"hidden\" name=\"id_aide\" value=\"$id_aide\">";
    $td= "<input type=\"submit\" value=\""._SUPPRIMER."\"></td></form>";
    }
    else {
    $td = "&nbsp;&nbsp;&nbsp;";}	
    echo "<tr>\n"
    ."<td bgcolor=\"$color\">$td</td>\n"
    ."<td width=\"50%\"><font class=\"content\">\n";
    echo "<form action=\"".$admin_file.".php?op=DisplayAide\" method=\"post\">";
    echo "&nbsp;<input type=\"submit\" value=\"$user_name_aide\">";
	echo "<input type=\"hidden\" name=\"id_aide\" value=\"$id_aide\"> | $nbParCat Commentaire(s) | </font>\n";
	echo "</td><td align=\"left\"><font class=\"content\">$dadate</font></td></tr></form>\n";
    $dummy++;
    }
    if ($dummy < 1) {
    echo "<tr><td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._NOSUBMISSIONS."</b></form></td></tr></table>\n";
    } else
    {
    echo "</table></form>\n";
    }
    }
    Max_CloseTable();
    $db->sql_freeresult($result1);
    $db->sql_freeresult($result2);
    incof();

?>
