-
Notifications
You must be signed in to change notification settings - Fork 0
/
5.SurucuOlusturma.html
233 lines (173 loc) · 9.93 KB
/
5.SurucuOlusturma.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;200&display=swap" rel="stylesheet">
<link rel="stylesheet" href="5.SurucuOlusturma.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,660,0,0" />
<script src="https://kit.fontawesome.com/fc453c7213.js" crossorigin="anonymous"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono:wght@100;200&family=Open+Sans:ital,wght@0,300;1,300&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;600&display=swap" rel="stylesheet">
<title>Sürücü Ekleme</title>
</head>
<body>
<div> <header>
<!--Öncelikle Burada nav barım için bir div oluşturdum ve içine header kısımını ekledim ardından header ımda ne olacaksa her birini sırası ile eklemeye başladim.-->
<img src="png/TEKNOFEST LOGO.png" alt="">
<!--Logo için burdad img ile logoyu ekledim.-->
<h1 style="font-family: 'Montserrat', sans-serif; margin-left: 10px;">Sürücü Kontrol Sistemi</h1>
<div class="headerleft">
<ul class="menu" style="display: flex;">
<li>
<a style="color: #000; font-family: 'Montserrat', sans-serif;" class="buttons" href="1.MainPage.html">Ana Sayfa</a>
</li>
<li>
<a style="color: #000; font-family: 'Montserrat', sans-serif;" class="buttons" href="#">Sefer İşlemleri</a>
<ul class="kategori-sefer-ul" style=" width: 200px; height: 100px; margin-left: 30px; border-radius: 8px; background-color:#ffde00; ">
<li style="margin-bottom: 10px; margin-top: 30px;" class="kategori-sefer-1">
<a style="text-decoration:none; color: #000; " href="3.SeferOlusturma.html">Sefer Oluşturma</a>
</li>
<hr style="background-color: white ;">
<li>
<a style="text-decoration:none; color: #000;" class="kategori-sefer-1" href="4.Seferler.html">Seferler</a>
</li>
</ul>
</li>
<li style="margin-right: 180px;">
<a style="color: #000; font-family: 'Montserrat', sans-serif;" class="buttons" href="#">Sürücü İşlemleri</a>
<ul class="kategori-sefer-ul" style=" width: 200px; height: 100px; margin-left: 30px; border-radius: 8px; background-color:#ffde00; ">
<li style="margin-bottom: 10px; margin-top: 30px;" class="kategori-sefer-1">
<a style="text-decoration:none; color: #000; " href="5.SurucuOlusturma.html">Sürücü Ekleme</a>
</li>
<hr style="background-color: white ;">
<li>
<a style="text-decoration:none; color: #000;" class="kategori-sefer-1" href="6.Sürücüler.html">Sürücüler</a>
</li>
</ul>
</li>
<li>
<img style=" position: absolute; width: 11rem; height: auto; margin-left: -130px; margin-top: -75px;" src="png/teknofest-logo.png" alt="">
</li>
</ul>
</div>
</header>
</div>
<div class="h2">Sürücü İşlemleri | Sürücü Ekleme</div>
<div class="bigbox">
<form id="sefer-form">
<div style="display: flex; margin-left: 90px;
margin-top: 29px;">
<div>
<h2>Ad</h2>
<div style="margin-bottom: 36px; border: 1px ; border-radius: 8px; ; background-color: #fef536;">
<i style="margin-left: 10px; margin-right:5px ;" class="fa-solid fa-user"></i>
<input type="text" style="width: 225px; border-style: none; height:30px; font-size:13pt; background-color:#fef536;border-radius: 8px; font-family: 'Roboto Mono', monospace;" id="adi" required>
</div>
<h2>Soyad</h2>
<div style=" margin-bottom: 36px; border: 1px ; border-radius: 8px; ; background-color: #fef536;">
<i style="margin-left: 10px; margin-right:5px ;" class="fa-solid fa-user"></i>
<input type="text" style="width: 225px; border-style: none; height:30px; font-size:13pt; background-color:#fef536;border-radius: 8px; font-family: 'Roboto Mono', monospace;" id="soyadi" required>
</div>
<h2>Kimlik No</h2>
<div style=" margin-bottom: 36px; border: 1px ; border-radius: 8px; ; background-color: #fef536;">
<i style="margin-left: 10px; margin-right:5px ;" class="fa-solid fa-address-card"></i>
<input type="text" style="width: 225px; border-style: none; height:30px; font-size:13pt; background-color:#fef536;border-radius: 8px; font-family: 'Roboto Mono', monospace;" id="kimlik" required>
</div>
<h2>Telefon Numarası</h2>
<div style=" margin-bottom: 36px; border: 1px ; border-radius: 8px; ; background-color: #fef536;">
<i style="margin-left: 10px; margin-right:5px ;" class="fa-solid fa-phone"></i>
<input type="text" style="width: 225px; border-style: none; height:30px; font-size:13pt; background-color:#fef536;border-radius: 8px; font-family: 'Roboto Mono', monospace;" id="tlfnumber" required>
</div>
</div>
<div style="margin-left: 206px;">
<h2>E-posta Adresi</h2>
<div style=" margin-bottom: 36px; border: 1px ; border-radius: 8px; ; background-color: #fef536;">
<i style="margin-left: 10px; margin-right:5px ;" class="fa-solid fa-at"></i>
<input type="text" style="width: 225px; border-style: none; height:30px; font-size:13pt; background-color:#fef536;border-radius: 8px; font-family: 'Roboto Mono', monospace;" id="eposta" required>
</div>
<h2 style="margin-bottom: 7px;" >Ciniyet</h2>
<div style="margin-bottom: 40px;" >
<input type="radio" name="size" id="cinsiyeterkek" required>
<label class="labelcinsiyet" for="cinsiyeterkek">Erkek</label>
<input type="radio" name="size" id="cinsiyetkiz" required>
<label class="labelcinsiyet" for="cinsiyetkiz">Kız</label>
</div>
<h2>Doğum Tarihi</h2>
<div style="background-color: #fef536; height: 30px; border: 1px ; border-radius: 8px; width: 230px;">
<i style="background-color: #fef536; margin-left: 10px; margin-right:5px ;" class="t"></i>
<input style="margin-bottom: 36px; width: 200px; height: 30px; font-size: 13pt; text-transform: uppercase; border-style: none; background-color:#fef536;border-radius: 8px;" type="date" id="dogumdate" required>
</div>
</div>
<div style="margin-left: 206px;">
<h2>Sürücüler</h2>
<div style="text-align:center; padding:3%; border-radius: 8px; width: 200px; height: 100px; background-color: #fef536;">
<label style=" font-family: 'Open Sans', sans-serif ; font-weight: bolder ; cursor:pointer;" for="inputTag">
Fotoğraf Seç <br/>
<i class="fa fa-2x fa-camera"></i>
<input style="display: none;" id="inputTag" type="file"/>
<br/>
<span style="color:green; font-size: 10pt;" id="imageName"></span>
</label>
</div>
<input style=" margin-top: 30px; box-shadow: 2px 2px 6px #000; cursor: pointer; width: 100px; height: 30px; border-radius:8px; border-style: none ; background-color: #fef536; font-family: 'Roboto Mono', monospace; font-weight: 900; " type="submit" value="Oluştur" required>
</div>
</div>
</div>
</form>
</div>
</body>
<script>
var input = document.getElementById("inputTag");
let imageName = document.getElementById("imageName")
input.addEventListener("change", ()=>{
let inputImage = document.querySelector("input[type=file]").files[0];
imageName.innerText = inputImage.name;
})
input.addEventListener("change",function(){
const reader = new FileReader();
reader.addEventListener("load", () =>{
localStorage.setItem("image", reader.result);
});
reader.readAsDataURL(this.files[0]);
});
var form = document.getElementById('sefer-form')
form.addEventListener('submit', function(event){
event.preventDefault();
var adi = document.getElementById('adi').value
console.log(adi)
var soyadi = document.getElementById('soyadi').value
console.log(soyadi)
var kimlik = document.getElementById('kimlik').value
console.log(kimlik)
var tlfnumber = document.getElementById('tlfnumber').value
console.log(tlfnumber);
var eposta = document.getElementById('eposta').value;
console.log(eposta)
var dogumdate = document.getElementById('dogumdate').value
console.log(dogumdate)
input.addEventListener("change",function(){
const reader = new FileReader();
reader.addEventListener("load", () =>{
localStorage.setItem("image", reader.result);
});
reader.readAsDataURL(this.files[0]);
});
// Adding Local Storage
localStorage.setItem("adi", adi);
localStorage.setItem("soyadi", soyadi);
localStorage.setItem("kimlik", kimlik);
localStorage.setItem("tlfnumber", tlfnumber);
localStorage.setItem("eposta", eposta);
localStorage.setItem("dogumdate", dogumdate);
alert("Sürücü Sisteme Kaydedildi")
window.location.href="5.SurucuOlusturma.html"
})
</script>
</html>