Webcam security center (Demo)



'jan',2=>'feb',3=>'mar',4=>'apr',5=>'may',6=>'jun',7=>'jul',8=>'aug',9=>'sep',10=>'oct',11=>'nov',12=>'dec'); //Functions declaration function Make_Links($ext,$Col,$day1,$day2) {$temp=''; $menu=1; $Colcount=0; global $month; $files=glob('*.'.$ext); if (strlen($files[0])<5) return; foreach ($files as $f) {$file=date('Ymd',filemtime($f)); if ($file>=$day1 && $file<=$day2) {$temp.=''; $Colcount++; if ($Colcount==$Col) {$Colcount=0;$temp.='';} } } while ($Colcount<$Col) {$Colcount++;$temp.='';} return $temp.'

'.substr($file,6,2).' '.$month[substr($file,4,2)].' '.substr($file,0,4).' - '.date('h:i:s',filemtime($f)).'

'; } function Refresh($delay,$ext) {$limit= date('Ymd',mktime(0, 0, 0,date("m"),date("d")-7*$delay,date("Y"))); $files=glob('*.'.$ext); if (strlen($files[0])<5) return; foreach ($files as $f) {if ($limit>date('Ymd',filemtime($f))) unlink($f); } } //load/save settings $Stats_file='config.php'; if (isset($_GET['delay'])) {$f=fopen($Stats_file,'w');fputs($f,'');fclose($f);} if (! file_exists($Stats_file)) {$f=fopen($Stats_file,'w');fputs($f,'');fclose($f);} include($Stats_file); Refresh($delay,$ext); //Viewing paramreters if (isset($_GET['Valid'])) {$Day1=$_GET['Day1']; $Mon1=$_GET['Mon1']; $Year1=$_GET['Year1']; $Day2=$_GET['Day2']; $Mon2=$_GET['Mon2']; $Year2=$_GET['Year2']; $Col=$_GET['col']; } else {$Day1=date('d'); $Day2=$Day1+1; $Mon1=date('m'); $Year1=date('Y'); $Mon2=$Mon1; $Year2=$Year1; $Col=3; } //Menu echo '

Display pictures between and using columns. Save files during week(s).

'; if (isset($_GET['Valid'])) {echo Make_Links('jpg',(isset($_GET['col'])?$_GET['col']:3),$_GET['Year1'].$_GET['Mon1'].$_GET['Day1'],$_GET['Year2'].$_GET['Mon2'].$_GET['Day2']);} ?>