File size: 4.07Kb
<?php
/************************************
Script : Adnetwork
Website : http://facebook.com/pranto007
Script is created and provided by Pranto (http://facebook.com/pranto007)
**************************************/
include '../db.php';
include '../functions.php';
headtag("$SiteName - Pay Last Month Ucweb Payments");
if($adminlog==1){
$uid=formget("id");
$n1=rand(1,10);
$n2=rand(1,10);
echo '<div class="title">Pay Pending Ucweb Payments</div>';
{
$lastmonth=date("F", time()-2592000);
if(isset($_POST["month"]) AND isset($_POST["percent"]) AND isset($_POST["reason"]) AND isset($_POST["captcha"])){
$month=formpost("month");
$percent=formpost("percent");
$reason=formpost("reason");
$captcha=formpost("captcha");
$getu = mysql_query("SELECT * FROM userdata WHERE id='$uid'");
$getu1 = mysql_fetch_array($getu);
$user = $getu1['username'];
$bal = $getu1['pubalance'];
$ucbal = $getu1['uclast'];
$lastbal = $percent*$ucbal/100;
$mobile = $getu1['verimobile'];
$errors=array();
if(strlen($month)<1){
$errors[]='Month Cannot Be Empty!';
}
if(strlen($percent)<1){
$errors[]='Percent Cannot Be Empty!';
}
if($_SESSION["captcha"]!=$captcha){
$errors[]='Captcha Code Was Wrong!';
}
if(empty($errors)){
$date=date("l , F d , Y");
$deduct=(100-$percent);
if($mobile!='')
{
$msg = "Hello $user ,
We have paid $percent% of your apps installation earnings till $month month installation to your main account.
Thanks for using EarnBuzz.In";
Send_SMS($mobile,$msg);
}
echo"$file_contents";
$to = $getu1['email'];
$subject = "Payment of Apps Installation";
$body = 'Hello '.$user.'! <br/>
We have paid '.$percent.'% of your apps installation earnings till '.$month.' month installation to your main account of earnbuzz. <br/>
'.$deduct.'% money deducted '.$reason.' <br/>
Total earnings- '.$lastbal.' $ <br/>
<br/>
Login to earnbuzz and check your balance. <br/>
<br/>
Thanks for using EarnBuzz.In';
Send_Mail($to,$subject,$body);
mysql_query("INSERT INTO notifications (user, news , other, stat)
VALUES ('$user', 'Congratulations We Have Paid ".$percent."% Of Your Apps Installation Earnings Till ".$month." Month Installation..', 'none', 'none')");
mysql_query("INSERT INTO ucpay (user, amount , deduction, reason, month)
VALUES ('$user', '$lastbal', '$deduct', '$reason', '$month,2016')");
mysql_query("INSERT INTO notifications (user, news , other, stat)
VALUES ('$user', '".$deduct."% Of Apps Installation Earnings Has Been Deducted ".$reason."', 'none', 'none')");
$newbal=($bal+$lastbal);
$doit=mysql_query("UPDATE userdata SET pubalance='$newbal',uclast='0',lastucpay='Paid' WHERE id='$uid'");
if($doit){
echo '<div class="success">'.$month.' Month Ucweb Payment Successfully Paid To User '.$user.'!</div>';
}
else {
echo '<div class="error">Error paying payment!</div>';
}
}
else {
dump_error($errors);
}
}
$tot=($n1+$n2);
echo '<div class="form"><form method="post">Month:<br/><select name="month">
<option value="'.$lastmonth.'" selected="yes">'.$lastmonth.'</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select><br/>Percent (%):<br/><input type="text" name="percent" value="100"/><br/>Deduct Reason:<br/><input type="text" name="reason"/><br/>Enter Captcha:<br/><img src="/im'.md5(microtime()).'.jpg"/><br/><input type="text" name="captcha" maxlength="5" /><br/><input type="submit" value="Pay Now"/></form></div>';
}
echo '<a href="user.php?id='.$uid.'"><div class="ua">User Details</div></a>';
include '../foot.php';
}
else {
header('Location:login.php');
}
?>