Bachelor Thesis

  • View
    215

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Text of Bachelor Thesis

  • OSTRAVSK UNIVERZITA V OSTRAV PRODOVDECK FAKULTA

    KATEDRA INFORMATIKY A POTA

    VYTVOEN NSTROJE PRO HROMADN NAHRVN RZNCH

    SOUBOR V JAZYCE PHP

    BAKALSK PRCE

    Autor prce: Daniel Kilian Vedouc prce: RNDr. Bogdan Walek Ph.D.

    2014

  • UNIVERSITY OF OSTRAVA FACULTY OF SCIENCE

    DEPARTMENT OF INFORMATICS AND COMPUTERS

    CREATING TOOL FOR BULKLOADING VARIOUS FILES IN PHP

    BACHELOR THESIS

    Author: Daniel Kilian Supervisor: RNDr. Bogdan Walek Ph.D.

    2014

  • ESTN PROHLEN

    J, ne podepsan student, tmto estn prohlauji, e text mnou odevzdan zvren

    prce v psemn podob i na CD nosii je toton s textem zvren prce vloenm v

    databzi DIPL2.

    Ostrava dne

    podpis studenta

  • ABSTRAKT

    Tato bakalsk prce pojednv o hromadnm nahrvn rznch druh soubor na

    webov strnky v jazyce PHP. V prvn sti tto prce se zamuji na analzu souasnch

    nstroj, kter byly pro tento el vytvoeny. Kad z tchto nstroj nsledn osobn

    vyzkoum a porovnm jejich funkce, monosti a vyuit. Nstroje budou pot porovnny

    ve srovnvac tabulce. V dal fzi vyberu na zklad pedchozho srovnn nejlep

    z danch nstroj a navrhnu nov komplexn nstroj, kter bude vyuvat monosti

    hromadnho nahrvn rznch druh soubor pomoc dve vybranho nstroje a navc

    usnadn uivatelm dal prci s nahranmi soubory, jako je trval zobrazovn nahranch

    soubor, jejich pejmenovvn nebo nap. vytven galeri v ppad nahrvn fotografi.

    Nakonec nov nstroj naimplementuji do komplexn webov aplikace a otestuji jeho

    funknost v praxi na relnch webovch strnkch.

    Klov slova: PHP, hromadn nahrvn soubor, analza, srovnn, nvrh, vytven

    galeri, webov aplikace, testovn.

    ABSTRACT

    This bachelor thesis is about bulkloading various files on web pages using the PHP

    language. In the first part of this thesis, I focus on analysis of currently existing tools which

    were made for this purpose. I personally will try out each of these tools and compare their

    functions, possibilities and usability and then will show them in a well arranged table. I

    will choose the Best of these tools on the basis of the previous comparison and then design

    a new complex tool which would be possible to upload multiple different files with, using

    the previously chosen tool which will also additionally help users handle the uploaded files

    in ways of permanent showing or renaming the files or creating galleries in the case of

    uploading pictures. In the end I will implement the new tool in a complex web application

    and test its function on a real website.

    Keywords: PHP, bulkloading files, analysis, comparison, design, gallery making, web

    application, testing.

  • Podkovn

    Chtl bych podkovat RNDr. Bogdanu Walkovi, Ph.D. za jeho veden a rady, kter mi

    velmi pomohly pi psan tto prce.

    Tak bych chtl podkovat bratranci Zdekovi Kilianovi za zapjen jeho notebooku a

    svm babikm za finann pomoc pi koupi novho, m mi umonili realizaci tto

    prce.

    Prohlauji, e pedloen prce je mm pvodnm autorskm dlem, kter jsem vypracoval

    samostatn. Vekerou literaturu a dal zdroje, z nich jsem pi zpracovn erpal, v prci

    dn cituji a jsou uvedeny v seznamu pouit literatury.

    V Ostrav dne . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . .

    (podpis)

  • OBSAH

    1 VOD .......................................................................................................................... 11

    1.1 PHP ....................................................................................................................... 11

    1.2 Upload ................................................................................................................... 12

    1.3 JavaScript .............................................................................................................. 13

    1.4 Flash ...................................................................................................................... 13

    1.5 AJAX..................................................................................................................... 13

    2 ANALZA SOUASNHOSTAVU ....................................................................... 14

    2.1 Uploadify............................................................................................................... 14

    2.2 Plupload................................................................................................................. 14

    2.3 Jupload .................................................................................................................. 15

    2.4 Drag and Drop ....................................................................................................... 16

    2.5 Blueimp ................................................................................................................. 17

    2.6 SWFUpload ........................................................................................................... 18

    2.7 Shrnut ................................................................................................................... 19

    3 CLE ............................................................................................................................ 20

    4 NVRH NSTROJE ................................................................................................ 21

    4.1 Sekvenn diagram ................................................................................................ 21

    4.2 Hlavn funkcionality navrhovanho nstroje ........................................................ 22

    4.2.1 Obrzky .......................................................................................................... 23

    4.2.2 Hudba a videa ................................................................................................ 24

    4.2.3 Dokumenty ..................................................................................................... 24

    4.2.4 Ostatn ............................................................................................................ 25

    4.3 Pedpokldan funknost webov aplikace .......................................................... 26

    4.4 Shrnut ................................................................................................................... 26

    5 IMPLEMENTACE NSTROJE.............................................................................. 27

    5.1 Pouit technologie ............................................................................................... 27

    5.2 Tdy a skripty aplikace ......................................................................................... 27

    5.2.1 Tda Uploads ................................................................................................ 27

    5.2.2 TdaSQLCommands ..................................................................................... 27

    5.2.3 GetInfo ........................................................................................................... 28

  • 5.2.4 Tda ShowData ............................................................................................. 28

    5.2.5 Uploadify ....................................................................................................... 28

    5.2.6 SetThumb ....................................................................................................... 28

    5.2.7 Tda PHPThumb [12] ................................................................................... 28

    5.2.8 Tda Mp3file [28] ......................................................................................... 29

    5.2.9 GetID3 [29] .................................................................................................... 29

    5.3 Webov aplikace ................................................................................................... 29

    5.4 Index ...................................................................................................................... 29

    5.5 Nahrvac strnky .................................................................................................. 30

    5.5.1 Ovldac panel ............................................................................................... 30

    5.5.1.1 Okno pro nastaven galerie ......................................................................... 31

    5.5.1.2 Okno pro zobrazen existujc galerie ........................................................ 31

    5.5.1.3 Formul pro nahrn soubor .................................................................... 32

    5.5.2 st pro nahran soubory .............................................................................. 32

    5.5.2.1 Ikona ........................................................................................................... 32

    5.5.2.2 Datov st ................................................................................................. 33

    5.5.2.3 Formul pro komente ............................................................................. 34

    5.6 Databze ................................................................................................................ 34

    5.6.1 Vysvtlen nzv ............................................................................................ 34

    5.6.2 Tabulky pro databzi ..................................................................................... 35

    5.7 Shrnut ...................................................................................