Un Evento Unico. 5 Sale. 27 Interventi. SEO, SOCIAL, E-Commerce, Mobile, Turismo.
CLICCA QUI e SCOPRI DI PIù X Chiudi
 
Forum GT: Condividiamo idee e conoscenza Forum GT: Condividiamo idee e conoscenza


Condividi questo contenuto nei Social Network:
Ti stiamo aspettando: Registrati subito e gratis. Entra a far parte di una delle comunità più attive in Italia. Se hai dimenticato i tuoi dati li puoi recuperare subito.


Vai indietro   Forum per Webmaster: Condividiamo Idee e Conoscenza > Sviluppo e Gestione siti web > Flash & ActionScript
Benvenuto! Forum Regole FAQ Lista utenti Calendario Segna come letti

Flash & ActionScript Animazione web e linguaggio di programmazione

Hey Amico Visitatore,
Condividi con noi le tue idee e la tua conoscenza Aprendo una nuova discussione nella sezione Flash & ActionScript


Rispondi
 
LinkBack Strumenti di discussione
Vecchio 04-09-06, 16:52   #1 (permalink)
Banned
 
Data di registrazione: Jun 2006
Ubicazione: Pistoia, PT
Messaggi: 181
Invia un messaggio tramite MSN a galeax Invia un messaggio tramite Skype a galeax
md5

io ho una chat in flash agganciata a un db dv si trovano gli iscritti...ma nel db le pass sono criptate in md5 e vorrei ke la chat le leggesse ... cioè ... io avevo gia degli utenti con pass in md5 sul db e vorrei che il form di login in flash le leggesse poiche ora è impostato a leggere pass non in md5 ... il codice del form login è
function submitLogin(){
_root.userName = username.text;
_root.chatService.loginToChat(_root.userName,passw ord.text);
gotoAndPlay("send");
}

username.onSubmit = submitLogin;
Key.addListener(username);
password.onSubmit = submitLogin;
Key.addListener(password);

username.tabEnabled = true;
username.tabIndex = 1;

password.tabEnabled = true;
password.tabIndex = 2;

Selection.setFocus("usernameField");
//status.text+=String.fromCharCode(10,13);







ki mi aiuta?

quello che riporto è il form di una chat in flash che non cripta le pass e io volevo integrarla con un portale che le cripta!
quindi ho fatto si che la chat si agganciasse alla tab utenti del portale ... ma dato ke il form non è configurato per l'md5 da pass errata ... io nn sono esperto di codice ... quindi se potete postate direttamente quello ke devo modificare,
Grazie
galeax non in linea   Rispondi citando
Vecchio 05-09-06, 07:40   #2 (permalink)
User Attivo
 
L'avatar di Flep
 
Data di registrazione: Feb 2006
Ubicazione: Undisclosed city of South America
Messaggi: 4,901
Ciao,
la seconda parte del codice è quello che c'è scritto sul frame denominato 'send' ?
Flep non in linea   Rispondi citando
Vecchio 05-09-06, 10:12   #3 (permalink)
Banned
 
Data di registrazione: Jun 2006
Ubicazione: Pistoia, PT
Messaggi: 181
Invia un messaggio tramite MSN a galeax Invia un messaggio tramite Skype a galeax
Quote:
flashcoder.it
Ciao,
la seconda parte del codice è quello che c'è scritto sul frame denominato 'send' ?
nn so...l'ho trovato nel file login con flash 8
galeax non in linea   Rispondi citando
Vecchio 05-09-06, 10:14   #4 (permalink)
User Attivo
 
L'avatar di Flep
 
Data di registrazione: Feb 2006
Ubicazione: Undisclosed city of South America
Messaggi: 4,901
Il fatto è che in quello script non c'è nessuna azione che prende i valori delle passwords dal database chiamando un script ...
Flep non in linea   Rispondi citando
Vecchio 05-09-06, 10:26   #5 (permalink)
Banned
 
