MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.128.198.90
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/ppcad7no/thedigitalgulf.com/down-hrms/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/thedigitalgulf.com/down-hrms/your-comments.php
<?php
ob_start();
require_once("includes/dbsmain.inc.php");
if($_SESSION['admin_user_id']==''){
 header("location:login.php");
 exit;
}
$crDate = date("Y-m-d");
$crTime = date("h:i:sa");
$cpid=$_REQUEST['cpid'];
if(isset($_POST['AddComment'])){
	@extract($_POST);
	
	/*********FRESH START**********/
	if($comment_cstatus=='1'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set next_date='$comment_date',status='1',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='1',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********FRESH END**********/
	
	/*********FOLLOWUP START**********/
	if($comment_cstatus=='2'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set follow_party_date='$crDate',next_date='$comment_date',status='2',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='2',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********FOLLOWUP END**********/
	
	/*********POSITIVE START**********/
	if($comment_cstatus=='3'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set positive_party_date='$crDate',next_date='$comment_date',status='3',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='3',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********POSITIVE END**********/
	
	/*********SELECTED START**********/
	if($comment_cstatus=='4'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set selected_party_date='$crDate',next_date='$comment_date',status='4',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='4',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********SELECTED END**********/
	
	/*********REJECTED START**********/
	if($comment_cstatus=='5'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set rejected_party_date='$crDate',next_date='$comment_date',status='5',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='5',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********REJECTED END**********/
	
	/*********NOT INTERESTED START**********/
	if($comment_cstatus=='6'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set ni_party_date='$crDate',next_date='$comment_date',status='6',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='6',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********NOT INTERESTED END**********/
	
	/*********BLOCK START**********/
	if($comment_cstatus=='7'){	
$RemarkSql = db_query("update tbl_candidates set candidates_extra_remark='$comment_comment' where candidates_id='$cpid'");
$partySql = db_query("update party_statusdate set block_party_date='$crDate',next_date='$comment_date',status='7',user_id='$_SESSION[admin_user_id]' where party_id='$cpid'");
$comSql = db_query("insert into tbl_comments set comment_cpid='$cpid',comment_user='$_SESSION[admin_user_id]',comment_ctype='$comment_ctype',comment_cstatus='7',comment_comment='$comment_comment',comment_date='$crDate',comment_time='$crTime'");
	}
	/*********BLOCK END**********/
	?>
	 <script>
	alert("Comment added successfully!");
	window.close();
    window.onunload = refreshParent;
    function refreshParent() {
        window.opener.location.reload();
    }
</script>
<?php	
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HR Management System</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<style type="text/css">
.masthead {
  background-color: #CDCDCD; font-weight:bold; font-size:16px;
}
.mastfoot {
  background-color: #F3F3F3;
}
</style>
</head>
<body>
    <div class="container" style="margin-top:30px;">
    <form action="" name="comFrm" method="post" enctype="multipart/form-data" onSubmit="return commentValidate()">
    <div class="table-responsive">
        <table class="table table-bordered">
    <thead>
        <tr class="masthead">
            <th colspan="2"><span class="text-info">Add Comment</span></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><small><strong>Conversation Type</strong></small></td>
            <td><select name="comment_ctype" class="form-control">          
          <option value="Conversation" selected="selected">Conversation</option>
          <option value="Mail/Chat/SMS">Mail/Chat/SMS</option>
		  <option value="Direct Interview" selected="selected">Direct Interview</option>
          <option value="Other">Other</option>
        </select></td>
        </tr>
        <tr>
            <td><small><strong>Conversation Status</strong></small></td>
            <td>
            <select name="comment_cstatus" class="form-control">
          <option value="1" selected="selected">Fresh</option>
          <option value="2" <?php if($_GET['status']=='2') {?> selected="selected" <?php } ?>>Followup</option>
          <option value="3" <?php if($_GET['status']=='3') {?> selected="selected" <?php } ?>>Positive</option>
          <option value="4" <?php if($_GET['status']=='4') {?> selected="selected" <?php } ?>>Selected</option>
          <option value="5" <?php if($_GET['status']=='5') {?> selected="selected" <?php } ?>>Rejected</option>
          <option value="6" <?php if($_GET['status']=='6') {?> selected="selected" <?php } ?>>Not Interested</option>
          <option value="7" <?php if($_GET['status']=='7') {?> selected="selected" <?php } ?>>Block</option>
        </select>
        </td>
        </tr>
        <tr>
            <td><small><strong>Comment</strong></small></td>
            <td>
            <textarea name="comment_comment" id="comment_comment" rows="5" class="form-control"></textarea>
        </td>
        </tr>
        <tr>
            <td><small><strong>Next Date</strong></small></td>
            <td>
            <input type="date" name="comment_date" value="<?=date('Y-m-d');?>" id="comment_date" class="form-control">
        </td>
        </tr>
        <tr class="mastfoot">
            <td>&nbsp;</td>
            <td>
            <button type="submit" name="AddComment" class="btn btn-primary btn-md">Add Comment</button>
        </td>
        </tr>
    </tbody>
</table>
</div>
    </form>
    <div class="table-responsive">
        <table class="table table-bordered">
    <thead>
        <tr class="active">
            <th width="22%"><span class="text-info"><strong>User</strong></span></th>
            <th width="52%"><span class="text-info"><strong>Comment</strong></span></th>
            <th width="26%"><span class="text-info"><strong>Date Time</strong></span></th>
        </tr>
    </thead>
    <tbody>
    <?php
	$csql=db_query("select * from tbl_comments where 1 and comment_cpid='$cpid' order by comment_id desc");
     if(mysqli_num_rows($csql)>0){
	  while($cres=mysqli_fetch_array($csql)){
	?>
        <tr>
            <td><small><?php echo $cres['comment_user']; ?></small></td>
            <td><small><?php echo $cres['comment_comment']; ?></small></td>
            <td><small><?php echo $cres['comment_date']; ?> &nbsp; <?php echo $cres['comment_time']; ?></small></td>
        </tr>
        <? }}else{ ?>
        <tr>
            <td colspan="3"><p class="text-center text-danger"><strong>No comment found !</strong></p></td>
        </tr>
        <? } ?>
    </tbody>
</table>
</div>
    </div>
    <script>
function commentValidate(){
if(document.comFrm.comment_comment.value==''){
		alert('Enter Comment !');
		document.comFrm.comment_comment.focus();
		return false;
	}
return true;
 }
</script>
    </body></html>

MMCT - 2023