Go to content

Engineer Menu demo - RISCO Demo

Skip menu
Skip menu
Skip menu

Engineer Menu demo

On screen demo Engineer menu navigation. [Screen Shot]
Panels: Agility, LightSYS2, ProSYS Plus.
Keypads: Agility, Panda, Elegant
Engineer Code is currently this > ".$theData.""; exit; } //########################## if (isset ($_GET['keypad'])){ $keypad=$_GET['keypad']; } if (isset ($_GET['panel_type'])){ $panel_type=$_GET['panel_type']; } if (isset ($_GET['navigation'])){ $navigation=$_GET['navigation']; } if (isset ($_GET['previous'])){ $previous=$_GET['previous']; } switch ($panel_type){ //Start chosen panel case "0": $panel_name="Agility4"; $data_file="rkeypad/eng_a3.h"; $split_define="ITM"; $split_define_len=3; break; case "1": $panel_name="LightSYS2"; $data_file="rkeypad/eng_ls.h"; $split_define="STR_ITM"; $split_define_len=7; break; case "2": $panel_name="ProSYS Plus"; $data_file="rkeypad/eng_pp.h"; $split_define="STR_ITM"; $split_define_len=7; break; default: $panel_name="Agility4"; $data_file="rkeypad/eng_a3.h"; $split_define="ITM"; $split_define_len=3; break; } //End chosen panel $thisname=$panel_name." Engineer Menu"; echo ""; //############## DO ENGINEER CODE FILE ################################ if (file_exists($engineer_filename)){ if (time()-filemtime($engineer_filename)>43200){unlink($engineer_filename);} //Delete after ? seconds) } if (file_exists($engineer_filename)){ $fp = fopen($engineer_filename, 'r'); $engr_code_file = fgets($fp); fclose($fp); //echo "Save Engineer Code = ".substr(time(), -4)."
"; }else{ //Must have been deleted - Let's make a new code $fp = fopen($engineer_filename, 'w'); fwrite($fp, substr(time(), -4)); fclose($fp); header( "Location: ".$thisfilename); } //echo time()."
"; //echo date('d.m.Y',strtotime("-1 days"))."
"; //##################################################################### //############## DO ENGR CODE ###################################################### if (empty ($_GET['engineer']) || (!isset ($_GET['engineer']) ) ) { // Engineer no code then... ?> Please enter current Demo Engineer Code:
To obtain the current Engineer Code to try this demo, please contact your RISCO Technical representative.
"; //echo "SPECIAL ACCESS ONLY > Enter 'Ri\$c0' in the box! (That's 'Ri' dollar 'c' zero)"; exit; }else{ $engr_code = $_GET['engineer']; } //echo "Must be set
"; //echo "Engineer Code entered = ".$engr_code."
"; if (!($engr_code==$engr_code_file)){ $engr_code=""; header( "Location: ".$thisfilename); } //################################################################################# if (!isset ($_GET['panel_type']) ){ // if just index.php without ? then... echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Select Panel: Agility4LightSYS2ProSYS Plus
"; exit(); } if (!isset ($_GET['keypad']) ){ // if no keypad chosen then... echo ""; echo ""; //echo ""; echo ""; if (!$panel_type==0){ // If not Agility echo ""; echo "
Select Keypad:AgilityPandaElegant WhiteElegant Black
"; }else{ echo "Agility"; echo ""; } echo "
"; exit(); } echo "".$thisname."
"; $record = file($data_file); $NumOfLines = count($record); //echo "Number of options=".$NumOfLines." ~ ".$clicked_menu."\n

"; echo ""; echo ""; //echo "
"; //CHANGE KEYPAD ON THE FLY if (!$panel_type==0){ // If not Agility, can Show Elegant and Not Agility echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ // Don't show Elegant but do show Agility echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
START AGAIN
Change Keypad: -> PandaElegant WhiteElegant Black
Change Keypad: -> PandaAgility
"; echo "Current Engineer Code will expire in: ".(time()-filemtime($engineer_filename)-43200)." seconds"; echo "
"; $real_row=0; $real_row_text=""; $ignore_first_real_row="1"; $ignore_remmed="0"; for ($i=0; $i<$NumOfLines; $i++) { skp: if ((substr($record[$i],0,2)) =='/*'){ $ignore_remmed="1"; // if I find "/*" then set remmed flag to positive //echo $ignore_remmed.">".".$record[$i].
"; } if (strstr($record[$i], '*/')){ $ignore_remmed="0"; // if I find "*/" then set remmed flag to negative //echo $ignore_remmed.">".".$record[$i].
"; } if ((substr($record[$i],8,$split_define_len)==$split_define) & ($ignore_remmed=="0")) { //Check for real wanted line if (($ignore_first_real_row=="0")) { // if not 00 Programming $real_row_text = explode("\n",$record[$i]); $lne = explode($split_define,$real_row_text[0]); //Left="#define ", Right= the rest $menu = explode(" ",$lne[1]); //SKIP if I see a letter in the Quick Key number if (preg_match('/[a-zA-Z]/', $menu[0])){ $i++; goto skp; } if (strpos($lne[1],',')){ $txt = explode(",",$lne[1]); }else{ $txt=explode("\"",$lne[1]); //If no comma, then explode the space } if ($debug==1){ //*********D*E*B*U*G************************************** echo "i = ".$i."
"; echo "txt[0]= ".$txt[0]."
"; echo "txt[1]= ".$txt[1]."
"; echo "real_row_text[0]= ".$real_row_text[0]."
"; echo "lne[0]= ".$lne[0]."
"; echo "lne[1]= ".$lne[1]."
"; echo "menu[0]= ".$menu[0]."
"; echo "menu[1]= ".$menu[1]."
"; } //*********D*E*B*U*G************************************** $myquick = $menu[0]; if (strpos($txt[1],')')){ $mytext = str_replace(")","",$txt[1]); }else{ $mytext=$txt[1]; } if (preg_match('/"/', $mytext)){ $mytext = str_replace("\"","",$mytext); } $pos = strpos($mytext, '//'); // Take away the notes at the end of the line in some cases // if ($pos !== false) { // strpos returns false if there is no needle in the haystack $mytext = substr($mytext, 0, $pos); // String UP-TO the slashes } if ($debug==1){ //*********D*E*B*U*G************************************** echo "mytext = ".$mytext."
"; echo "
"; } //*********D*E*B*U*G************************************** $final_option[$real_row] = $mytext; $final_quick[$real_row] = $myquick;//substr($myquick,1); //Remove the first "1" $real_row++; if ($debug==1 & $real_row>20) { //*********D*E*B*U*G************************************** exit(); } //*********D*E*B*U*G************************************** }else{//If it is 00 Prog (first one found) then set var to 0 $ignore_first_real_row="0"; } //Only if not 00 Programming } // End if check for real wanted line } //@@@@@@@@@@@@@@@@@@@@@@ Begin Special @@@@@@@@@@@@@@@@@@@@@@@ err: for ($quick=0;$quick1 && $final_quick[$quick]==substr($navigation,0,strlen($navigation)-1)){ $line_one_text=$quick; } if (strlen($navigation)==1 && $final_quick[$quick]==$navigation){ $line_one_text=$quick; } if ($final_quick[$quick]==$navigation){ $line_two_text=$quick; } } if ($line_two_text >998){ $navigation=$previous; goto err; //Redirects below don't work! So, fixed it with goto - Pfft! //header( "Location: ".$thisfilename."?engineer=".$engr_code."&panel_type=".$panel_type."&navigation=".$previous.'&keypad='.$keypad ); //echo ""; //exit; } $lcd_line_one=$final_option[$line_one_text]; if (strlen($navigation)==1){ $lcd_line_two=""; }else{ $lcd_line_two=$final_option[$line_two_text]; } $key_hash=$navigation."1"; $key_back=substr($navigation,0,strlen($navigation)-1); $key_down=$navigation+1; $key_up=$navigation-1; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //############ The Keypad and Buttons ####################### switch ($keypad){ case 0: //Agility ?>
Earth '; ?>
'; ?>
'; ?>
'; ?>
Earth
'; ?>
'; ?>
'; ?>
'; ?>
Earth
'; ?>
'; ?>
'; ?>
'; ?>
Earth
'; ?>
'; ?>
'; ?>
'; ?>
Back to content