PHP Classes

Issue on the guibuilder.php

Recommend this page to a friend!

      My Rad 4 PHP  >  All threads  >  Issue on the guibuilder.php  >  (Un) Subscribe thread alerts  
Subject:Issue on the guibuilder.php
Summary:guibuilder.php doesn't works
Messages:1
Author:Clovis Reis
Date:2013-05-20 19:21:01
 

  1. Issue on the guibuilder.php   Reply   Report abuse  
Picture of Clovis Reis Clovis Reis - 2013-05-20 19:21:01
hi there. I’m having some issues to start MyRad4Ph.
when the application try to load the form guibuilder.php it show part of the code, instead show the form it self.

Looks like it fail to process the instruction:

$contenido=”makedalclass($tabla).”\n”;

And that’s the result:
makedalclass($tabla).”\n”; if(isset($_POST["conservar"])) $a=filevalidator(true,”../”.$GLOBALS['destinodal'].”/”.$tabla.”.php”); else $a=filevalidator(false,”../”.$GLOBALS['destinodal'].”/”.$tabla.”.php”); if(strlen($a)>0) $contenido.=$a.”*/\n?>”; else $contenido.=$a.”\n?>”; genfile(“../”.$GLOBALS['destinodal'].”/”.$tabla.”.php”,$contenido); } if($opciones==2) { $contenido=”makemetadata($tabla).”\n”; if(isset($_POST["conservar"])) $a=filevalidator(true,”../”.$GLOBALS['destinodal'].”/”.$tabla.”_meta.php”); else $a=filevalidator(false,”../”.$GLOBALS['destinodal'].”/”.$tabla.”_meta.php”); if(strlen($a)>0) $contenido.=$a.”*/\n?>”; else $contenido.=$a.”\n?>”; genfile(“../”.$GLOBALS['destinodal'].”/”.$tabla.”_meta.php”,$contenido); } if($opciones==3) { $configsecur=true; $tblsecur=$tabla; } if($opciones==4) { //if(is_dir(“../swdd/custom_pages/”.$tabla)) } } } $includesdal.=”include(\”".$tabla.”.php\”);\n”; $includesmeta.=”include(\”".$tabla.”_meta.php\”);\n”; } $contenido= “makecontext($afiles); $a=filevalidator($_POST["conservar"],”../”.$GLOBALS['destinodal'].”/”.”datacontext.php”); if(strlen($a)>0) $contenido.=$a.”*/\n?>”; else $contenido.=$a.”\n?>”; genfile(“../”.$GLOBALS['destinodal'].”/”.”datacontext.php”,$contenido); $includesdal.=”\n?>”; $includesmeta.=”\n?>”; $contenido.=filevalidator($_POST["conservar"],”../”.$GLOBALS['destinodal'].”/”.”dalall.php”); genfile(“../”.$GLOBALS['destinodal'].”/”.”dalall.php”,$includesdal); $contenido.=filevalidator($_POST["conservar"],”../”.$GLOBALS['destinodal'].”/”.”metadata.php”); genfile(“../”.$GLOBALS['destinodal'].”/”.”metadata.php”,$includesmeta); if($configsecur==false) header(“Location: ../index.php”); else header(“Location: makesecure.php?tabla=”.$tblsecur); } $coneccion = $GLOBALS['coneccion']; $smarty1 = new Smarty_myrad4php(); $configidioma= new admin_idiomas(); $configidioma->setsmartylabels($smarty1,$_SESSION["idiomasel"]); $tablas = $coneccion->traetablas(); $ids1=array(1,2,3); $nombres1=array($GLOBALS["ormlabel"],$GLOBALS["metadatalabel"], $GLOBALS["safetylabel"]); $atablas=array(); while ($row = mysql_fetch_row($tablas)) { $atablas[]=array($row[0],”opc_”.$row[0],”secur_”.$row[0],”perso_”.$row[0]); } $smarty1->assign(“destinodal”,$GLOBALS['destinodal'].”/”); $smarty1->assign(“tablas”,$atablas); $smarty1->assign(“opciones”,array(“ids”=>$ids1,”nombres”=>$nombres1)); $smarty1->assign(“valores”,array(1,2)); $smarty1->assign(“nomuser”,”"); $err=array(); $smarty1->assign(“error”,$err); $smarty1->display(‘guibuilder.tpl’); function genfile($archivo,$cadena) { $archivo=fopen($archivo,’x+’); fwrite($archivo,$cadena); fclose($archivo); } function filevalidator($conservar,$file) { $contenido=”"; if(file_exists($file)) { if($conservar) { $contenido =substr(file_get_contents($file),5); } unlink($file); } if(strlen($contenido)>0) $contenido=”\n/*”.$contenido; return $contenido; } ?>


Looking at my Httpd log messages I found is something wrong with the rutabase object:

[Mon May 20 15:59:53.992145 2013] [:error] [pid 10448] [client 127.0.0.1:53874] PHP Notice: Undefined index: rutabase in /var/www/html/Php/templates/templates_c/c26c62772f468f94656eefd06625b4f7091fb287.file.configapp.tpl.php on line 43, referer: http://127.0.0.1/Php/efm/seleidioma.php
[Mon May 20 15:59:53.992404 2013] [:error] [pid 10448] [client 127.0.0.1:53874] PHP Notice: Trying to get property of non-object in /var/www/html/Php/templates/templates_c/c26c62772f468f94656eefd06625b4f7091fb287.file.configapp.tpl.php on line 43, referer: http://127.0.0.1/Php/efm/seleidioma.php


Any ideas??

Tks