-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.php
905 lines (787 loc) · 33.5 KB
/
profile.php
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
<?php
include('db.php');
include ('authlogin.php');
session_start();
$email = isset($_GET['user']) ? $_GET['user'] : 1;
$result = mysqli_query($con,"select * from usertable where href='$email'");
$rows=mysqli_fetch_row($result);
$result = mysqli_query($con,"select * from userdata where href='$email'");
$rows1=mysqli_fetch_row($result);
?>
<html>
<head>
<meta name="viewport" content="width=2048,initial-scale=1.0,maximum-scale=1,shrink-to-fit=no">
<title >CodeBinary Initiatives Opportunities</title>
<link rel = "stylesheet " type = "text/css" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel = "stylesheet" type = "text/css" href = "./style.css" >
<link rel="icon" href="./images/logoicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" type="text/css">
<style>
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ab0505;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #29b329;
}
input:focus + .slider {
box-shadow: 0 0 1px #29b329;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.ice {
border: solid #38b0de;
border-width: 0 3px 3px 0;
display: inline-block;
padding: 3px;
}
.ace {
width: 40px;
height: 40px;
background-color: #fff;
text-align: center;
vertical-align:center !important;
font-size: 24px;
margin: 0 10px;
display: block;
border-radius: 50%;
position: relative;
overflow: hidden;
border: 3px solid #000;
z-index: 1;
}
.ace .icon {
margin-top:10%;
position: relative;
color: #262626;
transition: .5s;
z-index: 3;
}
.ace:hover .icon {
color: #fff;
}
.ace:before {
content: "";
position: absolute;
top: 100%;
left: 0;
width: 100%;
height: 100%;
/* background: #f00; */
transition: .5s;
z-index: 2;
}
.ace:hover:before {
top: 0;
}
.ace:before {
background: #0072b1;
}
ul li:nth-child(1) .ace:before {
background: #0072b1;
}
ul li:nth-child(2) .ace:before {
background: #000;
}
ul li:nth-child(3) .ace:before {
background: #d6249f;
background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
ul li:nth-child(4) .ace:before {
background: #ea4c89;
}
ul li:nth-child(5) .ace:before {
background: #d44638;
}
.emp-profile{
padding: 3%;
margin-top: 3%;
margin-bottom: 3%;
border-radius: 0.5rem;
background: #fff;
}
.profile-img{
text-align: left;
}
.profile-img img{
width: 70%;
height: 100%;
margin-left:7%;
}
.profile-img .file {
position: relative;
overflow: hidden;
margin-top: -20%;
width: 70%;
border: none;
border-radius: 0;
font-size: 15px;
background: #212529b8;
}
.profile-img .file input {
position: absolute;
opacity: 0;
right: 0;
top: 0;
}
.profile-head h5{
color: #333;
}
.profile-head h6{
color: #0062cc;
}
.profile-edit-btn{
border: none;
border-radius: 1.5rem;
width: 70%;
font-weight: 600;
color: #6c757d;
cursor: pointer;
}
.proile-rating{
font-size: 12px;
color: #818182;
margin-top: 5%;
}
.proile-rating span{
color: #495057;
font-size: 15px;
font-weight: 600;
}
.profile-head .nav-tabs{
margin-bottom:5%;
}
.profile-head .nav-tabs .nav-link{
font-weight:600;
border: none;
}
.profile-head .nav-tabs .nav-link.active{
border: none;
border-bottom:2px solid #0062cc;
}
.profile-work{
padding: 14%;
margin-top: -15%;
}
.profile-work p{
font-size: 12px;
color: #818182;
font-weight: 600;
margin-top: 10%;
}
.profile-work a{
text-decoration: none;
color: #495057;
font-weight: 600;
font-size: 14px;
}
.profile-work ul{
list-style: none;
}
.profile-tab label{
font-weight: 600;
}
.profile-tab p{
font-weight: 600;
color: #0062cc;
}
</style>
<body style="background-color:#FFFFFF; height:768px !important;" >
<div align="center" class="row" style="width:100%;height:10%;">
<div class="col-3" align="left" style="margin-top:-7%; padding-left:2% ">
<img src="./images/logo.png" style="heigth:90%; width:90%;">
</div>
<div align="center" class="col-3 offset-6 row" style="margin-top:1.5%;">
Meet the developer:<a href="https://www.linkedin.com/in/umang-agarwal-5b227617b" style="margin-top:-2%" class="ace" target="_blank"><i class="fa fa-linkedin icon"></i></a>
<label class="switch" style="margin-left:20%;">
<input type="checkbox" id="myCheckbox" name="logout" onchange="toggleCheck()" checked>
<span class="slider round"></span>
</label>
</div>
</div>
<br>
<?php
if(!empty($_SESSION['msg']))
{
$msg=$_SESSION['msg'];
echo'<div class="modal fade" id="exampleModalError" tabindex="1" role="dialog" aria-labelledby="exampleModalLabelError" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" style="background:#38b0de;">
<h5 class="modal-title" style="color:white;" id="exampleModalLabel">Error!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color:white;">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">'.$msg.'
</div>
<div class="modal-footer">
<button type="button" class="btn" data-dismiss="modal" aria-label="Close" style="margin-right:1%;margin-left:1%;background:#29AB87;">
Ok
</button>
</div>
</div>
</div>
</div>';
$_SESSION['msg']="";
}
?>
<div class="container emp-profile" style="margin-top:0%;">
<?php
$msg=$_SESSION['msgs'];
$_SESSION['msgs']="";
print($msg);
echo'<form method="post">
<div class="row" style="height:21%">
<div class="col-md-4">
<div class="profile-img" style="height:100%; " align="left">';
if($rows1[8]==1)
echo'<img src="./images/'.strtolower(join(explode(".",$rows1[6],-1),'.')).'.jpg" style="border-radius:50%; border:5px solid #38b0de; height:100%; width:50%" alt=""/>';
else
echo'<img src="./images/default.jpg" style="border-radius:50%; border:5px solid #38b0de; height:100%; width:50%" alt=""/>';
echo '</div>
</div>
<div class="col-md-3">
<div class="profile-head">
<h5>
'.$rows[0].' '.$rows[1].'
</h5>
<h6>';
if(!empty($rows1[1]))
echo $rows1[1];
else
echo '<span style="color:grey;"> Not Provided...</span>';
echo'</h6>
<p class="mt-3 proile-rating">HRef: '.$rows1[0].'</p>
</div>
</div>
<div class="col-md-5 row">
<a href="./dash.php" class="btn profile-edit-btn" style="color:white; width:47%; height:25%; margin-left:3%; background:#38b0de;" align="center">Back to Dashboard</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="profile-work row">
<p class="col-12">Work Links</p>
<br>
<ul class="col-12 row" style="padding-left:0;">';
if (!empty($rows1[2]))
echo' <li>
<a href="'.$rows1[2].'" style="margin-right:1%; font-size:160%" class="ace" target="_blank" align="center"><i class="fa fa-linkedin icon"></i></a></li>';
else
echo' <li>
<a href="'.$rows1[2].'" style="margin-right:1%; font-size:160%; display:none;" class="ace" target="_blank"><i class="fa fa-linkedin icon"></i></a></li>';
if (!empty($rows1[3]))
echo' <li>
<a href="'.$rows1[3].'" style="margin-right:1%; font-size:170%" class="ace" target="_blank" align="center"><i class="fa fa-github icon"></i></a></li>';
else
echo' <li>
<a href="'.$rows1[3].'" style="margin-right:1%; font-size:160%; display:none;" class="ace" target="_blank" align="center"><i class="fa fa-github icon"></i></a></li>';
if (!empty($rows1[4]))
echo' <li>
<a href="'.$rows1[4].'" style="margin-right:1%; font-size:170%" class="ace" target="_blank" align="center"><i class="fa fa-instagram icon"></i></a></li>';
else
echo' <li>
<a href="'.$rows1[4].'" style="margin-right:1%; font-size:160%; display:none;" class="ace" target="_blank" align="center"><i class="fa fa-instagram icon"></i></a></li>';
if (!empty($rows1[5]))
echo' <li>
<a href="'.$rows1[5].'" style="margin-right:1%; font-size:170%" class="ace" target="_blank" align="center"><i class="fa fa-dribbble icon"></i></a></li>';
else
echo' <li>
<a href="'.$rows1[5].'" style="margin-right:1%; font-size:170%; display:none;" class="ace" target="_blank" align="center"><i class="fa fa-dribbble icon"></i></a></li>';
if (!empty($rows1[6]))
echo' <li>
<a href="mailto:'.$rows1[6].'" style="margin-right:1%; font-size:170%" class="ace" target="_blank" align="center"><i class="fa fa-at icon"></i></a></li>';
else
echo' <li>
<a href="mailto:'.$rows1[6].'" style="margin-right:1%; font-size:160%; display:none;" class="ace" target="_blank" align="center"><i class="fa fa-at icon"></i></a></li>';
echo'</ul>
<br>
<p class="col-12" style="font-size: 12px;color: #818182;font-weight: 600;margin-top: 10%;">Resume/CV</p>';
if($rows1[9]==1)
echo'<a href="./resumes/'.strtolower(join(explode(".",$rows1[6],-1),'.')).'.pdf" class="btn profile-edit-btn" style="color:white; margin-top:1%; background:#38b0de;" download="'.$rows1[0].'_resume.pdf">Download</a>';
else
echo'<button class="btn profile-edit-btn" style="color:white; margin-top:1%; background:#ab0505;">Resume/CV not uploaded</button>';
echo'</div>
</div>
<div class="col-md-8" style="text-align:justify;">
<h5>About:</h5>';
if(!empty($rows1[7]))
echo substr($rows1[7],0,260).'<span style="display:none;" id="aboutmore">'.substr($rows1[7],260).'<br></span><input onclick="more()" type="button" style="color:blue; background:rgb(0,0,0,0); border:none;" id="moree" value="...See more"></input>';
else
echo '<span style="color:grey;">Not Provided...</span>';
echo'<br><hr>';
$res=mysqli_fetch_row(mysqli_query($con,"Select * from applications where username='$email' and status='Hired' order by beg desc"));
$job=mysqli_fetch_row(mysqli_query($con,"Select * from jobs where id='".$res[1]."'"));
$org=mysqli_fetch_row(mysqli_query($con,"Select * from organizations where name like '$job[3]%'"));
if($res!=null && $res[8]==null)
{
echo'<span style="text-align:justify; color:#29AB87;">
<b>Current: </b>'.$job[1].' '.$job[0].' at '.$org[0].'<br>';
echo'<b>For: </b>'.$job[11].' month/s<br>
<b>Started on: </b>'.date("d-m-Y",strtotime($res[7])).'<br>
<b>Ends on (tentative): </b>'.date("d-m-Y",strtotime(" +".$job[11]." months",strtotime($res[7])));
}
else if($res!=null && $res[8]!=null)
{
echo'<span style="text-align:justify; color:#AB0505;">
<b>Last: </b>'.$job[1].' '.$job[0].' at '.$org[0].'<br>';
echo'<b>For: </b>'.$job[11].' month/s<br>
<b>Started on: </b>'.date("d-m-Y",strtotime($res[7])).'<br>
<b>Ended on: </b>'.date("d-m-Y",strtotime($res[8]));
}
else if($res==null)
echo'<span style="text-align:justify;">
<b>Current: </b>None
</span>';
echo '</div>';
echo'<!--div class="col-md-8">
<div class="tab-content profile-tab" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<div class="row">
<div class="col-md-6">
<label>User Id</label>
</div>
<div class="col-md-6">
<p>Kshiti123</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Name</label>
</div>
<div class="col-md-6">
<p>Kshiti Ghelani</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Email</label>
</div>
<div class="col-md-6">
<p>kshitighelani@gmail.com</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Phone</label>
</div>
<div class="col-md-6">
<p>123 456 7890</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Profession</label>
</div>
<div class="col-md-6">
<p>Web Developer and Designer</p>
</div>
</div>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<div class="row">
<div class="col-md-6">
<label>Experience</label>
</div>
<div class="col-md-6">
<p>Expert</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Hourly Rate</label>
</div>
<div class="col-md-6">
<p>10$/hr</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Total Projects</label>
</div>
<div class="col-md-6">
<p>230</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>English Level</label>
</div>
<div class="col-md-6">
<p>Expert</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<label>Availability</label>
</div>
<div class="col-md-6">
<p>6 months</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<label>Your Bio</label><br/>
<p>Your detail description</p>
</div>
</div>
</div>
</div>
</div-->
</div>
</form>
</div>';
echo'
<div class="modal fade " id="exampleModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel1" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" style="background:#38b0de;">
<h5 class="modal-title" style="color:white;" id="exampleModalLabel">Edit Profile</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color:white;">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form method = "post" id="editt" enctype=\'multipart/form-data\'>
<div class="form-group">
<label for="myfile1">Profile Picture:</label>
<input type="file" id="myfile1" accept="image/jpeg" name="dp"><br>
<span style="font-size:10px;color:red">Only .jpg files of size <1MB allowed</span>
</div>
<div class="form-group"><input type = "text" id="domainn" name = "domain" class = "form-control" required value="'.$rows1[1].'" placeholder ="Expertise(eg.- Web Development)" style="border:2% !important; border-style:solid" multiple>
<span style="font-size:10px;color:red" id="lim"></span>
</div>
<div class="form-group"><textarea name = "description" class = "form-control" style="border:2% !important; border-style:solid" placeholder ="About(Min 100 characters)" id="des" required>'.$rows1[7].'</textarea></div>
<div class="form-group"><input type = "url" name = "linkedin" class = "form-control" placeholder ="LinkedIn Profile" value="'.$rows1[2].'" style="border:2% !important; border-style:solid"></div>
<div class="form-group"><input type = "url" name = "git" class = "form-control" placeholder ="GitHub Profile" value="'.$rows1[3].'" style="border:2% !important; border-style:solid"></div>
<div class="form-group"><input type = "url" name = "insta" class = "form-control" placeholder ="Instagram Profile" value="'.$rows1[4].'" style="border:2% !important; border-style:solid"></div>
<div class="form-group"><input type = "url" name = "dribbble" class = "form-control" placeholder ="Dribbble Profile" value="'.$rows1[5].'" style="border:2% !important; border-style:solid"></div>
<div class="form-group"><input type = "email" name = "mail" class = "form-control" required placeholder ="Email ID" value="'.$rows1[6].'" style="border:2% !important; border-style:solid"></div>
<div class="form-group">
<label for="myfile">Resume:</label>
<input type="file" id="myfile" accept="application/pdf" name="resume"><br>
<span style="font-size:10px;color:red">Only .pdf files of size <1MB allowed</span>
</div>
<div class="ml-auto mr-auto" align="right"><button type = "submit" class = "btn btn-primary" id="registerr" style="background:#29AB87;"> Save</button> </div>
</form>
</div>
</div>
</div>
</div>';
// if(isset($_POST['mail'])){
// $err=4;$err1=4;
// if(!empty($_FILES['resume'])&&!empty($_FILES['resume']['name'])){
// $file_name = $_FILES['resume']['name'];
// $file_type = $_FILES['resume']['type'];
// $file_size = $_FILES['resume']['size'];
// $file_tem_Loc = $_FILES['resume']['tmp_name'];
// $file_store = "upload/".$file_name;
// $fileextension = (explode('.',$file_name));
// $fileextension = strtolower(end($fileextension));
// $uploadPath = "./resumes/";
// $extensions = array("pdf");
// if (! in_array($fileextension,$extensions)) {
// $err =1;
// }
// else if ($file_size >1048576) {
// $err=2;
// }
// else {
// if(file_exists("./resumes/".strtolower(join(explode(".",$rows1[6],-1),'.')).".pdf"))
// $ab=unlink("./resumes/".strtolower(join(explode(".",$rows1[6],-1),'.')).".pdf");
// $didUpload=move_uploaded_file($_FILES["resume"]["tmp_name"], "./resumes/".strtolower(join(explode(".",$rows1[6],-1),'.')).".pdf");
// if ($didUpload) {
// $err=0;
// unset($_FILES['resume']);
// }
// else {
// $err=5;
// }
// }
// if( $err == 1){
// $_SESSION['msg']=$_SESSION['msg'].'Resume Updationtion Failed.Only .pdf is supported!';
// }
// else if( $err == 2){
// $_SESSION['msg']=$_SESSION['msg'].'Resume Updation Failed. File size Should be lass than 1MB!';
// }
// else if( $err == 5){
// $_SESSION['msg']=$_SESSION['msg'].'Resume Updation Failed.File not uploaded.';
// }
// }
// if(!empty($_FILES['dp'])&&!empty($_FILES['dp']['name'])){
// $file_name = $_FILES['dp']['name'];
// $file_type = $_FILES['dp']['type'];
// $file_size = $_FILES['dp']['size'];
// $file_tem_Loc = $_FILES['dp']['tmp_name'];
// $file_store = "upload/".$file_name;
// $fileextension = (explode('.',$file_name));
// $fileextension = strtolower(end($fileextension));
// $uploadPath = "./images/";
// $extensions = array("jpg");
// $err1=0;
// if (! in_array($fileextension,$extensions)) {
// $err1 =1;
// }
// else if ($file_size >1048576) {
// $err1=2;
// }
// else {
// if(file_exists("./images/".strtolower(join(explode(".",$rows1[6],-1),'.')).".jpg"))
// $ab=unlink("./images/".strtolower(join(explode(".",$rows1[6],-1),'.')).".jpg");
// $didUpload=move_uploaded_file($_FILES["dp"]["tmp_name"], "./images/".strtolower(join(explode(".",$rows1[6],-1),'.')).".jpg");
// if ($didUpload) {
// $err1=0;
// }
// else {
// $err1=5;
// }
// }
// if( $err1 == 1){
// $_SESSION['msg']=$_SESSION['msg'].'Picture Updationtion Failed.Only .jpg is supported!';
// }
// else if( $err1 == 2){
// $_SESSION['msg']=$_SESSION['msg'].'Picture Updation Failed. File size should be less than 1MB!';
// }
// else if( $err1 == 5){
// $_SESSION['msg']=$_SESSION['msg'].'Picture Updation Failed.File not uploaded.';
// }
// }
// $dom=$_POST['domain'];
// $l=$_POST['linkedin'];
// $g=$_POST['git'];
// $i=$_POST['insta'];
// $d=$_POST['dribbble'];
// $m=$_POST['mail'];
// $des=$_POST['description'];
// if($m!=$rows1[6] && $err1==4)
// {
// rename("./images/".strtolower(join(explode(".",$rows1[6],-1),'.')).".jpg","./images/".strtolower(join(explode(".",$m,-1),'.')).".jpg");
// }
// if($m!=$rows1[6] && $err==4)
// {
// rename("./resumes/".strtolower(join(explode(".",$rows1[6],-1),'.')).".pdf","./resumes/".strtolower(join(explode(".",$m,-1),'.')).".pdf");
// }
// $condi="update userdata set domain='$dom',linkedin='$l', git='$g', insta='$i', dribbble='$d', mail='$m', abt=\"$des\"";
// if($err==0)
// $condi=$condi.", resume=1";
// if($err1==0)
// $condi=$condi.", pic=1";
// $condi=$condi." WHERE href='$rows1[0]'";
// $up=mysqli_query($con,$condi);
// if($up)
// $_SESSION['msgs']='<div class="alert alert-success alert-dismissible fade show" role="alert" align="center" style="padding-top:1%; padding- left:1%; padding-right:1%; transition:opacity 1s ease;" id="qwe1">
// <strong>Updation Successful!</strong>
// <button type="button" class="close" data-dismiss="alert" aria-label="Close">
// <span aria-hidden="true">×</span>
// </button>
// </div>';
// header("location:edit_profile.php");
// echo "<meta http-equiv=\"refresh\" content=\"0\" />";
// }
?>
<?php/*
if (isset($_POST)) {
if(!empty($_FILES['fil'])){
$file_name = $_FILES['fil']['name'];
$file_type = $_FILES['fil']['type'];
$file_size = $_FILES['fil']['size'];
$file_tem_Loc = $_FILES['fil']['tmp_name'];
$file_store = "upload/".$file_name;
$fileextension = (explode('.',$file_name));
$fileextension = strtolower(end($fileextension));
$uploadPath = "./upload/";
$extensions = array("pdf");
if (! in_array($fileextension,$extensions)) {
$err =1;
}
else if ($file_size > 20000000000000) {
$err=2;
}
else {
if(file_exists("./upload/".$rows[4].".pdf"))
$ab=unlink("./upload/".$rows[4].".pdf");
$didUpload=move_uploaded_file($_FILES["fil"]["tmp_name"], $uploadPath.strtolower(join(explode(".",$email,-1),'.')).'.'.$fileextension);
if ($didUpload) {
$err=0;
//echo "DONE";
} else {
$err=5;
}
}
}
$c=0;
$condi="update usertable set ";
if(!empty($_POST['fullname'])){
$name = $_POST['fullname'];
if($c==1)
$condi.=",fullname='$name'";
else
$condi.="fullname='$name'";
$c=1;
}
if(!empty($_POST['password'])){
$pass = md5($_POST['password']);
if($c==1)
$condi.=",password='$pass'";
else
$condi.="password='$pass'";
$c=1;
}
if(!empty($_POST['phno'])){
$phno = $_POST['phno'];
if($c==1)
$condi.=",no='$phno'";
else
$condi.="no='$phno'";
$c=1;
}
$condi.=" where email='$rows[1]'";
$up=mysqli_query($con,$condi);
if($up)
echo '<div class="alert alert-success alert-dismissible fade show" role="alert" align="center" style="padding-top:1%; padding- left:1%; padding-right:1%;">
<strong>Updation Successful!</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>';
}
else {
//echo "NOT THERE";
}
if(isset($_GET))
{
extract($_GET);
}
if(!empty($err))
{
if( $err == 1){
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert" align="center" style="padding-top:1%; padding- left:1%; padding-right:1%;">
<strong>Updationtion Failed.Only .pdf is supported!</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>';
}
else if( $err == 2){
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert" align="center" style="padding-top:1%; padding- left:1%; padding-right:1%;">
<strong>Updation Failed. File size exceeded!</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>';
}
else if( $err > 2){
echo '<div class="alert alert-danger alert-dismissible fade show" role="alert" align="center" style="padding-top:1%; padding- left:1%; padding-right:1%;">
<strong>Updation Failed.File not uploaded.</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>';
}
else {
$_SESSION['email']=$email;
header("location:user_home.php");
}
}*/
?>
<br>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script>
function toggleCheck() {
if(document.getElementById("myCheckbox").checked === false){
setTimeout(function () {
window.location.href="./user_logout.php";
}, 250);
}
}
window.setTimeout(function() {
document.getElementById("qwe1").style.opacity=0;
}, 2000);
window.setTimeout(function() {
document.getElementById("qwe1").style.display="none";
}, 2500);
window.setTimeout(function() {
document.getElementById("qwe2").style.opacity=0;
}, 2000);
window.setTimeout(function() {
document.getElementById("qwe2").style.display="none";
}, 2500);
window.setTimeout(function() {
document.getElementById("qwe3").style.opacity=0;
}, 2000);
window.setTimeout(function() {
document.getElementById("qwe3").style.display="none";
}, 2500);
$('#domainn').bind('keyup', function() {
var x=$('#domainn').val().length;
if(x>50)
$('#registerr').attr('disabled','disabled');
else
$('#registerr').removeAttr('disabled');
document.getElementById("lim").innerHTML="Only "+(50-x)+ " characters left";
});
function more(){
event.preventDefault();
if(document.getElementById("moree").value=="...See more"){
document.getElementById("moree").value="See less";
document.getElementById("aboutmore").style.display="";}
else{
document.getElementById("moree").value="...See more";
document.getElementById("aboutmore").style.display="none";}
}
$(document).ready(function() {
$('#exampleModalError').modal('show');
var x=$('#domainn').val().length;
document.getElementById("lim").innerHTML="Only "+(50-x)+ " characters left";
});
</script>
</body>
</html>