当前提交
						2b577cfd7d
					
				
					共有  9 个文件被更改,包括 123 次插入 和 51 次删除
				
			
		|  | @ -151,8 +151,9 @@ class Awards extends CI_Controller { | ||||||
|         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 |         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 | ||||||
| 
 | 
 | ||||||
|         if($this->input->method() === 'post') { |         if($this->input->method() === 'post') { | ||||||
|             $postdata['lotw'] = $this->input->post('lotw'); |  | ||||||
|             $postdata['qsl'] = $this->input->post('qsl'); |             $postdata['qsl'] = $this->input->post('qsl'); | ||||||
|  |             $postdata['lotw'] = $this->input->post('lotw'); | ||||||
|  |             $postdata['eqsl'] = $this->input->post('eqsl'); | ||||||
|             $postdata['worked'] = $this->input->post('worked'); |             $postdata['worked'] = $this->input->post('worked'); | ||||||
|             $postdata['confirmed'] = $this->input->post('confirmed'); |             $postdata['confirmed'] = $this->input->post('confirmed'); | ||||||
|             $postdata['notworked'] = $this->input->post('notworked'); |             $postdata['notworked'] = $this->input->post('notworked'); | ||||||
|  | @ -168,8 +169,9 @@ class Awards extends CI_Controller { | ||||||
|             $postdata['mode'] = $this->input->post('mode'); |             $postdata['mode'] = $this->input->post('mode'); | ||||||
|         } |         } | ||||||
|         else { // Setting default values at first load of page
 |         else { // Setting default values at first load of page
 | ||||||
|             $postdata['lotw'] = 1; |  | ||||||
|             $postdata['qsl'] = 1; |             $postdata['qsl'] = 1; | ||||||
|  |             $postdata['lotw'] = 1; | ||||||
|  |             $postdata['eqsl'] = 0; | ||||||
|             $postdata['worked'] = 1; |             $postdata['worked'] = 1; | ||||||
|             $postdata['confirmed'] = 1; |             $postdata['confirmed'] = 1; | ||||||
|             $postdata['notworked'] = 1; |             $postdata['notworked'] = 1; | ||||||
|  | @ -359,8 +361,9 @@ class Awards extends CI_Controller { | ||||||
|         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 |         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 | ||||||
| 
 | 
 | ||||||
|         if($this->input->method() === 'post') { |         if($this->input->method() === 'post') { | ||||||
|             $postdata['lotw'] = $this->input->post('lotw'); |  | ||||||
|             $postdata['qsl'] = $this->input->post('qsl'); |             $postdata['qsl'] = $this->input->post('qsl'); | ||||||
|  |             $postdata['lotw'] = $this->input->post('lotw'); | ||||||
|  |             $postdata['eqsl'] = $this->input->post('eqsl'); | ||||||
|             $postdata['worked'] = $this->input->post('worked'); |             $postdata['worked'] = $this->input->post('worked'); | ||||||
|             $postdata['confirmed'] = $this->input->post('confirmed'); |             $postdata['confirmed'] = $this->input->post('confirmed'); | ||||||
|             $postdata['notworked'] = $this->input->post('notworked'); |             $postdata['notworked'] = $this->input->post('notworked'); | ||||||
|  | @ -368,8 +371,9 @@ class Awards extends CI_Controller { | ||||||
| 			$postdata['mode'] = $this->input->post('mode'); | 			$postdata['mode'] = $this->input->post('mode'); | ||||||
|         } |         } | ||||||
|         else { // Setting default values at first load of page
 |         else { // Setting default values at first load of page
 | ||||||
|             $postdata['lotw'] = 1; |  | ||||||
|             $postdata['qsl'] = 1; |             $postdata['qsl'] = 1; | ||||||
|  |             $postdata['lotw'] = 1; | ||||||
|  |             $postdata['eqsl'] = 0; | ||||||
|             $postdata['worked'] = 1; |             $postdata['worked'] = 1; | ||||||
|             $postdata['confirmed'] = 1; |             $postdata['confirmed'] = 1; | ||||||
|             $postdata['notworked'] = 1; |             $postdata['notworked'] = 1; | ||||||
|  | @ -417,8 +421,9 @@ class Awards extends CI_Controller { | ||||||
|         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 |         $data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
 | ||||||
| 
 | 
 | ||||||
|         if($this->input->method() === 'post') { |         if($this->input->method() === 'post') { | ||||||
|             $postdata['lotw'] = $this->input->post('lotw'); |  | ||||||
|             $postdata['qsl'] = $this->input->post('qsl'); |             $postdata['qsl'] = $this->input->post('qsl'); | ||||||
|  |             $postdata['lotw'] = $this->input->post('lotw'); | ||||||
|  |             $postdata['eqsl'] = $this->input->post('eqsl'); | ||||||
|             $postdata['worked'] = $this->input->post('worked'); |             $postdata['worked'] = $this->input->post('worked'); | ||||||
|             $postdata['confirmed'] = $this->input->post('confirmed'); |             $postdata['confirmed'] = $this->input->post('confirmed'); | ||||||
|             $postdata['notworked'] = $this->input->post('notworked'); |             $postdata['notworked'] = $this->input->post('notworked'); | ||||||
|  | @ -426,8 +431,9 @@ class Awards extends CI_Controller { | ||||||
| 			$postdata['mode'] = $this->input->post('mode'); | 			$postdata['mode'] = $this->input->post('mode'); | ||||||
|         } |         } | ||||||
|         else { // Setting default values at first load of page
 |         else { // Setting default values at first load of page
 | ||||||
|             $postdata['lotw'] = 1; |  | ||||||
|             $postdata['qsl'] = 1; |             $postdata['qsl'] = 1; | ||||||
|  |             $postdata['lotw'] = 1; | ||||||
|  |             $postdata['eqsl'] = 0; | ||||||
|             $postdata['worked'] = 1; |             $postdata['worked'] = 1; | ||||||
|             $postdata['confirmed'] = 1; |             $postdata['confirmed'] = 1; | ||||||
|             $postdata['notworked'] = 1; |             $postdata['notworked'] = 1; | ||||||
|  | @ -611,8 +617,9 @@ class Awards extends CI_Controller { | ||||||
| 
 | 
 | ||||||
|         $bands[] = $band_type; |         $bands[] = $band_type; | ||||||
| 
 | 
 | ||||||
|         $postdata['lotw'] = 1; |  | ||||||
|         $postdata['qsl'] = 1; |         $postdata['qsl'] = 1; | ||||||
|  |         $postdata['lotw'] = 1; | ||||||
|  |         $postdata['eqsl'] = 0; | ||||||
|         $postdata['worked'] = 1; |         $postdata['worked'] = 1; | ||||||
|         $postdata['confirmed'] = 1; |         $postdata['confirmed'] = 1; | ||||||
|         $postdata['notworked'] = 1; |         $postdata['notworked'] = 1; | ||||||
|  | @ -639,8 +646,9 @@ class Awards extends CI_Controller { | ||||||
| 
 | 
 | ||||||
|         $bands[] = $this->input->post('band'); |         $bands[] = $this->input->post('band'); | ||||||
| 
 | 
 | ||||||
|         $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; |  | ||||||
|         $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; |         $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; | ||||||
|  |         $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; | ||||||
|  |         $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; | ||||||
|         $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; |         $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; | ||||||
|         $postdata['confirmed'] = $this->input->post('confirmed')  == 0 ? NULL: 1; |         $postdata['confirmed'] = $this->input->post('confirmed')  == 0 ? NULL: 1; | ||||||
|         $postdata['notworked'] = $this->input->post('notworked')  == 0 ? NULL: 1; |         $postdata['notworked'] = $this->input->post('notworked')  == 0 ? NULL: 1; | ||||||
|  | @ -688,8 +696,9 @@ class Awards extends CI_Controller { | ||||||
| 
 | 
 | ||||||
|         $bands[] = $this->input->post('band'); |         $bands[] = $this->input->post('band'); | ||||||
| 
 | 
 | ||||||
|         $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; |  | ||||||
|         $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; |         $postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1; | ||||||
|  |         $postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1; | ||||||
|  |         $postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1; | ||||||
|         $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; |         $postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1; | ||||||
|         $postdata['confirmed'] = $this->input->post('confirmed')  == 0 ? NULL: 1; |         $postdata['confirmed'] = $this->input->post('confirmed')  == 0 ? NULL: 1; | ||||||
|         $postdata['notworked'] = $this->input->post('notworked')  == 0 ? NULL: 1; |         $postdata['notworked'] = $this->input->post('notworked')  == 0 ? NULL: 1; | ||||||
|  |  | ||||||
|  | @ -24,6 +24,19 @@ class CQ extends CI_Model{ | ||||||
|             $cqZ[$i]['count'] = 0;                   // Inits each cq zone's count
 |             $cqZ[$i]['count'] = 0;                   // Inits each cq zone's count
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         $qsl = ""; | ||||||
|  |         if ($postdata['confirmed'] != NULL) { | ||||||
|  |             if ($postdata['qsl'] != NULL ) { | ||||||
|  |                 $qsl .= "Q"; | ||||||
|  |             } | ||||||
|  |             if ($postdata['lotw'] != NULL ) { | ||||||
|  |                 $qsl .= "L"; | ||||||
|  |             } | ||||||
|  |             if ($postdata['eqsl'] != NULL ) { | ||||||
|  |                 $qsl .= "E"; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         foreach ($bands as $band) { |         foreach ($bands as $band) { | ||||||
|             for ($i = 1; $i <= 40; $i++) { |             for ($i = 1; $i <= 40; $i++) { | ||||||
|                 $bandCq[$i][$band] = '-';                  // Sets all to dash to indicate no result
 |                 $bandCq[$i][$band] = '-';                  // Sets all to dash to indicate no result
 | ||||||
|  | @ -32,14 +45,14 @@ class CQ extends CI_Model{ | ||||||
|             if ($postdata['worked'] != NULL) { |             if ($postdata['worked'] != NULL) { | ||||||
|                 $cqBand = $this->getCQWorked($location_list, $band, $postdata); |                 $cqBand = $this->getCQWorked($location_list, $band, $postdata); | ||||||
|                 foreach ($cqBand as $line) { |                 foreach ($cqBand as $line) { | ||||||
|                     $bandCq[$line->col_cqz][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","'. $postdata['mode'] . '","CQZone")\'>W</a></div>'; |                     $bandCq[$line->col_cqz][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","'. $postdata['mode'] . '","CQZone","")\'>W</a></div>'; | ||||||
|                     $cqZ[$line->col_cqz]['count']++; |                     $cqZ[$line->col_cqz]['count']++; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             if ($postdata['confirmed'] != NULL) { |             if ($postdata['confirmed'] != NULL) { | ||||||
|                 $cqBand = $this->getCQConfirmed($location_list, $band, $postdata); |                 $cqBand = $this->getCQConfirmed($location_list, $band, $postdata); | ||||||
|                 foreach ($cqBand as $line) { |                 foreach ($cqBand as $line) { | ||||||
|                     $bandCq[$line->col_cqz][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","'. $postdata['mode'] . '","CQZone")\'>C</a></div>'; |                     $bandCq[$line->col_cqz][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . str_replace("&", "%26", $line->col_cqz) . '","' . $band . '","'. $postdata['mode'] . '","CQZone","'.$qsl.'")\'>C</a></div>'; | ||||||
|                     $cqZ[$line->col_cqz]['count']++; |                     $cqZ[$line->col_cqz]['count']++; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -132,16 +145,20 @@ class CQ extends CI_Model{ | ||||||
| 
 | 
 | ||||||
|     function addQslToQuery($postdata) { |     function addQslToQuery($postdata) { | ||||||
|         $sql = ''; |         $sql = ''; | ||||||
|         if ($postdata['lotw'] != NULL and $postdata['qsl'] == NULL) { |         $qsl = array(); | ||||||
|             $sql .= " and col_lotw_qsl_rcvd = 'Y'"; |         if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { | ||||||
|  |             $sql .= ' and ('; | ||||||
|  |             if ($postdata['qsl'] != NULL) { | ||||||
|  |                 array_push($qsl, "col_qsl_rcvd = 'Y'"); | ||||||
|             } |             } | ||||||
| 
 |             if ($postdata['lotw'] != NULL) { | ||||||
|         if ($postdata['qsl'] != NULL and $postdata['lotw'] == NULL) { |                 array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); | ||||||
|             $sql .= " and col_qsl_rcvd = 'Y'"; |  | ||||||
|             } |             } | ||||||
| 
 |             if ($postdata['eqsl'] != NULL) { | ||||||
|         if ($postdata['qsl'] != NULL && $postdata['lotw'] != NULL) { |                 array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); | ||||||
|             $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; |             } | ||||||
|  |             $sql .= implode(' or ', $qsl); | ||||||
|  |             $sql .= ')'; | ||||||
|         } |         } | ||||||
|         return $sql; |         return $sql; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -126,7 +126,7 @@ function get_dok_array($bands, $postdata, $location_list) { | ||||||
| 		$sql = ''; | 		$sql = ''; | ||||||
| 		$qsl = array(); | 		$qsl = array(); | ||||||
| 		if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { | 		if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { | ||||||
| 			$sql .= 'and ('; | 			$sql .= ' and ('; | ||||||
| 			if ($postdata['qsl'] != NULL) { | 			if ($postdata['qsl'] != NULL) { | ||||||
| 				array_push($qsl, "col_qsl_rcvd = 'Y'"); | 				array_push($qsl, "col_qsl_rcvd = 'Y'"); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  | @ -69,6 +69,19 @@ class DXCC extends CI_Model { | ||||||
| 
 | 
 | ||||||
| 		$location_list = "'".implode("','",$logbooks_locations_array)."'"; | 		$location_list = "'".implode("','",$logbooks_locations_array)."'"; | ||||||
| 
 | 
 | ||||||
|  | 		$qsl = ""; | ||||||
|  | 		if ($postdata['confirmed'] != NULL) { | ||||||
|  | 			if ($postdata['qsl'] != NULL ) { | ||||||
|  | 				$qsl .= "Q"; | ||||||
|  | 			} | ||||||
|  | 			if ($postdata['lotw'] != NULL ) { | ||||||
|  | 				$qsl .= "L"; | ||||||
|  | 			} | ||||||
|  | 			if ($postdata['eqsl'] != NULL ) { | ||||||
|  | 				$qsl .= "E"; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		foreach ($bands as $band) {             	// Looping through bands and entities to generate the array needed for display
 | 		foreach ($bands as $band) {             	// Looping through bands and entities to generate the array needed for display
 | ||||||
| 			foreach ($dxccArray as $dxcc) { | 			foreach ($dxccArray as $dxcc) { | ||||||
| 				$dxccMatrix[$dxcc->adif]['name'] = ucwords(strtolower($dxcc->name), "- (/"); | 				$dxccMatrix[$dxcc->adif]['name'] = ucwords(strtolower($dxcc->name), "- (/"); | ||||||
|  | @ -82,7 +95,7 @@ class DXCC extends CI_Model { | ||||||
| 			if ($postdata['worked'] != NULL) { | 			if ($postdata['worked'] != NULL) { | ||||||
| 				$workedDXCC = $this->getDxccBandWorked($location_list, $band, $postdata); | 				$workedDXCC = $this->getDxccBandWorked($location_list, $band, $postdata); | ||||||
| 				foreach ($workedDXCC as $wdxcc) { | 				foreach ($workedDXCC as $wdxcc) { | ||||||
| 					$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC")\'>W</a></div>'; | 					$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC", "")\'>W</a></div>'; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  | @ -90,7 +103,7 @@ class DXCC extends CI_Model { | ||||||
| 			if ($postdata['confirmed'] != NULL) { | 			if ($postdata['confirmed'] != NULL) { | ||||||
| 				$confirmedDXCC = $this->getDxccBandConfirmed($location_list, $band, $postdata); | 				$confirmedDXCC = $this->getDxccBandConfirmed($location_list, $band, $postdata); | ||||||
| 				foreach ($confirmedDXCC as $cdxcc) { | 				foreach ($confirmedDXCC as $cdxcc) { | ||||||
| 					$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC")\'>C</a></div>'; | 					$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC","'.$qsl.'")\'>C</a></div>'; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  | @ -315,16 +328,20 @@ class DXCC extends CI_Model { | ||||||
| 	// Made function instead of repeating this several times
 | 	// Made function instead of repeating this several times
 | ||||||
| 	function addQslToQuery($postdata) { | 	function addQslToQuery($postdata) { | ||||||
| 		$sql = ''; | 		$sql = ''; | ||||||
| 		if ($postdata['lotw'] != NULL and $postdata['qsl'] == NULL) { | 		$qsl = array(); | ||||||
| 			$sql .= " and col_lotw_qsl_rcvd = 'Y'"; | 		if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { | ||||||
|  | 			$sql .= ' and ('; | ||||||
|  | 			if ($postdata['qsl'] != NULL) { | ||||||
|  | 				array_push($qsl, "col_qsl_rcvd = 'Y'"); | ||||||
| 			} | 			} | ||||||
| 
 | 			if ($postdata['lotw'] != NULL) { | ||||||
| 		if ($postdata['qsl'] != NULL and $postdata['lotw'] == NULL) { | 				array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); | ||||||
| 			$sql .= " and col_qsl_rcvd = 'Y'"; |  | ||||||
| 			} | 			} | ||||||
| 
 | 			if ($postdata['eqsl'] != NULL) { | ||||||
| 		if ($postdata['qsl'] != NULL && $postdata['lotw'] != NULL) { | 				array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); | ||||||
| 			$sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; | 			} | ||||||
|  | 			$sql .= implode(' or ', $qsl); | ||||||
|  | 			$sql .= ')'; | ||||||
| 		} | 		} | ||||||
| 		return $sql; | 		return $sql; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -19,6 +19,19 @@ class was extends CI_Model { | ||||||
| 
 | 
 | ||||||
|         $states = array(); // Used for keeping track of which states that are not worked
 |         $states = array(); // Used for keeping track of which states that are not worked
 | ||||||
| 
 | 
 | ||||||
|  |         $qsl = ""; | ||||||
|  |         if ($postdata['confirmed'] != NULL) { | ||||||
|  |             if ($postdata['qsl'] != NULL ) { | ||||||
|  |                 $qsl .= "Q"; | ||||||
|  |             } | ||||||
|  |             if ($postdata['lotw'] != NULL ) { | ||||||
|  |                 $qsl .= "L"; | ||||||
|  |             } | ||||||
|  |             if ($postdata['eqsl'] != NULL ) { | ||||||
|  |                 $qsl .= "E"; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         foreach ($stateArray as $state) {                   // Generating array for use in the table
 |         foreach ($stateArray as $state) {                   // Generating array for use in the table
 | ||||||
|             $states[$state]['count'] = 0;                   // Inits each state's count
 |             $states[$state]['count'] = 0;                   // Inits each state's count
 | ||||||
|         } |         } | ||||||
|  | @ -32,14 +45,14 @@ class was extends CI_Model { | ||||||
|             if ($postdata['worked'] != NULL) { |             if ($postdata['worked'] != NULL) { | ||||||
|                 $wasBand = $this->getWasWorked($location_list, $band, $postdata); |                 $wasBand = $this->getWasWorked($location_list, $band, $postdata); | ||||||
|                 foreach ($wasBand as $line) { |                 foreach ($wasBand as $line) { | ||||||
|                     $bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>W</a></div>'; |                     $bandWas[$line->col_state][$band] = '<div class="alert-danger"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS", "")\'>W</a></div>'; | ||||||
|                     $states[$line->col_state]['count']++; |                     $states[$line->col_state]['count']++; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             if ($postdata['confirmed'] != NULL) { |             if ($postdata['confirmed'] != NULL) { | ||||||
|                 $wasBand = $this->getWasConfirmed($location_list, $band, $postdata); |                 $wasBand = $this->getWasConfirmed($location_list, $band, $postdata); | ||||||
|                 foreach ($wasBand as $line) { |                 foreach ($wasBand as $line) { | ||||||
|                     $bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS")\'>C</a></div>'; |                     $bandWas[$line->col_state][$band] = '<div class="alert-success"><a href=\'javascript:displayContacts("' . $line->col_state . '","' . $band . '","'. $postdata['mode'] . '","WAS", "'.$qsl.'")\'>C</a></div>'; | ||||||
|                     $states[$line->col_state]['count']++; |                     $states[$line->col_state]['count']++; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -238,16 +251,20 @@ class was extends CI_Model { | ||||||
| 
 | 
 | ||||||
|     function addQslToQuery($postdata) { |     function addQslToQuery($postdata) { | ||||||
|         $sql = ''; |         $sql = ''; | ||||||
|         if ($postdata['lotw'] != NULL and $postdata['qsl'] == NULL) { |         $qsl = array(); | ||||||
|             $sql .= " and col_lotw_qsl_rcvd = 'Y'"; |         if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) { | ||||||
|  |             $sql .= ' and ('; | ||||||
|  |             if ($postdata['qsl'] != NULL) { | ||||||
|  |                 array_push($qsl, "col_qsl_rcvd = 'Y'"); | ||||||
|             } |             } | ||||||
| 
 |             if ($postdata['lotw'] != NULL) { | ||||||
|         if ($postdata['qsl'] != NULL and $postdata['lotw'] == NULL) { |                 array_push($qsl, "col_lotw_qsl_rcvd = 'Y'"); | ||||||
|             $sql .= " and col_qsl_rcvd = 'Y'"; |  | ||||||
|             } |             } | ||||||
| 
 |             if ($postdata['eqsl'] != NULL) { | ||||||
|         if ($postdata['qsl'] != NULL && $postdata['lotw'] != NULL) { |                 array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'"); | ||||||
|             $sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')"; |             } | ||||||
|  |             $sql .= implode(' or ', $qsl); | ||||||
|  |             $sql .= ')'; | ||||||
|         } |         } | ||||||
|         return $sql; |         return $sql; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -57,7 +57,7 @@ | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|             <div class="form-group row"> |             <div class="form-group row"> | ||||||
|                 <div class="col-md-2">QSL / LoTW</div> |                 <div class="col-md-2">QSL Type</div> | ||||||
|                 <div class="col-md-10"> |                 <div class="col-md-10"> | ||||||
|                     <div class="form-check-inline"> |                     <div class="form-check-inline"> | ||||||
|                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|  | @ -67,6 +67,10 @@ | ||||||
|                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|                         <label class="form-check-label" for="lotw">LoTW</label> |                         <label class="form-check-label" for="lotw">LoTW</label> | ||||||
|                     </div> |                     </div> | ||||||
|  |                    <div class="form-check-inline"> | ||||||
|  |                         <input class="form-check-input" type="checkbox" name="eqsl" value="1" id="eqsl" <?php if ($this->input->post('eqsl')) echo ' checked="checked"'; ?> >
 | ||||||
|  |                         <label class="form-check-label" for="eqsl">eQSL</label> | ||||||
|  |                     </div> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|             <div class="form-group row"> |             <div class="form-group row"> | ||||||
|                 <div class="col-md-2">QSL / LoTW</div> |                 <div class="col-md-2">QSL Type</div> | ||||||
|                 <div class="col-md-10"> |                 <div class="col-md-10"> | ||||||
|                     <div class="form-check-inline"> |                     <div class="form-check-inline"> | ||||||
|                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|  |  | ||||||
|  | @ -67,7 +67,7 @@ | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|             <div class="form-group row"> |             <div class="form-group row"> | ||||||
|                 <div class="col-md-2">QSL / LoTW</div> |                 <div class="col-md-2">QSL Type</div> | ||||||
|                 <div class="col-md-10"> |                 <div class="col-md-10"> | ||||||
|                     <div class="form-check-inline"> |                     <div class="form-check-inline"> | ||||||
|                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|  | @ -77,6 +77,10 @@ | ||||||
|                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|                         <label class="form-check-label" for="lotw">LoTW</label> |                         <label class="form-check-label" for="lotw">LoTW</label> | ||||||
|                     </div> |                     </div> | ||||||
|  |                     <div class="form-check-inline"> | ||||||
|  |                         <input class="form-check-input" type="checkbox" name="eqsl" value="1" id="eqsl" <?php if ($this->input->post('eqsl')) echo ' checked="checked"'; ?> >
 | ||||||
|  |                         <label class="form-check-label" for="eqsl">eQSL</label> | ||||||
|  |                     </div> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|             <div class="form-group row"> |             <div class="form-group row"> | ||||||
|                 <div class="col-md-2">QSL / LoTW</div> |                 <div class="col-md-2">QSL Type</div> | ||||||
|                 <div class="col-md-10"> |                 <div class="col-md-10"> | ||||||
|                     <div class="form-check-inline"> |                     <div class="form-check-inline"> | ||||||
|                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="qsl" value="1" id="qsl" <?php if ($this->input->post('qsl') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|  | @ -34,6 +34,10 @@ | ||||||
|                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 |                         <input class="form-check-input" type="checkbox" name="lotw" value="1" id="lotw" <?php if ($this->input->post('lotw') || $this->input->method() !== 'post') echo ' checked="checked"'; ?> >
 | ||||||
|                         <label class="form-check-label" for="lotw">LoTW</label> |                         <label class="form-check-label" for="lotw">LoTW</label> | ||||||
|                     </div> |                     </div> | ||||||
|  | <div class="form-check-inline"> | ||||||
|  |                         <input class="form-check-input" type="checkbox" name="eqsl" value="1" id="eqsl" <?php if ($this->input->post('eqsl')) echo ' checked="checked"'; ?> >
 | ||||||
|  |                         <label class="form-check-label" for="eqsl">eQSL</label> | ||||||
|  |                     </div> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用