gitea init
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once __DIR__ . '/../../../includes/init.php';
|
||||
require_once __DIR__ . '/../../../../vendor/autoload.php';
|
||||
use App\Config;
|
||||
|
||||
|
||||
$success = isset($_GET['sent']) && $_GET['sent'] == 1;
|
||||
|
||||
// კლიენტების წამოღება
|
||||
MarketingModel::setDb($pdo);
|
||||
$clients = MarketingModel::getAllClients();
|
||||
?>
|
||||
|
||||
<?php require_once Config::includePath('head.php'); ?>
|
||||
<?php require_once Config::includePath('navbar.php'); ?>
|
||||
<?php require_once Config::includePath('pageheader.php'); ?>
|
||||
<?php require_once Config::includePath('pagebodystart.php'); ?>
|
||||
|
||||
|
||||
<div class="container-xl mt-4">
|
||||
<h2>ელ.ფოსტის გაგზავნა კლიენტებზე</h2>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div class="alert alert-success">შეტყობინება წარმატებით გაიგზავნა!</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="dashboard.php?module=marketing&action=broadcast" method="POST">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">აირჩიე კლიენტები</label><br>
|
||||
<?php foreach ($clients as $client): ?>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="clients[]" value="<?= $client['id'] ?>">
|
||||
<label class="form-check-label"> <?= htmlspecialchars($client['first_name'] . ' ' . $client['last_name']) ?> </label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">თემა</label>
|
||||
<input type="text" name="subject" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">შეტყობინება</label>
|
||||
<textarea name="message" class="form-control" rows="5" required></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">გაგზავნა</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php require_once Config::includePath('footer.php'); ?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once __DIR__ . '/../../../includes/init.php';
|
||||
require_once __DIR__ . '/../../../../vendor/autoload.php';
|
||||
use App\Config;
|
||||
?>
|
||||
|
||||
<?php require_once App\Config::includePath('head.php'); ?>
|
||||
<?php require_once App\Config::includePath('navbar.php'); ?>
|
||||
<?php require_once App\Config::includePath('pageheader.php'); ?>
|
||||
<?php require_once App\Config::includePath('pagebodystart.php'); ?>
|
||||
|
||||
<div class="container-xl mt-4">
|
||||
<h2>ელ.ფოსტის გაგზავნის ისტორია</h2>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>კლიენტი</th>
|
||||
<th>თემა</th>
|
||||
<th>შეტყობინება</th>
|
||||
<th>გაგზავნის დრო</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($emailLogs as $log): ?>
|
||||
<tr>
|
||||
<td><?= htmlspecialchars($log['first_name'] . ' ' . $log['last_name']) ?></td>
|
||||
<td><?= htmlspecialchars($log['subject']) ?></td>
|
||||
<td><?= nl2br(htmlspecialchars($log['message'])) ?></td>
|
||||
<td><?= htmlspecialchars($log['sent_at']) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php require_once App\Config::includePath('footer.php'); ?>
|
||||
Reference in New Issue
Block a user