[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit_ticket.php
<?php include('header.php'); ?> <style> .col-md-6,.col-md-4,.col-md-3,.col-md-2,.col-md-5{ display:inline-block !important; } </style> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">Edit Ticket</div> </div> <?php $sr='tickets'; $stmt =$show->readwithdata($sr,'id',$_REQUEST['id']); $st="select * from tickets left join user on user.user_id=tickets.user_id order by tickets.date desc"; $stmt=$con->prepare($st); $stmt->execute(); $num = $stmt->rowCount(); if($num>0){ $count=1; while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ $ticket_id=$row['ticket_id']; // echo $package_id; ?> <form method="post" id="exampleValidation" data-toggle="validator" enctype="multipart/form-data" > <div class="card-body"> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">User ID <span class="required-label">*</span></label> <div class="col-lg-2 col-md-12 col-sm-12"> <input type="text" name="user_id" value="<?=$row['user_id']?>" class="form-control" placeholder="Title" readonly> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Name<span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="text" name="name" value="<?=$row['name']?>"class="form-control" placeholder="No of Days" readonly> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Email<span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="text" name="email" value="<?=$row['email']?>"class="form-control" placeholder="No of Days" readonly> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Phone <span class="required-label">*</span></label> <div class="col-lg-2 col-md-12 col-sm-12"> <input type="text" name="phone" value="<?=$row['phone']?>" class="form-control" placeholder="Title" readonly> </div> <label for="name" class="col-lg-1 col-md-3 col-sm-4 mt-sm-2 ">Ticket Id<span class="required-label">*</span></label> <div class="col-lg-3 col-md-12 col-sm-12"> <input type="text" name="ticket_id" value="<?=$row['ticket_id']?>"class="form-control" placeholder="No of Days" readonly> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 ">Query<span class="required-label">*</span></label> <div class="col-lg-12 col-md-12 col-sm-12"> <textarea name="content" class="form-control" rows="10"><?=$row['content']?></textarea> </div> </div> <div class="form-group form-show-validation row"> <label for="name" class="col-lg-3 col-md-3 col-sm-4 mt-sm-2 ">Reply<span class="required-label">*</span></label> <div class="col-lg-12 col-md-12 col-sm-12"> <textarea name="reply" class="form-control" rows="10"><?=$row['reply']?></textarea> </div> </div> <div class="form-group"> <div class="col-md-4"> <label> Status</label> <?php $interests = array('OPEN','CLOSED'); ?> <select name="status" class="form-control" id="status<?=$count;?>"> <?php foreach( $interests as $interest ): ?> <option value="<?php echo $interest ?>"<?php if( $interest==$row['status']): ?> selected="selected"<?php endif; ?>><?php echo $interest ?></option> <?php endforeach; ?> </select> </div> </div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <input class="btn btn-success" type="submit" name="sub" value="Submit"> </div> </div> </div> </div> </form> <?php } } ?> </div> </div> </form> <?php if(isset($_POST['sub'])){ $allowed = ["reply","status"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars($_POST[$key]); } } $setStr = rtrim($setStr, ","); $params['ticket_id'] =$ticket_id; $show->table ='tickets'; $show->cols =$setStr; $show->id_name ='ticket_id'; $show->params =$params; //print_r($setStr); //print_r($params); if($show->update_all()){ echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: "for Updating!", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; } else{ echo "ss"; } }?> </div></div> </div> </div> <!--footer--> <?php include('footer.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: 691.71 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