This commit is contained in:
David Mulder 2011-03-21 10:06:21 -06:00
Родитель 2eed51ec5b
Коммит d8c3bd48b3
3 изменённых файлов: 36 добавлений и 20 удалений

Просмотреть файл

@ -1,11 +1,29 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" Runat="Server">
<script type="text/javascript">
function GetEmail()
{
FB.api('/me', function(response) {
document.getElementById('email').value = response.email;
document.getElementById('name').value = response.name;
alert(response.email);
if (response.email != "undefined") {
document.forms["userform"].submit();
}
});
}
window.onload=GetEmail;
</script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Body" Runat="Server">
<form id="userform" method="post" action="RankingPage.aspx">
<input type="hidden" id="email" />
<input type="hidden" id="name" />
</form>
<!-- Everything we want to see in the page needs to go here -->
<p>Somebody did something that we see here.</p>
</asp:Content>

Просмотреть файл

@ -30,32 +30,14 @@
_uacct = "UA-76510-1";
urchinTracker();
</script>
<script type="text/javascript">
function GetEmail()
{
FB.api('/me', function(response) {
document.getElementById('email').value = response.email;
document.getElementById('name').value = response.name;
alert(response.email);
if (response.email != "") {
document.forms["userform"].submit();
}
});
}
window.onload=GetEmail;
</script>
</head>
<body>
<form id="userform" method="post" action="RankingPage.aspx">
<input type="hidden" id="email" />
<input type="hidden" id="name" />
</form>
<form id="form1" runat="server">
<div id="header">
<div class="wrapper">

Просмотреть файл

@ -1,8 +1,24 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="RankingPage.aspx.cs" Inherits="RankingPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
<script type="text/javascript">
function LoggedOut()
{
FB.api('/me', function(response) {
if (response.email == "undefined") {
document.forms["loggedout"].submit();
}
});
}
window.onload=LoggedOut;
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" Runat="Server">
<form id="loggedout" method="post" action="Default.aspx">
</form>
<div id="leftcolumn">
<table>
<tbody>