-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
214 lines (80 loc) · 4.04 KB
/
profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>books2go</title>
<link rel="stylesheet" href="css/jquery.mobile-1.4.3.min.css" />
<link rel="stylesheet" href="css/styles.css" />
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.mobile-1.4.3.min.js"></script>
<script src="js/main.js"></script>
<script>
</script>
<script id="panel-init">
</script>
</head>
<body>
<div id="profilePage" data-role="page" >
<div data-role="header" data-position="fixed" data-theme="a" id="header"> <div data-role="navbar" id="head-buttons" data-iconpos="top"> </div> </div><!-- header -->
<div data-role="content" id="content">
<p class='logop'><img class='logo' src="images/logo3.png" alt="" /></p>
<div id="welcome" class="title"></div>
<div class="text">
<a data-ajax="false" href="mybooks.html" data-role="button" data-icon="books">My Books</a>
<a data-ajax="false" href="postbook.html" data-role="button" data-icon="plus">Post a Textbook</a>
<a data-ajax="false" href="inbox.html" data-role="button" data-icon="mail">Inbox <span class="inbox-count" style='padding:1px;display:none;text-shadow:none' ></span></a> <a data-ajax="false" href="wishlist.html" data-role="button" data-icon="star">Wish list</a> <a data-ajax="false" href="editprofile.html" data-role="button" data-icon="user">Edit Profile</a> <a data-ajax="false" href="editschools.html" data-role="button" data-icon="home">Edit Schools</a> <a data-ajax="false" href="changepassword.html" data-role="button" data-icon="lock">Change password</a>
</div>
</div>
<div data-role="panel" id="mypanel" data-theme="a" style='padding:0;margin:0;'>
<img src="images/logo3.png" width="100%" />
<div style="height:30px"></div>
<ul data-role="listview" id="menu">
<li><a href="javascript:GoHome()" data-rel="close" data-ajax="false">Home</a></li>
<li><a href="search.html" data-rel="close" data-ajax="false">Search</a></li>
<li id="uprofile" style="display:none" data-role="collapsible" data-iconpos="right" data-inset="false">
<h2>Profile</h2>
<ul data-role="listview" data-theme="a">
<li><a href="mybooks.html" data-rel="close" data-ajax="false"> - My books</a></li>
<li><a href="postbook.html" data-rel="close" data-ajax="false"> - Post a textbook</a></li>
<li><a href="inbox.html" data-rel="close" data-ajax="false"> - Inbox</a></li>
<li><a href="wishlist.html" data-rel="close" data-ajax="false"> - Wish list</a></li>
<li><a href="editprofile.html" data-rel="close" data-ajax="false"> - Edit profile</a></li>
<li><a href="editschools.html" data-rel="close" data-ajax="false"> - Edit schools</a></li>
<li><a href="changepassword.html" data-rel="close" data-ajax="false"> - Change password</a></li>
</ul>
</li>
<li style="display:none" id="logout"><a href="logout.html" data-rel="user" data-ajax="false">Log out</a></li>
<li style="display:none" id="login"><a href="login.html" data-rel="user" data-ajax="false">Log In</a></li>
</ul>
</div><!-- /panel -->
<script>$(document).on('pagebeforecreate', '#profilePage', function(){ LoadHeader();});
$(document).on("pagebeforeshow","#profilePage",function(){ // When entering pagetwo
$("#welcome").html(window.localStorage.getItem("username"));
if(window.localStorage.getItem("user_id") !== undefined && window.localStorage.getItem("user_id") !== null){
if(window.localStorage.getItem("user_id") > 0){
$("#anon-foot").hide();
$("#user-foot").show();
$("#uprofile").show();
$("#logout").show();
$("#login").hide();
GetInboxCount();
}
}else{
localStorage.clear();
window.location = "index.html";
}
});
</script>
</div><!-- /page -->
</body>
</html>