phpegg Posted March 9, 2008 Share Posted March 9, 2008 Hi, I am new to PHP and this forum. I am trying The freelancers v2.8 scripts to build an reverse auction site. the problem is the webmasters addfund function is not working. My method of payments are paypal and mail. I have disabled 2co and wiretransfer using admin panel. But when clicking addfunds at webmasters page, the out put page shows only footer. When I checked database, it shows all entries. Hence the problem is the scripts do not displays the paypal payment page. I have pasted the add fund section from webmaster.php page . Please help me to overcome this problem. <form method="POST" action="webmasters.php"> <input type="hidden" name="manage" value="2"> <input type="hidden" name="deposit" value="money"> <big><B>Deposit Money</b></big> <p> <strong>Amount:</strong> <? echo $currencytype . '' . $currency; ?><input type="text" name="deposit2" maxlength="7" size="6"> <p> <strong>Payment Method:</strong><br> <?php if ($deposit2checkout !== "" || $depositccurl !== "") { echo ' <br><input type="radio" value="cc" name="dtype"> Credit Card'; if ($depositccper !== "" || $depositccfee !== "") { echo ' <small>(cost: ' . $depositccper . '% + ' . $currencytype . '' . $currency . '' . $depositccfee . ')</small>'; } } if ($depositpaypal !== "") { echo ' <br><input type="radio" value="paypal" name="dtype"> <a href="https://www.paypal.com/affil/pal=' . $ppemailaddr . '" target="_blank">PayPal</a>'; if ($depositppper !== "" || $depositppfee !== "") { echo ' <small>(cost: ' . $depositppper . '% + ' . $currencytype . '' . $currency . '' . $depositppfee . ')</small>'; } } if ($depositmail !== "") { echo ' <br><input type="radio" value="mail" name="dtype"> Regular Mail'; if ($depositmlfee !== "") { echo ' <small>(cost: ' . $currencytype . '' . $currency. '' . $depositmlfee . ')</small>'; } } if ($depositother !== "") { echo ' <p><a href="' . $siteurl . '/payment.php">Click here for other payment options...</a>'; } ?> <p><input type="submit" value="Continue" name="submit"> </form> <?php } else { if ($dtype == "mail") { include ("header.php"); $price = $deposit2+$depositmlfee; echo '<big><b>Payments by Mail</b></big> <p> Please send a cash or check payment for ' . $currencytype . '' . $currency . '' . $price . ' to the following address: <p> ' . $companyname . '<br> ' . $address . '<br> ' . $city . ', ' . $state . ', ' . $country . '<br> ' . $zipcode . '<br> <p> Include a note with your username (' . $username . ') and your account type (' . $buyer . ') on it so we can credit your account accordingly. <br> Thanks'; } else if ($dtype == "paypal") { $orderid = 'PP' . time(); if ($depositppper !== "" || $depositppfee !== "") { $depositppper = $depositppper/100; $pcost = $deposit2 * $depositppper; $total = $deposit2 + $pcost + $depositppfee; } else { $total = $deposit2; } $total = roundit($total,2); SQLact("query", "INSERT INTO freelancers_deposits (username, atype, amount, total, oid, ptype, status) VALUES ('$username', 'buyer', '$deposit2', '$total', '$orderid', 'paypal', '')"); $itemname = $companyname . ': ' . $deposit2 . ' Dollar Deposit'; //$itemname = str_replace(' ', '+', $itemname); //$itemname = str_replace('@', '%40', $itemname); //$itemname = str_replace(':', '%3A', $itemname); //$siteurl = str_replace(':', '%3A', $siteurl); //$siteurl = str_replace('/', '%2F', $siteurl); /*$redirect = 'https://www.paypal.com/xclick/?business=' . $ppemailaddr . '&item_name=' . $itemname . '&item_number=1&invoice=' . $orderid . '&amount=' . $total . '&no_shipping=1&return=' . $siteurl . '%2Fdeposit_paypal.php%3Foid=' . $orderid; $redirect = str_replace('@', '%40', $redirect); header("Location: $redirect");*/ ?> <!--Start Code Add--> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paypalform1"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?=$ppemailaddr?>"> <input type="hidden" name="item_name" value="<?=$itemname?>"> <input type="hidden" name="item_number" value="<?=$orderid?>"> <input type="hidden" name="amount" value="<?=$total?>"> <input type="hidden" name="invoice" value="<?=$orderid?>"> <input type="hidden" name="image_url" value=""> <input type="hidden" name="return" value="<?=$siteurl?>/deposit_paypal.php?oid=<?=$orderid?>"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="no_shipping" value="1"> <script> document.paypalform1.submit(); </script> </form> <!--End Code Add--> <? } else if ($dtype == "cc") { $orderid = 'CC' . time(); if ($depositccper !== "" || $depositccfee !== "") { $depositccper = $depositccper/100; $pcost = $deposit2 * $depositccper; $total = $deposit2 + $pcost + $depositccfee; } else { $total = $deposit2; } $total = roundit($total,2); if ($deposit2checkout == "") { $depositccurl = str_replace('[amount]', $total, $depositccurl); $depositccurl = str_replace('[username]', $username, $depositccurl); $depositccurl = str_replace('[type]', 'buyer', $depositccurl); header("Location: $depositccurl"); } SQLact("query", "INSERT INTO freelancers_deposits (username, atype, amount, total, oid, ptype, status) VALUES ('$username', 'buyer', '$deposit2', '$total', '$orderid', 'cc', '')"); if ($mode == "demo") { $redirect = $depositccpay . '' . $depositccsid . '&cart_order_id=' . $orderid . '&total=' . $total . '&demo=Y'; } else { $redirect = $depositccpay . '' . $depositccsid . '&cart_order_id=' . $orderid . '&total=' . $total . '&demo='; } setcookie ("oid", $orderid,time()+999999); header("Location: $redirect"); } else { include ("header.php"); echo 'Please choose a deposit method to continue with the deposit process.<br> <a href="javascript:history.go(-1);">Go Back...</a>'; } } } Link to comment https://forums.phpfreaks.com/topic/95280-scripts-writing-in-the-database-but-no-out-put/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.