Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("setup.php");
- $i=0;
- $j=0;
- $inserted=0;
- $deleted=0;
- $manufId=0;
- $manufacturerId=0;
- $vendorId=$_POST['vendorId'];
- if(isset($_POST['mappedListCount'])>0){
- $mappedListCount=$_POST['mappedListCount'];
- for($i=0;$i<$mappedListCount;$i++){
- $id=$_POST['id'.$i];
- $manufacturerId=$_POST['manufacturerId'.$i];
- $modelName=$_POST['modelName'.$i];
- $url=$_POST['url'.$i];
- $modelDiv=$_POST['modelDiv'.$i];
- $selectManu=$_POST['selectManu'.$i];
- if($selectManu!=""){
- $manufId=$selectManu;
- }else{
- $manufId=$manufacturerId;
- }
- $no=@$_POST['no'.$i];
- $yes=@$_POST['yes'.$i];
- if($no!='on' or $no==''){
- $inserted=MappedPhone::saveMappedCexchangePhonesToCexchange($manufId,$modelName,$modelDiv,$url);
- if($inserted==1){
- $deleted = MappedPhone::removeMappedCexchangePhones($id);
- }
- $j++;
- }//closing !isset($_POST['ignoreModel'.$i])
- }//closing for loop
- $updatedServiceStats=MappedPhone::updateServiceStatsTable($j,$mappedListCount,$vendorId);
- $serviceStats=ServiceUpdateStatsTable::getServiceStats($vendorId);
- foreach($serviceStats as $object){
- $noOfUnMapped=$object->no_of_unmapped_phones;
- $noOfNewMapped=$object->no_of_new_mapped_phones;
- if($noOfNewMapped==0 and $noOfUnMapped==0){
- $approvalStatus=ServiceUpdateStatsTable::updateAppovalStatusOfServiceStats($vendorId);
- }
- }
- header('Location: listCexchangeMappedPhones.php?vendorId='.$vendorId);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement