Contact doet het niet

Gestart doorDion6 reacties30 weergaven

7 berichten · pagina 1 van 1

Dion

Lid · Topicstarter

Berichten
1.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wie weet wat er fout is in deze contact script. Als ik wil verzenden staat er dit Fatal error: Cannot redeclare in_db() (previously declared in /home/lukkiend/domains/habbo-villa.nl/public_html/websitev1/pagina/inc/config.php:2) in /home/lukkiend/domains/habbo-villa.nl/public_html/websitev1/pagina/inc/config.php on line 5

<div class="bluetop">Contact</div>
                            <div class="bluemid"><link rel="stylesheet" type="text/css" href="opmaakcontact.css" /> 
[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #FF8000]// This will show in the browsers title bar and at the top of the form.[/COLOR]
[COLOR= #0000BB]$websitename[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Habbo-villa"[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]// Allowed file types. Please remember to keep the format of this array, add the file extensions you want
// WITHOUT the dot. Please also be aware that certain file types (such as exe) may contain malware.[/COLOR]
[COLOR= #0000BB]$allowtypes[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"zip"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"rar"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"txt"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"doc"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"jpg"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"png"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"gif"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"odt"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"xml"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]// Whats your email address? Seperate email addresses with commas for multiple email addresses.[/COLOR]
[COLOR= #0000BB]$myemail[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"fabriekzus@habbo-villa.nl"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// What priority should the script send the mail? 1 (Highest), 2 (High), 3 (Normal), 4 (Low), 5 (Lowest).[/COLOR]
[COLOR= #0000BB]$priority[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"1"[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]// Should we allow visitors to attach files? How Many? 0 = Do not allow attachments,
// 1 = allow only 1 file to be attached, 2 = allow two files etc.[/COLOR]
[COLOR= #0000BB]$allowattach[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"0"[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]// Maximum file size for attachments in KB NOT Bytes for simplicity. MAKE SURE your php.ini can handel it,
// post_max_size, upload_max_filesize, file_uploads, max_execution_time!
// 2048kb = 2MB,       1024kb = 1MB,     512kb = 1/2MB etc..[/COLOR]
[COLOR= #0000BB]$max_file_size[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"1024"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// Maximum file size for all attachments combined in KB. MAKE SURE your php.ini can handel it,
// post_max_size, upload_max_filesize, file_uploads, max_execution_time!
// 2048kb = 2MB,       1024kb = 1MB,     512kb = 1/2MB etc..[/COLOR]
[COLOR= #0000BB]$max_file_total[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"2048"[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// Value for the Submit Button[/COLOR]
[COLOR= #0000BB]$submitvalue[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]" Verzenden "[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]// Value for the Reset Button[/COLOR]
[COLOR= #0000BB]$resetvalue[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]" Nieuwe mail "[/COLOR][COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// Default subject? This will be sent if the user does not type in a subject[/COLOR]
[COLOR= #0000BB]$defaultsubject[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Geen onderwerp"[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]// Because many requested it, this feature will add a drop down box for the user to select a array of
// subjects that you specify below. 
// True = Use this feature, False = do not use this feature[/COLOR]
[COLOR= #0000BB]$use_subject_drop[/COLOR][COLOR= #007700]=[/COLOR]false[COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// This is an array of the email subjects the user can pick from. Make sure you keep the format of
// this array or you will get errors.
// Look at <http://novahq.net/forum/showthread.php?t=38718> for examples on how to use this feature.[/COLOR]
[COLOR= #0000BB]$subjects[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Department 1"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"Department 2"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"Department 3"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]// This is an array of the email addresses for the array above. There must be an email FOR EACH
// array value specified above. You can have only 1 department if you want.
// YOU MUST HAVE THE SAME AMMOUNT OF $subjects and $emails or this WILL NOT work correctly!
// The emails also must be in order for what you specify above!
// Seperate email addresses by a comma to send an email to multiple addresses.[/COLOR]
[COLOR= #0000BB]$emails[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"dept_1@domain.com"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"dept_2@domain.com"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"dept_3@domain.com"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]// This is the message that is sent after the email has been sent. You can use html here.
// If you want to redirect users to another page on your website use this:
// <script type="text/javascript">window.location="http://www.YOUR_URL.com/page.html";</script>[/COLOR]
[COLOR= #0000BB]$thanksmessage[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Bedankt!,<br />Je vraag zal binnen 48 uur worden beantwoord.<br />"[/COLOR][COLOR= #007700];[/COLOR] 

[COLOR= #FF8000]/*
//================================================================================
* ! ATTENTION !
//================================================================================
: Dont edit below this line.
*/

// Function to get the extension of the uploaded file.[/COLOR]
[COLOR= #007700]function[/COLOR] get_ext[COLOR= #007700]([/COLOR][COLOR= #0000BB]$key[/COLOR][COLOR= #007700]) {[/COLOR] 
    [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/substr"]substr[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strrchr"]strrchr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$key[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"."[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]));[/COLOR]
    [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"jpeg"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"jpg"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700];
}[/COLOR]

[COLOR= #FF8000]// Function used to attach files to the message[/COLOR]
[COLOR= #007700]function[/COLOR] phattach[COLOR= #007700]([/COLOR][COLOR= #0000BB]$file[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$name[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700]) {[/COLOR]
    
    [COLOR= #0000BB]$fp[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$file[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"r"[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/fread"]fread[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fp[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/filesize"]filesize[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$file[/COLOR][COLOR= #007700]));[/COLOR]
    [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/chunk_split"]chunk_split[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/base64_encode"]base64_encode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]));[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"--"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-Type: application/octet-stream; name=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""
"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-disposition: attachment; filename=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$name[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""
"[/COLOR][COLOR= #007700];[/COLOR] 
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-Transfer-Encoding: base64
"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"$str
"[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]

    [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$message[/COLOR][COLOR= #007700];
}[/COLOR]

[COLOR= #FF8000]//Little bit of security from people forging headers. People are mean sometimes :([/COLOR]
[COLOR= #007700]function[/COLOR] clean_msg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$key[/COLOR][COLOR= #007700]) {[/COLOR]
    [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$find[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
        [COLOR= #DD0000]"/bcc:/i"[/COLOR][COLOR= #007700],[/COLOR]
        [COLOR= #DD0000]"/Content-Type:/i"[/COLOR][COLOR= #007700],[/COLOR]
        [COLOR= #DD0000]"/Mime-Type:/i"[/COLOR][COLOR= #007700],[/COLOR]
        [COLOR= #DD0000]"/cc:/i"[/COLOR][COLOR= #007700],[/COLOR]
        [COLOR= #DD0000]"/to:/i"[/COLOR]
    [COLOR= #007700]);[/COLOR]
  [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$find[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700]);[/COLOR]
  [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$key[/COLOR][COLOR= #007700];
}[/COLOR]

[COLOR= #FF8000]// Initilize some variables[/COLOR]
[COLOR= #0000BB]$error[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$sent_mail[/COLOR][COLOR= #007700]=[/COLOR]false[COLOR= #007700];[/COLOR]

[COLOR= #FF8000]// When the form is submitted[/COLOR]
[URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]==[/COLOR]true[COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/extract"]extract[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700],[/COLOR] EXTR_SKIP[COLOR= #007700]);[/COLOR]

        [COLOR= #FF8000]// Check the form for errors[/COLOR]
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$yourname[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR] 
            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"You did not enter your name!<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$youremail[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR] 
            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"You did not enter your email!<br />"[/COLOR][COLOR= #007700];
        }[/COLOR] [URL="http://www.php.net/Elseif"]Elseif[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,})+$/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$youremail[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Invalid email address.<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
            [COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$defaultsubject[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$yourmessage[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR] 
            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"You did not enter a message!<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [COLOR= #FF8000]// Verify Attchment info[/COLOR]
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$allowattach[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
            
            [COLOR= #FF8000]// Get the total size of all uploaded files[/COLOR]
            [URL="http://www.php.net/If"]If[/URL][COLOR= #007700](([/COLOR][URL="http://www.php.net/array_sum"]array_sum[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]size[/COLOR][COLOR= #007700]])) > ([/COLOR][COLOR= #0000BB]$max_file_total[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]1024[/COLOR][COLOR= #007700])) {[/COLOR]
                
                [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"The max size allowed for all your files is "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$max_file_total[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"kb<br />"[/COLOR][COLOR= #007700];
                
            }[/COLOR] [URL="http://www.php.net/Else"]Else[/URL] [COLOR= #007700]{[/COLOR]

                [COLOR= #FF8000]//Loop through each of the files[/COLOR]
                [URL="http://www.php.net/For"]For[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$allowattach[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) {[/COLOR]
                    
                    [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]) {[/COLOR]
    
                        [COLOR= #FF8000]//Check if the file type uploaded is a valid file type. [/COLOR]
                        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR]get_ext[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]),[/COLOR] [COLOR= #0000BB]$allowtypes[/COLOR][COLOR= #007700])) {[/COLOR]
                            
                            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Invalid file type for your file: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];[/COLOR]
                            
                        [COLOR= #FF8000]//Check the size of each file[/COLOR]
                        [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/Elseif"]Elseif[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]size[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]) > ([/COLOR][COLOR= #0000BB]$max_file_size[/COLOR][COLOR= #007700]*[/COLOR][COLOR= #0000BB]1024[/COLOR][COLOR= #007700])) {[/COLOR]
                            
                            [COLOR= #0000BB]$error[/COLOR][COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Your file: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" is to big.<br />"[/COLOR][COLOR= #007700];
                            
                        }[/COLOR] [COLOR= #FF8000]// If in_array[/COLOR]
                        
                    [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// If Files[/COLOR]
                    
                [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// For[/COLOR]
                
            [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// Else array_sum($_FILES[attachment][size])[/COLOR]
            
        [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// If Allowattach[/COLOR]

    [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700]) {[/COLOR]
    
        [COLOR= #0000BB]$display_message[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$error[/COLOR][COLOR= #007700];

    }[/COLOR] [URL="http://www.php.net/Else"]Else[/URL] [COLOR= #007700]{[/COLOR]
        
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$use_subject_drop[/COLOR] AND [URL="http://www.php.net/is_array"]is_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subjects[/COLOR][COLOR= #007700])[/COLOR] AND [URL="http://www.php.net/is_array"]is_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$emails[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$subject_count[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subjects[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$email_count[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$emails[/COLOR][COLOR= #007700]);[/COLOR]
            
            [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subject_count[/COLOR][COLOR= #007700]==[/COLOR][COLOR= #0000BB]$email_count[/COLOR][COLOR= #007700]) {[/COLOR]
                
                [COLOR= #0000BB]$myemail[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$emails[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700]];[/COLOR]
                [COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$subjects[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700]];

            }[/COLOR] [COLOR= #FF8000]// If $subject_count[/COLOR]
            
        [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// If $use_subject_drop[/COLOR]

        [COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700]=[/COLOR][URL="http://www.php.net/md5"]md5[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/uniqid"]uniqid[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()));[/COLOR]
        
        [COLOR= #FF8000]//Headers[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]"Return-Path: <"[/COLOR][COLOR= #007700].[/COLOR]clean_msg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$youremail[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]">
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR]clean_msg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$yourname[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]" <"[/COLOR][COLOR= #007700].[/COLOR]clean_msg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$youremail[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]">
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"X-Mailer: PHP/"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]().[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"X-Sender: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"X-Priority: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$priority[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR] 
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"MIME-Version: 1.0
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-Type: multipart/mixed; boundary=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"This is a multi-part message in MIME format.
"[/COLOR][COLOR= #007700];[/COLOR]

        [COLOR= #FF8000]//Message[/COLOR]
        [COLOR= #0000BB]$message[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"--"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-Type: text/html; charset="iso-8859-1"
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"Content-Transfer-Encoding: quoted-printable
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR]clean_msg[COLOR= #007700]([/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$yourmessage[/COLOR][COLOR= #007700])));[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR]

        [COLOR= #FF8000]//Add attachments to message[/COLOR]
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$allowattach[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
            
            [URL="http://www.php.net/For"]For[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$allowattach[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++) {[/COLOR]
                
                [URL="http://www.php.net/If"]If[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]]) {[/COLOR]
                    
                    [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR]phattach[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]tmp_name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_FILES[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]attachment[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700]);
                    
                }[/COLOR] [COLOR= #FF8000]//If $_FILES[attachment][name][$i][/COLOR]
                
            [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]//For[/COLOR]
            
        [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// If
        
        // End the message[/COLOR]
        [COLOR= #0000BB]$message[/COLOR][COLOR= #007700].=[/COLOR][COLOR= #DD0000]"--"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$boundary[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"--
"[/COLOR][COLOR= #007700];[/COLOR]
        
        [COLOR= #FF8000]// Send the completed message[/COLOR]
        [URL="http://www.php.net/If"]If[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$myemail[/COLOR][COLOR= #007700],[/COLOR] clean_msg[COLOR= #007700]([/COLOR][COLOR= #0000BB]$emailsubject[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]$message[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700])) {[/COLOR]
            
            [URL="http://www.php.net/Exit"]Exit[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"An error has occured, please report this to the website administrator.
"[/COLOR][COLOR= #007700]);
            
        }[/COLOR] [URL="http://www.php.net/Else"]Else[/URL] [COLOR= #007700]{[/COLOR]
        
            [COLOR= #0000BB]$sent_mail[/COLOR][COLOR= #007700]=[/COLOR]true[COLOR= #007700];
            
        }

    }[/COLOR] [COLOR= #FF8000]// Else[/COLOR]

[COLOR= #007700]}[/COLOR] [COLOR= #FF8000]// $_POST

/*
//================================================================================
* Start the form layout
//================================================================================
:- Use the html below to customize the form.
*/[/COLOR]
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$websitename[/COLOR][COLOR= #007700];[/COLOR] ?> - Powered By phMailer</title>


<script type="text/javascript">
var error="";
e_regex = /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,})+$/;

function Checkit(theform) {
    if(theform.yourname.value=="") {
        error+="Je hebt geen Habbonaam ingevuld
";
    }
    
    if(theform.youremail.value=="") {
        error+="Je hebt geen mail adres ingevuld
";
    } else if(!e_regex.test(theform.youremail.value)) {
        error+="Invalid email address
";
    }
        
    if(theform.yourmessage.value=="") {
        error+="Je hebt geen bericht ingevuld
";
    }
    
    if(error) {
        alert(**Jou mail kon niet worden verzonden, want:**

 + error);
        error="";
        return false;
    } else {
        return true;
    }
}
</script>

</head>
<body>
<?If($display_message) {?>

<div align="center" class="error_message"><b><?=$display_message;?></b></div>
<br />

<?}?>

<?If($sent_mail!=true) {?>

<form method="post" action="<?=$_SERVER[PHP_SELF];?>" enctype="multipart/form-data" name="phmailer" onsubmit="return Checkit(this);">
<table align="center" class="table">
    
    <?If($allowattach > 0) {?>
        <tr>
            <td width="100%" class="attach_info" colspan="2">
                <b>Valid Attachment Types:</b> <?=implode($allowtypes, ", ");?><br />
                <b>Max size per file:</b> <?=$max_file_size?>kb.<br />
                <b>Max combined file size:</b> <?=$max_file_total?>kb.
            </td>
        </tr>
    <?}?>
    
    <tr>
        <td width="30%" class="table_body">Habbonaam:</td>
        <td width="70%" class="table_body"><input name="yourname" type="text" size="30" value="<?=stripslashes(htmlspecialchars($yourname));?>" /><span class="error_message">*</span></td>
    </tr>
    <tr>
        <td width="30%" class="table_body">Jou mail-adres:</td>
        <td width="70%" class="table_body"><input name="youremail" type="text" size="30" value="<?=stripslashes(htmlspecialchars($youremail));?>" /><span class="error_message">*</span></td>
    </tr>
    <tr>
        <td width="30%" class="table_body">Onderwerp:</td>
        <td width="70%" class="table_body">
        
            <?If($use_subject_drop AND is_array($subjects)) {?>
                    <select name="emailsubject" size="1">
                        <?while(list($key,$val)=each($subjects)) {?>

                            <option value="<?=intval($key);?>"><?=htmlspecialchars(stripslashes($val));?></option>
                        
                        <?}?>
                    </select>
                
            
            <?} Else {?>
                
                <input name="emailsubject" type="text" size="30" value="<?=stripslashes(htmlspecialchars($emailsubject));?>" />
                
            <?}?>
            
        </td>
    </tr>

    <?For($i=1;$i <= $allowattach; $i++) {?>
        <tr>
            <td width="30%" class="table_body">Attach File:</td>
            <td width="70%" class="table_body"><input name="attachment[]" type="file" size="30" /></td>
        </tr>
    <?}?>
    
    <tr>
        <td colspan="2" width="100%" class="table_body">Bericht:<span class="error_message">*</span><br />
            <div align="center">
                <textarea name="yourmessage" rows="8" cols="60"><?=stripslashes(htmlspecialchars($yourmessage));?></textarea>
            </div>
        </td>
    </tr>
    <tr>
        <td colspan="2" width="100%" class="table_footer">
            <input type="hidden" name="submit" value="true" />
            <input type="submit" value="<?=$submitvalue;?>" /> &nbsp;
            <input type="reset" value="<?=$resetvalue;?>" />
        </td>
    </tr>
</table>
</form>

<?} Else {?>

    <div align="center" class="thanks_message"><?=$thanksmessage;?></div>
    <br />
    <br />

<?}
//Please leave this here.. Its very small and non-obtrusive. ?>
</table>
</body>
</html>
</div>
                            <div class="bluebot"></div>
0
Berichten
3.461
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zou je de code tussen de code-tags kunnen zetten? Dat kijkt een stuk overzichtelijkerwink
0
Dion

Lid · Topicstarter

Berichten
1.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
gedaan ±D
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Waarschijnlijk heb je een functie in_db in contact.php die ook in je config.php staat.
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee de fout zit niet in contact.php maar in config.php...
0
Dion

Lid · Topicstarter

Berichten
1.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ok ik zou ff kijkenbiggrin
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren