"); //Show objects own icon echo (""); //Show name of the object if ($koekje[3]=="1") { //If this user wants to translate then echo ("$row[1]"); }else{ //So you are not allowed to translate echo $row[1]; } echo (""); //End of showing the name of the object echo (""); //Show application buttons //include ("/var/www/html/robotigs/includes/button_languages.php"); if ($koekje[0]>0){ //Action buttons are only for logged in users $typrecid = $idbhv; //Needed for book edit $type = 4; //1=prt, 2=srt, 3=bot, 4=none, needed for button_book_edit include ("/var/www/html/robotigs/includes/button_book_edit.php"); //include ("/var/www/html/robotigs/includes/button_pict_add_part.php"); include ("/var/www/html/robotigs/includes/button_languages.php"); } //End of if ($swigsarr[0]>0) if ($koekje[0]==0){ include ("/var/www/html/robotigs/includes/button_logon.php"); } echo (""); //----------------------------------------- END OF TOP LINE echo (""); //*** FROM HERE ON THE NORMAL USER SCREEN STARTS ------------------------------- echo ("
"); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); echo (""); //*** FROM HERE ON THE PICTURE CORNER STARTS ---------------------------------- include ("/var/www/html/robotigs/includes/picts_show.php"); //echo (""); echo (""); echo ('
"); //*** SHOW EXPLAINING TEXT ---------------------------------------------------- echo ("$row[2]"); //*** SENSOR INPUTS USED BY THIS BEHAVIOUR ------------------------------------ $sensor_count = show_sensors($con1, $row[0], $koekje[2], $koekje[0]); //*** CHILDREN AND CONTROL STRUCTURE THAT ARE TRIGGERRED BY THIS BEHAVIOUR ---- $child_count = show_children($con1, $row[0], $koekje[2], $koekje[0]); //*** SHOW ALL VARIABLES USED IN THIS BEHAVIOUR ------------------------------- $mother_count = show_variables($con1, $row[0], $koekje[2], $koekje[0]); //*** SHOW ALL MOTHERS OF THIS BEHAVIOUR -------------------------------------- $mother_count = show_mothers($con1, $row[0], $koekje[2], $koekje[0]); echo ("

"); echo (""); echo (""); echo (""); echo ('
Output / register / actuator
"); echo ("LED Dashboard indicator"); echo ("
"); echo ("Actual speed"); echo ("
'); if ($koekje[0]>0){ //If the user is logged in echo ("

"); echo (""); echo (""); echo ('
Inhibits
"); echo ("Everything lower"); echo ("
'); echo ("

"); echo (""); echo ('
Hardware needed (just listed) available in this robot?
'); } echo ("

'); echo ("
"); echo (""); echo (""); ////////////////////////////////////////////////////////////////////////////// function show_children($con, $mot, $lan, $log){ if ($log>0){ //If the user is logged on echo (""); echo (""); echo (""); echo (""); } $qry = ("SELECT xrefbehavechildren.xbcid, xrefbehavechildren.paralel, tblsystext.txtname, xrefbehavechildren.childid, xrefbehavechildren.sortorder, xrefbehavechildren.typid, xrefbehavechildren.var1id, xrefbehavechildren.var2id, xrefbehavechildren.comid FROM xrefbehavechildren LEFT JOIN tblsystext ON xrefbehavechildren.childid = tblsystext.recordid WHERE tblsystext.recordid = xrefbehavechildren.childid AND tblsystext.lanid = $lan AND tblsystext.txlid = 50 AND xrefbehavechildren.mothid = $mot ORDER BY xrefbehavechildren.sortorder ASC ;"); $result = pg_query($con, $qry); $cntr = 0; $control = 0; while($row = pg_fetch_array($result)){ if ($cntr==0 AND $log==0){ echo ("
"); echo ("Children & Control structure (trigger & processing)"); echo (""); echo ("Add
"); echo (""); echo (""); } echo (""); if ($row[5]==1 AND $control==0){ //If type is normal child echo (""); } if ($row[5]==1 AND $control==1){ //If type is normal child echo (""); echo (""); } if ($row[5]==2){ //If type is WHILE $tmp = get_txt($con, 54, $lan, $row[5]); echo (""); $tmp = get_txt($con, 52, $lan, $row[6]); echo (""); $tmp = get_txt($con, 55, $lan, $row[8]); echo (""); $tmp = get_txt($con, 52, $lan, $row[7]); echo (""); } if ($row[5]==3){ //If type is IF $tmp = get_txt($con, 54, $lan, $row[5]); echo (""); $tmp = get_txt($con, 52, $lan, $row[6]); echo (""); $tmp = get_txt($con, 55, $lan, $row[8]); echo (""); $tmp = get_txt($con, 52, $lan, $row[7]); echo (""); } if ($row[5]==4){ //If type is ENDIF $tmp = get_txt($con, 54, $lan, $row[5]); echo (""); } if ($row[5]==5){ //If type is WEND $tmp = get_txt($con, 54, $lan, $row[5]); echo (""); } if ($row[5]==2 OR $row[5]==3){ //This is a WHILE or an IF $control++; } if ($row[5]==4 OR $row[5]==5){ //This is a WEND or an END $control--; } if ($row[5]==4 OR $row[5]==5){ //This is a WEND or an END }else{ if ($row[1] == 'f'){ $txt = "Seq"; }else{ $txt = "Par"; } echo (""); } if ($log>0){ //User is logged in echo (""); echo (""); } echo (""); $cntr++; } if ($log>0 OR $cntr>0){ echo ("
"); echo ("Children & Control
"); echo ("$row[2] "); echo ("$row[2]$tmp$tmp$tmp$tmp$tmp$tmp$tmp$tmp$tmp$tmp$txtDelEdit
"); } return ("$cntr"); } ////////////////////////////////////////////////////////////////////////////// function show_mothers($con, $mot, $lan, $log){ echo ("

