Location: PHPKode > scripts > ECW commerce shop > ecw-commerce-shop-6-03/forms_one.php
<?
require ("./conf.php");
$serv=getenv("SERVER_NAME");
if ( $https=='1')
{ $url="https://$serv/$path/index.php";}
  else
{   $url="./index.php";  }

if ($epay==1)
{
require ("./epay.php");
printepay();
}
else
{
echo "
<script type=text/javascript>
var isIE=document.all?true:false;
var isDOM=document.getElementById?true:false;
var isNS4=document.layers?true:false;

/* _w : which ID (1) or (2) */
/* _h : (h)ide or (s)how */

function toggleT(_w,_h) {
;
;
}
</script>
";
}


echo "<script language=\"JavaScript\">".
     "<!-- Begin
    function wo()
    {
      window.close();
    }

function check(which)
{
var pass=true;
if (document.images)
{
for (i=0;i<which.length;i++)
{
var tempobj=which.elements[i];
if ((tempobj.name.substring(0,1)==\"r\") &&
(!(
    (((which.rcc_type.options[which.rcc_type.selectedIndex].value == \"PayPal\") ||
     (which.rcc_type.options[which.rcc_type.selectedIndex].value ==\"BytePay\")) ||
     (which.rcc_type.options[which.rcc_type.selectedIndex].value ==\"SecureTrading\"))
    && (tempobj.name.substring(0,3)==\"rcc\")
    )))
{
if (((tempobj.type==\"text\"||tempobj.type==\"textarea\")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)==\"s\"&&tempobj.selectedIndex==0))
{
pass=false;break;
}
}
}
}
if (!pass)
{
shortFieldName=tempobj.name.substring(1,30).toUpperCase();
alert(\"$lang[Pleasefill] \"+shortFieldName+\" $lang[FFCR].\");
return false;
}
else return true;
}
//  End -->
</script>     ";


if ($exit=="ok")
 {
$user_mail=$remail;
require ("./mail.php");


$dat_reg=date("d-m-Y H:i");

reset ($zamovl);
while (list($tempkey,$tempvalue)=each($zamovl))
    { if ($tempvalue!='0'){
        $arrzam=$arrzam.$tempkey."=".$tempvalue."|";
	}
    }

reset ($zamovl);
$sql_ins="INSERT INTO $table_orders SET
uid='0', sql='$sql_my', total='$sum', discount='$disc',data='$dat_reg',
login='0', name='$rname', address='$raddress',
phone='$rphone', company='$rcompany', email='$remail',breif='$rbreif',
cc_type='$rcc_type',cc_name='$rcc_name',cc_expired='$rcc_expired',
cc_number='$rcc_number', f1='$arrzam'";

mysql_query("$sql_ins");
//echo mysql_errno().": ".mysql_error()."Insert in table <BR>";

#delete records from korz
 while (list($tempkey,$tempvalue)=each($zamovl))
    {
        $zamovl[$tempkey]="0";
     //echo ">>   $zamovl[$tempkey] =0";
        }

echo "<font size=+1 color='#990000'>$lang[YOIP]</font><br>";
echo "<input type='button' value='$lang[Cw]' onclick='javascript:wo();'>   ";

session_unregister('zamovl');

 }
else
{
$all=count ($credit_card);
$cr_sel="<option value='none'>$lang[None]</option>";
for ($n=0; $n<$all; $n++)
  {
   $cr_sel=$cr_sel."<option value='$credit_card[$n]'>$credit_card[$n]</option>";
   }
echo "
<body bgcolor='$bgcolor' leftmargin='0' topmargin='0' bottommargin='0'>
<center>";
echo "<form name='myform' action='$url' method=\"POST\" onsubmit=\"return check(this)\">
<table width=560  cellspacing='1' cellpadding='3'><td class='menu'>
<b>$lang[PFOFFC]:</b></td></tr></table>
<table width=560 bgcolor='#cccccc' valign='top' cellspacing='1' cellpadding='3'>
<td width=100 class=hd2>$lang[Name]: </td><td width=200 class=hd3>
<input type='text' name='rname' size=25 value='$rname'></td>
<td class=hd2 width=200>$lang[Address]: </td><td class=hd3><textarea name='raddress'>$raddress</textarea></td>
</tr>
<td class=hd2>$lang[Company]: </td><td class=hd3>
<input type='text' name='rcompany' value='$rcompany'></td>

<td class=hd2>$lang[Paytype]: </td><td class=hd3><SELECT name=\"rcc_type\" onChange=\"toggleT('sc1',myform.rcc_type.options[myform.rcc_type.selectedIndex].value);\"> $cr_sel</SELECT></td>

</tr>
<td class=hd2>$lang[Phone]: </td><td class=hd3>
<input type='text' name='rphone' value='$rphone'></td>
<td class=hd2>
<span id=\"sc0\" style=\"visibility:visible;position:relative;top:0;left:0;\">
$lang[Expired]:
</span>
</td><td class=hd3>
<span id=\"sc5\" style=\"visibility:visible;position:relative;top:0;left:0;\">
<input type='text' name=\"rcc_expired\" value='$rcc_expired'>
</span>
</td>
</tr>
<td class=hd2> $lang[Email]: </td><td class=hd3>
<input type='text' name='remail' value='$remail'></td>
<td class=hd2>
<span id=\"sc1\" style=\"visibility:visible;position:relative;top:0;left:0;\">
$lang[Creditcardnumber]:
</span>
</td><td class=hd3>
<span id=\"sc2\" style=\"visibility:visible;position:relative;top:0;left:0;\">
<input type='text' name=\"rcc_number\" value='$rcc_number'>
</span>
</td>
</tr>
<td class=hd2>$lang[Breif]:</td><td class=hd3>
<textarea name='rbreif'>$rbreif</textarea></td>
<td class=hd2>
<span id=\"sc3\" style=\"visibility:visible;position:relative;top:0;left:0;\">
$lang[NOCC]:
</span>
</td><td class=hd3>
<span id=\"sc4\" style=\"visibility:visible;position:relative;top:0;left:0;\">
<input type='text' name=\"rcc_name\" value='$rcc_name'>
</span>
</td>
</tr>
</table>
<input type='submit' value=\"Checkout\" name=\"$lang[Checkout]\">
<input type='hidden' name='id' value='$id'>
<input type='hidden' name='exit' value='ok'>
<input type='hidden' name='endsum' value='$endsum'>
<input type='hidden' name='c' value='regone'>
</form>
<br>
</center>";
}

Return current item: ECW commerce shop