<?PHP/** Copyright (C) Texas Instruments Incorporated-http://www.ti.com/ * * * redistribution and use in source and binary forms, with or without * modification, is permitted provided tha t the following conditions * is met: * * redistributions of source code must retain the above copyright * Notice , this list of conditions and the following disclaimer. * * redistributions in binary form must reproduce the above copyright * Notice, this list of conditions and the foll Owing disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * Its contributors is used to endorse or Promote products derived * from this software without specific prior written permission. * * This software are provided by the COPYRIGHT holders and CONTRIBUTORS * ' as is ' and any EXPRESS OR implied warranties , including, but not * LIMITED to, the implied warranties of merchantability and FITNESS for * A particular PURPOSE is Disclaimed. In NO EVENT shall the COPYRIGHT * OWNER OR CONTRIBUTORS is liable for any DIRECT, INDIRECT, incidental, * special, EX Emplary, or consequential damages (including, but not * LIMITED to, procurement of substitute GOODS OR SERVICES; LOSS of Use, * DATA, OR profits; or business interruption) however caused and on any * theory of liability, WHETHER in contract, STRICT liability, OR TORT * (including negligence OR OTHERWISE) arising in any-out-of-the----the-software, even IF advised of the PO Ssibility of SUCH DAMAGE. **/# Load General function require ("helper_functions.php");$var=read_desktop_file ();if($var==NULL) {echo"Json.txt file is empty or doesn ' t exist."; return;}//Some parts of the code doesn ' t set the submenu variable when the user was at the Main Menu which was relected in the "to P "Variable$submenu = Isset ($_get["submenu"]) ==true? $_get["submenu"] :"Main_Menu"; $found _app= Get_application ($var, $submenu, $_get["app"]); $menu _title= $found _app["Name"]; $enable _main_menu_link=true;?> <?php include"menubar.php";? ><?php $title= $found _app["Name"]; # Get app name $description="No Description"; # description $program _type= $found _app["Programtype"]; # Get program Typeif($found _app["Description_link"]!=-1# Get Description Link {# Read description link file $handle= fopen ($found _app["Description_link"],"RB"); $description= Fread ($handle, filesize ($found _app["Description_link"])); Fclose ($handle); if(strlen ($description) = =0) # did not get the file description data $description="Invalid link for description page"; } $app _title= $found _app["Name"]; # The app's title is the app's name # synth hyperlink $link="run_script.php?&submenu=". UrlEncode ($submenu)."&app=". UrlEncode ($app _title);?> <div id ="Descrip_text"> <div id ="No_display"style ="Display:none;"> <!--not showing up-"color:red;">SorryYou can'T run the GUI application <?php echo $title; The system has detected, your embedded system is not connected to a display device.</div> <div id ="running_remotely"style ="Display:none;"> <!--not showing up-
"Color:yellow;">WarningYou are currently running Matrix remotely and<?php echo $title;?> isA GUI based application. <br>After clicking Run, on the display device connected to the embedded system to see and/or interact with the application</div> <div id ="run_application"style="Text-align:center;"> <a href ="<?php echo $link;? >">"run_img"Src="Images/run-icon.png"></a> </div> <div> <!--display profile contents--<?php echo $descrip tion,?> </div> </div><script>//automatically generate JS variable<?PHPif($program _type=="GUI") echo"var Isgraphicalapp = true;"; ElseEcho"var isgraphicalapp = false;"; ?>//The main point here is to show the corresponding content . if(Isgraphicalapp = =true) { if(Has_graphics = =false) { $("#no_display"). Show (); $("#run_application"). Hide (); } Else if(Client_is_host = =false) { $("#running_remotely"). Show (); } }</script>
Texas Instruments matrix-gui-2.0 Hacking--app_description.php