Esempio n. 1
0
 /**
  * function show
  * render and return content
  * @return mixed|void
  */
 function show()
 {
     $data = json_decode(file_get_contents("php://input"), true);
     if (isset($data['name'])) {
         Data::user_create_instance($data['name']);
     }
 }
Esempio n. 2
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     header('Content-type: application/json');
     $data = json_decode(file_get_contents("php://input"), true);
     Adapter::secure_query('UPDATE users SET hide_online = :hideonline, hide_inroom = :hideinroom, block_newfriends = :blocknewfriends WHERE id = :userid', [':hideonline' => (int) (!$data['onlineStatusVisible']), ':hideinroom' => (int) (!$data['friendCanFollow']), ':blocknewfriends' => (int) (!$data['friendRequestEnabled']), ':userid' => Data::$user_instance->user_id]);
     Data::user_create_instance(Data::$user_instance->user_name);
 }
Esempio n. 3
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     header('Content-type: application/json');
     if (!isset($_SESSION['is_newbie'])) {
         return null;
     }
     $code = 'NAME_IN_USE';
     $validation_object = new stdClass();
     $validation_object->validationResult = null;
     $validation_object->suggestions = [];
     if (isset($_GET['aname'])) {
         $name = Misc::escape_text($_GET['aname']);
         $user_id = Data::$user_instance->user_id;
         if (strlen($name) >= 3 && strlen($name) <= 30 && preg_match('`[a-z]`', $name) && substr_count($name, ' ') == 0 && stripos($name, 'MOD_') === false) {
             if (Adapter::row_count(Adapter::secure_query("SELECT username FROM users WHERE username = :username LIMIT 1", [':username' => $name])) == 0 || $name == Data::$user_instance->user_name) {
                 if (Data::$user_instance->is_newbie == 1) {
                     Adapter::secure_query("UPDATE users SET username = :username WHERE id = :userid", [':username' => $name, ':userid' => $user_id]);
                     Adapter::secure_query("UPDATE users SET novato = '2' WHERE id = :userid", [':userid' => $user_id]);
                     Data::user_create_instance($user_id);
                     $code = 'OK';
                 }
             }
         } else {
             $validation_object->validationResult = new stdClass();
             $validation_object->validationResult->resultType = 'VALIDATION_ERROR_ILLEGAL_WORDS';
             $validation_object->validationResult->additionalInfo = 'MOD_';
             $validation_object->validationResult->valid = false;
         }
     }
     $validation_object->code = $code;
     return json_encode($validation_object);
 }
Esempio n. 4
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     if (Validate::do_validate(4) == true) {
         return Data::framework_instance(true)->page;
     } else {
         header("Location: /theallseeingeye/web/login");
         return null;
     }
 }
Esempio n. 5
0
 /**
  * function get_system_class
  * return the variables of the system instance
  * @return mixed
  */
 static function get_system_class()
 {
     if (Data::check_if_system_exists()) {
         foreach (get_class_vars(get_class(Data::$system_instance)) as $name => $value) {
             $hotel_array[$name] = Data::$system_instance->{$name};
         }
         return $hotel_array;
     }
     return null;
 }
Esempio n. 6
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     header('Content-type: application/json');
     header('HTTP/1.1 200 OK');
     if (!isset($_SESSION['is_newbie'])) {
         return;
     }
     if (Data::$user_instance->is_newbie == 0) {
         return;
     }
     if (Data::$user_instance->is_newbie == 1) {
         return;
     }
     $room_index = Misc::escape_text($_GET['aroomIndex']);
     $user_id = Data::$user_instance->user_id;
     $username = Data::$user_instance->user_name;
     if ($room_index == 1) {
         $floor = '610';
         $wallpaper = '2403';
         $landscape = '0.0';
     } elseif ($room_index == 2) {
         $floor = '307';
         $wallpaper = '3104';
         $landscape = '1.10';
     } elseif ($room_index == 3) {
         $floor = '409';
         $wallpaper = '1902';
         $landscape = '0.0';
     }
     if (Data::$user_instance->is_newbie == 2) {
         Adapter::secure_query("INSERT INTO rooms_data\n                                    (roomtype, caption, owner, description, category, state, users_max, model_name, wallpaper, floor, landscape) VALUES\n                                    ('private', :caption, :username, :owner, '2', 'open', '25', 'model_h', :wallpaper, :floor, :landscape)", [':caption' => "Central {$username}", ':username' => $username, ':owner' => "Quarto de {$username}", ':wallpaper' => $wallpaper, ':floor' => $floor, ':landscape' => $landscape]);
         $instance = Adapter::get_instance();
         $room_id = $instance->lastInsertId();
         Adapter::secure_query("UPDATE users SET home_room = :room WHERE id = :user", [':room' => $room_id, ':user' => $user_id]);
         if ($room_index == 3) {
             Adapter::query("INSERT INTO items_rooms VALUES\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3397', '3', '8', '7', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2946', '', '10', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2666', '3', '6', '7', '1.300', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2681', '3', '9', '7', '1.300', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3397', '3', '7', '7', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2675', '0', '5', '10', '0.000', '6', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3397', '3', '6', '7', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3397', '3', '9', '7', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2673', '1', '6', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3867', '', '7', '2', '1.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2673', '1', '8', '10', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2677', '1', '4', '10', '0.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2673', '1', '8', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2673', '1', '6', '10', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2675', '0', '5', '9', '0.000', '6', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2672', '1', '4', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2677', '1', '4', '9', '0.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3901', '', '9', '3', '1.000', '6', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3901', '', '6', '3', '1.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '14066', '2', '0', '0', '0.000', '0', ':w=4,8 l=0,27 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '14386', '0', '0', '0', '0.000', '0', ':w=4,7 l=5,29 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '14071', '0', '0', '0', '0.000', '0', ':w=2,10 l=4,43 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '14072', '1', '0', '0', '0.000', '0', ':w=8,1 l=14,27 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '14383', '1', '0', '0', '0.000', '0', ':w=6,1 l=5,31 r', '0', '', '0', '0');");
         } elseif ($room_index == 2) {
             Adapter::query("INSERT INTO items_rooms VALUES\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2957', '2', '3', '10', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '9', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2853', '', '3', '9', '0.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3889', '1', '8', '2', '1.470', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3898', '1', '9', '8', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2487', '', '5', '11', '1.300', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3880', '0', '8', '8', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4182', '2', '3', '9', '0.800', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2781', '', '4', '9', '0.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2952', '0', '3', '10', '0.400', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '7', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3900', '0', '5', '4', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3302', '', '7', '3', '1.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2502', '0', '3', '10', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2952', '0', '3', '12', '0.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3870', '0', '9', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2955', '', '3', '11', '0.000', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '8', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '10', '4', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3880', '1', '10', '8', '0.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3806', '', '5', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2957', '2', '3', '9', '0.400', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3870', '0', '8', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3880', '1', '8', '9', '0.000', '6', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3900', '0', '5', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '10', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '7', '4', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3870', '0', '9', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2955', '', '4', '9', '0.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '7', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3312', '0', '8', '3', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '9', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2957', '0', '3', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '10', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3870', '0', '8', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '10', '3', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2781', '', '3', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2781', '', '3', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3315', '0', '8', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8029', '', '0', '0', '0.000', '0', ':w=4,8 l=7,31 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8262', '1', '0', '0', '0.000', '0', ':w=4,5 l=11,33 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8108', '1', '0', '0', '0.000', '0', ':w=7,1 l=9,31 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8108', '1', '0', '0', '0.000', '0', ':w=10,1 l=0,26 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8262', '1', '0', '0', '0.000', '0', ':w=4,3 l=5,37 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8096', '0', '0', '0', '0.000', '0', ':w=2,11 l=5,58 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8029', '', '0', '0', '0.000', '0', ':w=4,8 l=8,31 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8096', '0', '0', '0', '0.000', '0', ':w=2,10 l=10,56 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8108', '3', '0', '0', '0.000', '0', ':w=5,1 l=15,34 r', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8108', '3', '0', '0', '0.000', '0', ':w=9,1 l=0,26 r', '0', '', '0', '0');");
         } elseif ($room_index == 1) {
             Adapter::query("INSERT INTO items_rooms VALUES\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3893', '1', '8', '4', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '18', '', '10', '9', '0.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4636', '', '3', '10', '0.010', '2', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2169', '', '9', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2188', '', '7', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4654', '', '3', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '18', '', '10', '12', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4654', '', '5', '9', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3712', '', '9', '10', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3642', '1', '7', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '18', '', '9', '12', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3632', '4', '9', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '18', '', '9', '9', '0.000', '4', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4654', '', '5', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '2228', '', '8', '5', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '3632', '4', '6', '2', '1.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '4654', '', '3', '11', '0.000', '0', '', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8364', '', '0', '0', '0.000', '0', ':w=2,10 l=1,34 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8021', '0', '0', '0', '0.000', '0', ':w=4,3 l=12,34 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8294', '0', '0', '0', '0.000', '0', ':w=2,10 l=2,34 l', '0', '', '0', '0'),\n\t\t\t\t\t\t\t\t(null, '{$user_id}', '{$room_id}', '8199', '1', '0', '0', '0.000', '0', ':w=4,8 l=0,45 r', '0', '', '0', '0');");
         }
     }
     Adapter::secure_query("UPDATE users SET novato = '0' WHERE username = :username OR id = :userid", [':username' => $username, ':userid' => $user_id]);
     Data::user_create_instance($user_id);
     $_SESSION['is_newbie'] = false;
     return null;
 }
Esempio n. 7
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     $data = json_decode(file_get_contents("php://input"), true);
     $query = Adapter::secure_query('SELECT * FROM cms_users_verification WHERE user_hash = :userhash', [':userhash' => $data['token']]);
     if (Adapter::row_count($query) == 1) {
         $fetch = Adapter::fetch_object($query);
         Adapter::secure_query('UPDATE cms_users_verification SET verified = :verified WHERE user_hash = :userhash', [':verified' => 'true', ':userhash' => $data['token']]);
         Data::user_create_instance($fetch->user_id);
         $row = Adapter::fetch_object(Adapter::secure_query('SELECT mail FROM users WHERE id = :userid', [':userid' => $fetch->user_id]));
         $activate_object = new stdClass();
         $activate_object->email = $row->mail;
         $activate_object->emailVerified = true;
         $activate_object->identityVerified = true;
         return json_encode($activate_object);
     }
     header('HTTP/1.1 404 Not Found');
     $error_object = new stdClass();
     $error_object->error = 'activation.invalid_token';
     return json_encode($error_object);
 }
Esempio n. 8
0
 /**
  * function load_page
  * load the page
  * @param bool $render_page
  */
 private function load_page($render_page = true)
 {
     $this->check_installation();
     // collect user and system data
     $init = Data::check_if_user_exists() ? Data::$user_instance : null;
     // universalize the settings
     $page = new Page($database_settings = unserialize(DATABASE_SETTINGS), $system_settings = unserialize(SYSTEM_SETTINGS), $init);
     // start cms settings
     Data::system_create_instance($system_settings['server_lang']);
     // check of banned user
     User::check_banned_account();
     // set the page & store page data
     if ($render_page) {
         $this->page = $this->page . $page->serialize_page($page->create_page($page->trace_routers()));
     }
     // let's do benchmark
     if ($system_settings['bench_enabled']) {
         $this->page = $this->page . "<!-- \r\n" . Benchmark::run(false) . " \r\n -->";
     }
     // oke!
 }
Esempio n. 9
0
<?php

/*
* * azure project presents:
                                         _
                                        | |
__,   __          ,_    _             _ | |
/  |  / / _|   |  /  |  |/    |  |  |_|/ |/ \_
\_/|_/ /_/  \_/|_/   |_/|__/   \/ \/  |__/\_/
       /|
       \|
				azure web
				version: 1.0a
				azure team
* * be carefully.
*/
// include load file
include_once '../Vendor/autoload.php';
// include load file
include_once '../Api/Init.php';
use Azure\Framework;
use Azure\Response;
use Azure\View;
use Azure\View\Data;
// start session
session_start();
Data::framework_instance(false, new Framework(true));
Data::check_if_user_exists();
Data::check_if_system_exists();
new Response();
Esempio n. 10
0
 /**
  * function show
  * render and return content
  * @param int $data
  * @return null|string
  */
 function show($data = 0)
 {
     return str_replace(['\\r', '\\n', '\\'], '', Data::compose_news(true, str_replace('.en', '', Misc::escape_text($data))));
 }
Esempio n. 11
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     return Data::framework_instance(true)->page;
 }
Esempio n. 12
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     return Data::compose_campaigns(true);
 }
Esempio n. 13
0
 /**
  * function get_user_data
  * return a json of the users
  * @param int $type
  * @param bool $user_name
  * @param bool $is_numeric
  * @return null|string
  */
 function get_user_data($type = 4, $user_name = false, $is_numeric = false)
 {
     if (Data::check_if_user_exists()) {
         if ($user_name) {
             Data::user_create_instance($user_name, true);
         }
         switch ($type) {
             case 4:
             case 3:
                 return Data::$user_instance->user_json->get_json();
             case 2:
                 return '{"user":'******',"friends":' . json_encode(Data::$user_instance->user_friends) . ',"groups":' . json_encode(Data::$user_instance->user_groups) . ',"rooms":' . json_encode(Data::$user_instance->user_rooms) . ',"badges":' . json_encode(Data::$user_instance->user_badges) . '}';
         }
     }
     return null;
 }
Esempio n. 14
0
 /**
  * function show
  * render and return content
  */
 function show()
 {
     header('Content-type: application/json');
     return Data::compose_news(true);
 }
Esempio n. 15
0
<?php

/*
* * azure project presents:
                                         _
                                        | |
__,   __          ,_    _             _ | |
/  |  / / _|   |  /  |  |/    |  |  |_|/ |/ \_
\_/|_/ /_/  \_/|_/   |_/|__/   \/ \/  |__/\_/
       /|
       \|
				azure web
				version: 1.0a
				azure team
* * be carefully.
*/
// include load file
include_once '../Vendor/autoload.php';
// include load file
include_once '../Api/Init.php';
use Azure\Framework;
use Azure\View;
use Azure\View\Data;
// start session
session_start();
Data::framework_instance(false, new Framework(true));
Data::check_if_user_exists();
Data::check_if_system_exists();
echo Data::framework_instance(true)->page;
Esempio n. 16
0
 /**
  * function serialize
  * serialize content
  * @param string $wait_serialize
  * @return mixed
  */
 function serialize_page($wait_serialize = '')
 {
     // lang serialize
     $this->load_json(Data::$system_instance->server_lang);
     // foreach lang data
     foreach ($this->lang_content as $key => $value) {
         $wait_serialize = strpos($wait_serialize, '{{lang_' . strtolower($key) . '}}') != false ? str_replace('{{lang_' . strtolower($key) . '}}', $value, $wait_serialize) : $wait_serialize;
     }
     // foreach user data
     foreach ($this->user_data as $key => $value) {
         $wait_serialize = strpos($wait_serialize, '{{' . strtolower($key) . '}}') != false ? str_replace('{{' . strtolower($key) . '}}', $value, $wait_serialize) : $wait_serialize;
     }
     // foreach settings data
     foreach ($this->cms_settings as $key => $value) {
         $wait_serialize = strpos($wait_serialize, '{{' . strtolower($key) . '}}') != false ? str_replace('{{' . strtolower($key) . '}}', $value, $wait_serialize) : $wait_serialize;
     }
     // foreach system data
     foreach (System::get_system_class() as $key => $value) {
         $wait_serialize = strpos($wait_serialize, '{{' . strtolower($key) . '}}') != false ? str_replace('{{' . strtolower($key) . '}}', $value, $wait_serialize) : $wait_serialize;
     }
     // for the client..
     $wait_serialize = strpos($wait_serialize, '{{client_tick}}') != false ? str_replace('{{client_tick}}', User::generate_ticket(), $wait_serialize) : $wait_serialize;
     $wait_serialize = strpos($wait_serialize, '{{user_data}}') != false ? str_replace('{{user_data}}', Data::check_if_user_exists() ? Data::$user_instance->get_user_data(4) : 'null', $wait_serialize) : $wait_serialize;
     $wait_serialize = strpos($wait_serialize, '{{user_hash}}') != false ? str_replace('{{user_hash}}', User::user_hash(), $wait_serialize) : $wait_serialize;
     // let's go
     return $wait_serialize;
 }