Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (67 sloc) 2.74 KB
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>University of Reddit</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<?php include('includes.php'); ?>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="">Upgrade to a different browser</a> or <a href="">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<div id="main" role="main">
<div id="reddit-link">
<div class="content">
<h1>Link your Reddit account</h1>
$user = new user($dbpdo, $_SESSION['user_id']);
$ru = $user->get_attribute_value('reddit_username');
echo "You have been confirmed as reddit user <a href=\"" . $ru . "\">$ru</a>.";
catch (UserNotFoundException $e)
catch (ObjectAttributeNotFoundException $e)
In order to link your account to your Reddit account, you must do the following:<br /><br />
<ol style="list-style-type: decimal; padding-left: 30px;">
<li>Go to <a href="">this post</a> in the /r/UniversityofReddit subreddit and log in as the account you wish to link to your UofR account.</li>
<li>Post a top-level comment there containing your username <strong>and nothing else</strong>.</li>
<li>Click on the "permalink" link underneath the comment you just posted; copy the URL into the textbox below:<br /><br />
<input type="text" id="permalink" style="width: 400px;" /><br /><br />
<li>Press this:<br /><br />
<button onclick="$('#response').html('[thinking...]');$.post('confirm_url.php',{url: $('#permalink').val()},function(data){$('#response').html(data);});" style="padding: 2px; margin-left: 15px;">Link my account!</button><br /><br />
<li><span id="response">[we'll see whether it works]</span></li>
<div id="separate-main-footer">
<?php require_once('footer.php'); ?>