-
Notifications
You must be signed in to change notification settings - Fork 157
/
student_add_ajax.php
226 lines (165 loc) · 7.41 KB
/
student_add_ajax.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
<?php
include 'layout/header_script.php';
if(isset($_POST['select_program'])){
$id=$_POST['select_program'];
$program_ob->select_batch_option($id);
}
if(isset($_POST['total_pament'])){
$id=$_POST['total_pament'];
if($id!=0){$total=$program[$id]['fee'];
echo "$total";
}
else{
echo "";
}
}
if(isset($_POST['attend'])){
$id=$_POST['attend'];
$currentDateTime = date('Y-m-d H:i:s', time() - 6*3600);
$newDateTime = date('h:i A', strtotime($currentDateTime));
$date=date('Y-m-d');
$flag=0;
foreach ($student as $key => $value) {
$id1=$value['id'];
$name=$value['name'];
$nick=$value['nick'];
$to=$value['personal_mobile'];
if($id==$id1){
$msg="Hello ".$name." Gurdians.\n\nToday Is ".$date.".\n";
$msg.=$nick." Comes Today Coaching at ".$newDateTime.".\n\n";
$msg.="\n\nYouth Admission Care\nArambag,Dhaka";
$sms->send_sms($to,$msg);
$flag=1;
break;
}
}
if($flag==1)echo "<font color='green'>Sucessfully Attendends</font>";
else echo "<font color='red'>Sorry Student is Not Found</font>";
}
if(isset($_POST['edit_student']))
{
$id=$_POST['edit_student'];
$info=$student[$id];
$name=$info['name'];
?>
<div class="row">
<div class="col-xs-12 col-sm-12">
<div class="box" >
<div class="box_header">
<div class="panel-title">Personal Information</div>
</div>
<div style="padding-top:30px" class="box_body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form action="student_action.php" method="post" enctype="multipart/form-data">
<?php
//$site->form_input($level,$name,$id,$type="text",$icon="exclamation-sign",$value="",$ex="",$req="yes")
$site->form_input("Student Full Name","name","name");
$site->form_input("Student Nick Name","nick","nick");
$site->form_input("Father Name","father_name","father_name");
$site->form_input("Mother Name","mother_name","mother_name");
$site->form_input("Sudent mobile","student_mobile","student_mobile","number","exclamation-sign","","","no");
$site->form_input("Father mobile","father_mobile","number","number","exclamation-sign","","","no");
$site->form_input("Mother mobile","mother_mobile","mobile","number","exclamation-sign","","","no");
$site->form_input("Email","email","mobile","text","exclamation-sign","$name","","no");
$site->form_input("Birthday","birthday","mobile","date","exclamation-sign","","","yes");
?>
<div class='form-group'>
<label class='control-label' for='inputName'><b>Religion</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<select class='form-control' name='religion' id='brand_add' class='cs-select cs-skin-border' required="">
<option value="Muslim">Muslim</option>
<option value="Hindu">Hindu</option>
<option value="Buddo">Buddo</option>
<option value="Cristan">Cristan</option>
</select>
</div></div>
<div class='form-group'>
<label class='control-label' for='inputName'><b>Gender</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<select class='form-control' name='gender' id='brand_add' class='cs-select cs-skin-border' required="">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div></div>
<?php
$site->form_input("Address","address","address","text","exclamation-sign","","","no");
?>
<div class="form-group">
<label class="control-label" for="inputName"><b>Upload Student Photo</b></label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-camera"></i></span>
<input type="file" class="form-control" id="image" name="image" accept="image/*" onchange="loadFile(event)" />
<br/>
</div>
<div id="err_product_image" class="error"></div>
<img id="add_thumbnil1" style="width:20%; margin-top:10px;" src="<?php echo "upload/student_photo/avatar.png";?>" alt="image"/>
</div>
</div>
<!-- Start Academic Information -->
<div class="box_header">
<div class="panel-title">Academic Information</div>
</div>
<div style="padding-top:30px" class="box_body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<?php
$site->form_input("School Name","school_name","school_name","text","exclamation-sign","","","no");
$site->form_input("SSC Rool Number","ssc_rool","ssc_rool","number","exclamation-sign","","","no");
$site->form_input("SSC Registration Number","ssc_reg","ssc_reg","number","exclamation-sign","","","no");
$site->form_input("SSC Board Name","ssc_board","ssc_board","text","exclamation-sign","","","no");
?>
<div class='form-group'>
<label class='control-label' for='inputName'><b>SSC Result</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<input class='form-control' data-error='' id='ssc_result' value='' step="0.01" placeholder='Enter SSC Result' type='number' name='ssc_result' />
</div>
<div id='err_product_date' class='error'></div>
</div>
</div>
<!-- End Academic Information -->
<!-- Start Academic Information -->
<div class="box_header">
<div class="panel-title">Admission</div>
</div>
<div style="padding-top:30px" class="box_body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<div class='form-group'>
<label class='control-label' for='inputName'><b>Select Program</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<select class='form-control' name='program' id='program' class='cs-select cs-skin-border' onchange="select_program()" required="">
<option value="0">Select Program</option>
<?php $program_ob->select_program(); ?>
</select>
</div></div>
<div class='form-group'>
<label class='control-label' for='inputName'><b>Select Batch</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<select class='form-control' name='batch' id='batch' class='cs-select cs-skin-border' required="">
<div id="batch_field">
</div>
</select>
</div>
</div>
<div class='form-group'>
<label class='control-label' for='inputName'><b>Total Payment</b></label>
<div class='input-group'>
<span class='input-group-addon'><i class='glyphicon glyphicon-exclamation-sign'></i></span>
<input class='form-control' data-error='Please enter name field.' id='total' value='' onchange="cal_advanced()" placeholder='Total Payment' type='text' name='total' />
</div>
<div id='err_product_date' class='error'></div>
</div>
</div>
<!-- End Academic Information -->
<button class="box_btn" name="insert" type="submit" style=""><span class="glyphicon glyphicon-floppy-save"></span> Save Information</button>
</form>
<!-- end body -->
</div>
</div>
</div>
<?php
}
?>