Guest User

barberwebshop

a guest
Mar 8th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.50 KB | None | 0 0
  1. index.php
  2.  
  3. <?php
  4.  
  5. if (session_status() == PHP_SESSION_NONE) {
  6. session_start();
  7. }
  8.  
  9. /* Als we zijn ingelogt gaat hij direct door naar menu.*/
  10. if(isset($_SESSION['login']))
  11. {
  12. header("Location: menu.php");
  13. exit();
  14. }
  15.  
  16. ?>
  17.  
  18. <!DOCTYPE html>
  19. <html>
  20. <head>
  21. <title>Index</title>
  22. <link rel="stylesheet" type="text/css" href="style.css"/>
  23. </head>
  24. <body>
  25. <div id="achtergrond">
  26. <div id="bewerkenlogin" >
  27. <form action="processor.php" method="POST">
  28. <p>
  29. <label>Naam:</label>
  30. <input type="text" id="user" name="user" />
  31. </p>
  32. <p>
  33. <label>Wachtwoord:</label>
  34. <input type="password" id="pass" name="pass" />
  35. </p>
  36. <p>
  37. <input type="submit" id="btn" name="submit" value="login" />
  38. </p>
  39. </form>
  40. </div>
  41. <div id= "bewerkentekst";>
  42. <p> Powered By Sir Williams &#174 </p>
  43. </div>
  44. </div>
  45.  
  46. <div id="tarieven"><br><br>
  47.  
  48.  
  49. <img src="afbeelding1.jpg" class="Afbeelding1"> <img src="afbeelding5.jpg" class="Afbeelding5">
  50. <h2>Tarieven</h2>
  51.  
  52.  
  53. <li><strong>HEREN Tarieven per 1 januari 2018</strong></li>
  54. <li>---------------------------------------------------</li>
  55. <li>Heren &#8364 19,00</li>
  56. <li>Kinderen tm. 12 jaar &#8364 16,00</li>
  57. <li>Contouren &#8364 7,50</li>
  58. <li>wenkbrauwen &#8364 5,00</li>
  59. <li>Wassen &#8364 3,00</li>
  60. <li>Figuur &#8364 10,00</li>
  61. <li>Ontkroezen (wave) &#8364 20,00</li>
  62. <li>verven (bigen) &#8364 10,00</li>
  63.  
  64. <li>---------------------------------------------------</li>
  65.  
  66. <li><strong>Combinaties:</strong></li> <img src="afbeelding2.jpg" class="Afbeelding2"> <img src="afbeelding4.jpg" class="Afbeelding4">
  67. <li>knp / figuur (heren) &#8364 25,00</li>
  68.  
  69. <li>knp / figuur(kind. tm. 12 jaar) v.a. &#8364 17,50</li>
  70. <li>knp / Hot towel scheerbehandeling &#8364 25,00</li>
  71. <li>knp / ontkroezen &#8364 35,00</li>
  72. <li>knp / verven &#8364 25,00</li>
  73.  
  74. <li>---------------------------------------------------</li>
  75.  
  76. <li><strong>DAMES Tarieven per 1 januari 2018</strong></li>
  77. <li>Dames &#8364 22,50</li>
  78. <li>Kinderen t/m 12 jaar &#8364 15,00</li>
  79. <li>kleuren uitgroei &#8364 27.50</li>
  80. <li>kleuren v.a. &#8364 37.50</li>
  81. <li>crazy color v.a. &#8364 10.00</li>
  82. <li>krullen v.a. &#8364 20.00</li>
  83. <li>extensions op aanvraag</li>
  84. <li>---------------------------------------------------</li>
  85.  
  86. <li><strong>Combinaties:</strong></li><img src="afbeelding3.jpg" class="Afbeelding3">
  87. <li>wassen / knippen &#8364 25.00</li>
  88. <li>wassen / fohnenhnen &#8364 15.00</li>
  89. <li>knp dames/ kl uitgroei &#8364 42.50</li>
  90. <li>Alle prijzen zijn vanaf en kunnen varieren afhankelijk van de techniek, haarlijn en lengte.</li>
  91. <li>Om misverstanden of tegenvallers te voorkomen kunt u van te voren informeren naar de prijzen.</li>
  92.  
  93. </div>
  94. <div id="plaatsenafspraak">
  95. <li><h3>Openingstijden<h3></li>
  96. <li>Maandag
  97. 13:00 - 18:00 uur</li>
  98. <li>Dinsdag
  99. 9:00 - 20:00 uur</li>
  100. <li>Woensdag
  101. 9:00 - 20:00 uur</li>
  102. <li>Donderdag
  103. 9:00 - 20:00 uur</li>
  104. <li>Vrijdag
  105. 9:00 - 20:00 uur</li>
  106. <li>Zaterdag
  107. 8:00 - 16:00 uur</li>
  108. <br><br><br>
  109.  
  110. <li><h3>Contact<h3></li>
  111. <li>my adress </li>
  112. <li>my adress </li>
  113. <li>number</li>
  114. <li>my email</li>
  115.  
  116. </div>
  117. </body>
  118. </html>
  119.  
  120. menu.php
  121.  
  122. <?php
  123.  
  124. if (session_status() == PHP_SESSION_NONE) {
  125. session_start();
  126. }
  127.  
  128. /* Als we NIET zijn ingelogt gaat terug naar index.*/
  129. if(!isset($_SESSION['login']))
  130. {
  131. header("Location: index.php");
  132. exit();
  133. }
  134. else
  135.  
  136. {
  137. echo '<h1>Welcome ' . $_SESSION['account'] . '</h1>';
  138. }
  139.  
  140.  
  141. ?>
  142.  
  143.  
  144.  
  145.  
  146. <html>
  147.  
  148. <head>
  149. <link rel="stylesheet" type="text/css" href="style.css"/>
  150. </head>
  151. <body>
  152. <div id="menudesign">
  153. <form action="processor.php" method="POST">
  154. <input type="submit" name="logout" value="Loguit" id="loguit" />
  155.  
  156. </form>
  157.  
  158.  
  159.  
  160.  
  161.  
  162. </div>
  163.  
  164. </body>
  165. </html>
  166.  
  167. processor.php
  168.  
  169. <?php
  170.  
  171. if (session_status() == PHP_SESSION_NONE) {
  172. session_start();
  173. }
  174.  
  175. /* Logd uit. */
  176. function logOut()
  177. {
  178. unset($_SESSION['login']);
  179. unset($_SESSION['account']);
  180. }
  181.  
  182. /* Als hij is ingelogd logd hij eerst uit. */
  183. function logIn($username)
  184. {
  185. if(isset($_SESSION['login']))
  186. {
  187. logOut();
  188. }
  189.  
  190. $_SESSION['login'] = true;
  191. $_SESSION['account'] = $username;
  192. }
  193.  
  194. /* Functie voor naar andere paginas te gaan */
  195. function redirect($page)
  196. {
  197. echo '<script type="text/javascript">
  198. window.location = \"' . $page . '\"
  199. </script>';
  200. }
  201.  
  202. /* Kijkt als de gebruikers naam en wachtwoord bestaan. */
  203. function isOkay($gebruikersnaam, $wachtwoord)
  204. {
  205. $file = fopen('database.csv', 'r');
  206. while(($line = fgetcsv($file)) !== FALSE){
  207. if($line[0] == $gebruikersnaam && $line[1] == $wachtwoord)
  208. {
  209. fclose($file);
  210. return true;
  211. }
  212. }
  213. fclose($file);
  214. return false;
  215. }
  216.  
  217. /*
  218. Logt uit en gaat terug naar index.php.
  219. */
  220. if(isset($_POST['logout']))
  221. {
  222. logOut();
  223. header("Location: index.php");
  224. exit();
  225. }
  226.  
  227. /* Processes submit login request. */
  228. if(isset($_POST['submit']))
  229. {
  230.  
  231. $username = $_POST['user'];
  232. $password = $_POST['pass'];
  233.  
  234. if(isOkay($username, $password))
  235. {
  236. // log in en ga terug door naar het menu
  237. logIn($username);
  238. header("Location: index.php");
  239. exit();
  240. }
  241.  
  242. }
  243. else
  244. {
  245. /* Als we zijn ingelogt gaat hij direct door naar menu - anders naar login/index.*/
  246. if(isset($_SESSION['login']))
  247. {
  248. header("Location: menu.php");
  249. exit();
  250. }
  251. }
  252.  
  253. header("Location: index.php");
  254. exit();
  255.  
  256.  
  257. style.css
  258.  
  259. body
  260. {
  261. background-color: Black;
  262.  
  263. }
  264.  
  265. #bewerkentekst
  266. {
  267.  
  268. width: 15%;
  269. margin-top:130px;
  270. background-image: url("foto2.jpg");
  271. padding-top:400px;
  272. margin-left:1300px;
  273. color: grey;
  274. font-size:11px;
  275. text-align:center;
  276.  
  277.  
  278. }
  279.  
  280. #achtergrond
  281. {
  282. background-image: url("foto10.jpg");
  283. background-repeat: no-repeat;
  284. background-size: 1200px 800px;
  285. background-color: black;
  286.  
  287.  
  288.  
  289. }
  290.  
  291. h1
  292. {
  293. color:Black;
  294. margin-left: 85%;
  295. font-family:Calibri;
  296. }
  297.  
  298. p2
  299. {
  300. vertical-align:baseline;
  301. color:whitesmoke;
  302.  
  303. }
  304. #tarieven
  305. {
  306. color:Black;
  307. text-indent: 3em;
  308. font-size:14px;
  309. background-image: url("foto3.jpg");
  310. background-repeat: no-repeat;
  311. background-size: 630px 1000px ;
  312. margin-top:20px;
  313. font-family:Calibri;
  314. height:850px;
  315. line-height: 1,9;
  316.  
  317. }
  318.  
  319. #bewerkenlogin{
  320. border: solid gray 1px;
  321. width: 20%;
  322. border-radius: 5px;
  323. margin-top: 15px;
  324. margin-left: auto;
  325. margin-right:-7px;
  326. background: grey;
  327. padding: 30px;
  328. }
  329.  
  330. .afbtekst
  331. {
  332. color: grey;
  333. font-size:11px;
  334. text-align:center;
  335. margin-top:500px;
  336. margin-left:1300px;
  337. background-attachment:fixed;
  338. }
  339. /*
  340. width: 15%;
  341. margin-top:-410px;
  342. background-image: url("foto2.jpg");
  343. padding-top:400px;
  344. margin-left:1300px;
  345. color: grey;
  346. font-size:11px;
  347. background-repeat: no-repeat;
  348. background-attachment: fixed;
  349. text-align:center;
  350. */
  351.  
  352. .pagina2
  353. {
  354. color: #fff;
  355. background: gray;
  356. padding: 5px;
  357. margin-top:60px;
  358. margin-left:95%;
  359. border:1px solid white;
  360.  
  361.  
  362. }
  363. #btn{
  364. color: #fff;
  365. background: Black;
  366. padding: 4px;
  367. margin-left: 69%;
  368.  
  369. }
  370. #loguit
  371. {
  372. color: #fff;
  373. background: gray;
  374. padding: 5px;
  375. margin-top:60px;
  376. margin-left: 95%;
  377.  
  378. }
  379. .Afbeelding1
  380. {
  381. width: 250px;
  382. height:250px;
  383. float:right;
  384. margin-right:680px;
  385. }
  386. .Afbeelding2
  387. {
  388. width: 250px;
  389. height:250px;
  390. float:right;
  391. margin-right:420px;
  392. }
  393. .Afbeelding3
  394. {
  395. width: 250px;
  396. height:250px;
  397. float:right;
  398. margin-right:160px;
  399. }
  400. .Afbeelding4
  401. {
  402. width: 250px;
  403. height:250px;
  404. float:right;
  405. margin-right:-510px;
  406. }
  407.  
  408. .Afbeelding5
  409. {
  410. width: 250px;
  411. height:250px;
  412. float:right;
  413. margin-right:-510px;
  414. }
  415.  
  416. #plaatsenafspraak
  417. {
  418. color:White;
  419. text-indent: 3em;
  420. font-size:19px;
  421. margin-top:100px;
  422. font-family:Calibri;
  423. line-height: 1,9;
  424.  
  425.  
  426.  
  427. }
  428. .map
  429. {
  430. width:600px ;
  431. height: 450px;
  432. margin-top:-170px;
  433. float:right;
  434. }
  435.  
  436.  
  437.  
  438.  
  439.  
  440. #menudesign
  441. {
  442. background-image: url("foto9.jpg");
  443. background-size:cover;
  444. margin-top:-60px;
  445. background-repeat:no-repeat;
  446. height:800px;
  447. }
Add Comment
Please, Sign In to add comment