Bonjour,
Depuis, j'ai installé un site que j'ai acheter ( le site de SARP pour ceux qui connaissent ) , mais dès que je vais sur mon site , j'ai cette erreur :
Fatal error: Cannot redeclare profil_sanctions() (previously declared in /home/cvrprcra/public_html/functions/profil_sanctions().php:8) in /home/cvrprcra/public_html/functions/profil_sanctions().php on line 63
Voici le fichier profil_sanctions.php :
Je suis un débutant en php.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 <?php /* profil_sanctions().php */ function profil_sanctions() { $rSanctions = mysql_query("SELECT * FROM `srp_log_sanctions` WHERE `player`='".$_SESSION['login']."' ORDER BY `time` DESC LIMIT 50"); if(isset($_GET['p'])) $rSanctions = mysql_query("SELECT * FROM `srp_log_sanctions` WHERE `player`='".$_SESSION['login']."' ORDER BY `time` LIMIT ".$_GET['p'].", ".($_GET['p']+20)); else $rSanctions = mysql_query("SELECT * FROM `srp_log_sanctions` WHERE `player`='".$_SESSION['login']."' ORDER BY `time` LIMIT 0,20"); $dNbreJoueur = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS `nbreJoueur` FROM `srp_log_sanctions` WHERE `player`='".$_SESSION['login']."'")); if($dNbreJoueur['nbreJoueur'] > 20) { $pages = ''; for($i = 1; $i <= round(($dNbreJoueur['nbreJoueur']/20), 0); $i++) { if($i == 1 and isset($_GET['p']) and $i == (($_GET['p']/20)+1)) $pages .= '1'; elseif($i == 1) $pages .= '<a href="profil.php?do=sanctions&p=0">1</a>'; elseif(isset($_GET['p']) and $i == (($_GET['p']/20)+1)) $pages .= ' - '.$i; else $pages .= ' - <a href="profil.php?do=sanctions&p='.(($i-1)*20).'">'.$i.'</a>'; } } else $pages = '1'; $return = ''; while($dSanctions = mysql_fetch_array($rSanctions)) { $return .= ' <tr> <td>'.$dSanctions['type'].'</td> <td>'.$dSanctions['admin'].'</td> <td>'.$dSanctions['reason'].'</td> <td>'.date("d/m/Y - H:i", $dSanctions['time']).'</td> <td>'.$dSanctions['ip'].'</td> </tr>'; } if($return == '') return site_show('Sanctions', 'Tu n\'as aucune sanction !','sanctions'); return site_show('Sanctions', '<center><strong>Sanctions</strong> <table class="Stats"> <tr> <td><strong>Type</strong></td> <td><strong>Admin</strong></td> <td><strong>Raison</strong></td> <td><strong>Date/Heure</strong></td> <td><strong>IP</strong></td> </tr> '.$return.'</table><br>'.$pages.'</center>', 'sanctions'); } ?>
Merci de m'aider
Au revoir
Partager