By: Rromulo
Date: 2008-01-14
Time: 17:42
|
Event functions (PASSWORD)
MY HTML
[CODE]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<br />
[blk1;block=begin]
[blk1.USU_ID;ondata=pass] |
[blk1.USU_LOGIN] |
[blk1.USU_SENHA] |
[blk1.PASSWORD] |
[blk1.USU_NOME] |
[blk1.USU_FUN_CODIGO_FK]
<br />
[blk1;block=end]
</body>
</html>
[/CODE]
MY PHP
[CODE]
<?php
include_once('lib/tbs_us/tbs_class_php5.php') ; // Classe Principal
include_once('lib/tbs_us/tbsdb_mssql.php') ; // Classe que contem os comandos para o mssql
include_once('lib/mssql/Class.Mssql.php') ; // Classe de Conexão ao banco de dados
// Este sql exibe todos os menus cadastrados no sistema
$sql1 = "";
$sql1 = $sql1." SELECT *";
$sql1 = $sql1." FROM seg_usuario";
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('security.html') ;
$TBS->MergeBlock('blk1',$cnx_mssql_id, $sql1) ;
mssql_close($cnx_mssql_id) ;
$TBS->Show() ;
function pass($BlockName,&$CurrRec,$RecNum){
$CurrRec['PASSWORD'] = MD5([blk1.PASSWORD]) ;
}
?>
[/CODE]
Necessary to show my field password after to place md5 in it. How I make? therefore the code above gives error!
|
By: Skrol29
Date: 2008-01-15
Time: 14:25
|
Re: Event functions (PASSWORD)
Hi Rromulo,
Replace
$CurrRec['PASSWORD'] = MD5([blk1.PASSWORD]) ;
|
with
$CurrRec['PASSWORD'] = MD5($CurrRec['PASSWORD']) ;
|
|
By: Rromulo
Date: 2008-01-15
Time: 14:29
|
Re: Event functions (PASSWORD)
TinyButStrong Error in field [blk1.PASSWORD...] : item 'PASSWORD' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
|
By: Skrol29
Date: 2008-01-15
Time: 14:53
|
Re: Event functions (PASSWORD)
Hi Rromulo,
You have to understand what's going on.
Unsing parameter "ondata=pass", in your function pass() the argument $CurrRec will have all the columns of your query.
Only you is knowing what are those columns.
You code is ok, but you have to specify the correct column name.
|
|
Posting in progress.
Please wait...
|