The Dark Side of Hardware Upgrade Forum

...bringing out the worst in you since 2003...
Oggi è lun ott 05, 2026 8:21 pm

Tutti gli orari sono UTC +1 ora


-->
-->

Apri un nuovo argomento Rispondi all’argomento  [ 13 messaggi ] 
Autore Messaggio
 Oggetto del messaggio: Form con attachment
MessaggioInviato: mar ago 29, 2006 12:14 pm 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
E' la sezione giusta? Boh :D


Sto usando il form di saibal e avrei l'esigenza di inserire la funzione per l'upload di file in formato .doc e .pdf

Il codice di partenza è questo

Cita:

####################### SAIBAL GENERAL FORM 1.0 ####################
# #
# Creato da saibal - http://www.lorenzone.it - saibal@lorenzone.it #
# Roma - Aprile 2003 #
# #
# Scriptino piccolino piccolino da leccarsi i gomiti #
# #
# Dedicato al mio Taricone... il gatto che non deve chiedere mai! #
# #
# Baci ai pupi #
# Saibal alias Lorenzo #
####################################################################

#######################################
# IMPOSTAZIONI DI CONFIGURAZIONE #
#######################################

//email del destinatario del modulo
$destinatario = "xxxx@xxx.it";

//nome mittente per la corretta intestazione del modulo
$nome_mittente = "Saibal Form";

//email mittente per per la corretta intestazione del modulo
$email_mittente = "Saiballo_bello@html.it";

//oggetto dell'email
$oggetto_email = "Modulo inviato dal tuo sito";

//se si vogliono rendere tutti i campi NON OBBLIGATORI impostare su "y". valori possibili: "y" e "n"
$all_free = "y";

//se invece avete messo "n" inserire tra virgolette, separati da virgola, i nomi dei campi da rendere OBBLIGATORI
//Esempio: $campi_req = array("telefono","via");
$campi_req = array("nome_e_cognome","cellulare");

//controllo del campo email? valori possibili: "y" e "n"
$obbligo_email = "y";

//obbligare l'utente ad accettare le condizioni? valori possibili: "y" e "n"
$accetta_condizioni = "y";

//url della pagina di ringraziamento
$pagina_grazie = "http://www.sito.it/grazie.htm";

//url della pagina errore campi vuoti
$pagina_error_empty = "http://www.sito.it/campi_vuoti.htm";

//url della pagina errore email
$pagina_error_email = "http://www.sito.it/errore_email.htm";

//url della pagina errore condizioni non accettate
$pagina_error_condizioni = "http://www.sito.it/errore_condizioni.htm";

//url della pagina errore invio non autorizzato (mancanza di referer)
$pagina_error_referer = "http://www.sito.it/errore_referer.htm";

//orario e data
$ora = date ("H:i:s");
$data = date ("d/m/Y");

//intestazione dell'email (arriva al destinatario)
$corpo = "
Modulo inviato il $data alle ore $ora\n
Riepilogo dati:\n
____________________________________________________________\n";

//======================= NON TOCCARE NULLA... SE NON VUOI INCASINARE QUALCOSA =======================\


########### CODICE VARIO ###########

//variabili per rendere lo script compatibile anche con PHP 4.2 - copyright di Chris
if(!isset($_SERVER) OR !$_SERVER OR !is_array($_SERVER) OR count(array_diff($_SERVER, $HTTP_SERVER_VARS))){
$_POST = &$HTTP_POST_VARS;
}

//prendo il numero IP
if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])){

if ($_SERVER["HTTP_X_FORWARDED_FOR"] == "") {

$ipnumb = getenv("REMOTE_ADDR");

}else {

$ipnumb = getenv("HTTP_X_FORWARDED_FOR");

}

} else {

$ipnumb = getenv("REMOTE_ADDR");
}
###################################


//breve controllo
if(empty($_SERVER["HTTP_REFERER"])){

header ("Location: $pagina_error_referer");
exit();

}


########### CONTROLLO DEI CAMPI ###########
$control_campi = 0;

