Skip to content

Commit

Permalink
More stats
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Jan 2, 2024
1 parent da13cba commit 9a06ffa
Showing 1 changed file with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,81 @@
<h3><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('lhcphpresquetheme/admin','Statistic')?></h3>
<ul>
<li><a href="<?=erLhcoreClassDesign::baseurl('lhcphpresque/options')?>">Options</a></li>

<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`chat_id`) FROM lhc_lheschat_index WHERE status = 0');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Chats pending to index - " . $records . "</li>";
} catch (Exception $e) {

}
?>

<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`chat_id`) FROM lhc_lheschat_index WHERE status = 1');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Chats index in progress - " . $records . "</li>";
} catch (Exception $e) {

}
?>

<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`mail_id`) FROM lhc_lhesmail_index WHERE status = 0 AND op = 1');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Conversations to index - " . $records . "</li>";
} catch (Exception $e) {

}
?>


<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`mail_id`) FROM lhc_lhesmail_index WHERE status = 1 AND op = 1');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Conversations index in progress - " . $records . "</li>";
} catch (Exception $e) {

}
?>


<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`mail_id`) FROM lhc_lhesmail_index WHERE status = 0 AND op = 0');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Mails to index - " . $records . "</li>";
} catch (Exception $e) {

}
?>

<?php
try {
$db = ezcDbInstance::get();
$stmt = $db->prepare('SELECT count(`mail_id`) FROM lhc_lhesmail_index WHERE status = 1 AND op = 0');
$stmt->execute();
$records = $stmt->fetchColumn();
echo "<li>Mails index progress - " . $records . "</li>";
} catch (Exception $e) {

}
?>

</ul>
<div class="row">
<div class="col-sm-4">
Expand Down

0 comments on commit 9a06ffa

Please sign in to comment.