File size: 2.47Kb
<?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 - Move Approved Balance To Main Balance");
if($adminlog==1){
$uid=formget("id");
$n1=rand(1,10);
$n2=rand(1,10);
echo '<div class="title">Move Approved Balance To Main Balance</div>';
{
if(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'];
$abal = $getu1['approvedbal'];
$mobile = $getu1['verimobile'];
$errors=array();
if(strlen($reason)<1){
$errors[]='Reason Cannot Be Empty!';
}
if($_SESSION["captcha"]!=$captcha){
$errors[]='Captcha Code Was Wrong!';
}
if(empty($errors)){
$date=date("l , F d , Y");
if($mobile!='')
{
$msg = "Hello $user ,
We have transferred your approved balance to your main account.
Amount- $abal$
Reason- $reason
Thanks for using EarnBuzz.In";
Send_SMS($mobile,$msg);
}
echo"$file_contents";
$to = $getu1['email'];
$subject = "Approved Balance To Main Account";
$body = 'Hello '.$user.'! <br/>
We have transferred your approved balance to your main account. <br/>
Amount- '.$abal.'$ <br/>
Reason- '.$reason.' <br/>
<br/>
Thanks for using EarnBuzz.In';
Send_Mail($to,$subject,$body);
mysql_query("INSERT INTO notifications (user, news , other, stat)
VALUES ('$user', 'We Have Transferred Your Approved Balance To Your Main Account. Reason- ".$reason.".', 'none', 'none')");
$newbal=($bal+$abal);
$doit=mysql_query("UPDATE userdata SET pubalance='$newbal',approvedbal='0' WHERE id='$uid'");
if($doit){
echo '<div class="success">'.$abal.' Transferred To Main Account Of '.$user.'!</div>';
}
else {
echo '<div class="error">Error!</div>';
}
}
else {
dump_error($errors);
}
}
$tot=($n1+$n2);
echo '<div class="form"><form method="post">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="Move 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');
}
?>