htmlfile function runall ($input='',$incbody=0) { eval (arraytoclass('$input')); if(!$this->htmlfile) $this->htmlfile=$input; if($incbody>0) $this->incbody=$incbody; $code=$this->openfile ($this->htmlfile,$this->incbody); $code=$this->chkforloops ($code); return $this->evalcodetags ($code); } // ** evalhtmlonly functions = Process a htmlfile $this->htmlfile function evalfile ($input='',$incbody=0) { eval (arraytoclass('$input')); if(!$this->htmlfile) $this->htmlfile=$input; if($incbody>0) $this->incbody=$incbody; $code=$this->openfile ($this->htmlfile,$this->incbody); return $this->evalcode ($code); } // ** Openhtmlfile $htmlfile $incbody 1/0 function openfile ($htmlfile,$incbody=0) { if ($htmlfile) $this->htmlfile=pwsp($htmlfile); else $this->htmlfile=pwsp('default.html'); $content=@implode(@file($this->htmlfile)); if(!$content) $this->errors[]="File $this->htmlfile not found or no content"; if ($incbody<1 and $bfcnt=strstr($content,'')+1,499999); if (strstr($fcntb,'')) $content=substr($fcntb,0,strpos($fcntb,''));else $content=$fcntb; } return $content; } // ** Find Tags function chkforloops ($code,$totaln=999) { $code=str_replace('pw_loop','pw_looppwloop',$code);$return=''; if ($this->nocomments>0) $codeay=(preg_split ('/(')); if (strstr($chkpwtag,'pwloop') and !strstr($chkpwtag,' end ')) { if ($this->nocomments>0) $val=str_replace($chkpwtag.'-->','',$val); else $val=str_replace('pwloop','',$val); $loopcode++; } if (strstr($chkpwtag,' end ')) { if ($this->nocomments>0) $val=str_replace($chkpwtag.'-->','',$val); else $val=str_replace('pwloop','',$val); $val=$this->loopcode($save[$loopcode]).$val;$save[$loopcode]=null;$loopcode=$loopcode-1; } if ($loopcode>0) { $save[$loopcode].=$val;$val=null; } $return.=$val; } return $return; } // ** Loop Code between $loopcode [n] times size of array function loopcode ($loopcode) { $arrayname=strstr($loopcode,'$'); // Find arrayname $strname=substr($arrayname,0,strpos($arrayname,'[')); // echo $strname; if (strstr($arrayname,'[n]') or strstr($arrayname,'[n+')) $arrayname=substr($arrayname,0,strpos($arrayname,'[n')); // echo $arrayname; else $arrayname=substr($arrayname,0,strpos($arrayname,'}')); eval ('global '.$strname.';$array=&'.$arrayname.';');// set $arrayname Global and in $array $nrlp=count($array); for ($n=1;$n<=$nrlp;$n++) { eval ('$ifay='.$arrayname.'['.$n.'];'); if ($ifay) { $code.=str_replace('[n]',"[$n]",$loopcode); $code=str_replace('[n+',"[$n+",$code); if ($this->autonp>0) if ($getnp=substr($loopcode,(strlen($loopcode)-strpos(strrev($loopcode),'+n[')),9999)) { $getnp=substr($getnp,0,strpos($getnp,']'));$n=$n+$getnp; } }} return $code; } // ** eval echo $code [resolf vars] function evalcode ($code) { global $_POST,$_GET,$ppost,$post,$pget,$get,$ses,$echo,$result,$REDIRECT_URL,$HTTP_HOST,$set,$obj; if (is_array($echo)) extract($echo,EXTR_SKIP); if (is_array($result)) extract($result,EXTR_SKIP); if (is_array($echo['pageinfo'])) extract($echo['pageinfo'],EXTR_SKIP); eval ('$code="'.str_replace('"','\"',$code).'";');return $code; } // ** Look for embeded pw & php code and run (varconf) [ ] & [ \ ] function evalcodetags ($code) { global $_POST,$_GET,$ppost,$post,$pget,$get,$ses,$echo,$result,$REDIRECT_URL,$HTTP_HOST,$set,$obj;$return=''; if (is_array($echo)) extract($echo,EXTR_SKIP); if (is_array($result)) extract($result,EXTR_SKIP); if (is_array($echo['pageinfo'])) extract($echo['pageinfo'],EXTR_SKIP); $code=str_replace('