Help gia dynamicform

Βοήθεια λύσεις και νέα από τον χώρο των open source ή έτοιμων εφαρμογών που έχουν φτιαχτεί με την PHP όπως oscommerce, κ.α.

Συντονιστές: WebDev Moderators, Super-Moderators

Απάντηση
Tsados
Δημοσιεύσεις: 4
Εγγραφή: 29 Οκτ 2005 14:35

Help gia dynamicform

Δημοσίευση από Tsados » 06 Οκτ 2006 00:18

Kalispera sas, ithela ligi voithia.

Lipon exo to parakato dynamicform to opoio douleui alla de kani ti doulia pou thelo. Diladi exo ena site me diafores formes alla ta stixeia apo tis formes pane se ena e-mail, auto pou thelo einai se kathe forma pou exi to diko tis e-mail na pigeni eki. O enas tropos einai na kano toses dynamicform oses einai i formes alla auto einai ligo diskolo. Mporoume na allaksoume tipota sto parakato dynamicform oste na kanei ti doulia pou thelo i iparxei kapia alli etoimi.

Auta euxaristo ek ton proteron........



Κώδικας: Επιλογή όλων

<?

// ##########################################################################
// ##########################################################################
//
//  DynaForm v1.4 - Created by the Webligo Group
//                  http&#58;//www.webligo.com
//
//  YOUR USE OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES YOUR ACCEPTANCE
//  OF THE FOLLOWING LICENSE AGREEMENT&#58; 
//
//  THIS SCRIPT AND ALL OF ITS CONTENTS ARE LICENSED UNDER THE
//  GPL FREEWARE LICENSE. IT MAY NOT BE RESOLD OUR USED COMMERCIALLY
//  WITHOUT EXPRESSED PERMISSION OF THE WEBLIGO GROUP. IT MAY, HOWEVER,
//  BE DISTRIBUTED FREELY WITHOUT CHARGE. THIS SOFTWARE IS INTELLECTUAL
//  PROPERTY OF THE WEBLIGO GROUP. ANYONE VIOLATING THIS AGREEMENT WITHOUT
//  THE EXPRESSED PERMISSION OF THE WEBLIGO GROUP MAY BE LEGALLY PROSECUTED.
//  YOUR DOWNLOAD AND USE OF THIS SOFTWARE ALSO SIGNIFIES THAT YOU UNDERSTAND
//  AND AGREE TO THE DOWNLOAD AGREEMENT YOU READ UPON DOWNLOAD.
//
//  The Webligo Group, its management, or any of its employees, associates, or 
//  partners cannot be held liable for any damages that this software may cause. 
//  As the Licensee and user of the software, you agree to accept full liability 
//  for any damages or risk involved with using this software.
//
//  If you need help installing or using this software, please
//  read the readme.txt file that was provided with it.
//
//  This file and all related content are the intellectual
//  property of the Webligo Group and are under copyright.
//
//  If you plan to use this script for your clients, sell it as a service,
//  or utilize it in any other commercial manner, you must purchase a commercial
//  license. Please see this page for more information&#58;
//  http&#58;//webligo.com/products_dynaform.php
//
//  We do not provide support for this script, unless you have purchased a
//  commercial license.
//
//  Feel free to visit our website &#40;http&#58;//www.webligo.com&#41;
//  if you wish to send us any comments, etc.
//
// ###########################################################################
// ###########################################################################





// ###########################################################################
// #### CONFIGURE FROM&#58; ADDRESS ##############################################

// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION.

// If you would like to specify the From&#58; address of emails sent by DynaForm,
// enter it between the double quotes below. If you leave this blank, the
// server will assign the default email address.

$from_address = "domain@domain.gr";

// ###########################################################################
// ###########################################################################





// ###########################################################################
// #### ACTIVATE REQUIRED FIELDS? ############################################

// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION.
//
// If you would like to make some fields of your form required, change "no" to
// "yes" below.

$required_on = "no";

// If you have set $required_on to "yes" above, you can make fields required
// by beginning their name with "r_". For example, if you want to require
// a user to enter their name, use the following HTML&#58;
//
// <input type='text' name='r_Name'>
//
// If a user fails to enter a required field, they will be taken to a page
// where a message such as "You have not completed all the required fields."
// will be displayed. Please specify the URL to this file below&#58;

$required_errorpage = "error.html";

