function renderLayout($layout = null) { if (function_exists('Layout')) { return Layout(); } if (!$layout) { $layout = self::$_layout; } $layout = LAYOUTS_PATH . $layout . "." . self::$_extension; if (self::exists($layout)) { extract(View::$vars); include $layout; return true; } return false; }
if (!empty($_POST['save'])) { $pattern = '/^([a-z0-9\\+])(([-a-z0-9\\+._])*([a-z0-9\\+]))*\\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+(\\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i'; if (!preg_match($pattern, $_POST['email'])) { $data['message'] = '<span style="color:red;">Save failed: Invalid email address; please try again.</span>'; } else { $replies = array(); $replies['status'] = trim($_POST['status']) == 'active' ? 'active' : 'inactive'; $replies['email'] = trim($_POST['email']); $replies['min_interval'] = intval($_POST['min_interval']) * 60; $replies['max_queued'] = intval($_POST['max_queued']); $replies['replies_only'] = empty($_POST['replies_only']) ? 0 : 1; $replies['ignore_self'] = empty($_POST['ignore_self']) ? 0 : 1; $result = User::UpdateService('replies', $data['user'], $replies); if ($result === true) { $data['message'] = 'Changes saved <strong>successfully</strong>'; } else { $data['message'] = '<span style="color:red;">Save failed: ' . $result . '</span>'; } } } $data['replies'] = User::GetServices($data['user'], 'replies'); Layout('Replies', 'account'); if ($data['replies'] === false) { TPL('account/replies/install', $data); } else { $data['replies']['min_interval'] = $data['replies']['min_interval'] / 60; TPL('account/replies/index', $data); } // echo '<pre>'; // var_dump($data['replies']); // echo '</pre>';
<?php require dirname(__FILE__) . '/../fx.php'; Layout('Terms and Privacy Policy', 'terms'); TPL('terms_and_privacy_policy');
<?php error_reporting(0); // error_reporting(E_ALL); require_once "includes/init.inc"; // ---------------------------------------------------------------------------------------------- // $Request = Parse__URL(); // p($Request); if ($Request['is_ajax'] == FALSE) { $layout = Layout($Request["response_module"]); // -------------------------------------------------------------------------------------------- // require $Request['header_script']; require $Request['left_script']; require $Request['center_script']; require $Request['footer_script']; $smarty->assign('title', $Request['page_title']); $smarty->assign('header', $header); $smarty->assign('left_col', $left_col); $smarty->assign('center_col', $center_col); $smarty->assign('footer', $footer); $smarty->assign('Request', $Request); $smarty->display($layout); } else { require $Request['center_script']; }
.svg">Download SVG</a><p> <embed width="<?php echo $xm; ?> " height="<?php echo $ym; ?> " src="log/map_<?php echo $_SESSION[user]; ?> .svg" name="SVG Map" type="image/svg+xml" style="border:1px solid black"> <? }else{ if($fmt){ echo "<h5>Live PNG Map (clickable)</h5>"; Layout(); WritePNG($_SESSION['user'],count($dev) ); }else{ echo "<h4>Previous Map (not clickable, without graphs!)</h4>"; } if (file_exists("log/map_$_SESSION[user].php")) { ?> <img usemap=#net src="log/map_<?php echo $_SESSION[user]; ?> .php" style="border:1px solid black"> <map name=net> <?php echo $imgmap; ?> </map>
<?php require dirname(__FILE__) . '/../fx.php'; Layout('', 'home'); TPL('index');
<?php require dirname(__FILE__) . '/../../fx.php'; Layout('Replies', 'replies'); TPL('replies/index');
$follows['when'] = $_POST['when_monthly']; break; } switch ($_POST['notification_type']) { case 'email': $follows['post_url'] = ''; $follows['post_format'] = ''; break; case 'post': $follows['post_url'] = $_POST['post_url']; $follows['post_format'] = in_array($_POST['post_format'], array('json')) ? $_POST['post_format'] : 'json'; break; } $result = User::UpdateService('follows', $data['user'], $follows); if ($result === true) { $data['message'] = 'Changes saved <strong>successfully</strong>'; } else { $data['message'] = '<span style="color:red;">Save failed: ' . $result . '</span>'; } } } $data['follows'] = User::GetServices($data['user'], 'follows'); Layout('Follows', 'account'); if ($data['follows'] === false) { TPL('account/follows/install', $data); } else { TPL('account/follows/index', $data); } // echo '<pre>'; // var_dump($data['follows']); // echo '</pre>';
<?php require dirname(__FILE__) . '/common.php'; if (empty($_REQUEST['username'])) { Redirect('/arse/'); } $u = $_REQUEST['username']; Layout('Admin', 'account'); ?> <h1> <div style="float:right;"><a href="/arse/">« Back</a></div> User: <span style="font-weight:normal;"><?php echo htmlentities($u); ?> </span> </h1> <?php $user = false; $db_shared = GetDB('shared'); $sql = 'select * from users where screen_name = "' . mysql_real_escape_string($u, $db_shared) . '"'; $query = mysql_query($sql, $db_shared); if (mysql_num_rows($query) == 1) { $user = mysql_fetch_assoc($query); } mysql_free_result($query); ?> <h2>Main account</h2> <?php if ($user === false) { ?> <p>User not found.</p>
if (!empty($_REQUEST['oauth_token'])) { // Create TwitterOAuth object with app key/secret and token key/secret from default phase $to = new TwitterOAuth(config('oauth', 'consumer_key'), config('oauth', 'consumer_secret'), User::cGet('ort'), User::cGet('orts')); // Request access tokens from twitter $tok = $to->getAccessToken(); // Save the access tokens User::cSet('oat', $tok['oauth_token']); User::cSet('oats', $tok['oauth_token_secret']); // Create TwitterOAuth with app key/secret and user access key/secret $to = new TwitterOAuth(config('oauth', 'consumer_key'), config('oauth', 'consumer_secret'), User::cGet('oat'), User::cGet('oats')); // Run request on twitter API as user to get their user details $user = json_decode($to->OAuthRequest('https://twitter.com/account/verify_credentials.json', array(), 'GET'), true); // Store the user ID in the cookie User::cSet('id', $user['id']); // Now save the user in the DB User::Update($user, true); // Tell me about it //@mail('*****@*****.**', 'TwitApps signin: '.$user['screen_name'], print_r($user, true)); // Take them to the account page Redirect('/account/'); } else { $to = new TwitterOAuth(config('oauth', 'consumer_key'), config('oauth', 'consumer_secret')); $tok = $to->getRequestToken(); User::cSet('ort', $tok['oauth_token']); User::cSet('orts', $tok['oauth_token_secret']); Redirect($to->getAuthorizeURL($tok['oauth_token'])); } } User::cReset(); Layout('Sign In', 'account'); TPL('account/signin');
<?php require dirname(__FILE__) . '/../../fx.php'; Layout('Follows', 'follows'); TPL('follows/index');
<?php require dirname(__FILE__) . '/../../fx.php'; // Are we logged in? if (strlen(User::cGet('id')) == 0 or strlen(User::cGet('oat')) == 0 or strlen(User::cGet('oats')) == 0) { Redirect('/account/signin'); } $data = array(); $data['user'] = User::Get(); $data['services'] = User::GetServices($data['user']); Layout('Your Account', 'account'); TPL('account/index', $data);
<?php require dirname(__FILE__) . '/../fx.php'; Layout('Donations', 'donations'); TPL('donations');