From f0d08c4b4492cb9793b5c6e658427dcaa0e68ba8 Mon Sep 17 00:00:00 2001 From: Leuteris Date: Fri, 17 Oct 2014 23:27:19 +0300 Subject: [PATCH 1/3] Revert "Initial commit" This reverts commit 0f8fe0d5a9746e821f0e1bbe887e221da4141eb9. --- README.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index 69ebf7b..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -php-intro-exercise -================== - -Εισαγωγική Άσκηση στην PHP - 2η εβδομάδα 2ου σεμιναριακού κύκλου From 7d9b04b80513879056bb0f760a7a2fed4c0b58ae Mon Sep 17 00:00:00 2001 From: Leuteris Date: Fri, 17 Oct 2014 23:27:32 +0300 Subject: [PATCH 2/3] add add files --- check.js | 10 ++++++ display.html | 34 +++++++++++++++++++ display.php | 34 +++++++++++++++++++ form.html | 28 ++++++++++++++++ movies_db.php | 7 ++++ search_movie.php | 26 +++++++++++++++ style.css | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 224 insertions(+) create mode 100644 check.js create mode 100644 display.html create mode 100644 display.php create mode 100644 form.html create mode 100644 movies_db.php create mode 100644 search_movie.php create mode 100644 style.css diff --git a/check.js b/check.js new file mode 100644 index 0000000..a219eb1 --- /dev/null +++ b/check.js @@ -0,0 +1,10 @@ + +function validateForm() +{ + var x = document.forms["searchform"]["moviename"].value; + if (x == "") { + alert( "All fields are mandatory" ); + return false ; + } + return true ; +} diff --git a/display.html b/display.html new file mode 100644 index 0000000..dd8176b --- /dev/null +++ b/display.html @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file diff --git a/display.php b/display.php new file mode 100644 index 0000000..a6cfe87 --- /dev/null +++ b/display.php @@ -0,0 +1,34 @@ + + + + + +=1) + { + echo ''; + echo ''; + echo ''; + echo ''; + + for($i=0; $i'; + else + echo ''; + } + echo '
Movies
'.$results_arr[$i].'
'.$results_arr[$i].'
'; + } + else + { + echo 'There are not movies.'; + } +} +?> + + \ No newline at end of file diff --git a/form.html b/form.html new file mode 100644 index 0000000..b1fd035 --- /dev/null +++ b/form.html @@ -0,0 +1,28 @@ + + + + + + + +
+
+ + +
+
+ + +
+
+ + + diff --git a/movies_db.php b/movies_db.php new file mode 100644 index 0000000..e315906 --- /dev/null +++ b/movies_db.php @@ -0,0 +1,7 @@ + array("The Hangover","Knocked Up","Due Date"), + "drama" => array("The Shawshank Redemption","The Green Mile","Requiem for a Dream"), + "horror" => array("Halloween","The Conjuring","The Shining") + ); +?> \ No newline at end of file diff --git a/search_movie.php b/search_movie.php new file mode 100644 index 0000000..7301df2 --- /dev/null +++ b/search_movie.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..0a4912e --- /dev/null +++ b/style.css @@ -0,0 +1,85 @@ + +form { + display: inline-block + text-align: center; +margin: 0 auto; + border: 1px solid #c6c7cc; + border-radius: 5px; + font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; + overflow: hidden; + width: 240px; +} +fieldset { + border: 0; + margin: 0; + padding: 0; +} +input { + border-radius: 5px; + font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; + margin: 0; +} +.search-info { + padding: 20px 20px 0 20px; +} +.search-info label { + color: #395870; + display: block; + font-weight: bold; + margin-bottom: 20px; +} +.search-info input { + background: #fff; + border: 1px solid #c6c7cc; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1); + color: #636466; + padding: 6px; + margin-top: 6px; + width: 100%; +} +.search-action { + background: #f0f0f2; + border-top: 1px solid #c6c7cc; + padding: 20px; +} +.search-action .btn { + background: linear-gradient(#49708f, #293f50); + border: 0; + color: #fff; + cursor: pointer; + font-weight: bold; + float: left; + padding: 8px 16px; +} +.account-action label { + color: #7c7c80; + font-size: 12px; + float: left; + margin: 10px 0 0 20px; +} + +#customers { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + width: 20%; + border-collapse: collapse; +} + +#customers td, #customers th { + font-size: 1em; + border: 1px solid #98bf21; + padding: 3px 7px 2px 7px; +} + +#customers th { + font-size: 1.1em; + text-align: center; + padding-top: 5px; + padding-bottom: 4px; + background-color: #A7C942; + color: #ffffff; +} + +#customers tr.alt td { + color: #000000; + background-color: #EAF2D3; +} From ae105c8012d97dbf9f769a47c03c6dfb9a1250eb Mon Sep 17 00:00:00 2001 From: Leuteris Date: Fri, 17 Oct 2014 23:52:42 +0300 Subject: [PATCH 3/3] Delete display.html --- display.html | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 display.html diff --git a/display.html b/display.html deleted file mode 100644 index dd8176b..0000000 --- a/display.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - \ No newline at end of file