$attrs = 'me/likes?access_token='; $url = $fb_graph_url . $attrs . $access_token; $fb_likes_data = getJsonData($url); $likes_array = json_decode($fb_likes_data, true); $likes_count = count($likes_array[data]); //echo $likes_count; // Fetch Albums count $attrs = $user . '/albums?access_token='; $url = $fb_graph_url . $attrs . $access_token; $fb_albums_data = getJsonData($url); $albums_array = json_decode($fb_albums_data, true); $albums_count = count($albums_array[data]); // Fetch Groups count $attrs = 'me/groups?access_token='; $url = $fb_graph_url . $attrs . $access_token; $fb_groups_data = getJsonData($url); $groups_array = json_decode($fb_groups_data, true); $groups_count = count($groups_array[data]); //echo $groups_count; } ?> <div class="topDiv"> <div class="card"> <img src="<? echo $trump_assets_url ?>images/fb_trump_card_proto1.png"/> </div> <div class="picture"> <img src="<?php echo $fb_graph_url;
<?php if ($user) { ?> <?php $e_friends = array(); $pending_friends = array(); $playing_friends = array(); $neighbor_friends = array(); $attrs = $user . '/friends?access_token='; $url = $fb_graph_url . $attrs . $access_token; $fb_friends_data = getJsonData($url); $friends_array = json_decode($fb_friends_data, true); storeJsonDataToDb($friends_array[data]); $dbUrl = 'http://vishaknag.com/fbapp/get/?value=friends'; $friendsDbData = getJsonData($dbUrl); $friends = json_decode($friendsDbData); $friendsCount = count($friends); for ($i = 0; $i < $friendsCount; $i++) { if ($friends[$i]->status == 'N' || $friends[$i]->status == 'P' || $friends[$i]->status == 'F' && isset($friends[$i]->player)) { $e_friends[] = $friends[$i]->fbId; } if ($friends[$i]->status == 'N') { $pending_friends[] = $friends[$i]; } if ($friends[$i]->status == 'N' && isset($friends[$i]->player)) { $playing_friends[] = $friends[$i]; } if ($friends[$i]->status == 'N') { $neighbor_friends[] = $friends[$i]; }
* * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if (!function_exists('getJsonData')) { function getJsonData($o) { $var = get_object_vars($o); foreach ($var as &$value) { if (is_object($value) && method_exists($value, 'getJsonData')) { $value = $value->getJsonData(); } } return json_encode($var); } } $data = ''; foreach ($list as $i => &$item) { $data .= getJsonData($item) . ','; } $data = rtrim($data, ","); ?> <script type="text/javascript"> var menu = [ <?php echo $data; ?> ]; </script>
*/ defined('_JEXEC') or die; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers'); if (!function_exists('getJsonData')) { function getJsonData($o) { $var = get_object_vars($o); foreach ($var as &$value) { if (is_object($value) && method_exists($value, 'getJsonData')) { $value = $value->getJsonData(); } } return json_encode($var); } } $category = getJsonData($this->category); $intro_items = json_encode($this->intro_items); $lead_items = json_encode($this->lead_items); // $pagination = getJsonData($this->pagination); ?> <script type="text/javascript"> var category = { infos : <?php echo $category; ?> , introItems : <?php echo $intro_items; ?> , leadItems : <?php
*/ defined('_JEXEC') or die; if (!function_exists('getJsonData')) { function getJsonData($o) { $var = get_object_vars($o); foreach ($var as &$value) { if (is_object($value) && method_exists($value, 'getJsonData')) { $value = $value->getJsonData(); } } return json_encode($var); } } $contacts = json_encode($this->contacts); $contact = getJsonData($this->contact); $formActions = '<div class="form-actions"><button class="btn btn-primary validate" type="submit">' . JText::_('COM_CONTACT_CONTACT_SEND') . '</button><input type="hidden" name="option" value="com_contact" /><input type="hidden" name="task" value="contact.submit" /><input type="hidden" name="return" value="' . $this->return_page . '" /><input type="hidden" name="id" value="' . $this->contact->slug . '" />' . JHtml::_('form.token') . '</div>'; // $pagination = getJsonData($this->pagination); ?> <script type="text/javascript"> var contacts = <?php echo $contacts; ?> ; var contact = <?php echo $contact; ?> ; contact.form = { action: '<?php echo JRoute::_('index.php');
function getJsonData($o) { $var = get_object_vars($o); foreach ($var as &$value) { if (is_object($value) && method_exists($value, 'getJsonData')) { $value = $value->getJsonData(); } } return json_encode($var); } } $params = $this->item->params; $phocaPDF = false; if (JPluginHelper::isEnabled('phocapdf', 'content')) { include_once JPATH_ADMINISTRATOR . '/components/com_phocapdf/helpers/phocapdf.php'; $phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($this->item, $params); } $article = getJsonData($this->item); // $pagination = getJsonData($this->pagination); ?> <script type="text/javascript"> var article = <?php echo $article; ?> ; var pdfLink = {url : '<?php echo explode('"', $phocaPDF)[3]; ?> '}; </script>
<?php if (isset($_GET["action"])) { include 'includes/header.php'; } else { include 'includes/subheader.php'; } ?> <?php if ($user) { ?> <?php $attrs = $user . '/friends?access_token='; $url = $fb_graph_url . $attrs . $access_token; $fb_friends_data = getJsonData($url); $friends_array = json_decode($fb_friends_data, true); storeJsonDataToDb($friends_array[data]); $dbUrl = 'http://vishaknag.com/fbapp/get/?value=friends'; $value = getJsonData($dbUrl); $valueArray = json_decode($value); ?> <?php }
if ($id != "") { $notFirstmap = true; } $id = $args['id']; $jId = uniqid(); if (!$notFirstmap) { function getJsonData($id) { $mapfig = get_db()->getTable('Mapfig')->find($id); return $mapfig; } } $mapfig = getJsonData($id); if (count($mapfig) > 0) { $defaultLayer = get_db()->getTable('MapfigLayer')->find($mapfig->baselayer); $layerGroup = getJsonData("layergroup"); $defaultLayer = "L.tileLayer('" . $defaultLayer->url . "', {maxZoom: 18, id: '" . $defaultLayer->key . "', token: '" . $defaultLayer->accesstoken . "', attribution:'" . html_entity_decode($defaultLayer->attribution) . "' + mbAttribution_" . $jId . "})"; $baseLayers = array(); $layerGroup = array(); if (!empty($mapfig->layergroup)) { $layerGroup = get_db()->getTable('MapfigGroup')->find($mapfig->layergroup); } $rws = array(); if (count($layerGroup) > 0) { $rws = explode(',', $layerGroup->layer_id); } foreach ($rws as $r) { $r = get_db()->getTable('MapfigLayer')->find($r); if (count($r) > 0) { $baseLayers[] = "'" . $r->name . "': L.tileLayer('" . $r->url . "', {maxZoom: 18, id: '" . $r->key . "', token: '" . $r->accesstoken . "', attribution:'" . html_entity_decode($r->attribution) . "' + mbAttribution_" . $jId . "})"; }
<?php $fields = getJsonData('/registration/assets/json/address.json'); if (isset($_SESSION['registration']) && !isset($saved)) { $saved = $_SESSION['registration']; } $form_customer_message = isset($form_customer_message) ? $form_customer_message : 'Please enter your address and contact information prior to registering your products'; $form_name = isset($form_name) ? $form_name : 'form_customer_address'; ?> <p><?php echo $form_customer_message; ?> </p> <form name="<?php echo $form_name; ?> " class="form-vertical form-customer"> <div class="row"> <?php foreach ($fields as $field) { ?> <div class="<?php echo $field['cssClass']; ?> " data-field-type="<?php echo $field['type']; ?> "> <div class="form-group"> <?php