NOUVELLE VERSION !!! Des nouvelles classes de partout, et des supers procédures SQL.
This commit is contained in:
+17
-6
@@ -1,6 +1,19 @@
|
||||
<?php
|
||||
session_start ();
|
||||
include_once 'clazz/Zincluder.php';?>
|
||||
include_once 'clazz/Zincluder.php';
|
||||
|
||||
try{
|
||||
|
||||
$discuts = Discussion::getVisibleDiscuts($_SESSION['session_id'] ?? NULL,$_SESSION['session_mdp'] ?? NULL);
|
||||
|
||||
}catch(SQLProcessingException $e){
|
||||
var_dump($e);
|
||||
echo $e->getHtmlMessage();
|
||||
$_SESSION ['current_error'] = $e->getHtmlMessage();
|
||||
header ( 'Location:' . ($e->getPreferredRedirection() ?? 'index.php') );
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -12,10 +25,8 @@ include_once 'clazz/Zincluder.php';?>
|
||||
<br />
|
||||
|
||||
<?php
|
||||
$me = Membre::me();
|
||||
$discs = $me?Discussion::getWhichHeCanAccess($me):Discussion::getPublics();
|
||||
foreach ($discs as $disc) {
|
||||
echo '<a href="discut.php?d=' . $disc->getID() . '">' . $disc->getName() . ' par ' . $disc->getCreator()->getPseudo() . '</a><br/>';
|
||||
foreach ($discuts['discuts'] as $discut) {
|
||||
echo '<a href="discut.php?d=' . $discut['ID'] . '">' . $discut['name'] . ' par ' . $discut['creatorPseudo'] . '</a><br/>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -23,7 +34,7 @@ include_once 'clazz/Zincluder.php';?>
|
||||
|
||||
|
||||
|
||||
<?php if($me?$me->isAdminLevelGreaterThan(8):FALSE){?>
|
||||
<?php if($discuts['canCreate']){?>
|
||||
<span id="createNewDiscBefore">Creer une nouvelle discussion</span>
|
||||
|
||||
<form id="createNewDiscForm" action="executor.php?action=createDiscussion" method="post">
|
||||
|
||||
Reference in New Issue
Block a user