View file public_html/vipadz/payucweb.php

File size: 4.16Kb
<?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 Ucweb Payments");

if($adminlog==1){
echo '<div class="title">Pay Ucweb Payments</div>';
 {
if(isset($_POST["user"]) AND isset($_POST["installs"]) AND isset($_POST["amount"]) AND isset($_POST["month"])){

$user=formpost("user");
$installs=formpost("installs");
$amount=formpost("amount");
$month=formpost("month");
$getu = mysql_query("SELECT * FROM userdata WHERE username='$user'");
$getu1 = mysql_fetch_array($getu);
$bal = $getu1['pubalance'];
$mobile = $getu1['verimobile'];
$errors=array();

if(!is_numeric($amount)){
  $errors[]='Amount Must Be A Numeric Value!';
 }

if(strlen($user)<1){
  $errors[]='User Name Cannot Be Empy!';
 }

if(strlen($installs)<1){
  $errors[]='Installs Cannot Be Empy!';
 }

if(strlen($amount)<1){
  $errors[]='Amount Cannot Be Empy!';
 }

if(strlen($month)<1){
  $errors[]='Month Cannot Be Empty!';
 }

if(empty($errors)){
  $date=date("l , F d , Y"); 

//sample php code

//this will collect data from form

//$mobile =  $_POST['mobile']; 

$msg = "Hello $user ,
Congratulations we have paid your ucweb earning till $month month installation to your main account.
Thanks for using EarnBuzz.In
";
echo $mobile."<br/>".$msg;
echo "<br/>";
//check whether user enter some data or not
if(empty($mobile)){
echo"enter mobile number";
}
if(empty($msg)){
echo"enter message";
}
//end of data input checking

$msg = urlencode("$msg"); //IMPORTANT

//doing recharge now by hitting jolo api
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
$myurl = "http://bhashsms.com/api/sendmsg.php?user=9018242169&pass=arshad&sender=EarnBz&phone=$mobile&text=$msg&priority=ndnd&stype=normal";
curl_setopt ($ch, CURLOPT_URL, $myurl);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
echo"$file_contents";

$to = $getu1['email'];
$subject = "Payment of Ucweb";
$message = 'Hello '.$user.'! <br/>
Congratulation , We have paid  your ucweb earning till '.$month.' month installation to your main account of earnbuzz. <br/>
Your install- '.$installs.' <br/>
Total earning- '.$amount.' $ <br/>
<br/>
Login to earnbuzz and check your balance.
<br/>
Thanks for using EarnBuzz.In
<br/>
If you have any query contact us';
Send_Mail($to,$subject,$body);

mysql_query("INSERT INTO notifications (user, news , other, stat)
VALUES ('$user', 'Congratulations We Have Paid Your Ucweb Earning Till ".$month." Month Installation..', 'none', 'none')");
  $newbal=($bal+$amount);
  $doit=mysql_query("UPDATE userdata SET pubalance='$newbal' WHERE username='$user'");  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);

}
}
echo '<div class="form"><form method="post">Username<br/><input type="text" name="user"/><br/>Installs:<br/><input type="text" name="installs"/><br/>Amount:<br/><input type="text" name="amount"/><br/>Month:<br/><select name="month">    
                                <option value="January" selected="yes">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/><input type="submit" value="Pay Now"/></form></div>';

}

 echo '<a href="index.php"><div class="ua">Home</div></a>';
 include '../foot.php';
 }
 else {
 header('Location:login.php');
 }
 ?>