<div class="right" id="right-nav"> <h2>Recent Conversations</h2> <?php if (isset($_REQUEST['purge-old'])) { purge_old_logs(); } ?> <p><button type="submit" name="purge-old" value="month">Purge Old Log Entries</button></p> <?php $sessions = JxBotConverse::latest_sessions(); JxWidget::grid(array(array('id' => 0, 'visible' => false, 'key' => true), array('id' => 1, 'label' => 'Client', 'link' => '?page=chat&subpage=logs&convo=$$')), $sessions); ?> </div> <div id="centre-content"> <h2>Transcript</h2> <style type="text/css"> .log { line-height: 1.7em; } .log-cl {
function page_confirm_new_seq(&$in_existing_seq) { $inputs = JxBotUtil::inputs('category,new-seq'); ?> <?php JxWidget::hidden($inputs, 'category,new-seq'); JxWidget::hidden('override', 1); ?> <h2>Confirm New Sequence</h2> <p>There are already one or more sequences in the database that exactly match the proposed new sequence.</p> <?php JxWidget::grid(array(array('label' => 'Category', 'id' => 0), array('label' => 'Sequence', 'id' => 2)), $in_existing_seq); ?> <p>Are you sure you want to add this sequence?</p> <p><?php JxWidget::button('Cancel', 'action', 'edit'); ?> <?php JxWidget::button('Add Sequence', 'action', 'add-seq'); ?> </p> <?php }
function list_items($in_set) { $stmt = JxBotDB::$db->prepare('SELECT name FROM _set WHERE id=?'); $stmt->execute(array($in_set)); $row = $stmt->fetchAll(PDO::FETCH_NUM); print '<h2>' . $row[0][0] . '</h2>'; JxWidget::hidden('subpage', 'sets'); JxWidget::hidden('set', $in_set); $stmt = JxBotDB::$db->prepare('SELECT id,phrase FROM set_item WHERE id=? ORDER BY phrase'); $stmt->execute(array($in_set)); $items = $stmt->fetchAll(PDO::FETCH_NUM); JxWidget::grid(array(array('label' => 'Phrase', 'id' => 1, 'key' => true), array('label' => 'Delete', 'id' => ':delete', 'link' => '?page=database&subpage=sets&action=delete-item&item=$$')), $items); print '<p><input type="text" size="30" name="item-phrase"> <button type="submit" name="action" value="new-item">Add Item</button></p>'; }
function list_items($in_map) { $stmt = JxBotDB::$db->prepare('SELECT name FROM _map WHERE id=?'); $stmt->execute(array($in_map)); $row = $stmt->fetchAll(PDO::FETCH_NUM); print '<h2>' . $row[0][0] . '</h2>'; JxWidget::hidden('subpage', 'maps'); JxWidget::hidden('map', $in_map); $stmt = JxBotDB::$db->prepare('SELECT id,s_from,s_to FROM map_item WHERE map=? ORDER BY s_from'); $stmt->execute(array($in_map)); $items = $stmt->fetchAll(PDO::FETCH_NUM); JxWidget::grid(array(array('label' => 'ID', 'id' => 0, 'key' => true, 'visible' => false), array('label' => 'From', 'id' => 1, 'whitespace' => 'preserve'), array('label' => 'To', 'id' => 2, 'whitespace' => 'preserve'), array('label' => 'Delete', 'id' => ':delete', 'link' => '?page=database&subpage=maps&action=delete-item&item=$$')), $items); print '<p><input type="text" size="30" name="item-from"> : <input type="text" size="30" name="item-to"> <button type="submit" name="action" value="new-item">Add Item</button></p>'; }