Script file name: index.php | > Script written by Khoi Hong | > Date started: July 07 2004 | | WARNING //-------------------------- | | Selling the code for this program without prior written consent is expressly forbidden. | This computer program is protected by copyright law. | Unauthorized reproduction or distribution of this program, or any portion of if, | may result in severe civil and criminal penalties and will be prosecuted to | the maximum extent possible under the lzaw. +-------------------------------------------------------------------------- */ require_once "getvars.php"; require_once "config.php"; $your_email = $webmaster_email; $mail_log = $email_log; $script_url = $efeedbackV4_url; $up_dir = $home_root; $upload_dir ="$up_dir/upload" ; $up_banner_dir ="$up_dir/banner/banner.txt" ; ######################################## DONE ############################################## ############################################################################################## # Read form foreach ($POST_VARS as $header=> $value ){ $value = str_replace("\n", "['br']", $value) ; $value = str_replace("\'", "'", $value) ; $value = str_replace('\"', '"', $value) ; $get_data = $get_data.'%%'.$header.'|'.$value; } $get_data = str_replace("%%", "\n", $get_data) ; foreach ($POST_VARS as $header=> $value ){ $value = str_replace("\n", "", $value) ; $value = str_replace("\'", "'", $value) ; $value = str_replace('\"', '"', $value) ; if (!preg_match("/@/",$value) && $header != "subject"){ $value = str_replace(" ", "", $value) ; } if ($value == ""){ $value ="NO_BLANK"; } $get_data2 = $get_data2.'%%'.$header.'|'.$value; $$header = $value; } $get_data2 = str_replace("%%", "\n", $get_data2) ; # Random Banner Ad here $fh = fopen("$up_banner_dir", "r"); if (is_resource($fh)) { $x = 0; while (!feof($fh)) { $buffer .= fgets($fh, 4096); $x++; } } fclose($fh); $array = explode("\n", $buffer); $num = rand(0,$x-1); if ($turn_banner =="ON"){ $print_banner = "$array[$num]"; } else{ $print_banner = ""; } # Start program if ($step == 1){step_1();} if ($step == 2){step_2();} if ($what == "") { $what = $SERVER_VARS['QUERY_STRING']; } if (is_dir("$up_dir/what/$what") && $what != "") { main(); } else{ print "Webmaster ! Please check your form name ID $what - it doesn't exist"; exit; } # ---------------------------------------------------------------- function javascript_code() { global $what,$up_dir; //Print Checkbox required javascript code if (file_exists("$up_dir/what/$what/form_check_checkbox.txt")){ $read_file ="$up_dir/what/$what/form_check_checkbox.txt"; $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $get_form_checkbox .= fgets($fh, 4096); } fclose ($fh); $form_checkbox = explode("\n", $get_form_checkbox); foreach($form_checkbox as $val){ if($val !=""){ $get_info_val = preg_split ("/::/", $val) ; $get_info_val2 = preg_split ("/\|/", $val) ; $error_message = $get_info_val2[1]; $count_val = count($get_info_val) - 1; for ($x=0;$x<=$count_val;$x++){ $field_name = $get_info_val[$x]; if(preg_match("/{'/",$field_name) ){ $field_name =str_replace("{'","",$field_name); $field_name =str_replace("'}","",$field_name); $js_checkbox .="!document.form1." . $field_name . ".checked"; } if ($x < $count_val - 1) $js_checkbox .=" && " ; } $js_checkbox .="|$error_message\n"; } } } $js_checkbox_array = explode("\n", $js_checkbox); foreach ($js_checkbox_array as $val){ if ($val != ""){ $get_info_val3 = preg_split ("/\|/", $val) ; $get_code = $get_info_val3[0]; $get_error_mess = $get_info_val3[1]; $get_error_mess =str_replace ("'","\'",$get_error_mess); $display_js_checkbox .="if ($get_code) {alert ('$get_error_mess'); return false;}\n" ; } } //Checkbox required end # Do not modify this code below $javascript=<< function submit_form(a) { $display_js_checkbox document.form1.step.value = a; document.form1.submit(); } EOL; return $javascript; } # ---------------------------------------------------------------- function main() { global $error_message,$from_check_required,$temp_file,$script_url,$HTTP_REFERER,$print_banner,$what,$get_data,$mysite,$script_url,$uselock,$up_dir,$up_banner_dir,$which_mail,$SMTP_SERVER,$mail_log,$your_email,$javascript,$date_create,$time,$REMOTE_ADDR,$HTTP_USER_AGENT; # Read file page.html if (file_exists("$up_dir/what/$what/page.html")){ $read_file ="$up_dir/what/$what/page.html"; } if (file_exists("$up_dir/what/$what/page.htm")){ $read_file ="$up_dir/what/$what/page.htm"; } $page_html = get_file_content("$read_file"); # Read file form.html if (file_exists("$up_dir/what/$what/form.html")){ $read_file ="$up_dir/what/$what/form.html"; } if (file_exists("$up_dir/what/$what/form.htm")){ $read_file ="$up_dir/what/$what/form.htm"; } $form_html = get_file_content("$read_file"); $form_html = preg_replace('/\{\'\w*?\'\}/', '', $form_html); $page_html = str_replace("NO_BLANK", "", $page_html); $page_html = str_replace("{'DISPLAY_BANNER'}", $print_banner, $page_html); $page_html = str_replace("{'DISPLAY_REFER'}", $HTTP_REFERER, $page_html); $page_html = str_replace("{'WHAT'}", $what, $page_html); $page_html = str_replace("{'SCRIPT_NAME'}", $script_url, $page_html); $page_html = str_replace("{'DISPLAY_PREVIEW'}", "", $page_html); $page_html = str_replace("{'DISPLAY_FORM'}", "\n$form_html", $page_html); $page_html = str_replace("{'DISPLAY_THANKYOU'}", "", $page_html); $page_html = str_replace("{'DATE'}", $date_create, $page_html); $page_html = str_replace("{'TIME'}", $time, $page_html); $page_html = str_replace("{'USER_IP'}", $REMOTE_ADDR, $page_html); $page_html = str_replace("{'SYSTEM'}", $HTTP_USER_AGENT, $page_html); $page_html = str_replace("{'MY_SITE_URL'}", $mysite, $page_html); $page_html = str_replace("{'refer'}", "", $page_html); $print_javascript = javascript_code(); print "$page_html\n$print_javascript" ; exit; } # ---------------------------------------------------------------- function step_1() { global $error_message,$from_check_required,$temp_file,$subject,$script_url,$HTTP_REFERER,$print_banner,$what,$get_data,$mysite,$script_url,$uselock,$up_dir,$up_banner_dir,$which_mail,$SMTP_SERVER,$mail_log,$your_email,$javascript,$date_create,$time,$REMOTE_ADDR,$HTTP_USER_AGENT; if ($from_check_required != "1") { check_required() ; } # Print Error message if subject is blank if ($subject == "") { print<< Error ! Webmaster note!