// ###########################################################################
// ###########################################################################





// ###########################################################################
// #### OVERRIDE REQUIRED VARIABLES? #########################################

// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION. NOTE&#58; THIS WILL NOT
// AFFECT YOUR 'TURN ON REQUIRED FIELDS?' SECTION SETTINGS ABOVE.
//
// If you would like to override the three required variables in
// order to hide your email address, email subject, and thank you page
// URL from your email form, change "no" to "yes" below.

$override = "yes";

// If override is set to "yes", the hidden variables on your HTML
// email form named "rec_mailto", "rec_subject", and "rec_thanks" will be
// overridden and can therefore be removed from the form.

// If you have set override to "yes" above, you must specify new values for
// each of these variables below.

// Enter the email address&#40;es&#41; to send the email to.
$incoming_mailto = "info@domain.gr";

// Enter the email subject.
$incoming_subject = "domain";

// Enter the thank you page URL.
$incoming_thanks = "http&#58;//www.domain.gr/contact thanks.html";

// ###########################################################################
// ###########################################################################





// ###########################################################################
// #### BAN IP ADDRESSES? ####################################################

// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION.
//
// If you would like to ban certain IP addresses from submitting your form,
// change "no" to "yes" below.

$ban_ip_on = "no";

// If you have set $ban_ip_on to "yes" above, please enter a list of the
// IP addresses you would like to ban, seperated only by commas.
// An example has been provided below&#58;

$ban_ip_list = "111.222.33.55,11.33.777.99";

// ###########################################################################
// ###########################################################################





// ###########################################################################
// #### ACTIVATE DOMAIN SECURITY? ############################################
//
// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION.
//
// This setting, when set to "yes" &#40;default&#41;, will check to make sure other
// people are not submitting data to your dynaform.php file from their
// external domains. This means that if your domain name is "www.domain.com",
// only forms on "www.domain.com" will be able to use this dynaform.php.
// IF YOU ARE RECEIVING ERRORS SUCH AS "INVALID DOMAIN" FOR NO REASON, PLEASE
// CHANGE "yes" TO "no" BELOW.

$secure_domain_on = "yes";

// ###########################################################################
// ###########################################################################




// ###########################################################################
// #### ACTIVATE AUTO-RESPONSE? ##############################################
//
// THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE
// DOING. PLEASE READ README.TXT FOR MORE INFORMATION.
//
// This setting, when set to "yes", will make DynaForm automatically reply to
// the user who submitted your form with an email message. If you would like
// to use this feature, change "no" to "yes" below.

$autorespond_on = "yes";

// If you have set $autorespond_on to "yes" above, you must specify a subject,
// from-address, and message to include in the auto-response email.

// The following setting is the subject of the auto-response email&#58;
$autorespond_subject = "Your Form Submission";

// The following setting is the from-address of the auto-respond email&#58;
$autorespond_from = "domain@domain.gr";

// The following setting is the message of your auto-response email&#58;
$autorespond_contents = "Domain Your submission from our website has been received. Thank you!";

// DynaForm also needs to know how to retrieve the user's email address.
// You must specify the name of the field into which the user will enter
// their email address. For example, if your email form contains an input
// field like "<input type='text' name='Email'>" you would set the
// following setting to "Email".
$autorespond_mailto_field = "Email";

// ###########################################################################
// ###########################################################################










// MAKE SURE DYNAFORM IS NOT BEING LOADED FROM THE URL
if&#40;$HTTP_SERVER_VARS&#91;'REQUEST_METHOD'&#93; == "GET"&#41; &#123;
echo "
<html>
<head><title>domain</title></head>
<body>
<font style='font-family&#58; verdana, arial; font-size&#58; 9pt;'>
<b>DynaForm is installed correctly.</b></font><br>
<font style='font-family&#58; verdana, arial; font-size&#58; 8pt;'>
DynaForm Easy PHP Form Mailer was created by <a href='http&#58;//www.domain.html'>domain</a>.
</font>
</body></html>
";
exit&#40;&#41;;
&#125;

// SET VARIABLES
$incoming_fields = array_keys&#40;$HTTP_POST_VARS&#41;;
$incoming_values = array_values&#40;$HTTP_POST_VARS&#41;;

if&#40;$override == "no"&#41; &#123;
$incoming_mailto = @$HTTP_POST_VARS&#91;'rec_mailto'&#93;;
$incoming_subject = @$HTTP_POST_VARS&#91;'rec_subject'&#93;;
$incoming_thanks = @$HTTP_POST_VARS&#91;'rec_thanks'&#93;;
&#125;

$incoming_mailto_cc = @$HTTP_POST_VARS&#91;'opt_mailto_cc'&#93;;
$incoming_mailto_bcc = @$HTTP_POST_VARS&#91;'opt_mailto_bcc'&#93;;
$form_url = @$HTTP_REFERER;

// MAKE SURE DYNAFORM IS BEING RUN FROM THE RIGHT DOMAIN
if&#40;$secure_domain_on == "yes"&#41; &#123;
$form_url_array = parse_url&#40;$form_url&#41;;
$form_domain = $form_url_array&#91;host&#93;;
if&#40;$form_domain != $HTTP_SERVER_VARS&#91;HTTP_HOST&#93;&#41; &#123;
echo "<h2>DynaForm Error - Invalid Domain</h2>
You have accessed DynaForm from an external domain - this is not allowed.<br>
You may only submit forms to a DynaForm file that exists on the same domain name.<br>
If you believe to be receiving this message in error, please refer to your readme.txt file.
<br><br>";
$error = "yes";
&#125;
&#125;

// CHECK IF MAILTO IS SET
if&#40;$incoming_mailto == ""&#41; &#123;
echo "<h2>DynaForm Error - Missing Field</h2>
Your form located at <a href='$form_url'>$form_url</a> does not work because you forgot to include
the required \"<b>rec_mailto</b>\" field within the form. This field specifies who the email will
be sent to.
<br><br>
This should look like&#58;<br>
<input type=\"hidden\" name=\"rec_mailto\" value=\"contactstation@domain.gr\">
<br><br>
If you are still confused, please refer to the readme.txt for more information and examples.<br><br><br><br>
";
$error = "yes";
&#125;

// CHECK IF SUBJECT IS SET
if&#40;$incoming_subject == ""&#41; &#123;
echo "<h2>DynaForm Error - Missing Field</h2>
Your form located at <a href='$form_url'>$form_url</a> does not work because you forgot to include
the required \"<b>rec_subject</b>\" field within the form. This field specifies the subject of
the email that will be sent.
<br><br>
This should look like&#58;<br>
<input type=\"hidden\" name=\"rec_subject\" value=\"New DynaForm Email\">
<br><br>
If you are still confused, please refer to the readme.txt for more information and examples.<br><br><br><br>
";
$error = "yes";
&#125;

// CHECK IF THANKS IS SET
if&#40;$incoming_thanks == ""&#41; &#123;
echo "<h2>DynaForm Error - Missing Field</h2>
Your form located at <a href='$form_url'>$form_url</a> does not work because you forgot to include
the required \"<b>rec_thanks</b>\" field within the form. This field specifies what page the user
will be taken to after they submit the form.
<br><br>
This should look like&#58;<br>
<input type=\"hidden\" name=\"rec_thanks\" value=\"http&#58;//www.domain.com.gr/thanks.php\">
<br><br>
If you are still confused, please refer to the readme.txt for more information and examples.<br><br><br><br>
";
$error = "yes";
&#125;

// CHECK IF IP ADDRESS IS BANNED
if&#40;$ban_ip_on == "yes"&#41; &#123;

if&#40;strstr&#40;$ban_ip_list, $HTTP_SERVER_VARS&#91;REMOTE_ADDR&#93;&#41;&#41; &#123;
echo "<h2>DynaForm Error - Banned IP</h2>
You cannot use this form because your IP address has been banned by the administrator.<br>
";
$error = "yes";
&#125;
&#125;


if&#40;$error == "yes"&#41; &#123;
exit&#40;&#41;;
&#125;

// SET EMAIL INTRODUCTION
$message = "This email was received from your MailForm located at $form_url \n\n";

// LOAD EMAIL CONTENTS 
for &#40;$i = 0; $i < count&#40;$incoming_fields&#41;; $i++&#41; &#123; 
if&#40;$incoming_fields&#91;$i&#93; != "rec_mailto"&#41; &#123;
if&#40;$incoming_fields&#91;$i&#93; != "rec_subject"&#41; &#123;
if&#40;$incoming_fields&#91;$i&#93; != "rec_thanks"&#41; &#123;
if&#40;$incoming_fields&#91;$i&#93; != "opt_mailto_cc"&#41; &#123;
if&#40;$incoming_fields&#91;$i&#93; != "opt_mailto_bcc"&#41; &#123;

