This commit is contained in:
133
resources/normal.css
Normal file
133
resources/normal.css
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Layout
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0em;
|
||||
padding: 0em;
|
||||
font-family: verdana, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
div.header {
|
||||
border-bottom: 1px solid grey;
|
||||
padding-bottom: 0.5em;
|
||||
margin: 0.5em 1em 1em 1em;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
border-right: 1px solid grey;
|
||||
margin: 0em;
|
||||
padding: 1em;
|
||||
float: left;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
div.page {
|
||||
margin: 1em;
|
||||
margin-left: 9em;
|
||||
}
|
||||
|
||||
div.footer {
|
||||
border-top: 1px solid grey;
|
||||
margin: 1em;
|
||||
margin-top: 2em;
|
||||
padding-top: 0.5em;
|
||||
height: 3em;
|
||||
clear: both;
|
||||
|
||||
font-size: smaller;
|
||||
color: grey;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.sidebar ul {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
/*
|
||||
Page styles
|
||||
*/
|
||||
|
||||
div.header h1 {
|
||||
font-size: 3.0em;
|
||||
margin: 0.2em;
|
||||
margin-left: 0em;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Utilities
|
||||
*/
|
||||
br.spacer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.quote {
|
||||
margin-left: 1em;
|
||||
padding-left: 2em;
|
||||
border: 1px solid moccasin;
|
||||
background-color: moccasin;
|
||||
background-image: url('../resources/quote-32.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top left;
|
||||
}
|
||||
|
||||
div.quote blockquote {
|
||||
margin: 0em;
|
||||
padding: 0.3em 0.6em 0em 0.3em;
|
||||
font-style: italic;
|
||||
background-color: lightyellow;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Dialog boxes
|
||||
*/
|
||||
|
||||
p.message {
|
||||
border: 1px solid red;
|
||||
background-color: lightsalmon;
|
||||
color: darkred;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
p.information {
|
||||
border: 1px solid blue;
|
||||
background-color: powderblue;
|
||||
color: darkslateblue;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Boxed item
|
||||
*/
|
||||
|
||||
div.box {
|
||||
margin-bottom: 2em;
|
||||
padding: 1.5em;
|
||||
border: 1px solid grey;
|
||||
}
|
||||
|
||||
div.box ul {
|
||||
width: 20em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
div.box span.result {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Forms
|
||||
*/
|
||||
p.loginform {
|
||||
width: 30em;
|
||||
}
|
||||
p.loginform label {
|
||||
line-height: 200%;
|
||||
}
|
||||
p.loginform input {
|
||||
float: right;
|
||||
}
|
||||
BIN
resources/quote-32.png
Normal file
BIN
resources/quote-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
36
resources/rating.php
Normal file
36
resources/rating.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if( !isset($_GET['r']) || (float)$_GET['r'] < 0.0 || 10.0 < (float)$_GET['r'] ) {
|
||||
header("HTTP/1.0 500 Illegal Parameter", true, 500);
|
||||
die();
|
||||
}
|
||||
|
||||
$rating = (float)$_GET['r'] / 10;
|
||||
|
||||
// Load in the two images
|
||||
$bg = imagecreatefrompng( "rating_bg.png" );
|
||||
$fg = imagecreatefrompng( "rating_fg.png" );
|
||||
|
||||
// Find the size of the source images
|
||||
$width = imagesx( $bg );
|
||||
$height = imagesy( $bg );
|
||||
|
||||
// Modify the width to crop to the required percentage
|
||||
$fgwidth = $rating * $width;
|
||||
|
||||
// Crop the foreground to the desired width, copying it over the background
|
||||
imagecopyresampled( $bg, $fg, 0, 0, 0, 0, $fgwidth, $height, $fgwidth, $height );
|
||||
|
||||
// Send the correct image content type header
|
||||
header("Content-Type: image/png");
|
||||
|
||||
// Send the new combined image
|
||||
imagepng( $bg );
|
||||
|
||||
|
||||
?>
|
||||
BIN
resources/rating_bg.png
Normal file
BIN
resources/rating_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 990 B |
BIN
resources/rating_fg.png
Normal file
BIN
resources/rating_fg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user