0% found this document useful (0 votes)
65 views

WT Mini Project

This document provides source code for a movie rental system website. The front-end code includes HTML pages for the home, login, registration, and movie pages. The code allows users to browse movies, login/register accounts, and navigate between pages.

Uploaded by

indira indu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

WT Mini Project

This document provides source code for a movie rental system website. The front-end code includes HTML pages for the home, login, registration, and movie pages. The code allows users to browse movies, login/register accounts, and navigate between pages.

Uploaded by

indira indu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

ABSTRACT

This project is aimed at developing an Movie Rental system . It is the


web based application developed for movie CD or DVD rent or buy
Shop. The user can track customer details and renting details and
inventory reports using this system. The movie rental computer system
allows your customers to rent out movie ,CDs, DVDs and videos
games, buy new ones, or purchase the rental copies of the movies, CDs,
DVDs or videos games. Commodity Rentals specializes in movie rental
program and as well as other rental script.

1
INTRODUCTION
The main purpose for developing this project movie rental system to implement
for movie fan to get there interested movie cd from online on rent. Customer
can book movie cd for rent or request for movies which are not present on site.
This system provides feedback system where customers can send queries to
admin. As the number of internet users is increasing daily implementing online
movie cd can help customers.
Movie Rental System is the web based Application developed for
movie cd or dvd rent or buy shop. The user can track customer details and
renting details and inventory reports using this system .The user can store album
details ,music details, movies in this project. The rental cost automatically
calculates in this system.

2
SOURCE CODE:
FRONT END:
home1.html:
<html>
<head><title>Home</title>
<body>
<section id="screen1"><nav>
<ul>
<li><a href="G:\project\home1.html"">Home</a></li>
<li><a href="G:\project\movie.html">Movies</a></li>
<li><a href="G:\project\contact.html">Contact</a></li>
</ul><br><br><br>
<marquee scrollamount="15" >
<img src="G:\project\g.jpg" width="1000px height="450px"/>&emsp;&emsp;
<img src="G:\project\s.jpg" width="1000px" height="450px"/>&emsp;&emsp;
<img src="G:\project\h.jpg" width="1000px" height="450px"/>&emsp;&emsp;
<img src="G:\project\p.jpg" width="1000px" height="450px"/>&emsp;&emsp;
</marquee>
</nav>

</section>
</body>
</head>
<style>
* {margin: 0; padding: 0;}

3
a {text-decoration: none;}
/* This class is added on scroll */
fixed {
position: fixed;
top: 0;
height: 70px;
z-index: 1;
}
body {
color: #fff;
font-family: 'open-sans-bold', AvenirNext-Medium, sans-serif;
font-size: 18px;
text-align: center;
}

/* Navigation Settings */
nav {
position: absolute;
width: 100%;
height: 70px;
background: #fff;
}
nav li {
display: inline-block;
padding: 24px 10px;
}
4
nav li a {
color: #757575;
text-transform: uppercase;
}
section {
height: 100vh;
}
/* Screens Settings */
#screen1 {
background: #A73C00;
height : 100%;
}
@media only screen and (max-width: 520px) {
nav li {
padding: 24px 4px;
}
nav li a {
font-size: 14px;
}
</style></html>
INDEX.HTML:
<html>
<head><title>MOVIE RENTAL SYSTEM</title>
<style>
* {margin: 0; padding: 0;}

5
a {text-decoration: none;}

/* This class is added on scroll */


.fixed {
position: fixed;
top: 0;
height: 70px;
z-index: 1;
}

body {
color: #fff;
font-family: 'open-sans-bold', AvenirNext-Medium, sans-serif;
font-size: 18px;
text-align: center;
}

/* Navigation Settings */
nav {
position: absolute;
bottom: 0;
width: 100%;
height: 70px;
background: #fff;
}

6
nav li {
display: inline-block;
padding: 24px 10px;
}

nav li a {
color: #757575;
text-transform: uppercase;
}

section {
height: 100vh;
}

/* Screens Settings */
#screen1 {
background: #A73C00;
}

#screen1 h1 {
padding-top: 170px;
font-size: 70px;
}

}
7
@media only screen and (max-width: 520px) {

nav li {
padding: 24px 4px;
}

nav li a {
font-size: 14px;
}

}
.button {
border-radius: 4px;
background-color: #ffffff;
border: none;
color: #757575;
text-align: center;
font-size: 28px;
padding: 20px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}

.button span {
8
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}

.button span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}

.button:hover span {
padding-right: 25px;
}

.button:hover span:after {
opacity: 1;
right: 0;
}
</style>
</head>
<body>
9
<section id="screen1"><h1>WELCOME</h1>
<form method="get" action="C:\project\home1.html">
<center><br><br><button class="button"><span>NEXT</span></button>
</center> </form>
<nav>
<ul>
<li><a href="C:\project\home1.html">Home</a></li>
<li><a
href="C:\wamp\www\project\login.html">Login</a></li>
<li><a href="C:\project\movie.html">Movies</a></li>
<li><a
href="C:\wamp\www\project\regis.html">Registration</a></li>
<li><a href="C:\project\contact.html">Contact</a></li>

</ul>
</nav>

</section>
</body>
</html>
INDEXV.HTML:
<html>
<head><title>MOVIE RENTAL SYSTEM</title>
<style>
* {margin: 0; padding: 0;}

10
a {text-decoration: none;}

/* This class is added on scroll */


.fixed {
position: fixed;
top: 0;
height: 70px;
z-index: 1;
}

body {
color: #fff;
font-family: 'open-sans-bold', AvenirNext-Medium, sans-serif;
font-size: 18px;
text-align: center;
}

/* Navigation Settings */
nav {
position: absolute;
bottom: 0;
width: 100%;
height: 70px;
background: #fff;
}

11
nav li {
display: inline-block;
padding: 24px 10px;
}

nav li a {
color: #757575;
text-transform: uppercase;
}

section {
height: 100vh;
}

/* Screens Settings */
#screen1 {
background: #A73C00;
}

#screen1 h1 {
padding-top: 170px;
font-size: 70px;
}

}
12
@media only screen and (max-width: 520px) {

nav li {
padding: 24px 4px;
}

nav li a {
font-size: 14px;
}

}
.button {
border-radius: 4px;
background-color: #ffffff;
border: none;
color: #757575;
text-align: center;
font-size: 28px;
padding: 20px;
width: 200px;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}

.button span {
13
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}

.button span:after {
content: '\00bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}

.button:hover span {
padding-right: 25px;
}

.button:hover span:after {
opacity: 1;
right: 0;
}
</style>
</head>
<body>
14
<section id="screen1"><h1>WELCOME</h1>
<form method="get" action="C:\project\home1.html">
<center><br><br><button class="button"><span>NEXT</span></button>
</center> </form>
<nav>
<ul>
<li><a href="C:\project\home1.html">Home</a></li>
<li><a
href="C:\wamp\www\project\login.html">Login</a></li>
<li><a href="C:\project\movie.html">Movies</a></li>
<li><a
href="C:\wamp\www\project\regis.html">Registration</a></li>
<li><a href="C:\project\contact.html">Contact</a></li>

</ul>
</nav>

</section>
</body>
</html>
LOGIN.HTML:
<!doctype html>
<html>
<head>
<title>Login</title>
<style>

15
body{
background-image: url("bk.jpg") ;
background-size:cover;
color: white;
font-family: verdana;
font-size: 100%

}
b{
color: white;
font-family: verdana;

}
h3 {
color: white;
font-family: verdana;
font-size: 100%;
}
h4{
color : white;
}
a{
color : white;
align : center;
16
}</style>
<script>
function validateform(){
var user=document.myform.user.value;
var password=document.myform.password.value;
if (user==null || user==""){
alert("User Name can't be blank");
return false;
}else if(password==null || password.length<6){
alert("GIVE AN APPROPRIATE PASSWORD");
return false;
}
}
</script>

</head>
<body >
<center>

<h3>Login</h3>
<form name="myform" action="" method="POST" onsubmit="return
validateform()" onclick="G:\project\index.html">
<legend>
<b>Username:</b> <input type="text" name="user"><br><br>
<b>Password:</b> <input type="password" name="password"><br ><br>
<input type="submit" value="Login" name="submit" align ="cenetr" />

17
<p><a href="register.php" target="_self">Register</a> </p>

</legend>
</form>
</center>
<?php
if(isset($_POST["submit"])){

if(!empty($_POST['user']) && !empty($_POST['password'])) {


$user=$_POST['user'];
$password=$_POST['password'];

$con=@mysql_connect('localhost','root','') or die(mysql_error());
@mysql_select_db('vardhan') or die("cannot select DB");

$query=mysql_query("SELECT * FROM user WHERE user='".$user."'


AND password='".$password."'");
$numrows=mysql_num_rows($query);
if($numrows!=0)
{
while($row=mysql_fetch_assoc($query))
{
$dbuser=$row['user'];
$dbpassword=$row['password'];
}

18
if($user == $dbuser && $password == $dbpassword)
{
session_start();
$_SESSION['sess_user']=$user;
$_SESSION['logged-in'] = true;
header("location:index.html?user=$user");
}
} else

}
?>
</body>
</html>
Register.html: <!doctype html>
<html>
<head>
<title>Register</title>
<style>
body{

background-image: url("bk.jpg") ;
background-size:cover;
19
}

table{color : white;}
h1 {
color: white;
font-family: verdana;
font-size: 100%;
}
h2 {
color: white;
font-family: verdana;
font-size: 100%;
}
a{
color : white;
}</style>
<script>
function validateform(exp)
{
var user=document.reg.user.value;
var password=document.reg.password.value;
var re4 = /^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-
Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@{[a-zA-Z0-9_\-\.]+0\.([a-zA-
Z]{2,5}){1,25})+)*$/;

20
if (user==null || user==""){
alert("User Name can't be blank");
return false;
}else if(password==null || password.length<6){
alert("GIVE AN APPROPRIATE PASSWORD");
return false;
}
else if(re4.test(exp.email.value)==false){
alert("ENTER A VALID E-MAIL");
exp.email.focus();
return false;
}
else if(!exp.gender[0].checked && !exp.gender[1].checked)
{
alert("PLEASE SELECT YOUR GENDER");
}

}
</script>
</head>
<body >
<center>
<br><br>
<h2>Registration Form</h2>
<form name="reg" action="" method="POST" onsubmit= "return
validateform(this)">

21
<legend>
<br><br>
<table>
<tr><td>Username:</td> <td><input type="text" name="user"></td></tr>
<tr><td>Password:</td><td> <input type="password"
name="password"></td></tr><tr><td>
EMAIL ID:</td><td ><input type="text"name="email"/></td></tr>
<tr><td>Card.NO :</td><td> <input type="text" name="card" size=
"16"></td></tr>
<tr><td>Expiry Date :</td><td> <input type="text" name="exp"></td></tr>
<tr><td>Cvv.No :</td><td> <input type="password" name="cvv"
size="3"></td></tr>
<tr><td>Card Holder Name :</td><td> <input type="text"
name="chn"></td></tr>
<tr><td colspan='3' align="center"><input type="submit" value="Register"
name="submit" />
</td></tr>
</table>
</legend>
<a href="login.php" target="_self">Login</a>
</form>
</center>
<?php
if(isset($_POST["submit"])){
if(!empty($_POST['user']) && !empty($_POST['password'])) {
$user=$_POST['user'];
$password=$_POST['password'];

22
$con=mysql_connect('localhost','root','') or die(mysql_error());
mysql_select_db('vardhan') or die("cannot select DB");
$query=mysql_query("SELECT * FROM user WHERE user='".$user."'");
$numrows=mysql_num_rows($query);
if($numrows==0)
{
$sql="INSERT INTO user VALUES('$user','$password')";

$result=mysql_query($sql);
if($result){
echo "Account Successfully Created";
} else {
echo "Failure!";
}

} else {
echo "That username already exists! Please try again with another.";
}

} else {
echo "All fields are required!";
}
}
?>
</body>
</html>
23
Movies.html:
<html>
<head>
<script>
var a=1000;
function bal()
{
if (confirm("50 will be debited!")) {
txt = "You pressed OK!";
a=a-50;
}
else
{
txt = "You pressed Cancel!";
return false;
}
alert(""-a);
}
function ball()
{
alert(""-a);
}

</script>
<body>
<section id="screen1"><nav>
24
<ul>
<li><a href="C:\project\home1.html"">Home</a></li>

<li><a href="C:\project\movie.html">Movies</a></li>

<li><a href="C:\project\contact.html">Contact</a></li>

</ul>
<br>
<marquee scrollamount="15" >
<h3> Each Movie 50 rs </h3>
</marquee>
<br> <br>
<div id="n">
<a href ="h.html" target="blank" ><img src="C:/project/h.jpg" height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;
<a href ="p.html" target="blank"><img src="C:/project/p.jpg" height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;
<a href ="a.html" target="blank"><img src="C:/project/a.jfif" height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;<br><br><br><br>
<a href ="s.html" target="blank"><img src="C:/project/s.jpg"height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;
<a href ="g.html" target="blank"><img src="C:/project/g.jpg"height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;
<a href ="k.html" target="blank"><img src="C:/project/k.jpg"height=200px
width=300px onclick='return bal() '></a>&emsp;&emsp;
</div>
<form >
25
Available Balance : <input type="submit" value="check" onclick="ball()">
</form>
</nav>
</section>
</body>
</head>
<style>

* {margin: 0; padding: 0;}

a {text-decoration: none;}
/* This class is added on scroll */
fixed {
position: fixed;
top: 0;
height: 70px;
z-index: 1;
}
body {
color: #fff;
font-family: 'open-sans-bold', AvenirNext-Medium, sans-serif;
font-size: 18px;
text-align: center;
}

/* Navigation Settings */
26
nav {
position: absolute;
width: 100%;
height: 70px;
background: #fff;
}
nav li {
display: inline-block;
padding: 24px 10px;
}
nav li a {
color: #757575;
text-transform: uppercase;
}
section {

center;
height: 100vh;
}

/* Screens Settings */

#screen1 {
background: #A73C00;
height : 100%;
}
27
.container
{
top : 90px;
}
@media only screen and (max-width: 520px) {
nav li {
padding: 24px 4px;
}

nav li a {
font-size: 14px;
}
}
</style>
</html>
Contact.html:
<html>
<head><title>Contact</title>
<body>
<section id="screen1"><nav>
<ul>
<li><a href="E:\project\home1.html">Home</a></li>

<li><a href="E:\project\movie.html">Movies</a></li>

<li><a href="E:\project\contact.html">Contact</a></li>
28
</ul><br><br><br><br>
<center> <fieldset>
<h2><u>Contact Us:</u></h2><br>
<h4>Email:[email protected]<br>
Ph no:9000000000</h4>
</fieldset></center>
</nav>
</section>
</body>
</head>
<style>
* {margin: 0; padding: 0;}
a {text-decoration: none;}
/* This class is added on scroll */
fixed {
position: fixed;
top: 0;
height: 70px;
z-index: 1;
}
fieldset
{ color:black;
background-color: white;
width:400px;
height:100px;
29
padding:100px;
border : 0;
border-radius: 25px;
opacity : 0.4;
}
body {
color: #fff;
font-family: 'open-sans-bold', AvenirNext-Medium, sans-serif;
font-size: 18px;
text-align: center;
}

/* Navigation Settings */
nav {
position: absolute;
width: 100%;
height: 70px;
background: #fff;
}
nav li {
display: inline-block;
padding: 24px 10px;
}
nav li a {
color: #757575;
text-transform: uppercase;
30
}
section {
height: 100vh;
}

/* Screens Settings */

#screen1 {
background: #A73C00;
height : 100%;
}

@media only screen and (max-width: 520px) {


nav li {
padding: 24px 4px;
}
nav li a {
font-size: 14px;
}

</style>
</html>
S.html:
<!DOCTYPE html>
<html>
<body>
31
<video width=100% height=100% controls>
<source src="s.mp4" type="video/mp4">
<source src="s.ogg" type="video/ogg">

Your browser does not support HTML5 video.


</video>
</body>
</html>
BACKEND:
INDEX.PHP
<?php

// Page created by Shepard [Fabian Pijcke] <[email protected]>


// Arno Esterhuizen <[email protected]>
// and Romain Bourdon <[email protected]>
// and Hervé Leclerc <[email protected]>
// Icons by Mark James <http://www.famfamfam.com/lab/icons/silk/>
// Version 2.5 -> 3.0.0 by Dominique Ottello aka Otomatic
// 3.1.7 - Replace integrated local base64 images by img/xxx.yyy
//
//
//

$server_dir = "../";

32
require $server_dir.'scripts/config.inc.php';
require $server_dir.'scripts/wampserver.lib.php';

//chemin jusqu'aux fichiers alias


$aliasDir = $server_dir.'alias/';

//Fonctionne à condition d'avoir ServerSignature On et ServerTokens Full dans


httpd.conf
$server_software = $_SERVER['SERVER_SOFTWARE'];
$error_content = '';

// on récupère les versions des applis


$phpVersion = $wampConf['phpVersion'];
$apacheVersion = $wampConf['apacheVersion'];
$doca_version = 'doca'.substr($apacheVersion,0,3);
$mysqlVersion = $wampConf['mysqlVersion'];

//On récupére la valeur de urlAddLocalhost


$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);

//On récupère la valeur de VirtualHostMenu


$VirtualHostMenu = $wampConf['VirtualHostSubMenu'];

//on récupère la valeur de apachePortUsed


$port = $wampConf['apachePortUsed'];
$UrlPort = $port !== "80" ? ":".$port : '';

33
//On récupère le ou les valeurs des ports en écoute dans Apache
$ListenPorts = implode(' - ',listen_ports());
//on récupère la valeur de mysqlPortUsed
$Mysqlport = $wampConf['mysqlPortUsed'];

// répertoires à ignorer dans les projets


$projectsListIgnore = array ('.','..','wampthemes','wamplangues');

// Recherche des différents thèmes disponibles


$styleswitcher = '<select id="themes">'."\n";
$themes = glob('wampthemes/*', GLOB_ONLYDIR);
foreach ($themes as $theme) {
if (file_exists($theme.'/style.css')) {
$theme = str_replace('wampthemes/', '', $theme);
$styleswitcher .= '<option id="'.$theme.'">'.$theme.'</option>'."\n";
}
}
$styleswitcher .= '</select>'."\n";

//affichage du phpinfo
if (isset($_GET['phpinfo'])) {
$type_info = intval(trim($_GET['phpinfo']));
if($type_info < -1 || $type_info > 64)
$type_info = -1;
phpinfo($type_info);
34
exit();
}

// Language
$langue = $wampConf['language'];
$i_langues = glob('wamplangues/index_*.php');
$languages = array();
foreach ($i_langues as $value) {
$languages[] = str_replace(array('wamplangues/index_','.php'), '', $value);
}
$langueget = (!empty($_GET['lang']) ? strip_tags(trim($_GET['lang'])) : '');
if(in_array($langueget,$languages))
$langue = $langueget;

// Recherche des différentes langues disponibles


$langueswitcher = '<form method="get" style="display:inline-block;"><select
name="lang" id="langues" onchange="this.form.submit();">'."\n";
$selected = false;
foreach ($languages as $i_langue) {
$langueswitcher .= '<option value="'.$i_langue.'"';
if(!$selected && $langue == $i_langue) {
$langueswitcher .= ' selected ';
$selected = true;
}
$langueswitcher .= '>'.$i_langue.'</option>'."\n";
}

35
$langueswitcher .= '</select></form>';

include('wamplangues/index_english.php');
if(file_exists('wamplangues/index_'.$langue.'.php')) {
$langue_temp = $langues;
include('wamplangues/index_'.$langue.'.php');
$langues = array_merge($langue_temp, $langues);
}

//initialisation
// Récupération MySQL si supporté
$MySQLdb = '';
if(isset($wampConf['SupportMySQL']) && $wampConf['SupportMySQL']
=='on') {
$defaultDBMSMySQL = ($wampConf['mysqlPortUsed'] == '3306') ?
'&nbsp;-&nbsp;Default DBMS' : '';
$MySQLdb = <<< EOF
<dt>{$langues['versm']}</dt>
<dd>${mysqlVersion}&nbsp;-
&nbsp;{$langues['mysqlportUsed']}{$Mysqlport}{$defaultDBMSMySQL}&n
bsp;-&nbsp; <a
href='http://{$langues['docm']}'>{$langues['documentation']}</a></dd>
EOF;
}

// Récupération MariaDB si supporté


$MariaDB = '';

36
if(isset($wampConf['SupportMariaDB']) && $wampConf['SupportMariaDB']
=='on') {
$defaultDBMSMaria = ($wampConf['mariaPortUsed'] == '3306') ?
'&nbsp;-&nbsp;Default DBMS' : '';
$MariaDB = <<< EOF
<dt>{$langues['versmaria']}</dt>
<dd>${c_mariadbVersion}&nbsp;-
&nbsp;{$langues['mariaportUsed']}{$wampConf['mariaPortUsed']}{$defaultD
BMSMaria}&nbsp;-&nbsp; <a
href='http://{$langues['docmaria']}'>{$langues['documentation']}</a></dd>
EOF;
}
if(empty($defaultDBMSMySQL))
$DBMSTypes = $MariaDB.$MySQLdb;
else
$DBMSTypes = $MySQLdb.$MariaDB;

// No Database Mysql System


$noDBMS = (empty($MySQLdb) && empty($MariaDB)) ? true : false;
$phpmyadminTool = $noDBMS ? '' : '<li><a
href="phpmyadmin/">phpmyadmin</a></li>';

$aliasContents = '';

// récupération des alias


if (is_dir($aliasDir))
{
$handle=opendir($aliasDir);
37
while (($file = readdir($handle))!==false)
{
if (is_file($aliasDir.$file) && strstr($file, '.conf'))
{
if(!($noDBMS && ($file == 'phpmyadmin.conf' || $file ==
'adminer.conf'))) {
$msg = '';
$aliasContents .= '<li><a
href="'.str_replace('.conf','',$file).'/">'.str_replace('.conf','',$file).'</a></li>';
}
}
}
closedir($handle);
}
if (empty($aliasContents))
$aliasContents = "<li>".$langues['txtNoAlias']."</li>\n";

//Récupération des ServerName de httpd-vhosts.conf


$addVhost = "<li><a
href='add_vhost.php?lang=".$langue."'>".$langues['txtAddVhost']."</a></li>";
if($VirtualHostMenu == "on") {
$vhostError = false;
$vhostErrorCorrected = true;
$error_message = array();
$allToolsClass = "four-columns";
$virtualHost = check_virtualhost();
38
$vhostsContents = '';
if($virtualHost['include_vhosts'] === false) {
$vhostsContents = "<li><i style='color:red;'>Error Include
Apache</i></li>";
$vhostError = true;
$error_message[] =
sprintf($langues['txtNoIncVhost'],$wampConf['apacheVersion']);
}
else {
if($virtualHost['vhosts_exist'] === false) {
$vhostsContents = "<li><i style='color:red;'>No vhosts
file</i></li>";
$vhostError = true;
$error_message[] =
sprintf($langues['txtNoVhostFile'],$virtualHost['vhosts_file']);
}
else {
if($virtualHost['nb_Server'] > 0) {
$port_number = true;
$nb_Server = $virtualHost['nb_Server'];
$nb_Virtual = $virtualHost['nb_Virtual'];
$nb_Document = $virtualHost['nb_Document'];
$nb_Directory = $virtualHost['nb_Directory'];
$nb_End_Directory =
$virtualHost['nb_End_Directory'];

foreach($virtualHost['ServerName'] as $key =>


$value) {
39
if($virtualHost['ServerNameValid'][$value]
=== false) {
$vhostError = true;
$vhostErrorCorrected = false;
$vhostsContents .= '<li>'.$value.' - <i
style="color:red;">syntax error</i></li>';
$error_message[] =
sprintf($langues['txtServerName'],"<span
style='color:black;'>".$value."</span>",$virtualHost['vhosts_file']);
}
elseif($virtualHost['ServerNameValid'][$value]
=== true) {
$UrlPortVH =
($virtualHost['ServerNamePort'][$value] != '80') ?
':'.$virtualHost['ServerNamePort'][$value] : '';
if(!$virtualHost['port_listen'] &&
$virtualHost['ServerNamePortListen'][$value] !== true ||
$virtualHost['ServerNamePortApacheVar'][$value] !== true) {
$value_url = ((strpos($value, ':')
!== false) ? strstr($value,':',true) : $value);
$vhostsContents .=
'<li>'.$value_url.$UrlPortVH.' - <i style="color:red;">Not a Listen
port</i></li>';

if($virtualHost['ServerNamePortListen'][$value] !== true)


$msg_error = ' not an
Apache Listen port';

elseif($virtualHost['ServerNamePortApacheVar'][$value] !== true)


$msg_error = ' not an
Apache define variable';
40
if(!$vhostError) {
$vhostError = true;
$vhostErrorCorrected =
false;
$error_message[] = "Port
".$UrlPortVH." used for the VirtualHost is ".$msg_error;
}
}

elseif($virtualHost['ServerNameIp'][$value] !== false) {


$vh_ip =
$virtualHost['ServerNameIp'][$value];

if($virtualHost['ServerNameIpValid'][$value] !== false) {


$vhostsContents .= '<li><a
href="http://'.$vh_ip.$UrlPortVH.'">'.$vh_ip.'</a> <i>('.$value.')</i></li>';
}
else {
$vhostError = true;
$vhostErrorCorrected =
false;
$vhostsContents .=
'<li>'.$vh_ip.' for '.$value.' - <i style="color:red;">IP not valid</i></li>';
$error_message[] =
sprintf($langues['txtServerNameIp'],"<span
style='color:black;'>".$vh_ip."</span>","<span
style='color:black;'>".$value."</span>",$virtualHost['vhosts_file']);
}
}

41
elseif($virtualHost['DocRootNotwww'][$value] === false) {
$vhostError = true;
$vhostErrorCorrected = false;
$vhostsContents .= '<li>'.$value.' -
<i style="color:red;">DocumentRoot error</i></li>';
$error_message[] =
sprintf($langues['txtDocRoot'],"<span
style='color:black;'>".$value."</span>","<span
style='color:black;'>".$wwwDir."</span>");
}

elseif($virtualHost['ServerNameDev'][$value] === true) {


$vhostError = true;
$vhostErrorCorrected = false;
$vhostsContents .= '<li>'.$value.' -
<i style="color:red;">TLD error</i></li>';
$error_message[] =
sprintf($langues['txtTLDdev'],"<span
style='color:black;'>".$value."</span>","<span
style='color:black;'>.dev</span>");
}
else {
$value_url = ((strpos($value, ':')
!== false) ? strstr($value,':',true) : $value);
$vhostsContents .= '<li><a
href="http://'.$value_url.$UrlPortVH.'">'.$value.'</a></li>';
}
}

42
else {
$vhostError = true;
$error_message[] =
sprintf($langues['txtVhostNotClean'],$virtualHost['vhosts_file']);
}
}
//Check number of <Directory equals </Directory
if($nb_End_Directory != $nb_Directory) {
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNbNotEqual'],"&lt;Directory
....&gt;","&lt;/Directory&gt;",$virtualHost['vhosts_file']);
}
//Check number of DocumentRoot equals to number
of ServerName
if($nb_Document != $nb_Server) {
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNbNotEqual'],"DocumentRoot","ServerName",$virtualHost
['vhosts_file']);
}
//Check validity of DocumentRoot
if($virtualHost['document'] === false) {
foreach($virtualHost['documentPath'] as
$value) {

43
if($virtualHost['documentPathValid'][$value] === false) {
$documentPathError = $value;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNoPath'],"<span style='color:black;'>".$value."</span>",
"DocumentRoot", $virtualHost['vhosts_file']);
break;
}
}
}
//Check validity of Directory Path
if($virtualHost['directory'] === false) {
foreach($virtualHost['directoryPath'] as $value)
{

if($virtualHost['directoryPathValid'][$value] === false) {


$documentPathError = $value;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNoPath'],"<span style='color:black;'>".$value."</span>",
"&lt;Directory ...", $virtualHost['vhosts_file']);
break;
}
}
}

44
//Check number of <VirtualHost equals or > to
number of ServerName
if($nb_Server != $nb_Virtual &&
$wampConf['NotCheckDuplicate'] == 'off') {
$port_number = false;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNbNotEqual'],"&lt;VirtualHost","ServerName",$virtualHos
t['vhosts_file']);
}
//Check number of port definition of <VirtualHost
*:xx> equals to number of ServerName
if($virtualHost['nb_Virtual_Port'] != $nb_Virtual &&
$wampConf['NotCheckDuplicate'] == 'off') {
$port_number = false;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] =
sprintf($langues['txtNbNotEqual'],"port definition of &lt;VirtualHost
*:xx&gt;","ServerName",$virtualHost['vhosts_file']);
}
//Check validity of port number
if($port_number && $virtualHost['port_number'] ===
false) {
$port_number = false;
$vhostError = true;
$vhostErrorCorrected = false;

45
$error_message[] =
sprintf($langues['txtPortNumber'],"&lt;VirtualHost
*:port&gt;",$virtualHost['vhosts_file']);
}
//Check if duplicate ServerName
if($virtualHost['nb_duplicate'] > 0) {
$DuplicateNames = '';
foreach($virtualHost['duplicate'] as
$NameValue)
$DuplicateNames .= " ".$NameValue;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] = "Duplicate ServerName
<span style='color:blue;'>".$DuplicateNames."</span> into
".$virtualHost['vhosts_file'];
}
//Check if duplicate Server IP
if($virtualHost['nb_duplicateIp'] > 0) {
$DuplicateNames = '';
foreach($virtualHost['duplicateIp'] as
$NameValue)
$DuplicateNames .= " ".$NameValue;
$vhostError = true;
$vhostErrorCorrected = false;
$error_message[] = "Duplicate IP <span
style='color:blue;'>".$DuplicateNames."</span> into
".$virtualHost['vhosts_file'];
}

46
}
}
}
if(empty($vhostsContents)) {
$vhostsContents = "<li><i style='color:red:'>No
VirtualHost</i></li>";
$vhostError = true;
$error_message[] =
sprintf($langues['txtNoVhost'],$wampConf['apacheVersion']);
}
if(!$c_hostsFile_writable){
$vhostError = true;
$error_message[] =
sprintf($langues['txtNotWritable'],$c_hostsFile)."<br>".nl2br($WarningMsg);
}
if($vhostError) {
$vhostsContents .= "<li><i style='color:red;'>Error(s)</i> See
below</li>";
$error_content .= "<p style='color:red;'>";
foreach($error_message as $value) {
$error_content .= $value."<br />";
}
$error_content .= "</p>\n";
if($vhostErrorCorrected)
$addVhost = "<li><a
href='add_vhost.php?lang=".$langue."'>".$langues['txtAddVhost']."</a> <span
style='font-size:0.72em;color:red;'>".$langues['txtCorrected']."</span></li>";
}
47
}
else {
$allToolsClass = "three-columns";
}