Error found in your page.html file : Missing hidden form field name subject

You can add many form field as you want but you must keep the field name subject for sending email


horny webcams horny webcams boat celebrity naked galleries celebrity naked galleries continue milfs night out pics milfs night out pics cotton asian womwn naked asian womwn naked lie gay aisian amerature gay aisian amerature fat amateur movie spain amateur movie spain sit fun online teen quizzes fun online teen quizzes view relaxing receiving anal relaxing receiving anal over britney cumshot britney cumshot arrive claudia jordan nude claudia jordan nude year series nude in public series nude in public condition tantric lessons tantric lessons arrive adult escorts dallas texas adult escorts dallas texas score reagan suicide nude reagan suicide nude hot double fucker sex double fucker sex twenty busty cops katie james busty cops katie james mean mpg calculator for palm mpg calculator for palm sound gay harness gay harness second sophie moon anal mpg sophie moon anal mpg spell gmc denali mpg gmc denali mpg want asian beaver filipina asian beaver filipina heat fuck my tits movies fuck my tits movies interest assfingering handjob assfingering handjob grow mapplethorpe nudes mapplethorpe nudes brown idaho women nude idaho women nude twenty hentai high game hentai high game invent naked beach family naked beach family present lose bet strip lose bet strip populate innuendo anal innuendo anal just naughty families naughty families quiet sex roof video sex roof video sail edwards breast cancer edwards breast cancer place speed dating memphis speed dating memphis write gay old man chat gay old man chat where robert buckley gay robert buckley gay father senior friends relationship senior friends relationship you gay troy new york gay troy new york island christiania vodka naked vodka christiania vodka naked vodka common gay eat man gay eat man believe average amateur women videos average amateur women videos boat grandma bondage grandma bondage event nude baot nude baot excite sponge bath sex keywords sponge bath sex keywords moment nudist camp map nudist camp map print global warming 5 porn global warming 5 porn wife naked redhead babes naked redhead babes forward anal snowballing anal snowballing grass ricky benetiz porn ricky benetiz porn shoe nude girl chat nude girl chat earth got nailed password pron got nailed password pron condition stories about my vagina stories about my vagina question hoffman on tomei sex hoffman on tomei sex symbol kiddie porn online kiddie porn online check fuko love big tits fuko love big tits drink jenifer elliston naked pics jenifer elliston naked pics provide mens description of breast mens description of breast charge celebrities with facial moles celebrities with facial moles observe dawson fucks cody download dawson fucks cody download body female bladder vagina female bladder vagina scale gay chat usa gay chat usa often escort nqns escort nqns baby gay pink triangle gay pink triangle problem nudist adult site nudist adult site board james bond pussy galore james bond pussy galore shoe fetish girl young fetish girl young center the model hoopz naked the model hoopz naked straight crofton personals crofton personals thought afro anal afro anal indicate escort wichita ks escort wichita ks would cashe sex cashe sex ride straight men acting gay straight men acting gay distant breast augmentation pros cons breast augmentation pros cons method mujeres colombianas xxx mujeres colombianas xxx ten 18 girls fuck 18 girls fuck join meaning of pleasure meaning of pleasure suffix buff striaght guys naked buff striaght guys naked sail rate my slut wife rate my slut wife the big head cocks big head cocks difficult bondage uploa videos bondage uploa videos sharp montreal simons underwear montreal simons underwear station nude female reference photos nude female reference photos have lindsay lohan nude sunbathing lindsay lohan nude sunbathing this victorian romance fabric victorian romance fabric motion gay tweeks gay tweeks double big boobs parent directory big boobs parent directory circle world wide voyeur club world wide voyeur club branch female orgasm withholding female orgasm withholding equate nude amateur housewives nude amateur housewives natural deep fisting girls deep fisting girls complete denim chicks denim chicks just classroom spanking classroom spanking meat growing zuccini in pussy growing zuccini in pussy through pornstar jackie daniels silk pornstar jackie daniels silk liquid naked in michigan naked in michigan seed gum drop titty gum drop titty experience british topless model british topless model milk bannister road webcam bannister road webcam clock tweaks for hercules webcam tweaks for hercules webcam thick gymnasts butts gymnasts butts double lieu pink nude lieu pink nude held kinky housewives free kinky housewives free leg porn channel frequencies porn channel frequencies foot tatu topless tatu topless war regina transvestite regina transvestite single nikki grahame naked nikki grahame naked food amateur catholic membership application amateur catholic membership application pitch absolutely free phone sex absolutely free phone sex lead japanese upskirt galleries japanese upskirt galleries new masturbate for peace forum masturbate for peace forum spell love suicide at sonezaki love suicide at sonezaki weather playboys big titted women playboys big titted women sleep liberty mosaic knob liberty mosaic knob cover breast pump milk breast pump milk capital stacey ebony big tits stacey ebony big tits grand transgender surgeon transgender surgeon require kate price naked kate price naked use nude themes sony s710 nude themes sony s710 danger brooke hogan booty brooke hogan booty rub nude brahmin girls nude brahmin girls shoe cowley beauty behavior cowley beauty behavior left alicia machado xxx alicia machado xxx machine full beaver moon full beaver moon stream girls with round boobs girls with round boobs danger hentai and anime hentai and anime major mules barnyard femdom mules barnyard femdom swim amateur men stripping amateur men stripping charge nick wheeler gay nick wheeler gay populate condom manufacters condom manufacters won't breast lift no procedures breast lift no procedures earth subspace bdsm subspace bdsm sat dave s a whore game dave s a whore game that very young teenage porn very young teenage porn stick independant escorts vegas independant escorts vegas stream longer sex techniques longer sex techniques separate emily aston nude emily aston nude fresh naked teeneis naked teeneis reply lap dance ejaculation lap dance ejaculation sit breast cancer afghan patterns breast cancer afghan patterns river jill clayburgh nude pictures jill clayburgh nude pictures law indian maid lesbian indian maid lesbian wall bondage hazing stories bondage hazing stories soil herbal prostate erection herbal prostate erection area quality sperms quality sperms place round nude ass round nude ass piece mom s anal adventure astrid mom s anal adventure astrid other mellissa midwest getting fucked mellissa midwest getting fucked horse artificial female vagina artificial female vagina capital lesbian anal tounging lesbian anal tounging imagine my wife s erotic friend my wife s erotic friend million convert to ipod mpg convert to ipod mpg play alex pantos naked alex pantos naked oxygen johnny loves rosie johnny loves rosie ready black cock bull black cock bull baby strapon aunt strapon aunt number texas drag strips texas drag strips help couple jugs of brandy couple jugs of brandy still geelong college upskirt geelong college upskirt were savanah pornstar savanah pornstar why virgin mary of jerusalem virgin mary of jerusalem fall usual girls nude usual girls nude stick tranie suck cock tranie suck cock also bonnie bedelia topless bonnie bedelia topless they little girl sex tape little girl sex tape finish emu oil and impotence emu oil and impotence break bbw youtube bbw youtube go katie holm boobs katie holm boobs shout asians give good blowjobs asians give good blowjobs stretch michele merkin nipples michele merkin nipples subtract male ay porn male ay porn use sex chatrooms free sex chatrooms free mother international teen models international teen models box avant making good love avant making good love depend mom in rio porn mom in rio porn student pornstar debie diamond pornstar debie diamond would transsexual models transsexual models wave nude beache videos nude beache videos are arabic love note arabic love note original men modeling in underwear men modeling in underwear ocean alyssa jane cook nude alyssa jane cook nude rise female escort sites female escort sites live mechanic sex with car mechanic sex with car jump worldsex fuck worldsex fuck heat traci helfer nude traci helfer nude main transvestites tied up transvestites tied up double big cock autofellatio big cock autofellatio people plus size beauty pageants plus size beauty pageants large real sex wecams real sex wecams down sexy teen nonnude sexy teen nonnude sheet jinger santos naked pic jinger santos naked pic sharp strapon nurses strapon nurses leave mature french mature french glass young grile in sex young grile in sex allow cheerleaders force fuck cheerleaders force fuck type learn how to deepthroat learn how to deepthroat skill bedwetting and enuresis resources bedwetting and enuresis resources even hot naked china girl hot naked china girl pick adult free thumbnail hardcore adult free thumbnail hardcore until nude garbage men nude garbage men fell virgin mobile pre pay virgin mobile pre pay on sex offender notifications sex offender notifications winter beauty products toxin beauty products toxin pretty gay asian pages personals gay asian pages personals slip indian ass sluts indian ass sluts brought relaxation training children teens relaxation training children teens gather japanese erotic cartoon japanese erotic cartoon yellow acts teens disaster help acts teens disaster help question home squirt photo home squirt photo company tgp free movies tgp free movies through nudism in croatia nudism in croatia chick existential counseling theory existential counseling theory only teen girls costum teen girls costum early teenei teen sex teenei teen sex begin pics free galleries xxx pics free galleries xxx town ebony cumshot videos ebony cumshot videos boat holly weber nude holly weber nude object college dorm striptease college dorm striptease again cum tits free movies cum tits free movies wind kagome sango hentai pics kagome sango hentai pics crop self portrait naked self portrait naked company porn blowjob contests porn blowjob contests tree solid silicone sex doll solid silicone sex doll govern alt sex stories asst alt sex stories asst clothe milfs stockings milfs stockings effect black girl shreveport nude black girl shreveport nude after wedding strip wedding strip safe wives secret pics wives secret pics safe amateur submitted adult movies amateur submitted adult movies bear longdistance love longdistance love arm dawn marie naked dawn marie naked invent paintball girls nude paintball girls nude coast rodeo song jerk rodeo song jerk off pooka fetish pooka fetish broke porn on ps3 porn on ps3 race leathermen sex movies leathermen sex movies million teen girls spanking teen girls spanking decide summary farewell my lovely summary farewell my lovely cell tits for sale tits for sale half audio induced orgasm audio induced orgasm people paris nude paris nude third rfee hardcor porn rfee hardcor porn led sam shepard love story sam shepard love story valley nude girls dressing rooms nude girls dressing rooms at like nude bod like nude bod charge upskirt juliet huddy upskirt juliet huddy part vintage celeb nudes vintage celeb nudes flow my babysitter fucked my babysitter fucked or amature teen anal sex amature teen anal sex buy rustic log swing rustic log swing gun carmella bing cumshot carmella bing cumshot stick about gay s web about gay s web card tranny belvidere il tranny belvidere il stay quick hentai games quick hentai games have brazilin shemales brazilin shemales ocean nudity in advertising nudity in advertising ice nude pussey nude pussey bottom suck mt cock suck mt cock always twin relationship studies twin relationship studies with licking womens asses licking womens asses shout spanking autism discipline spanking autism discipline up sissy toons sissy toons wait masochism hentai masochism hentai die trends in counseling trends in counseling press mature hairy women mature hairy women page squirt neighborhood upgrade code squirt neighborhood upgrade code match nike cameltoe nike cameltoe wind latinas bien buenas latinas bien buenas certain frr sex clips frr sex clips chief foreskin masturbate foreskin masturbate could black old moms fucked black old moms fucked hair cardiff university bdsm club cardiff university bdsm club meet bang bros pinky bang bros pinky notice roasted chick peas roasted chick peas ran niacin and sex niacin and sex baby gang bang search engines gang bang search engines value white tits daughter white tits daughter decide paris texas family counseling paris texas family counseling get flashing nudist sex photo flashing nudist sex photo then pissing girls pics pissing girls pics head boobs teens boobs teens wild naomi watts lesbian clip naomi watts lesbian clip began bbw exxxtreme bbw exxxtreme west hidden gay cam hidden gay cam numeral aphrodisiac food recipe aphrodisiac food recipe seat small teen gets fucked small teen gets fucked neighbor naked lezbians using strapons naked lezbians using strapons wrote kobe tai sex scene kobe tai sex scene piece teflon adhesive strips teflon adhesive strips row naked girls in southaven naked girls in southaven was small penis porn pictures small penis porn pictures gentle shaved little pussy shaved little pussy full mpg 2002 kia spectra mpg 2002 kia spectra direct paula white s boobs paula white s boobs make mega cumshot tgp mega cumshot tgp leave bondage request bondage request before boy mutual masturbation boy mutual masturbation there reese witherspoon doing porn reese witherspoon doing porn loud z cup breast z cup breast insect ar15 223 nylon bandolier ar15 223 nylon bandolier depend mature mom tits mature mom tits rest ibm webcam drivers ibm webcam drivers love ooohh schoolgirl list ooohh schoolgirl list is vaginal pressure vaginal pressure drink hot naked latin ladies hot naked latin ladies shoe panasonic webcam panasonic webcam substance listing of porn actresses listing of porn actresses twenty susie amy naked susie amy naked current boobs teens boobs teens your tenie pussy tenie pussy fly animated lesbian myspace layouts animated lesbian myspace layouts control alyssa jane cook nude alyssa jane cook nude big bondage forced group sex bondage forced group sex character exposed dirty love letters exposed dirty love letters spoke petite hentai video galleries petite hentai video galleries get femdom 24 7 femdom 24 7 organ twink personals twink personals fish high school seinor sex high school seinor sex solution sex gallery and story sex gallery and story lift ebony dog fucking ebony dog fucking might counseling sessions counseling sessions island downlaod free amature porn downlaod free amature porn home myspace sex stories myspace sex stories was monster cock mayhem monster cock mayhem cause jaime roca lesbian jaime roca lesbian offer ladies escort photos ladies escort photos material gay stripper video gay stripper video eat anal fucking samples movies anal fucking samples movies roll gag bang creampies gag bang creampies hunt bangbros anal sex bangbros anal sex ear private dancer porn movie private dancer porn movie pitch buying cheap Viagra online in uk
EOF; exit; } # Read file page.html if (file_exists("$up_dir/what/$what/page.html")){ $read_file ="$up_dir/what/$what/page.html"; } if (file_exists("$up_dir/what/$what/page.htm")){ $read_file ="$up_dir/what/$what/page.htm"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $page_html .= fgets($fh, 4096); } fclose ($fh); # Read file preview.html if ($from_check_required != "1") { if (file_exists("$up_dir/what/$what/preview.html")){ $read_file ="$up_dir/what/$what/preview.html"; } if (file_exists("$up_dir/what/$what/preview.htm")){ $read_file ="$up_dir/what/$what/preview.htm"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $preview_html .= fgets($fh, 4096); } fclose ($fh); } # Read file form.html if (file_exists("$up_dir/what/$what/form.html")){ $read_file ="$up_dir/what/$what/form.html"; } if (file_exists("$up_dir/what/$what/form.htm")){ $read_file ="$up_dir/what/$what/form.htm"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $form_html .= fgets($fh, 4096); } fclose ($fh); $array = explode("\n", $get_data); foreach ($array as $val) { $get_info = preg_split ("/\|/", $val) ; $get_name = $get_info[0]; $get_value = $get_info[1]; if ($get_name != "" && $get_value !="" && $val !="") { $form_html = str_replace("{'$get_name'}", "$get_value", $form_html); $preview_html = str_replace("{'$get_name'}", "$get_value", $preview_html); $page_html = str_replace("{'$get_name'}", "$get_value", $page_html); $form_html = ereg_replace("\\{'$get_name" . "_" . "$get_value" . "_" . "checked'\\}", "checked", $form_html); $form_html = ereg_replace("\\{'$get_name" . "_" . "$get_value" . "_" . "selected'\\}", "selected", $form_html); $form_html = ereg_replace("\\{'$get_value" . "_" . "$get_name" . "_" . "checked'\\}", "checked", $form_html); $form_html = ereg_replace("\\{'$get_value" . "_". "$get_name" . "_" . "selected'\\}", "selected", $form_html); $form_html = ereg_replace("\\{'DISPLAY_ERROR'}", "$error_message", $form_html); } } $preview_html = str_replace("['br']", "
", $preview_html); $page_html = str_replace("NO_BLANK", "", $page_html); $form_html = str_replace("['br']", "\n", $form_html); $page_html = str_replace("{'DISPLAY_BANNER'}", $print_banner, $page_html); $page_html = str_replace("{'DISPLAY_REFER'}", "", $page_html); $page_html = str_replace("{'WHAT'}", $what, $page_html); $page_html = str_replace("{'SCRIPT_NAME'}", $script_url, $page_html); $page_html = str_replace("{'DISPLAY_PREVIEW'}", $preview_html."

", $page_html); $page_html = str_replace("{'DISPLAY_FORM'}", "\n$form_html", $page_html); $page_html = str_replace("{'DISPLAY_THANKYOU'}", "", $page_html); $page_html = str_replace("{'DATE'}", $date_create, $page_html); $page_html = str_replace("{'TIME'}", $time, $page_html); $page_html = str_replace("{'USER_IP'}", $REMOTE_ADDR, $page_html); $page_html = str_replace("{'SYSTEM'}", $HTTP_USER_AGENT, $page_html); $page_html = str_replace("{'MY_SITE_URL'}", $mysite, $page_html); $page_html = preg_replace('/\{\'\w*?\'\}/', '', $page_html); # Print Upload Form ---------------------------- if (file_exists("$up_dir/what/$what/attach.txt")){ $fh = fopen ("$up_dir/what/$what/attach.txt", "r"); while (!feof ($fh)) { $check_attach_txt .= fgets($fh, 4096); } fclose ($fh); $get_info = preg_split ("/\|/", $check_attach_txt) ; $num_file_att = $get_info [0] ; $max_upload_size = $get_info [1] ; $keep_file = $get_info [2] ; $not_allow_type = $get_info [3] ; $adv = $get_info [4] ; $adv_error = $get_info [5] ; $not_allow_type2 = $not_allow_type; $not_allow_type2 = str_replace(" ","::",$not_allow_type2); for ($x=1;$x<=$num_file_att;$x++) { $js .=<< var field_name_string ="$not_allow_type2"; var nothing =""; var att_req = "$adv"; function IsEmptyField(TextObj){return IsEmptyStr(TextObj.value)} function IsEmptyStr(Str){var retval = true;for (var i=0; i < Str.length; ++i){ var c = Str.charAt(i);if (c != ' ' && c != '\\t') retval = false;} return retval; } function checkform() { nothing ="0" if (IsEmptyField(document.form1.file1) && att_req=="yes"){alert ("File Attachment 1 can not be left blank. Please check again");document.form1.file1.focus();return false;} var field_name_string_array = field_name_string.split("::"); for (var loop=0; loop < field_name_string_array.length; loop++){ $js } if (nothing =="1") { alert("File Attachment contains illegal File Type '$not_allow_type' Please check again"); nothing ="0"; return false; } document.form1.step.value = "2"; document.form1.submit(); } EOL; } # End if upload $print_javascript = javascript_code(); print "$page_html\n$print_javascript\n$javascript2" ; exit; } #-------------------------------------------------------------- function check_required() { global $get_data2,$error_message,$from_check_required,$temp_file,$subject,$script_url,$HTTP_REFERER,$print_banner,$what,$get_data,$mysite,$script_url,$uselock,$up_dir,$up_banner_dir,$which_mail,$SMTP_SERVER,$mail_log,$your_email,$javascript,$date_create,$time,$REMOTE_ADDR,$HTTP_USER_AGENT; # Check field require $read_file ="$up_dir/what/$what/form_check.txt"; $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $get_form_check .= fgets($fh, 4096); } fclose ($fh); $form_check = explode("\n", $get_form_check); $form_data = explode("\n", $get_data2); $count_form_check = 0 ; $count_data_radio = 0; foreach ($form_check as $val) { if ($val != "") { $count_form_check++; } $get_info = preg_split ("/\|/", $val) ; $form_name = $get_info[0] ; $form_require = $get_info[1] ; $error_message = $get_info[2] ; $form_require = str_replace(" ", "", $form_require) ; // Make sure no space foreach ($form_data as $val2) { $get_info2 = preg_split ("/\|/", $val2) ; $form_name_data = $get_info2[0] ; $form_value = $get_info2[1] ; if ($form_name_data != "" && $form_value !="") { if($form_name =="{'$form_name_data'}"){ if ($val2 != "") { $count_data_radio++; } $mix_data .= "$form_require|$error_message|$form_value\n"; $data_radio .= "$form_name|$form_require|$error_message\n"; } } } } $array = explode("\n", $mix_data); foreach ($array as $val) { $get_info = preg_split ("/\|/", $val) ; $form_require = $get_info[0] ; $error_message = $get_info[1] ; $form_value = $get_info[2] ; # Check NO_BLANK if ($form_require =="NO_BLANK" && $form_value == "NO_BLANK") { $from_check_required ="1"; step_1(); exit; } # Check EMAIL_CHECK if ($form_require =="EMAIL_CHECK" && $form_value != "NO_BLANK") { $get_mail_info = preg_split ("/@/", $form_value) ; if (!ereg ("^.+@.+\\..+$", $form_value) || eregi("[/!|/#|/ |/$|/%|/^|/&|/*|/?|/,|/<|/>|/;|/:|/`|/~|/(|/)|/{|/}|/\[]", $form_value) || preg_match("/]/",$form_value) || count($get_mail_info)>=3) { $from_check_required ="1"; step_1(); exit; } } # Check NUMBER_ONLY if ($form_require =="NUMBER_ONLY" && $form_value != "NO_BLANK") { if (!is_numeric($form_value)){ $from_check_required ="1"; step_1(); exit; } } # Check PHONE_ONLY $form_value_phone = $form_value; $form_value_phone = str_replace("-", "", $form_value_phone); $form_value_phone = str_replace("\.", "", $form_value_phone); $form_value_phone = str_replace(" ", "", $form_value_phone); $form_value_phone = str_replace("_", "", $form_value_phone); $form_value_phone = str_replace("/", "", $form_value_phone); $form_value_phone = str_replace("[", "", $form_value_phone); $form_value_phone = str_replace("]", "", $form_value_phone); $form_value_phone = str_replace("(", "", $form_value_phone); $form_value_phone = str_replace(")", "", $form_value_phone); if ($form_require =="PHONE_ONLY" && $form_value != "NO_BLANK") { if (!is_numeric($form_value_phone)){ $from_check_required ="1"; step_1(); exit; } } } # End foreach # Check for Radio button if ($count_form_check != $count_data_radio) { $array = explode("\n", $data_radio); foreach ($array as $val) { if (preg_match ("/$val/i", "$get_form_check") && $val !="") { $get_form_check = str_replace($val, "", $get_form_check); } } $get_form_check = str_replace("\n", "", $get_form_check); if ($get_form_check != ""){ $get_info = preg_split ("/\|/", $get_form_check) ; $error_message = $get_info [2]; $from_check_required ="1"; step_1(); exit; } } $error_message =""; } # ---------------------------------------------------------------- function step_2() { global $upload_dir,$HTTP_POST_FILES,$get_data2,$error_message,$from_check_required,$temp_file,$subject,$script_url,$HTTP_REFERER,$print_banner,$what,$get_data,$mysite,$script_url,$uselock,$up_dir,$up_banner_dir,$which_mail,$SMTP_SERVER,$mail_log,$your_email,$javascript,$date_create,$time,$REMOTE_ADDR,$HTTP_USER_AGENT; check_required(); if ($ch_thank != "1") { if (file_exists("$up_dir/what/$what/attach.txt")){ # Send mail Attachment $fh = fopen ("$up_dir/what/$what/attach.txt", "r"); while (!feof ($fh)) { $check_attach_txt .= fgets($fh, 4096); } fclose ($fh); $get_info = preg_split ("/\|/", $check_attach_txt) ; $num_file_att = $get_info [0] ; $max_upload_size = $get_info [1] ; $keep_file = $get_info [2] ; $not_allow_type = $get_info [3] ; $adv = $get_info [4] ; $adv_error = $get_info [5] ; # Check file size $file_upload_name = $HTTP_POST_FILES['file1']['name']; $file_upload_size = $HTTP_POST_FILES['file1']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file2']['name']; $file_upload_size = $HTTP_POST_FILES['file2']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file3']['name']; $file_upload_size = $HTTP_POST_FILES['file3']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file4']['name']; $file_upload_size = $HTTP_POST_FILES['file4']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file5']['name']; $file_upload_size = $HTTP_POST_FILES['file5']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file6']['name']; $file_upload_size = $HTTP_POST_FILES['file6']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file7']['name']; $file_upload_size = $HTTP_POST_FILES['file7']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file8']['name']; $file_upload_size = $HTTP_POST_FILES['file8']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file9']['name']; $file_upload_size = $HTTP_POST_FILES['file9']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } $file_upload_name = $HTTP_POST_FILES['file10']['name']; $file_upload_size = $HTTP_POST_FILES['file10']['size']; if ($file_upload_size > $max_upload_size){ print "_"; exit; } # Upload file to server first $for_att =""; $path_file = "$upload_dir/" . $HTTP_POST_FILES['file1']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file1']['name']; } if ($HTTP_POST_FILES['file1']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file1']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file2']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file2']['name']; } if ($HTTP_POST_FILES['file2']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file2']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file3']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file3']['name']; } if ($HTTP_POST_FILES['file3']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file3']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file4']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file4']['name']; } if ($HTTP_POST_FILES['file4']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file4']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" . $HTTP_POST_FILES['file5']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file5']['name']; } if ($HTTP_POST_FILES['file5']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file5']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" . $HTTP_POST_FILES['file6']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file6']['name']; } if ($HTTP_POST_FILES['file6']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file6']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file7']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file7']['name']; } if ($HTTP_POST_FILES['file7']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file7']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file8']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file8']['name']; } if ($HTTP_POST_FILES['file8']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file8']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file9']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file9']['name']; } if ($HTTP_POST_FILES['file9']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file9']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } $path_file = "$upload_dir/" .$HTTP_POST_FILES['file10']['name']; if (file_exists("$path_file")){ $rand_file_id = substr(md5(uniqid(rand(),1)), 0, 4); $path_file = "$upload_dir/$rand_file_id"."_" . $HTTP_POST_FILES['file10']['name']; } if ($HTTP_POST_FILES['file10']['size'] > 0){ move_uploaded_file($HTTP_POST_FILES['file10']['tmp_name'], $path_file ); $for_att .="$path_file\n"; } } # TIME & SYSTEM INFO $today = getdate(); $month = $today['month']; $mday = $today['mday']; $year = $today['year']; $hour = $today['hours']; $min = $today['minutes']; $date_create ="$month $mday, $year"; $time ="$hour:$min"; # Prepare to send email # Read file page.html if (file_exists("$up_dir/what/$what/page.html")){ $read_file ="$up_dir/what/$what/page.html"; } if (file_exists("$up_dir/what/$what/page.htm")){ $read_file ="$up_dir/what/$what/page.htm"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $page_html .= fgets($fh, 4096); } fclose ($fh); # Read file email_msg_webmaster.html (or .htm or .txt) if (file_exists("$up_dir/what/$what/email_msg_webmaster.html")){ $read_file ="$up_dir/what/$what/email_msg_webmaster.html"; } if (file_exists("$up_dir/what/$what/email_msg_webmaster.htm")){ $read_file ="$up_dir/what/$what/email_msg_webmaster.htm"; } if (file_exists("$up_dir/what/$what/email_msg_webmaster.txt")){ $read_file ="$up_dir/what/$what/email_msg_webmaster.txt"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $email_webmaster .= fgets($fh, 4096); } fclose ($fh); # Read file email_msg_user.html (or .htm or .txt) if (file_exists("$up_dir/what/$what/email_msg_user.html")){ $read_file ="$up_dir/what/$what/email_msg_user.html"; } if (file_exists("$up_dir/what/$what/email_msg_user.htm")){ $read_file ="$up_dir/what/$what/email_msg_user.htm"; } if (file_exists("$up_dir/what/$what/email_msg_user.txt")){ $read_file ="$up_dir/what/$what/email_msg_user.txt"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $email_user .= fgets($fh, 4096); } fclose ($fh); # Read file thankyou.html (or .htm) if (file_exists("$up_dir/what/$what/thankyou.html")){ $read_file ="$up_dir/what/$what/thankyou.html"; } if (file_exists("$up_dir/what/$what/thankyou.htm")){ $read_file ="$up_dir/what/$what/thankyou.htm"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $thankyou_html .= fgets($fh, 4096); } fclose ($fh); # Read file email_form_field.txt if (file_exists("$up_dir/what/$what/email_form_field.txt")){ $read_file ="$up_dir/what/$what/email_form_field.txt"; } $fh = fopen ($read_file, "r"); while (!feof ($fh)) { $email_form_field .= fgets($fh, 4096); } fclose ($fh); $array = explode("\n", $get_data); foreach ($array as $val) { $get_info = preg_split ("/\|/", $val) ; $get_name = $get_info[0]; $get_value = $get_info[1]; if ($get_name != "" && $get_value !="") { $email_webmaster = str_replace("{'$get_name'}", "$get_value", $email_webmaster); $email_user = str_replace("{'$get_name'}", "$get_value", $email_user); $thankyou_html = str_replace("{'$get_name'}", "$get_value", $thankyou_html); $email_form_field = str_replace("{'$get_name'}", "$get_value", $email_form_field); } } $email_form_field = str_replace(" ", "", $email_form_field); $email_form_field = str_replace("{'", "", $email_form_field); $email_form_field = str_replace("'}", "", $email_form_field); $email_form_field = strtolower($email_form_field); $array_user_email = explode("\n", $email_form_field); if (file_exists("$up_dir/what/$what/email_msg_webmaster.html")){ $email_html = 1 ; } if (file_exists("$up_dir/what/$what/email_msg_webmaster.htm")){ $email_html = 2 ; } if ($email_html == 1 || $email_html == 2) { $email_webmaster = str_replace("['br']", "
", $email_webmaster); } else{ $email_webmaster = str_replace("['br']", "\n", $email_webmaster); } if (file_exists("$up_dir/what/$what/email_msg_user.html")){ $email_html2 = 1 ; } if (file_exists("$up_dir/what/$what/email_msg_user.htm")){ $email_html2 = 2 ; } if ($email_html2 == 1 || $email_html2 == 2) { $email_user = str_replace("['br']", "
", $email_user); } else{ $email_user = str_replace("['br']", "\n", $email_user); } $email_webmaster = str_replace("{'DATE'}", "$date_create", $email_webmaster); $email_webmaster = str_replace("{'TIME'}", "$time", $email_webmaster); $email_webmaster = str_replace("{'USER_IP'}", "$REMOTE_ADDR", $email_webmaster); $email_webmaster = str_replace("{'SYSTEM'}", "$HTTP_USER_AGENT", $email_webmaster); $email_webmaster = str_replace("{'MY_SITE_URL'}", "$mysite", $email_webmaster); $email_user = str_replace("{'DATE'}", "$date_create", $email_user); $email_user = str_replace("{'TIME'}", "$time", $email_user); $email_user = str_replace("{'USER_IP'}", "$REMOTE_ADDR", $email_user); $email_user = str_replace("{'SYSTEM'}", "$HTTP_USER_AGENT", $email_user); $email_user = str_replace("{'MY_SITE_URL'}", "$mysite", $email_user); $page_html = str_replace("{'DISPLAY_BANNER'}", "$print_banner", $page_html); $page_html = str_replace("{'DISPLAY_REFER'}", "", $page_html); $page_html = str_replace("{'WHAT'}", "$what", $page_html); $page_html = str_replace("{'SCRIPT_NAME'}", "$script_url", $page_html); $page_html = str_replace("{'DISPLAY_PREVIEW'}", "", $page_html); $page_html = str_replace("{'DISPLAY_FORM'}", "", $page_html); $page_html = str_replace("{'DISPLAY_THANKYOU'}", "$thankyou_html", $page_html); $page_html = str_replace("{'DATE'}", "$date_create", $page_html); $page_html = str_replace("{'TIME'}", "$time", $page_html); $page_html = str_replace("{'USER_IP'}", "$REMOTE_ADDR", $page_html); $page_html = str_replace("{'SYSTEM'}", "$HTTP_USER_AGENT", $page_html); $page_html = str_replace("{'MY_SITE_URL'}", "$mysite", $page_html); # Remove {'xxx'} out off $page_html $page_html = preg_replace('/\{\'\w*?\'\}/', '', $page_html); # Remove {'xxx'} out off $email_webmaster $email_webmaster = preg_replace('/\{\'\w*?\'\}/', '', $email_webmaster); # Remove {'xxx'} out off $email_user $email_user = preg_replace('/\{\'\w*?\'\}/', '', $email_user); print "$page_html" ; # Save email address to $mail_log file if (!file_exists("$up_dir/$mail_log")){ $fh = fopen ("$up_dir/$mail_log","w") ; flock( $fh, LOCK_EX ); // exclusive lock fwrite($fh, "$your_email\n"); flock( $fh, LOCK_UN ); // release the lock fclose($fh); } $fh = fopen ("$up_dir/$mail_log", "r"); while (!feof ($fh)) { $mail_list .= fgets($fh, 4096); } fclose ($fh); $array_list_email = explode("\n", $mail_list); $array_email_form_field = explode("\n", $email_form_field); foreach ($array_list_email as $email_lines){ $email_lines = str_replace("\n","",$email_lines); if ($email_lines != ""){ $get_mail_info = preg_split ("/@/", $email_lines) ; if (!ereg ("^.+@.+\\..+$", $email_lines) || eregi("[/!|/#|/ |/$|/%|/^|/&|/*|/?|/,|/<|/>|/;|/:|/`|/~|/(|/)|/{|/}|/\[]", $email_lines) || preg_match("/]/",$email_lines) || count($get_mail_info)>=3) { $error = 1; } else{ $list_log .= "$email_lines\n"; } } } # End foreach $list_log .="$email_form_field\n"; //Remove duplicate email $array_list_email = explode ("\n",$list_log); $unique_email = array_unique($array_list_email); $fh = fopen("$up_dir/$mail_log","w"); if ($fh){ flock( $fh, LOCK_EX); foreach ($unique_email as $val){ $val = str_replace("\n","",$val); if ($val != ""){ fwrite($fh,"$val\n"); } } } flock( $fh, LOCK_UN); # Send email here ------------------------------------------------------------------------------ if (file_exists("$up_dir/what/$what/attach.txt")){ # Send mail Attachment $fh = fopen ("$up_dir/what/$what/attach.txt", "r"); while (!feof ($fh)) { $check_attach_txt .= fgets($fh, 4096); } fclose ($fh); $get_info = preg_split ("/\|/", $check_attach_txt) ; $num_file_att = $get_info [0] ; $max_upload_size = $get_info [1] ; $keep_file = $get_info [2] ; $not_allow_type = $get_info [3] ; $adv = $get_info [4] ; $adv_error = $get_info [5] ; $fh = fopen ("$up_dir/what/$what/send_to.txt", "r"); while (!feof ($fh)) { $webmaster_mail_list .= fgets($fh, 4096); } fclose ($fh); $array_webmaster_email = explode("\n", $webmaster_mail_list); $array_for_att = explode("\n", $for_att); foreach ($array_webmaster_email as $val) { if ($val != ""){ if ($email_html == 1 || $email_html == 2) { # HTML FORMAT Send_Mail_Att($array_user_email[0],$val,$subject. " (For webmaster)","HTML",$array_for_att,$email_webmaster); } else{ # TEXT FORMAT Send_Mail_Att($array_user_email[0],$val,$subject. " (For webmaster)","TEXT",$array_for_att,$email_webmaster); } } } # Check Keep file YES NO if ($keep_file == "no"){ # File Attachment will be deleted foreach ($array_for_att as $value){ if ($value != ""){ unlink ("$value"); } } } } else{ # Send email to Webmaster ((normal - no attachment)) $fh = fopen ("$up_dir/what/$what/send_to.txt", "r"); while (!feof ($fh)) { $webmaster_mail_list .= fgets($fh, 4096); } fclose ($fh); $array_webmaster_email = explode("\n", $webmaster_mail_list); foreach ($array_webmaster_email as $val) { if ($val != ""){ if ($email_html == 1 || $email_html == 2) { mail($val, $subject. " (For webmaster)", $email_webmaster, "From: $array_user_email[0]\r\nContent-Type: text/html\r\nX-mailer: PHP/") ; } else{ mail($val, $subject. " (For webmaster)", $email_webmaster, "From: $array_user_email[0]\r\nContent-Type: text/plain\r\nX-mailer: PHP/" ) ; } } } } # end if attch.txt # Send email to User (normal - no attachment) foreach ($array_user_email as $val) { if ($val != ""){ if ($email_html2 == 1 || $email_html2 == 2) { mail($val, $subject, $email_user, "From: $array_webmaster_email[0]\r\nContent-Type: text/html\r\nX-mailer: PHP/") ; } else{ mail($val, $subject, $email_user, "From: $array_webmaster_email[0]\r\nContent-Type: text/plain\r\nX-mailer: PHP/" ) ; } } } exit; } # End if ($ch_thank != "1") { } # End function step_2() # ---------------------------------------------------------------- function Send_Mail_Att($From,$To,$Subject,$Format,$File_Att,$Email_Mess){ global $upload_dir; $OB="----=_OuterBoundary_000"; $IB="----=_InnerBoundery_001"; $headers ="MIME-Version: 1.0\r\n"; $headers.="From: ".$From."\n"; $headers.="To: ".$To."\n"; $headers.="Reply-To: ".$From."\n"; $headers.="X-Priority: 1\n"; $headers.="X-MSMail-Priority: High\n"; $headers.="X-Mailer: CGI2K.COM @Feedback PHP Mailer\n"; $headers.="Content-Type: multipart/mixed;\n\tboundary=\"".$OB."\"\n"; $Msg ="This is a multi-part message in MIME format.\n"; $Msg.="\n--".$OB."\n"; $Msg.="Content-Type: multipart/alternative;\n\tboundary=\"".$IB."\"\n\n"; if ($Format == "TEXT"){ $Msg.="\n--".$IB."\n"; $Msg.="Content-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n"; $Msg.="Content-Transfer-Encoding: quoted-printable\n\n"; $Msg.=$Email_Mess."\n\n"; } else{ $Msg.="\n--".$IB."\n"; $Msg.="Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n"; $Msg.="Content-Transfer-Encoding: base64\n\n"; $Msg.=chunk_split(base64_encode($Email_Mess))."\n\n"; } $Msg.="\n--".$IB."--\n"; if($File_Att){ foreach($File_Att as $File_Att_val){ if ($File_Att_val != ""){ $patharray = explode ("/", $File_Att_val); $FileName=$patharray[count($patharray)-1]; $Msg.= "\n--".$OB."\n"; $Msg.="Content-Type: application/octetstream;\n\tname=\"".$FileName."\"\n"; $Msg.="Content-Transfer-Encoding: base64\n"; $Msg.="Content-Disposition: attachment;\n\tfilename=\"".$FileName."\"\n\n"; $fd=fopen ($File_Att_val, "r"); $FileContent=fread($fd,filesize($File_Att_val)); fclose ($fd); $FileContent=chunk_split(base64_encode($FileContent)); $Msg.=$FileContent; $Msg.="\n\n"; } } } $Msg.="\n--".$OB."--\n"; mail($To,$Subject,$Msg,$headers); } # ----------------------------------------------- END CODE ----------------------------------------------- ?>