function getItems($rss) { $channel = getChannel($rss); $items = array(); foreach ($channel->getElementsByTagName('item') as $domItem) { $items[] = getItem($domItem); } return $items; }
function formUserData($userArr) { foreach ($userArr as $ustreamUID) { $tempArr = selectAll($ustreamUID); $channel = getChannel($ustreamUID); $tempArr[0]['channel'] = $channel; $userData[] = $tempArr[0]; } return $userData; }
/** * 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'; }
/** * Funciton to to notification mail * @param int $subID subscriber id * @param int $userID user id * @return array */ function notificationMail($subscriberID, $userID) { global $wpdb; $user = get_user_by('id', $userID); if ($userID) { $to = $wpdb->get_var($wpdb->prepare('SELECT user_email FROM ' . $wpdb->prefix . 'users WHERE user_id=%d', $subscriberID)); $ukey = $wpdb->get_var($wpdb->prepare('SELECT user_key FROM ' . WVG_CHANNEL . ' WHERE user_id=%d', $subscriberID)); $userDetails = getChannel($userID); $userName = $userDetails->user_name; $jsonDetails = json_decode($userDetails->user_content, true); $userDescription = $jsonDetails['description']; $decodedProfileImage = $jsonDetails['profileImage']; if (!empty($decodedProfileImage) && file_exists(APPTHA_VGALLERY_BASEDIR . "/images/channel/banner/profile/" . $decodedProfileImage)) { $userProfileImage = APPTHA_VGALLERY_BASEURL . "images/channel/banner/profile/" . $decodedProfileImage; } else { $userProfileImage = APPTHA_VGALLERY_BASEURL . "images/channel/subs.png"; } $channel_page = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "posts WHERE post_content=%s AND post_status=%s", "[videochannel]", "publish")); if (get_option('permalink_structure')) { $link = get_site_url() . '/' . $channel_page[0]->post_name; } else { $link = $channel_page[0]->guid; } $link = add_query_arg(array('ukey' => $ukey), $link); $from = $user->user_email; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= "Reply-To: " . $from . "\r\n"; $headers .= "Return-path: " . $from; $subject = 'Subscribed user'; $content = '<div class="mailContainer"> <div class="mailRow" style="background:ghostwhite;padding:5px;height:160px;"> <a href="' . $link . '" target="_blank"><img src="' . $userProfileImage . '" class="eimg" style="float:left;"></a> <p class="ep" style="float:left;margin-left:5px;font-family:sans-serif;"> <a href="' . $link . '" target="_blank"><span style="font-size:15px;font-weight:bold;">' . $userName . '</span></a><br><br> ' . $userDescription . ' </p> </div> </div>'; mail($to, $subject, $content, $headers); } else { echo json_encode(array('errormsg' => 'true', 'errmsg' => 'email error')); exitAction(''); } }
include 'includes/functions.php.inc'; $conference = $_GET['conference']; $members = getConference($db, $conference); ?> <table align="center" border="0" cellpadding="4" cellspacing="0" id="mainTable"> <tr class="tableHeader"> <td align="center" class="tableHeaderLeft">Number</td> <td align="center">Name</td> <td align="center">Member ID</td> <td align="center">Channel</td> <td align="center">Actions</td> <td align="center" class="tableHeaderRight">Talking</td> </tr> <?php foreach ($members as &$member) { $channel = getChannel($db, $member); $name = getName($db, $member); $number = getNumber($db, $member); $talking = getTalking($db, $member); $muted = getMuted($db, $member); if ($row_id == "RowEven") { $row_id = "RowOdd"; $bgcolor = "#FFFFFF"; } else { $row_id = "RowEven"; $bgcolor = "#D5F7FF"; } ?> <tr class="<?php echo $row_id; ?>
* @api {GET} /channel/editor/:id Fetch a Channel with current User's Permissions by Channel's Id * @apiName fetchChannelWithPermissionsById * @apiGroup Channel * @apiVersion 1.0.0 * * @apiParam {Number} id Channels unique ID. * * @apiSuccess {Object} Channel Channel and its Sub-Channels and Units * * @apiPermission authenticated User * @apiDescription pretty much the same API as fetchChannelById, except for additonally fields editor, author and parentAdmin * */ $app->get('/channel/editor/:id', function ($id) { include_once 'libs/channel.php'; echo json_encode(getChannel($id, true)); }); /** * * @api {POST} /channel Create a new channel * @apiName createChannel * @apiGroup Channel * @apiVersion 1.0.0 * * @apiParam {String} title Title of new Channel * @apiParam {Number} parent Parent Id of new Channel * * @apiPermission Author of the parent Channel * * * @apiParamExample {json} Request-Example: