Пример #1
0
 /**
  * Function mySubscriberDetailsModel is used to get my subscribed user channel details
  * @param int $userID user id
  * @return array
  */
 public function mySubscriberDetailsModel($userID)
 {
     global $wpdb;
     $mySubscriberID = json_decode(getSubscriberId($userID), true);
     if (!empty($userID) && !empty($mySubscriberID)) {
         return $wpdb->get_results('SELECT * FROM ' . WVG_CHANNEL . ' WHERE user_id IN(' . implode(',', $mySubscriberID) . ')');
     } else {
         return '';
     }
     exitAction('');
 }
Пример #2
0
 /**
  * Function to display channel page.
  * This function is used to display the required user channel page.
  * Provided option to subscribe other user channel.
  * Added functionality for site administrator to edit subscriber channel page.
  * Added functionality to restrict user except site administrator to edit subscriber channel page.
  * Provided option for site administrator to edit subscriber profile images.
  * Provided option for site administrator to edit subscriber cover images.
  * Provided option for site administrator to edit subscriber channel name and descrition.
  * Provided option for site administrator to delete user subscribed on this user.
  * Provided option for site administrator to delete subscriber notification.
  * Provided option for user to edit profile/cover images.
  * Provided option to search required subscriber channel.Provided notification option.
  * Provided option to view subscriber channel videos.
  * Provided option to view subscriber channel description.
  * Provided option to view subscriber channel profile images.
  * Provided option to view subscriber channel cover images.
  * Provided drag and drop functionality to upload profile and cover images.
  * Provided image cropping functionality to crop profile and cover images.
  * @param   int  $userID   user id
  * @return  string
  */
 public function displayView($userID)
 {
     global $frontViewPath, $frontModelPath;
     $this->userID = $userID;
     $decodeContent = $mySubscriberID = $notificationDetails = '';
     $channel = getChannel($userID);
     $this->channelContent = $channel;
     $decodeContent = json_decode($channel->user_content, true);
     $this->userContent = $decodeContent;
     $this->name = $channel->channel_name;
     $mySubscriberID = getSubscriberId($userID);
     $notificationDetails = $this->getNotificationDetails($userID);
     $this->mysubscriberCount = $mySubscriberID;
     $this->notificationDetails = $notificationDetails;
     include_once $frontViewPath . 'mychannel.php';
 }