view_comment($tid_comment); } if ($mode == "add_comment") { $user_comment = $_POST['user']; $tid_comment = $_POST['tid']; //$text_comment=strip_tags(xss_clean(($_POST['textmsg'])),"<b><a><br>"); $text_comment = $_POST['textmsg']; $stmt = $dbConnection->prepare('INSERT INTO comments (t_id, user_id, comment_text, dt) values (:tid_comment, :user_comment, :text_comment, now())'); $stmt->execute(array(':tid_comment' => $tid_comment, ':user_comment' => $user_comment, ':text_comment' => $text_comment)); $stmt = $dbConnection->prepare('INSERT INTO ticket_log (msg, date_op, init_user_id, ticket_id) values (:comment, now(), :user_comment, :tid_comment)'); $stmt->execute(array(':tid_comment' => $tid_comment, ':user_comment' => $user_comment, ':comment' => 'comment')); $stmt = $dbConnection->prepare('update tickets set last_update=now() where id=:tid_comment'); $stmt->execute(array(':tid_comment' => $tid_comment)); view_comment($tid_comment); } if ($mode == "upload_file") { $name = $_POST['name']; $hn = $_POST['hn']; $stmt = $dbConnection->prepare('insert into files (name, h_name) VALUES (:name, :hn)'); $stmt->execute(array(':name' => $name, ':hn' => $hn)); } if ($mode == "conf_test_mail") { /* if (get_conf_param('mail_auth_type') != "none") { $mail->SMTPSecure = $CONF_MAIL['auth_type']; } sendmail? SMTP?
<?php session_start(); include 'logout.php'; $comments = view_comment(); ?> <html> <head> <title>Comments Manager</title> <link href="bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet" /> <script src="bootstrap/js/jquery.js"></script> <script src="bootstrap/js/bootstrap.js"></script> </head> <body> <div class="container"> <h4>View All Comments</h4> <hr/> <?php if (count($comments) > 0) { ?> <table border="0" class="table table-striped table-condensed table-bordered"> <thead> <tr> <th width="60"></th> <th width="60">ID</th>
?> </a></li> </ul> <!-- Tab panes --> <div class="tab-content"> <div class="tab-pane fade in active" id="home"> <div class="col-md-12" style=" padding-left: 0px; padding-right: 0px; "> <div class="panel panel-default"> <div class="panel-body"> <div id="comment_content"> <?php echo view_comment($tid); ?> </div> <hr> <div class="control-group"> <div class="controls"> <div class="form-group" id="for_msg"> <label for="msg" class="col-sm-3 control-label"><small><?php echo lang('TICKET_t_your_comment'); ?> :</small></label>