Data di registrazione: Jun 2006
Ubicazione: Pistoia, PT
Messaggi: 181
Invia un messaggio tramite MSN a galeax Invia un messaggio tramite Skype a galeax
La pag config è :
<?php
error_reporting(0);
$CONFIG['gatewayURL'] = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/gateway.php";
$CONFIG['tablesList'] = array("bans","chat_messages","groups","pvt_rooms_u sers","rooms","sessions","system","users");

$CONFIG['database'] = "****"; // MySQL database name
$CONFIG['dbHost'] = "****"; // MySQL host name
$CONFIG['dbUser'] = "****"; // MySQL username
$CONFIG['dbPass'] = "*****"; // MySQL password
$CONFIG['tablePrefix'] = "jos_";

$CONFIG['masterAdminUsername'] = "admin";
$CONFIG['masterAdminPass'] = "*****";
$CONFIG['masterAdminBanPriv'] = "all";
$CONFIG['masterAdminMngusersPriv'] = "all";
$CONFIG['masterAdminMnggroupsPriv'] = true;
$CONFIG['masterAdminInvisiblePriv'] = false;
$CONFIG['masterAdminLoginToChatPriv'] = true;
$CONFIG['masterAdminMngroomsPriv'] = true;
$CONFIG['masterAdminMngsystemPriv'] = true;
$CONFIG['masterAdminDefaultRoomId'] = 50;

$CONFIG['guestsGroupID'] = 7;

$CONFIG['defaultLang'] = "it";

if (($CONFIG['defaultLang']=="he")||($CONFIG['defaultLang']=="ar")) {
$CONFIG['rightToLeft'] = true;
} else {
$CONFIG['rightToLeft'] = false;
}

$CONFIG['chatFontSize'] = 16;// Chat font size
$CONFIG['fontSize'] = 11; //Interface font size
$CONFIG['smallFontSize'] = 10;//Size of the other small interface elements

$CONFIG['roomExpireAfter'] = 10;

$CONFIG['maximumUsersPerRoom'] = 999;//0 means unlimited
$CONFIG['unbanAfter'] = 3600;//value in seconds 0 means never unban only unban from admin area

$CONFIG['updateAfter'] = 2.4; //this config var specifies a duration between update requests
$CONFIG['defaultVolume'] = 50;

$CONFIG['defaultRoomID'] = 1;
$CONFIG['joinRoomTimeStamp'] = "h:i a";

$CONFIG['helpFile'] = "help.txt";

$CONFIG['sessionTimeOut'] = 120;// number of elapsed seconds after last request to consider user logged out
$CONFIG['connectionTimeOut'] = 120;// number of elapsed seconds after last response to consider connection time out (used by flash side)

?>

Poi la main.php è :
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=">
<TITLE>main</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<SCRIPT LANGUAGE=JavaScript>
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function main_DoFSCommand(command, args) {
var mainObj = InternetExplorer ? main : document.main;
//
// Place your code here...
//
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('Sub main_FSCommand(ByVal command, ByVal args)\n');
document.write(' call main_DoFSCommand(command, args)\n');
document.write('end sub\n');
document.write('</SCRIPT\> \n');
}
//-->
</SCRIPT>
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
ID="main" WIDTH="100%" HEIGHT="100%" ALIGN="">
<PARAM NAME=movie VALUE="main.swf"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="main.swf" menu=false quality=high bgcolor=#FFFFFF WIDTH="100%" HEIGHT="100%" swLiveConnect=true ID="main" NAME="main" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</BODY>
</HTML>
e dbconnection.php

