<?php
// ---------------------------------------------------------------
// KwsPHP kOoGar Web System
// $Id: pied_de_module.php 815 2008-11-03 12:38:55Z mike007.devpwsphp $
// ---------------------------------------------------------------
// Creation par FouPouDave
// ---------------------------------------------------------------
if ($sponsor>0 and is_module('sponsor'

)
{
$req = reqmysql('
SELECT *
FROM `sponsor`
WHERE `aff` = "1"
AND `type`= "modules"
ORDER BY '.($sponsor==1 ? 'rand()' : '`id`'

.' ASC
'.($sponsor==1 ? 'LIMIT 1' : ''

.'
'

;
$texte_pied = '<p style="text-align:center">';
if (mysql_num_rows($req) == 0)
{
$texte_pied .= $sponsor_txt_pied;
}
else
{
while ($rep = mysql_fetch_object($req))
{
$texte_pied .= $rep->code.'<br /> <br />';
}
}
$texte_pied .= '</p>';
echo '<div style="clear:both;">';
open_table();
echo '<p class="pied_de_module">
'.$texte_pied.'
</p>';
close_table();
echo '</div>';
}
if (!empty($_REQUEST['mod']) && get_grade('piedModule', 'admin'

>= GRD_VISIT)
{
echo '<div style="clear:both;">';
open_table();
echo '<p class="pied_de_module">
<a href="'.($_REQUEST['xss_retour']=='' ? 'javascript:history.go(-1)' : $_REQUEST['xss_retour']).'">Retour</a>
'.(get_grade()>=GRD_MODOG ? '<a href="index.php?mod=espace_membre&ac=login">Administration</a> ' : ''

.'
'.((get_grade()>=GRD_MODOG and file_exists('modules/'.$K_mod.'/gestion.php'

and ($K_ac!='gestion' or isset($_REQUEST['action']))) ? '<a href="index.php?mod='.$K_mod.'&ac=gestion">Gestion</a> ' : ''

.'
'.(file_exists('modules/'.$K_mod.'/index.php'

? '<a href="index.php?mod='.$K_mod.'">Page principale</a> ' : ''

.'
'.(file_exists('modules/'.$K_mod.'/aide.php'

? '<a href="index.php?mod='.$K_mod.'&ac=aide">Aide</a> ' : ''

.'
<a href="index.php">Accueil</a>
</p>';
close_table();
echo '</div>';
}
?>