<?php /** * $Id$ * * This script is called regulary. returns $userid of user who wants to chat with you, 0 otherwise * It uses atomEvents for handling */ require_once 'find_config.php'; $h->session->requireLoggedIn(); $event = getSubscriptions(SUBSCRIPTION_USER_CHATREQ); if ($event && !isset($_GET['nonewchat'])) { echo $h->session->id . ';' . $event[0]['itemId'] . ';' . Users::getName($event[0]['itemId']); removeSubscription(SUBSCRIPTION_USER_CHATREQ, $event[0]['itemId']); } else { echo '0;0;0'; }
<?php require_once 'config.php'; $session->requireLoggedIn(); require 'design_head.php'; echo xhtmlMenu($profile_menu, 'blog_menu'); $list = getSubscriptions(SUBSCRIPTION_FORUM); echo '<h2>Your forum subscriptions</h2>'; //d($list); foreach ($list as $row) { echo '<a href="forum.php?id=' . $row['itemId'] . '">' . $row['itemSubject'] . '</a> subscribed since ' . $row['timeCreated'] . '<br/>'; } require 'design_foot.php';
echo '<p><a href="' . $iftttBlogUrl . '/logout.php">Logout</a></p>'; //create table for user activities mysql_query("CREATE TABLE IF NOT EXISTS `" . $xml->user->encodedId . "Activities` (\r\n\t\t\t\t\t\t\t`activityId` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t`calories` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t`description` varchar(300) NOT NULL,\r\n\t\t\t\t\t\t\t`distance` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t`duration` int(11) NOT NULL,\r\n\t\t\t\t\t\t\t`name` varchar(100) NOT NULL,\r\n\t\t\t\t\t\t\tPRIMARY KEY (`activityId`)\r\n\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;"); //subscribe to user activities /** * Add subscription * * @throws FitBitException * * @param string $id Subscription Id * @param string $path Subscription resource path (beginning with slash). Omit to subscribe to all user updates. * * @return */ addSubscription($xml->user->encodedId, "/activities", $subscriberId = null); echo getSubscriptions(); } else { echo "<h1>Error 1</h1>"; echo "<p>Current number of beta users maxed out - sorry</p>"; echo mysql_error(); } } ?> </p> <p><a href="index.html">Back</a> to documentation </p> </div> </div> <div class="col-md-3">
function dispatcher($type) { switch ($type) { case 'LoginAttempt': loginAttempt(); break; case 'GetInitialCart': getInitialCart(); break; case 'AddItemToCart': addItemToCart(); break; case 'RemoveItemFromCart': removeItemFromCart(); break; case 'EmptyCart': emptyCart(); break; case 'RefreshCatalog': refreshCatalog(); break; case 'GetGuidedSellingValues': getGuidedSellingValues(); break; case 'ReadCatalog': readCatalog(); break; case 'GetSubscriptions': getSubscriptions(); break; case 'SetAmendSubId': setAmendSubId(); break; case 'GetAmendSubscription': getAmendSubscription(); break; case 'PreviewAddRatePlan': previewAddRatePlan(); break; case 'AddRatePlan': addRatePlan(); break; case 'PreviewRemoveRatePlan': previewRemoveRatePlan(); break; case 'RemoveRatePlan': removeRatePlan(); break; case 'PreviewUpdateRatePlan': previewUpdateRatePlan(); break; case 'UpdateRatePlan': updateRatePlan(); break; case 'GetUpgradeDowngradePlans': getUpgradeDowngradePlans(); break; case 'PreviewPlanUpgradeDowngrade': previewPlanUpgradeDowngrade(); break; case 'PlanUpgradeDowngrade': planUpgradeDowngrade(); break; case 'PreviewRenewSubscription': previewRenewSubscription(); break; case 'RenewSubscription': renewSubscription(); break; case 'CancelSubscription': cancelSubscription(); break; case 'GetAccountSummary': getAccountSummary(); break; case 'GetContactSummary': getContactSummary(); break; case 'GetPaymentMethodSummary': getPaymentMethodSummary(); break; case 'GetInvoiceSummary': getInvoiceSummary(); break; case 'GetBillingPreview': getBillingPreview(); break; case 'GetUsageSummary': getUsageSummary(); break; case 'GetCompleteSummary': getCompleteSummary(); break; case 'UpdateContact': updateContact(); break; case 'CheckEmailAvailability': checkEmailAvailability(); break; case 'UpdatePaymentMethod': updatePaymentMethod(); break; case 'RemovePaymentMethod': removePaymentMethod(); break; case 'GetNewIframeSrc': getNewIframeSrc(); break; case 'GetExistingIframeSrc': getExistingIframeSrc(); break; case 'SubscribeWithCurrentCart': subscribeWithCurrentCart(); break; case 'PreviewCurrentCart': previewCurrentCart(); break; case 'IsUserLoggedIn': isUserLoggedIn(); break; // begin new code for Partner - Ming // begin new code for Partner - Ming case 'GetHierarchy': getHierarchy(); break; case 'GoToAccountView': goToAccountView(); break; case 'GetAccountInfo': getAccountInfo(); break; case 'GetSubConfirmInfo': getSubConfirmInfo(); break; case 'IsPartnerLoggedIn': isPartnerLoggedIn(); break; // end new code for Partner - Ming // HPM 2.0 begin // end new code for Partner - Ming // HPM 2.0 begin case 'SubscribeHPM2': subscribeHPM2(); break; // HPM 2.0 end // Start Promo // HPM 2.0 end // Start Promo case 'PromoValidate': promoValidate(); break; // End Promo // Start Set Account Data // End Promo // Start Set Account Data case 'SetAccountInfo': setAccountInfo(); break; // End Set Account Data // Start Get Address Data // End Set Account Data // Start Get Address Data case 'GetAddressInfo': getAddressInfo(); break; // End Set Account Data // Start Get Formatting Data // End Set Account Data // Start Get Formatting Data case 'GetFormatting': getFormatting(); break; // End Set Formatting Data // End Set Formatting Data default: addErrors(null, 'no action specified'); } }
} return $elem; } /* BEGIN -- Get store data */ $domain = $_GET["store"]; $storeId = getStoreId($domain); // Logo $logoPath = getStoreLogo($domain); // Categories $categories = getCategories($storeId); // Products $userId = $_SESSION['storesLogin'][$storeId]['userId']; if (!isset($userId)) { header("Location: ../store/index.php?store=" . $domain); } $products = getSubscriptions($userId); $products = array_map("updatePath", $products); // Vat $vat_oux = getStoreById($storeId); $vat = $vat_oux[0]["vat"]; //loged in user $smarty->assign('userPermission', 'guest'); if (isset($_SESSION['storesLogin'][$storeId]['userId'])) { $userInfo = $_SESSION['storesLogin'][$storeId]['userId']; if (isset($userInfo)) { $userInfo = getAccount($userInfo); $userPermission = getAccountPermission($userInfo["id"]); $userPermission = $userPermission["name"]; } $smarty->assign('userInfo', $userInfo); $smarty->assign('userPermission', $userPermission);