colonymech / docs / www / colonyscout / index.php @ 36d4e296
History | View | Annotate | Download (3.92 KB)
1 |
<?php
|
---|---|
2 |
$cacheFile="cache/index.html"; |
3 |
if (file_exists($cacheFile)) //we can read this cache file back reduce database load |
4 |
{ |
5 |
header("Content-Type: text/html"); |
6 |
readfile($cacheFile); |
7 |
exit;
|
8 |
} else {
|
9 |
ob_start(); //start buffering so we can cache for future accesses
|
10 |
} |
11 |
|
12 |
?>
|
13 |
|
14 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
15 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> |
16 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
17 |
<meta name="google-site-verification" content="hwSOLj8uDUaKyOjQ4eAfxBHhnmCH0C-tS5hlC-wk0lw" /> |
18 |
<meta name="description" content="A low cost, versatile research platform for autonomous systems in collaborative robotics"> |
19 |
<meta name="keywords" content="Scout, robotics, Carnegie Mellon University, autonomous, engineer"> |
20 |
|
21 |
<?php include("header.php"); ?> |
22 |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> |
23 |
<script type="text/javascript"> |
24 |
google.load("jquery", "1.4.2");
|
25 |
|
26 |
numphotos = 6;
|
27 |
photoselect = (Math.floor(Math.random() * numphotos) + 1);
|
28 |
|
29 |
photo = new Image();
|
30 |
photo.src = "photos/" + photoselect + ".jpg";
|
31 |
|
32 |
nextphoto = new Image();
|
33 |
nextphoto.src = "photos/" + ((photoselect % numphotos) + 1) + ".jpg";
|
34 |
|
35 |
google.setOnLoadCallback(function() {
|
36 |
$(document).ready(function() {
|
37 |
$('#photo').css('background-image', "url('" + photo.src + "')");
|
38 |
$('#photo').fadeIn();
|
39 |
});
|
40 |
});
|
41 |
|
42 |
|
43 |
function changephoto(){
|
44 |
photoselect = ((photoselect % numphotos) + 1);
|
45 |
photo = nextphoto;
|
46 |
|
47 |
$('#photo').fadeOut(500, function(){
|
48 |
$('#photo').css('background-image', "url('" + photo.src + "')");
|
49 |
$('#photo').fadeIn();
|
50 |
});
|
51 |
|
52 |
nextphoto = new Image();
|
53 |
nextphoto.src = "photos/" + ((photoselect % numphotos) + 1); + ".jpg";
|
54 |
}
|
55 |
|
56 |
</script>
|
57 |
<script src="Cambria_400.font.js" type="text/javascript"></script> |
58 |
<script type="text/javascript"> |
59 |
Cufon.replace('#hero-banner-text', { fontFamily:'Cambria', textShadow:'#CCCCCC 1px 1px' });
|
60 |
</script>
|
61 |
<title>Home | ColonyScout.com</title> |
62 |
|
63 |
</head>
|
64 |
<body bgcolor="#eeeeee"> |
65 |
|
66 |
<div id="general"> |
67 |
<?php include("nav.php"); ?> |
68 |
<div id="body"> |
69 |
<div id="body-boxes"> |
70 |
<div class="box-row"> |
71 |
<div id="hero-banner"> |
72 |
<div id="hero-banner-text">An affordable, versatile research platform for autonomous systems in collaborative robotics |
73 |
<br/><br/> |
74 |
<a href="gallery.php" class="small">See it in action >></a> |
75 |
</div>
|
76 |
</div>
|
77 |
<div id="hero-banner-side"></div> |
78 |
</div>
|
79 |
|
80 |
<div id="photo" style="display: none; width:700px; height:367px; margin: 0 0 0 0; background-color: #000000; background-image:url('photos/1.jpg'); background-repeat:no-repeat;"> |
81 |
<a href="javascript: changephoto();" style="width:700px; height:367px; margin:0 0 10 0; float:left; text-decoration: none; color: #000000;"></a> |
82 |
</div>
|
83 |
|
84 |
|
85 |
<div class="box-row topmargin"> |
86 |
<div class="white-top"></div> |
87 |
<div class="white-body text-box"> |
88 |
<div id="twitter-status"> |
89 |
<span class="newest"/><small>09.06.2010</small><br/>We're on @BotJunkie! @roboclub Colony Scout Offers Cute And Useful Swarm Robots <a href="http://bit.ly/aSnw7J">http://bit.ly/aSnw7J</a> #robotics #scout</span> |
90 |
<p><small>08.14.2010</small><br/>Scoutfly Board Completed - The Scoutfly board has finally been completed. We have done a lot of simplifying... <a href="http://tumblr.com/xjefqhtis">http://tumblr.com/xjefqhtis</a></p> |
91 |
</div>
|
92 |
|
93 |
<div id="twitter-box"> |
94 |
<a href="http://www.twitter.com/colonyscout/" title="Colony Scout Twitter Feed"> |
95 |
<img src="images/team_twitter.jpg" alt="Colony Scout Twitter Feed"/></a></div> |
96 |
<div class="bot-gray"></div> |
97 |
</div>
|
98 |
<div class="white-bottom"></div> |
99 |
</div>
|
100 |
|
101 |
</div>
|
102 |
</div> <!--BODY!--> |
103 |
|
104 |
|
105 |
<?php include("footer.php"); ?> |
106 |
|
107 |
</div><!--GENERAL!--> |
108 |
|
109 |
</body></html> |
110 |
<?php
|
111 |
$buffer = ob_get_contents();
|
112 |
ob_end_flush(); |
113 |
$fp = fopen($cacheFile, "w"); fwrite($fp, $buffer); fclose($fp); |
114 |
?>
|