Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. <?php
  2. require_once("setup.php");
  3. $i=0;
  4. $j=0;
  5. $inserted=0;
  6. $deleted=0;
  7. $manufId=0;
  8. $manufacturerId=0;
  9. $vendorId=$_POST['vendorId'];
  10. if(isset($_POST['mappedListCount'])>0){
  11. $mappedListCount=$_POST['mappedListCount'];
  12. for($i=0;$i<$mappedListCount;$i++){
  13. $id=$_POST['id'.$i];
  14. $manufacturerId=$_POST['manufacturerId'.$i];
  15. $modelName=$_POST['modelName'.$i];
  16. $url=$_POST['url'.$i];
  17. $modelDiv=$_POST['modelDiv'.$i];
  18. $selectManu=$_POST['selectManu'.$i];
  19. if($selectManu!=""){
  20. $manufId=$selectManu;
  21. }else{
  22. $manufId=$manufacturerId;
  23. }
  24. $no=@$_POST['no'.$i];
  25. $yes=@$_POST['yes'.$i];
  26. if($no!='on' or $no==''){
  27. $inserted=MappedPhone::saveMappedCexchangePhonesToCexchange($manufId,$modelName,$modelDiv,$url);
  28. if($inserted==1){
  29.  
  30.     $deleted = MappedPhone::removeMappedCexchangePhones($id);
  31. }
  32. $j++;
  33.  
  34. }//closing !isset($_POST['ignoreModel'.$i])
  35. }//closing for loop
  36. $updatedServiceStats=MappedPhone::updateServiceStatsTable($j,$mappedListCount,$vendorId);
  37. $serviceStats=ServiceUpdateStatsTable::getServiceStats($vendorId);
  38. foreach($serviceStats as $object){
  39. $noOfUnMapped=$object->no_of_unmapped_phones;
  40. $noOfNewMapped=$object->no_of_new_mapped_phones;
  41. if($noOfNewMapped==0 and $noOfUnMapped==0){
  42. $approvalStatus=ServiceUpdateStatsTable::updateAppovalStatusOfServiceStats($vendorId);
  43. }
  44. }
  45. header('Location: listCexchangeMappedPhones.php?vendorId='.$vendorId);
  46. }
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement