└── Pharmaceutique ├── UML.docx ├── public ├── index.php ├── img │ ├── beko.jpeg │ ├── exta.jpg │ ├── jjjo.jpg │ ├── medi.jpg │ ├── nnno.png │ ├── favicon.ico │ ├── slider3.webp │ ├── Parol FR.webp │ ├── bg-masthead.jpg │ ├── bg-signup.jpg │ ├── demo-image-01.jpg │ ├── demo-image-02.jpg │ ├── pack_3d_dalfeine.png │ ├── trio-medicaments.png │ ├── Paramol-extra-500.png │ ├── ISOXAN-ADULTE_560x400.png │ ├── cloraxene-2-300x231.png │ ├── Pills-Medicine-PNG-Clipart.png │ ├── 355-3554483_doxycycline-box-from-the-front-medicament-pour-le.png │ └── 981-9814077_info-medicamentos-on-twitter-crte-de-coq-traitement.png ├── js │ ├── connection.js │ ├── scripts.js │ └── admin.js └── css │ ├── style.css │ └── boxicons.min.css ├── app ├── config │ └── config.php ├── bootstrap.php ├── libraries │ ├── Controller.php │ ├── Database.php │ └── Core.php ├── controllers │ ├── Users.php │ ├── pages.php │ └── Produits.php ├── models │ ├── User.php │ └── Produit.php └── views │ ├── login.php │ ├── inscrire.php │ ├── admin │ ├── edit.php │ ├── add.php │ ├── statistique.php │ └── index.php │ └── index.php └── pharma.sql /Pharmaceutique/UML.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/UML.docx -------------------------------------------------------------------------------- /Pharmaceutique/public/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Pharmaceutique/public/img/beko.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/beko.jpeg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/exta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/exta.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/jjjo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/jjjo.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/medi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/medi.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/nnno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/nnno.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/favicon.ico -------------------------------------------------------------------------------- /Pharmaceutique/public/img/slider3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/slider3.webp -------------------------------------------------------------------------------- /Pharmaceutique/public/img/Parol FR.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/Parol FR.webp -------------------------------------------------------------------------------- /Pharmaceutique/public/img/bg-masthead.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/bg-masthead.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/bg-signup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/bg-signup.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/demo-image-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/demo-image-01.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/demo-image-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/demo-image-02.jpg -------------------------------------------------------------------------------- /Pharmaceutique/public/img/pack_3d_dalfeine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/pack_3d_dalfeine.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/trio-medicaments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/trio-medicaments.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/Paramol-extra-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/Paramol-extra-500.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/ISOXAN-ADULTE_560x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/ISOXAN-ADULTE_560x400.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/cloraxene-2-300x231.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/cloraxene-2-300x231.png -------------------------------------------------------------------------------- /Pharmaceutique/public/img/Pills-Medicine-PNG-Clipart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roumamimohammed/Pharmaceutique/HEAD/Pharmaceutique/public/img/Pills-Medicine-PNG-Clipart.png -------------------------------------------------------------------------------- /Pharmaceutique/app/config/config.php: -------------------------------------------------------------------------------- 1 | servername;dbname=$this->dbname", $this->username, $this->password); 14 | $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 15 | return $conn; 16 | } catch (PDOException $e) { 17 | echo "Connection failed: " . $e->getMessage(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Pharmaceutique/public/js/connection.js: -------------------------------------------------------------------------------- 1 | function W3docs() 2 | { 3 | var name = document.forms["RegForm"]["name"]; 4 | 5 | var password = document.forms["RegForm"]["motdepass"]; 6 | 7 | 8 | if (name.value == "") 9 | { 10 | Swal.fire({ 11 | icon: 'error', 12 | title: 'Oops!Name invalid', 13 | }) 14 | name.focus(); 15 | return false; 16 | } 17 | 18 | if (password.value == "") 19 | { 20 | Swal.fire({ 21 | icon: 'error', 22 | title: 'Oops!password invalid', 23 | }) 24 | password.focus(); 25 | return false; 26 | } 27 | 28 | 29 | return true; 30 | } -------------------------------------------------------------------------------- /Pharmaceutique/app/controllers/Users.php: -------------------------------------------------------------------------------- 1 | user = $this->model('User'); 11 | } 12 | 13 | 14 | 15 | public function register() 16 | { 17 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { 18 | extract($_POST); 19 | $hashed_pass = password_hash($pass, PASSWORD_DEFAULT); 20 | if ($this->user->register($name, $hashed_pass) == true) { 21 | header('location:' . URLROOT . '/pages/login'); 22 | } 23 | } 24 | } 25 | 26 | 27 | 28 | 29 | public function login() 30 | { 31 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { 32 | extract($_POST); 33 | if ($this->user->login($name, $pass) == true) { 34 | header('location:' . URLROOT . '/produits/getproduits'); 35 | } else 36 | if ($this->user->login($name, $pass) == false) { 37 | header('location:' . URLROOT . '/pages/login'); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Pharmaceutique/app/controllers/pages.php: -------------------------------------------------------------------------------- 1 | produit = $this->model('Produit'); 12 | } 13 | 14 | 15 | /*guest ----------------------------------------*/ 16 | public function index() 17 | { 18 | $this->view('index'); 19 | } 20 | 21 | 22 | 23 | 24 | public function statistique() 25 | { 26 | $data = [ 27 | 28 | 'prixmax' => $this->produit->getmax(), 29 | 'totalproduit' => $this->produit->getTotal() 30 | ]; 31 | $this->view('admin/statistique', $data); 32 | } 33 | 34 | 35 | 36 | public function login() 37 | { 38 | $this->view('login'); 39 | } 40 | 41 | 42 | 43 | public function inscrire() 44 | { 45 | $this->view('inscrire'); 46 | } 47 | 48 | 49 | 50 | public function logout() 51 | { 52 | session_destroy(); 53 | header('location:../pages/'); 54 | exit(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Pharmaceutique/app/models/User.php: -------------------------------------------------------------------------------- 1 | openConnection()->prepare($sql); 10 | $stmt->bindParam(':username', $nom); 11 | $stmt->bindParam(':pass', $mdp); 12 | if($stmt->execute()){ 13 | return true; 14 | } 15 | } 16 | 17 | public function login($nom,$pass){ 18 | $sql = "SELECT `id_admin`, `username`, `password` FROM `admin` WHERE username=:username"; 19 | $stmt=$this->openConnection()->prepare($sql); 20 | $stmt->bindParam(':username',$nom); 21 | $stmt->execute(); 22 | if($stmt->rowCount()==1){ 23 | $res=$stmt->fetch(PDO::FETCH_ASSOC); 24 | if(password_verify($pass,$res['password'])){ 25 | $_SESSION['id']=$res['id_admin']; 26 | $_SESSION['nom']=$res['username']; 27 | 28 | return true; 29 | } 30 | else{ 31 | return false; 32 | } 33 | } 34 | else{ 35 | return false; 36 | } 37 | } 38 | 39 | 40 | 41 | 42 | 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /Pharmaceutique/app/libraries/Core.php: -------------------------------------------------------------------------------- 1 | getUrl(); 14 | 15 | if (isset($url)) { 16 | //get controller 17 | if (file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) { 18 | $this->currentController = ucwords($url[0]); 19 | unset($url[0]); 20 | } 21 | } 22 | 23 | //require and initialize object 24 | 25 | require_once '../app/controllers/' . $this->currentController . '.php'; 26 | $this->currentController = new $this->currentController; 27 | 28 | //get methode in controller 29 | //check if url has a method 30 | if (isset($url[1])) { 31 | if (method_exists($this->currentController, $url[1])) { 32 | $this->currentMethode = $url[1]; 33 | unset($url[1]); 34 | } 35 | } 36 | 37 | $this->params = $url ? array_values($url) : []; 38 | call_user_func_array([$this->currentController, $this->currentMethode], $this->params); 39 | } 40 | 41 | function getUrl() 42 | { 43 | if (isset($_GET['url'])) { 44 | $url = rtrim($_GET['url'], '/'); 45 | $url = filter_var($url, FILTER_SANITIZE_URL); 46 | $url = explode('/', $url); 47 | return $url; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pharmaceutique/public/js/scripts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Grayscale v7.0.5 (https://startbootstrap.com/theme/grayscale) 3 | * Copyright 2013-2022 Start Bootstrap 4 | * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-grayscale/blob/master/LICENSE) 5 | */ 6 | // 7 | // Scripts 8 | // 9 | 10 | window.addEventListener('DOMContentLoaded', event => { 11 | 12 | // Navbar shrink function 13 | var navbarShrink = function () { 14 | const navbarCollapsible = document.body.querySelector('#mainNav'); 15 | if (!navbarCollapsible) { 16 | return; 17 | } 18 | if (window.scrollY === 0) { 19 | navbarCollapsible.classList.remove('navbar-shrink') 20 | } else { 21 | navbarCollapsible.classList.add('navbar-shrink') 22 | } 23 | 24 | }; 25 | 26 | // Shrink the navbar 27 | navbarShrink(); 28 | 29 | // Shrink the navbar when page is scrolled 30 | document.addEventListener('scroll', navbarShrink); 31 | 32 | // Activate Bootstrap scrollspy on the main nav element 33 | const mainNav = document.body.querySelector('#mainNav'); 34 | if (mainNav) { 35 | new bootstrap.ScrollSpy(document.body, { 36 | target: '#mainNav', 37 | offset: 74, 38 | }); 39 | }; 40 | 41 | // Collapse responsive navbar when toggler is visible 42 | const navbarToggler = document.body.querySelector('.navbar-toggler'); 43 | const responsiveNavItems = [].slice.call( 44 | document.querySelectorAll('#navbarResponsive .nav-link') 45 | ); 46 | responsiveNavItems.map(function (responsiveNavItem) { 47 | responsiveNavItem.addEventListener('click', () => { 48 | if (window.getComputedStyle(navbarToggler).display !== 'none') { 49 | navbarToggler.click(); 50 | } 51 | }); 52 | }); 53 | 54 | }); -------------------------------------------------------------------------------- /Pharmaceutique/app/views/login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
26 |
27 | Total produits:
86 |Prix maximum
98 || 106 | 107 | | 108 |
|---|
|
117 |
118 |
119 |
135 |
120 |
122 |
123 |
128 |
134 | Produit:= $produit['Llibelle'] ?>124 | Qantite:= $produit['quantite'] ?> 125 | Nom du Categorie:= $produit['cat'] ?> 126 | Date := $produit['data_ajout'] ?> 127 | |
136 |
137 |
59 | Grayscale is a free Bootstrap theme created by Start Bootstrap. It can be yours right now, simply download the template on 60 | the preview page. 61 | The theme is open source, and you can use it for any purpose, personal or commercial. 62 |
63 |
66 | 
Grayscale is open source and MIT licensed. This means you can use it for any project - even commercial projects! Download it, customize it, and publish your website!
78 |
An example of where you can put an image of a project, or anything else, along with a description.
90 |
Another example of a project with its respective description. These sections work well responsively as well, try this theme on a small screen!
105 |