if($all_free != "y"){

foreach($_POST as $key => $valore){

if(in_array($key,$campi_req)){

if(trim($valore) == ""){

$control_campi++;

}

}

}

} else {

$control_campi = 0;

}

########### CONTROLLO EMAIL ###########
$control_email = 0;

if($obbligo_email == "y"){

if(isset($_POST['email'])){

//espressione regolare a cura dell'esimio dott. Grande Minchia - http://www.myphp.it
if(!eregi("^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9_-])+.)+[a-z]{2,6}$", $_POST['email'])){

$control_email++;

}

} else {

$control_email = 0;

}

}

########### CONTROLLO CONDIZIONI ###########
$control_condizioni = 0;

if($accetta_condizioni == "y"){

if(isset($_POST['trattamento_dati']) && $_POST['trattamento_dati'] == "accetto"){

$control_condizioni = 0;

} else {

$control_condizioni ++;

}

}

########### VAI CON L'INVIO DELL'EMAIL ###########
if($control_campi == 0){

if($control_email == 0){

if($control_condizioni == 0){

foreach($_POST as $key => $valore){

$key = ucfirst(stripslashes(trim($key)));
$valore = stripslashes(trim($valore));
$key = str_replace("_"," ",$key);

if(trim($valore) == "") $valore = "Non compilato";

$corpo .= $key .": ". $valore ."\n\n";

}

$corpo .= "Numero IP: $ipnumb"."\n\n";

$corpo .= "
____________________________________________________________ \n\n

Grazie per aver utilizzato un Saibal Scriptino - Buona giornata!";


//inizio l'invio dell'email
mail("$destinatario","$oggetto_email","$corpo", "From: $nome_mittente <$email_mittente>");

header ("Location: $pagina_grazie");

} else {

header ("Location: $pagina_error_condizioni");

}

} else {

header ("Location: $pagina_error_email");

}

} else {


header ("Location: $pagina_error_empty");

}


Siccome io e php siamo due entita che si respingono :D
Cosa devo fare per integrare lo script che ho inserito sopra con una funzione di upload?
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: mar ago 29, 2006 7:19 pm 
Cioè, vuoi fare un upload di un file sul server ed allegarlo come attachment alla mail?
Però, cazzo, proprio uno script del cazzo di saibal devi usare?

LuVi
Top
  
 
 Oggetto del messaggio:
MessaggioInviato: mar ago 29, 2006 7:38 pm 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
Si esatto :)
Praticamente si riempie un form, si allega un file e tutto mi viene spedito via email dal sito.

Ho preso il primo che capitava e che riuscivo a comprendere :D
Io di php non ci capisco una fava :D
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: mar ago 29, 2006 8:24 pm 
Gnappoide ha scritto:
Si esatto :)
Praticamente si riempie un form, si allega un file e tutto mi viene spedito via email dal sito.

Ho preso il primo che capitava e che riuscivo a comprendere :D
Io di php non ci capisco una fava :D


Dai, domani ci penso un po ;)

LuVi
Top
  
 
 Oggetto del messaggio:
MessaggioInviato: mar ago 29, 2006 8:43 pm 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
Grazie ;)
Mi basta anche uno diverso da quello postato, un predefinito, una cosa qualsiasi :D
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: mer ago 30, 2006 12:45 pm 
In ufficio non c'ho ftp su un server php, giuro che stasera te lo vedo.

LuVi
Top
  
 
 Oggetto del messaggio:
MessaggioInviato: mer ago 30, 2006 12:54 pm 
Tiè, la pappa pronta:

http://www.davelozinski.com/scripts/ema ... _basic.php

Questo ti va bene?

Lo scarichi da qui: http://www.davelozinski.com/scripts/ema ... 7#download

La versione advanced ti da anche il form per il campo TO, ma non ci vorrà niente a modificare la basic per metterci il campo TO non predefinito:

Codice:
<?php
#FILE: email_basic.php - Version 1.41
#
#       This php script generates both the HTML form and email message
#people wish to send you. .
#
#       To call this script, just call it as you would any other php
#script you have on your system. Example:
#       http://www.domain.com/cgi-bin/email_basic.php
#
#REQUIREMENTS:
#   1) REQUIRES PHP version >= 4.1.2!
#    2) This script expects its name to be "email_basic.php".
#   3) Your "mail" function settings must be set properly! This program uses the
#php "mail" function, which requires the use of sendmail (on Unix) and SMTP (on Windows)!
#   4) You should have a directory specified where php stores file
#attachments temporarily. When this script terminates, the attachments
#should be automatically deleted from your system.
#
#ADDITIONAL FEATURES:
#   1) Dynamically specify the "subject" field through the query string. For example:
#http://www.yourdomain.com/cgi-bin/email_advanced.php?subject=hello_world
#will cause the phrase "hello_world" to automatically show up as the subject for the email
#   2) Dynamically specify the "to" field through the query string. For example:
#http://www.yourdomain.com/cgi-bin/email_advanced.php?to=someone@somewhere.com
#will cause the email to override the default destination address. Great feature if you need
#to send a certain form submittal to another email address
#   3) Dynamically specify the "from" field through the query string. For example:
#http://www.yourdomain.com/cgi-bin/email_advanced.php?from=webmaster@thiscomputer.com
#will cause the email to override the default from address. Great feature if you want
#the email to come "from" another email address
#   4) Any combination of the above. For example:
#http://www.yourdomain.com/cgi-bin/email_advanced.php?subject=hello&from=webmaster@thiscomputer.com
#   5) Multiple file attachments. The ability to add multiple file attachments instead of just one
#   6) Limit the file upload size. Can specify if there are any limitations to the file upload size, and
#if so, how big the allowed files are to be.
#   7) Style sheets. The ability to set (or link in) style sheet definitions to customize your
#HTML text to look like it does on the rest of your site!
#   8) Restrict file uploads by file type! Choose which extensions you want to allow to be uploaded!
#
####
#   If you want any of these additional features, you need to purchase the "advanced" version
#of this email script. Go to http://www.davelozinski.com/scripts/email for the juicy details. :)
####
#
#       Finally, this "basic" code is free, and comes with absolutely NO
#warranties, either expressed or implied. Feel free to do what you want
#with it. Feel free to build upon it. If you did not get this code
#from http://www.davelozinski.com, you don't have the original.
#
#REVISION HISTORY:
#      06/19/05      Version 1.41 Fixed variable warnings when values not supplied. 
#      02/14/03      Version 1.4 Updated to work PHP 4.1.2 or later only. 
#      05/21/02      Version 1.32 Resolved an issue in the "to" field causing some people to
#                  receive multiple emails with each mailing. Optimized code a bit more.
#      04/25/02      Version 1.3 - no modifications
#      02/18/02      Version 1.21- Changed the attachment lable so it prints actual file name
#      02/01/02      Version 1.2 - Minor modifications
#      09/28/01      Version 1.1
#      08/01/01      Original Version
#
#CONTACT INFORMATION:
#   http://www.davelozinski.com/cgi-bin/email_lozinski.pl
#
#Begin the customizable configurations:

#The title of the web page and the text on the "submit" button 
$TITLE = "Send Me Email!";

#The background color of the web page, the normal text color, and the
#text color for the information that is required. Note that these can
#either be in hexidecimal format, or words as the settings below show.
#If you specify the color code in hex, it expects a leading '#'
#pound sign.
$BGCOLOR = "#000000";
$TEXT_COLOR_NORMAL = "#0088FF";
$REQUIRED_TEXT_COLOR = "yellow";

#The URL to a background picture for the web pages.
$BACKGROUND_URL = "";

#The URL to the executable directory where this script is located.
#DO NOT put a trailing slash '/' character!
$CGI_DIR = ".";

#Set to "1" if you want the optional fields shown in the email form.
#Set to "0" (zero) otherwise. 
$SHOW_OPTIONAL_FIELDS = 1;

#The email address where you want all the email from this page sent to if
#no destination email is supplied by the "to" parameter.
$DESTINATION_EMAIL = "destination@your_domain.com";

#The email address that will be placed in the "from" field of all emails sent back to
#the end user.
$FROM_EMAIL = "from_email@yourdomain.com";

#Set to "1" if you want the optional file upload field shown in the email form.
#Set to "0" (zero) otherwise. 
#BE CAREFUL WHEN USING THIS FEATURE AS PEOPLE COULD POTENTIALLY EMAIL YOU
#VIRUSES! Of course, this is true of any email you receive, but allowing
#email attachments from strangers greatly increases this risk.
#
$SHOW_ATTACHMENT_FIELD = 1;

#####################################################################
######## NOTHING FROM HERE DOWN SHOULD NEED TO BE CONFIGURED ########
#####################################################################
#These are set up here in case the PHP developers decide to screw
#everyone over again by changing variable names, introducing new
#variables, completely changing PHP configuration files, or doing
#something else for future releases.
#########
if (array_key_exists ("mail", $_REQUEST)) { $mail = $_REQUEST["mail"]; } else { $mail = ""; }
if (array_key_exists ("subject", $_REQUEST)) { $subject = $_REQUEST["subject"]; } else { $subject = ""; }
if (array_key_exists ("message", $_REQUEST)) { $message = $_REQUEST["message"]; } else { $message = ""; }
if (array_key_exists ("users_name", $_REQUEST)) { $users_name = $_REQUEST["users_name"]; } else { $users_name = ""; }
if (array_key_exists ("users_email", $_REQUEST)) { $users_email = $_REQUEST["users_email"]; } else { $users_email = ""; }
if (array_key_exists ("users_country", $_REQUEST)) { $users_country = $_REQUEST["users_country"]; } else { $users_country = ""; }
if (array_key_exists ("state_address", $_REQUEST)) { $state_address = $_REQUEST["state_address"]; } else { $state_address = ""; }
if (array_key_exists ("attach_name", $_REQUEST)) { $attach_name = $_REQUEST["attach_name"]; } else { $attach_name = ""; }
if (array_key_exists ("keep_copy", $_REQUEST)) { $keep_copy = $_REQUEST["keep_copy"]; } else { $keep_copy = ""; }

if (array_key_exists ("attach", $_FILES)) {
   $attach_name = $_FILES["attach"]["name"];
   $attach_type = $_FILES["attach"]["type"];
   $attach_size = $_FILES["attach"]["size"];
   $temp_file_name = $_FILES["attach"]["tmp_name"];
}

######## Main body of code ########
StartHTML();
if (!$mail) {
   PrintForm();
} else {
   if (!(check_form_data())) {
      if (send_mail()) {
         reply_to_user();
      } else {
         echo ("Your email was not sent.<BR>\n");
      }
    }       
}
FinishHTML();

######## php functions ########

########################
#function StartHTML
#This function prints the start of the feedback form web page.
########################
function StartHTML() {
global $BGCOLOR, $BACKGROUND_URL, $TITLE, $TEXT_COLOR_NORMAL;
?>
<HTML>
<HEAD>
<TITLE><?=$TITLE?></TITLE>
</HEAD>
<BODY BGCOLOR="<?=$BGCOLOR?>" BACKGROUND="<?=$BACKGROUND_URL?>" TEXT="<?=$TEXT_COLOR_NORMAL?>">
<?php
}
########################

########################
#function FinishHTML
#
#This function prints the end to the feedback form web page.
#If you have your own set of server-side include files you want
#to include, put the
#<!--#include
#directive as appropriate.
########################
function FinishHTML() {
?>
<BR>
</BODY>
</HTML>
<?php
}
########################

########################
#function PrintForm
#This function prints the HTML input form.
########################
function PrintForm() {
global $CGI_DIR, $TITLE, $SHOW_OPTIONAL_FIELDS,
      $REQUIRED_TEXT_COLOR, $SHOW_ATTACHMENT_FIELD, $subject;
?>
<FORM ENCTYPE="multipart/form-data" ACTION="<?=$CGI_DIR?>/email_basic.php" METHOD="POST">
<H2><?=$TITLE?></H2>
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="2">
<TR VALIGN="top">
<TD>
<TABLE>
<?php if ($SHOW_OPTIONAL_FIELDS) { ?>
        <TR VALIGN="top">
        <TD>Your name:</TD>
        <TD><INPUT TYPE="text" NAME="users_name"></TD>
        </TR>
<?php } ?>
<TR VALIGN="top">
<TD><FONT COLOR="<?=$REQUIRED_TEXT_COLOR?>"><B>* Your email:</B></FONT></TD>
<TD><INPUT TYPE="text" NAME="users_email"></TD>
</TR>
<TR VALIGN="top">
<TD COLSPAN="2"><FONT COLOR="<?=$REQUIRED_TEXT_COLOR?>">
<INPUT TYPE="checkbox" NAME="keep_copy" VALUE="1" CHECKED>Have a copy of
your message sent to you? </FONT></TD>
</TR>
</TABLE>
<BR>
<?php if ($SHOW_OPTIONAL_FIELDS) { ?>
        <TABLE>
        <TR VALIGN="top">
        <TD>Your country:</TD>
        <TD><INPUT TYPE="text" NAME="users_country"></TD>
        </TR>
        <TR VALIGN="top">
      <TD>Your State/Province:</TD>
        <TD><INPUT TYPE="text" NAME="state_address" VALUE=""></TD>
        </TR>
        </TABLE>
        <BR>
<?php } ?>
<FONT COLOR="<?=$REQUIRED_TEXT_COLOR?>"><B>* Subject of the message:</B></FONT>
<INPUT TYPE="text" NAME="subject" VALUE="<?=$subject?>" SIZE="40"><BR>
<BR>
<FONT COLOR="<?=$REQUIRED_TEXT_COLOR?>"><B>* Your message:</B></FONT><BR>
<TEXTAREA NAME="message" ROWS="8" COLS="70"></TEXTAREA>
<BR>
<?php ### Print out the attachment input field ###
if ($SHOW_ATTACHMENT_FIELD) {
   echo ("<BR>Attachment: <INPUT TYPE=\"file\" NAME=\"attach\"><BR>\n");
}
?>
<INPUT TYPE="hidden" NAME="mail" VALUE="1"><BR>
<INPUT TYPE="submit" VALUE="<?=$TITLE?>">
</TD>
</TR>
</TABLE>
</FORM>
<BR>
<FONT COLOR="<?=$REQUIRED_TEXT_COLOR?>"><B>*  - indicates a required field.</B></FONT><BR>
<?php

}
########################

########################
#This function checks the user's input for any obvious
#errors/mistakes.
########################
function check_form_data () {

global $users_email, $subject, $message;
$error = 0;

if (!preg_match("/\@/", $users_email) || !preg_match("/[a-zA-Z]/", $users_email) ) {
   echo ("You need to enter your email address.<BR><BR>\n");
   $error = 1;
}
if (!preg_match("/[a-zA-Z]/", $subject) ) {
   echo ("Your message cannot be sent without a subject.<BR><BR>\n");
   $error = 1;
}
if (!preg_match("/[a-zA-Z]/", $message) ) {
   echo ("You seemed to have forgotten to enter the email message you wish to send.<BR><BR>\n");
   $error = 1;
} else {
   $message = stripslashes($message);
}
if ( (preg_match("/[\[\;\>\<\&\*\^\$\(\)\`\|\]\']/", $subject)) ||
(preg_match("/[\[\;\>\<\&\*\^\$\(\)\`\|\]\']/", $users_email)) ) {
   echo ("For security reasons, you cannot have any of the following characters in your email or subject fields: [ ; < > & * ` | ]<BR><BR>\n");
   $error = 1;
}
return $error;

} #check_form_data
########################


