Demo entry 6631889

1

   

Submitted by anonymous on Jul 20, 2017 at 06:50
Language: HTML+PHP. Code size: 3.2 kB.

<?php 
                    $getName = $_GET["getname"];        //Domain, Range 별 클래스를 이름으로 가진 txt파일 로드
                    $domran = explode("@",$getName);    //@ 으로 Delimeter
                    $h_fp=fopen("p_hirachy.txt","r");   //hirachy 툴팁에 사용될 데이터 로드
                    $h_fr = fread($h_fp,filesize("p_hirachy.txt"));
                    fclose($h_fp);
                    echo "<a class='navbar-brand' href='./index.php'>
                          <font size=6>
                            <span data-tooltip-text='$h_fr'>
                                BelongsTo&nbsp;&nbsp;&nbsp; | &nbsp;
                            </span>
                          </font></a>";  //툴팁 생성
                    echo "<table>
                            <tr>
                                <td>
                                    <font size=5 color=white><b>Domain</b></font>
                                </td>
                                <td>
                                    <font size=5 color=white>&nbsp;&nbsp;:&nbsp;&nbsp;$domran[1]</font>
                                </td>";  //상단 바에 Domain 생성
                    echo "<td style='PADDING-RIGHT: 10px;'>
                            <font size=5 color=white>
                                &nbsp;&nbsp&nbsp;&nbsp<b>Match List</b>&nbsp;&nbsp:&nbsp";
                    $handle = fopen("./output4/$getName.txt", "r");   //Matched List 데이터에서 추출
                    if(!$handle) die("NotFound!");
                    for($i=0; !feof($handle); $i++){                //로드 한 데이터의 전체 내용 읽어옴
                        $buffer[$i] = fgets($handle);
                        $domran2 = explode(",",$buffer[$i]);        //"," Delimiter
                        if ($domran2[1]=="Subject"){                //"Subject"가 포함된 라인일 경우
                            for($j=3; $j<count($domran2);$j++){     //index, subject, object를 제외한 뒤 부터(Matchlist) MatchList의 끝까지
                                if($j==count($domran2)-1){          //마지막이라면 콤마 제거
                                    echo $domran2[$j]; 
                                }
                                else{
                                    echo "$domran2[$j],&nbsp;";     // 마지막이 아니라면 콤마, 띄어쓰기 추가
                                }
                            }
                        }
                        break;
                    }
                    fclose($handle);
                    echo "</font></td>";
                    echo   "</tr>
                            <tr>
                                <td>
                                    <font size=5 color=white><b>Range</b></font>
                                </td>
                                <td>
                                    <font size=5 color=white>&nbsp;&nbsp;:&nbsp;&nbsp;$domran[2]</font>
                                </td>
                                <td>
                                    <font size=5 color=white>&nbsp;&nbsp&nbsp;&nbsp<b>Triple Count</b>&nbsp;&nbsp:&nbsp;&nbsp $domran[0]</font>
                                </td>
                            </tr>
                            </table>";
                ?>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).