"); echo (""); $motcnt = 0; $qry=("SELECT xrefbehavechildren.xbcid, xrefbehavechildren.mothid, tblsystext.txtname FROM xrefbehavechildren LEFT JOIN tblsystext ON xrefbehavechildren.mothid = tblsystext.recordid WHERE tblsystext.recordid = xrefbehavechildren.mothid AND tblsystext.lanid = $lan AND tblsystext.txlid = 50 AND xrefbehavechildren.childid = $mot ORDER BY xrefbehavechildren.sortorder ASC ;"); $result = pg_query($con, $qry); while($row = pg_fetch_array($result)){ echo (""); $motcnt++; } echo ('
"); echo ("Motherbehaviours (just listed)
"); echo ("$row[2]"); echo ("
'); return ("$motcnt"); } ////////////////////////////////////////////////////////////////////////////// function show_sensors($con, $mot, $lan, $log){ if ($log>0){ //If the user is logged in echo ("

"); echo (""); echo (""); } //END of logged in $qry = ("SELECT xrefbehavesensors.xbsid, xrefbehavesensors.request, tblsystext.txtname, xrefbehavesensors.sensorid, xrefbehavesensors.sortorder, responstype.name FROM xrefbehavesensors LEFT JOIN responstype ON xrefbehavesensors.answertypeid = responstype.resid LEFT JOIN tblsystext ON xrefbehavesensors.sensorid = tblsystext.recordid WHERE tblsystext.lanid = $lan AND tblsystext.txlid = 19 AND xrefbehavesensors.mothid = $mot ORDER BY xrefbehavesensors.sortorder ASC ;"); $result = pg_query($con, $qry); $cntr = 0; while($row = pg_fetch_array($result)){ if ($cntr==0 AND $log==0){ //User not logged in, bus show list items echo ("

Sensors (read data)"); echo (""); echo ("Add
"); echo (""); } echo (""); echo (""); if ($log>0){ echo (""); if ($row[1] == 'f'){ $txt = "Request"; }else{ $txt = "Running"; } echo (""); echo (""); echo (""); } $cntr++; } if ($log>0 OR $cntr>0){ echo ("
Sensors
"); echo ("$row[2]$row[5]$txtDelEdit

"); } return ("$cntr"); } ////////////////////////////////////////////////////////////////////////////// function show_variables($con, $mot, $lan, $log){ if ($log>0){ //If the user is logged in echo ("

"); echo (""); echo (""); } //END of logged in $qry = ("SELECT xrefbehavioursvariables.xbvid, tblsystext.txtname, variables.value, tblsysunittype.untname, variables.varid FROM xrefbehavioursvariables LEFT JOIN variables ON xrefbehavioursvariables.varid = variables.varid LEFT JOIN tblsysunittype ON variables.untid = tblsysunittype.untid LEFT JOIN tblsystext ON xrefbehavioursvariables.varid = tblsystext.recordid WHERE tblsystext.lanid = $lan AND tblsystext.txlid = 52 AND xrefbehavioursvariables.bhvid = $mot ORDER BY tblsystext.txtname ASC ;"); $result = pg_query($con, $qry); $cntr = 0; while($row = pg_fetch_array($result)){ if ($cntr==0 AND $log==0){ //User not logged in, bus show list items echo ("

Variables"); echo (""); echo ("Add
"); echo (""); } echo (""); echo (""); echo (""); echo (""); if ($log>0){ //If the user is logged in echo (""); echo (""); } $cntr++; } if ($log>0 OR $cntr>0){ echo ("
Variables
"); echo ("$row[1]$row[2]$row[3]DelEdit
"); } return ("$cntr"); } ?>