Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Kiwwi - Communication World Wide</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta name="viewport" content="width=device-width; initial-scale = 1.0; maximum-scale=1.0; user-scalable=no"/>
- <meta property="og:title" content="Kiwwi"/>
- <meta property="og:type" content="social encounter"/>
- <meta property="og:site_name" content="Kiwwi"/>
- <meta property="og:description" content="mobile web connection test"/>
- <meta property="og:image" content="http://www.facebookmobileweb.com/start/img/facebook_icon_large.png"/>
- <link rel="apple-touch-icon" href="icon.png"/>
- <meta name="apple-mobile-web-app-capable" content="yes"/>
- <style>
- #logout { display: none; }
- #afterlogin { display: none; }
- body.connected #login { display: none; }
- body.connected #logout { display: block; }
- body.connected #afterlogin { display: block; }
- body.not_connected #login { display: block; }
- body{
- overflow-x:hidden;
- font-family: Helvetica;
- color: #333333;
- font-size: 16px;
- }
- #container{
- position:absolute;
- top:0px;
- left:0px;
- width:100%;
- min-height:500px;
- background-image:url('bg.jpg');
- }
- #first{
- width:100%;
- height: auto;
- float: right;
- margin-top:0px;
- }
- #basicprofile{
- position:relative;
- right:0px;
- width:145px;
- float:right;
- word-wrap: break-word
- }
- #user-info{
- width:100%;
- font-size: 12px;
- color:#ffffff;
- text-align:center;
- float:right;
- padding: 5px;
- background: -moz-linear-gradient(
- top,
- #cc0033 0%,
- #470101);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#cc0033),
- to(#470101));
- border: 0px solid #801a1a;
- -moz-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- -webkit-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- text-shadow:
- 0px -1px 0px rgba(000,000,000,0.4),
- 0px 1px 0px rgba(255,255,255,0.3);
- }
- #select1{
- width:100%;
- font-size: 16px;
- color:#ffffff;
- text-align:center;
- padding:3px;
- }
- #select2{
- width:80%;
- text-align:center;
- padding:3px;
- -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
- -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
- box-shadow:inset 0px 1px 0px 0px #ffffff;
- padding:6px 24px;
- margin-left: 7px;
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
- background-color:#ededed;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- border-radius:6px;
- border:1px solid #dcdcdc;
- display:inline-block;
- color:#777777;
- font-family:arial;
- font-size:15px;
- font-weight:bold;
- text-decoration:none;
- text-shadow:1px 1px 0px #ffffff;
- }
- #likess{
- width:80%;
- font-size: 16px;
- color:#ffffff;
- text-align:right;
- margin-bottom:5px;
- padding:3px;
- background: -moz-linear-gradient(
- top,
- #f7bf71 0%,
- #fa880f);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#f7bf71),
- to(#fa880f));
- -moz-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,1);
- -webkit-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,1);
- text-shadow:
- 0px 0px 1px rgba(000,000,000,0),
- 0px 1px 0px rgba(255,255,255,0.3);
- }
- input[type="checkbox"]{
- margin-left:25px;
- }
- input[type="submit"]{
- position:relative;
- left:38%;
- }
- label {
- width:180px;
- -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
- -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
- box-shadow:inset 0px 1px 0px 0px #ffffff;
- padding:6px 24px;
- margin: 3px;z
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
- background-color:#ededed;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- border-radius:6px;
- border:1px solid #dcdcdc;
- display:inline-block;
- color:#777777;
- font-family:arial;
- font-size:15px;
- font-weight:bold;
- text-decoration:none;
- text-shadow:1px 1px 0px #ffffff;
- }
- #myContent {
- position:relative;
- width:70%;
- left:15px;
- margin-bottom:30px;
- -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
- -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
- box-shadow:inset 0px 1px 0px 0px #ffffff;
- padding:6px 24px;
- margin: 3px;z
- background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
- background-color:#ededed;
- -moz-border-radius:6px;
- -webkit-border-radius:6px;
- border-radius:6px;
- border:1px solid #dcdcdc;
- display:inline-block;
- color:#777777;
- font-family:arial;
- font-size:15px;
- font-weight:bold;
- text-decoration:none;
- text-shadow:1px 1px 0px #ffffff;
- }
- #lang{
- width:100%;
- text-align:center;
- float:right;
- margin-top:18px;
- margin-bottom:5px;
- }
- #ntv{
- font-size: 18px;
- color:#ffffff;
- text-align:center;
- padding:7px;
- background: -moz-linear-gradient(
- top,
- #cc0033 0%,
- #470101);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#cc0033),
- to(#470101));
- border: 0px solid #801a1a;
- -moz-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- -webkit-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- text-shadow:
- 0px -1px 0px rgba(000,000,000,0.4),
- 0px 1px 0px rgba(255,255,255,0.3);
- }
- #lrn{
- font-size: 18px;
- color:#ffffff;
- text-align:center;
- padding:7px;
- background: -moz-linear-gradient(
- top,
- #cc0033 0%,
- #470101);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#cc0033),
- to(#470101));
- border: 0px solid #801a1a;
- -moz-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- -webkit-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- text-shadow:
- 0px -1px 0px rgba(000,000,000,0.4),
- 0px 1px 0px rgba(255,255,255,0.3);
- }
- #rest{
- font-size: 18px;
- color:#ffffff;
- text-align:center;
- padding:7px;
- background: -moz-linear-gradient(
- top,
- #cc0033 0%,
- #470101);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#cc0033),
- to(#470101));
- border: 0px solid #801a1a;
- -moz-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- -webkit-box-shadow:
- 0px 1px 3px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.7);
- text-shadow:
- 0px -1px 0px rgba(000,000,000,0.4),
- 0px 1px 0px rgba(255,255,255,0.3);
- }
- .full{
- width:100%;
- height:30px;
- }
- #welcometokiwwi{
- width:70%;
- font-size: 14px;
- color:#ffffff;
- text-align:left;
- background:#333333;
- padding:7px;
- margin-top:15px;
- float:right;
- background: -moz-linear-gradient(
- top,
- #8bcc00 0%,
- #639101);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#8bcc00),
- to(#639101));
- -moz-box-shadow:
- 0px 0px 0px rgba(000,000,000,0),
- inset 0px 0px 10px rgba(087,087,087,0);
- -webkit-box-shadow:
- 0px 0px 0px rgba(000,000,000,0),
- inset 0px 0px 10px rgba(087,087,087,0);
- text-shadow:
- 0px -1px 0px rgba(000,000,000,0),
- 0px 1px 0px rgba(255,255,255,0);
- }
- #likes{
- width:80%;
- height: 48px;
- font-size: 12px;
- color:#ffffff;
- text-align:left;
- background:#444444;
- padding:7px;
- margin-bottom:10px;
- float:left;
- background: -moz-linear-gradient(
- top,
- #ff9900 0%,
- #ba7104);
- background: -webkit-gradient(
- linear, left top, left bottom,
- from(#ff9900),
- to(#ba7104));
- -moz-box-shadow:
- 0px 1px 5px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.6);
- -webkit-box-shadow:
- 0px 1px 5px rgba(000,000,000,0.5),
- inset 0px 0px 1px rgba(255,255,255,0.6);
- text-shadow:
- 0px -1px 0px rgba(143,143,143,1),
- 0px 1px 0px rgba(255,255,255,0.2);
- }
- </style>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js"></script>
- </head>
- <body onload="setTimeout(function() { window.scrollTo(0, 1) }, 100);">
- <div id="container">
- <div id="fb-root">
- </div>
- <script>
- (function() {
- var e = document.createElement('script'); e.async = true;
- e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
- document.getElementById('fb-root').appendChild(e);
- }());
- </script>
- <script>
- window.fbAsyncInit = function() {
- FB.init({ appId: '292022270810548',
- status: true,
- cookie: true,
- xfbml: true,
- oauth: true});
- FB.Event.subscribe('auth.statusChange', handleStatusChange);
- };
- </script>
- <script>
- function handleStatusChange(response) {
- document.body.className = response.authResponse ? 'connected' : 'not_connected';
- if (response.authResponse) {
- console.log(response);
- updateUserInfo(response);
- }
- }
- </script>
- <div class="full">
- <div class="formoptions" id="welcometokiwwi">
- Welcome to Kiwwi! :)
- </div>
- </div>
- <br/><br/>
- <center>
- <div id="login">
- <p>
- <img src="http://www.teamcrossword.com/Content/fb-login-button.png" onclick="loginUser();"/>
- </p>
- </div>
- </center>
- <script>
- function loginUser() {
- FB.login(function(response) { }, {scope:'create_note email export_stream friends_about_me friends_activities friends_birthday friends_checkins friends_education_history friends_events friends_games_activity friends_groups friends_hometown friends_interests friends_likes friends_location friends_notes friends_online_presence friends_photo_video_tags friends_photos friends_questions friends_relationship_details friends_relationships friends_religion_politics friends_status friends_subscriptions friends_website friends_work_history manage_friendlists manage_notifications manage_pages offline_access photo_upload publish_actions publish_checkins publish_stream read_friendlists read_insights read_mailbox read_requests read_stream share_item status_update user_about_me user_activities user_birthday user_checkins user_education_history user_events user_games_activity user_groups user_hometown user_interests user_likes user_location user_notes user_online_presence user_photo_video_tags user_photos user_questions user_relationship_details user_relationships user_religion_politics user_status user_subscriptions user_website user_work_history'});
- }
- </script>
- <!-- Get user's name and profile -->
- <div id="afterlogin">
- <div id="user-info">
- </div>
- <div id="dbform">
- <form name="userinfo" action="gettest.php" method="post">
- <div class="formoptions" id="select1">
- </div>
- <div class="formoptions" id="select2">
- Set your weight preference<br/>
- <span>Encounter Friends Likes</span><br/>
- <span></span>
- <select name="lweight">
- <option value="3" selected>3</option>
- <option value="2">2</option>
- <option value="1">1</option>
- </select>
- <span></span>
- <select name="fweight">
- <option value="3">3</option>
- <option value="2" selected>2</option>
- <option value="1">1</option>
- </select>
- <span></span>
- <select name="iweight">
- <option value="3">3</option>
- <option value="2">2</option>
- <option value="1" selected>1</option>
- </select>
- </div>
- <br/>
- <br/>
- <div class="formoptions" id="rest">
- Set your language preference<br/>
- </div>
- <div class="formoptions">
- <div id="ntv">
- Native :
- <select name="nativelanglist">
- </select>
- <br/>
- </div>
- <div id="lrn">
- Wanna Improve:
- <select name="learnlanglist">
- </select>
- </div>
- </div>
- <br/><br/>
- <div class="formoptions" id="likess">
- Select your likes :
- </div>
- <input id="submitbutton" type="submit" name="formSubmit" value="Submit"/>
- <br/>
- </form>
- </div>
- <div id="myContent">
- Current Kiwwi Users <br/><br/>
- </div>
- </div>
- <script>
- function addOption(selectbox,text,value){
- var optn = document.createElement('option');
- optn.text = text;
- optn.value= value;
- selectbox.options.add(optn);
- }
- function addHiddenValue(name,value){
- var Elem = document.createElement("input");
- Elem.setAttribute("type","hidden");
- Elem.setAttribute("value", value);
- Elem.setAttribute("name", name);
- document.userinfo.appendChild(Elem);
- }
- function addCheck(value,isChecked){
- var cb = document.createElement('input'); // create input node
- var label = document.createElement('label');
- cb.type = "checkbox"; // set type
- cb.name = "checkboxlikes[]"; // set name if necessary
- cb.value = value;
- cb.checked = cb.defaultChecked = isChecked; // make it checked now and by default
- label.htmlFor = "checkbox";
- label.id = "likesoptions";
- label.appendChild(document.createTextNode(value));
- //document.userinfo.appendChild(document.createElement('<input type="checkbox" name="checkboxlikes" value='+ value +' />'+ value +'<br />'));
- // gets the reference tag
- var submitbutton = document.getElementById('submitbutton');
- // add 'new_h3' before 'reference', inside body
- document.userinfo.insertBefore(cb, submitbutton);
- document.userinfo.insertBefore(label, submitbutton);
- document.userinfo.insertBefore(document.createElement('br'), submitbutton);
- }
- function updateUserInfo(response) {
- //////browser editing november 2///////////////
- $.getJSON('http://kiwwi.3ird.me/kiwwiapi.php', function(json) {
- $.each(json,function() {
- $.each(this, function() {
- // 'this' is the current object of the iteration loop
- $('#myContent').append('<img src="https://graph.facebook.com/' + this.id + '/picture" />');
- });
- });
- });
- /////////////////////////////////////////////////
- FB.api('/me', function(response) {
- document.getElementById('user-info').innerHTML = '<a id="clickhere" onclick="parent.location=\'http://kiwwi.3ird.me/index_ios.php?fbid=' + response.id + '\'">Click here if you already finished your initial setting.<br/>初期設定済みの方はこちらにタップして、お進みください。<br/><img src="https://graph.facebook.com/' + response.id + '/picture?type=large" /></a><br />' ;
- //document.getElementById('user-info').innerHTML += response.name + '<br />' + response.username + '<br />' + response.birthday + '<br />' + response.bio + '<br />' + response.hometown.name + '<br />' + response.locale;
- addHiddenValue('fbid',response.id);
- addHiddenValue('fbname',response.name);
- addHiddenValue('bday',response.birthday);
- addHiddenValue('hometown',response.hometown.name);
- addHiddenValue('bio',response.bio);
- $.getJSON('http://kiwwi.3ird.me/kiwwiapi.php', function(json) {
- $.each(json,function() {
- $.each(this, function() {
- // 'this' is the current object of the iteration loop
- // $('#myContent').append('<img src="https://graph.facebook.com/' + this.id + '/picture" />');
- if(response.id==this.id){
- //$('#myContent').append('you are registered');
- setTimeout("location.href='http://kiwwi.3ird.me/myprofile.php?fbid=" + this.id + "'",500);
- }
- //$('#myContent').append('Name: '+ this.name);
- });
- });
- });
- var i=0;
- var langs='';
- while (response.languages[i]!=null){
- addOption(document.userinfo.nativelanglist,response.languages[i].name,response.languages[i].name);
- langs+=response.languages[i].name;
- langs+='^';
- i++;
- }
- addHiddenValue('total_langs',i);
- addHiddenValue('langs',langs);
- i=0;
- while (response.languages[i]!=null){
- addOption(document.userinfo.learnlanglist,response.languages[i].name,response.languages[i].name);
- i++;
- }
- addOption(document.userinfo.learnlanglist,"----Other:----","");
- addOption(document.userinfo.learnlanglist,"Arabic","Arabic");
- addOption(document.userinfo.learnlanglist,"Bengali","Bengali");
- addOption(document.userinfo.learnlanglist,"Catalan","Catalan");
- addOption(document.userinfo.learnlanglist,"Dutch","Dutch");
- addOption(document.userinfo.learnlanglist,"English","English");
- addOption(document.userinfo.learnlanglist,"French","French");
- addOption(document.userinfo.learnlanglist,"German","German");
- addOption(document.userinfo.learnlanglist,"Greek","Greek");
- addOption(document.userinfo.learnlanglist,"Gujarati","Gujarati");
- addOption(document.userinfo.learnlanglist,"Hindi-Urdu","Hindi-Urdu");
- addOption(document.userinfo.learnlanglist,"Hungarian","Hungarian");
- addOption(document.userinfo.learnlanglist,"Indonesian","Indonesian");
- addOption(document.userinfo.learnlanglist,"Italian","Italian");
- addOption(document.userinfo.learnlanglist,"Japanese","Japanese");
- addOption(document.userinfo.learnlanglist,"Javanese","Javanese");
- addOption(document.userinfo.learnlanglist,"Korean","Korean");
- addOption(document.userinfo.learnlanglist,"Malay","Malay");
- addOption(document.userinfo.learnlanglist,"Mandarin","Mandarin");
- addOption(document.userinfo.learnlanglist,"Nepali","Nepali");
- addOption(document.userinfo.learnlanglist,"Persian","Persian");
- addOption(document.userinfo.learnlanglist,"Polish","Polish");
- addOption(document.userinfo.learnlanglist,"Portuguese","Portuguese");
- addOption(document.userinfo.learnlanglist,"Punjabi","Punjabi");
- addOption(document.userinfo.learnlanglist,"Romanian","Romanian");
- addOption(document.userinfo.learnlanglist,"Russian","Russian");
- addOption(document.userinfo.learnlanglist,"Rwanda-Rundi","Rwanda-Rundi");
- addOption(document.userinfo.learnlanglist,"Spanish","Spanish");
- addOption(document.userinfo.learnlanglist,"Sundanese","Sundanese");
- addOption(document.userinfo.learnlanglist,"Tagalog","Tagalog");
- addOption(document.userinfo.learnlanglist,"Tamil","Tamil");
- addOption(document.userinfo.learnlanglist,"Thai","Thai");
- addOption(document.userinfo.learnlanglist,"Turkish","Turkish");
- addOption(document.userinfo.learnlanglist,"Ukrainian","Ukrainian");
- addOption(document.userinfo.learnlanglist,"Vietnamese","Vietnamese");
- });
- FB.api('/me/friends/&fields=name,picture', function(response) {
- console.log('Got friends: ', response);
- if (!response.error) {
- var markup = '';
- var friends = response.data;
- var friendsarray='';
- for (var i=0; i < friends.length; i++) {
- var friend = friends[i];
- friendsarray += friend.id + '^';
- }
- addHiddenValue('total_friends',friends.length);
- addHiddenValue('friendsarray',friendsarray);
- }
- });
- FB.api('/me/likes&fields=name', function(response) {
- console.log('Got likes: ', response);
- if (!response.error) {
- var markup = '';
- var likes = response.data;
- for (var i=0; i < likes.length ; i++) {
- var like = likes[i];
- addCheck(like.name,true);
- }
- document.userinfo.insertBefore(document.createElement('br'), submitbutton);
- }
- });
- }
- </script>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement