Formulaire d'identification

Xrayroby Messages postés 6 Statut Membre -  
 dvanzan -
Bonjour,
j"ai un formulaire d'identification dont le script est le suivant :

<?php require_once('../Connections/...........................s.php'); ?>
<?php
// Load the common classes
require_once('../includes/common/KT_common.php');

// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");

// Make unified connection variable
$conn_.......................s = new KT_connection($...............................s, $database_.............................);

// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("kt_login_user", true, "text", "", "", "", "");
$formValidation->addField("kt_login_password", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger

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_...................s, $.....................s);
$query_rsmembres = "SELECT * FROM membres";
$rsmembres = mysql_query($query_rsmembres, $.................s) or die(mysql_error());
$row_rsmembres = mysql_fetch_assoc($rsmembres);
$totalRows_rsmembres = mysql_num_rows($rsmembres);

// Make a login transaction instance
$loginTransaction = new tNG_login($conn_.......................s);
$tNGs->addTransaction($loginTransaction);
// Register triggers
$loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1");
$loginTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");
// Add columns
$loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user");
$loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password");
$loginTransaction->addColumn("kt_login_rememberme", "CHECKBOX_1_0_TYPE", "POST", "kt_login_rememberme", "0");
// End of login transaction instance

// Execute all the registered transactions
$tNGs->executeTransactions();

// Get the transaction recordset
$rscustom = $tNGs->getRecordset("custom");
$row_rscustom = mysql_fetch_assoc($rscustom);
$totalRows_rscustom = mysql_num_rows($rscustom);?>
<!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" xml:lang="fr">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>index</title>
<link href="../css/frmstyle.css" rel="stylesheet" type="text/css" />
<link href="../includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" />
<script src="../includes/common/js/base.js" type="text/javascript"></script>
<script src="../includes/common/js/utility.js" type="text/javascript"></script>
<script src="../includes/skins/style.js" type="text/javascript"></script>
<?php echo $tNGs->displayValidationRules();?><style type="text/css">
<!--
body {
background-image: url(/img/Fond%20chien%20berger%20allemand.gif);
}
.Style1 {color: #FFFFFF}
-->
</style></head>

<body class="tfvHighlight">
<div align="center">Indentification <br />
<?php
echo $tNGs->getLoginMsg();
?>
<?php
echo $tNGs->getErrorMsg();
?>
</div>
<form method="post" id="form1" class="KT_tngformerror" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
<div align="center">
<table cellpadding="2" cellspacing="0" class="KT_tngtable">
<tr>
<td class="KT_th"><label for="kt_login_user">
Email :
</label> </td>
<td>
<input type="text" name="kt_login_user" id="kt_login_user" value="<?php echo KT_escapeAttribute($row_rscustom['kt_login_user']); ?>" size="32" /> <?php echo $tNGs->displayFieldHint("kt_login_user");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_user"); ?> </td>
</tr>
<tr>
<td class="KT_th"><label for="kt_login_password">
Mot de passe :
</label> </td>
<td>

<div align="center">
<input type="password" name="kt_login_password" id="kt_login_password" value="" size="32" />
<?php echo $tNGs->displayFieldHint("kt_login_password");?> <?php echo $tNGs->displayFieldError("custom", "kt_login_password"); ?> </div></td>
</tr>
<tr>
<td class="KT_th"><label for="kt_login_rememberme"> Mémoriser :
</label></td>
<td><input <?php if (!(strcmp(KT_escapeAttribute($row_rscustom['kt_login_rememberme']),"1"))) {echo "checked";} ?> type="checkbox" name="kt_login_rememberme" id="kt_login_rememberme" value="1" />
<?php echo $tNGs->displayFieldError("custom", "kt_login_rememberme"); ?> </td>
</tr>
<tr class="KT_buttons">
<td colspan="2"><input type="submit" name="kt_login1" id="kt_login1" value="Envoyer" /> </td>
</tr>
</table>
</div>
<div align="center"></div>
<div align="center"></div>
<div align="center"> <a href="/index.php">Accueil</a> | <a href="/admsite/forgot_password.php" class="Style1"> Mot passe oublié?</a> </div>
</form>

<p>
<?php
mysql_free_result($rsmembres);
?>
</p>
<form id="form2" name="form2" method="post" action="">
<p> </p>
</form>
<p> </p>
</body>
</html>

Après synchro du local, sa lecture m'indique le message d'erreur suivant :

Fatal error: Call to undefined method tNG_fields::tNG_fields() in G:\wamp\www\site_c......\includes\tng\tNG_custom.class.php on line 19

dans le fichier concerné, je lis :

18 function tNG_custom(&$connection) {
19 parent::tNG_fields($connection);
20 $this->transactionType = '_custom';
21 $this->setTable("custom");
22 $this->exportRecordset = true;
et je n'y vois aucune erreur;

Qui peut me donner une piste. Je galère depuis prés d'un mois sur ce pb ?

Merci d'avance au sauveur.
Xrayroby

1 réponse

dvanzan
 
Adobe Developper Toolbox n'est pas compatible avec Php 5.3
pour régler le probleme, remplaces
parent::tNG_fields($connection);

par

parent::tNG($connection);

dans les 4 fichiers.
Source : https://forums.phpfreaks.com/topic/172010-deamweaveraddt-not-compatible-with-php-53/
0