// CHECK FOR REQUIRED FIELDS IF ACTIVATED
if&#40;$required_on == "yes"&#41; &#123;
$sub = substr&#40;$incoming_fields&#91;$i&#93;, 0, 2&#41;;
if&#40;$sub == "r_"&#41; &#123;
if&#40;$incoming_values&#91;$i&#93; == "" OR !isset&#40;$incoming_values&#91;$i&#93;&#41; OR $incoming_values&#91;$i&#93; == " "&#41; &#123;
header&#40;"Location&#58; $required_errorpage"&#41;;
exit&#40;&#41;;
&#125;&#125;&#125;

// ADD FIELD TO OUTGOING MESSAGE
$message .= "$incoming_fields&#91;$i&#93;&#58;\n$incoming_values&#91;$i&#93;\n\n";
&#125;&#125;&#125;&#125;&#125;&#125;

// SET EMAIL FOOTER
$message .= "\n\nDomain Contact Us.\nScript Program By domain.\n\nVisit us at&#58; http&#58;//www.domain.gr";

// CLEAR HEADERS
$headers = "";

// ADD FROM ADDRESS
if&#40;$from_address != ""&#41; &#123;
$headers .= "From&#58; $from_address\r\n";
&#125;

// CHECK FOR CC OR BCC
if&#40;$incoming_mailto_cc != ""&#41; &#123;
$headers .= "Cc&#58; $incoming_mailto_cc\r\n";
&#125;
if&#40;$incoming_mailto_bcc != ""&#41; &#123;
$headers .= "Bcc&#58; $incoming_mailto_bcc\r\n";
&#125;

// SEND EMAIL
mail&#40;$incoming_mailto, $incoming_subject, $message, $headers&#41;;

// SEND AUTO-RESPONSE IF ACTIVATED
if&#40;$autorespond_on == "yes"&#41; &#123;
$autorespond_mailto = @$HTTP_POST_VARS&#91;$autorespond_mailto_field&#93;;
$autorespond_headers = "From&#58; $autorespond_from";
mail&#40;$autorespond_mailto, $autorespond_subject, $autorespond_contents, $autorespond_headers&#41;;
&#125;

// FORWARD TO THANK YOU PAGE
header&#40;"Location&#58; $incoming_thanks"&#41;; 


?>





==========FORMA SITE============


 <FORM action="http&#58;//www.domain.gr/mail/dynaform_site_domain_en.php" method="POST" style="font-size &#58; 11px;font-family &#58; Verdana;color &#58; navy;">
                                      <div align="left"> 
                                        <p align="center"> 
                                          <input type='hidden' name='rec_mailto' value='domain@mail.gr'>
                                          <input type='hidden' name='rec_subject' value='Μήνυμα από το site σας - domain en'>
                                          <input type='hidden' name='rec_thanks' value='http&#58;//www.domain.gr/contact_thanks_adv_en.htm'>
                                          <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><br>
                                          <strong>Name&#58;</strong><font color="#000066"><br>
                                          <input type="text" name="ONOMA" style="border-top-width &#58; 1px;border-right-width &#58; 1px;border-bottom-width &#58; 1px;border-left-width &#58; 1px;border-color &#58; blue blue blue blue;">
                                          <br>
                                          <br>
                                          <strong><font color="#FFFFFF">Last Name&#58;</font><br>
                                          <input type="text" name="EPONYMO" style="border-top-width &#58; 1px;border-right-width &#58; 1px;border-bottom-width &#58; 1px;border-left-width &#58; 1px;border-color &#58; blue blue blue blue;">
                                          <br>
                                          <br>
                                          <font color="#FFFFFF">Τelefone&#58;</font><br>
                                          <input type="text" name="POLI" style="border-top-width &#58; 1px;border-right-width &#58; 1px;border-bottom-width &#58; 1px;border-left-width &#58; 1px;border-color &#58; blue blue blue blue;">
                                          <br>
                                          <br>
                                          <font color="#FFFFFF">Mobile&#58;</font><br>
                                          <input type="text" name="POLI" style="border-top-width &#58; 1px;border-right-width &#58; 1px;border-bottom-width &#58; 1px;border-left-width &#58; 1px;border-color &#58; blue blue blue blue;">
                                          <br>
                                          <br>
                                          <font color="#FFFFFF">E-mail</font><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">&#58;</font></strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong><br>
                                          <input type="text" name="EMAIL" style="border-top-width &#58; 1px;border-right-width &#58; 1px;border-bottom-width &#58; 1px;border-left-width &#58; 1px;border-color &#58; blue blue blue blue;">
                                          </strong></font></font></font><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><br>
                                          </font></p>
                                        <center>
                                          <font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
                                          <input name="submit2" type="submit" style="font-size &#58; 10px;font-family &#58; Verdana;font-weight &#58; bold;color &#58; navy;background-color &#58; white;" value="Sent">
                                          <font color="#336699">&amp;</font> 
                                          <input name="submit22" type="reset" style="font-size &#58; 10px;font-family &#58; Verdana;font-weight &#58; bold;color &#58; navy;background-color &#58; white;" value="Clear">
                                          </font> 
                                          <p></p>
                                        </center>
                                      </div>
                                    </FORM>

