Location: PHPKode > projects > Red Squirrel Cam > redsquirrelcam/1up.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>

	<head>
<?php
$fr = $_GET['from']; //check where from
if ($fr =="a"){      //link from automode
$automode = 1;
$vcam = $_GET['cam'];
$vref = $_GET['refr'];
echo $vcam."from a";
echo $vref;
}

if ($fr == "m"){             //link from main menu asks for config file
$file = "multiconf.txt";
$rf = fopen($file , "r");
$vcam = fgets($rf);
$vref = fgets($rf);
fclose($rf);
if ($vcam = 22){             
$automode = 1;
$vcam = 0;
}
echo $vcam."from m";
echo $vref;
}
if ($fr == "c"){            //link from camera routing switch
$vcam = $_GET['cam'];
$vref = $_GET['refr'];
if ($vcam == "22"){
$automode = 1;
$vcam = 0;
}
echo $vcam."from c";
echo $vref;
}
echo $vcam."endresult";
echo $vref;
$confile = "squirrelconfig.txt";
$rc = fopen($confile , "r");
$active = fgets($rc);      //gets active camera config
if ($automode == "1"){
while ($chk <> "1"){
if ($vcam == 20){
$vcam = 0;
}
$chk = substr($active, $vcam, 1);
$vcam = $vcam + 1;

}
}
$cc = 1;
while ($cc < 23){
$cn = fgets($rc);
$cs1 = fgets($rc);
$cs2 = fgets($rc);
if ($cc == $vcam){
$cname = $cn;
$stream = $cs2;
}
$cc = $cc + 1;
}
fclose($rc);
if ($vcam <= 9){
$camp = "00".$vcam;
}
else {
$camp = "0".$vcam;
}
if ($vref > 0){
echo "<meta http-equiv=\"refresh\" content=\"".$vref;
if ($automode == "1"){

echo ";1up.php?from=a&cam=".$vcam."&refr=".$vref;
}
echo "\">";
}
?>



		<title></title>
	</head>
	<body bgcolor=#000000>
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center">
<br>

<?php
echo "<object type=\"video/mp4\" data=\"".$stream."\" width=\"720\" height=\"576\">";
?>
<param name="controller" value="false" >
<param name="autoplay" value="true">
<param name="scale" value="tofit">
<param name="allow_fullscreen" value="true">
  </object>
</td></tr>
<td align="center"><br><?php

$confile = "squirrelconfig.txt";
$rf = fopen($confile, "r");
$act = fgets($rf);
$cf = 0;
while ( $cf < 21 ) {
$camcount = substr($active, $cf, 1);
$cf = $cf + 1;
if ($cf <=9){
$ccf = "00".$cf;
}
else {
$ccf = "0".$cf;
}
if ($camcount == "1") {
echo "<a href=\"1up.php?from=c&cam=".$cf."&refr=".$vref."\"><img src=\"images/cam".$ccf;
if ($vcam == $cf){
echo "on";
}
echo ".png\" border=\"0\"></a><img src=\"images/spacer.gif\">";
}
else {
echo "<img src=\"images/cam".$ccf."dis.png\" border=\"0\"><img src=\"images/spacer.gif\">";
}
if ($cf == "10"){
echo "<br><img src=\"images/spacer.gif\"><br>";
}
if ($cf == "20"){
echo "<br><img src=\"images/spacer.gif\"><br>";
}
}
echo "<a href=\"1up.php?from=c&cam=22&refr=".$vref."\"><img src=\"images/cam022";
if ($automode == "1"){
echo "on";
}
echo ".png\" border=\"0\"></a><img src=\"images/spacer.gif\">";

echo "<a href=\"eventplayer.php?cam=".$vcam."\" target=\"midframe\"><img src=\"images/event.png\" border=\"0\">";

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

	</body>
</html>
Return current item: Red Squirrel Cam