/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to CodeViewer/codeviewerfunctions.php

  • Committer: gustav.hartvigsson at gmail
  • Date: 2013-04-04 06:42:25 UTC
  • mfrom: (4.7.13 GammaBear)
  • Revision ID: gustav.hartvigsson@gmail.com-20130404064225-jxssrfawo202of2s
fixed a few conflicts, removes some files to do so among other things.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        */
10
10
        function menulayout($forward,$backward,$downloadlink,$heading,$headinglink,$filecontent) {
11
11
                if($backward != ""){
12
 
                        $backwardButton = "<a href='".$backward."'><img src='CodeViewerLeftbutton.png'></a>";
 
12
                        $backwardButton = "<a href='".$backward."'><img src='../media/codeviewer/CodeViewerLeftbutton.png'></a>";
13
13
                }else{
14
 
                        $backwardButton = "<img src='CodeViewerLeftbuttonGrayed.png'>";
 
14
                        $backwardButton = "<img src='../media/codeviewer/CodeViewerLeftbuttonGrayed.png'>";
15
15
                }
16
16
 
17
17
                if($forward != ""){
18
 
                        $forwardButton = "<a href='".$forward."'><img src='CodeViewerRightbutton.png'></a>";
 
18
                        $forwardButton = "<a href='".$forward."'><img src='../media/codeviewer/CodeViewerRightbutton.png'></a>";
19
19
                }else{
20
 
                        $forwardButton = "<img src='CodeViewerLeftbuttonGrayed.png'>";
 
20
                        $forwardButton = "<img src='../media/codeviewer/CodeViewerLeftbuttonGrayed.png'>";
21
21
                }
22
22
 
23
23
                if($downloadlink != ""){
24
 
                        $downloadButton = "<a href='".$downloadlink."'><img src='CodeViewerDownloadbutton.png'></a>";
 
24
                        $downloadButton = "<a href='".$downloadlink."'><img src='../media/codeviewer/CodeViewerDownloadbutton.png'></a>";
25
25
                }else{
26
 
                        $downloadButton = "<img src='CodeViewerLeftbuttonGrayed.png'>";
 
26
                        $downloadButton = "<img src='../media/codeviewer/CodeViewerLeftbuttonGrayed.png'>";
27
27
                }
28
28
 
29
 
                ?>
30
 
                <body onload='resize();' onresize='resize();'>
31
 
                        <div class='Topmenu'>
32
 
                                <table style='width:100%;height:100%;border:solid 1px;'>
 
29
                echo '          <body onload="resize();" onresize="resize();">
 
30
                        <div class="Topmenu">
 
31
                                <table style="width:100%;height:100%;border:solid 1px;">
33
32
                                        <tr>
34
33
                                                <td class="buttonstyle">
35
 
                                                        <?=$backwardButton;?>
36
 
                                                </td>
37
 
                                                <td class='buttonstyle'>
38
 
                                                        <?=$forwardButton;?>
39
 
                                                </td>
40
 
                                                <td class="buttonstyle">
41
 
                                                        <a href='../Lindex.html'><img src='CodeViewerRightbutton.png'></a>
 
34
                                                        '. $backwardButton .'
 
35
                                                </td>
 
36
                                                <td class="buttonstyle">
 
37
                                                        '. $forwardButton .'
 
38
                                                </td>
 
39
                                                <td class="buttonstyle">
 
40
                                                        <a href="../Lindex.html"><img src="../media/codeviewer/CodeViewerRightbutton.png"></a>
42
41
                                                </td>
43
42
                                                <td class="verticalaligntext">
44
 
                                                        <a href="<?=$headinglink;?>" style="text-decoration: none"><?=$heading;?></a>
 
43
                                                        <a href="'. $headinglink .'" style="text-decoration: none">'. $heading .'</a>
45
44
                                                </td>
46
 
                                                <td class='buttonstyle'>
47
 
                                                        <?=$downloadButton;?>
 
45
                                                <td class="buttonstyle">
 
46
                                                        '. $downloadButton .'
48
47
                                                </td>
49
48
                                        </tr>
50
49
                                </table>
51
50
                        </div>
52
51
                        <div id="bottom" class="restContainer">
53
52
                                <div style="float: left;">
54
 
                                        <div id="panel" class="panel" onmousemove='resizepanel(event)' onmousedown='mdpanel(event)' onmouseup='mupanel(event)'>
55
 
                                                <?php include($filecontent); ?>
56
 
                                        </div>
 
53
                                        <div id="panel" class="panel" onmousemove="resizepanel(event)" onmousedown="mdpanel(event)" onmouseup="mupanel(event)">';
 
54
                                                include($filecontents);
 
55
                                        echo '                          </div>
57
56
                                </div>
58
 
                                <div class="codecontent">
59
 
                <?php
 
57
                                <div class="codecontent">';
60
58
        }
61
59
 
62
60
        /* function menulayoutend
63
61
         * Outputs ending tags in HTML
64
62
         */
65
63
        function menulayoutend() {
66
 
                ?>
 
64
                echo '
67
65
                                </div>
68
66
                        </div>
69
67
                        <div style="clear: both;"></div>
70
68
                </body>
71
 
                <?php
 
69
                ';
72
70
        }
73
71
 
74
72
        /* function showfile 
87
85
                        $commenton = 0;
88
86
 
89
87
                        while (($buffer = fgets($handle, 4096)) !== false) {
90
 
                                $buffer = str_replace("\n","", $buffer);
91
 
                                $buffer = str_replace("\r","", $buffer);
92
 
                                $buffer=str_pad($buffer,150," ", STR_PAD_RIGHT);
93
 
                                $buffer=str_replace("&","&amp;",$buffer);
94
 
                                $buffer=str_replace("<","&lt;",$buffer);
95
 
                                $buffer=str_replace(">","&gt;",$buffer);
96
 
                                $buffer=str_replace("\t","&nbsp;",$buffer);
 
88
                                $buffer = str_replace("\n", "", $buffer);
 
89
                                $buffer = str_replace("\r", "", $buffer);
 
90
                                $buffer = str_pad($buffer, 150, " ", STR_PAD_RIGHT);
 
91
                                $buffer = str_replace("&", "&amp;", $buffer);
 
92
                                $buffer = str_replace("<", "&lt;", $buffer);
 
93
                                $buffer = str_replace(">", "&gt;", $buffer);
 
94
                                $buffer = str_replace("\t", "&nbsp;", $buffer);
97
95
 
98
96
                                $interesting = 0;
99
97
                                $startspan = 0;