Team:Calgary/VGSandbox

From 2012.igem.org

(Difference between revisions)
 
(24 intermediate revisions not shown)
Line 1: Line 1:
-
<html>
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
<body>
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
 
+
<head>
-
<video width="320" height="240" controls="controls">
+
<title>iGEMGameV1_1</title>
-
  <source src="https://static.igem.org/mediawiki/2012/7/74/UCalgary2012_Html5TestMov.mov"/>
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
Your browser does not support the video tag.
+
<style type="text/css" media="screen">
-
</video>
+
html, body { height:100%; background-color: #ffffff;}
-
 
+
body { margin:0; padding:0; overflow:hidden; }
-
 
+
#flashContent { width:100%; height:100%; }
-
<canvas id="GameCanvas" onclick="javascript:this.focus();" width=640 height=480 tabindex=1></canvas><br>
+
</style>
-
<script language="javascript" src="https://static.igem.org/mediawiki/2012/9/95/UCalgary2012_Html5GameTest.txt">Javascript not supported!</script>
+
</head>
-
 
+
<body>
-
<script language="JavaScript">
+
<div id="flashContent">
-
<!--
+
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" id="iGEMGameV1_1" align="middle">
-
// 4-digit Chmod calculator
+
<param name="movie" value="iGEMGameV1_1.swf" />
-
// Based on code by Peter Crouch 2000. All rights reserved.
+
<param name="quality" value="high" />
-
// Modified 2001 to 4-digit by William E. Landfair-Owens
+
<param name="bgcolor" value="#ffffff" />
-
// http://welo.ikemail.com
+
<param name="play" value="true" />
-
// Visit http://javascriptkit.com for this script and more
+
<param name="loop" value="true" />
-
 
+
<param name="wmode" value="window" />
-
function calculator(user, number){
+
<param name="scale" value="showall" />
-
// Superuser
+
<param name="menu" value="true" />
-
if (user == "superuser" && number == "4"){var box = eval("document.chmod.superuser4")}
+
<param name="devicefont" value="false" />
-
if (user == "superuser" && number == "2"){var box = eval("document.chmod.superuser2")}
+
<param name="salign" value="" />
-
if (user == "superuser" && number == "1"){var box = eval("document.chmod.superuser1")}
+
<param name="allowScriptAccess" value="sameDomain" />
-
// Owner
+
<!--[if !IE]>-->
-
if (user == "owner" && number == "4"){var box = eval("document.chmod.owner4")}
+
<object type="application/x-shockwave-flash" data="iGEMGameV1_1.swf" width="640" height="480">
-
if (user == "owner" && number == "2"){var box = eval("document.chmod.owner2")}
+
<param name="movie" value="iGEMGameV1_1.swf" />
-
if (user == "owner" && number == "1"){var box = eval("document.chmod.owner1")}
+
<param name="quality" value="high" />
-
// Group
+
<param name="bgcolor" value="#ffffff" />
-
if (user == "group" && number == "4"){var box = eval("document.chmod.group4")}
+
<param name="play" value="true" />
-
if (user == "group" && number == "2"){var box = eval("document.chmod.group2")}
+
<param name="loop" value="true" />
-
if (user == "group" && number == "1"){var box = eval("document.chmod.group1")}
+
<param name="wmode" value="window" />
-
// Other
+
<param name="scale" value="showall" />
-
if (user == "other" && number == "4"){var box = eval("document.chmod.other4")}
+
<param name="menu" value="true" />
-
if (user == "other" && number == "2"){var box = eval("document.chmod.other2")}
+
<param name="devicefont" value="false" />
-
if (user == "other" && number == "1"){var box = eval("document.chmod.other1")}
+
<param name="salign" value="" />
-
if (box.checked == true){
+
<param name="allowScriptAccess" value="sameDomain" />
-
if (user == "superuser"){
+
<!--<![endif]-->
-
document.chmod.h_superuser.value += ("+number")
+
<a href="http://www.adobe.com/go/getflash">
-
var a= (document.chmod.h_superuser.value)
+
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
-
var b= eval(a)
+
</a>
-
document.chmod.h_superuser.value=b
+
<!--[if !IE]>-->
-
document.chmod.t_superuser.value=b
+
</object>
-
}if (user == "owner"){
+
<!--<![endif]-->
-
document.chmod.h_owner.value += ("+number")
+
</object>
-
var a= (document.chmod.h_owner.value)
+
</div>
-
var b= eval(a)
+
</body>
-
document.chmod.h_owner.value=b
+
-
document.chmod.t_owner.value=b
+
-
}if (user == "group"){
+
-
document.chmod.h_group.value += ("+number")
+
-
var a= (document.chmod.h_group.value)
+
-
var b= eval(a)
+
-
document.chmod.h_group.value=b
+
-
document.chmod.t_group.value=b
+
-
}if (user == "other"){
+
-
document.chmod.h_other.value += ("+number")
+
-
var a= (document.chmod.h_other.value)
+
-
var b= eval(a)
+
-
document.chmod.h_other.value=b
+
-
document.chmod.t_other.value=b
+
-
}
+
-
}
+
-
if (box.checked == false){
+
-
if (user == "superuser"){
+
-
if (document.chmod.h_superuser.value == ""){
+
-
document.chmod.t_superuser.value=""
+
-
}else {
+
-
var a=(document.chmod.h_superuser.value);
+
-
b=a-(number);
+
-
c=eval(b);
+
-
document.chmod.h_superuser.value=c
+
-
document.chmod.t_superuser.value=c
+
-
}}if (user == "owner"){
+
-
if (document.chmod.h_owner.value == ""){
+
-
document.chmod.t_owner.value=""
+
-
}else {
+
-
var a=(document.chmod.h_owner.value);
+
-
b=a-(number);
+
-
c=eval(b);
+
-
document.chmod.h_owner.value=c
+
-
document.chmod.t_owner.value=c
+
-
}}if (user == "group"){
+
-
if (document.chmod.h_group.value == ""){
+
-
document.chmod.t_group.value=""
+
-
}else {
+
-
var a=(document.chmod.h_group.value);
+
-
b=a-(number);
+
-
c=eval(b);
+
-
document.chmod.h_group.value=c
+
-
document.chmod.t_group.value=c
+
-
}}if (user == "other"){
+
-
if (document.chmod.h_other.value == ""){
+
-
document.chmod.t_other.value=""
+
-
}else {
+
-
var a=(document.chmod.h_other.value);
+
-
b=a-(number);
+
-
c=eval(b);
+
-
document.chmod.h_other.value=c
+
-
document.chmod.t_other.value=c
+
-
}}
+
-
}}
+
-
// -->
+
-
</script>
+
-
<form name="chmod">
+
-
<input name="h_superuser" type="hidden"><input name="h_owner" type="hidden"><input name="h_group" type="hidden"><input name="h_other" type="hidden">
+
-
<table bgcolor="black" cellpadding="5" cellspacing="1">
+
-
<tr bgcolor="white">
+
-
<td colspan="6">
+
-
<center>
+
-
<font face="Verdana" size="3"><b>4-digit Chmod</b></font></center>
+
-
</td>
+
-
</tr>
+
-
<tr bgcolor="white" align="center">
+
-
<td colspan="2"><font face="Verdana" size="2"><b>Superuser</b></font></td>
+
-
<td><font face="Verdana" size="2"><b>Permission</b></font></td>
+
-
<td><font face="Verdana" size="2"><b>Owner</b></font></td>
+
-
<td><font face="Verdana" size="2"><b>Group</b></font></td>
+
-
<td><font face="Verdana" size="2"><b>Other</b></font></td>
+
-
</tr>
+
-
<tr bgcolor="white" align="center">
+
-
<td><font face="Verdana" size="2"><b>setuid</b></font></td>
+
-
<td><input type="checkbox" name="superuser4" value="4" onclick="calculator('superuser', 4)"></td>
+
-
<td><font face="Verdana" size="2"><b>Read</b></font></td>
+
-
<td><input type="checkbox" name="owner4" value="4" onclick="calculator('owner', 4)"></td>
+
-
<td><input type="checkbox" name="group4" value="4" onclick="calculator('group', 4)"></td>
+
-
<td><input type="checkbox" name="other4" value="4" onclick="calculator('other', 4)"></td>
+
-
</tr>
+
-
<tr bgcolor="white" align="center">
+
-
<td><font face="Verdana" size="2"><b>setgid</b></font></td>
+
-
<td><input type="checkbox" name="superuser2" value="2" onclick="calculator('superuser', 2)"></td>
+
-
<td><font face="Verdana" size="2"><b>Write</b></font></td>
+
-
<td><input type="checkbox" name="owner2" value="2" onclick="calculator('owner', 2)"></td>
+
-
<td><input type="checkbox" name="group2" value="2" onclick="calculator('group', 2)"></td>
+
-
<td><input type="checkbox" name="other2" value="2" onclick="calculator('other', 2)"></td>
+
-
</tr>
+
-
<tr bgcolor="white" align="center">
+
-
<td><font face="Verdana" size="2"><b>stickybit</b></font></td>
+
-
<td><input type="checkbox" name="superuser1" value="1" onclick="calculator('superuser', 1)"></td>
+
-
<td><font face="Verdana" size="2"><b>Execute</b></font></td>
+
-
<td><input type="checkbox" name="owner1" value="1" onclick="calculator('owner', 1)"></td>
+
-
<td><input type="checkbox" name="group1" value="1" onclick="calculator('group', 1)"></td>
+
-
<td><input type="checkbox" name="other1" value="1" onclick="calculator('other', 1)"></td>
+
-
</tr>
+
-
<tr bgcolor="white" align="center">
+
-
<td><font face="Verdana" size="2"><b>Value</b></font></td>
+
-
<td><input type="text" name="t_superuser" size="1"></td>
+
-
<td><b>+</b></td>
+
-
<td><input type="text" name="t_owner" size="1"></td>
+
-
<td><input type="text" name="t_group" size="1"></td>
+
-
<td><input type="text" name="t_other" size="1"></td>
+
-
</tr>
+
-
</table>
+
-
</form>
+
-
<p><font face="arial" size="1">This free script provided by</font><br>
+
-
<a href="http://javascriptkit.com"><font face="arial,helvetica" size="1">JavaScript Kit</font></a></p>
+
-
 
+
-
</body>
+
</html>
</html>

Latest revision as of 21:54, 7 September 2012

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> iGEMGameV1_1