Пример #1
1
 public function action_history()
 {
     $data = array('content' => $this->executeCommand(), 'currentdb' => Request::factory()->getDb(), 'cmd' => Request::factory()->getCmd(), 'dbkeys' => Helper_Info::getCountKeysInDb(), 'history' => History::getLast($_SESSION['login']));
     if (Request::factory()->getAjax()) {
         header('Content-Type: application/json');
         echo json_encode($data);
     } else {
         echo View::factory('layout', $data);
     }
 }
Пример #2
0
<?php

include_once "../../includes/config.inc.php";
include_once "../../includes/login_check.php";
$customer_id = $_SESSION['customer_id'];
//submit
if (method_is('post')) {
    //save
    $infoHelper = new Helper_Info();
    $result = $infoHelper->save('common');
    //return
    ajax_feedback($result['success'], $result['content']);
}