//Fin Récupération ServerName

// récupération des projets


$handle=opendir(".");
$projectContents = '';
while (($file = readdir($handle))!==false)
{
if (is_dir($file) && !in_array($file,$projectsListIgnore))
{
$projectContents .= '<li><a href="';
if($suppress_localhost)
$projectContents .= 'http://'.$file.$UrlPort.'/"';
else
$projectContents .= 'http://localhost'.$UrlPort.'/'.$file.'/"';
$projectContents .= '>'.$file.'</a></li>';
}
}
closedir($handle);
if (empty($projectContents))
$projectContents = "<li>".$langues['txtNoProjet']."</li>\n";
else {
48
if(strpos($projectContents,"http://localhost/") !== false) {
$projectContents .= "<li><i style='color:blue;'>Warning:</i> See
below</li>";
if(!isset($error_content))
$error_content = '';
$error_content .= "<p
style='color:blue;'>".sprintf($langues['nolocalhost'],$wampConf['apacheVersion
'])."</p>";
}
}

//initialisation
$phpExtContents = '';

// récupération des extensions PHP


$loaded_extensions = get_loaded_extensions();
// classement alphabétique des extensions
setlocale(LC_ALL,"{$langues['locale']}");
sort($loaded_extensions,SORT_LOCALE_STRING);
foreach ($loaded_extensions as $extension)
$phpExtContents .= "<li>${extension}</li>";

//vérifications diverses - Quel php.ini est chargé ?


$phpini = strtolower(trim(str_replace("\\","/",php_ini_loaded_file())));
$c_phpConfFileOri =
strtolower($c_phpVersionDir.'/php'.$wampConf['phpVersion'].'/'.$phpConfFile
ForApache);

49
$c_phpCliConf =
strtolower($c_phpVersionDir.'/php'.$wampConf['phpVersion'].'/'.$wampConf['p
hpConfFile']);

if($phpini != strtolower($c_phpConfFile) && $phpini != $c_phpConfFileOri) {


$error_content .= "<p style='color:red;'>*** ERROR *** The PHP
configuration loaded file is: ".$phpini." - should be: ".$c_phpConfFile." or
".$c_phpConfFileOri;
$error_content .= "<br>You must perform: <span
style='color:green;'>Right-click icon Wampmanager -> Refresh</span><br>";
if($phpini == $c_phpCliConf || $phpini == $c_phpCliConfFile)
$error_content .= " - This file is only for PHP in Command Line -
Maybe you've added 'PHPIniDir' in the 'httpd.conf' file. Delete or comment this
line.";
$error_content .= "</p>";
}
if($filelist = php_ini_scanned_files()) {
if (strlen($filelist) > 0) {
$error_content .= "<p style='color:red;'>*** ERROR *** There are
too much php.ini files</p>";
$files = explode(',', $filelist);
foreach ($files as $file) {
$error_content .= "<p style='color:red;'>*** ERROR ***
There are other php.ini files: ".trim(str_replace("\\","/",$file))."</p>";
}
}
}

50
$pageContents = <<< EOPAGE
<!DOCTYPE html>
<html>
<head>
<title>{$langues['titreHtml']}</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<link id="stylecall" rel="stylesheet" href="wampthemes/classic/style.css"
/>
<link rel="shortcut icon" href="favicon.ico" type="image/ico" />
</head>

<body>
<div id="head">
<div class="innerhead">
<h1><abbr title="Windows">W</abbr><abbr
title="Apache">A</abbr><abbr title="MySQL">M</abbr><abbr
title="PHP">P</abbr></h1>
<ul>
<li>PHP 5</li>
<li>Apache 2.4</li>
<li>MySQL 5</li>
</ul>
</div>
<ul class="utility">
<li>Version ${c_wampVersion} - ${c_wampMode}</li>
51
<li>${langueswitcher}${styleswitcher}</li>
</ul>
</div>

<div class="config">
<div class="innerconfig">

<h2> {$langues['titreConf']} </h2>

<dl class="content">
<dt>{$langues['versa']}</dt>
<dd>${apacheVersion}&nbsp;&nbsp;-&nbsp;<a
href='http://{$langues[$doca_version]}'>{$langues['documentation']}</a></dd
>
<dt>{$langues['server']}</dt>
<dd>${server_software}&nbsp;-
&nbsp;{$langues['portUsed']}{$ListenPorts}</dd>
<dt>{$langues['versp']}</dt>
<dd>${phpVersion}&nbsp;&nbsp;-&nbsp;<a
href='http://{$langues['docp']}'>{$langues['documentation']}</a></dd>
<dt>{$langues['phpExt']}</dt>
<dd>
<ul>
${phpExtContents}
</ul>
</dd>
${DBMSTypes}

52
</dl>
</div>
</div>

<div class="divider1">&nbsp;</div>

<div class="alltools ${allToolsClass}">


<div class="inneralltools">
<div class="column">
<h2>{$langues['titrePage']}</h2>
<ul class="tools">
<li><a href="?phpinfo=-1">phpinfo()</a></li>
{$phpmyadminTool}
{$addVhost}
</ul>
</div>
<div class="column">
<h2>{$langues['txtProjet']}</h2>
<ul class="projects">
${projectContents}
</ul>
</div>
<div class="column">
<h2>{$langues['txtAlias']}</h2>
<ul class="aliases">
${aliasContents}
53
</ul>
</div>
EOPAGE;
if($VirtualHostMenu == "on") {
$pageContents .= <<< EOPAGEA
<div class="column">
<h2>{$langues['txtVhost']}</h2>
<ul class="vhost">
${vhostsContents}
</ul>
</div>
EOPAGEA;
}
if(!empty($error_content)) {
$pageContents .= <<< EOPAGEB
<div id="error" style="clear:both;"></div>
${error_content}
EOPAGEB;
}
$pageContents .= <<< EOPAGEC
</div>
</div>

<div class="divider2">&nbsp;</div>

<ul id="foot">
54
<li><a
href="{$langues['forumLink']}">{$langues['forum']}</a></li>
</ul>

<script>
var select = document.getElementById("themes");
if (select.addEventListener) {
/* Only for modern browser and IE > 9 */
var stylecall = document.getElementById("stylecall");
/* looking for stored style name */
var wampStyle = localStorage.getItem("wampStyle");
if (wampStyle !== null) {
stylecall.setAttribute("href", "wampthemes/" + wampStyle + "/style.css");
selectedOption = document.getElementById(wampStyle);
selectedOption.setAttribute("selected", "selected");
}
else {
localStorage.setItem("wampStyle","classic");
selectedOption = document.getElementById("classic");
selectedOption.setAttribute("selected", "selected");
}
/* Changing style when select change */

select.addEventListener("change", function(){
var styleName = this.value;
stylecall.setAttribute("href", "wampthemes/" + styleName + "/style.css");

55
localStorage.setItem("wampStyle", styleName);
})
}
</script>
</body>
</html>
EOPAGEC;

echo $pageContents;

?>

56
CONCLUSION

The main aim of tis project to implement for movie lovers to get their
interested movie cd from online.

• Users can book cds for rent or request for movies which are not present
on site.
• This site provides feedback system where users can send queries to
admin.
• As the number of internet users is increasing daily implementing online
movie cd service can help users.

57
BIBLIOGRAPHY

1. Jon Duckett, Web programming with HTML, XHTML and CSS, 2nd Edition,
Wiley India, 2010
2. Uttam Roy, Web Technologies, OXFORD University press,2010

REFERERENCES
1. Bai , Michael Ekedahl, Web programming, CENAGE Learning, India
Edition, 2015
2. Paul S.Wang, An Introduction to Web DesignProgramming, India Edition,
2004

58
59

You might also like