########################
#This function returns a web page to the user confirming their email
########################
function reply_to_user() {

global $users_name, $users_email, $users_country, $state_address, $message, $SHOW_ATTACHMENT_FIELD, $attach_name;

echo ("<B><I>Thank you</I></B> for sending me email!<BR><BR>\n");
echo ("Below is a copy of the information you sent me:<BR>\n");
echo ("<DL>\n");
if ($users_name != "") {
        echo ("<DT><B>Your name:</B>\n<DD>$users_name<BR><BR>\n");
}
echo ("<DT><B>Your email:</B>\n<DD>$users_email<BR><BR>\n");
if ($users_country != "") {
        echo ("<DT><B>Your country:</B>\n<DD>$users_country<BR><BR>\n");
}
if ($state_address != "") {
        echo ("<DT><B>Your state:</B>\n<DD>$state_address<BR><BR>\n");
}
echo ("<DT><B>Your message:</B>\n<DD>$message<BR><BR>\n");
if ($SHOW_ATTACHMENT_FIELD) {
   if ($attach_name != "") {
      echo ("<DT><B>File attachment:</B>\n<DD>$attach_name<BR><BR>\n");
   }
}
echo ("</DL>\n");

} #reply_to_user
########################


########################
#This function does the work of sending the emails
########################
function send_mail() {

global $SHOW_ATTACHMENT_FIELD, $DESTINATION_EMAIL, $FROM_EMAIL, $users_email,
$subject, $users_name, $users_country, $state_address, $message, $keep_copy,
$TITLE, $attach_name, $attach_type, $attach_size, $temp_file_name;

$msg_body = "";
$error = 0;     #No error. If email could not be sent, will set to 1.
$mailheaders = "From: $users_email\n";
$mailheaders .= "X-Mailer: Lozinski's PHP Email Script\n";

if ($users_name != "") {
        $msg_body .= "$users_name - ";
}
$msg_body .= "$users_email filled out the email form on your website.\n";
if ($users_country != "") {
        $msg_body .= "They are in the country of: $users_country\n";
}
if ($state_address != "") {
        $msg_body .= "They are writing from the state of: $state_address\n\n";
}
$msg_body .= "The following is what they had to say:\n\n";
$msg_body .= "$message\n";

if ($attach_size > 0) { #If there were attachments
   if ($SHOW_ATTACHMENT_FIELD) {
      $file = fopen($temp_file_name, "r");
        $contents = fread($file, $attach_size);
        $encoded_attach = chunk_split(base64_encode($contents));
        fclose($file);
   }
   $mailheaders .= "MIME-version: 1.0\n";
   $mailheaders .= "Content-type: multipart/mixed; ";
   $mailheaders .= "boundary=\"Message-Boundary\"\n";
   $mailheaders .= "Content-transfer-encoding: 7BIT\n";
   $body_top = "--Message-Boundary\n";
   $body_top .= "Content-type: text/plain; charset=US-ASCII\n";
   $body_top .= "Content-transfer-encoding: 7BIT\n";
   $body_top .= "Content-description: Mail message body\n\n";
   $msg_body = $body_top . $msg_body;
   if ($SHOW_ATTACHMENT_FIELD) {
      if ($attach_name != "") {
         $msg_body .= "\n\n--Message-Boundary\n";
         $msg_body .= "Content-type: $attach_type; name=\"$attach_name\"\n";             
         $msg_body .= "Content-Transfer-Encoding: BASE64\n";
         $msg_body .= "Content-disposition: attachment; filename=\"$attach_name\"\n\n";
         $msg_body .= "$encoded_attach\n";
      }
   }
   $msg_body .= "--Message-Boundary--\n";
} #If there were attachments

if (mail(stripslashes($DESTINATION_EMAIL), $subject, $msg_body, $mailheaders)) {
   $error = 0;
} else {
   $error = 1;
}

if ($keep_copy) {
   $mailheaders = "From: $FROM_EMAIL\n";
   $msg_body = "The following is what you wrote from the ";
   $msg_body .= "\"$TITLE\" webpage...:\n\n";
   $msg_body .= $message . "\n";
   if (mail(stripslashes($users_email), $subject, $msg_body, $mailheaders)) {
      $error = 0;
   } else {
      $error = 1;
   }
}
return !($error);

} #send_mail
########################

?>
Top
  
 
 Oggetto del messaggio:
MessaggioInviato: mer ago 30, 2006 1:14 pm 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
Uhm.. si dai...
appena ho qualche minuto libero vediamo se ho voglia di metterlo...



