-
Notifications
You must be signed in to change notification settings - Fork 3
/
avatars.html
106 lines (101 loc) · 5.14 KB
/
avatars.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Alef|Varela+Round&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="img/icons/logo_icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/mefathim.css">
<!-- <script src="js/navbar.js"></script> -->
<script src="js/load.js"></script>
<script src="js/version.js"></script>
<style>
table{
text-align: center;
}
td, tr{
width: auto;
}
.images{
width:auto;
height: 20%;
border-radius: 50%;
}
.images:hover {
cursor: pointer;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.274), 0 6px 20px 0 rgba(0, 0, 0, 0.13);
transition: 0.3s;
}
#current_img {
width: 14%;
}
#p1 {
float: right;
margin: 90px;
margin-right: 140px;
font-size: x-large;
}
#msg {
font-size: x-large;
margin-left: 200px;
height: 30px;
padding-bottom: 50px;
}
.cancelbtn, .deletebtn {
float: left;
width: 48%;
}
</style>
<title>בחירת תמונה</title>
</head>
<body dir="rtl">
<nav id="nav" class="navbar navbar-expand-sm bg-light navbar-light"></nav>
<div id="now_logged" style="padding-top: 50px;"></div>
<center>
<div id="msg"></div>
<div id="current"><p id="p1">התמונה שלך כרגע:</p><div id="current_img"></div></div>
<div id="imgs" class="card card-container img">
<p style="font-size: large;">בחר תמונה</p>
<table id="table_av">
<tr><td><img class="images" alt="1" onclick="confirm_picture(this.alt)" src="img/avatars/1.png"></td><td><img class="images" alt="2" onclick="confirm_picture(this.alt)" src="img/avatars/2.png"></td><td><img class="images" alt="3" onclick="confirm_picture(this.alt)" src="img/avatars/3.png"></td><td><img class="images" alt="4" onclick="confirm_picture(this.alt)" src="img/avatars/4.png"></td></tr>
<tr><td><img class="images" alt="5" onclick="confirm_picture(this.alt)" src="img/avatars/5.png"></td><td><img class="images" alt="6" onclick="confirm_picture(this.alt)" src="img/avatars/6.png"></td><td><img class="images" alt="7" onclick="confirm_picture(this.alt)" src="img/avatars/7.png"></td><td><img class="images" alt="8" onclick="confirm_picture(this.alt)" src="img/avatars/8.png"></td></tr>
<tr><td><img class="images" alt="9" onclick="confirm_picture(this.alt)" src="img/avatars/9.png"></td><td><img class="images" alt="10" onclick="confirm_picture(this.alt)" src="img/avatars/10.png"></td><td><img class="images" alt="11" onclick="confirm_picture(this.alt)" src="img/avatars/11.png"></td><td><img class="images" alt="12" onclick="confirm_picture(this.alt)" src="img/avatars/12.png"></td></tr>
</table>
</center>
</div>
<p class="" id="version" style="text-align: center;"></p>
<script>
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function(){
if(this.readyState == 4){
data_from_json = JSON.parse(this.responseText);
if(data_from_json.ok == true){
var img_num = String(data_from_json.data.picture_number);
if(img_num == ""){
img = "<img style='height:100%; width:100%;'src="+"img/avatars/22.png"+">"
document.getElementById("current_img").innerHTML = img;
}
else{
var img = "<img style='height:100%; width:100%;'src="+"img/avatars/";
img += img_num+ ".png"+">";
document.getElementById("current_img").innerHTML = img;
}
}
else{
window.location = "login.html";
}
}
}
xmlhttp.open("POST", "scripts/user_data.py", true);
xmlhttp.send();
buildnavbar();
get_connected_users();
setInterval(function(){ get_connected_users() }, 3000);
$("#version").append("גירסה: "+get_version()+"") ;
</script>
</body>
</html>