-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbi2.html
318 lines (286 loc) · 8.88 KB
/
sbi2.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FinFlexx</title>
<link rel="stylesheet" href="./css/explore.css" />
<!-- Boxicons CSS -->
<link flex href="https://unpkg.com/[email protected]/css/boxicons.min.css" rel="stylesheet" />
<script src="./js/script.js" defer></script>
<link type="image" rel="icon" href="./img/finflexx.png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" />
<style>
.box {
background-color: #0e1117;
display: flex;
align-items: center;
justify-content: center;
padding-left: 150px;
padding-bottom: 30px;
}
/* Style for the table */
table {
width: 80%;
padding-left: 95px;
}
/* Style for table cells */
td {
text-align: center;
padding-bottom: 100px;
padding-left: 40px;
padding-right: 40px;
}
/* Style for images */
img {
width: 100px;
height: 100px;
background-color: #0e1117;
cursor: pointer;
}
.head {
font-size: 40px;
color: #fff;
font-weight: 1000;
padding-left: 380px;
padding-bottom: 50px;
}
input.checkbox {
cursor: pointer;
width: 15px;
height: 15px;
color: #0e1117;
}
.submit {
position: absolute;
top: 1725px;
left: 740px;
border-radius: 20px;
font-size: 20px;
background-color: #0e1117;
border: 2px solid #fff;
cursor: pointer;
color: #fff;
font-weight: 650;
padding: 10px 10px 10px 10px;
}
.avatar {
width: 45px;
/* Adjust size as needed */
height: 45px;
/* Adjust size as needed */
border-radius: 50%;
background-color: #02a350;
/* You can change the background color */
display: flex;
justify-content: center;
align-items: center;
font-size: 28px;
/* Adjust font size as needed */
font-weight: 500;
color: #fff;
/* You can change the text color */
margin-right: 5px;
/* Adjust margin as needed */
}
.random-color-box {
width: 200px;
height: 200px;
background-color: #00c760;
/* Initial color */
}
</style>
</head>
<body>
<nav class="sidebar locked">
<div class="logo_items flex">
<span class="nav_image">
<img src="./img/finflexx.png" alt="logo_img" />
</span>
<span class="logo_name">FinFlexx</span>
<i class="bx bx-lock-alt" id="lock-icon" title="Unlock Sidebar"></i>
<i class="bx bx-x" id="sidebar-close"></i>
</div>
<div class="menu_container">
<div class="menu_items">
<ul class="menu_item">
<div class="menu_title flex">
<span class="title">Dashboard</span>
<span class="line"></span>
</div>
<li class="item">
<a href="./index2.html" class="link flex">
<i class="bx bx-home-alt"></i>
<span>Home</span>
</a>
</li>
<li class="item">
<a href="./news2.html" class="link flex">
<i class='bx bx-news'></i>
<span>News & Blogs</span>
</a>
</li>
</ul>
<ul class="menu_item">
<div class="menu_title flex">
<span class="title">Stocks</span>
<span class="line"></span>
</div>
<li class="item">
<a href="./Watchlist.php" class="link flex">
<i class='bx bx-heart'></i>
<span>Watchlists</span>
</a>
</li>
<li class="item">
<a href="./explore2.html" class="link flex">
<i class='bx bx-candles'></i>
<span>Explore Stocks</span>
</a>
</li>
</ul>
<ul class="menu_item">
<div class="menu_title flex">
<span class="title">Services</span>
<span class="line"></span>
</div>
<li class="item">
<a href="./predict.html" class="link flex">
<i class='bx bx-rupee'></i>
<span>Price Prediction</span>
</a>
</li>
</ul>
<ul class="menu_item">
<div class="menu_title flex">
<span class="title">Account</span>
<span class="line"></span>
</div>
<li class="item">
<a href="./details.php" class="link flex">
<i class='bx bxs-user-detail'></i>
<span>Details</span>
</a>
</li>
<li class="item">
<a href="./index.html" class="link flex">
<i class='bx bxs-exit'></i>
<span>Log Out</span>
</a>
</li>
</ul>
</div>
<div class="sidebar_profile flex">
<span class="nav_image1">
<div id="avatarContainer"></div>
</span>
<div class="data_text">
<span class="name" id="username"></span>
<!--<span class="email">[email protected]</span>-->
</div>
</div>
</div>
</nav>
<!-- Navbar -->
<nav class="navbar">
<i class="bx bx-menu" id="sidebar-open"></i>
<div class="wrapper">
<div class="search-input">
<a href="" target="_blank" hidden></a>
<input type="text" placeholder="Search for Stocks..." class="bar search_box">
<div class="autocom-box">
<!-- here list are inserted from javascript -->
</div>
<div class="icon"><i class="fas fa-search"></i></div>
</div>
</div>
</nav>
<Section id="welcome_Sec">
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div class="tradingview-widget-container__widget"></div>
<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js"
async>
{
"symbols": [
{
"description": "",
"proName": "NASDAQ:TSLA"
},
{
"description": "",
"proName": "NASDAQ:AAPL"
},
{
"description": "",
"proName": "NASDAQ:AMZN"
},
{
"description": "",
"proName": "NASDAQ:GOOGL"
},
{
"description": "",
"proName": "NASDAQ:MSFT"
}
],
"showSymbolLogo": true,
"isTransparent": false,
"displayMode": "adaptive",
"colorTheme": "dark",
"locale": "en"
}
</script>
</div>
<!-- TradingView Widget END -->
</Section>
<section>
<div class="graph">
<iframe src="http://localhost:8512/" width="85%" height="2475px"></iframe>
</div>
</section>
<footer>
<p class="copyright">
Copyright ©
2024 FinFlexx</p>
</footer>
<script>
// Function to format the user's name
function formatUserName(name) {
// Split the name into an array of words
var words = name.toLowerCase().split(' ');
// Capitalize the first letter of each word
for (var i = 0; i < words.length; i++) {
words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1);
}
// Join the words back into a single string and return
return words.join(' ');
}
// Function to fetch user information from the server
function fetchUserInfo() {
// Make an AJAX request to fetch user information
var xhr = new XMLHttpRequest();
xhr.open('GET', './php/get_user_info.php', true); // Assuming your PHP file to retrieve user info is named get_user_info.php
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
var userInfo = JSON.parse(xhr.responseText);
// Format the user's name
var formattedName = formatUserName(userInfo.name);
// Update the HTML content with the formatted name
document.getElementById('username').innerText = formattedName;
// Create and display the avatar using the initial of the user's name
var avatar = document.createElement('div');
avatar.className = 'avatar';
avatar.innerText = formattedName.charAt(0).toUpperCase(); // Display the initial of the user's name
document.getElementById('avatarContainer').appendChild(avatar);
}
};
xhr.send();
}
// Call the function when the page loads
window.onload = fetchUserInfo;
</script>
<script src="./js/search_script2.js"></script>
</body>
</html>