Ultrashock Forums > Flash > Flash Newbie
Why formmail/SWF/Java is not processing on new server?

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Why formmail/SWF/Java is not processing on new server?
Old 2009-06-07

I am not a developer or designer. But recently, I had a friend of mine transfer his site to my hosting account

His site is kevindefro dot com

Anyways, on contact page which is a formmail.swf, when forms are filled out, it opens some jave error about email and connects to an unknown error page in hostgator, etc instead of saying "thank you for your submission"

This worked perfectly on previous server and all i did was transfer all the files to new server so i am curious if this is the file issue or a server issue

The swf files are actually working fine when they are tested but they may be issue with Java or other PHP scripting

I am including the codes for different files so if anyone can help, please!!

Also, we dont have fla files anymore just the swf files so i can't include the codes from that unless someone knows a good open source swf file opener to see and i can post the codes in here--


Common.js

Code:
function preview(id,w,h) {
	h = h + 65;
	window.open('loader.cfm?id='+id,id,'resizable=yes,scrollbars=no,status=0,width='+w+',height='+h);
}

function adminpreview(id,w,h) {
	h = h + 65;
	window.open('../loader.cfm?id='+id,id,'resizable=yes,scrollbars=no,status=0,width='+w+',height='+h);
}

function download(id,type) {
	window.open('macdownload.cfm?id='+id+'&type='+type,id,'resizable=yes,scrollbars=no,status=0,width=450,height=150');
}

function mem() {
	window.open('mem.cfm','mem','resizable=no,scrollbars=yes,status=0,width=450,height=460');
}

function fcmx() {
	window.open('http://flashcomponents.net/client/loadflash.cfm','fcmx','resizable=no,scrollbars=no,status=0,width=600,height=470');
}

function refresh(){
	window.location.href="components.cfm?nav=2&cat="+document.setcategory.category.value+"&per="+document.setcategory.perpage.value;
}

function checkForm(){
	var formCheck = "passed";
	var FrmLen = document.mailing.elements.length;
	for (var i = 0; i < FrmLen; i++){
		if (document.mailing.elements[i].value==""){
			formCheck = "failed";	
		}
	}

	if (formCheck=="failed"){
		alert('fill out a valid email address, please...');
	}else{
		if (checkEmail(document.mailing.elements['address'].value)){
			eval(location.replace("m.cfm?j=1&a="+(document.mailing.elements['address'].value)));
		}
	}
}

function checkEmail(emailStr) {
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);

	if (matchArray==null) {
		alert("email address has invalid format...");
		return false;
	}

	var user=matchArray[1]
	var domain=matchArray[2]

	// See if "user" is valid 
	if (user.match(userPat)==null) {
		alert("no user filled out!");
	    return false;
	}

	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
	    // this is an IP address
		  for (var i=1;i<=4;i++) {
		    if (IPArray[i]>255) {
			alert("IP address invalid!");
			return false;
		    }
	    }
	    return true;
	}

	// Domain is symbolic name
	var domainArray=domain.match(domainPat);
	if (domainArray==null) {
		alert("no domain filled out!");
	    return false;
	}

	var atomPat=new RegExp(atom,"g");
	var domArr=domain.match(atomPat);
	var len=domArr.length;
	if (domArr[domArr.length-1].length<2 || 
	    domArr[domArr.length-1].length>6) {
	   // the address must end in a two letter or six (new TLD's!) letter word.
	   alert("domain is invalid!");   
	   return false;
	}

	// Make sure there's a host name preceding the domain.
	if (len<2) {
	   alert("no hostname filled out!");
	   return false;
	}

	// If we've gotten this far, everything's valid!
	return true;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		preview_over = newImage("img/preview_over.gif");
		mem_over = newImage("img/mem-icon_over.gif");
		zip_over = newImage("img/zip-icon_over.gif");
		box_over = newImage("img/boxje_preview.gif");
		box_new_over = newImage("img/boxje_new_preview.gif");
		box_featured_over = newImage("img/boxje_featured_preview.gif");
		box_featured_dark_over = newImage("img/boxje_featured_dark_preview.gif");
		preloadFlag = true;
	}
}

function doBlur()	{
	if(document.all)	{
		var theEl = window.event.srcElement;
		var theName = theEl.tagName;		
		if( theName.toLowerCase() == 'img')	{
			var thePar = theEl.parentElement;
			var theParName = thePar.tagName;
			if (theParName.toLowerCase() == 'a') 		{
				thePar.blur();
				return;
			}
		}
		else if (theName.toLowerCase() == 'a') 		{
			theEl.blur();
			return;
		}
	}
}

window.onerror = null;
document.onerror = null;
document.onclick = doBlur;
formtext.php

Code:
<?php

$heading = $_POST["heading"];
$orderArray = $_POST["orderArray"];
$varArray = $_POST["varArray"];
$layout = $_POST["layout"];
$recipientEmail = $_POST["recipientEmail"];
$Subject = $_POST["Subject"];
$fromName = $_POST["fromName"];
$fromEmail = $_POST["fromEmail"];


if($heading != null && $heading != "") {
	$message = $heading."\n";
} else {
	$message = "";
}

$orderArrayB = array();

$arrOrder = explode(",",$orderArray);	
foreach ( $arrOrder as $val ) {	
	array_push($orderArrayB, $val); 	
}
$finalArray = array();


$fullFields = explode("~|~",$varArray);			
foreach ( $fullFields as $val ) {
	$divideFields = explode("*|*",$val);
	if($divideFields[1] != "undefined") {
		array_push($finalArray, array(stripslashes($divideFields[0]),stripslashes($divideFields[1])));
	}	
}


for ($i = 0; $i < count($finalArray); $i++) {
	if(is_string($finalArray[$i][0])) {			
		$place = array_search ($finalArray[$i][0], $arrOrder);			
		if(!$place) {				
			if($finalArray[$i][0] == $arrOrder[0]) {
				$arrOrder[0] = $finalArray[$i];
			} else {
				array_push($arrOrder, $finalArray[$i]);
			}
		} else {
			$arrOrder[$place] = $finalArray[$i];
		}
	}
}


//////////////////
for ($a = 0; $a < count($arrOrder); $a++) {
	if( !is_array( $arrOrder[$a] ) ){
		$finalArray = array();
		$finalArray[0] = $arrOrder[$a];
		$finalArray[1] = " ";
		$arrOrder[$a] = $finalArray;
	}
}
//////////////////


for ($i = 0; $i < count($arrOrder); $i++) {
	for($b = 0; $b < $lineSpacing; $b++) {
		$message .= "\n";
	}	
	if($layout == "style2") {
		$message .= $arrOrder[$i][0].":\n".$arrOrder[$i][1];	
	}
	else if($layout == "style3") {
		$message .= $arrOrder[$i][0].":\n\n".$arrOrder[$i][1];	
	}
	else {
		$message .= $arrOrder[$i][0].": ".$arrOrder[$i][1];	
	}	
}


mail($recipientEmail, $Subject, $message, "From: ".$fromName." <".$fromEmail.">");

$success = "true";
print "&submittedVar=$success";

?>
postbit arrow 1 comment | 442 views postbit arrow Reply: with Quote   
Registered User
euromogul72 is offline
seperator
Posts: 1
2009-06-07
euromogul72 lives in United States
seperator

Ultrashock Member Comments:
mjoyce71 mjoyce71 is offline mjoyce71 lives in United States 2009-06-15 #2 Old  
It probably is a server issue. The only problem is debugging it to see what went wrong. It's not flash but I've always used this server: http://www.formmailhosting.com - Works good and I always get my emails. Might want to give them a try.

Mark.
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: