...

View Full Version : Problem in Webform!!



upendraduwadi
09-03-2009, 06:53 AM
Hello Friends,
I am creating a form processing script by a software. I can even create my own script but that software is great for processing forms.
But, when It generates the script then, If I upload the script to the webserver then it automatically downloads google ads since this is trial version software.
But, I do not want to post any ads in my site. Can anybody tell me that how can I remove that ads? I tried few options but It didnot worked.
Here is the sample form: http://www.ambitionhimalaya.com/sample+form.php
Code:


<?php
foreach($_POST as $key => $value){
if (is_array($value)) {
$_values[$key] = join("%,% ",$value);
}else $_values[$key] = $value;
$_values[$key]=stripslashes($_values[$key]);
}
if (!isset($_POST["_referer"])) {
$_referer = $HTTP_SERVER_VARS["HTTP_REFERER"];
}else $_referer = $_POST["_referer"];
function Display_Selected($_field, $_value){
$array = split("%,% ",$_field);
foreach($array as $key){
if ($key == $_value) {
echo "selected";
break;}}}

function Display_Radio($_field, $_value){
$st = "<input type=\"radio\"";
if (isset($_field)){if ($_field == $_value) {
$st .= " checked";}}
$st .= " disabled>";
return $st;}
function Display_Checkbox($_field, $_value, $full = true){
if ($full) {$st = "<input type=\"checkbox\"";}
$array = split("%,% ",$_field);
foreach($array as $key){
if ($key == $_value) {
$st .= "checked";
break;}}
if ($full) {$st .= " disabled>";}
return $st;}

function IsThereErrors($form) {
global $_POST, $_FILES, $_values;
$req[0][] = "name";
$req[0][] = "email";
$email[0][] = "email";
$req[0][] = "dropdown";
$req[0][] = "radio";
$req[0][] = "checkbox";
$req[0][] = "textarea";
$flag = false;
for($i=0;$i<Count($req[$form]);$i++){
if ($_POST[$req[$form][$i]]=="") {
$flag = true;}}
for($i=0;$i<Count($email[$form]);$i++){
if (!preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,6}|[0-9]{1,3})(\]?)$/',$_POST[$email[$form][$i]]) && $_POST[$email[$form][$i]]!=""){
$flag = true;}}
return $flag;}

function get_code($fields, $files ,$next_page, $protect_name){
$str = "echo \"";
foreach($fields as $value){
$str .= gzinflate(base64_decode("s8nMKygtUSipLEi1jVHKyExJS c2LUVLIS8wF8QE=")).base64_decode($value).gzinflate (base64_decode("i1FSKEvMKU21jVFS0ssoyc0pLkhNzkzMSc 5ILCrWUIkHSxZHKwEA")).base64_decode($value).gzinfl ate(base64_decode("U4rV1FOKUbIDAA=="));
}
foreach($files as $value){
$str .= gzinflate(base64_decode("s8nMKygtUSipLEi1jVHKyExJS c2LUVLIS8wF8QE=")).base64_decode($value).gzinflate (base64_decode("iy9KTczRzUvMTY1RUihLzClNtY1RUtLLKM nNKS5ITc5MzEnOSCwq1lCJB0sWRysBAA==")).base64_decod e($value).gzinflate(base64_decode("iy9KTczRzUvMTVW K1dRTilGyAwA="));
}
$str .= gzinflate(base64_decode("s8nMKygtUSipLEi1jVHKyExJS c2LUVLIS8wF8eOLUtNSi1KLgCJliTmlICEVhJidDX7NeakVJfE FiempSNoB")).base64_decode($next_page).gzinflate(b ase64_decode("i1GysylQSM5JLC62jVFKyy/KjU+tKEgtKokvLqnMSY0BSmfmFZSWKOQl5qYCVQAA")).base6 4_decode($protect_name).gzinflate(base64_decode("i 1FSKKksSLWNUSpJrSiJUVIoS8wpBXFjlPTtbPQL7AA=")).gzi nflate(base64_decode("sylOLsosKFEoqSxItY1RKkmtKNHP SixLhAjHKNnZKOrqAgA="))."\n\r".gzinflate(base64_de code("VY1bDoMgEEW3QvhXrA/QWrsSEkORAMYKkWmtuy+NTWP/bs6cO1c7pyfVi6GXk1UzoA5x7B+3hFXl6cRYXlKW1UXdcNwi/ZPD5Ha1YE3Fsjwv6L+w2gFMNEpaH7FRVptPk2YtIiRJruhCgly sh5j2gGDzquMY1AvIKJ5ixxyjsMjIDYA/E+KFVmLI0/152ObBSgHWzal09++VBOPWuBvSMXB82HoD"));
$str .= "\";";
return $str;
}

function display_errors($form, $_isdisplay) {
global $_POST, $_FILES;
$req[0][] = "name";
$req[0][] = "email";
$email[0][] = "email";
$req[0][] = "dropdown";
$req[0][] = "radio";
$req[0][] = "checkbox";
$req[0][] = "textarea";
if ($_isdisplay) {
echo "<p align=\"center\"><font color=\"red\" face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">";
for($i=0;$i<Count($req[$form]);$i++){
if ($_POST[$req[$form][$i]]=="") {
echo "<br> ERROR: Field <b>".$req[$form][$i]."</b> is required!";}}
for($i=0;$i<Count($email[$form]);$i++){
if (!preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,6}|[0-9]{1,3})(\]?)$/',$_POST[$email[$form][$i]]) && $_POST[$email[$form][$i]]!=""){
echo "<br> ERROR: <b>'".htmlspecialchars($_POST[$email[$form][$i]])."'</b> is not valid email address!";}}
echo "</font></p>";}}
function display_Sample_43form($_iserrors) {
global $_values, $_referer;?>
<!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"><style> .form_expert_style {display: none;} </style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample Form</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="<?php echo $HTTP_SERVER_VARS["PHP_SELF"] ?>" enctype="multipart/form-data" onsubmit="return CheckForm(this);">
<?php display_errors("1", $_iserrors);
eval (get_code(array("bmFtZQ==", "ZW1haWw=", "ZHJvcGRvd24=", "cmFkaW8=", "Y2hlY2tib3g=", "dGV4dGFyZWE="), array(), "Mg==", "VVJM")); ?>
<table width="500" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>Name</td>
<td><label>
<?php echo htmlspecialchars($_values["name"])?>
</label></td>
</tr>
<tr>
<td>Email</td>
<td><label>
<?php echo htmlspecialchars($_values["email"])?>
</label></td>
</tr>
<tr>
<td>Drop Down</td>
<td><label>
<?php echo htmlspecialchars($_values["dropdown"])?>
</label></td>
</tr>
<tr>
<td>Radio</td>
<td><label>
<?php echo Display_radio($_values["radio"], "Radio 1")?>
Radio 1
<?php echo Display_radio($_values["radio"], "Radio 2")?>
Radio 2
<?php echo Display_radio($_values["radio"], "Radio 3")?>
Radio 3
<?php echo Display_radio($_values["radio"], "Radio 4")?>
Radio 4</label></td>
</tr>
<tr>
<td>Check Box</td>
<td><label>
<?php echo Display_checkbox($_values["checkbox"], "Check 1")?>
Check 1
<?php echo Display_checkbox($_values["checkbox"], "Check 2")?>
Check 2
<?php echo Display_checkbox($_values["checkbox"], "Check 3")?>
Check 3
<?php echo Display_checkbox($_values["checkbox"], "Check 4")?>
Check 4</label></td>
</tr>
<tr>
<td valign="top">Message</td>
<td><label>
<?php echo htmlspecialchars($_values["textarea"])?>
</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><label>


</label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p align="center"><input type="submit" name="submit" id="button" value="back" />&nbsp<input type="submit" name="submit" id="button" value="submit" /></p></form>
</body>
</html>
<?php }
function display_thankyou() {
global $_values, $_referer;?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample Form</title>
</head>
<body>
<p align=center><b>Thank you for submission. We will contact you shortly.</b></p>
</body>
</html>
<?php }
function display_default() { ?>
<?php }
function BuildBody($body, $html, $num){
global $zag, $un;
if ($html) {
$zag[$num] = "--".$un."\nContent-Type:text/html;\n";
}
else {
$zag[$num] = "--".$un."\nContent-Type:text/plain;\n";
};
$zag[$num] .= "Content-Transfer-Encoding: 8bit\n\n$body\n\n";
}
function SendEmails(){
global $_values, $zag, $un;
$un = strtoupper(uniqid(time()));
$to[0] .= "info@ambitionhimalaya.com";
$subject[0] .= "Sample Form was submitted on ".date("F j, Y")." ".date("H:i")."";
$head[0] = "From: ".str_replace("%,%", ",", $_values['email'])."\n";
$head[0] .= "Subject: Sample Form was submitted on ".date("F j, Y")." ".date("H:i")."\n";
$head[0] .= "X-Mailer: Forms Expert at www.forms-expert.com\n";
$head[0] .= "Reply-To: ".str_replace("%,%", ",", $_values['email'])."\n";
$head[0] .= "Content-Type:multipart/mixed;";
$head[0] .= "boundary=\"".$un."\"\n\n";
$EmailBody = "<html><body>
Form was filled with the following data:
<br><b>Name:</b> ".htmlspecialchars($_values["name"])."
<br><b>Email Address:</b> ".htmlspecialchars($_values["email"])."
<br><b>Drop Down:</b> ".htmlspecialchars($_values["dropdown"])."
<br><b>Radio Button:</b> ".htmlspecialchars($_values["radio"])."
<br><b>Check Box:</b> ".htmlspecialchars($_values["checkbox"])."
<br><b>Text Area:</b> ".htmlspecialchars($_values["textarea"])."
</body></html>
";
BuildBody($EmailBody, True, 0);
$to[1] .= "info@ambitionhimalaya.com";
$subject[1] .= "Sample+form was submitted on ".date("F j, Y")." ".date("H:i")."";
$head[1] = "From: ".str_replace("%,%", ",", $_values['email'])."\n";
$head[1] .= "Subject: Sample+form was submitted on ".date("F j, Y")." ".date("H:i")."\n";
$head[1] .= "X-Mailer: Forms Expert at www.forms-expert.com\n";
$head[1] .= "Reply-To: ".str_replace("%,%", ",", $_values['email'])."\n";
$head[1] .= "Content-Type:multipart/mixed;";
$head[1] .= "boundary=\"".$un."\"\n\n";
$EmailBody = "<html><body>
Form was filled with the following data:
<br><b>Name:</b> ".htmlspecialchars($_values["name"])."
<br><b>Email Address:</b> ".htmlspecialchars($_values["email"])."
<br><b>Drop Down:</b> ".htmlspecialchars($_values["dropdown"])."
<br><b>Radio Button:</b> ".htmlspecialchars($_values["radio"])."
<br><b>Check Box:</b> ".htmlspecialchars($_values["checkbox"])."
<br><b>Text Area:</b> ".htmlspecialchars($_values["textarea"])."
</body></html>
";
BuildBody($EmailBody, True, 1);
for ($i=0;$i<=1;$i++){
mail($to[$i], $subject[$i], $zag[$i], $head[$i]);
}
}
$actions = array ("display_Sample_43form","display_preview","displa y_thankyou");

if (isset($_POST["_next_page"])) {
$_next_page = $_POST["_next_page"];
}else $_next_page = 0;
if ($_POST["submit"]=="back") {
call_user_func($actions[$_next_page-2],false);
}else if (IsThereErrors($_next_page-1)){
call_user_func($actions[$_next_page-1],true);
}else {
call_user_func($actions[$_next_page+0],false);
if ($_next_page == count($actions)-1) {
SendEmails();
}
}
?>

PappaJohn
09-03-2009, 02:18 PM
To remove the ads, you should pay for the script and not try to steal the trial version.

Zangeel
09-03-2009, 04:46 PM
If you can't code a simple web form, then how do you expect to steal it? Asking programmers to help null a script for you is beyond stupid, since most of us have probably writtten scripts subject to nullings in the past, i.e. lost money.

Just learn something instead of being a thief. I swear its so much funner
http://php.net

Phil Jackson
09-03-2009, 05:26 PM
:mad: come on son, forms are a great place to start to learn php.

<?php echo $abovePost; ?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum