Yale University School of Art
1156 Chapel Street, New Haven, Connecticut
(203) 432-2600
SEE ALSO:   SEE THIS IN ACTION   


index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<script>
window.location="index2.php?height="+screen.height+"&width="+screen.width;
</script>

</body>
</html>
Last edited by: Caspar Yan-Wing Lam
Edit access: Everyone

index2.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Networks Galore</title>



</head>

<body>

<form action="action.php" method="post">
    Letter:  <input type="text" name="letter" /><br />
    Number: <input type="text" name="number" /><br />
    <input type="hidden" name="screenheight" <?php echo('value="'.$height.'"'); ?>/> 
    <input type="hidden" name="screenwidth" <?php echo('value="'.$width.'"'); ?> />
    <input type="submit" name="submit" value="GO NOW" />
</form>


</body>
</html>
Last edited by: Caspar Yan-Wing Lam
Edit access: Everyone

action.php
<?php
    $randomnumber 
rand(110);
    
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Results</title>

<script>
 window.moveTo(0,0);
    <?php
    
        
echo("window.resizeTo(");
        
        
//Convert all letter input to capitals
        
$letter strtoupper($letter);
        
        
//Set Width
        
switch ($letter) {
            case 
A:
//                echo(($screenwidth*0.0385)*1);
                
echo($screenwidth);
                
$letternumber 0;
                break;
            case 
B:
//                echo(($screenwidth*0.0385)*2);
                
echo($screenwidth);
                
$letternumber 1;
                break;
            case 
C:
//                echo(($screenwidth*0.0385)*3);
                
echo($screenwidth);
                
$letternumber 2;
                break;
            case 
D:
//                echo(($screenwidth*0.0385)*4);
                
echo($screenwidth);
                
$letternumber 3;
                break;
            case 
E:
//                echo(($screenwidth*0.0385)*5);
                
echo($screenwidth);
                
$letternumber 4;
                break;
            case 
F:
//                echo(($screenwidth*0.0385)*6);
                
echo($screenwidth);
                
$letternumber 5;
                break;
            case 
G:
//                echo(($screenwidth*0.0385)*7);
                
echo($screenwidth);
                
$letternumber 6;
                break;
            case 
H:
//                echo(($screenwidth*0.0385)*8);
                
echo($screenwidth);
                
$letternumber 7;
                break;
            case 
I:
//                echo(($screenwidth*0.0385)*9);
                
echo($screenwidth);
                
$letternumber 8;
                break;
            case 
J:
//                echo(($screenwidth*0.0385)*10);
                
echo($screenwidth);
                
$letternumber 9;
                break;
            case 
K:
//                echo(($screenwidth*0.0385)*11);
                
echo($screenwidth);
                
$letternumber 10;
                break;
            case 
L:
//                echo(($screenwidth*0.0385)*12);
                
echo($screenwidth);
                
$letternumber 11;
                break;
            case 
M:
//                echo(($screenwidth*0.0385)*13);
                
echo($screenwidth);
                
$letternumber 12;
                break;
            case 
N:
//                echo(($screenwidth*0.0385)*14);
                
echo($screenwidth);
                
$letternumber 13;
                break;
            case 
O:
//                echo(($screenwidth*0.0385)*15);
                
echo($screenwidth);
                
$letternumber 14;
                break;
            case 
P:
//                echo(($screenwidth*0.0385)*16);
                
echo($screenwidth);
                
$letternumber 15;
                break;
            case 
Q:
//                echo(($screenwidth*0.0385)*17);
                
echo($screenwidth);
                
$letternumber 16;
                break;
            case 
R:
//                echo(($screenwidth*0.0385)*18);
                
echo($screenwidth);
                
$letternumber 17;
                break;
            case 
S:
//                echo(($screenwidth*0.0385)*19);
                
echo($screenwidth);
                
$letternumber 18;
                break;
            case 
T:
//                echo(($screenwidth*0.0385)*20);
                
echo($screenwidth);
                
$letternumber 19;
                break;
            case 
U:
//                echo(($screenwidth*0.0385)*21);
                
echo($screenwidth);
                
$letternumber 20;
                break;
            case 
V:
//                echo(($screenwidth*0.0385)*22);
                
echo($screenwidth);
                
$letternumber 21;
                break;
            case 
W:
//                echo(($screenwidth*0.0385)*23);
                
echo($screenwidth);
                
$letternumber 22;
                break;
            case 
X:
//                echo(($screenwidth*0.0385)*24);
                
echo($screenwidth);
                
$letternumber 23;
                break;
            case 
Y:
//                echo(($screenwidth*0.0385)*25);
                
echo($screenwidth);
                
$letternumber 24;
                break;
            case 
Z:
//                echo($screenwidth);
                
echo($screenwidth);
                
$letternumber 25;
                break;
        }
        
        echo(
",");
        
        
//Set Height
        
