0) $configs[$key] = $value; } } $progname = basename($_SERVER['SCRIPT_FILENAME'],".php"); $rev="20141101"; $MYCALL=strtoupper($callsign); ?> "Never",1=>"Fixed",2=>"5min",3=>"10min",4=>"15min",5=>"20min",6=>"25min",7=>"30min",8=>"60min",9=>"90min",10=>"120min",11=>"180min",12=>" "); $ci = 0; $tr = 0; for($i = 1;$i < 5; $i++){ $param="repeaterBand" . $i; if((isset($configs[$param])) && strlen($configs[$param]) == 1) { $ci++; if($ci > 1) { $ci = 0; } print ""; $tr = 1; $module = $configs[$param]; $rcall = sprintf("%-7.7s%-1.1s",$MYCALL,$module); $param="repeaterCall" . $i; if(isset($configs[$param])) { $rptrcall=sprintf("%-7.7s%-1.1s",$configs[$param],$module); } else { $rptrcall = $rcall;} print ""; $param="reflector" . $i; if(isset($configs[$param])) { print ""; } else { print "";} $param="atStartup" . $i; if($configs[$param] == 1){print ""; } else { print ""; } $param="reconnect" . $i; if(isset($configs[$param])) { $t = $configs[$param]; } else { $t = 0; } if($t > 12){ $t = 12; } print ""; $j=0; if ($linkLog = fopen($linkLogPath,'r')) { while ($linkLine = fgets($linkLog)) { //$statimg = ""; $statimg = "Down"; $linkDate = " "; $protocol = " "; $linkType = " "; $linkRptr = " "; $linkRefl = " "; // Reflector-Link, sample: // 2011-09-22 02:15:06: DExtra link - Type: Repeater Rptr: DB0LJ B Refl: XRF023 A Dir: Outgoing // 2012-10-12 17:15:45: DCS link - Type: Repeater Rptr: DB0LJ B Refl: DCS001 L Dir: Outgoing // 2012-10-12 17:56:10: DCS link - Type: Repeater Rptr: DB0RPL B Refl: DCS015 B Dir: Outgoing if(preg_match_all('/^(.{19}).*(D[A-Za-z]*).*Type: ([A-Za-z]*).*Rptr: (.{8}).*Refl: (.{8}).*Dir: Outgoing$/',$linkLine,$linx) > 0){ $statimg = "Up"; $linkDate = date("d-M-Y H:i:s", strtotime(substr($linx[1][0],0,19))); $protocol = $linx[2][0]; $linkType = $linx[3][0]; $linkRptr = $linx[4][0]; $linkRefl = $linx[5][0]; if($linkRptr == $rptrcall){ print ""; print ""; print ""; print ""; $utc_time = $linkDate; $utc_tz = new DateTimeZone('UTC'); $local_tz = new DateTimeZone(date_default_timezone_get ()); $dt = new DateTime($utc_time, $utc_tz); $dt->setTimeZone($local_tz); $local_time = $dt->format('H:i:s M jS'); print ""; print "\n"; $tr = 0; } } } fclose($linkLog); } if ($tr == 1){ print"\n"; } // 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 // 2012-05-08 21:16:31: DExtra link - Type: Repeater Rptr: DB0LJ A Refl: DB0MYK B Dir: Incoming // 2012-05-08 21:16:31: DPlus link - Type: Dongle User: W1CDG H Dir: Incoming if ($linkLog = fopen($linkLogPath,'r')) { while ($linkLine = fgets($linkLog)) { $statimg = "Down"; $linkDate = " "; $protocol = " "; $linkType = " "; $linkRptr = " "; $linkRefl = " "; if(preg_match_all('/^(.{19}).*(D[A-Za-z]*).*Type: ([A-Za-z]*).*Rptr: (.{8}).*Refl: (.{8}).*Dir: Incoming$/',$linkLine,$linx) > 0){ $statimg = "Up"; $linkDate = date("d-M-Y H:i:s", strtotime(substr($linx[1][0],0,19))); $protocol = $linx[2][0]; $linkType = $linx[3][0]; $linkRptr = $linx[4][0]; $linkRefl = $linx[5][0]; if($linkRptr == $rptrcall){ $ci++; if($ci > 1) { $ci = 0; } print ""; print ""; print ""; print ""; print ""; print ""; print ""; $utc_time = $linkDate; $utc_tz = new DateTimeZone('UTC'); $local_tz = new DateTimeZone(date_default_timezone_get ()); $dt = new DateTime($utc_time, $utc_tz); $dt->setTimeZone($local_tz); $local_time = $dt->format('H:i:s M jS'); print ""; print "\n"; //$tr = 0; } } } fclose($linkLog); } // 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 // 2012-05-08 21:16:31: DExtra link - Type: Repeater Rptr: DB0LJ A Refl: DB0MYK B Dir: Incoming // 2012-05-08 21:16:31: DPlus link - Type: Dongle User: W1CDG H Dir: Incoming if ($linkLog = fopen($linkLogPath,'r')) { while ($linkLine = fgets($linkLog)) { $statimg = "Down"; $linkDate = " "; $protocol = " "; $linkType = " "; $linkRptr = " "; $linkRefl = " "; if(preg_match_all('/^(.{19}).*(D[A-Za-z]*).*Type: ([A-Za-z]*).*User: (.[^\s]+).*Dir: Incoming$/',$linkLine,$linx) > 0){ $statimg = "Up"; $linkDate = date("d-M-Y H:i:s", strtotime(substr($linx[1][0],0,19))); $protocol = $linx[2][0]; $linkType = $linx[3][0]; $linkRptr = $linx[4][0]; $ci++; if($ci > 1) { $ci = 0; } print ""; print ""; print ""; print ""; print ""; print ""; print ""; $utc_time = $linkDate; $utc_tz = new DateTimeZone('UTC'); $local_tz = new DateTimeZone(date_default_timezone_get ()); $dt = new DateTime($utc_time, $utc_tz); $dt->setTimeZone($local_tz); $local_time = $dt->format('H:i:s M jS'); print ""; print "\n"; } } fclose($linkLog); } // End } } ?>
RadioRadio Module DefaultDefault Link Destination AutoAutoLink- green: enabled
- red: disabled
TimerReset/Restart Timer LinkLink-Status- green: enabled
- red: disabled
Linked toLinked Destination ModeMode or Protocol used DirectionDirectionIncoming or Outgoing Last Change ()Timestamp of last changeTime of last change in time zone
".str_replace(' ', ' ', substr($rptrcall,0,8))."".str_replace(' ', ' ', substr($configs[$param],0,8))." AutoNo$tot[$t]$statimg".str_replace(' ', ' ', substr($linkRefl,0,8))."$protocolOutgoing$local_time
DownNone----------
".str_replace(' ', ' ', substr($rptrcall,0,8))."   $statimg".str_replace(' ', ' ', substr($linkRefl,0,8))."$protocolIncoming$local_time
".str_replace(' ', ' ', substr($rptrcall,0,8))."   $statimg".str_replace(' ', ' ', substr($linkRptr,0,8))."$protocolIncoming$local_time