Visoka škola strukovnih studija za informacione i komunikacione tehnlogije Boris Gojkovic Dokumentacija Za sajt: pkf.000webhostapp.com Smer: Internget

Слични документи
Microsoft PowerPoint - Primer VI - Sadrzaj

Приручник о полагању матурског испита у образовном профилу Електротехничар информационих технологија - оглед ВЕБ ДИЗАЈН У следећим задацима заокружите

Microsoft PowerPoint - 08_CSS_4.ppt [Compatibility Mode]

Ekonomski fakultet u Osijeku Kolegij: Elektroničko i mobilno poslovanje Nositelj: prof. dr. sc. Branimir Dukić Nastavni materijali za vježbe 3. HTML o

3/20/2018 Prije nastavka! "HTML5" vs HTML W3C maintains HTML5: - More stable version of WHATWG's HTML - Usually copies what WHATWG does after the dust

Ovaj fajl ima 5 stranica. Prvi i drugi domaći zadatak iz Internet tehnologija, Svi css fajlovi su u folderu css a sve slike su u folderu i

P R O G R A M I R A N J E Z A I N T E R N E T Lab. vježba 2 PROGRAMIRANJE ZA INTERNET Upute za laboratorijske vježbe (izradio: Marin Bugarić, Frano Re

PowerPoint Presentation

Sveučilište u Zagrebu PMF Matematički odsjek Mreže računala Vježbe 10 Zvonimir Bujanović Luka Grubišić Vinko Petričević

Microsoft Word - ZAVRÅ€NI RAD_Marko_Golubicek - Analiza metoda i alata kod izrade responzivnih internetskih stranica.docx

12.WT-javaScript-Drupal

Microsoft PowerPoint - 02_HTML_2.ppt [Compatibility Mode]

Podizanje razvojnog okruženja Izbor omiljenog tekst editor-a. Za rad sa HTML-om i CSS-om vam je ponekad dovoljan i najobičniji tekstualni editor poput

Microsoft Word - IWT0906R.doc

Microsoft Word - WP_kolokvij_2_rjesenja.doc

Boostrap.1.1

Microsoft PowerPoint - 6. Query Builder.pptx

NAPOMENA: Studenti na ispit donose kod urađenog zadatka

03 HTML - Programiranje Internet aplikacija

Дистрибуирани софтверски системи Технички факултет "Михајло Пупин" Зрењанин, Универзитет у Новом Саду Практикум за лабораторијске вежбе #07 [нерецензи

Дистрибуирани софтверски системи Технички факултет "Михајло Пупин" Зрењанин, Универзитет у Новом Саду Практикум за лабораторијске вежбе #05 [нерецензи

Microsoft PowerPoint - 04_HTML_5.ppt [Compatibility Mode]

Microsoft PowerPoint - PZI 07.ppt

Microsoft PowerPoint - 6. CMS [Compatibility Mode]

SELECT statement basic form

SVEUČILIŠTE U RIJECI TEHNIČKI FAKULTET Preddiplomski sveučilišni studij računarstva Završni rad WEB APLIKACIJA ZA PREZENTACIJU I REZERVACIJE TURISTIČK

BUG.HR mediakit 2018

WordPress & CSP Polisa Sigurnosti Sadržaja za WordPress Milan Petrović WordCamp Niš

Web programiranje i primjene - Osnovni pojmovi WEB tehnologije korišteni u kolegiju

Microsoft Word - Uputstvo za upotrebu studentskih servisa.doc

PowerPoint Presentation

Microsoft Word - Uputstvo za upotrebu studentskih servisa.doc

Primenjeno programiranje - vezbe GUI i baze podataka

Osnove HTML jezika

Upute-podesavanj -accounta

Univerzitet u Beogradu Mašinski fakultet Konstrukcija i tehnologija proizvodnje letelica PODEŠAVANJE PROGRAMSKOG PAKETA CATIA V5 Miloš D. Petrašinović

Primenjeno programiranje - Vežbe

Materijal za vežbe iz Web programiranja, IMI PMF Kragujevac Web programiranje Vežbe 5 - Funkcije i OOP Funkcije Funkcije se definišu koristeći ključnu

Pisanje i čitanje bez vizualnog ometanja

Uputstvo za upotrebu studentskih servisa - gef

Funkcije predavač: Nadežda Jakšić

Slide 1

Uputstvo za upotrebu studentskih servisa - gef

Laboratorija za termičku obradu Inženjerstvo površina Kratko uputstvo za obradu i analizu profila u programskom paketu SPIP Programski paket SPIP preu

CPHP_19

Fra Serafina Schoena Rijeka MB: MBO: Žiro račun: kod RBA d.d. GSM:

n50

SVEUČILIŠTE U ZAGREBU FAKULTET ORGANIZACIJE I INFORMATIKE V A R A Ž D I N Helena Hečimović RESPONZIVNI WEB DIZAJN ZAVRŠNI RAD Varaždin, 2018.

Programski jezici i strukture podataka 2018/2019. Programski jezici i strukture podataka Računarske vežbe vežba 10 Zimski semestar 2018/2019. Studijsk

Računarski praktikum II - Predavanje 02 - HTML forme. Git.

Upute za instaliranje WordPressa 1.KORAK Da biste instalirali Wordpress, najprije morate preuzeti najnoviju verziju programa s web stranice WordPressa

Microsoft PowerPoint - OOPpredavanja05 [Compatibility Mode]

Microsoft Word - i.doc

Microsoft Word - MySQL_3.doc

PRONALAZENJE I PROVERA PREMIUM COOKIES POMOCU COOKIES CHECKERA Takodje mozete jednostavno pronalaziti zeljene premijum kalacice i proveravati validnos

Baze podataka MySQL Community Server i MySQL Workbench

R u z v e l t o v a 5 5, B e o g r a d, t e l : ( ) , m a i l : c o n t a c p s i t. r s, w w w. p s i t. r s

Baza fakultet sadrži 3 tabele: tabela studenti sadrzi informacije o studentima Njeni atributi su: indeks indeks studenta (primarni kljuc) ime ime stud

Microsoft Word - SYLLABUS -Dinamicki

HTML - PODSEĆANJE HyperText Markup Language Osnove HTML-A Web dizajn HTML predstavlja jezik za označavanje hiperteksta i hipermedija (teksta, slike, z

JMBAG Ime i Prezime Mreže računala Završni ispit 16. veljače Na kolokviju je dozvoljeno koristiti samo pribor za pisanje i službeni šalabahter.

Microsoft PowerPoint - vjezba_03_0809_WWWBR (1) [Compatibility Mode]

Introduction to Programming

ВИСОКА МЕДИЦИНСКА ШКОЛА ЗДРАВСТВА ДОБОЈ ПРАВИЛНИК О ЗАВРШНОМ РАДУ Добој, март године

SVEUČILIŠTE U ZADRU Odjel za promet i pomorstvo Primjena računala Vježba 3 Web preglednici Agenda Internet i internet protokoli Klijentsko

Filesonic,Fileserve,Hotfile...premium download pomocu cookiesa

QlikView Training

Božo Online upute

No Slide Title

RSS RSS Really Simple Syndication - veoma jednostavno povezivanje - Predstavlja jednostavan način za auto atsko preuzi a je želje ih informacija sa Va

Microsoft PowerPoint - Rittal konfigurator 2019_prezentacija__HR

SVEUČILIŠTE JOSIPA JURJA STROSSMAYERA U OSIJEKU FAKULTET ELEKTROTEHNIKE, RAČUNARSTVA I INFORMACIJSKIH TEHNOLOGIJA Sveučilišni studij WEB APLIKACIJA ZA

Upute za korištenje EasyChair konferencijskog sustava HRO CIGRE 2019 Prijava referata Ako ste već koristili EasyChair na 13. Savjetovanju ili prije ta

PHP kod

Microsoft PowerPoint - 11_JavaScript_1.ppt [Compatibility Mode]

ELEKTROTEHNIČKI FAKULTET UNIVERZITETA U BEOGRADU VEB TUTORIJAL ZA SQL JEZIK Master rad Kandidat: Simon Tadić 2016/3219 Mentor: vanr.prof. dr Zoran Čič

Uputstvo za podešavanje za pristup eduroam servisu za Mac OS X Snow Leopard Copyright AMRES

Ekonomski fakultet u Osijeku Kolegij: Elektroničko i mobilno poslovanje Nositelj: prof. dr. sc. Branimir Dukić Zadaci za vježbe 7. JavaScript - zadaci

Biz web hosting

УПУТСТВО ЗА КОРИСНИКА Приступ локацији часописа Српски архив за целокупно лекарство добија се преко internet adrese: Након

Metodolosko uputstvo Internet registra medicinske opreme

Razvoj programa, Code::Blocks, struktura programa, printf, scanf, konverzioni karakteri predavač: Nadežda Jakšić

Fakultet tehničkih nauka, Novi Sad Predmet: ISIBP

PowerPoint Presentation

Introduction to Programming

Uvod u računarstvo 2+2

PowerPoint Presentation

УПУТСТВО ЗА КОРИСНИКА Приступ локацији часописа Српски архив за целокупно лекарство добија се преко internet adrese: Након

NSZ-GS7

Introduction to Programming

Microsoft PowerPoint - Datoteke [Compatibility Mode]

LAB 4 - Binarni komparator

Microsoft Word - Document1

Електротехнички факултет Универзитета у Београду Катедра за рачунарску технику и информатику ИР3ПИА - Пројекат из предмета Програмирање интернет аплик

Транскрипт:

Visoka škola strukovnih studija za informacione i komunikacione tehnlogije Boris Gojkovic Dokumentacija Za sajt: pkf.000webhostapp.com Smer: Internget tehnologije Modul: Web programiranje Predemet: web programiranje php2 Beograd, Februar 2018. godine

1.Uvod Korišćeni programski jezici 1.1 Opis funkcionalnosti 1.2 Template 1.3.1 index 1.3.2 ostale 1.3 Korišćeni CSS 2. Organizacija 2.1 Ogranizaciona šema 2.2 Mapa sajta 2.3 Slike stranica i opis funkcionalnosti 2.3.1 index 2.3.2 shop 2.3.3 music 2.3.4 login 2.3.5 profile 2.3.6 gallery 2.3.7 adminpanel 2.3.8 author 3. Kodovi 3.1. PHP 3.1.1 index.php 3.1.2 shop.php 3.1.3. music.php 3.1.4 gallery.php 3.1.5 login.php 3.1.6 profile.php 3.1.7 adminpanel.php 3.1.8 getcat.php 3.1.9 header.php 3.1.10 header2.php 3.1.11. anketa.php 3.1.12 konekcija.php 3.1.13 logout.php 3.1.14 author.php 3.2. CSS 3.2.1 style.css 3.3. Javascript/jquery 3.3.1 jquery.js 4. Dizajn baze

1. Uvod 1.1 Korišćeni programski jezici Za izradu sajta korišćeni su: html, css, javascript, jquery, php. Sav kod je pisan u notepade++-u. 1.2 Opis funkcionalnosti U zavisnosti da li je korisnik ulogovan prikazuje mu se razlicit meni koji se importuje iz baze, ulogovani korisnici vide link Profile, dok neulogovani na tom mestu vide link Log In/Reg. Na stranici galerija se iz baze ucitavaju slike, klikom na bilo koju od malih slika, ista ta u velikom formatu se prikazuje jquerry efektom, na ovoj stranici je uradjeno stranicenje. Na stranici muzika I prodavnica se importuje sadrzaj iz baze podataka, a na stranici prodavnica samo ulogovani korisnici vide I u mogucnosti su da naruce artikal, sve to rade izborom iz padajuce liste koja radi sa AJAXom I bazom podataka. U adminpanelu, koji je dostupan samo administratorima, moguce je izbrisati, dodati I ili izmeniti korisnika, artikal u prodavnici, ili slike u galeriji. Preko admin panela nije moguce menjati linkove u meniju, zato sto smatram da je ova struktura idealna I nema smisla to menjati, a radi se na isti nacin kao sve. Index stranica je staticka I uvek ista. 1.3 Template 1.3.1 index <?php session_start();

?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> </head> <body> <div id="wrapper"> <?php

if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="content"> <div id="contenttop"> <div id="ifleft"> allowfullscreen></iframe> <iframe src="https://www.youtube.com/embed/ss8mzakaliw" <div id="ifright"> allowfullscreen></iframe> <iframe src="https://www.youtube.com/embed/qub1tsza9t0" <div id="contentb"> <div class="contentc"> <a href="http://paulkalkbrenner.net/home/" target="_blank"> <img src="slike/site.jpg" alt="paulkalkbrenner"/> <p>official website of Paul Kalkbrenner</p> </a> <div class="contentc">

<a href="http://www.imdb.com/title/tt0211946/?ref_=nv_sr_1" target="_blank"> <img src="slike/berlincalling.jpg" alt="berlin Calling" /> Kalkbrenner)</p> <p>berlin Calling is a movie about DJ and producer Ickarus(Paul </a> <div class="contentc"> <a href="https://en.wikipedia.org/wiki/paul_kalkbrenner" target="_blank"> <img src="slike/paulkalkbrenner.jpg" alt="paulkalkbrenner" /> <p>wikipedia page about biography, career, family, discography...</p> </a> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a>

</li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </ul> </li> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer>

</body> </html> 1.3.2 ostale

Sve ostale stranice imaju istu strukturu, samo se menja sadrzaj u centralnom divu. 1.4 Nema tuđeg CSS koda.

2 Organizacija 2.1 Organizaciona šema 2.2 Mapa sajta <?xml version="1.0" encoding="utf-8"?> <urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9 xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <!-- created with Free Online Sitemap Generator www.xml-sitemaps.com --> <url> <loc>http://pkf.000webhostapp.com/</loc> </url> <url> <loc>http://pkf.000webhostapp.com/index.php</loc> </url> <url> <loc>http://pkf.000webhostapp.com/shop.php</loc> </url> <url>

<loc>http://pkf.000webhostapp.com/music.php</loc> </url> <url> <loc>http://pkf.000webhostapp.com/gallery.php</loc> </url> <url> <loc>http://pkf.000webhostapp.com/login.php</loc> </url> <url> <loc>http://pkf.000webhostapp.com/author.php</loc> </url> <url> <loc>http://pkf.000webhostapp.com/gallery.php</loc> </url> </urlset>

2.3 Slike stranica i opis funkcionalnosti 2.3.1 index.php Stranica je staticka, uvek ista, s tim da ulogovani korisnici u meniju vide Profile, a neulogovani Log in/ Reg.

2.3.2 Shop.php Na osnovu izabranog iz padajuce liste, putem AJAXa se ucitava sadrzaj iz baze podataka, ulogovani korisnici su u mogucnosti da naruce artikal, dok neulogovani ne vide link za narucivanje.

2.3.3 music.php Struktura ista kao na svim stranicama, postoji centralni div u kom je sadrzaj, sav sadrzaj se ucitava iz baze podataka.

2.3.4 login.php Struktura ista kao na svim stranicama, postoji centralni div u kom je sadrzaj, logovanjem na ovoj stranici korisnik se usmjerava ka profil.php, novi korisnici se mogu registrovati u formi ispod I odmah nakon toga ulogovati na sajt.

2.3.5 profile.php Sadrzaj je isti, sadrzaj je u jednom centralnom divu, korisniku se ispisuju njegovi podaci iz baze, sa desne strane nalazi se radiobutton anketa, kao I polje gde se moze dati komentar.

2.3.6 gallery.php

Struktura je ista kao na ostalim stranicama, sadrzaj se nalazi u centralnom divu, sadrzaj se ucitava iz baze podataka. Na ovoj webstrani je uradjeno stranicenje.

2.3.7 author.php Stranica sa statickim sadrzajem.

2.3.8 adminpanel.php Prvi deo adminpanela, na kom je moguce uneti novog, izmeniti ili izbrisati postojeceg korisnika. Adminpanel je zasticen da mogu samo administratori da pristupe I vide sadrzaj.

Drugi deo adminpanela, vezan za galeriju. Ovde je moguce izbrisati sliku iz galerije, ili dodati novu sliku u galeriju

Treci deo adminpanela u kom se mogu izmeniti dodati novi ili izbrisati artikli iz prodavnice.

3. Kodovi 3.1 PHP 3.1.1 index <?php session_start();?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="content"> <div id="contenttop"> <div id="ifleft"> <iframe src="https://www.youtube.com/embed/ss8mzakaliw" allowfullscreen></iframe> <div id="ifright"> <iframe src="https://www.youtube.com/embed/qub1tsza9t0" allowfullscreen></iframe>

<div id="contentb"> <div class="contentc"> <a href="http://paulkalkbrenner.net/home/" target="_blank"> <img src="slike/site.jpg" alt="paulkalkbrenner"/> target="_blank"> Kalkbrenner)</p> target="_blank"> <p>official website of Paul Kalkbrenner</p> </a> <div class="contentc"> <a href="http://www.imdb.com/title/tt0211946/?ref_=nv_sr_1" <img src="slike/berlincalling.jpg" alt="berlin Calling" /> <p>berlin Calling is a movie about DJ and producer Ickarus(Paul </a> <div class="contentc"> <a href="https://en.wikipedia.org/wiki/paul_kalkbrenner" <img src="slike/paulkalkbrenner.jpg" alt="paulkalkbrenner" /> <p>wikipedia page about biography, career, family, discography...</p> </a> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/"

target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> </footer> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </body> </html

3.1.2 shop.php <?php session_start();?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> <script> function showcat(str) { if (str == "") { document.getelementbyid("shopb").innerhtml = ""; return; else { if (window.xmlhttprequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onreadystatechange = function() { if (this.readystate == 4 && this.status == 200) { document.getelementbyid("shopb").innerhtml = this.responsetext; ; xmlhttp.open("get","getcat.php?q="+str,true); xmlhttp.send(); </script> </head> <body>

<div id="wrapper"> <?php if(isset($_session['iduloge'])){ else {?> include("header2.php"); include("header.php"); <section id="content"> <div id="shopa"> <h3>choose a category</h3> <select id="ddlshop" name="ddlshop" onchange="showcat(this.value)"> <option value="0">choose...</option> <?php $upit = "SELECT * FROM prodavnicakategorije"; $rez = mysqli_query($konekcija, $upit); while($r = mysqli_fetch_array($rez)) { echo "<option value='".$r['idkategorije']."'>".$r['nazivkategorije']."</option>";?> </select> <div id="shopb"> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner"

target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> </footer> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </body> </html>

3.1.3 music <?php session_start();?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <script src="jquery.innerfade.js"></script> <script src="mojjquery.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> </head> <body> <div id="wrapper"> <?php

if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="content"> <h1 class="alb"> Albums: </h1> <?php include("konekcija.php"); $upit = "SELECT * FROM muzika"; $rez = mysqli_query($konekcija, $upit); while($r=mysqli_fetch_array($rez)){ echo " <div class='klasa'> <img src='".$r['putanjaslike']."'/> <p> NAME: ".$r['ime']." </br> YEAR: ".$r['godina']." </br> </a> </p> LABEL: ".$r['label']." ";?> </section>

<footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span>

<div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer> </body> </html> 3.1.4 gallery <?php session_start();?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <script src="jquery.innerfade.js"></script>

<script src="mojjquery.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> <link rel="stylesheet" type="text/css" href="jquery.lightbox-0.5.css" media="screen"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.lightbox-0.5.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#content a.aa').lightbox(); ); </script> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php");

else { include("header.php");?> <section id="content"> <div id=glrj> <?php $koliko_po_strani = 9; if(isset($_get['skriveno'])) { $skriveno = $_GET['skriveno']; else {$skriveno = 0; include ("konekcija.php"); $upit = mysqli_query($konekcija, "SELECT count(idslike) from slike"); $niz = mysqli_fetch_array($upit); $ukupno_zapisa = $niz[0]; $levo = $skriveno - $koliko_po_strani; $desno = $skriveno + $koliko_po_strani; // Zaglavlje tabele sa navigacijom echo ("<table width=\"200px\"><tr><td width=\"70px\">"); if($levo<0){

echo (" Home </td><td width=\"70px\"><a href=\"gallery.php?skriveno=$desno\"> Next </a>"); elseif($desno > $ukupno_zapisa){ echo (" <a href=\"gallery.php?skriveno=$levo\">previous</a></td><td width=\"70px\"> End "); else { echo ("<a href=\"gallery.php?skriveno=$levo\"> Prethodni </a></td> <td width=\"70px\"><a href=\"gallery.php?skriveno=$desno\"> Naredni </a>"); echo ("</td></tr>"); $rezultat = mysqli_query($konekcija, "SELECT text FROM test LIMIT $koliko_po_strani OFFSET $skriveno "); $upit="select * FROM slike LIMIT $koliko_po_strani OFFSET $skriveno"; $rez=mysqli_query($konekcija, $upit); while($r=mysqli_fetch_array($rez)){ echo " <a class='aa' href='".$r['putanjaslike']."'><img src='".$r['putanjaslike']."'/></a> "; echo "</table>";?> </section>

<footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span>

<div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer> </body> </html> 3.1.5 login.php <?php session_start(); include("konekcija.php"); if(isset($_request['btnsubmit'])){ $username = $_REQUEST['tbUser']; $password = $_REQUEST['tbPass']; $upit = "SELECT * FROM korisnici k JOIN uloge u ON k.iduloge=u.iduloge WHERE Username='$username'

AND Password = '$password'"; $rez = mysqli_query($konekcija, $upit); if(mysqli_num_rows($rez) == 0) { echo "Mistake :("; else { $r = mysqli_fetch_array($rez); $_SESSION['IDUloge'] = $r['iduloge']; $_SESSION['Uloga'] = $r['nazivuloge']; $_SESSION['Username'] = $r['username']; $_SESSION['Ime'] = $r['ime']; $_SESSION['Prezime'] = $r['prezime']; $_SESSION['Mail'] = $r['mail']; switch($_session['uloga']) { case 'administrator': header("location: profil.php"); break; case 'korisnik': header("location: profil.php");

break;?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> <script>

function ispisgreske(obj) { $(obj).addclass("greska"); greske=true; $(obj).next('.opis_greske').text("mistake!"); $(document).ready(function(){ $("#btnprijavi").click(function(){ greske=false; var username = $("#tbnewuser").val(); var formaime=$("#tbime").val(); var formaprezime=$("#tbprezime").val(); var formaemail=$("#tbemail").val(); var formalozinka1=$("#tblozinka1").val(); var formalozinka2=$("#tblozinka2").val(); $("input").removeclass("greska"); $("select").removeclass("greska"); $(".opis_greske").text(" "); var reuser=/^[a-za-z0-9]{2,20$/; var reime=/^[a-z][a-z]{2,19$/; var reprezime=/^[a-z][a-z]{3,40$/; var reemail=/^\w+@[a-za-z_]+?\.[a-za-z]{2,3$/; var relozinka=/^[\w]{5,20$/; if(!reuser.test(username)) { ispisgreske("#tbnewuser");

if(!reime.test(formaime)) { ispisgreske("#tbime"); if(!reprezime.test(formaprezime)) { ispisgreske("#tbprezime"); if(!reemail.test(formaemail)) { ispisgreske("#tbemail"); if(!relozinka.test(formalozinka1)) { ispisgreske("#tblozinka1"); if(!relozinka.test(formalozinka2)) { ispisgreske("#tblozinka2"); if(formalozinka1!=formalozinka2) { ispisgreske("#tblozinka1"); ispisgreske("#tblozinka2"); ); ); var forma = document.getelementbyid('forma');

forma.action = "login.php?btnprijavi=1"; forma.submit(); </script> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="content"> <div id="login"> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="forma" id="forma"> <table style="width:500px; margin:0 auto;"> <tr> <th colspan="2" class="naslov"><h3>log in:</h3></th> </tr> <tr> <td>username:</td> <td>

<input type="text" class="styled" name="tbuser" /> </td> </tr> <tr> <td>password:</td> <td> <input type="password" class="styled" name="tbpass"/> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="prijavi" class="button" name="btnsubmit" /> </td> </tr> </table> </form> <div id="reg"> <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" id="forma" name="forma" onsubmit="return validateform()"> <table class="tabela"> <tr> <th colspan="2" class="naslov"><h3>register now:</h3></th> </tr> <tr> <td class="naziv">username</td> <td> <input type="text" class="text-box" id="tbnewuser" name="tbnewuser" /> <div class="opis_greske"> </td> <tr> <td class="naziv">name</td>

<td> <input type="text" class="text-box" id="tbime" name="tbime" /> <div class="opis_greske"> </td> </tr> <tr> <td class="naziv">surname</td> <td> <input type="text" class="text-box" id="tbprezime" name="tbprezime"/> <div class="opis_greske"> </td> </tr> <tr> <td class="naziv">e-mail:</td> <td> <input type="text" class="text-box" id="tbemail" name="tbemail" /> <div class="opis_greske"> </td> </tr> <tr> <td class="naziv">password:</td> <td> <input type="password" class="text-box" id="tblozinka1" name="tblozinka1" /> <div class="opis_greske"> </td> </tr> <tr> <td class="naziv">password again:</td> <td> <input type="password" class="text-box" id="tblozinka2" name="tblozinka2"/> <div class="opis_greske"> </td> </tr>

<tr> <td colspan="2" align="center"> <input type="submit" value="submit" class="dugme" name="btnprijavi" id="btnprijavi" /> <input type="reset" value="reset" class="dugme" id="btnponisti" /> </td> </tr> </table> </form> <?php if(isset($_request['btnprijavi'])){ $user= $_REQUEST['tbNewUser']; $ime = $_REQUEST['tbIme']; $prezime = $_REQUEST['tbPrezime']; $mail = $_REQUEST['tbEmail']; $pass = $_REQUEST['tbLozinka1']; $pass2 = $_REQUEST['tbLozinka2']; $a=2; $greske = array(); $reime="/^[a-z][a-z]{2,19$/"; $reprezime="/^[a-z][a-z]{3,40$/"; $reemail="/^\w+@[a-za-z_]+?\.[a-za-z]{2,3$/"; $relozinka="/^[\w]{5,20$/"; if(!preg_match($reime, $ime)){ $greske[] = "Mistake 1"; if(!preg_match($reprezime, $prezime)){ $greske[] = "Mistake 2"; if(!preg_match($reemail, $mail)){

$greske[] = "Mistake"; if(!preg_match($relozinka, $pass)){ $greske[] = "Mistake"; if(count($greske)!= 0){ echo "Correct your mistakes!"; else { $upit_upis="insert INTO korisnici VALUES ('', '$ime', '$prezime', '$user', '$pass', '$mail', $a)"; $rez_upis = mysqli_query($konekcija, $upit_upis); if(!$rez_upis) { echo "Mistake - "; else { echo "Excellent, now you can log in!";

?> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li>

</ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer> </body> </html> 3.1.6 profil.php <?php session_start(); if(!isset($_session['iduloge']))

{ header('location:index.php');?> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> <script> function getvote(int) { if (window.xmlhttprequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); else { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

xmlhttp.onreadystatechange=function() { if (this.readystate==4 && this.status==200) { document.getelementbyid("poll").innerhtml=this.responsetext; xmlhttp.open("get","anketa.php?vote="+int,true); xmlhttp.send(); </script> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="contentp"> <div id="prof"> <?php include("konekcija.php"); $username = $_SESSION['Username']; $ime = $_SESSION['Ime'];

$prezime = $_SESSION['Prezime']; $mail = $_SESSION['Mail']; echo "<h3>hello, ".$username."</h3>"; echo "<h3>".$ime." ".$prezime."</h3>"; echo "<h3>".$mail."</h3>"; echo "<h3>".@date('d.m.y.')."</h3>"; echo "<h3><a href='logout.php'>log out!</a></h3>"; if($_session['iduloge']==1){ echo "<h3><a href='adminpanel.php'>admin panel</a></h3>";?> <div id="poll"> <h3>do you like this webpage?</h3> <form> Yes: <input type="radio" name="vote" value="0" onclick="getvote(this.value)"/> <br>no: <input type="radio" name="vote" value="1" onclick="getvote(this.value)"/> </form> <form class="ta" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>"> <textarea name="takomentar" cols="30" rows="5"></textarea><br/> <input type="submit" name="aaa" value="give us a comment!"/>

</form> <?php if(isset($_request['aaa'])){ include("konekcija.php"); $komentar=$_post['takomentar']; $user=$_session['iduloge']; $upit="insert INTO komentari VALUES ('','$komentar', $user)"; $rez=mysqli_query($konekcija, $upit); if(!$rez) { echo ""; else { echo "Thank you! :)";?> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a">

<li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer>

</body> </html> 3.1.7 adminpanel.php <?php session_start(); if($_session['iduloge']!=1){ header('location:index.php'); //brisanje korisnika if(isset($_post["brisi-kor"])) { $zabrisanje=$_post["brisanje"]; include("konekcija.php"); foreach($zabrisanje as $brisi){ $upit="delete FROM korisnici WHERE IDKorisnika=$brisi"; $rez_brisi=mysqli_query($konekcija, $upit) or die("greska BRISI korisnika!"); // editovanje korisnika if(isset($_post["editkor"])){

include("konekcija.php"); $id_save_edited=$_post["ideditsave"]; $novoime=$_post["novoime"]; $novoprezime=$_post["novoprezime"]; $novimail=$_post["novimail"]; $noviuser=$_post["noviuser"]; $novipass=$_post["novipass"]; $novauloga=$_post["novauloga"]; if(empty($novipass)){ $upit="update korisnici SET Ime='$novoime', Prezime='$novoprezime', Mail='$novimail', Username='$noviuser', IDUloge=$novauloga WHERE IDKorisnika=$id_save_edited"; $rez=mysqli_query($konekcija, $upit) or die("greska upit EDIT SAVE!"); else{ $upit1="update korisnici SET Ime='$novoime', Prezime='$novoprezime', Mail='$novimail', Username='$noviuser', Password='$novipass', IDUloge=$novauloga WHERE IDKorisnika=$id_save_edited"; $rez=mysqli_query($konekcija, $upit) or die("greska upit EDIT SAVE!"); // upis korisnika if(isset($_request['btnprijavi'])){ include("konekcija.php"); $user= $_REQUEST['tbNewUser'];

$ime = $_REQUEST['tbIme']; $prezime = $_REQUEST['tbPrezime']; $mail = $_REQUEST['tbEmail']; $pass = $_REQUEST['tbLozinka1']; $a=$_request['a']; $upit_upis="insert INTO korisnici VALUES ('', '$ime', '$prezime', '$user', '$pass', '$mail', $a)"; $rez_upis = mysqli_query($konekcija, $upit_upis); { // brisanje slika if(isset($_post["brisislike"])) $zabrisanje=$_post["brisanjes"]; include("konekcija.php"); foreach($zabrisanje as $brisi){ $upit="delete FROM slike WHERE IDSlike=$brisi"; $rez_brisi=mysqli_query($konekcija, $upit) or die("greska BRISI korisnika!"); // brisanje artikala if(isset($_post["brisiartikle"])) { $zabrisanje=$_post["brisanjea"]; include("konekcija.php");

foreach($zabrisanje as $brisi){ $upit="delete FROM prodavnica WHERE IDArtikla=$brisi"; $rez_brisi=mysqli_query($konekcija, $upit) or die("greska BRISI korisnika!"); //editovanje artikala if(isset($_post["editprod"])){ include("konekcija.php"); $id_save_editeda=$_post["ideditsavea"]; $novinaziv=$_post["novinaziv"]; $novacena=$_post["novacena"]; $novakategorija=$_post["novakategorija"]; $imeslike = $_FILES['novaslika']['name']; $tmpslike = $_FILES['novaslika']['tmp_name']; $putanjaslike = "slike/prodavnica/".$imeslike; if(move_uploaded_file($tmpslike, $putanjaslike)) { $upit="update prodavnica SET NazivArtikla='$novinaziv', Cena=$novacena, IDKategorije='$novakategorija', PutanjaSlike='$putanjaSlike' WHERE IDArtikla=$id_save_editeda"; $rez=mysqli_query($konekcija, $upit) or die("greska upit EDIT SAVE!");

// unos artikala if(isset($_request['unesia'])){ include("konekcija.php"); $imeartikla= $_REQUEST['tbnaziv']; $cenaartikla = $_REQUEST['tbcena']; $idkategorije = $_REQUEST['tbkat']; $imeslike = $_FILES['slikap']['name']; $tmpslike = $_FILES['slikap']['tmp_name']; $putanjaslikea = "slike/prodavnica/".$imeslike; if(move_uploaded_file($tmpslike, $putanjaslikea)) { $idkategorije)"; $upit_upis="insert INTO prodavnica VALUES ('', '$imeartikla', '$putanjaslikea', $cenaartikla, $rez_upis = mysqli_query($konekcija, $upit_upis);?> <!DOCTYPE html> <html> <head>

<meta charset="utf-8" /> <title>paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="shortcut icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus"/> <meta name="author" content="boris Gojković"/> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?> <section id="contentad">

<div id="korisnici"> <h1>korisnici</h1> <?php include("konekcija.php"); IDKorisnika"; $upit="select * FROM korisnici k inner join uloge ul on k.iduloge=ul.iduloge order by $rez=mysqli_query($konekcija, $upit) or die("greska upit KORISNICI! "); if(mysqli_num_rows($rez)>0){ echo "<form action='adminpanel.php' method='post'>"; echo "<table><tr><th>ime</th><th>prezime</th><th>username</th><th>uloga</th><th>delete</th><th>edit</th> </tr>"; while($r=mysqli_fetch_array($rez)){ echo "<tr><td>".$r['ime']."</td> <td>".$r['prezime']."</td> <td>".$r['username']."</td> <td>".$r['nazivuloge']."</td> <td><input type='checkbox' name='brisanje[]' value='".$r['idkorisnika']."'></td> <td><a href='adminpanel.php?idedit=".$r['idkorisnika']."'>change</a></td></tr>"; echo "<tr><td colspan='6' align='center'><input type='submit' name='brisi-kor' value='delete' id='btndelete' /></td></tr> </table></form>"; else{ echo "No users...";

?> <div id="korisnikedit"> <?php include("konekcija.php"); if(isset($_get["idedit"])){ $id_edit=$_get["idedit"]; WHERE IDKorisnika=$id_edit"; $upit="select * FROM korisnici k inner join uloge ul on k.iduloge=ul.iduloge $rez=mysqli_query($konekcija, $upit) or die("greska upit PODACI korisnik! "); if(mysqli_num_rows($rez)>0){ $r=mysqli_fetch_array($rez); echo "<h1>edit:</h1>"; echo "<table><form action='adminpanel.php' method='post'>"; echo "<input type='hidden' name='ideditsave' value='".$id_edit."'>"; echo "<tr><td>ime: </td><td><input type='text' name='novoime' value='".$r["ime"]."' /></td></tr>"; echo "<tr><td>prezime: </td><td><input type='text' name='novoprezime' value='".$r["prezime"]."' /></td></tr>"; echo "<tr><td>email: </td><td><input type='text' name='novimail' value='".$r["mail"]."' /></td></tr>"; echo "<tr><td>username: </td><td> <input type='text' name='noviuser' value='".$r["username"]."'></td></tr>"; echo "<tr><td>password: </td><td> <input type='password' name='novipass' value='' placeholder='enter new...' /></td></tr>"; echo "<tr><td>uloga: </td><td><input type='text' name='novauloga' value='".$r["iduloge"]."' /></td></tr>"; echo "<tr><td>naziv uloga: </td><td> <input type='text'

value='".$r["nazivuloge"]."' disabled />"; echo "<tr><td colspan='2' align='center'><input type='submit' name='editkor' value='edit' id='btnedit' /></td></tr>"; echo "</table></form>"; else{ echo "Korisnik ne postoji!?";?> <div id="korisniciupis"> <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" id="forma" name="forma"> <table> <tr> <th colspan="2" ><h1>novi korisnik:</h1></th> </tr> <tr> <td class="naziv">username</td> <td> <input type="text" class="text-box" id="tbnewuser" name="tbnewuser" /> </td> <tr> <td class="naziv">ime</td> <td> <input type="text" class="text-box" id="tbime" name="tbime" /> </td> </tr> <tr> <td class="naziv">prezime</td> <td> <input type="text" class="text-box" id="tbprezime" name="tbprezime"/> </td>

</tr> <tr> <td class="naziv">e-mail:</td> <td> <input type="text" class="text-box" id="tbemail" name="tbemail" /> </td> </tr> <tr> <td class="naziv">password:</td> <td> <input type="password" class="text-box" id="tblozinka1" name="tblozinka1" /> </td> </tr> <tr> <td class="naziv">1-admin, 2-User:</td> <td> <input type="text" class="text-box" name="a"/> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="unesi u bazu" class="dugme" name="btnprijavi" id="btnprijavi" /> <input type="reset" value="reset" class="dugme" id="btnponisti" /> </td> </tr> </table> </form>

<div id="slikea"> <h1>slike</h1> <div id="slikebr"> <?php include("konekcija.php"); $upit = "SELECT * FROM slike"; $rez=mysqli_query($konekcija, $upit); echo "<form action='adminpanel.php' method='post'>"; echo "<table><tr><th>slika</th><th>delete</th></tr>"; while($r=mysqli_fetch_array($rez)){ echo "<tr><td><img src='".$r["putanjaslike"]."' /></td>"; echo "<td><input type='checkbox' name='brisanjes[]' value='".$r['idslike']."'></td></tr>"; echo "<tr><td colspan='2' align='center'><input type='submit' name='brisislike' value='delete' id='btndelete' /></td></tr> </table></form>";?> <div id="slikeupis"> <form method="post" action="adminpanel.php" enctype="multipart/form-data"> <table> <tr><td colspan="1" align="center">unesi sliku:</td></tr> <tr><td><input type="file" class="styled" name="fslika"/></td></tr> <tr><td colspan="1" align="center"> <input type="submit" value="upload" name="btnslika"/></td></tr> </table>

</form> <?php if(isset($_post["btnslika"])){ include("konekcija.php"); $imeslike = $_FILES['fSlika']['name']; $tmpslike = $_FILES['fSlika']['tmp_name']; $putanjaslike = "slike/gallery/".$imeslike; if(move_uploaded_file($tmpslike, $putanjaslike)) { $upit = "INSERT INTO slike VALUES('', '$putanjaslike')"; $rez_upis = mysqli_query($konekcija, $upit); if(!$rez_upis) { echo "Greska prilikom upisa - "; else { echo "Podaci su upisani!"; else { echo "Greska prilikom upload-a slike!";

?> <div id="zameni"> <h1>prodavnica</h1> <?php include("konekcija.php"); $upit = "SELECT * FROM prodavnica p INNER JOIN prodavnicakategorije pk ON p.idkategorije=pk.idkategorije"; $rez=mysqli_query($konekcija, $upit); echo "<form action='adminpanel.php' method='post'>"; echo "<table><tr><th>slika</th><th>naziv Artikla</th><th>Cena</th><th>Kategorija</th><th>Delete</th><th>Edit</th></tr>"; while($r=mysqli_fetch_array($rez)){ echo "<tr><td><img src='".$r["putanjaslike"]."' /></td> <td>".$r['nazivartikla']."</td> <td>".$r['cena']."</td> <td>".$r['nazivkategorije']."</td> <td><input type='checkbox' name='brisanjea[]' value='".$r['idartikla']."'></td> <td><a href='adminpanel.php?idedita=".$r['idartikla']."'>change</a></td></tr>"; echo "<tr><td colspan='5' align='center'><input type='submit' name='brisiartikle' value='delete' id='btndelete' /></td></tr> </table></form>";

?> <div id="zamenii"> <?php include("konekcija.php"); if(isset($_get["idedita"])){ $id_edita=$_get["idedita"]; $upit = "SELECT * FROM prodavnica p INNER JOIN prodavnicakategorije pk ON p.idkategorije=pk.idkategorije WHERE IDArtikla=$id_edita"; $rez=mysqli_query($konekcija, $upit) or die("greska upit PODACI korisnik! "); if(mysqli_num_rows($rez)>0){ $r=mysqli_fetch_array($rez); echo "<h1>edit:</h1>"; echo "<table><form action='adminpanel.php' method='post' enctype='multipart/form-data'>"; echo "<input type='hidden' name='ideditsavea' value='".$id_edita."'>"; echo "<tr><td>ime: </td><td><input type='text' name='novinaziv' value='".$r["nazivartikla"]."' /></td></tr>"; echo "<tr><td>cena: </td><td><input type='text' name='novacena' value='".$r["cena"]."' /></td></tr>"; echo "<tr><td>slika: </td><td><input type='file' name='novaslika' /></td></tr>"; echo "<tr><td>kategorija: </td><td><input type='text' name='novakategorija' value='".$r["idkategorije"]."' /></td></tr>"; echo "<tr><td>naziv kategorije: </td><td> <input type='text' value='".$r["nazivkategorije"]."' disabled />"; echo "<tr><td colspan='2' align='center'><input type='submit' name='editprod' value='edit' id='btnedit' /></td></tr>"; echo "</table></form>";

else{ echo "Artikli ne postoje";?> <div id="upisprodavnica"> <form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" id="forma" name="forma" enctype='multipart/form-data'> <table> <tr> <th colspan="2" ><h1>upis artikala:</h1></th> </tr> <tr> <td class="naziv">naziv artikla</td> <td> <input type="text" class="text-box" id="tbnaziv" name="tbnaziv" /> </td> <tr> <td class="naziv">slika</td> <td> <input type="file" class="text-box" id="slikap" name="slikap" /> </td> </tr> <tr> <td class="naziv">cena</td> <td> <input type="text" class="text-box" id="tbcena" name="tbcena"/> </td> </tr> <tr> <td class="naziv">1-t-shirts, 2-Vinyls, 3-Accessories, 4- Hoodies</td>

<td> <input type="text" class="text-box" id="tbkat" name="tbkat" /> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="unesi u bazu" class="dugme" name="unesia" id="unesia" /> <input type="reset" value="reset" class="dugme" id="btnponisti" /> </td> </tr> </table> </form> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a>

</li> <li> <a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer> </body> </html>

3.1.8 getcat <?php session_start(); $q = intval($_get['q']); include("konekcija.php"); $upit="select * FROM prodavnica WHERE IDKategorije = $q"; $rez = mysqli_query($konekcija, $upit); while($r = mysqli_fetch_array($rez)) { echo " <div class='klasaa'> <img src='".$r['putanjaslike']."'/> <p> ".$r['nazivartikla']." </br> Price: ".$r['cena']." </br> </p>"; if(isset($_session['iduloge'])) { echo "<a href='#'>buy it now!</a>"; echo"";?> 3.1.9 header.php <?php echo "<header class='fheader'> <nav> <div id='menu'>";

include ("konekcija.php"); $upit= "SELECT * FROM meni WHERE Login<2"; $rez = mysqli_query($konekcija, $upit); echo "<ul class='glavna'>"; while($r=mysqli_fetch_array($rez)){ echo "<li><a href='".$r['putanjameni']."'>".$r['nazivmeni']."</a></li>"; echo "</ul>";?> 3.1.10 header2.php <?php echo "<header class='fheader'> <nav> <div id='menu'>"; include ("konekcija.php"); $upit= "SELECT * FROM meni WHERE Login>0"; $rez = mysqli_query($konekcija, $upit); echo "<ul class='glavna'>"; while($r=mysqli_fetch_array($rez)){ echo "<li><a href='".$r['putanjameni']."'>".$r['nazivmeni']."</a></li>"; echo "</ul>";

?> 3.1.11 anketa.php <?php $vote = $_REQUEST['vote']; //get content of textfile $filename = "poll_result.txt"; $content = file($filename); //put content in array $array = explode(" ", $content[0]); $yes = $array[0]; $no = $array[1]; if ($vote == 0) { $yes = $yes + 1; if ($vote == 1) { $no = $no + 1; //insert votes to txt file $insertvote = $yes." ".$no; $fp = fopen($filename,"w"); fputs($fp,$insertvote); fclose($fp);?> <h2>result:</h2> <table> <tr> <td>yes:</td> <td> <img src="poll.gif" width='<?php echo(100*round($yes/($no+$yes),2));?>'

height='20'> <?php echo(100*round($yes/($no+$yes),2));?>% </td> </tr> <tr> <td>no:</td> <td> <img src="poll.gif" width='<?php echo(100*round($no/($no+$yes),2));?>' height='20'> <?php echo(100*round($no/($no+$yes),2));?>% </td> </tr> </table> 3.1.12 konekcija.php <?php $konekcija = mysqli_connect('localhost', 'id1076237_goykowicz', 'gljive'); $baza = mysqli_select_db($konekcija, "id1076237_gljive"); $greske = array(); if(!$konekcija) { $greske[] = "Greska prilikom konekcije sa serverom baze podataka - "; else { if(!$baza) { $greske[] = "Greska prilikom izbora baze podataka - ";

mysqli_set_charset($konekcija,"utf8");?> 3.1.13 logout.php <?php session_start(); if(isset($_session['iduloge'])) { unset($_session['iduloge']); unset($_session['uloga']); unset($_session['username']); session_destroy(); header('location:index.php'); else { header('location:index.php');?> 3.1.14 autor.php <?php session_start();?> <!DOCTYPE html>

<html> <head> <meta charset="utf-8" /> <title>about me Paul Kalkbrenner Fan Club</title> <script src="jquery-3.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <link href="https://fonts.googleapis.com/css?family=orbitron" rel="stylesheet"> <link rel="icon" href="slike/favicon.png" type="image/png"/> <meta name="description" content="this is fanpage of DJ and producer Paul Kalkbrenner"/> <meta name="keywords" content="paul, Kalkbrenner, producer, dj, Ickarus, Fanclub"/> <meta name="author" content="boris Gojković"/> </head> <body> <div id="wrapper"> <?php if(isset($_session['iduloge'])){ include("header2.php"); else { include("header.php");?>

<section id="contenta"> <div id="right"> <img src="slike/autor.jpg" alt="boris Gojkovic" /> </br> <p>hi, my name is Boris Gojkovic. I was born on the 8th of June in 1996. After finishing highschool I moved from Visegrad to Belgrade, and this website is a project for Web Programming course at ICT college.</p> <p>you can contact me on:</br></br> <a href="facebook.com/gojaas">facebook</a> </br> <a href="instagram.com/goykowicz">instagram</a> </br> <a href="mailto:goykowicz@gmail.com">mail</a> </p> </section> <footer id="mfooter"> <div id="sitemaprss"> <ul class="a"> <li> <a href="https://www.facebook.com/paulkalkbrenner/" target="_blank"><img id="face" src="slike/fb.png" alt="facebook" title="facebook Page"></a> </li> <li> <a href="https://www.instagram.com/iampaulkalkbrenner/" target="_blank"><img id="instagram" src="slike/insta.png" alt="instagram" title="instagram"></a> </li> <li>

<a href="https://twitter.com/paulkalkbrenner" target="_blank"><img id="tw" src="slike/twitter.png" alt="twitter" title="twitter"></a> </li> <li> <a href="https://www.youtube.com/user/paulkalkbrenner/" target="_blank"><img id="yt" src="slike/yt.png" alt="youtube" title="youtube channel"></a> </li> </ul> <span class="sss"> <a href="dokumentacija.pdf">documentation</a> <a href="author.php">about ME</a> <a href="sitemap.xml">sitemap</a> </span> <div class="copy"> <h6>visoka ICT škola Web dizajn Boris Gojković 2018</h6> </footer> </body> </html>

3.2 CSS * { font-family: 'Orbitron', sans-serif; padding:0px; margin:0px auto; /* body & header */ body { background-color:black; background-image: URL(slike/sa2.jpg); background-attachment: fixed; background-repeat: no-repeat; background-position: top; #wrapper { width: 1348px; padding: 0px; margin: 0px auto;.fheader { background-image: URL(slike/sa123.jpg); margin: 0px auto; width:960px; height:400px; position:absolute; margin-left:194px;

#menu { margin-bottom:0px; /*position:absolute;*/ margin-top:347px; background:rgba(255,255,255,0.2); width:960px; ul.glavna { list-style-type: none; margin: 0; padding: 0; overflow:hidden; ul.glavna li { float: left; width:192px; ul.glavna li a { display: block; color: black; text-align: center; padding: 14px 16px; text-decoration: none; font-size:20px;

#menu ul li a:hover { background:rgba(255,255,255,0.7); color:black; /*index content*/ #content { width:960px; background-color: #111; height:800px; margin:0px auto; #contentad { width:960px; background-color: #111; margin:0px auto; height:3400px; #contenta { width:960px; background-color: #111; height:600px; margin:0px auto; color:#ccc;

#contentp{ width:960px; background-color: #111; height:340px; margin:0px auto; color:#ccc; text-align:center; #contentp h3{ padding:10px; #contentp a{ color:#ccc; #contenttop { width:960px; height: auto; margin:0px auto; #ifleft { margin:20px 10px 20px 20px; float:left;

#ifleft iframe { width:450px; height:249px; border-width: 0px; #content h1 { color:#ccc; text-align:center; padding-top:20px; #ifright iframe { width:450px; height:249px; border-width: 0px; #ifright { margin:20px 20px 20px 10px; float:right;.spanh3 { text-align:center; #contentb{ width:960px; height:auto;

.contentc { margin: 10px; border:2px solid #222; border-radius:12px; float:left; width:290px; height:auto;.contentc img { margin:20px;.contentc p { padding:0px; margin-left:20px; margin-right:20px; margin-bottom:10px;.contentc a { display: block; color: white; text-align: center; text-decoration: none; font-size:14px; height:400px; /*main footer*/ #mfooter { margin: 0px auto;

width:960px; height:130px; background-color:#222; #sitemaprss { width:960px; height: 40px; float:left; margin-top:15px; #sitemaprss a { text-decoration:none; font-size:14px; color: #ccc; #sitemaprss ul { list-style-type:none; display:inline; #sitemaprss ul li { display:inline; margin-left:160px; #sitemaprss ul li a:hover { background-color:#222;

#sitemaprss img { filter: grayscale(100%); width:30px; height:30px; #sitemaprss img:hover { filter: grayscale(0%); transform: rotate(20deg);.sss a { color:#ccc; text-decoration:none; margin-left:140px;.copy { margin-top:30px; text-align:center; color:#ccc; /*login*/ #login { border: 1px solid #ccc; color: #ccc; width:470px;

border-radius:5px; float:left; margin: 50px 250px; text-align:center; #login input { margin:10px; #reg { border: 1px solid #ccc; width:470px; border-radius:5px; float:left; margin: 0px 250px; text-align:center; color:#ccc; #reg input { margin:10px; #reg h3 { margin:20px; #login h3 { margin:20px;.greska { border:1px solid #FF0000;.opis_greske{ color:#ff0000;

.zavrsavam { color:#ccc; padding:0px 10px; text-align:center; #rss { text-align:center; color:#ccc; width:500px; #rss a { text-decoration:none; color:yellow; #rss h2 { margin-bottom:30px; #glrj img { width:200px; margin: 30px; margin-left:70px; margin-bottom: 10px; #glrj a { text-decoration:none; color: #777;

font-size: 24px; #glrj { color:white;.klasa { float:left; border:1px solid #ccc; width: 290px; text-align:center; color: #ccc; margin:13px; margin-top:30px; height: 300px;.klasa img { width: 200px; margin-top: 20px;.klasaa { float:left; border:1px solid #ccc; width: 290px; text-align:center; color: #ccc; margin:13px; margin-top:30px; height: 325px;

.klasaa img { width: 180px; margin-top: 20px;.klasaa a { text-decoration:none; color:yellow; h1.alb { font-size:30px; #right { text-align:center; #right img { width: 400px; margin:20px; #right a { text-decoration:none; color:yellow; #prof { float:left; width: 500px;

#poll { float:right; width: 450px; text-align:center;.ta textarea { margin:20px; resize:none; #shopa { width:960px; text-align:center; color:#ccc; #korisnici { color:#ccc; width:960px; border-bottom:1px solid #ccc; text-align:center; #korisnici th { color:white; #korisnici a {

text-decoration:none; color:yellow; #contentad h1{ padding:20px; font-size:24px; color:#ccc; text-align:center; #btndelete { margin:10px; #slikea { border-bottom:1px solid #ccc; float:left; #slikebr img { width:50px; #slikebr { width: 100px; height:900px; float:left; color:#ccc; margin-left:20px; #slikebr td { text-align:center;

#slikeupis { width: 400px; height:400px; float:left; margin:200px; color:#ccc; #zameni img { width: 60px; height: auto; #zameni { color: #ccc; border-bottom:1px solid #ccc; #zameni a { color:yellow; text-decoration:none; 3.3 JS <script> function ispisgreske(obj) { $(obj).addclass("greska"); greske=true; $(obj).next('.opis_greske').text("mistake!");

$(document).ready(function(){ $("#btnprijavi").click(function(){ greske=false; var username = $("#tbnewuser").val(); var formaime=$("#tbime").val(); var formaprezime=$("#tbprezime").val(); var formaemail=$("#tbemail").val(); var formalozinka1=$("#tblozinka1").val(); var formalozinka2=$("#tblozinka2").val(); $("input").removeclass("greska"); $("select").removeclass("greska"); $(".opis_greske").text(" "); var reuser=/^[a-za-z0-9]{2,20$/; var reime=/^[a-z][a-z]{2,19$/; var reprezime=/^[a-z][a-z]{3,40$/; var reemail=/^\w+@[a-za-z_]+?\.[a-za-z]{2,3$/; var relozinka=/^[\w]{5,20$/; if(!reuser.test(username)) { ispisgreske("#tbnewuser"); if(!reime.test(formaime)) { ispisgreske("#tbime");

if(!reprezime.test(formaprezime)) { ispisgreske("#tbprezime"); if(!reemail.test(formaemail)) { ispisgreske("#tbemail"); if(!relozinka.test(formalozinka1)) { ispisgreske("#tblozinka1"); if(!relozinka.test(formalozinka2)) { ispisgreske("#tblozinka2"); if(formalozinka1!=formalozinka2) { ispisgreske("#tblozinka1"); ispisgreske("#tblozinka2"); ); ); </script>

4. Dizajn baze Baza: Meni: Korisnici, povezana sa uloge IDUloge strani kljuc

Uloge: Muzika: Izgled baze:

Kategorije: Komentari: Artikli, povezana sa kategorijama, idkategorije strani kljuc

Slike, tabela za galeriju: