Location: PHPKode > projects > PHP Cad and Drawing Program > phpcad/help.php
<?php
$PObj=$_GET["PObj"];
?>
<html>
<head>
<title>PhpCad Drawing Program</title>
<style>
b   { margin: 0px; font-family: Arial; font-size: 12pt; color: #000000; }
b   { font-weight: 600;}
h1,u,p,pre  { font-family: Arial; font-size: 8pt; font-weight: 100; }
h1,p,pre  { font-style: oblique; color: #0000CC; }
u  { font-style: oblique; color: #cc0000; }

</style></head><body>
<?php
function help($helpfile) 
{
    global $PObj;
    $flag="";
    $help=file($helpfile);
    $helplist = array();
    foreach ($help as $item) {
        array_push($helplist,$item);
        $PObj=strtolower($PObj);
        if (ereg("function",$item) and ereg($PObj,$item) and ($flag=="")) {
            $line=array_pop($helplist);
            echo "<b>$line</b><h1>\n";
	    $line=array_pop($helplist);
	    $helpdata = array();
	    while (ereg("//",$line)) {
	        $line=array_pop($helplist);
                array_push($helpdata,$line);
	    }
            $total=sizeof($helpdata);
            $dummy=array_pop($helpdata);
            $dummy=array_pop($helpdata);
	    for ($item=0; $item<$total; $item++) {
                $dummy = array_pop($helpdata);
                $dummy = str_replace("//","",$dummy);
	        echo "$dummy\n";
	    }
            echo '</h1>';
        $flag="set";
	}
    }
}

$b = opendir("./functions");
while($file = readdir($b)) {
    if (ereg("inc",$file)) help("./functions/$file");
}

echo '</body></html>';
?>
Return current item: PHP Cad and Drawing Program