Example #1
0
 public function init()
 {
     //chamando a client pois é lá que são tratados os metodos que o pelado fez
     include_once Config::FOLDER_APPLICATION . "controller/Client.php";
     $ClientController = new Client();
     if (count($this->arrayRestFolder) == 0) {
         return $ClientController->purchase();
     }
     return $ClientController->init();
 }
 public static function sendLog($message)
 {
     return;
     if ($_SERVER["SERVER_NAME"] != "localhost") {
     }
     Yii::import('ext.ElephantIO.Client');
     if (!is_string($message)) {
         $message = NodeLogger::renderJSON($message);
     }
     //$elephant = new Client('http://pukul.in:10001', 'socket.io', 1, false, true, true);
     $elephant = new Client('http://localhost:8000', 'socket.io', 1, false, true, true);
     $elephant->init();
     $elephant->emit('newmessage', date("Y-m-d H:i:s") . "\n" . $message);
     $elephant->close();
     //echo "SEND MESSAGE ".$message;
 }
Example #3
0
require_once 'Bmp.php';
require_once 'Client.php';
$CONFIGS = (require_once 'configs.php');
// Apply configs
if ($CONFIGS['DEBUG']) {
    // Do not show debug if the request is from roBrowser
    if (empty($_SERVER['HTTP_X_APPLICATION']) || $_SERVER['HTTP_X_APPLICATION'] !== 'roBrowser') {
        Debug::enable();
    }
}
Client::$path = '';
Client::$data_ini = $CONFIGS['CLIENT_RESPATH'] . $CONFIGS['CLIENT_DATAINI'];
Client::$AutoExtract = $CONFIGS['CLIENT_AUTOEXTRACT'];
// Initialize client
ini_set('memory_limit', '1000M');
Client::init();
/**
 * SEARCH ACCESS
 * This features is only used in map/rsm/str/grf viewer
 * If you are not using them, you can comment this block
 */
if (isset($_POST['filter']) && is_string($_POST['filter'])) {
    header('Status: 200 OK', true, 200);
    header('Content-type: text/plain');
    if (!$CONFIGS['CLIENT_ENABLESEARCH']) {
        exit;
    }
    $filter = ini_get('magic_quotes_gpc') ? stripslashes($_POST['filter']) : $_POST['filter'];
    $filter = utf8_decode('/' . $filter . '/i');
    $list = Client::search($filter);
    die(implode("\n", $list));