$activeRepost = $obj->checkRepost($key['id'], $_SESSION['authenticated']);
         //============ REPOST SESSION CURRENT
         if ($activeRepost == 1) {
             $spanRepost = ' repostedSpan';
             $textRepost = $_SESSION['LANG']['reposted'];
         } else {
             $spanRepost = null;
             $textRepost = $_SESSION['LANG']['repost'];
         }
         /*
          * -------------------------------------------------
          *      If the picture is larger than 440 pixels, 
          *      show the thumbnail
          * -------------------------------------------------
          */
         $widthPhoto = _Function::getWidth('../../upload/' . $key['photo']);
         if ($widthPhoto >= 600) {
             $thumbPic = 'thumb/600-600-';
         } else {
             $thumbPic = null;
         }
         /*
          * -------------------------------------
          *  POST DETAILS / EXPAND / FAVS ETC
          * -------------------------------------
          */
         include 'post_details.php';
     }
     //<<<--- Foreach
 }
 //<<<---- $countPosts != 0
         	<?php 
    if ($this->infoUser->date != '') {
        ?>
         	<dt>Date: <span style="font-weight: normal"><?php 
        echo date('Y/m/d', strtotime($this->infoUser->date));
        ?>
</span></dt>
         	<?php 
    }
    ?>
         	
         	<?php 
    if ($this->infoUser->website != '') {
        ?>
         	<dt>Website: <span style="font-weight: normal"><?php 
        echo _Function::linkText($this->infoUser->website);
        ?>
</span></dt>
         	<?php 
    }
    ?>
         	
         	<?php 
    if ($this->infoUser->bio != '') {
        ?>
         	<dt>Bio: <span style="font-weight: normal"><?php 
        echo htmlentities($this->infoUser->bio, ENT_QUOTES, 'UTF-8');
        ?>
</span></dt>
         	<?php 
    }
 $valid_formats = array("jpg", "JPG", "jpeg", "png", "x-png", "gif", "pjpeg");
 if (isset($_POST) && $_SERVER['REQUEST_METHOD'] == "POST") {
     $name = $_FILES['photo']['name'];
     $size = $_FILES['photo']['size'];
     if (strlen($name)) {
         $ext = pathinfo($name);
         if (in_array($ext['extension'], $valid_formats)) {
             if ($size < 1500 * 1500) {
                 $photo_post = 'bg_' . strtolower($infoUser->username) . "_" . $session_id . "" . _Function::randomString(5, FALSE, TRUE, FALSE) . "." . strtolower($ext['extension']);
                 $tmp = $_FILES['photo']['tmp_name'];
                 if (move_uploaded_file($tmp, $path . $photo_post)) {
                     //=============== 440 px =================//
                     $width = _Function::getWidth($path . $photo_post);
                     $height = _Function::getHeight($path . $photo_post);
                     $scale = 1;
                     $uploaded = _Function::resizeImage($path . $photo_post, $width, $height, $scale, $path . $photo_post);
                     //<=//   PHOTO LARGE     =//>
                     $photo_post_id = $photo_post;
                     //==================================================//
                     //=            * COPY FOLDER AVATAR /         *    =//
                     //==================================================//
                     if (file_exists($path . $photo_post) && isset($photo_post_id)) {
                         copy($path . $photo_post, $path_bg . $photo_post);
                         unlink($path . $photo_post);
                     }
                     //<--- IF FILE EXISTS	#2
                     //<<<-- Delete old image -->>>/
                     if (file_exists($bg_old) && $infoUser->bg != '' && !in_array($infoUser->bg, $defaults)) {
                         unlink($bg_old);
                     }
                     //<--- IF FILE EXISTS #1
								</a>
							</div>
						<h6 class="media-heading"><a href="<?php 
                echo URL_BASE . $key['username'];
                ?>
" class="username-title"><strong><?php 
                echo stripslashes($key['name']) . $verified;
                ?>
</strong>
						</a> <small style="color: #999;">@<?php 
                echo $key['username'];
                ?>
</small>
						</h6>
				    	<p class="list-grid-block p-text"><?php 
                echo _Function::checkText($key['message']);
                ?>
</p>
				  		<span class="small sm-font sm-date timestamp timeAgo" data="<?php 
                echo date('c', strtotime($key['date']));
                ?>
"></span><!-- small sm-font sm-date -->
		     </div><!-- media-body -->
	    </li><!-- ******* media li-group ********  -->
	    <?php 
            }
            //<<<--- Foreach
        }
    }
    //<-- ISSET POST
}
        //================================================//
        if ($countReply != 0) {
            for ($u = 0; $u < $countReply; ++$u) {
                //<--- * User Verified * --->
                if ($getReply[$u]['type_account'] == 1) {
                    $verified = ' <i class="fa fa-check-circle verified verified-min showTooltip" title="' . $_SESSION["LANG"]["verified"] . '" data-toggle="tooltip" data-placement="right"></i>';
                } else {
                    $verified = null;
                }
                //<--- * Delete Reply* --->
                if ($_SESSION['authenticated'] == $getReply[$u]['id']) {
                    $removeReply = ' <div class="pull-right small"> <a href="javascript:void(0);" data="' . $getReply[$u]['idReply'] . '" class="link-post showTooltip removeReply" title="' . $_SESSION['LANG']['delete'] . '" data-toggle="tooltip" data-placement="top"> <i class="glyphicon glyphicon-remove size-icon"></i> </a> </div>';
                } else {
                    $removeReply = null;
                }
                $replyArr[] = "<div class='media li-group reply-list'>\r\n\t\t\t\t  \t<a class='pull-left openModal' data-id='" . $getReply[$u]['id'] . "' href='" . URL_BASE . $getReply[$u]['username'] . "'>\r\n\t\t\t\t    \t<img class='media-object img-circle' src='" . URL_BASE . 'thumb/40-40-public/avatar/' . $getReply[$u]['avatar'] . "' width='40'>\r\n\t\t\t\t  \t</a>\r\n\t\t\t\t  \t<div class='media-body'>\r\n\t\t\t\t\t\t\t" . $removeReply . "\r\n\t\t\t\t\t\t<h6 class='media-heading'>\r\n\t\t\t\t\t\t\t<a href='" . URL_BASE . $getReply[$u]['username'] . "' data-id='" . $getReply[$u]['id'] . "' class='username-posts openModal'><strong>" . stripslashes($getReply[$u]['name']) . "</strong> " . $verified . "</a> <small class='username-ui'>@" . $getReply[$u]['username'] . "</small>\r\n\t\t\t\t\t\t\t</h6>\r\n\t\t\t\t    \t<p class='list-grid-block p-text'>\r\n\t\t\t\t    \t\t" . _Function::checkText($getReply[$u]['reply']) . "\r\n\t\t\t\t    \t</p>\r\n\t\t\t\t    \t<span class='timestamp timeAgo small sm-font sm-date' data='" . date('c', strtotime($getReply[$u]['date'])) . "'></span>\r\n\t\t\t\t  \t</div>\r\n\t\t\t\t</div>";
            }
        }
        //<---
        /* Report Post */
        if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'] != $getMedia[0]['user']) {
            $report = '<li class="list-breadc"> <a href="javascript:void(0);" class="iReport reportPost" data="' . $getMedia[0]['id'] . '" data-token="' . $getMedia[0]['token_id'] . '"> <i class="icon-flag myicon-right"></i> ' . $_SESSION['LANG']['report'] . ' </a> </li>';
        }
        //<----- Output data
        echo json_encode(array('media' => '
			<ol class="breadcrumb li-group margin-bottom-zero padding-left-zero padding-right-zero">
			  <li class="list-breadc"><span class="fa fa-star myicon-right"></span> ' . $countFavs . '</li>
			  <li class="list-breadc"><span class="fa fa-retweet myicon-right"></span> ' . $getRepost[0]['totalRepost'] . '</li>
			  <li class="favs-list"></li>
			</ol>
			 
 /*
  * ----------------------
  *   Instance Class
  * ----------------------
  */
 $obj = new AjaxRequest();
 include_once '../../application/functions.php';
 include_once '../../application/DataConfig.php';
 $_POST['email'] = trim($_POST['email']);
 $_POST['mode'] = _Function::spaces(trim($_POST['mode']));
 $_POST['username'] = _Function::spaces(trim($_POST['username']));
 $_POST['country'] = _Function::spaces(trim($_POST['country']));
 $infoUser = $obj->infoUserLive($_SESSION['authenticated']);
 $emailAddress = $_POST['email'];
 //<<<--- Defaults Languages
 foreach (_Function::arrayLang() as $key => $value) {
     $defaultsLanguages[] = $value;
 }
 //<<<<--- Languages
 if (!in_array($_POST['lang'], $defaultsLanguages)) {
     $_POST['lang'] = 'en';
 } else {
     $_POST['lang'] = $_POST['lang'];
 }
 if ($infoUser->language != $_POST['lang']) {
     unset($_SESSION['lang_user']);
     $_SESSION['lang_user'] = $_POST['lang'];
     $changeLang = 1;
 } else {
     $changeLang = 0;
 }
			  				' . stripslashes($getPosts[$i]['name']) . ' ' . $verified . '
			  				</a>
			  			</strong> 
			  		@' . $getPosts[$i]['username'] . '
			  	</div>
			  	
				' . $geolocation . '
			  	
				<a href="' . URL_BASE . $getPosts[$i]['username'] . '/status/' . $getPosts[$i]['id'] . '" class="date-status" title="' . date('d/m/Y', strtotime($getPosts[$i]['date'])) . '">
			  		<span class="small sm-font sm-date timestamp timeAgo" data="' . date('c', strtotime($getPosts[$i]['date'])) . '"></span>
			  	</a>
			  
			  </div><!-- panel-heading -->
			  <div class="panel-body">
			  <p class="p-text">
			   ' . _Function::checkText($getPosts[$i]['post_details']) . '
			  </p><!-- End p-text -->
			  ' . $repostUser . '
			  ' . $urlExpand . '
			  ' . $media . '
			  	<ul class="list-inline margin-bottom-zero list-options">
				<li><a data-expand="' . $_SESSION['LANG']['expand'] . '" data-hide="' . $_SESSION['LANG']['hide'] . '" class="expand getData" data="' . $getPosts[$i]['id'] . '" data-token="' . $getPosts[$i]['token_id'] . '">
		  			<span class="textEx">' . $_SESSION['LANG']['expand'] . '</span>
		  			</a>
		  		</li>
		  		<li>
		  	<a data-fav="' . $_SESSION['LANG']['favorite'] . '" data-fav-active="' . $_SESSION['LANG']['favorited'] . '"class="favorite favoriteIcon ' . $classFav . '" ' . $spanFav . ' data="' . $getPosts[$i]['id'] . '" data-token="' . $getPosts[$i]['token_id'] . '">
		  		<span class="fa fa-star myicon-right"></span> 
		  		' . $_SESSION['LANG']['favorite'] . '
		  		</a>
		  	</li>
/* REQUIRE FILES */
try {
    require_once APP_PATH . 'Config.php';
    require_once APP_PATH . 'SPDO.php';
    require_once APP_PATH . 'ModelBase.php';
    require_once APP_PATH . 'Request.php';
    require_once APP_PATH . 'Bootstrap.php';
    require_once APP_PATH . 'Controller.php';
    require_once APP_PATH . 'View.php';
    require_once APP_PATH . 'Sessions.php';
    require_once APP_PATH . 'Db.php';
    require_once APP_PATH . 'AdminSettings.php';
    require_once APP_PATH . 'functions.php';
    // Login Social
    require_once SOCIAL_PATH . 'twitteroauth.php';
    /*-----------------
     * ADMIN SETTINGS
     * ---------------
     */
    $obj = new adminSettings();
    $settings = $obj->getSettings();
    require_once APP_PATH . 'DataConfig.php';
    //<-* SESSION START *->
    Session::init();
    //<-* Languages *->
    _Function::getLang();
    //<- * REQUEST * ->
    Bootstrap::run(new Request());
} catch (Exception $e) {
    echo $e->getMessage();
}
								</a>
							</div>
						<h6 class="media-heading"><a href="<?php 
            echo URL_BASE . $infoUser->username;
            ?>
" class="username-title"><strong><?php 
            echo stripslashes($infoUser->name) . $verified;
            ?>
</strong>
						</a> <small style="color: #999;">@<?php 
            echo $infoUser->username;
            ?>
</small>
						</h6>
				    	<p class="list-grid-block p-text"><?php 
            echo _Function::checkText($_POST['reply_msg']);
            ?>
</p>
				  		<span class="small sm-font sm-date timestamp timeAgo" data="<?php 
            echo date('c', time());
            ?>
"></span><!-- small sm-font sm-date -->
		     </div><!-- media-body -->
	    </li><!-- ******* media li-group ********  -->
	    
		 
		 <?php 
        } else {
            return false;
        }
    }
</small>
						</h6>
				    	<p class="list-grid-block p-text">
				    		<?php 
                    echo $icoDefault . ' ' . $action;
                    ?>
				    	</p>
				    	
				    	<p class="list-grid-block p-text">
				    		<?php 
                    if ($linkDestination == true) {
                        ?>
			   				<p class="margin-zero">
			   					
			   					<?php 
                        echo _Function::checkText($key['post_details']);
                        ?>
			   					<?php 
                        if ($key['video_site'] == '' && $key['post_details'] == '' && $key['url_soundcloud'] == '') {
                            ?>
			   						<a data-view="<?php 
                            echo $_SESSION['LANG']['details'];
                            ?>
 &rarr;" data-url="<?php 
                            echo $urlStatus;
                            ?>
" class="linkImage galeryAjax cboxElement" href="<?php 
                            echo URL_BASE . 'upload/' . $key['photo'];
                            ?>
" rel="lightbox">
			   							<?php 
 } else {
     $verified = null;
 }
 //============ FAVORITES
 if ($key['favoriteUser'] == 1) {
     $classFav = 'favorited';
     $spanFav = ' title="' . $_SESSION['LANG']['trash'] . ' ' . $_SESSION['LANG']['favorite'] . '"';
     $spanAbsolute = '<span class="add_fav"></span>';
     $textFav = $_SESSION['LANG']['favorited'];
 } else {
     $classFav = null;
     $spanFav = null;
     $spanAbsolute = null;
     $textFav = $_SESSION['LANG']['favorite'];
 }
 $widthPhoto = _Function::getWidth(URL_BASE . 'upload/' . $key['photo']);
 if ($widthPhoto >= 600) {
     $thumbPic = 'thumb/600-600-';
 } else {
     $thumbPic = null;
 }
 /* Url */
 $urlStatus = URL_BASE . $key['username'] . '/status/' . $key['id'];
 $activeRepost = $obj->checkRepost($key['id'], $_SESSION['authenticated']);
 //============ REPOST SESSION CURRENT
 if ($activeRepost == 1) {
     $spanRepost = ' repostedSpan';
     $textRepost = $_SESSION['LANG']['reposted'];
 } else {
     $spanRepost = null;
     $textRepost = $_SESSION['LANG']['repost'];
 if (move_uploaded_file($tmp, $path . $photo_large)) {
     //=============== Image Large =================//
     $width = _Function::getWidth($path . $photo_large);
     $height = _Function::getHeight($path . $photo_large);
     $max_width = '1500';
     if ($width < $height) {
         $max_width = '800';
     }
     if ($width > $max_width) {
         $scale = $max_width / $width;
         $uploaded = _Function::resizeImage($path . $photo_large, $width, $height, $scale, $path . $photo_large);
     } else {
         $scale = 1;
         $uploaded = _Function::resizeImage($path . $photo_large, $width, $height, $scale, $path . $photo_large);
     }
     _Function::resizeImageFixed($path . $photo_large, 860, 260, $path . $photo_post);
     //<=//   PHOTO LARGE     =//>
     $photo_post_id = $photo_post;
     //==================================================//
     //=            * COPY FOLDER COVER /         *    =//
     //==================================================//
     if (file_exists($path . $photo_post) && isset($photo_post_id)) {
         //<-------- * Cover 860x260 * ------->
         copy($path . $photo_post, $path_cover . $photo_post);
         unlink($path . $photo_post);
         /* Large Image */
         copy($path . $photo_large, $path_cover . $photo_large);
         unlink($path . $photo_large);
     }
     //<--- IF FILE EXISTS	#2
     //<<<-- Delete old image -->>>/
session_start();
error_reporting(0);
require '../../class_ajax_request/classAjax.php';
include '../../application/functions.php';
include '../../application/DataConfig.php';
$session_id = $_SESSION['authenticated'];
//$session id
$path = "../../tmp/";
$path_avatar = "../avatar/";
$obj = new AjaxRequest();
$infoUser = $obj->infoUserLive($_SESSION['authenticated']);
$imgOld = $path_avatar . $infoUser->avatar;
$imgOldLarge = $path_avatar . 'large_' . $infoUser->avatar;
if (isset($session_id) && isset($_POST['_avatarPosition'])) {
    $ext = pathinfo($imgOldLarge);
    $random = _Function::randomString(5, FALSE, TRUE, FALSE);
    $strRandom = strtolower($infoUser->username) . "_" . $session_id . "" . $random;
    $photo_post = $strRandom . "." . strtolower($ext['extension']);
    $exp = explode(' ', $_POST['_avatarPosition']);
    $posX = trim($exp[0], 'px');
    $posY = trim($exp[1], 'px');
    /* 200x200 px */
    $_size = 200;
    $file = $path_avatar . $imgOldLarge;
    list($width, $height, $imageType) = getimagesize($file);
    $imageType = image_type_to_mime_type($imageType);
    $newImage = imagecreatetruecolor($_size, $_size);
    switch ($imageType) {
        case "image/gif":
            $source = imagecreatefromgif($file);
            break;
         *   Require/Include Files
         * -------------------------
         */
        require_once '../../class_ajax_request/classAjax.php';
        include_once '../../application/functions.php';
        include_once '../../application/DataConfig.php';
        require_once '../../phpmailer/PHPMailerAutoload.php';
        /*
         * --------------------------
         *   Instance Class
         * -------------------------
         */
        $obj = new AjaxRequest();
        $admin = $obj->getSettings();
        $linkHash = sha1($_SERVER['REMOTE_ADDR'] . microtime() . mt_rand(1, 100000) . '%(asqWas8*)');
        $link = _Function::idHash($linkHash) . _Function::randomString(40, TRUE, TRUE, TRUE);
        $linkRecover = '' . URL_BASE . 'recover/?c=' . $link . '';
        // <------------------ DATA ----------->
        $_POST['email_recover'] = trim($_POST['email_recover']);
        $_POST['id_hash'] = $link;
        $emailAddress = $_POST['email_recover'];
        //================ * EMAIL * =================//
        if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
            echo json_encode(array('status' => 'false', 'html' => $_SESSION['LANG']['email_not_valid']));
        } else {
            //<<<--- DATABASE
            $res = $obj->recoverPass();
            /* EMAIL TEMPLATE */
            $messageEmail = '
			<table width="550" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif; font-size: 14px; color: #666;" align="center">
	<tbody>
                /* DATA VIDEO */
                if (isset($_POST['video']) && $_POST['video'] != '' && $isValidYoutube == 1 || isset($_POST['video']) && $_POST['video'] != '' && $isValidVimeoURL == 1) {
                    echo ' ' . $dataVideo;
                }
                ?>
 
							</p>
					    <?php 
            }
            ?>
			 <!-- ******* MEDIA ******** -->
			 
<?php 
            //Class
            $mediaGet = $obj->getMedia_2($response);
            $widthPhoto = _Function::getWidth('../../upload/' . $mediaGet[0]['photo']);
            if ($widthPhoto >= 600) {
                $thumbPic = 'thumb/600-600-';
            } else {
                $thumbPic = null;
            }
            $url_slideshare = preg_replace('#^https?:#', '', rtrim($mediaGet[0]['doc_url'], '/'));
            //==== PHOTO
            if ($mediaGet[0]['photo'] != '') {
                $media = "<a data-view='" . $_SESSION['LANG']['details'] . " &rarr;' data-url=" . $urlStatus . " class='galeryAjax cboxElement link-img' href='" . URL_BASE . "upload/" . $mediaGet[0]['photo'] . "'><img class='photoPost img-responsive' src='" . URL_BASE . $thumbPic . "upload/" . $mediaGet[0]['photo'] . "'></a>";
            } else {
                if ($mediaGet[0]['video_site'] == 'vimeo') {
                    $media = '<div class="embed-responsive embed-responsive-4by3"> <iframe class="embed-responsive-item" src="https://player.vimeo.com/video/' . $mediaGet[0]['video_code'] . '" width="450" height="360" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>';
                } else {
                    if ($mediaGet[0]['video_site'] == 'youtube') {
                        $media = '<div class="embed-responsive embed-responsive-4by3"> <iframe class="embed-responsive-item" height="360" src="https://www.youtube.com/embed/' . $mediaGet[0]['video_code'] . '" allowfullscreen></iframe></div>';
 public function status()
 {
     $output = $this->loadModel('User');
     $this->_view->settings = $output->getSettings();
     $this->_view->data = $output->getStatus($_GET['usr'], $_GET['id_status']);
     $this->_view->followingActive = $output->checkFollow($_SESSION['authenticated'], $this->_view->data->user_id);
     $this->_view->favorites = $output->getFavorites($_GET['id_status']);
     $this->_view->reply = $output->getReply($_GET['id_status']);
     $this->_view->countReply = count($this->_view->reply);
     $this->_view->notiMsg = $output->notificationsMessages();
     $this->_view->notiIntera = $output->notificationsInteractions();
     $this->_view->checkBlock = $output->checkUserBlock($_SESSION['authenticated'], $this->_view->data->user_id);
     $this->_view->activeRepost = $output->checkRepost($_GET['id_status'], $_SESSION['authenticated']);
     $this->_view->countRepost = $output->getRepostUser($_GET['id_status']);
     $this->_view->checkBlocked = $output->checkUserBlock($this->_view->data->user_id, $_SESSION['authenticated']);
     $this->_view->pagesGeneral = $output->getAllPagesGeneral();
     //<--- INFO USER SESSION ACTIVE
     $this->_view->infoSession = $output->infoUser($_SESSION['authenticated']);
     //<--- WHO TO FOLLOWER
     $this->_view->whoToFollow = $output->whoToFollow($_SESSION['authenticated']);
     //<--- TRENDING TOPIC
     $this->_view->trending = $output->getTrendsTopic();
     $chars = mb_strlen($this->_view->data->post_details, 'utf8');
     if ($chars > 20) {
         $post_details = _Function::cropString($this->_view->data->post_details, 20) . " // ";
     } else {
         if ($this->_view->data->post_details == '') {
             $post_details = null;
         } else {
             $post_details = $this->_view->data->post_details . " // ";
         }
     }
     $this->_view->title = $_SESSION['LANG']['status'] . ' - ' . $post_details . stripslashes($this->_view->data->name) . " @" . $this->_view->data->username . " ";
     /* Show Views */
     $this->_view->render('status', null);
 }
" class="glyphicon glyphicon-trash removeAllMsg showTooltip" data-toggle="tooltip" data-placement="left"></i>
	                               	</div>
	                               
	                               <div class="media-nowrap">
	                               	<strong class="media-heading"><?php 
                echo stripslashes($key['name']) . $verified;
                ?>
 <small style="color: #999;">@<?php 
                echo $key['username'];
                ?>
</small></strong>
	                               </div>
	                               
	                               <p class="text-col">
	                                  <small><?php 
                echo $sendTo . _Function::checkTextMessages($message);
                ?>
</small>
	                               </p>
	                            </div>
	                         </div>
	                      </a>
	          	</li>
	          	<?php 
            }
            //<<--- Foreach
        }
    }
    //<-- ISSET POST
}
//<-- ISSET DATA
					<span class="title_data_popout">' . $_SESSION['LANG']['posts'] . '</span>
					</a>
				</span>
			</li>
			<li>
				<span class="container_data_profile_popout">
					<a href="' . URL_BASE . $getData->username . '/followers">
					<span class="countData_popout">' . _Function::formatNumber($dataFollowers->totalFollowers) . '</span>
					<span class="title_data_popout">' . $_SESSION['LANG']['followers'] . '</span>
					</a>
				</span>
			</li>
			<li class="last_li">
				<span class="container_data_profile_popout">
					<a href="' . URL_BASE . $getData->username . '/following">
						<span class="countData_popout">' . _Function::formatNumber($dataFollowing->totalFollowing) . '</span>
						<span class="title_data_popout">' . $_SESSION['LANG']['following'] . '</span>
					</a>
				</span>
			</li>
			</span>
		</ul>
	</div>';
            $arrayJson = array('html' => $output, 'status' => 1);
            echo json_encode($arrayJson);
        } else {
            if ($count == 0 && $error == 0) {
                echo json_encode(array('html' => $_SESSION['LANG']['error'], 'status' => 0));
            }
        }
    }
            echo $infoUser->id;
            ?>
"><strong><?php 
            echo $infoUser->name;
            ?>
</strong> <?php 
            echo $verified;
            ?>
</a> <small class="username-ui">@<?php 
            echo $infoUser->username;
            ?>
</small>
							</h6>
				    	<p class="list-grid-block p-text">
				    		<?php 
            echo _Function::checkText($_POST['reply_post']);
            ?>
				    	</p>
				    	<span class="timestamp timeAgo small sm-font sm-date" data="<?php 
            echo date('c', time());
            ?>
"></span><!-- small sm-font sm-date -->
				  	</div><!-- media-body -->
				</div><!-- media -->
		 <?php 
        } else {
            return false;
        }
    }
    //<-- SESSION
}
  * --------------------------
  *   Require/Include Files
  * -------------------------
  */
 require_once '../../class_ajax_request/classAjaxAdmin.php';
 include_once '../../application/functions.php';
 include_once '../../application/DataConfig.php';
 /*
  * ----------------------
  *   Instance Class
  * ----------------------
  */
 $obj = new AjaxRequestAdmin();
 $_POST['name_admin'] = _Function::spaces(trim($_POST['name_admin']));
 $_POST['user_admin'] = _Function::spaces(trim($_POST['user_admin']));
 $_POST['pass_new'] = _Function::spaces(trim($_POST['pass_new']));
 $_POST['repeat_pass'] = trim($_POST['repeat_pass']);
 if ($_POST['name_admin'] == '' || mb_strlen($_POST['name_admin'], 'utf8') < 2) {
     echo json_encode(array('res' => 'Name too short...', 'focus' => 'name_admin'));
 } else {
     if (preg_match('/[^a-z0-9\\_]/i', $_POST['user_admin'])) {
         echo json_encode(array('res' => 'Username not valid', 'focus' => 'user_admin'));
     } else {
         if (mb_strlen($_POST['pass_new'], 'utf8') < 5) {
             echo json_encode(array('res' => 'Password too short', 'focus' => 'pass_new'));
         } else {
             if ($_POST['pass_new'] !== $_POST['repeat_pass']) {
                 echo json_encode(array('res' => 'Passwords do not match'));
             } else {
                 /* INSERT DATABASE */
                 $res = $obj->addUser();
 /*
  * ----------------------
  *   Instance Class
  * ----------------------
  */
 $obj = new AjaxRequest();
 $_POST['name'] = _Function::spaces(trim($_POST['name']));
 $_POST['location'] = _Function::spaces(trim(strip_tags($_POST['location'])));
 $_POST['website'] = _Function::spaces(trim($_POST['website']));
 $url = $_POST['website'];
 $_POST['website'] = trim($_POST['website'], '/');
 $_POST['bio'] = _Function::checkTextDb2(trim($_POST['bio']));
 $admin = $obj->getSettings();
 //<-------- * Cutting chain if greater than post_length  * --------->
 if (strlen(utf8_decode($_POST['bio'])) > $admin->post_length) {
     $_POST['bio'] = _Function::cropStringLimit($_POST['bio'], $admin->post_length);
 }
 if ($_POST['name'] == '' || strlen(utf8_decode($_POST['name'])) < 2 || strlen(utf8_decode($_POST['name'])) > 20) {
     echo json_encode(array('response' => $_SESSION['LANG']['full_name_error']));
 } else {
     if (!filter_var($url, FILTER_VALIDATE_URL) && $url != '') {
         echo json_encode(array('response' => $_SESSION['LANG']['url_not_valid']));
     } else {
         $_POST['name'] = htmlspecialchars($_POST['name']);
         $res = $obj->updateProfile();
         if ($res == 1) {
             echo json_encode(array('response' => 'true', 'save_success' => $_SESSION['LANG']['saved_successfully']));
         } else {
             echo json_encode(array('response' => $_SESSION['LANG']['error']));
         }
     }
" type="button" class="btn btn-border btn-xs btn-default followBtn" data-original-title="Request send"><i class="icon-user3 myicon-right"></i> <?php 
                        echo $_SESSION['LANG']['follow'];
                        ?>
</button>
	                       	   <?php 
                    }
                    ?>
	                       	   
	                       	   <?php 
                    if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'] != $key['id'] && $key['followActive'] == 1) {
                        ?>
	                       	   <button data-username="******" data-id="<?php 
                        echo _Function::randomString(10, FALSE, TRUE, FALSE) . '-' . $key['id'];
                        ?>
" data-follow="<?php 
                        echo $_SESSION['LANG']['follow'];
                        ?>
" data-unfollow="<?php 
                        echo $_SESSION['LANG']['unfollow'];
                        ?>
" data-following="<?php 
                        echo $_SESSION['LANG']['following'];
                        ?>
" type="button" class="btn btn-border btn-xs btn-info follow_active followBtn" data-original-title="Request send"><i class="icon-user3 myicon-right"></i> <?php 
                        echo $_SESSION['LANG']['following'];
                        ?>
</button>
	                       	   <?php 
<?php

if (isset($_POST['full_name']) && !empty($_POST['full_name']) && isset($_POST['username']) && !empty($_POST['username']) && isset($_POST['email']) && !empty($_POST['email']) && isset($_POST['password'])) {
    $_POST['code'] = sha1($_SERVER['REMOTE_ADDR'] . microtime() . mt_rand(1, 100000)) . _Function::randomString(40, TRUE, TRUE, TRUE);
    $_POST['email'] = trim($_POST['email']);
    $_POST['full_name'] = _Function::spaces(trim($_POST['full_name']));
    $_POST['username'] = _Function::spaces(trim($_POST['username']));
    $_POST['password'] = _Function::spaces(trim($_POST['password']));
    $admin = $obj->getSettings();
    $emailAddress = $_POST['email'];
    $_POST['email_verify'] = $settings->email_verification;
    if ($_POST['full_name'] == '' || mb_strlen($_POST['full_name'], 'utf8') < 2 || mb_strlen($_POST['full_name'], 'utf8') > 20) {
        echo json_encode(array('res' => $_SESSION['LANG']['full_name_error'], 'focus' => 'full_name'));
    } else {
        if (preg_match('/[^a-z0-9\\_]/i', $_POST['username'])) {
            echo json_encode(array('res' => $_SESSION['LANG']['username_not_valid'], 'focus' => 'username'));
        } else {
            if (strlen($_POST['username']) < 1 || strlen($_POST['username']) > 15) {
                echo json_encode(array('res' => $_SESSION['LANG']['username_not_valid'], 'focus' => 'username'));
            } else {
                if (!filter_var($emailAddress, FILTER_VALIDATE_EMAIL)) {
                    echo json_encode(array('res' => $_SESSION['LANG']['email_not_valid'], 'focus' => 'email'));
                } else {
                    if (mb_strlen($_POST['password'], 'utf8') < 5 || mb_strlen($_POST['password'], 'utf8') > 20) {
                        echo json_encode(array('res' => $_SESSION['LANG']['password'], 'focus' => 'username'));
                    } else {
                        if ($_POST['terms'] == '') {
                            echo json_encode(array('res' => $_SESSION['LANG']['can_not_register']));
                        } else {
                            /* INSERT DATABASE */
                            $res = $obj->signUp();
echo $_SESSION['LANG']['posts'];
?>
 <small class="btn-block sm-btn-size counter-sm"><?php 
echo _Function::formatNumber($this->dataPosts->totalPosts);
?>
</small></a></li>
			    			<li><a href="<?php 
echo URL_BASE . $this->infoSession->username . '/followers';
?>
" class="AjaxlinkFollowers"><?php 
echo $_SESSION['LANG']['followers'];
?>
 <small class="btn-block sm-btn-size counter-sm"><?php 
echo _Function::formatNumber($this->dataFollowers->totalFollowers);
?>
</small></a></li>
			    			<li><a href="<?php 
echo URL_BASE . $this->infoSession->username . '/following';
?>
" class="AjaxlinkFollowing"><?php 
echo $_SESSION['LANG']['following'];
?>
 <small class="btn-block sm-btn-size counter-sm"><?php 
echo _Function::formatNumber($this->dataFollowing->totalFollowing);
?>
</small></a></li>
			    		</ul>
			    		
			    
    				</div><!-- Panel Body -->
    			</div><!--./ Panel Default -->