MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
IMPORTANT: Read THIS before posting your support question in the forum!
A very stupid person is spamming in MemHT community forums, linking fake templates with troians, hosted on RapidShare or other sites. Do not download files from unknown people and suspicious websites, check them always with an antivirus program.
Moderators: mem paulo89
RSSReply
script per login un aiuto
AuthorText
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 27/09/2007 19:26
script per login un aiuto
#post2016
salve a tutti ciao mem ascolta vorrei fartivedere uno script per il login mi puoi aiutare devo faregli output e secondo te com e sto script?
code



<?
include 'funzioni.inc.php' ;


check( $_SERVER['REMOTE_ADDR']);
intestazione();
?>
<b>Pagina di Log In</b><br>
<?
error_reporting ( E_WARNING | ~ E_NOTICE ) ;


$ris = checkIP($REMOTE_ADDR);
if ($ris) {
    print "Ciao $ris, eri giā loggato. Vai alla home page.<br><br>";
} else {
    if ($id=controllo($_POST['user'],$_POST['passw'])) {
        $conn = connetti();
        $dataEntr = @time()+60*10; // 60 sec * 10 minuti
        $query = mysql_query("INSERT INTO `utenti_online` (`id_utente`,`ip`,`tempo`) VALUES ('$id','$REMOTE_ADDR','$dataEntr')",$conn) or print mysql_error();
        disconnetti($conn);
        echo "Utente connesso. Vai alla home page.<br><br>";
        } else {
            print "Attenzione il nick o la password inseriti non sono esatti!<br><br>";
      }
}

finepagina();
?>

 
Delete Edit Quote
 
mem
MemHT's Dad
Developer

Avatar

Posts: 3182
Contributes: 337

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Espaņol
Date: 27/09/2007 19:40
script per login un aiuto
#post2017
Non puō funzionare una cosa del genere, cč una fantomatica funzione controllo che appunto controlla l'user e la pass ma non ne vedo alcuna dichiarata

Guarda questa guida:
http://forum.html.it/forum/showthread.php?s=&postid=2105665
Image
MemHT Portal - Free PHP CMS and Blog
ScripTips - Scripts & Tips

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 27/09/2007 19:42
script per login un aiuto
#post2018
e io la ho preso questo script da quella guida che mi ai datoil link
Delete Edit Quote
 
mem
MemHT's Dad
Developer

Avatar

Posts: 3182
Contributes: 337

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Espaņol
Date: 27/09/2007 20:18
script per login un aiuto
#post2019
Ma solo quel pezzo non basta, usa tutto lo script Smile Cmq funziona, almeno quello della guida
Image
MemHT Portal - Free PHP CMS and Blog
ScripTips - Scripts & Tips

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 27/09/2007 21:44
script per login un aiuto
#post2020
ma il problema e che devo creargli l output che lo devo far funzionare con flash capisci
Delete Edit Quote
 
mem
MemHT's Dad
Developer

Avatar

Posts: 3182
Contributes: 337

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Espaņol
Date: 27/09/2007 22:41
script per login un aiuto
#post2021
flash? non so aiutarti allora, mi spiace
Image
MemHT Portal - Free PHP CMS and Blog
ScripTips - Scripts & Tips

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 28/09/2007 01:14
Re: script per login un aiuto
#post2022
mem secondo te cos c e di sbagliato in questo script perl invio delle email ti spiego io voglio che tutte l email vengano salvate nel db ma non capisco cosa non quadra ci dai un occhiata?perfavore sono due i files uno mailform.php e l altro config.php te li posto
code



<? 
include 'config.php';
$adminaddress = "info@actionscriptnews.com";
$siteaddress ="http://www.actionscriptnews.com";
$sitename = "actionscriptnews.com";


//No need to change anything below ...
// Gets the date and time from your server
$date = date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);

// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$email = $HTTP_POST_VARS['email'] ;
$name = $HTTP_POST_VARS['name'] ;
$cognome = $HTTP_POST_VARS['cognome'] ;
$comments = $HTTP_POST_VARS['comments'] ;
$telefono = $HTTP_POST_VARS['telefono'] ;
$oggetto = $HTTP_POST_VARS['oggetto'] ;

//Process the form data!
// and send the information collected in the Flash form to Your nominated email address