:lol:



Grazie mille ti sono debitore ;)
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: ven set 01, 2006 12:13 am 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
OK la cosa funziona :D
Ho rimaneggiato un attimo il codice che mi ha postato, togliendo un paio di campi e altre cazzatine.
Ora ho bisogno di un paio di cose.
Cosa devo cambiare qui FORM ENCTYPE="multipart/form-data" (sempre che sia la parte giusta da cambiare :D) per dare la possibilità di uploadare solo formati .doc e .pdf?
Ed è possibile mettere un limite alla grandezza del file? :D
Lo so sono spaccamaroni, ma tanto ci sei tu :D :D
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: ven set 01, 2006 5:59 am 
Gnappoide ha scritto:
OK la cosa funziona :D
Ho rimaneggiato un attimo il codice che mi ha postato, togliendo un paio di campi e altre cazzatine.
Ora ho bisogno di un paio di cose.
Cosa devo cambiare qui FORM ENCTYPE="multipart/form-data" (sempre che sia la parte giusta da cambiare :D) per dare la possibilità di uploadare solo formati .doc e .pdf?
Ed è possibile mettere un limite alla grandezza del file? :D
Lo so sono spaccamaroni, ma tanto ci sei tu :D :D


# 6) Limit the file upload size. Can specify if there are any limitations to the file upload size, and
#if so, how big the allowed files are to be.

####
# If you want any of these additional features, you need to purchase the "advanced" version
#of this email script. Go to http://www.davelozinski.com/scripts/email for the juicy details. :)
####

Quindi sicuramente non sarà immediato, me lo devo studiare :D
Mi mandi il link in pvt alla tua pagina e lo script così come l'hai messo online?

Lucio
Top
  
 
 Oggetto del messaggio:
MessaggioInviato: ven set 01, 2006 10:41 am 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
Non importa era solo un vezzo ;)
Grazie lo stesso ;)
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: ven ott 06, 2006 10:00 pm 
Schiavo
Avatar utente
Iscritto il: sab mag 24, 2003 12:00 pm
Messaggi: 1768
Località: Repubblica della Serenissima
Per caso non ne avresti un altro? :D
Ne avevo trovato uno che controllava l'estensione del file, potevo fissare il limite della dimensione dell'allegato, faceva controlli sui campi e sulla validità dell'indirizzo email inserito.
Il problema è che sotto altervista funziona da Dio, cambiato hosting adesso mi arrivano le mail con l'allegato che pesa 0kb...

Ma porcaccia la miseriaccia :twisted:
_________________
<blink>Iscriviti al DarkSide Photocontest II</blink>
Orgoglione di far parte del ..:: ¿ÄØ Group ::..
PUFFO TONTOLONE from Puffolandia #19 of Puffolandia's group
Hai bisogno di una carrozzeria? http://www.carrozzeriavescovi.it
Top
 Profilo Non connesso  
 
 Oggetto del messaggio:
MessaggioInviato: ven ott 06, 2006 11:19 pm 
Gnappoide ha scritto:
Per caso non ne avresti un altro? :D
Ne avevo trovato uno che controllava l'estensione del file, potevo fissare il limite della dimensione dell'allegato, faceva controlli sui campi e sulla validità dell'indirizzo email inserito.
Il problema è che sotto altervista funziona da Dio, cambiato hosting adesso mi arrivano le mail con l'allegato che pesa 0kb...

Ma porcaccia la miseriaccia :twisted:


Ma strana sta cosa! Mandami link in pvt!
Top
  
 
Visualizza ultimi messaggi:  Ordina per  
Apri un nuovo argomento Rispondi all’argomento  [ 13 messaggi ] 
-->

Tutti gli orari sono UTC +1 ora


Chi c’è in linea

Visitano il forum: Nessuno e 0 ospiti


Non puoi aprire nuovi argomenti
Non puoi rispondere negli argomenti
Non puoi modificare i tuoi messaggi
Non puoi cancellare i tuoi messaggi
Non puoi inviare allegati

Vai a:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Traduzione Italiana phpBB.it