Filter:   InfoImg
download ezhilit.php
Language: PHP
LOC: 121
Project Info
Free Market(freemarket)
Server: SourceForge
Type: cvs
...\freemarket\freemarket\www\
   .htaccess
   admin.php
   article.php
   auth.inc.php
   backend.php
   banners.php
   comments.php
   counter.php
   dhtmllib.js
   download.php
   ezhilit.php
   faq.php
   footer.php
   friend.php
   header.php
   index.php
   lang-croatian.php
   lang-danish.php
   lang-dutch.php
   lang-english.php
   lang-french.php
   lang-german.php
   lang-indonesia.php
   lang-indonesian.php
   lang-italian.php
   lang-japanese.php
   lang-korean.php
   lang-latvian.php
   lang-norwegian.php
   lang-polish.php
   lang-portuguese.php
   lang-quebec.php
   lang-russian.php
   lang-simplifiedchinese.php
   lang-slovak.php
   lang-spanish.php
   lang-swedish.php
   lang-TEMPLATE.php
   ...-traditionalchinese.php
   links.php
   mainfile.php
   memberlist.php
   memberslist.php
   pollBooth.php
   pollcomments.php
   postinfo.html
   print.php
   problems.php
   scroller.js
   search.php
   sections.php
   stats.php
   submit.php
   top.php
   topics.php
   user.php

<?PHP

######################################################################
# PHP-NUKE: Web Portal System
# ===========================
#
# Module to highlight easy language programs
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
######################################################################

if(!isset($mainfile)) { include("mainfile.php"); }


function Highlight($script,$color) {
    include ('config.php');
    include ('header.php');
    if ($color == "color") 
	$with_color="--color";
    $inScript = $script;
    echo "
      <table border=0 width=100% cellpadding=0 cellspacing=1 bgcolor=000000>
        <tr>
          <td>
            <table border=0 width=100% cellpadding=10 
                   cellspacing=1 bgcolor=FFFFFF>
              <tr>
                <td><font size=3>
                  <b>
                    Output:
                  </b><br><br>
                  <table border=0 width=100% cellpadding=0 
                         cellspacing=1 bgcolor=000000>
                    <tr><td>
                      <table border=0 width=100% cellpadding=10 
                             cellspacing=1 bgcolor=FFFFFF>
                        <tr><td><font size=2>";
$script=preg_replace("/</","&lt;",$script);
$script=preg_replace("/>/","&gt;",$script);
$script=preg_replace("/ /","@myspace@",$script);
$script=`echo "$script" | /usr/home2/freemark/public_html/cgi-bin/enscript -Whtml $with_color -Eeasylanguage -p -`;
$script=preg_replace("/@myspace@/","&nbsp;",$script);
$script=preg_replace("/\t/","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",$script);
$script=preg_replace("/\n/","<br>",$script);
echo "$script";
echo "                  </font></td></tr>
                      </table>
                    </td></tr>
                  </table><br>
                  <form action=ezhilit.php method=post>
                      <input type=submit value=\"Highlight Another Script\">
                  </form>                  
                </font></td>
              </tr>
            </table>
          </td>
        </tr>
      </table> 
    ";
    include ('footer.php');
}


function SubmitScript() {
    global $sampleScript;
    if (!isset($config)) { include("config.php"); }
    include ('header.php');

    if (strlen($script) == 0) {
      $script = $sampleScript;
    } else {
      print "Here 2\n";
    }
    echo "
      <table border=0 width=100% cellpadding=0 cellspacing=1 bgcolor=000000>
        <tr>
          <td>
            <table border=0 width=100% cellpadding=10 
                   cellspacing=1 bgcolor=FFFFFF>
              <tr>
                <td><font size=4>
                  <b>
                    EasyLanguage Highlighting
                  </b><br><br>
                  <font size=2>
                    <b>Enter your EasyLanguage Script Below:</b>
                    <form action=ezhilit.php method=post>
                      <input type=hidden name=op value=Highlight>
<TEXTAREA class=textbox cols=70 rows=18 name=script>
{
  SumTimesClose
  Erase this script and enter your own script
      since this script is useless.
}

Inputs   :  Price(NumericSeries), Length(NumericSimple);
Variables:  Counter(0), Sum(0);

Sum = 0;
For Counter = 0 to Length - 1 Begin
  Sum = Sum + Price[Counter];
End

Plot1(Sum,\"Sum\");
SumTimesClose = Sum * Close;
</TEXTAREA><br>
                      Color: <input type=radio name=color value=color CHECKED>
                      B/W: <input type=radio name=color value=bw>
                      &nbsp;&nbsp;&nbsp;<input type=submit value=\"Highlight\">
                    </form>
                  </font>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table> 
    ";
    include ('footer.php');
}

switch($op) {
    case "Highlight":
	Highlight($script,$color);
	break;
	
    default:
	SubmitScript();
	break;
}
?>