if ($action == "send")
{
//Innanzitutto controlliamo la var.le name:
$controllo = check_email($email);

if ($controllo != "OK")
{
echo $controllo;

//Qui potresti anche far visualizzare una cosa del genere:
echo "<BR><A HREF="http://www.marikweb.com/homeita/">Ritorna alla registrazione</A>";
}
else
{
//Ora inseriamo i dati nel DB.
//Ovviamente devi creare una tabella in cui inserire i dati ke passi con il post.


$link_db = mysql_connect($CONFIG['host'],$CONFIG['user'],$CONFIG['pass']);
mysql_select_db($CONFIG['dbname']);
$sql_insert = "INSERT INTO contact (name,cognome,email,telefono,oggetto,comments) VALUES('$name','$cognome','$email','$telefono','$oggetto','$comments')";

if (mysql_query($sql_insert))
{
echo "OK RIGA INSERITA <br />";
}
else
{
die(mysql_error());
}

mysql_close($link_db);



        //
        mail ("$adminaddress","informazioni",
        "Il visitatore ha lasciato le seguenti informazioni

        Name: $name
        Email: $email

        Telefono: $telefono
        Messaggio:
        ------------------------------
        $comments
       
        Logged Info :
        ------------------------------
        Using: $HTTP_USER_AGENT
        Hostname: $ip
        IP address: $REMOTE_ADDR
        Date/Time:  $date"
,"FROM:$email" ) ;
       
        //This sends a confirmation to your visitor
        mail ("$email","Re:",
        "Salve $name,

abbiamo ricevuto il suo messaggio e presto sarā contattato.

         Saluti dallo Staff di $sitename
        By
        $siteaddress"
,"FROM:$adminaddress ") ;
       
        //Confirmation is sent back to the Flash form that the process is complete
        $sendresult = "Thank you. You will receive a confirmation email shortly.";
        $send_answer = "answer=";
        $send_answer .= rawurlencode($sendresult);
        echo $send_answer;
}


}
?>


 


code

<?php
$CONFIG['host'] = "localhost";
$CONFIG['user'] = "rocco";
$CONFIG['pass'] = "maurizio";
$CONFIG['dbname'] = "user35512_7777";

$CONFIG['expire'] = 60;
$CONFIG['regexpire'] = 24; //in ore
$CONFIG['expire'] = 60;
$CONFIG['regexpire'] = 24; //in ore

$CONFIG['check_table'] = array(
"name" => "check_global",
"email" => "check_global"
);
function check_email($value)
{
global $CONFIG;

$value = trim($value);

if (($value == ""))
{
echo"Il campo non puō essere lasciato vuoto";
}
else{
$query = @mysql_query("SELECT id FROM contact WHERE email='$value'")or die("Errore nella query");


if (@mysql_num_rows($query) != 0) return "Email giā utilizzata";
else return"OK";
}
}
//--------------
define('AUTH_LOGGED', 99);
define('AUTH_NOT_LOGGED', 100);

define('AUTH_USE_COOKIE', 101);
define('AUTH_USE_LINK', 103);
define('AUTH_INVALID_PARAMS', 104);
define('AUTH_LOGEDD_IN', 105);
define('AUTH_FAILED', 106);

define('REG_ERRORS', 107);
define('REG_SUCCESS', 108);
define('REG_FAILED', 109);

$conn = @mysql_connect($CONFIG['host'], $CONFIG['user'], $CONFIG['pass']) or die('Impossibile stabilire una connessione');
@mysql_select_db($CONFIG['dbname']) or die("Errore nel DB");
 ?>
 

###########################################
Tabella
quote

CREATE TABLE `contact` (
`id` int(40) NOT NULL default '0',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`name` varchar(50) NOT NULL default '',
`cognome` varchar(50) NOT NULL default '',
`email` varchar(100) NOT NULL default '',
`telefono` varchar(50) NOT NULL default '',
`oggetto` varchar(100) NOT NULL default '',
`comments` text NOT NULL,
`ip` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`)

Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 28/09/2007 01:15
script per login un aiuto
#post2023
sembra ok manon va non capisco il perche
Delete Edit Quote
 
mem
MemHT's Dad
Developer

Avatar

Posts: 3182
Contributes: 337

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Espaņol
Date: 28/09/2007 11:08
script per login un aiuto
#post2024
appena posso li guardo
Image
MemHT Portal - Free PHP CMS and Blog
ScripTips - Scripts & Tips

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 77
Contributes: 1

Gender: _NEUTRAL_
Online: No
Date: 28/09/2007 11:28
script per login un aiuto
#post2025
ok grazie mem
Delete Edit Quote
 
Reply
Dreamhost memht2
Survey
Which PHP version do you use?
PHP 5
PHP 4
Other (comment)
Language
Quotes
"I fall in love for this script. MIRACLE !!! Thanx. GO memht GO :)"
atacalypso
CMS Award
Search
Users Block
Hi Guest
IP: 38.103.63.17

Username
Password
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo
Disclaimer and Privacy Policy - Newsletter
MemHT - MemHT - Miltenovik - ScripTips