Advertisement
Guest User

Untitled

a guest
Nov 14th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.30 KB | None | 0 0
  1. CORE CSS:
  2.  
  3.  
  4. #prijava-container{
  5. position: fixed;
  6. top: 0;
  7. left: 0;
  8. z-index: 3;
  9. height: 100vh;
  10. width: 100vw;
  11. background-color: rgba(0,0,0,0.9);
  12. display: none;
  13. }
  14.  
  15. #prijava{
  16. position: absolute;
  17. height: 280px;
  18. width: 250px;
  19. padding: 20px 30px;
  20. left: 0;
  21. top: 0;
  22. bottom: 0;
  23. right: 0;
  24. margin: auto;
  25. background-color: #fff;
  26.  
  27. }
  28.  
  29. #prijava h1{
  30. margin: 0;
  31. margin-bottom: 25px;
  32. }
  33.  
  34. .nav li a{
  35. cursor: pointer;
  36. }
  37.  
  38. .prijava-input.err{
  39. border: solid 1px red;
  40. }
  41.  
  42.  
  43. PRIJAVA.PHP
  44.  
  45. <?php
  46. session_start();
  47.  
  48.  
  49. $errors = array();
  50.  
  51. if(isset($_POST['submit'])){
  52. if(empty($_POST['username']) || empty($_POST['password'])){
  53. $errors['username1'] = "Napacen vnos, poskusite znova.";
  54. } else {
  55. $username = $_POST['username'];
  56. $password = $_POST['password'];
  57.  
  58. $conn = mysqli_connect('localhost', 'root', '', 'mydb') or die('Not connected');
  59.  
  60. $db = new mysqli;
  61.  
  62. $username = stripslashes($username);
  63. $password = stripcslashes($password);
  64. $username = mysqli_real_escape_string($conn, $username);
  65. $password = mysqli_real_escape_string($conn, $password);
  66. }
  67.  
  68.  
  69.  
  70. $query1 = @mysqli_query($conn, "SELECT * FROM uporabnik WHERE uporabnisko_ime_Uporabnik = '$username' AND geslo_Uporabnik = '$password'");
  71.  
  72.  
  73. if(@mysqli_num_rows($query1) == 1){
  74. $_SESSION['login_user'] = $username;
  75. // header("Location: profil.php");
  76. echo "ok";
  77. } else {
  78. $errors['username1'] = "Napacen vnos, poskusite znova.";
  79. $_GET['prijava'] = 1;
  80. echo "no";
  81. }
  82.  
  83.  
  84.  
  85.  
  86. }
  87. ?>
  88.  
  89. CREATIVE CSS:
  90.  
  91. /*!
  92. * Start Bootstrap - Creative v3.3.7+1 (http://startbootstrap.com/template-overviews/creative)
  93. * Copyright 2013-2016 Start Bootstrap
  94. * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
  95. */
  96. html,
  97. body {
  98. height: 100%;
  99. width: 100%;
  100. }
  101. body {
  102. font-family: 'Merriweather', 'Helvetica Neue', Arial, sans-serif;
  103. }
  104. hr {
  105. border-color: #F05F40;
  106. border-width: 3px;
  107. max-width: 50px;
  108. }
  109. hr.light {
  110. border-color: white;
  111. }
  112. a {
  113. -webkit-transition: all 0.35s;
  114. -moz-transition: all 0.35s;
  115. transition: all 0.35s;
  116. color: #F05F40;
  117. }
  118. a:hover,
  119. a:focus {
  120. color: #eb3812;
  121. }
  122. h1,
  123. h2,
  124. h3,
  125. h4,
  126. h5,
  127. h6 {
  128. font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  129. }
  130. p {
  131. font-size: 16px;
  132. line-height: 1.5;
  133. margin-bottom: 20px;
  134. }
  135. .bg-primary {
  136. background-color: #F05F40;
  137. }
  138. .bg-dark {
  139. background-color: #222222;
  140. color: white;
  141. }
  142. .text-faded {
  143. color: rgba(255, 255, 255, 0.7);
  144. }
  145. section {
  146. padding: 100px 0;
  147. }
  148. aside {
  149. padding: 50px 0;
  150. }
  151. .no-padding {
  152. padding: 0;
  153. }
  154. .navbar-default {
  155. background-color: white;
  156. border-color: rgba(34, 34, 34, 0.05);
  157. font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  158. -webkit-transition: all 0.35s;
  159. -moz-transition: all 0.35s;
  160. transition: all 0.35s;
  161. }
  162. .navbar-default .navbar-header .navbar-brand {
  163. color: #F05F40;
  164. font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  165. font-weight: 700;
  166. text-transform: uppercase;
  167. }
  168. .navbar-default .navbar-header .navbar-brand:hover,
  169. .navbar-default .navbar-header .navbar-brand:focus {
  170. color: #eb3812;
  171. }
  172. .navbar-default .navbar-header .navbar-toggle {
  173. font-weight: 700;
  174. font-size: 12px;
  175. color: #222222;
  176. text-transform: uppercase;
  177. }
  178. .navbar-default .nav > li > a,
  179. .navbar-default .nav > li > a:focus {
  180. text-transform: uppercase;
  181. font-weight: 700;
  182. font-size: 13px;
  183. color: #222222;
  184. }
  185. .navbar-default .nav > li > a:hover,
  186. .navbar-default .nav > li > a:focus:hover {
  187. color: #F05F40;
  188. }
  189. .navbar-default .nav > li.active > a,
  190. .navbar-default .nav > li.active > a:focus {
  191. color: #F05F40 !important;
  192. background-color: transparent;
  193. }
  194. .navbar-default .nav > li.active > a:hover,
  195. .navbar-default .nav > li.active > a:focus:hover {
  196. background-color: transparent;
  197. }
  198. @media (min-width: 768px) {
  199. .navbar-default {
  200. background-color: transparent;
  201. border-color: rgba(255, 255, 255, 0.3);
  202. }
  203. .navbar-default .navbar-header .navbar-brand {
  204. color: rgba(255, 255, 255, 0.7);
  205. }
  206. .navbar-default .navbar-header .navbar-brand:hover,
  207. .navbar-default .navbar-header .navbar-brand:focus {
  208. color: white;
  209. }
  210. .navbar-default .nav > li > a,
  211. .navbar-default .nav > li > a:focus {
  212. color: rgba(255, 255, 255, 0.7);
  213. }
  214. .navbar-default .nav > li > a:hover,
  215. .navbar-default .nav > li > a:focus:hover {
  216. color: white;
  217. }
  218. .navbar-default.affix {
  219. background-color: white;
  220. border-color: rgba(34, 34, 34, 0.05);
  221. }
  222. .navbar-default.affix .navbar-header .navbar-brand {
  223. color: #F05F40;
  224. font-size: 14px;
  225. }
  226. .navbar-default.affix .navbar-header .navbar-brand:hover,
  227. .navbar-default.affix .navbar-header .navbar-brand:focus {
  228. color: #eb3812;
  229. }
  230. .navbar-default.affix .nav > li > a,
  231. .navbar-default.affix .nav > li > a:focus {
  232. color: #222222;
  233. }
  234. .navbar-default.affix .nav > li > a:hover,
  235. .navbar-default.affix .nav > li > a:focus:hover {
  236. color: #F05F40;
  237. }
  238. }
  239. header {
  240. position: relative;
  241. width: 100%;
  242. min-height: auto;
  243. -webkit-background-size: cover;
  244. -moz-background-size: cover;
  245. background-size: cover;
  246. -o-background-size: cover;
  247. background-position: center;
  248. background-image: url('../img/header.jpg');
  249. text-align: center;
  250. color: white;
  251. }
  252. header .header-content {
  253. position: relative;
  254. text-align: center;
  255. padding: 100px 15px 100px;
  256. width: 100%;
  257. }
  258. header .header-content .header-content-inner h1 {
  259. font-weight: 700;
  260. text-transform: uppercase;
  261. margin-top: 0;
  262. margin-bottom: 0;
  263. font-size: 30px;
  264. }
  265. header .header-content .header-content-inner hr {
  266. margin: 30px auto;
  267. }
  268. header .header-content .header-content-inner p {
  269. font-weight: 300;
  270. color: rgba(255, 255, 255, 0.7);
  271. font-size: 16px;
  272. margin-bottom: 50px;
  273. }
  274. @media (min-width: 768px) {
  275. header {
  276. min-height: 100%;
  277. }
  278. header .header-content {
  279. position: absolute;
  280. top: 50%;
  281. -webkit-transform: translateY(-50%);
  282. -ms-transform: translateY(-50%);
  283. transform: translateY(-50%);
  284. padding: 0 50px;
  285. }
  286. header .header-content .header-content-inner {
  287. max-width: 1000px;
  288. margin-left: auto;
  289. margin-right: auto;
  290. }
  291. header .header-content .header-content-inner h1 {
  292. font-size: 50px;
  293. }
  294. header .header-content .header-content-inner p {
  295. font-size: 18px;
  296. max-width: 80%;
  297. margin-left: auto;
  298. margin-right: auto;
  299. }
  300. }
  301. .section-heading {
  302. margin-top: 0;
  303. }
  304. .service-box {
  305. max-width: 400px;
  306. margin: 50px auto 0;
  307. }
  308. @media (min-width: 992px) {
  309. .service-box {
  310. margin: 20px auto 0;
  311. }
  312. }
  313. .service-box p {
  314. margin-bottom: 0;
  315. }
  316. .portfolio-box {
  317. position: relative;
  318. display: block;
  319. max-width: 650px;
  320. margin: 0 auto;
  321. }
  322. .portfolio-box .portfolio-box-caption {
  323. color: white;
  324. opacity: 0;
  325. display: block;
  326. background: rgba(240, 95, 64, 0.9);
  327. position: absolute;
  328. bottom: 0;
  329. text-align: center;
  330. width: 100%;
  331. height: 100%;
  332. -webkit-transition: all 0.35s;
  333. -moz-transition: all 0.35s;
  334. transition: all 0.35s;
  335. }
  336. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content {
  337. width: 100%;
  338. text-align: center;
  339. position: absolute;
  340. top: 50%;
  341. transform: translateY(-50%);
  342. }
  343. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category,
  344. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
  345. font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  346. padding: 0 15px;
  347. }
  348. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category {
  349. text-transform: uppercase;
  350. font-weight: 600;
  351. font-size: 14px;
  352. }
  353. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
  354. font-size: 18px;
  355. }
  356. .portfolio-box:hover .portfolio-box-caption {
  357. opacity: 1;
  358. }
  359. .portfolio-box:focus {
  360. outline: none;
  361. }
  362. @media (min-width: 768px) {
  363. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category {
  364. font-size: 16px;
  365. }
  366. .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
  367. font-size: 22px;
  368. }
  369. }
  370. .call-to-action h2 {
  371. margin: 0 auto 20px;
  372. }
  373. .text-primary {
  374. color: #F05F40;
  375. }
  376. .no-gutter > [class*='col-'] {
  377. padding-right: 0;
  378. padding-left: 0;
  379. }
  380. .btn-default {
  381. color: #222222;
  382. background-color: white;
  383. border-color: white;
  384. -webkit-transition: all 0.35s;
  385. -moz-transition: all 0.35s;
  386. transition: all 0.35s;
  387. }
  388. .btn-default:hover,
  389. .btn-default:focus,
  390. .btn-default.focus,
  391. .btn-default:active,
  392. .btn-default.active,
  393. .open > .dropdown-toggle.btn-default {
  394. color: #222222;
  395. background-color: #f2f2f2;
  396. border-color: #ededed;
  397. }
  398. .btn-default:active,
  399. .btn-default.active,
  400. .open > .dropdown-toggle.btn-default {
  401. background-image: none;
  402. }
  403. .btn-default.disabled,
  404. .btn-default[disabled],
  405. fieldset[disabled] .btn-default,
  406. .btn-default.disabled:hover,
  407. .btn-default[disabled]:hover,
  408. fieldset[disabled] .btn-default:hover,
  409. .btn-default.disabled:focus,
  410. .btn-default[disabled]:focus,
  411. fieldset[disabled] .btn-default:focus,
  412. .btn-default.disabled.focus,
  413. .btn-default[disabled].focus,
  414. fieldset[disabled] .btn-default.focus,
  415. .btn-default.disabled:active,
  416. .btn-default[disabled]:active,
  417. fieldset[disabled] .btn-default:active,
  418. .btn-default.disabled.active,
  419. .btn-default[disabled].active,
  420. fieldset[disabled] .btn-default.active {
  421. background-color: white;
  422. border-color: white;
  423. }
  424. .btn-default .badge {
  425. color: white;
  426. background-color: #222222;
  427. }
  428. .btn-primary {
  429. color: white;
  430. background-color: #F05F40;
  431. border-color: #F05F40;
  432. -webkit-transition: all 0.35s;
  433. -moz-transition: all 0.35s;
  434. transition: all 0.35s;
  435. }
  436. .btn-primary:hover,
  437. .btn-primary:focus,
  438. .btn-primary.focus,
  439. .btn-primary:active,
  440. .btn-primary.active,
  441. .open > .dropdown-toggle.btn-primary {
  442. color: white;
  443. background-color: #ee4b28;
  444. border-color: #ed431f;
  445. }
  446. .btn-primary:active,
  447. .btn-primary.active,
  448. .open > .dropdown-toggle.btn-primary {
  449. background-image: none;
  450. }
  451. .btn-primary.disabled,
  452. .btn-primary[disabled],
  453. fieldset[disabled] .btn-primary,
  454. .btn-primary.disabled:hover,
  455. .btn-primary[disabled]:hover,
  456. fieldset[disabled] .btn-primary:hover,
  457. .btn-primary.disabled:focus,
  458. .btn-primary[disabled]:focus,
  459. fieldset[disabled] .btn-primary:focus,
  460. .btn-primary.disabled.focus,
  461. .btn-primary[disabled].focus,
  462. fieldset[disabled] .btn-primary.focus,
  463. .btn-primary.disabled:active,
  464. .btn-primary[disabled]:active,
  465. fieldset[disabled] .btn-primary:active,
  466. .btn-primary.disabled.active,
  467. .btn-primary[disabled].active,
  468. fieldset[disabled] .btn-primary.active {
  469. background-color: #F05F40;
  470. border-color: #F05F40;
  471. }
  472. .btn-primary .badge {
  473. color: #F05F40;
  474. background-color: white;
  475. }
  476. .btn {
  477. font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  478. border: none;
  479. border-radius: 2px;
  480. font-weight: 700;
  481. text-transform: uppercase;
  482. }
  483. .btn-xl {
  484. padding: 15px 30px;
  485. }
  486. ::-moz-selection {
  487. color: white;
  488. text-shadow: none;
  489. background: #222222;
  490. }
  491. ::selection {
  492. color: white;
  493. text-shadow: none;
  494. background: #222222;
  495. }
  496. img::selection {
  497. color: white;
  498. background: transparent;
  499. }
  500. img::-moz-selection {
  501. color: white;
  502. background: transparent;
  503. }
  504. body {
  505. webkit-tap-highlight-color: #222222;
  506. }
  507.  
  508.  
  509. INDEX.PHP
  510.  
  511. <?php
  512. include('prijava.php');
  513. ?>
  514.  
  515.  
  516. <!DOCTYPE html>
  517. <html lang="en">
  518.  
  519. <head>
  520.  
  521. <meta charset="utf-8">
  522. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  523. <meta name="viewport" content="width=device-width, initial-scale=1">
  524. <meta name="description" content="">
  525. <meta name="author" content="">
  526.  
  527. <title>Eventis</title>
  528.  
  529. <!-- Bootstrap Core CSS -->
  530. <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  531.  
  532. <!-- Custom Fonts -->
  533. <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  534. <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
  535. <link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
  536.  
  537. <!-- Plugin CSS -->
  538. <link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet">
  539.  
  540. <!-- Theme CSS -->
  541. <link href="css/creative.min.css" rel="stylesheet">
  542. <link href="css/core.css" rel="stylesheet">
  543. <script src="vendor/jquery/jquery.min"></script>
  544.  
  545. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  546. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  547. <!--[if lt IE 9]>
  548. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  549. <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  550. <![endif]-->
  551.  
  552. </head>
  553.  
  554. <body id="page-top">
  555. <div id="prijava-container">
  556. <script type="text/javascript">
  557. $(function(){
  558. $("#form-prijava").submit(function(){
  559. var frm = $(this);
  560. $.ajax({
  561. type: "post",
  562. url: "prijava.php",
  563. data: $(frm).serialize(),
  564. success: function(data) {
  565. if(data.indexOf("ok") > -1){
  566. window.location = "profil.php";
  567. } else {
  568. $(".prijava-input").addClass("err");
  569. }
  570.  
  571. }
  572. });
  573. return false;
  574. });
  575.  
  576.  
  577. $("#btn-prijava").click(function(e){
  578. $("#prijava-container").fadeIn();
  579. e.stopPropagation();
  580. return false;
  581. });
  582. $("#prijava-container").click(function(e){
  583. if($(e.target).attr("id") == "prijava-container")
  584. $(this).fadeOut();
  585. });
  586. });
  587. </script>
  588. <div id="prijava">
  589. <form method="POST" action="" id="form-prijava">
  590. <h1>PRIJAVA</h1>
  591. Uporabnisko ime:<input type="text" class="prijava-input" name="username" id="username" value="<?php if(isset($_POST['username'])) echo $_POST['username']; ?>">
  592. <?php if(isset($errors['username1'])) echo $errors['username1']; ?><br><br>
  593.  
  594. <input type="hidden" name="submit" value="submit">
  595. Geslo:<input class="prijava-input" type="password" name="password" id="password"><br><br>
  596. <input class="btn btn-primary" type="submit" id="submit" value="Prijavi">
  597. </form>
  598. </div>
  599. </div>
  600. <nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
  601. <div class="container-fluid">
  602. <!-- Brand and toggle get grouped for better mobile display -->
  603. <div class="navbar-header">
  604. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  605. <span class="sr-only">Toggle navigation</span> Menu <i class="fa fa-bars"></i>
  606. </button>
  607.  
  608. </div>
  609.  
  610. <!-- Collect the nav links, forms, and other content for toggling -->
  611. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  612. <ul class="nav navbar-nav navbar-right">
  613. <li>
  614. <a id="btn-prijava" >Login</a>
  615. </li>
  616. <li>
  617. <a id="btn-reg" >Registration</a>
  618. </li>
  619. <li>
  620. <a href="profil.php">Profile</a>
  621. </li>
  622. <li>
  623. <a href="#contact">Contact</a>
  624. </li>
  625. </ul>
  626. </div>
  627. <!-- /.navbar-collapse -->
  628. </div>
  629. <!-- /.container-fluid -->
  630. </nav>
  631.  
  632. <header>
  633. <div class="header-content">
  634. <div class="header-content-inner">
  635. <h1 id="homeHeading">Create, browse and share events !</h1>
  636. <hr>
  637. <p>Want to create events? Just login or register and begin today !</p>
  638. <a href="#about" class="btn btn-primary btn-xl page-scroll">What people think</a>
  639. </div>
  640. </div>
  641. </header>
  642.  
  643.  
  644.  
  645. <section class="no-padding" id="portfolio">
  646. <div class="container-fluid">
  647. <div class="row no-gutter">
  648. <div class="col-lg-6 col-sm-6">
  649. <a href="dogodek.php" class="portfolio-box">
  650. <img src="img/portfolio/thumbnails/1.jpg" class="img-responsive" alt="">
  651. <div class="portfolio-box-caption" >
  652. <div class="portfolio-box-caption-content" >
  653. <div class="project-name" href="dogodek.php">
  654.  
  655. Create Events !
  656.  
  657. </div>
  658. </div>
  659. </div>
  660.  
  661. </a>
  662. </div>
  663. <div class="col-lg-6 col-sm-6">
  664. <a href="img/portfolio/fullsize/2.jpg" class="portfolio-box">
  665. <img src="img/portfolio/thumbnails/2.jpg" class="img-responsive" alt="">
  666. <div class="portfolio-box-caption">
  667. <div class="portfolio-box-caption-content">
  668. <div class="project-name">
  669. Browse Events !
  670. </div>
  671. </div>
  672. </div>
  673. </a>
  674. </div>
  675.  
  676.  
  677.  
  678. </div>
  679. </div>
  680. </section>
  681.  
  682.  
  683.  
  684. <!-- jQuery -->
  685. <script src="vendor/jquery/jquery.min.js"></script>
  686.  
  687. <!-- Bootstrap Core JavaScript -->
  688. <script src="vendor/bootstrap/js/bootstrap.min.js"></script>
  689.  
  690. <!-- Plugin JavaScript -->
  691. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
  692. <script src="vendor/scrollreveal/scrollreveal.min.js"></script>
  693. <script src="vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
  694.  
  695. <!-- Theme JavaScript -->
  696. <script src="js/creative.min.js"></script>
  697.  
  698. </body>
  699.  
  700. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement