Creation of the world

This commit is contained in:
Chouchen 2010-09-14 21:38:29 +00:00
parent 5a50cdb2e4
commit 08469447cb
108 changed files with 4685 additions and 0 deletions

1
.htaccess Normal file
View File

@ -0,0 +1 @@
php 1

251
CURL.php Normal file
View File

@ -0,0 +1,251 @@
<?php
/**
* OO cURL Class
* Object oriented wrapper for the cURL library.
* @author David Hopkins (semlabs.co.uk)
* @version 0.3
*/
class CURL
{
public $sessions = array();
public $retry = 0;
/**
* Adds a cURL session to stack
* @param $url string, session's URL
* @param $opts array, optional array of cURL options and values
*/
public function addSession( $url, $opts = false )
{
$this->sessions[] = curl_init( $url );
if( $opts != false )
{
$key = count( $this->sessions ) - 1;
$this->setOpts( $opts, $key );
}
}
/**
* Sets an option to a cURL session
* @param $option constant, cURL option
* @param $value mixed, value of option
* @param $key int, session key to set option for
*/
public function setOpt( $option, $value, $key = 0 )
{
curl_setopt( $this->sessions[$key], $option, $value );
}
/**
* Sets an array of options to a cURL session
* @param $options array, array of cURL options and values
* @param $key int, session key to set option for
*/
public function setOpts( $options, $key = 0 )
{
curl_setopt_array( $this->sessions[$key], $options );
}
/**
* Executes as cURL session
* @param $key int, optional argument if you only want to execute one session
*/
public function exec( $key = false )
{
$no = count( $this->sessions );
if( $no == 1 )
$res = $this->execSingle();
elseif( $no > 1 ) {
if( $key === false )
$res = $this->execMulti();
else
$res = $this->execSingle( $key );
}
if( $res )
return $res;
}
/**
* Executes a single cURL session
* @param $key int, id of session to execute
* @return array of content if CURLOPT_RETURNTRANSFER is set
*/
public function execSingle( $key = 0 )
{
if( $this->retry > 0 )
{
$retry = $this->retry;
$code = 0;
while( $retry >= 0 && ( $code[0] == 0 || $code[0] >= 400 ) )
{
$res = curl_exec( $this->sessions[$key] );
$code = $this->info( $key, CURLINFO_HTTP_CODE );
$retry--;
}
}
else
$res = curl_exec( $this->sessions[$key] );
return $res;
}
/**
* Executes a stack of sessions
* @return array of content if CURLOPT_RETURNTRANSFER is set
*/
public function execMulti()
{
$mh = curl_multi_init();
#Add all sessions to multi handle
foreach ( $this->sessions as $i => $url )
curl_multi_add_handle( $mh, $this->sessions[$i] );
do
$mrc = curl_multi_exec( $mh, $active );
while ( $mrc == CURLM_CALL_MULTI_PERFORM );
while ( $active && $mrc == CURLM_OK )
{
if ( curl_multi_select( $mh ) != -1 )
{
do
$mrc = curl_multi_exec( $mh, $active );
while ( $mrc == CURLM_CALL_MULTI_PERFORM );
}
}
if ( $mrc != CURLM_OK )
echo "Curl multi read error $mrc\n";
#Get content foreach session, retry if applied
foreach ( $this->sessions as $i => $url )
{
$code = $this->info( $i, CURLINFO_HTTP_CODE );
if( $code[0] > 0 && $code[0] < 400 )
$res[] = curl_multi_getcontent( $this->sessions[$i] );
else
{
if( $this->retry > 0 )
{
$retry = $this->retry;
$this->retry -= 1;
$eRes = $this->execSingle( $i );
if( $eRes )
$res[] = $eRes;
else
$res[] = false;
$this->retry = $retry;
echo '1';
}
else
$res[] = false;
}
curl_multi_remove_handle( $mh, $this->sessions[$i] );
}
curl_multi_close( $mh );
return $res;
}
/**
* Closes cURL sessions
* @param $key int, optional session to close
*/
public function close( $key = false )
{
if( $key === false )
{
foreach( $this->sessions as $session )
curl_close( $session );
}
else
curl_close( $this->sessions[$key] );
}
/**
* Remove all cURL sessions
*/
public function clear()
{
foreach( $this->sessions as $session )
curl_close( $session );
unset( $this->sessions );
}
/**
* Returns an array of session information
* @param $key int, optional session key to return info on
* @param $opt constant, optional option to return
*/
public function info( $key = false, $opt = false )
{
if( $key === false )
{
foreach( $this->sessions as $key => $session )
{
if( $opt )
$info[] = curl_getinfo( $this->sessions[$key], $opt );
else
$info[] = curl_getinfo( $this->sessions[$key] );
}
}
else
{
if( $opt )
$info[] = curl_getinfo( $this->sessions[$key], $opt );
else
$info[] = curl_getinfo( $this->sessions[$key] );
}
return $info;
}
/**
* Returns an array of errors
* @param $key int, optional session key to retun error on
* @return array of error messages
*/
public function error( $key = false )
{
if( $key === false )
{
foreach( $this->sessions as $session )
$errors[] = curl_error( $session );
}
else
$errors[] = curl_error( $this->sessions[$key] );
return $errors;
}
/**
* Returns an array of session error numbers
* @param $key int, optional session key to retun error on
* @return array of error codes
*/
public function errorNo( $key = false )
{
if( $key === false )
{
foreach( $this->sessions as $session )
$errors[] = curl_errno( $session );
}
else
$errors[] = curl_errno( $this->sessions[$key] );
return $errors;
}
}
?>

41
addSite.php Normal file
View File

@ -0,0 +1,41 @@
<?
$url = $_POST['newLink'];
if($url == '' || !isset($_POST['newLink']))
header('Location: index.php');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="SHORTCUT ICON" href="../favicon.ico"/>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox-1.3.0.css">
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<title>Ma Page d'accueil</title>
<style>img{max-width:100px;max-height:100px;padding:5px;} img:hover{border:5px solid #00AAFF;padding:0;}</style>
<script>
$(document).ready(function(){
$('.choose').click(function(){
var id = $(this).attr('id');
var url = "<?=$url?>";
var name = 'test';
$.post('addSiteXML.php', {number: id, url: url, name: name}, function(data){
document.location.href="index.php"
});
});
});
</script>
</head>
<body>
<?
echo 'URL : '.$url.'<br/>';
require('blogs_last_post.php');
$opts = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 10);
$blogs = new Blogs_last_post();
$blogs->addSession($url, $opts);
$result = $blogs->exec();
echo $blogs->getAllImagesToChoose($result);
$blogs->clear();

26
add_note.html Normal file
View File

@ -0,0 +1,26 @@
<h3 class="popupTitle">Add a new note</h3>
<!-- The preview: -->
<div id="previewNote" class="note yellow" style="left:0;top:65px;z-index:1">
<div class="delete"></div>
<div class="body"></div>
<div class="author"></div>
<span class="data"></span>
</div>
<div id="noteData"> <!-- Holds the form -->
<form action="" method="post" class="note-form">
<label for="note-body">Texte de la note</label>
<textarea name="note-body" id="note-body" class="pr-body" cols="30" rows="6"></textarea>
<label>Couleur</label> <!-- Clicking one of the divs changes the color of the preview -->
<div class="color yellow"></div>
<div class="color blue"></div>
<div class="color green"></div>
<!-- The green submit button: -->
<a id="note-submit" href="" class="green-button">Enregistrer</a>
</form>
</div>

25
ajax/addSiteXML.php Normal file
View File

@ -0,0 +1,25 @@
<?
$number = $_POST['number'];
$url = $_POST['url'];
$name = $_POST['name'];
$nb = 1;
$xmla = simplexml_load_file('../db/blog_links.xml');
$test = $xmla->note;
$field_count = count($test);
for($i=0;$i<$field_count;$i++){
if($nb <= $test[$i]['id']) $nb = $test[$i]['id']+1;
}
$newnote = $xmla->addChild('link');
$newnote->addChild('name', $name);
$newnote->addChild('number', $number);
$newnote->addChild('url', $url);
$xmla->asXML('../db/blog_links.xml');
echo $nb;
?>

25
ajax/delete-notes.php Normal file
View File

@ -0,0 +1,25 @@
<?// Escaping the input data:
$rid = $_POST['id'];
$explodeid = explode("-",$rid);
$id = intval($explodeid[1]);
$xmla = simplexml_load_file('../db/notes.xml');
$target = false;
$i = 0;
foreach ($xmla->note as $s) {
if ($s['id']==$id) { $target = $i; break; }
$i++;
}
if ($target !== false) {
unset($xmla->note[$target]);
}
$xmla->asXML('../db/notes.xml');
$target++;
echo $target;
?>

21
ajax/post-config.php Normal file
View File

@ -0,0 +1,21 @@
<?// Escaping the input data:
$clock = $_POST['clock'];
$meteo = $_POST['meteo'];
$notes = $_POST['notes'];
$search = $_POST['search'];
$links = $_POST['links'];
$blogs = $_POST['blogs'];
$xmla = simplexml_load_file('../db/config.xml');
$config_xml = $xmla->item;
$config_xml[0]->visibility = $clock;
$config_xml[1]->visibility = $meteo;
$config_xml[2]->visibility = $notes;
$config_xml[3]->visibility = $search;
$config_xml[4]->visibility = $links;
$config_xml[5]->visibility = $blogs;
$xmla->asXML('../db/config.xml');
echo "1";
?>

29
ajax/post-notes.php Normal file
View File

@ -0,0 +1,29 @@
<?// Escaping the input data:
$body = $_POST['body'];
$color = $_POST['color'];
$zindex = $_POST['zindex'];
$nb = 1;
$xmla = simplexml_load_file('../db/notes.xml');
$field_count = count($xmla->note);
/*foreach($xmla->note as $test){
if($nb < $test['id']){$nb=$test['id'];}
}*/
$test = $xmla->note;
for($i=0;$i<$field_count;$i++){
if($nb <= $test[$i]['id']) $nb = $test[$i]['id']+1;
}
$newnote = $xmla->addChild('note');
$newnote->addAttribute("id", $nb);
$newnote->addChild('text', $body);
$newnote->addChild('color', $color);
$newnote->addChild('zindex', $zindex);
$newnote->addChild('top', '0');
$newnote->addChild('left', '0');
$xmla->asXML('../db/notes.xml');
echo $nb;
?>

21
ajax/saveTodoist.php Normal file
View File

@ -0,0 +1,21 @@
<?
$xmla = simplexml_load_file('../db/todoist.xml');
if(isset($_GET['token'])){
$token = trim($_GET['token']);
$xmla->addChild("token", $token);
$xmla->asXML('../db/todoist.xml');
echo $token;
}else if(isset($_GET['name']) && isset($_GET['id'])){
$name = trim($_GET['name']);
$id = trim($_GET['id']);
$xmla->addChild("name", $name);
$xmla->addChild("id", $id);
$xmla->asXML('../db/todoist.xml');
echo $id;
}

22
ajax/update_position.php Normal file
View File

@ -0,0 +1,22 @@
<?php // Error reporting error_reporting(E_ALL^E_NOTICE);
// Validating the input data: if(!is_numeric($_GET['id']) || !is_numeric($_GET['x']) || !is_numeric($_GET['y']) || !is_numeric($_GET['z'])) die("0");
// Escaping: $id = (int)$_GET['id']; $x = (int)$_GET['x']; $y = (int)$_GET['y']; $z = (int)$_GET['z'];
// Saving the position and z-index of the note: $xmla = simplexml_load_file('../db/notes.xml');
$target = -1;
$i = 0;
foreach ($xmla->note as $s) {
if ($s['id']==$id) { $target = $i; break; }
$i++;
}
$xmla->note[$target]->top = $y;
$xmla->note[$target]->left = $x;
$xmla->note[$target]->zindex = $z;
$xmla->asXML('../db/notes.xml');
echo $target; ?>

View File

@ -0,0 +1,27 @@
<?php // Error reporting error_reporting(E_ALL^E_NOTICE);
// Validating the input data: if(!is_numeric($_GET['x']) || !is_numeric($_GET['y'])) die("0");
// Escaping: $id = $_GET['id']; $x = (int)$_GET['x']; $y = (int)$_GET['y'];
// Saving the position and z-index of the note: $xmla = simplexml_load_file('../db/config.xml');
/*if($id == "weather"){
$xmla->item[1]->y = $y;
$xmla->item[1]->x = $x;
$target = 1;
echo $id;
}*/
$target = -1;
$i = 0;
foreach ($xmla->item as $s) {
if ($s['id']==$id) { $target = $i; break; }
$i++;
}
$xmla->item[$target]->y = $y;
$xmla->item[$target]->x = $x;
$xmla->asXML('../db/config.xml');
echo $target; ?>

11
blogs.php Normal file
View File

@ -0,0 +1,11 @@
<?
require('blogs_last_post.php');
$opts = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 10);
$blogs = new Blogs_last_post();
foreach($blogs->getLinks() as $link)
{
$blogs->addSession($link['url'], $opts);
}
echo $blogs->getEverything();
$blogs->clear();

177
blogs_last_post.php Normal file
View File

@ -0,0 +1,177 @@
<?
require('CURL.php');
class Blogs_last_post extends CURL{
private $_result;
/*private $listeImages = array(
0 => 0, // penelope
1 => 12, //explosm
2 => 0, // margaux
);
private $nomImages = array(
0 => 'PenelopeBagieu',
1 => 'CyanideAndHapiness',
2 => 'MargauxMotin',
);
public $link = array(
0 => 'http://www.penelope-jolicoeur.com/',
1 => 'http://www.explosm.net/comics/',
2 => 'http://margauxmotin.typepad.fr/',
);*/
private $link = array();
function getResult()
{
return $this->_result;
}
public function getLinks(){
if($linksXML = simplexml_load_file('db/blog_links.xml')){
foreach($linksXML->link as $individualLink){
$this->link[] = array('name'=>$individualLink->name, 'url'=>$individualLink->url, 'number'=>$individualLink->number);
}
return $this->link;
}
else
return;
}
function getTitles()
{
$xhtml = "";
try{
foreach($this->exec() as $result)
{
$xhtml .= $this->getTitle($result);
$xhtml .= '<br/>';
}
}catch(Exception $e)
{
$xhtml .= $this->error();
}
return $xhtml;
}
function getTitle($result = null, $url = null)
{
if(isset($result))
{
preg_match( "/<h3 class=\"entry-header\">(.*)<\/h3>/i", $result, $match );
if(isset($match[1]))
return utf8_decode(strip_tags($match[1]));
else{
preg_match( "/<title>(.*)<\/title>/i", $result, $title );
if(isset($title[1]))
return $title[1];
else
return 'Erreur : pas de titre de blog trouvé.';
}
}
//TODO en fonction de l'url et non du resultat du cURL
}
function getPost()
{
}
function createThumbnail($result, $title = 0)
{
if(isset($result))
{
preg_match_all( "#<img[^>]+src=['|\"](.*?)['|\"][^>]*>#i", $result, $match );
/*$ret = file_put_contents('match.txt', var_export($match,true), FILE_APPEND);
if ($ret === false)
{
echo 'erreur';
}*/
$number = $this->link[$title]['number'];
$title = $this->link[$title]['name'];
if(isset($match[1][(int)$number]))
{
$source = @imagecreatefromjpeg($match[1][(int)$number]);
if($source == false)
$source = @imagecreatefrompng($match[1][(int)$number]);
$wSource = @imagesx($source);
$hSource = @imagesy($source);
$destination = imagecreatetruecolor(50, 50);
@imagecopyresampled($destination, $source, 0, 0, 0, 0, 50, 50, $wSource, $hSource);
@imagepng($destination, 'images/blogs/'.$title.'.png');
return 'images/blogs/'.$title.'.png';
}
}
}
function getImages($notFromGetImage = false)
{
if($notFromGetImage){
//TODO stuff
}else{
$xhtml = "";
$i = 0;
try{
foreach($this->exec() as $result)
{
$xhtml .= '<img src="'.$this->createThumbnail($result, $i).'" />';
$xhtml .= '<br/>';
$i++;
}
}catch(Exception $e)
{
$xhtml .= $this->error();
}
return $xhtml;
}
}
function getAllImagesToChoose($result,$notFromGetImage = false)
{
if($notFromGetImage){
//TODO stuff
}else{
preg_match_all( "#<img[^>]+src=['|\"](.*?)['|\"][^>]*>#i", $result, $match );
$nbImages = count($match[1]);
$xhtml = 'Liste d\'images : <br/>';
for($i = 0; $i<$nbImages; $i++){
$xhtml .= '<img src="'.$match[1][$i].'" id="n-'.$i.'" class="choose"/><br/>';
}
return $xhtml;
}
}
function getEverything()
{
$temps_debut = microtime(true);
$xhtml = "";
$i = 0;
try{
foreach($this->exec() as $result)
{
$xhtml .= '<a href="'.$this->link[$i]['url'].'" target="_blank" class="blogLinks"><img src="'.$this->createThumbnail($result, $i).'" />&nbsp;&nbsp;'.utf8_encode($this->getTitle($result))."</a>";
$xhtml .= '<br/>';
$i++;
}
}catch(Exception $e)
{
$xhtml .= $this->error();
}
$temps_fin = microtime(true);
$xhtml .= 'Temps d\'execution : '.round($temps_fin - $temps_debut, 4).'s';
return $xhtml;
}
}

62
calculator.html Normal file
View File

@ -0,0 +1,62 @@
<html>
<head>
<title>Calculator</title>
<link rel="stylesheet" type="text/css" href="css/calculator.css"/>
</head>
<body>
<div id="calculator">
<div id="display">
<div id="display_cell">
<div id="display_scroll">
<table id="display_grid">
<col id="display_gutter"/>
<col id="display_main"/>
<col id="display_other"/>
<!-- the display lines go into this empty tbody -->
<tbody id="display_grid_body"/>
</table>
</div>
</div>
</div>
<div id="divide">
<div><button>+</button></div>
</div>
<div id="button_pad">
<table>
<tbody>
<tr>
<td><button id="kp_7" class="pad_button">7</button></td>
<td><button id="kp_8" class="pad_button">8</button></td>
<td><button id="kp_9" class="pad_button">9</button></td>
<td><button id="kp_div" class="pad_button round_pad_button">&divide;</button></td>
</tr>
<tr>
<td><button id="kp_4" class="pad_button">4</button></td>
<td><button id="kp_5" class="pad_button">5</button></td>
<td><button id="kp_6" class="pad_button">6</button></td>
<td><button id="kp_mul" class="pad_button round_pad_button">&times;</button></td>
</tr>
<tr>
<td><button id="kp_1" class="pad_button">1</button></td>
<td><button id="kp_2" class="pad_button">2</button></td>
<td><button id="kp_3" class="pad_button">3</button></td>
<td><button id="kp_sub" class="pad_button round_pad_button">&minus;</button></td>
</tr>
<tr>
<td><button id="kp_0" class="pad_button">0</button></td>
<td><button id="kp_dot" class="pad_button round_pad_button">.</button></td>
<td><button id="kp_eq" class="pad_button round_pad_button">=</button></td>
<td><button id="kp_add" class="pad_button round_pad_button">+</button></td>
</tr>
</tbody>
</table>
</div>
</div>
<script type="text/javascript" src="js/calculator.js"></script>
<script type="text/javascript">
var calculator = new Calculator();
window.addEventListener('load', calculator.init.bind(calculator), false);
</script>
</body>
</html>

12
config.php Normal file
View File

@ -0,0 +1,12 @@
<div id="config">
<form id="config_form" action="" method="post">
<h3>Modules configuration</h3><br/>
Clock module : <input type="radio" name="clock_group" value="true"<?if ($config_xml[0]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="clock_group" value="false"<?if ($config_xml[0]->visibility == "false"){echo " checked";}?> />false<br/><br/>
Meteo module : <input type="radio" name="meteo_group" value="true"<?if ($config_xml[1]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="meteo_group" value="false"<?if ($config_xml[1]->visibility == "false"){echo " checked";}?> />false<br/><br/>
Notes module : <input type="radio" name="notes_group" value="true"<?if ($config_xml[2]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="notes_group" value="false"<?if ($config_xml[2]->visibility == "false"){echo " checked";}?> />false<br/><br/>
Search module : <input type="radio" name="search_group" value="true"<?if ($config_xml[3]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="search_group" value="false"<?if ($config_xml[3]->visibility == "false"){echo " checked";}?> />false<br/><br/>
Links module : <input type="radio" name="links_group" value="true"<?if ($config_xml[4]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="links_group" value="false"<?if ($config_xml[4]->visibility == "false"){echo " checked";}?> />false<br/><br/>
Blogs module : <input type="radio" name="blogs_group" value="true"<?if ($config_xml[5]->visibility == "true"){echo " checked";}?> />true&nbsp;&nbsp;<input type="radio" name="blogs_group" value="false"<?if ($config_xml[5]->visibility == "false"){echo " checked";}?> />false<br/><br/>
<a id="config-submit" href="" class="green-button">Enregistrer</a>
</form>
</div>

198
css/calculator.css Normal file
View File

@ -0,0 +1,198 @@
html, body {
margin: 0px;
padding: 0px;
}
body {
width: 100%;
height: 100%;
overflow: hidden;
}
#calculator {
height: 100%;
width: 100%;
display: table;
border-collapse: collapse;
background-color: #f8f8f8;
}
#display {
font-family: Courier;
display: table-row;
background-color: white;
}
#display_cell {
display: table-cell;
vertical-align: bottom;
background-image: -webkit-gradient(linear, left top, 15 top, from(#f3f3f3), color-stop(0.9, #f3f3f3), color-stop(0.9, white), to(white));
}
#display_scroll {
overflow: auto;
}
#display_grid {
font-size: 14px;
width: 100%;
}
#display_gutter {
width: 15px;
}
#display_grid .line_number {
font-size: 10px;
vertical-align: top;
font-family: arial;
font-weight:bold;
padding: 10px 0px;
}
#display_grid .expression_editor {
outline-style: none;
font-weight:bold;
font-size: 20px;
word-break: break-all;
}
#display_grid .expression_cell {
padding: 10px 0px;
}
#display_grid .result_cell {
padding: 10px 0px;
text-align: right;
vertical-align: bottom;
}
.result_display {
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
padding: 0px 7px;
color: #4993d2;
background-color: #e6eef9;
font-family: arial;
font-weight:bold;
font-size: 16px;
}
#divide {
display: table-row;
height: 0.5em;
}
#divide > div {
border-top: 1px solid #d0d0d0;
border-bottom: 1px solid #d0d0d0;
}
#divide button {
border: 1px solid #f8f8f8;
display: block;
margin-right: auto;
margin-left: auto;
text-align: center;
font-size: xx-small;
background-color: #f8f8f8;
color: #909090;
cursor: hand;
}
#divide button:hover {
border: 1px solid #acacac;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#d0d0d0));
}
#divide button:active {
background: -webkit-gradient(linear, left top, left bottom, from(#d0d0d0), to(#fafafa));
}
#button_pad {
display: table-row;
height: 130px;
}
#button_pad table {
border-collapse: collapse;
border-spacing: 0px;
margin: 5px auto;
border-style: none;
}
#button_pad table td {
padding: 0px;
}
.pad_button {
border-top: 1px solid #acacac;
border-left: 1px solid #acacac;
border-right: none;
border-bottom: none;
width: 45px;
height: 30px;
background: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#d0d0d0));
font-weight: bold;
text-align: center;
cursor: hand;
font-size: small;
}
.round_pad_button {
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border: 1px solid #acacac;
width: 30px;
height: 28px;
margin: 1px 3px;
}
#kp_7 {
border-top-left-radius: 10px;
-moz-border-top-left-radius: 10px;
-webkit-border-top-left-radius: 10px;
}
#kp_9 {
border-top-right-radius: 10px;
-moz-border-top-right-radius: 10px;
-webkit-border-top-right-radius: 10px;
}
#kp_3 {
border-bottom-right-radius: 10px;
-moz-border-bottom-right-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
}
#kp_0 {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
-moz-border-bottom-right-radius: 10px;
-moz-border-bottom-left-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
}
#kp_9, #kp_6, #kp_3, #kp_0 {
border-right: 1px solid #acacac;
}
#kp_0, #kp_2, #kp_3 {
border-bottom: 1px solid #acacac;
}
#kp_eq {
border-bottom: 1px solid #acacac;
width: 40px;
}
.pad_button:active {
background: -webkit-gradient(linear, left top, left bottom, from(#d0d0d0), to(#fafafa));
}

152
css/clock.css Normal file
View File

@ -0,0 +1,152 @@
#fancyClock{
margin:40px auto;
height:100px;
/*border:1px solid #111111;*/
width:300px;
float:left;
}
#fancyClock:after{content: div;clear:both;}
.clock{
/* The .clock div. Created dynamically by jQuery */
background:url(../images/clock.png) top left no-repeat;
background-color:#FFF;
height:100px;
width:100px;
position:relative;
overflow:hidden;
float:left;
}
.clock .rotate{
/* There are two .rotate divs - one for each half of the background */
position:absolute;
width:100px;
height:100px;
top:0;
left:0;
}
.rotate.right{
display:none;
z-index:11;
}
.clock .bg, .clock .front{
width:50px;
height:100px;
background-color:#FFF;
position:absolute;
top:0;
}
.clock .display{
/* Holds the number of seconds, minutes or hours respectfully */
position:absolute;
width:100px;
font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
z-index:20;
color:#F5F5F5;
font-size:30px;
text-align:center;
top:33px;
left:0;
/* CSS3 text shadow: */
text-shadow:4px 4px 5px #333333;
}
/* The left part of the background: */
.clock .bg.left{ left:0; }
/* Individual styles for each color: */
.orange .bg.left{ background:url(../images/bg_orange.png) no-repeat left top; }
.green .bg.left{ background:url(../images/bg_green.png) no-repeat left top; }
.blue .bg.left{ background:url(../images/bg_blue.png) no-repeat left top; }
/* The right part of the background: */
.clock .bg.right{ left:100px; }
.orange .bg.right{ background:url(../images/bg_orange.png) no-repeat right top; }
.green .bg.right{ background:url(../images/bg_green.png) no-repeat right top; }
.blue .bg.right{ background:url(../images/bg_blue.png) no-repeat right top; }
.clock .front.left{
left:0;
z-index:10;
}

View File

@ -0,0 +1,333 @@
/*
* FancyBox - jQuery Plugin
* Simple and fancy lightbox alternative
*
* Copyright (c) 20010 Janis Skarnelis
* Examples and documentation at: http://fancybox.net
*
* Version: 1.3.0 (02/02/2010)
* Requires: jQuery v1.3+
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
height: 40px;
width: 40px;
margin-top: -20px;
margin-left: -20px;
cursor: pointer;
overflow: hidden;
background: transparent;
z-index: 1104;
display: none;
}
* html #fancybox-loading { /* IE6 */
position: absolute;
margin-top: 0;
}
#fancybox-loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background: transparent url('../images/fancy_loading.png') no-repeat;
}
#fancybox-overlay {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: #000;
z-index: 1100;
display: none;
}
* html #fancybox-overlay { /* IE6 */
position: absolute;
width: 100%;
}
#fancybox-tmp {
padding: 0;
margin: 0;
border: 0;
overflow: auto;
display: none;
}
#fancybox-wrap {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 20px;
z-index: 1101;
display: none;
}
#fancybox-outer {
position: relative;
width: 100%;
height: 100%;
background: #FFF;
}
#fancybox-inner {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
padding: 0;
margin: 0;
outline: none;
overflow: hidden;
}
#fancybox-hide-sel-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
#fancybox-close {
position: absolute;
top: -15px;
right: -15px;
width: 32px;
height: 32px;
background: url('../images/fancy_close.png') top left no-repeat;
cursor: pointer;
z-index: 1103;
display: none;
}
#fancybox_error {
color: #444;
font: normal 12px/20px Arial;
}
#fancybox-content {
height: auto;
width: auto;
padding: 0;
margin: 0;
}
#fancybox-img {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: none;
outline: none;
line-height: 0;
vertical-align: top;
-ms-interpolation-mode: bicubic;
}
#fancybox-frame {
position: relative;
width: 100%;
height: 100%;
border: none;
display: block;
}
#fancybox-title {
position: absolute;
bottom: 0;
left: 0;
font-family: Arial;
font-size: 12px;
z-index: 1102;
}
.fancybox-title-inside {
padding: 10px 0;
text-align: center;
color: #333;
}
.fancybox-title-outside {
padding-top: 5px;
color: #FFF;
text-align: center;
font-weight: bold;
}
.fancybox-title-over {
color: #FFF;
text-align: left;
}
#fancybox-title-over {
padding: 10px;
background: url('../images/fancy_title_over.png');
display: block;
}
#fancybox-title-wrap {
display: inline-block;
}
#fancybox-title-wrap span {
height: 32px;
float: left;
}
#fancybox-title-left {
padding-left: 15px;
background: transparent url('../images/fancy_title_left.png') repeat-x;
}
#fancybox-title-main {
font-weight: bold;
line-height: 29px;
background: transparent url('../images/fancy_title_main.png') repeat-x;
color: #FFF;
}
#fancybox-title-right {
padding-left: 15px;
background: transparent url('../images/fancy_title_right.png') repeat-x;
}
#fancybox-left, #fancybox-right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
outline: none;
background-image: url('../images/blank.gif');
z-index: 1102;
display: none;
}
#fancybox-left {
left: 0px;
}
#fancybox-right {
right: 0px;
}
#fancybox-left-ico, #fancybox-right-ico {
position: absolute;
top: 50%;
left: -9999px;
width: 30px;
height: 30px;
margin-top: -15px;
cursor: pointer;
z-index: 1102;
display: block;
}
#fancybox-left-ico {
background: transparent url('../images/fancy_nav_left.png') no-repeat;
}
#fancybox-right-ico {
background: transparent url('../images/fancy_nav_right.png') no-repeat;
}
#fancybox-left:hover, #fancybox-right:hover {
visibility: visible; /* IE6 */
}
#fancybox-left:hover span {
left: 20px;
}
#fancybox-right:hover span {
left: auto;
right: 20px;
}
div.fancy-bg {
position: absolute;
padding: 0;
margin: 0;
border: 0;
z-index: 1001;
}
div#fancy-bg-n {
top: -20px;
left: 0;
width: 100%;
height: 20px;
background: transparent url('../images/fancy_shadow_n.png') repeat-x;
}
div#fancy-bg-ne {
top: -20px;
right: -20px;
width: 20px;
height: 20px;
background: transparent url('../images/fancy_shadow_ne.png') no-repeat;
}
div#fancy-bg-e {
top: 0;
right: -20px;
height: 100%;
width: 20px;
background: transparent url('../images/fancy_shadow_e.png') repeat-y;
}
div#fancy-bg-se {
bottom: -20px;
right: -20px;
width: 20px;
height: 20px;
background: transparent url('../images/fancy_shadow_se.png') no-repeat;
}
div#fancy-bg-s {
bottom: -20px;
left: 0;
width: 100%;
height: 20px;
background: transparent url('../fancy_shadow_s.png') repeat-x;
}
div#fancy-bg-sw {
bottom: -20px;
left: -20px;
width: 20px;
height: 20px;
background: transparent url('../images/fancy_shadow_sw.png') no-repeat;
}
div#fancy-bg-w {
top: 0;
left: -20px;
height: 100%;
width: 20px;
background: transparent url('../images/fancy_shadow_w.png') repeat-y;
}
div#fancy-bg-nw {
top: -20px;
left: -20px;
width: 20px;
height: 20px;
background: transparent url('../images/fancy_shadow_nw.png') no-repeat;
}

316
css/main.css Normal file
View File

@ -0,0 +1,316 @@
/* Google Menu StyleSheet*/
* {
margin: 0;
padding: 0;
}
body {
background: #FFFFFF;
font-family: "Droid Sans", Arial, Helvetica, sans-serif;
font-size: 12px;
color: #6B6B6B;
background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#ebeff9));
}
li a {
text-decoration: none;
}
a:link {color:#2D406D}
a:visited {color:#2D406D}
li.disabled {opacity:0.5;}
span.accelerator {
float:right;
color:#CCC;
padding-right:8px;
display:none;
}
li img {
width:16px;
height:16px;
border:none;
vertical-align:top;
}