id12586
στις καρδιές μας
Δημοσιεύσεις: 8387
Εγγραφή: 23 Ιουν 2003 23:28
Τοποθεσία: Far away
Επικοινωνία:

Help gia dynamicform

Δημοσίευση από id12586 » 06 Οκτ 2006 00:29

Το έβαλα σε [cοde][/cοde] για να είναι πιο ευδιάκριτο :wink:
Chris at your Services
ΕικόναSacame de Aqui

Άβαταρ μέλους
Looky
Δημοσιεύσεις: 106
Εγγραφή: 16 Σεπ 2006 22:48
Τοποθεσία: Hard Disk

Help gia dynamicform

Δημοσίευση από Looky » 06 Οκτ 2006 02:29

Τις φόρμες τις έχει όλες μαζί σε μια σελίδα ή κάθε σελίδα του site σου έχει από μια φόρμα;

Επίσης, γιατί δεν φτιάχνεις μια φόρμα από μόνο σου και να την παραμετροποιήσεις όπως εσύ θες και χρησιμοποιείς έτοιμα πράγματα;

Tsados
Δημοσιεύσεις: 4
Εγγραφή: 29 Οκτ 2005 14:35

Help gia dynamicform

Δημοσίευση από Tsados » 06 Οκτ 2006 12:31

De ta pao poli kala me tis dynamicform prospathisa na tin tropopiiso alla de doulepse. I kathe selida exei kai apo mia forma pou ego auto pou thelo einai ta stixeia tis kathe formas na pigeni sto antistixo e-mail.

Άβαταρ μέλους
Banavas
Script Master
Δημοσιεύσεις: 1367
Εγγραφή: 21 Νοέμ 2004 20:25
Επικοινωνία:

Help gia dynamicform

Δημοσίευση από Banavas » 06 Οκτ 2006 16:36

Κώδικας: Επιλογή όλων

// Enter the email address&#40;es&#41; to send the email to. 
$incoming_mailto = "info@domain.gr"; 
Αυτή η μεταβλητή ρυθμίζει το που θα πάει το email.
Διέγραψέ την από τις ρυθμίσεις και πρόσθεσε μια

Κώδικας: Επιλογή όλων

<input name="incoming_mailto" type="hidden" value= "info@domain.gr">
σε κάθε φόρμα με το email στο οποίο θέλεις να πηγαίνει η φόρμα

Αυτό βέβαια μειώνει δραμματικά την προστασία από spammers.
Happy coding....
Μάρκος
http://lasernet.gr

Tsados
Δημοσιεύσεις: 4
Εγγραφή: 29 Οκτ 2005 14:35

Help gia dynamicform

Δημοσίευση από Tsados » 07 Οκτ 2006 00:27

Thanks Banavas tha to dokimaso...

Tsados
Δημοσιεύσεις: 4
Εγγραφή: 29 Οκτ 2005 14:35

Help gia dynamicform

Δημοσίευση από Tsados » 07 Οκτ 2006 00:36

File euxaristo poli i doulia mou egine.

Απάντηση

Επιστροφή στο “PHP έτοιμες εφαρμογές”

Μέλη σε σύνδεση

Μέλη σε αυτήν τη Δ. Συζήτηση: Δεν υπάρχουν εγγεγραμμένα μέλη και 1 επισκέπτης