120 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			120 lines
		
	
	
		
			6.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
|     defined('BASEPATH') OR exit('No direct script access allowed');
 | |
| 
 | |
|     use Coduo\PHPHumanizer\DateTimeHumanizer;
 | |
| ?>
 | |
| <!-- page content -->
 | |
| <div class="right_col" role="main">
 | |
|     <div class="">
 | |
|         <div class="row">
 | |
|             <div class="col-md-12 col-sm-12 col-xs-12">
 | |
|                 <div class="x_panel">
 | |
|                     <div class="x_title">
 | |
|                         <h2>Kontakt-Nachrichten</h2>
 | |
|                         <div class="clearfix"></div>
 | |
|                     </div>
 | |
|                     <div class="x_content">
 | |
|                         <p class="text-muted font-13 m-b-30">
 | |
|                             Hier sind alle bisher erhaltenden Kontakt-Nachrichten der Nutzer aufgelistet.
 | |
|                         </p>
 | |
|                         <div style="overflow-x: auto">
 | |
|                             <table id="datatable-fixed-header" class="table table-striped table-bordered"
 | |
|                                    data-page-length="25" data-order='[[ 5, "desc" ], [6, "desc"], [1, "desc"]]'>
 | |
|                                 <thead>
 | |
|                                 <tr>
 | |
|                                     <th>ID</th>
 | |
|                                     <th>Datum</th>
 | |
|                                     <th>Nachricht</th>
 | |
|                                     <th>Nutzer</th>
 | |
|                                     <th>Email-Adresse</th>
 | |
|                                     <th>Ungelesen?</th>
 | |
|                                     <th>Unbeantwortet?</th>
 | |
|                                     <th>Supporter</th>
 | |
|                                     <th>Tools</th>
 | |
|                                 </tr>
 | |
|                                 </thead>
 | |
|                                 <tbody>
 | |
|                                 <?php foreach ($contactMessages as $message) {
 | |
|                                     extract($message);
 | |
|                                     $datetime = strtotime($datetime); ?>
 | |
|                                     <tr id="entry-<?= $ID ?>">
 | |
|                                         <td>
 | |
|                                             <?= $ID ?>
 | |
|                                         </td>
 | |
|                                         <td>
 | |
|                                             <?= date("d.m.Y", $datetime) . " - " . DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$datetime"), $_SESSION['site_lang']) ?>
 | |
|                                         </td>
 | |
|                                         <td onclick="readMessage(<?= $message ?>)">
 | |
|                                             <?= strlen($message) > 23 ? substr($message, 0, 20) . '...' : $message ?>
 | |
|                                         </td>
 | |
|                                         <td>
 | |
|                                             <?php if ($username != null): ?>
 | |
|                                                 <a href="<?= base_url('user/' . $username) ?>" target="_blank">
 | |
|                                                     <?= $displayname ?>
 | |
|                                                 </a>
 | |
|                                             <?php endif; ?>
 | |
|                                         </td>
 | |
|                                         <td>
 | |
|                                             <a href="mailto:<?= $userEmail ?>">
 | |
|                                                 <?= $userEmail ?>
 | |
|                                             </a>
 | |
|                                         </td>
 | |
|                                         <td>
 | |
|                                             <?= $isUnread ? '<i class="fa fa-lightbulb"></i> Ungelesen' : '<i class="far fa-lightbulb"></i> Gelesen' ?>
 | |
|                                         </td>
 | |
|                                         <td>
 | |
| 
 | |
|                                         </td>
 | |
|                                         <td>
 | |
| 
 | |
|                                         </td>
 | |
|                                         <td>
 | |
|                                             <a href="#" class="btn btn-xs btn-default" onclick="readMessage(<?= $message ?>)" data-toggle="tooltip" data-placement="top" title="Nachricht lesen">
 | |
|                                                 <i class="fa fa-eye"></i>
 | |
|                                             </a>
 | |
|                                         </td>
 | |
|                                     </tr>
 | |
|                                 <?php } ?>
 | |
|                                 </tbody>
 | |
|                             </table>
 | |
|                         </div>
 | |
|                     </div>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| 
 | |
| <div class="modal fade" id="statusModal" role="dialog" tabindex="-1" aria-labelledby="statusModalTitle">
 | |
|     <div class="modal-dialog modal-dialog-centered" role="document">
 | |
|         <div class="modal-content">
 | |
|             <div class="modal-header">
 | |
|                 <button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
 | |
|                     <span aria-hidden="true">×</span>
 | |
|                 </button>
 | |
|                 <h4 class="modal-title" id="statusModalTitle">Status ändern</h4>
 | |
|             </div>
 | |
|             <form method="post">
 | |
|                 <div class="modal-body">
 | |
|                     <div class="form-group">
 | |
|                         <label for="feedbackState">Neuer Status
 | |
|                             <select name="feedbackState" class="form-control" id="feedbackState">
 | |
|                                 <option value="new" disabled>ungelesen</option>
 | |
|                                 <option value="read">gelesen</option>
 | |
|                                 <option value="question">Rückfrage</option>
 | |
|                                 <option value="fixing">in Bearbeitung</option>
 | |
|                                 <option value="paused">pausiert</option>
 | |
|                                 <option value="closed">geschlossen</option>
 | |
|                                 <option value="fixed">geschlossen & gelöst</option>
 | |
|                             </select>
 | |
|                         </label>
 | |
|                     </div>
 | |
|                 </div>
 | |
|                 <div class="modal-footer">
 | |
|                     <button class="btn btn-default" type="button" data-dismiss="modal">Schließen</button>
 | |
|                     <button class="btn btn-primary" type="submit">Status ändern</button>
 | |
|                 </div>
 | |
|             </form>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 |