Beispiel #1
0
 function inscrire($nom, $prenom, $email, $pwd, $state)
 {
     $con = new connect();
     if ($con->Query(" insert into admin (email,password) values ('{$email}','{$pwd}') ")) {
         $a = $con->Query("select * from admin where email='{$email}' ");
         $data = $a->fetch_array();
         $this->id_client = $data["id"];
         $RIB = $this->generateID();
         $con->Query(" insert into client (nom,prenom,id_client,state,RIB,solde) values ('{$nom}','{$prenom}','{$this->id_client}','{$state}','{$RIB}','0') ");
         echo "registered with success";
     } else {
         echo "fail to insert";
     }
 }
Beispiel #2
0
function state($ch)
{
    $con = new connect();
    $rs = $con->Query(" select * from admin,client where email='{$ch}' and admin.id=client.id_client ");
    $data = $rs->fetch_array();
    return $data["state"];
}
Beispiel #3
0
 public function supprimer()
 {
     $con = new connect();
     $con->Query(" delete from admin where id ='{$this->id_client}' ");
 }
Beispiel #4
0
<?php

require_once "../lib/connect.php";
session_start();
$id = $_SESSION["login"];
$con = new connect();
$nom = "";
$prenom = "";
$solde = "";
$RIB = "";
$request = $con->Query(" select * from client where id_client='{$id}' ");
while ($data = $request->fetch_array()) {
    # code...
    $nom = $data["nom"];
    $prenom = $data["prenom"];
    $RIB = $data["RIB"];
    $solde = $data["solde"];
}
?>



<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/material.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/adminLTE.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/skin-red-light.css">
<style type="text/css">
body{
	background-color: #E5E5E5;
}
></style>
Beispiel #5
0
<?php

require_once "../lib/connect.php";
session_start();
$id = $_SESSION["login"];
$con = new connect();
$nom = "";
$prenom = "";
$solde = "";
$RIB = "";
$request = $con->Query(" select * from client where id_client='{$id}' ");
while ($data = $request->fetch_array()) {
    # code...
    $nom = $data["nom"];
    $prenom = $data["prenom"];
    $RIB = $data["RIB"];
    $solde = $data["solde"];
}
if (isset($_POST["del"]) && !empty($_POST["del"])) {
    # code...
    $del_client = $_POST["del"];
    $con->Query(" delete from admin where id='{$del_client}' ");
}
?>



<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/src/bootstrap/css/material.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/adminLTE.min.css">
<link rel="stylesheet" type="text/css" href="/src/adminLTE/skin-red-light.css">