******************************************************************************/ require_once 'ringside/web/RingsideWebUtils.php'; require_once 'ringside/web/config/RingsideWebConfig.php'; require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * This is SOCIAL render integration page. * This enables a third party site to point to this page and * get back an application. * * To render through we need to know which network is making the request. * NETWORK: * AUTHENTICATED USER: * */ $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideWebConfig::$networkKey, null, $webSession->getSocial()); $inSession = $social->inSession(); $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; $canvas = ''; $trailingSlash = false; if (!empty($pathInfo)) { if ($str[strlen($str) - 1] == "/") { $trailingSlash = true; } $pathInfo = ltrim($pathInfo, "/"); $path_parts = explode('/', trim($pathInfo), 2); $canvas = $path_parts[0]; if (isset($path_parts[1])) { $pathInfo = $path_parts[1]; } else {
require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * The index page will determine the current status of the social session. * It then can decide how to render the page. * Each page is nothing more than a group of applications. * The web page then calls to the social engine to load said page. */ /* * The WEB container will use session to maintain relationship with user. * The web will typically persist * social = The social session key * uid = the current users session. * */ $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideWebConfig::$networkKey, RingsideWebConfig::$networkSecret, $webSession->getSocial()); $inSession = $social->inSession(); /* * Two layout options we have as the default setup. * Option A. No current user. * Left : Login + Advert * Canvas : Welcome * Menu : blank * Option B. Has current user. * Left : Apps * Canvas : Welcome * Top : blank */ if ($inSession === false) { $left = array('welcome', 'advert');
* You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. ******************************************************************************/ include_once 'include.php'; require_once 'ringside/web/RingsideWebUtils.php'; require_once 'ringside/web/config/RingsideWebConfig.php'; require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * Canvas page is the controller for displaying most applications. * The standard top and sidebars are used. * The application being invoked is picked from the path info. */ $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideSocialConfig::$apiKey, RingsideSocialConfig::$secretKey, $webSession->getSocial()); $inSession = $social->inSession(); $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; if (empty($pathInfo) || strlen(trim($pathInfo)) < 2) { $canvas = 'index.php'; $pathInfo = ''; } else { $path_parts = explode('/', trim($pathInfo), 3); $canvas = $path_parts[1]; if (isset($path_parts[2])) { $pathInfo = $path_parts[2]; } else { RingsideWebUtils::redirect(ltrim($pathInfo, '/') . '/' . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '')); return; }
include_once 'include.php'; require_once 'ringside/web/RingsideWebUtils.php'; require_once 'ringside/web/config/RingsideWebConfig.php'; require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * Login.php is the end point for the UI of login. * There are a set parameters which the login application can deal with, however, since * we check for session at this point there is an override which needs support here. * * skipcookie - if the session is created walk through the process all over again, but don't log the user out. * popup - don't select oneapp as the template, but choose skinless template by default */ $skipCookie = isset($_REQUEST['skipcookie']) ? true : false; $popUp = isset($_REQUEST['popup']) ? true : false; $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideWebConfig::$networkKey, null, $webSession->getSocial()); if ($skipCookie === true) { $canvas_content = $social->render('canvas', null, 'login', ''); if ($social->getRedirect()) { RingsideWebUtils::redirect($social->getRedirect()); return; } } else { if ($social->inSession() === false || !$social->getCurrentUser()) { $canvas_content = $social->render('canvas', null, 'login', ''); if ($social->inSession() !== false) { $webSession->setSocial($social->getNetworkSessionKey()); RingsideWebUtils::redirect($social->getRedirect()); return; }