<?php
class DBconnection{
var $connection;
var $database;
var $dbuser;
var $dbpass;
var $host;
var $queryString;
/************************************************** *****************************************/
function DBConnection($database, $dbuser, $dbpass, $host){

$this->database = $database;
$this->dbuser = $dbuser;
$this->dbpass = $dbpass;
$this->host = $host;

$this->connection = @mysql_connect ( $this->host, $this->dbuser, $this->dbpass );

if (!mysql_select_db($this->database)) {
mysql_query("CREATE DATABASE `".$this->database."`");
if (!mysql_select_db($this->database)) {
print mysql_error();
exit;
}
}
}

function getFieldValue($field_name,$table_name,$condition=f alse){
if($condition){
$result = mysql_query("SELECT $field_name FROM $table_name $condition LIMIT 1");
}else{
$result = mysql_query("SELECT $field_name FROM $table_name LIMIT 1");
}

if($result){
$value = mysql_fetch_assoc($result);
return $value[$field_name];
}else{
return false;
}
}

function valueExist($value,$table_name,$field_name){
$result = mysql_query("SELECT * FROM $table_name WHERE $field_name = $value");

if($result){
while($row = $this->nextRow($result)){
$matched[] = $row;
}
return $matched;
}else{
return false;
}
}

function getRecordById($id_field_name,$id,$table_name){
$result = mysql_query("SELECT * FROM $table_name WHERE $id_field_name = '$id'");
if($result){
$value = mysql_fetch_assoc($result);
return $value;
}else{
return false;
}
}

function getFirstRow($input){
if($input){
switch (gettype($input)){
case "string":
$result = $this->query($input);
if($result){
return mysql_fetch_array( $result );
}else{
return false;
}
break;

case "resource":
return mysql_fetch_array($input);
break;
}
}else{
return false;
}
}

function nextRow($result){
if($result){
return mysql_fetch_array( $result );
}else{
return false;
}
}

function numRows($input){
if($input){
switch (gettype($input)){
case "string":
$result = mysql_query( $input );
if ( !$result ) return 0;
return mysql_num_rows( $result );
break;

case "resource":
if ( !$input ) return 0;
return mysql_num_rows( $input );
break;
}
}else{
return false;
}

}

function query( $query ){
$this->queryString = $query;
return mysql_query( $query );
}
/************************************************** *****************************************/


/** Iterator. */
function next( $result )
{
return mysql_fetch_array( $result );
}

/** Return the number of rows in a result set. */
function rowsInResult( $result )
{
if ( !$result )
return 0;

return mysql_num_rows( $result );
}

/** Return only the first item of the first row of a query - useful with "SELECT ID" queries. */
function getValue( $query )
{
$result = mysql_query( $query );

if ( !$result || mysql_num_rows( $result ) == 0 )
return false;

return mysql_fetch_array( $result );
}

/** Execute a plain query string, return the result set. */


/** Close the database connection. */
function close()
{
mysql_close();
}

/** Returns true if the executed query retrieves a record, or false if no record is returned by executing the query */
function exists ( $table, $whereClause = "" )
{
$query = "SELECT ID FROM $table $whereClause LIMIT 1";

$result = mysql_query ( $query );

if ( !$result )
return false; // if the query was invalid, return false

return mysql_num_rows ( $result ) != 0;
}
}
?>

ve ne servono altre
?
galeax non in linea   Rispondi citando
Vecchio 05-09-06, 10:48   #6 (permalink)
User Attivo
 
L'avatar di Flep
 
Data di registrazione: Feb 2006
Ubicazione: Undisclosed city of South America
Messaggi: 4,901
A dir la verità non mi serve sapere tutta quella trafila.
Il punto è questo:

per poter recuperare dei valori du uno script PHP , il medesimo script dev'essere strutturato in modo che quando viene chiamato , interroga il db recuperando la password e crea un output con il valore della password che Flash può leggere.

Ora, se il tuo problema è di cambiare l'algoritmo di criptaggio che hai sulle password del vecchio database Flash non può farlo, Flash può 'solo' recuperare i dati che gli passa il PHP e poi utilizzarli per fare quello che vuoi.

Ultima modifica di Flep : 05-09-06 10:51.
Flep non in linea   Rispondi citando
Rispondi
Tags:



Strumenti di discussione

Regole di scrittura
Non puoi postare nuove discussioni
Non puoi rispondere alle discussioni
Non puoi allegare file
Non puoi editare i tuoi post

BB code is Attivo
smilies è Attivo
[IMG] il codice è Attivo
Il codice HTML è Disattivato
Trackbacks are Attivo
Pingbacks are Attivo
Refbacks are Disattivato
Vai al forum



Tutti gli orari sono GMT +3. Attualmente sono le 06:44.




Forum GT - © 2004-2009 GT idea S.r.l P.iva 02418200800 - Privacy/Disclaimer

SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.