Created
January 16, 2015 11:54
-
-
Save Massay/df761ccd5d26abf21359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
background: red; | |
margin: 0; | |
padding: 0; | |
background-image: url('background.png'); | |
/*position: relative;*/ | |
} | |
#banner{ | |
width:100%; | |
height: 50px; | |
margin: auto; | |
background-image: url('bannerbg.png'); | |
} | |
#banner img{ | |
margin: auto; | |
margin-left: 150px; | |
} | |
#movie_image{ | |
height: 420px; | |
} | |
footer{ | |
clear: both; | |
background: green; | |
text-align: center; | |
margin-bottom: 0; | |
margin-bottom: 0; | |
} | |
#top_inner_div{ | |
background-image: url('rbg.png'); | |
background-repeat: repeat-x; | |
position: relative; | |
} | |
#float_a{ | |
width: 50%; | |
float: left; | |
} | |
#float_b{ | |
width: 50%; | |
float: left; | |
} | |
.innerdiv{ | |
float: left; | |
} | |
span{ | |
margin-top: 0; | |
color: red; | |
position: absolute; | |
font-size: 75px; | |
} | |
dt{ | |
font-weight: bold; | |
} | |
dl{ | |
font-size: 18px; | |
padding: 10px; | |
} | |
#div_wrapper{ | |
width: 700px; | |
margin: auto; | |
border: 2px solid grey; | |
border-radius: 0.7em; | |
} | |
#identify{ | |
background-color: yellow; | |
padding: 20px; | |
} | |
.para{ | |
border: 1px solid black; | |
margin: 10px; | |
border-radius: 0.6em; | |
padding: 5px; | |
} | |
.img_body{ | |
width: 50px; | |
} | |
.det{ | |
margin: 10px; | |
float: right; | |
} | |
.para img{ | |
float: left; | |
padding: 2px; | |
} | |
.user_image img{ | |
margin: 0 10px; | |
float: left; | |
margin-bottom: 10px; | |
} | |
img{ | |
clear: both; | |
} | |
#first{ | |
width: 65%; | |
margin: auto; | |
} | |
#uno{ | |
position: absolute; | |
top: 99%; | |
right: 0; | |
} | |
#dos{ | |
position: absolute; | |
top: 97%; | |
right: 0; | |
} | |
#second{ | |
width: 35%; | |
background: green; | |
} | |
#second img{ | |
width: 100%; | |
} | |
.my_div{ | |
width: 35%; | |
border: 1px solid black; | |
float: left; | |
margin: 5px; | |
font-size: 13px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Movies</title> | |
<link rel="stylesheet" href="movie.css"> | |
</head> | |
<body> | |
<img src="w3c-css.png" alt="dddd" id="uno" class="img_body"> | |
<img src="w3c-xhtml.png" alt="dddd" id="dos" class="img_body"> | |
<?php | |
if(!isset($_GET['film'])){ | |
$_GET['film']="abe"; | |
} | |
$movie=$_GET['film']; | |
$info=fopen($movie.'/info.txt','r'); | |
if(!$info){ | |
die("Sorry,this file doesn't exist"); | |
} | |
$overview=fopen($movie.'/overview.txt','r'); | |
function read_a_file($file){ | |
$content=fopen($file,'r'); | |
$data=""; | |
while (!feof($content)) { | |
$line=fgets($content); | |
$data.=$line; | |
} | |
return $data; | |
} | |
$value=0; | |
$movie_title=""; | |
$movie_year=""; | |
$movie_rate=""; | |
$small_logo_Ontop=""; | |
while (!feof($info)) { | |
$line=fgets($info); | |
if($value===0){ | |
$movie_title=$line; | |
} | |
else if($value===1){ | |
$movie_year=$line; | |
} | |
else{ | |
$movie_rate=$line; | |
} | |
$value++; | |
} | |
$about_overview=""; | |
while (!feof($overview)) { | |
$line=fgets($overview); | |
$about_overview.=$line; | |
} | |
$my_array=explode("\n", $about_overview); | |
$check=glob($movie.'/*.txt'); | |
$reading_text1=read_a_file($check[2]); | |
$jung_per_line=explode("\n", $reading_text1); | |
$small_logo_Ontop=$jung_per_line[1]; | |
?> | |
<div id="banner"> | |
<img src="banner.png" alt=""> | |
</div> | |
<div id="title_div"> | |
<h1><center><?php echo $movie_title."(".$movie_year.")"?></center></h1> | |
</div> | |
<div id="div_wrapper"> | |
<div class="innerdiv" id="first"> | |
<div id="top_inner_div"> | |
<?php | |
if($small_logo_Ontop=="FRESH"){ | |
echo "<img src='freshbig.png' alt='This is image1'/>"; } | |
else | |
{ | |
echo "<img src='rottenbig.png' alt='This is image1'/>"; | |
} | |
echo "<span>".$movie_rate."%<span>"; | |
?> | |
</div> | |
<?php | |
$id_card=0; | |
?> | |
<?php | |
$number_of_reviews=(count($check)-2); | |
$number_in_a_position_a=0; | |
if($number_of_reviews%2==1){ | |
$number_in_a_position_a=(integer)(($number_of_reviews)/2)+1; | |
} | |
else{ | |
$number_in_a_position_a=(integer)(($number_of_reviews)/2); | |
} | |
$number_in_a_position_b=$number_of_reviews-$number_in_a_position_a; | |
?> | |
<div id="float_a"> | |
<?php | |
for($i=0;$i<$number_in_a_position_a;$i++){ | |
?> | |
<p class="para"> | |
<?php | |
$dat=read_a_file($check[$i+2]); | |
$aff=explode("\n", $dat); | |
$small_logo_Ontop=$aff[1]; | |
if($small_logo_Ontop=="FRESH"){ | |
echo "<img src='fresh.gif' alt='This is image1'/>"; } | |
else | |
{ | |
echo "<img src='rotten.gif' alt='This is image1'/>"; | |
} | |
echo $aff[0]."<br>"; | |
?> | |
</p> | |
<p class="user_image"> | |
<img src="critic.gif" alt="critic image"> | |
<?php echo $aff[2]."<br/>".$aff[3]?> | |
</p> | |
<?php | |
} | |
?> | |
</div> | |
<div id="float_b"> | |
<?php | |
for($i=0;$i<$number_in_a_position_b;$i++){ | |
?> | |
<p class="para"> | |
<?php | |
$dat=read_a_file($check[$i+$number_in_a_position_a+2]); | |
$aff=explode("\n", $dat); | |
$small_logo_Ontop=$aff[1]; | |
if($small_logo_Ontop=="FRESH"){ | |
echo "<img src='fresh.gif' alt='This is image1'/>"; } | |
else | |
{ | |
echo "<img src='rotten.gif' alt='This is image1'/>"; | |
} | |
echo $aff[0]."<br>"; | |
?> | |
</p> | |
<p class="user_image"> | |
<img src="critic.gif" alt="critic image"> | |
<?php echo $aff[2]."<br/>".$aff[3]?> | |
</p> | |
<?php | |
} | |
?> | |
</div> | |
</div> | |
<?php | |
//} | |
?> | |
<div class="innerdiv" id="second"> | |
<img src=<?php echo $movie.'/overview.png'?> id="movie_image" alt="This is an image"> | |
<p> | |
<dl> | |
<?php | |
for($i=0;$i<count($my_array);$i++){ | |
//$my_array[$i]; | |
$subArray=explode(":",$my_array[$i]); | |
echo "<dt>".$subArray[0]."</dt>"; | |
echo "<dd>".$subArray[1]."</dd>"; | |
} | |
?> | |
</dl> | |
</p> | |
</div> | |
<footer> | |
<p> | |
<?php | |
echo "(1 -".(count($check)-2).") of ".(count($check)-2); | |
?> | |
</p> | |
</footer> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment