1// JavaScript Document 2/**********************************/ 3/*document use to call all ajax functions*/ 4/*author :- Cakiweb */ 5/* on :- 30-11-2019 */ 6/**********************************/ 7 8function getAlladmitstudent(ctrlId,selectedId,branchId,session){ 9 $.ajax({ 10 method:'post', 11 url:'ajax.php', 12 dataType:'json', 13 data:{act :"getAlladmitstudent",branchId:branchId,session:session}, 14 success:function(res){ 15 var bindData = ''; 16 if(res.status == 200){ 17 var data = res.res; 18 bindData += '<option value="">--Select Student--</option>'; 19 $.each(data, function(i){ 20 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 21 bindData += '<option value="'+data[i].id+'" '+selected+'>'+data[i].sname+'</option>'; 22 }); 23 }else{ 24 bindData += '<option value="">--Select Student--</option>'; 25 } 26 27 $('#'+ctrlId).html(bindData); 28 } 29 }); 30} 31 32 33function loadfeelist(ctrlId,selectedId,branchId,classid){ 34 $.ajax({ 35 method:'post', 36 url:'ajax.php', 37 dataType:'json', 38 data:{act :"loadfeelist",branchId:branchId,classid:classid}, 39 success:function(res){ 40 var bindData = ''; 41 if(res.status == 200){ 42 var data = res.res; 43 bindData += '<option value="">--Select Fees--</option>'; 44 $.each(data, function(i){ 45 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 46 bindData += '<option value="'+data[i].id+'" '+selected+' data-fee="'+data[i].amount+'">'+data[i].fees_desc+'</option>'; 47 }); 48 49 }else{ 50 bindData += '<option value="">--Select Fees--</option>'; 51 } 52 53 $('#'+ctrlId).html(bindData); 54 } 55 }); 56} 57 58function getDetailsins(installmentId){ 59 if(installmentId > 0){ 60 //$('#installDtls').toggle(); 61 $("#installDtls").modal('show'); 62 $.ajax({ 63 method:'post', 64 url:'ajax.php', 65 dataType:'json', 66 data:{act :"getDetailsins",installmentId:installmentId}, 67 success:function(res){ 68 if(res.status == 200){ 69 var bindData = ''; 70 var data = res.res; 71 //console.log(data) 72 var monname = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
72November", "December" ]; 73 var insdate = new Date(data[0].installdate); 74 var finalInstall = insdate.getDate()+'-'+monname[insdate.getMonth()]+'-'+insdate.getFullYear(); 75 bindData += '<table class="table"><tr><td>Paid Date</td><td>'+finalInstall+'</td></tr><tr><td>Transaction Number</td><td>'+data[0].transactionno+'</td></tr><tr><td>Fine Amount</td><td>'+data[0].extra_charge+'</td></tr><tr><td>Concession Fees</td><td>'+data[0].concession+'</td></tr></table>'; 76 $('.bindData').html(bindData); 77 } 78 } 79 }); 80 } 81} 82 83 84function getAllstudent(ctrlId,selectedId,branchId,session){ 85 $.ajax({ 86 method:'post', 87 url:'ajax.php', 88 dataType:'json', 89 data:{act :"getAllstudent",branchId:branchId,session:session}, 90 success:function(res){ 91 var bindData = ''; 92 if(res.status == 200){ 93 var data = res.res; 94 bindData += '<option value="">--Select Student--</option>'; 95 $.each(data, function(i){ 96 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 97 bindData += '<option value="'+data[i].id+'" '+selected+'>'+data[i].sname+'</option>'; 98 }); 99 100 }else{ 101 bindData += '<option value="">--Select Student--</option>'; 102 } 103 104 105 $('#'+ctrlId).html(bindData); 106 } 107 }); 108} 109 110 111function getallAccessories(ctrlId,selectedId,branchId,session,studentId){ 112 $.ajax({ 113 method:'post', 114 url:'ajax.php', 115 dataType:'json', 116 data:{act :"getallAccessories",branchId:branchId,session:session,studentId:studentId}, 117 success:function(res){ 118 var bindData = ''; 119 if(res.status == 200){ 120 var data = res.res; 121 bindData += '<option value="">--Select Accessories--</option>'; 122 $.each(data, function(i){ 123 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 124 bindData += '<option value="'+data[i].id+'" '+selected+' data-fee="'+data[i].price+'">'+data[i].accessories+'</option>'; 125 }); 126 127 }else{ 128 bindData += '<option value="">--Select Accessories--</option>'; 129 } 130 131 132 $('#'+ctrlId).html(bindData); 133 } 134 }); 135} 136 137 138function getReadmit(branchId,ctrlId,selectedId,session,reclass){ 139 $.ajax({ 140 method:'post', 141 url:'ajax.php', 142 dataType:'json', 143 data:{act :"getReadmit",branchId:branchId,session:session,reclass:reclass}, 144 success:function(res){ 145 var bindData = ''; 146 if(res.status == 200){ 147 var data = res.res; 148 bindData += '<option value="">--Select Student--</option>'; 149 $.each(data, function(i){ 150 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 151 bindData += '<option value="'+data[i].id+'" '+selected+'>'+data[i].sname+'</option>'; 152 }); 153 }else{ 154 bindData += '<option value="">--Select Student--</option>'; 155 } 156 157 $('#'+ctrlId).html(bindData); 158 } 159 }); 160} 161 162 163function checkFine(installmentId,admissionId){ 164 $('#hdninstId').val(installmentId); 165 $.ajax({ 166 method:'post', 167 url:'ajax.php', 168 dataType:'json', 169 data:{act :"checkFine",installmentId:installmentId,admissionId:admissionId}, 170 success:function(res){ 171 if(res.status == 200){ 172 //console.log(res.totalfine) 173 $('#extra_charge').val(res.totalfine); 174 $('#dayslate').html(" (Due to "+res.daysexceed+" days exceed of installment "+res.daycharge+"% per day charge"); 175 } 176 } 177 }); 178} 179 180 181function getSaledtls(invid){ 182 if(invid > 0){ 183 $("#saleDtls").modal('show'); 184 $.ajax({ 185 method:'post', 186 url:'ajax.php', 187 dataType:'json', 188 data:{act :"getSaledtls",invid:invid}, 189 success:function(res){ 190 var bindData = ''; 191 bindData += '<table class="table"><th>#slno</th><th>Items</th><th>Price</th><th>Quantity</th><th>Total</th>'; 192 if(res.status == 200){ 193 var data = res.res; 194 var totval = []; 195 var finalTot = 0; 196 $.each(data, function(i){ 197 totval.push(parseInt(data[i].amt*data[i].quantity)); 198 bindData += '<tr><td>'+(i+1)+'</td><td>'+data[i].accessories+'</td><td>'+data[i].amt+'</td><td>'+data[i].quantity+'</td><td>'+(data[i].amt*data[i].quantity)+'</td></tr>'; 199 });
200 if(totval.length > 0){ 201 $.each(totval, function(j){ 202 finalTot = parseInt(finalTot)+parseInt(totval[j]); 203 }); 204 } 205 bindData += '<tr><td colspan="4">Total</td><td>'+finalTot+'</td></tr>'; 206 //console.log(finalTot) 207 }else{ 208 bindData += '<tr><td colspan="5">Sorry No Record Found!!!</td></tr>'; 209 } 210 bindData +='</table>'; 211 $('.bindData').html(bindData); 212 } 213 }); 214 } 215 216} 217 218 219 220function getAllstudentforreport(ctrlId,selectedId,branchId,session,selClass){ 221 $.ajax({ 222 method:'post', 223 url:'ajax.php', 224 dataType:'json', 225 data:{act :"getAllstudentforreport",branchId:branchId,session:session,selClass:selClass}, 226 success:function(res){ 227 var bindData = ''; 228 if(res.status == 200){ 229 var data = res.res; 230 bindData += '<option value="">--Select Student--</option>'; 231 $.each(data, function(i){ 232 var selected = (selectedId > 0 && data[i].id == selectedId)?'selected':''; 233 bindData += '<option value="'+data[i].studentid+'" '+selected+'>'+data[i].studname+'</option>'; 234 }); 235 }else{ 236 bindData += '<option value="">--Select Student--</option>'; 237 } 238 239 $('#'+ctrlId).html(bindData); 240 } 241 }); 242} 243 244 245function getAllnewstud(session){ 246 if(session != ''){ 247 $.ajax({ 248 method:'post', 249 url:'ajax.php', 250 dataType:'json', 251 data:{act :"getAllnewstud",session:session}, 252 success:function(res){ 253 var bindData = ''; 254 var finalTot = 0; 255 if(res.status == 200){ 256 var data = res.res; 257 var studArr = []; 258 $.each(data, function(i){ 259 finalTot = parseInt(finalTot)+parseInt(data[i].stud); 260 studArr.push(parseInt(data[i].stud)); 261 }); 262 if(studArr.length > 0){ 263 $("#sparkline-1").sparkline(studArr, { 264 type: 'line', 265 width: '99.5%', 266 height: '100', 267 lineColor: '#5969ff', 268 fillColor: '#dbdeff', 269 lineWidth: 2, 270 spotColor: undefined, 271 minSpotColor: undefined, 272 maxSpotColor: undefined, 273 highlightSpotColor: undefined, 274 highlightLineColor: undefined, 275 resize:true 276 }); 277 $('#numstud').html(finalTot); 278 }else{ 279 $("#sparkline-1").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 280 type: 'line', 281 width: '99.5%', 282 height: '100', 283 lineColor: '#5969ff', 284 fillColor: '#dbdeff', 285 lineWidth: 2, 286 spotColor: undefined, 287 minSpotColor: undefined, 288 maxSpotColor: undefined, 289 highlightSpotColor: undefined, 290 highlightLineColor: undefined, 291 resize:true 292 }); 293 } 294 }else{ 295 $("#sparkline-1").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 296 type: 'line', 297 width: '99.5%', 298 height: '100', 299 lineColor: '#5969ff', 300 fillColor: '#dbdeff', 301 lineWidth: 2, 302 spotColor: undefined, 303 minSpotColor: undefined, 304 maxSpotColor: undefined, 305 highlightSpotColor: undefined, 306 highlightLineColor: undefined, 307 resize:true 308 }); 309 } 310 } 311 }); 312 } 313} 314 315 316 317function getAllnewadmin(session){ 318 if(session != ''){ 319 $.ajax({ 320 method:'post', 321 url:'ajax.php', 322 dataType:'json', 323 data:{act :"getAllnewadmin",session:session}, 324 success:function(res){ 325 var bindData = ''; 326 var finalTot = 0; 327 if(res.status == 200){ 328 var data = res.res; 329 var studArr = []; 330 $.each(data, function(i){ 331 finalTot = parseInt(finalTot)+parseInt(data[i].stud); 332 studArr.push(parseInt(data[i].stud)); 333 }); 334 if(studArr.length > 0){ 335 $("#sparkline-2").sparkline(studArr, { 336 type: 'line', 337 width: '99.5%', 338 height: '100', 339 lineColor: '#ff407b', 340 fillColor: '#ffdbe6', 341 lineWidth: 2, 342 spotColor: undefined, 343 minSpotColor: undefined, 344 maxSpotColor: undefined, 345 highlightSpotColor: undefined, 346 highlightLineColor: undefined, 347 resize:true 348 });
349 $('#newadmcnt').html(finalTot); 350 }else{ 351 $("#sparkline-2").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 352 type: 'line', 353 width: '99.5%', 354 height: '100', 355 lineColor: '#ff407b', 356 fillColor: '#ffdbe6', 357 lineWidth: 2, 358 spotColor: undefined, 359 minSpotColor: undefined, 360 maxSpotColor: undefined, 361 highlightSpotColor: undefined, 362 highlightLineColor: undefined, 363 resize:true 364 }); 365 } 366 }else{ 367 $("#sparkline-2").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 368 type: 'line', 369 width: '99.5%', 370 height: '100', 371 lineColor: '#ff407b', 372 fillColor: '#ffdbe6', 373 lineWidth: 2, 374 spotColor: undefined, 375 minSpotColor: undefined, 376 maxSpotColor: undefined, 377 highlightSpotColor: undefined, 378 highlightLineColor: undefined, 379 resize:true 380 }); 381 } 382 } 383 }); 384 } 385} 386 387 388function getAllexp(session){ 389 if(session != ''){ 390 $.ajax({ 391 method:'post', 392 url:'ajax.php', 393 dataType:'json', 394 data:{act :"getAllexp",session:session}, 395 success:function(res){ 396 var bindData = ''; 397 var finalTot = 0; 398 if(res.status == 200){ 399 var data = res.res; 400 var studArr = []; 401 $.each(data, function(i){ 402 finalTot = parseInt(finalTot)+parseInt(data[i].stud); 403 studArr.push(parseInt(data[i].stud)); 404 }); 405 if(studArr.length > 0){ 406 $("#sparkline-4").sparkline(studArr, { 407 type: 'line', 408 width: '99.5%', 409 height: '100', 410 lineColor: '#fec957', 411 fillColor: '#fff2d5', 412 lineWidth: 2, 413 spotColor: undefined, 414 minSpotColor: undefined, 415 maxSpotColor: undefined, 416 highlightSpotColor: undefined, 417 highlightLineColor: undefined, 418 resize:true, 419 }); 420 $('#expensed').html(finalTot); 421 }else{ 422 $("#sparkline-4").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 423 type: 'line', 424 width: '99.5%', 425 height: '100', 426 lineColor: '#fec957', 427 fillColor: '#fff2d5', 428 lineWidth: 2, 429 spotColor: undefined, 430 minSpotColor: undefined, 431 maxSpotColor: undefined, 432 highlightSpotColor: undefined, 433 highlightLineColor: undefined, 434 resize:true, 435 }); 436 } 437 }else{ 438 $("#sparkline-4").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 439 type: 'line', 440 width: '99.5%', 441 height: '100', 442 lineColor: '#fec957', 443 fillColor: '#fff2d5', 444 lineWidth: 2, 445 spotColor: undefined, 446 minSpotColor: undefined, 447 maxSpotColor: undefined, 448 highlightSpotColor: undefined, 449 highlightLineColor: undefined, 450 resize:true, 451 }); 452 } 453 } 454 }); 455 } 456} 457 458 459 460function getAllrevenue(session){ 461 if(session != ''){ 462 $.ajax({ 463 method:'post', 464 url:'ajax.php', 465 dataType:'json', 466 data:{act :"getAllrevenue",session:session}, 467 success:function(res){ 468 var bindData = ''; 469 var finalTot = 0; 470 if(res.status == 200){ 471 var data = res.res; 472 var studArr = []; 473 $.each(data, function(i){ 474 finalTot = parseInt(finalTot)+(parseInt(data[i].accso)+parseInt(data[i].totval)); 475 studArr.push(parseInt(data[i].accso)+parseInt(data[i].totval)); 476 }); 477 if(studArr.length > 0){ 478 $("#sparkline-3").sparkline(studArr, { 479 type: 'line', 480 width: '99.5%', 481 height: '100', 482 lineColor: '#fec957', 483 fillColor: '#fff2d5', 484 lineWidth: 2, 485 spotColor: undefined, 486 minSpotColor: undefined, 487 maxSpotColor: undefined, 488 highlightSpotColor: undefined, 489 highlightLineColor: undefined, 490 resize:true, 491 }); 492 $('#totPrice').html(finalTot); 493 }else{ 494 $("#sparkline-3").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 495 type: 'line', 496 width: '99.5%', 497 height: '100', 498 lineColor: '#25d5f2', 499 fillColor: '#dffaff', 500 lineWidth: 2, 501 spotColor: undefined,
502 minSpotColor: undefined, 503 maxSpotColor: undefined, 504 highlightSpotColor: undefined, 505 highlightLineColor: undefined, 506 resize:true 507 }); 508 } 509 }else{ 510 $("#sparkline-3").sparkline([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], { 511 type: 'line', 512 width: '99.5%', 513 height: '100', 514 lineColor: '#25d5f2', 515 fillColor: '#dffaff', 516 lineWidth: 2, 517 spotColor: undefined, 518 minSpotColor: undefined, 519 maxSpotColor: undefined, 520 highlightSpotColor: undefined, 521 highlightLineColor: undefined, 522 resize:true 523 }); 524 } 525 } 526 }); 527 } 528}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.