Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Alexandre_85

[Resolvido] ERRO Class 'tNG_dispatcher' not found

Recommended Posts

Olá pessoal, boa tarde!

Sou iniciante no PHP, estou fazendo um site experimental e qndo fiz a pagina onde aparecem os dados cadastrados para eventuais alterações e tentei visualizar deu o seguinte erro:

 

Fatal error: Class 'tNG_dispatcher' not found in C:\Users\ALEXANDRE\EasyPHP-5.3.8.1\www\administracao\filhotes_cadastrados.php on line 42

 

Código:

<?php require_once('../Connections/conecta.php'); ?>
<?php
// Require the MXI classes
require_once ('../includes/mxi/MXI.php');

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
 $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

 $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

 switch ($theType) {
   case "text":
     $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
     break;    
   case "long":
   case "int":
     $theValue = ($theValue != "") ? intval($theValue) : "NULL";
     break;
   case "double":
     $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
     break;
   case "date":
     $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
     break;
   case "defined":
     $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
     break;
 }
 return $theValue;
}
}

mysql_select_db($database_conecta, $conecta);
$query_Recordset1 = "SELECT * FROM filhotes ORDER BY id ASC";
$Recordset1 = mysql_query($query_Recordset1, $conecta) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<div id="base" margin="0 auto" align="center"><table width="1010" border="0" align="center">
 <tr>
   <td>
     <?php
 mxi_includes_start("topo.php");
 require(basename("topo.php"));
 mxi_includes_end();
?>      </td>
 </tr>
 <tr>
   <td>
     <?php
 mxi_includes_start("menu.php");
 require(basename("menu.php"));
 mxi_includes_end();
?></td>
 </tr>
 <tr>
   <td><p> </p>
     <table border="1">
     <tr>
       <td>foto</td>
       <td>nome_gatil</td>
       <td>filhotes</td>
       <td>OPÇÕES</td>
     </tr>
     <?php do { ?>
     <tr>
       <td><?php echo $row_Recordset1['foto']; ?></td>
       <td><?php echo $row_Recordset1['nome_gatil']; ?></td>
       <td><?php echo $row_Recordset1['filhotes']; ?></td>
       <td>Alterar</td>
     </tr>
     <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
   </table></td>
 </tr>
</table>
</div>

</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

 

A linha do erro é a 42:

$tNGs = new tNG_dispatcher("");

 

Alguém poderia me ajudar?

 

Por favor.

 

Obrigado!

Compartilhar este post


Link para o post
Compartilhar em outros sites

essa classe vem de um arquivo externo? cade o include dele?

Compartilhar este post


Link para o post
Compartilhar em outros sites

O único include que existe é o MXI na linha 4:

 

require_once ('../includes/mxi/MXI.php');

 

Desculpa, não entendo muito de PHP.

posta ai o codigo desse arquivo.

Compartilhar este post


Link para o post
Compartilhar em outros sites

posta ai o codigo desse arquivo.

 

Segue o código:

 

<?php
/*
Copyright (c) InterAKT Online 2000-2005
*/

$KT_MXI_uploadErrorMsg = '<strong>File not found:</strong> <br />%s<br /><strong>Please upload the includes/ folder to the testing server.</strong> <br /><a href="http://www.interaktonline.com/error/?error=upload_includes" onclick="return confirm(\'Some data will be submitted to InterAKT. Do you want to continue?\');" target="KTDebugger_0">Online troubleshooter</a>';
$KT_MXI_uploadFileList = array('../common/KT_common.php', '../common/lib/resources/KT_Resources.php', '../common/lib/db/KT_Db.php', 'MXI_functions.inc.php', 'MXI_Includes.class.php');

for ($KT_MXI_i=0;$KT_MXI_i<sizeof($KT_MXI_uploadFileList);$KT_MXI_i++) {
	$KT_MXI_uploadFileName = dirname(realpath(__FILE__)). '/' . $KT_MXI_uploadFileList[$KT_MXI_i];
	if (file_exists($KT_MXI_uploadFileName)) {
		require_once($KT_MXI_uploadFileName);
	} else {
		die(sprintf($KT_MXI_uploadErrorMsg,$KT_MXI_uploadFileList[$KT_MXI_i]));
	}
}
?>

Compartilhar este post


Link para o post
Compartilhar em outros sites

antes desse codigo coloca

 

class tNG_dispatcher{

...

coloque aqui o codigo

}

Compartilhar este post


Link para o post
Compartilhar em outros sites

Colocar o código MXI dentro das "chaves"? coloquei e não deu certo, tbm tentei colocar o include MXI da página e ocorreu esse erro:

 

Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_FUNCTION in C:\Users\ALEXANDRE\EasyPHP-5.3.8.1\www\administracao\filhotes_cadastrados.php on line 5

 

Alguém poderia me ajudar?

 

Por Favor.

 

OBRIGADO PELA AJUDA SHINI,JÁ CONSEGUI AQUI, APENAS COLOQUEI O CÓDIGO

 // Carregar as classes TNG require_once('../includes/tng/tNG.inc.php'); 

ANTES DA LINHA 42 E DEU CERTO.

 

ABRAÇOS!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.