Ejemplo n.º 1
0
<?php

$json = array();
foreach (admin_query::while_chat_messages(array('max' => 5, 'orderby' => 'date DESC')) as $item) {
    $json[] = array('id' => $item->ID, 'avatar' => \query\main::user_avatar($item->user_avatar), 'name' => $item->user_name, 'text' => \site\utils::bbcodes($item->text), 'date' => $item->date, 'gfdate' => date('Y.m.d, ' . (\query\main::get_option('hour_format') == 12 ? 'g:i A' : 'G:i'), strtotime($item->date)));
}
echo json_encode($json);
Ejemplo n.º 2
0
        echo '</div>';
        if ($p['results']) {
            echo '<form action="?route=chat.php&amp;action=list" method="POST">

<ul class="elements-list">

<li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>';
            $ab_del = ab_to(array('chat' => 'delete'));
            if ($ab_del) {
                echo '<div class="bulk_options">';
                if ($ab_del) {
                    echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button>';
                }
                echo '</div>';
            }
            foreach (admin_query::while_chat_messages(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) {
                echo '<li>
  <input type="checkbox" name="id[' . $item->ID . ']" />

  <div style="display: table;">

  <img src="' . \query\main::user_avatar($item->user_avatar) . '" alt="" />

  <div class="info-div"><h2>' . $item->user_name . '
  <span class="fright date">' . date('Y.m.d, ' . (\query\main::get_option('hour_format') == 12 ? 'g:i A' : 'G:i'), strtotime($item->date)) . '</span></h2>
  <div class="info-bar">' . \site\utils::bbcodes($item->text) . '</div>

  </div></div>

  <div class="options">';
                if ($ab_del) {