switch ($number) {
            case 
0:
//                echo(($screenheight*0.1)*1);
                
echo($screenheight);
                break;
            case 
1:
//                echo(($screenheight*0.1)*2);
                
echo($screenheight);
                break;
            case 
2:
//                echo(($screenheight*0.1)*3);
                
echo($screenheight);
                break;
            case 
3:
//                echo(($screenheight*0.1)*4);
                
echo($screenheight);
                break;
            case 
4:
//                echo(($screenheight*0.1)*5);
                
echo($screenheight);
                break;
            case 
5:
//                echo(($screenheight*0.1)*6);
                
echo($screenheight);
                break;
            case 
6:
//                echo(($screenheight*0.1)*7);
                
echo($screenheight);
                break;
            case 
7:
//                echo(($screenheight*0.1)*8);
                
echo($screenheight);
                break;
            case 
8:
//                echo(($screenheight*0.1)*9);
                
echo($screenheight);
                break;
            case 
9:
//                echo($screenheight);
                
echo($screenheight);
                break;
        }
        
        echo(
");");
    
    
?>
</script>

<script>
function new_win()
{

    <?php
    
        
for ( $w $letternumber,  $h $number; ($w && $h 1); $w--, $h-- ) {
//            echo ('window.open("background.html","mywin' . $w . '","width=');

            
echo ('window.open("background.php?letter=' $w '&number=' $h '","mywin' $w '","width=');            
            
            echo((
$screenwidth*0.0385)*($w));
            
            echo (
',height=');
            
            echo ((
$screenheight*0.1)*($h));            
            
            echo (
',screenX=');
            
            echo ((
$screenwidth*0.0385)*$randomnumber*$h);
            
            echo (
',left=');
            
            echo ((
$screenwidth*0.0385)*$randomnumber*$h);
            
            echo (
',screenY=');
            
            
//echo (($screenheight*0.1)*$randomnumber*$h);
            
            
echo (0);
            
            echo (
',top=');
            
            
//echo (($screenheight*0.1)*$randomnumber*$h);
            
            
echo (0);
            
            echo (
',status=no,menubar=no");');
            

        }    
    
?>
}

</script>

<style type="text/css" media="all">
<!--
    body {
        margin: 0px;
        padding: 0px;
    }
    
    #container {
        width: 100%;
        height: 100%;
        overflow: hidden;
        }
        
    p {
        margin: 0px;
        padding: 0px
    }
    
    .one {
        margin: 0px;
        padding: 0px;
        color: #FF0000;
        font-size: 15px;
        line-height: 11px;
        letter-spacing: -2px;
    }
    
    .two {
        margin: 0px;
        padding: 0px;
        color: #0000CC;
        font-size: 15px;
        line-height: 11px;
        letter-spacing: -2px;
    }
-->
</style>

</head>

<body onload="new_win()">
<div id="container">
    <p>
        <?php
        
for ($i=1$i<=20000$i++) {
                echo(
'<span class="one">');
                echo( 
'/ ' );
                echo(
'</span>');
                echo(
'<span class="two">');
                echo( 
'/ ' );
                echo(
'</span>');
            }
        
?>
    </p>
</div>    
</body>
</html>
Last edited by: Caspar Yan-Wing Lam
Edit access: Everyone

background.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test</title>

<style media="all" type="text/css">
<!--
    body {
        margin: 0px;
        padding: 0px;
    }

    #container {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    p {
        margin: 0px;
        padding: 0px;
    }

    .one {
        margin: 0px;
        padding: 0px;
        color: #FF0000;
        font-size: 15px;
        line-height: 11px;
        letter-spacing:
        <?php
        
echo ( '-' $letter/'px;' );
        
?>
    }
    
    .two {
        margin: 0px;
        padding: 0px;
        color: #0000CC;
        font-size: 15px;
        line-height: 11px;
        letter-spacing:
        <?php
        
echo ( '-' $number/'px;' );
        
?>
    }
    
-->
</style>
</head>

<body>

<div id="container">
<p>
    <?php
    
    $letterplus 
$letter 2;
    
    if ( 
$letterplus%2==) {
        for (
$i=1$i<=3000$i++) {
            for ( 
$j=1$j<=$letter$j++ ) {
                echo(
'<span class="one">');
                echo( 
'/ / ' );
                echo(
'</span>');
            }
            for ( 
$k=1$k<=$number$k++ ) {
                echo(
'<span class="two">');            
                echo( 
'&#92; &#92; ');
                echo(
'</span>');
            }
        }
    } else {
        for (
$i=1$i<=3000$i++) {
            for ( 
$j=1$j<=$letter$j++ ) {
                echo(
'<span class="one">');
                echo( 
'&#92; &#92; ' );
                echo(
'</span>');
            }
            for ( 
$k=1$k<=$number$k++ ) {
                echo(
'<span class="two">');
                echo( 
'/ / ');
                echo(
'</span>');
            }
        }
    }
    
    
?>
</p>
</div>

</body>
</html>
Last edited by: Caspar Yan-Wing Lam
Edit access: Everyone

SEE ALSO:   HTTP://ART.YALE.EDU/ART742B2009