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

<html>

<!-- css_eqv /txt/cj_code.txt -->

<?php

$user_agent = "";

if(isset($_SERVER['HTTP_USER_AGENT']))
$user_agent = $_SERVER['HTTP_USER_AGENT'];

if(substr($user_agent,0,5) == "Emacs" || substr($user_agent,0,5) == "Links" || substr($user_agent,0,4) == "Lynx" || substr($user_agent,0,9) == "URL/Emacs")
header("location: http://insanelywittystupidity.com/html/css_eqv.html?../seq_seq/seq_seq.html");

?>

<!-- css_eqv end -->

<?php

function cnv(str)
{
var i = 0;
strlen($ret_str = "";

for(i=0; i<str); i++)
{
if(i%25 == 0)
$ret_str .= "<br>";

substr($ret_str .= str, i,1);
}

return $ret_str;
}

function dig_onl($evt, $dig_str, $gen_mod, $num_dig, $res, $usr_str)
{
$var = $var;
//$evt = ($evt) ? $evt : window.event;
$var = $var;
//$char_code = ($evt.which) ? $evt.which : $evt.keyCode;

if($char_code == 13)
load_page($dig_str, $gen_mod, $num_dig, $res, $usr_str);

if($char_code > 31 && ($char_code < 48 || $char_code > 57))
return false;

return true;
}

function get_cki($cki_name)
{
$elm=1;
$i=0;
$j=0;
$cki="";
$cki_ret="";
$ind="";
$str="";
$cki_arr = split(';', $GLOBALS['cki']);

while(true)
{
$ind = strval($elm);

$str = $cki_name;
$str .= "_";
$str .= $ind;

if(strrpos($GLOBALS['cki'], $str) >= 0)
$elm = $elm+1;
else
break;
}

for($i=0; $i<sizeof($cki_arr); $i++) // *js_array cki_arr;*
{
$cki = $cki_arr[$i];

while (substr($cki, 0, 1)==' ')
$cki = js_substring($cki, 1);

for($j=0; $j<$elm; $j++)
{
$ind = strval($j);

$str = $cki_name;
$str .= "_";
$str .= $ind;
$str .= "=";

if(strrpos($cki, $str) == 0)
$cki_ret .= substr($cki, strlen($str), (strlen($cki) - strlen($str)));
}
}

return $cki_ret;
}

function load_page($dig_str, $gen_mod, $num_dig, $res, $usr_str)
{
$str = "";

if($num_dig != "" && $usr_str != "")
{
$str .= "dig_str*";
$str .= $dig_str;
$str .= "@";

$str .= "gen_mod*";
$str .= $gen_mod;
$str .= "@";

$str .= "num_dig*";
$str .= $num_dig;
$str .= "@";

$str .= "res*";
$str .= $res;
$str .= "@";

$str .= "usr_str*";
$str .= $usr_str;
$str .= "@";

set_cki("seq_cki", $str, 30);
$var = $var;
//location.replace("/seq_seq/seq_seq.html");
}
}

function lp_if_int($dig_str, $gen_mod, $num_dig, $res, $usr_str)
{
$non_int = false;
$i = 0;

for($i=0; $i < strlen($num_dig); $i++)
{
if(!is_int(substr($num_dig, $i,1)))
{
$non_int = true;
break;
}
}

if($usr_str != "def_val")
{
for($i=0; $i < strlen($usr_str); $i++)
{
if(!is_int(substr($usr_str, $i,1)))
{
$non_int = true;
break;
}
}
}

if(!$non_int)
load_page($dig_str, $gen_mod, $num_dig, $res, $usr_str);
}

function is_int($str)
{
if($str == "0" || $str == "1" || $str == "2" || $str == "3" || $str == "4" ||
$str == "5" || $str == "6" || $str == "7" || $str == "8" || $str == "9")
return true;

return false;
}

/*function rand($min, $max)
{
return floor(Math.random() * ($max - $min + 1)) + $min;
}*/

function set_cki($cki_name, $cki_val, $exp_days)
{
$i = 0;
$str_l = 0;

$doc_cki_str = "";
$ind = "";
$temp = "";

$var = $var;
//$date = new Date();
$date = js_set_time(js_get_time( ($exp_days * 24 * 60 * 60 * 1000)));
$exp_date = "expires=" + js_to_utc_str($date);

$str_l = strlen($cki_val);

for($i=0; $i<(floor($str_l/4000)+1); $i++)
{
$ind = strval($i);

if(($str_l - ($i*4000)) > 0)
$temp = substr($cki_val, ($i*4000), 4000);
else
$temp = substr($cki_val, ($i*4000), ($str_l - ($i*4000)));

$doc_cki_str = $cki_name;
$doc_cki_str .= "_";
$doc_cki_str .= $ind;
$doc_cki_str .= "=";
$doc_cki_str .= $temp;
$doc_cki_str .= "; ";
$doc_cki_str .= $exp_date;

doc_cookie( $doc_cki_str);
}
}

function set_dig_str($str)
{
$i = 0;
$dig_str = "";

for($i=0; $i<strlen($str); $i++)
{
if(substr($str, $i,8) == "dig_str*")
$dig_str = substr($str, $i+8, strlen($str) - ($i+8));
}

for($i=0; $i<strlen($dig_str); $i++)
{
if(substr($dig_str, $i,1) == "@")
$dig_str = substr($dig_str, 0,$i);
}

return $dig_str;
}

function set_gen_mod($str)
{
$i = 0;
$gen_mod = "";

for($i=0; $i<strlen($str); $i++)
{
if(substr($str, $i,8) == "gen_mod*")
$gen_mod = substr($str, $i+8, strlen($str) - ($i+8));
}

for($i=0; $i<strlen($gen_mod); $i++)
{
if(substr($gen_mod, $i,1) == "@")
$gen_mod = substr($gen_mod, 0,$i);
}

if($gen_mod == "true")
return true;

return false;
}

function set_num_dig($str)
{
$i = 0;
$num_dig = "";

for($i=0; $i<strlen($str); $i++)
{
if(substr($str, $i,8) == "num_dig*")
$num_dig = substr($str, $i+8, strlen($str) - ($i+8));
}

for($i=0; $i<strlen($num_dig); $i++)
{
if(substr($num_dig, $i,1) == "@")
$num_dig = substr($num_dig, 0,$i);
}

return parseInt($num_dig);
}

function set_usr_str($str)
{
$i = 0;
$usr_str = "";

for($i=0; $i<strlen($str); $i++)
{
if(substr($str, $i,8) == "usr_str*")
$usr_str = substr($str, $i+8, strlen($str) - ($i+8));
}

for($i=0; $i<strlen($usr_str); $i++)
{
if(substr($usr_str, $i,1) == "@")
$usr_str = substr($usr_str, 0,$i);
}

return $usr_str;
}

function set_res($str)
{
$i = 0;
$res = "";

for($i=0; $i<strlen($str); $i++)
{
if(substr($str, $i,4) == "res*")
$res = substr($str, $i+4, strlen($str) - ($i+4));
}

for($i=0; $i<strlen($res); $i++)
{
if(substr($res, $i,1) == "@")
$res = substr($res, 0,$i);
}

return $res;
}

?>

<head>

<title>Insanely Witty Stupidity - Sequence Sequester</title>

<meta name="viewport" content="width=device-width"/>

<meta name="description" content="Insanely Witty Stupidity - Sequence Sequester" />
<meta name="robots" content="index,follow" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="Michael Atkins" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />

</head>
<body link="#0099ff" vlink="#9999ff" alink="#cc3300" bgcolor="#000000">

<font face="Courier, Droid Sans Mono" size="4" color="#ffffff">

<!-- css_eqv /txt/iws_links.txt -->

<table align="center">
<tr>
<td>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/" title="Main">
<img src="/Iconz/iws_sml.png" alt="Main"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/">
Main</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Artwork.html" title="Artwork">
<img src="/Iconz/Artwork_64.png" alt="Artwork"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Artwork.html">
Artwork</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Books.html" title="Books">
<img src="/Iconz/Books_64.png" alt="Books"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Books.html">
Books</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Licenses.html" title="Licenses">
<img src="/Iconz/Licenses_64.png" alt="Licenses"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Licenses.html">
Licenses</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Shorts.html" title="Shorts">
<img src="/Iconz/Shorts_64.png" alt="Shorts"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Shorts.html">
Shorts</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Software.html" title="Software">
<img src="/Iconz/Software_64.png" alt="Software"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Software.html">
Software</a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="/html/Source.html" title="Source">
<img src="/Iconz/Source_64.png" alt="Source"/></a>
</center>
</td>
</tr>
<tr>
<td>
<center>
<a href="/html/Source.html">
Source</a>
</center>
</td>
</tr>
</table>

</td>
</tr>
</table>

<!-- css_eqv end -->

</font>

<font face="Courier, Droid Sans Mono" size="4" color="#fffff4">

<center>
<h2>
Sequence Sequester
</h2>
</center>

<table width="100%">
<tr>

<td width="10%">
</td>

<td width="80%">

<p>

<noscript>

<meta http-equiv="refresh" content="0; url=http://insanelywittystupidity.com/seq_seq/seq_seq_0.2.html" /><br>
<br>

It seems you have javascript disabled (for some unknown reason??) A new version of Sequence Sequester that contains no javascript code is available. You can find it <a href="/seq_seq/seq_seq_0.2.html">here</a>.

</noscript>

<?php

$gen_mod = true;
$i = 0;
$num_dig = 7;
$dig_prt = "";
$dig_str = "";
$old_cki = get_cki("seq_cki");
$res = "Correct :)";
$str = "";
$usr_prt = "";
$usr_str = "def_val";

if($old_cki != "")
{
$dig_str = set_dig_str($old_cki);
$gen_mod = set_gen_mod($old_cki);
$num_dig = set_num_dig($old_cki);
$res = set_res($old_cki);
$usr_str = set_usr_str($old_cki);
}

if($gen_mod)
{
if($usr_str != "def_val")
{
if($usr_str != $dig_str)
$res = "Incorrect :(";
else
$res = "Correct :)";

$dig_prt = cnv($dig_str);
$usr_prt = cnv($usr_str);

$str = "<br><br>";
$str .= "Previous Digits: ";
$str .= $dig_prt;
$str .= "<br><br>Your Digits: ";
$str .= $usr_prt;
$str .= "<br><br>Result: <br>";
$str .= $res;
}

$dig_str = "";

for($i=0; $i<$num_dig; $i++)
$dig_str .= rand(0,9);

$dig_prt = cnv($dig_str);

echo 'Number of digits: ' . $num_dig . '<br><br>';
?><form action='<?php lp_if_int($dig_str, $gen_mod, $_POST["num_dig_id"], $res, "def_val"); ?>' method="post"> <?php echo "<input type=\"text\" class=\"textfield\" value=\"\" maxlength=\"2\" size=\"2\" style=\"font-family: courier, droid sans; font-size: 18px\"/>";

echo "&nbsp;";

echo "<input type=\"submit\" value=\"Change\">";

echo '<center>';
echo 'Digits: ' . $dig_prt . '<br><br>';
echo "</form>";

?><form action='<?php load_page($dig_str, false, $num_dig, $res, $usr_str); ?>' method="post"> <?php echo "<input type=\"submit\" value=\"Recite Digits\">";

echo '</center>';

if($old_cki != "")
echo $str;
}

else
{
$usr_str = "";

echo '<center>';

echo "</form>";

?><form action='<?php lp_if_int($dig_str, "true", $num_dig, $res, $_POST["usr_str_id"]); ?>' method="post"> <?php echo "<input autofocus type="text" class="textfield" value="" maxlength="' . $num_dig . '" size="' . $num_dig . '" style="font-family: courier, droid sans; font-size: 18px"/> <br><br>";

echo "<input type=\"submit\" value=\"Test My Memory\">";
echo '</center>';
}

echo "</form>";

?>

<br>

<center>
<a href="/seq_seq/seq_seq_portal.html">Back</a>

<p>
_______________________<wbr>_______________________
<p>

Follow me on:
<p>

<!-- css_eqv /txt/follow_links.txt -->

<table align="center">
<tr>
<td>

<table style="float: left;">
<tr>
<td>
<center>
<a href="https://www.facebook.com/them11" title="Facebook">
<img src="/Iconz/facebook_64.png" alt="Facebook" /></a>
</center>
</td>
</tr>
</table>

<table style="float: left;">
<tr>
<td>
<center>
<a href="http://twitter.com/them11001" title="Twitter">
<img src="/Iconz/twitter_64.png" alt="Twitter" /></a>
</center>
</td>
</tr>
</table>

</td>
</tr>
</table>

<!-- css_eqv end -->

</center>

</td>

<td width="10%">
</td>

</tr>
</table>

</font>
</body>
</html>