public function doPost() { $cnx = Connection_BDD::getInstance(); $SQL = "SELECT * FROM audio Order BY Id DESC "; $rs = $cnx->query($SQL); while ($info = $rs->fetch_object()) { return json_encode($info); } }
public function doPost() { $cnx = Connection_BDD::getInstance(); $SQL = "SELECT * FROM user WHERE Id='" . $this->requestParams['Id'] . "'\n ORDER BY Grade ASC, Pseudo ASC"; $rs = $cnx->query($SQL); // return ($SQL); while ($info = $rs->fetch_object()) { return json_encode($info); } }
public function doPost() { try { $cnx = Connection_BDD::getInstance(); $SQL = "INSERT INTO user(Pseudo, Password, Mail, Grade) VALUES ('" . $this->requestParams['nomUser'] . "','" . $this->requestParams['passwordUser'] . "','" . $this->requestParams['MailUser'] . "','0')"; $cnx->query($SQL); $cnx->commit(); return true; } catch (Exception $e) { return false; } }
public function doPost() { try { $cnx = Connection_BDD::getInstance(); $SQL = "UPDATE user SET Pseudo='" . $this->requestParams['Pseudo'] . "',Password='******'Password'] . "',Mail='" . $this->requestParams['Mail'] . "' WHERE ID = '" . $this->requestParams['Id'] . "'"; $cnx->query($SQL); $cnx->commit(); return true; } catch (Exception $e) { return false; } }
public function doPost() { try { $cnx = Connection_BDD::getInstance(); $SQL = "SELECT id, Pseudo, Password, Grade FROM user WHERE Pseudo='" . $this->requestParams['Pseudo'] . "'"; $rs = $cnx->query($SQL); while ($info = $rs->fetch_object()) { return json_encode($info); } } catch (Exception $e) { return false; } }
session_start(); $test = json_decode($_SESSION['connexion']); if ($_SESSION['connexion'] != null) { $connect = 1; if ($test->Grade == '1') { $type = '1'; } else { $type = '0'; } } else { $connect = 0; $type = '0'; } include '../view/Connection_BDD.php'; $cnx = Connection_BDD::getInstance(); if ($connect == '1') { $menu = 'oui'; } else { $menu = "non"; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!--<link rel="stylesheet" href="css/datepicker.css"/>--> <link rel="stylesheet" href="../css/bootstrap.min.css"/> <link rel="stylesheet" href="../css/ui-flick/jquery-ui.min.css"/> <link rel="stylesheet" href="../css/style.css"/> <link rel="icon" type="../image/png" href="cte.png" />