[eQSL] Fixed result table
这个提交包含在:
		
							父节点
							
								
									9c13e2408a
								
							
						
					
					
						当前提交
						f7968ac35c
					
				
					共有  1 个文件被更改,包括 35 次插入 和 2 次删除
				
			
		|  | @ -121,8 +121,7 @@ class eqsl extends CI_Controller { | ||||||
| 			// perform an HTTP get on each one, and grab the status back
 | 			// perform an HTTP get on each one, and grab the status back
 | ||||||
| 			$qslsnotsent = $this->eqslmethods_model->eqsl_not_yet_sent(); | 			$qslsnotsent = $this->eqslmethods_model->eqsl_not_yet_sent(); | ||||||
| 			 | 			 | ||||||
| 			$data['eqsl_table'] = $this->writeEqslNotSent($qslsnotsent->result_array(), $custom_date_format); | 			$rows = "<tr>"; | ||||||
| 
 |  | ||||||
| 			foreach ($qslsnotsent->result_array() as $qsl) { | 			foreach ($qslsnotsent->result_array() as $qsl) { | ||||||
| 				 | 				 | ||||||
| 				// eQSL username changes for linked account.
 | 				// eQSL username changes for linked account.
 | ||||||
|  | @ -132,7 +131,23 @@ class eqsl extends CI_Controller { | ||||||
| 				$adif = $this->generateAdif($qsl, $data); | 				$adif = $this->generateAdif($qsl, $data); | ||||||
| 				 | 				 | ||||||
| 				$status = $this->uploadQso($adif); | 				$status = $this->uploadQso($adif); | ||||||
|  | 
 | ||||||
|  | 				 | ||||||
|  | 				$timestamp = strtotime($qsl['COL_TIME_ON']); | ||||||
|  | 				$rows .= "<td>".date($custom_date_format, $timestamp)."</td>"; | ||||||
|  | 				$rows .= "<td>".date('H:i', $timestamp)."</td>"; | ||||||
|  | 				$rows .= "<td>".str_replace("0","Ø",$qsl['COL_CALL'])."</td>"; | ||||||
|  | 				$rows .= "<td>".$qsl['COL_MODE']."</td>"; | ||||||
|  | 				if(isset($qsl['COL_SUBMODE'])) { | ||||||
|  | 					$rows .= "<td>".$qsl['COL_SUBMODE']."</td>"; | ||||||
|  | 				} else { | ||||||
|  | 					$rows .= "<td></td>"; | ||||||
| 				} | 				} | ||||||
|  | 				$rows .= "<td>".$qsl['COL_BAND']."</td>"; | ||||||
|  | 				$rows .= "<td>".$status."</td>"; | ||||||
|  | 			} | ||||||
|  | 			$rows .= "</tr>"; | ||||||
|  | 			$data['eqsl_table'] = $this->generateResultTable($custom_date_format, $rows); | ||||||
| 		} else { | 		} else { | ||||||
| 			$qslsnotsent = $this->eqslmethods_model->eqsl_not_yet_sent(); | 			$qslsnotsent = $this->eqslmethods_model->eqsl_not_yet_sent(); | ||||||
| 			if ($qslsnotsent->num_rows() > 0) { | 			if ($qslsnotsent->num_rows() > 0) { | ||||||
|  | @ -209,6 +224,24 @@ class eqsl extends CI_Controller { | ||||||
| 		return $status; | 		return $status; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	function generateResultTable($custom_date_format, $rows) { | ||||||
|  | 		$table = '<table = style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center">'; | ||||||
|  | 			$table .= "<thead><tr class=\"titles\">"; | ||||||
|  | 				$table .= "<th>Date</th>"; | ||||||
|  | 				$table .= "<th>Time</th>"; | ||||||
|  | 				$table .= "<th>Call</th>"; | ||||||
|  | 				$table .= "<th>Mode</th>"; | ||||||
|  | 				$table .= "<th>Submode</th>"; | ||||||
|  | 				$table .= "<th>Band</th>"; | ||||||
|  | 				$table .= "<th>Status</th>"; | ||||||
|  | 			$table .= "</tr></thead><tbody>"; | ||||||
|  | 		 | ||||||
|  | 		$table .= $rows; | ||||||
|  | 		$table .= "</tbody></table>"; | ||||||
|  | 
 | ||||||
|  | 		return $table; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	// Build out the ADIF info string according to specs http://eqsl.cc/qslcard/ADIFContentSpecs.cfm
 | 	// Build out the ADIF info string according to specs http://eqsl.cc/qslcard/ADIFContentSpecs.cfm
 | ||||||
| 	function generateAdif($qsl, $data) { | 	function generateAdif($qsl, $data) { | ||||||
| 		$COL_QSO_DATE = date('Ymd',strtotime($qsl['COL_TIME_ON'])); | 		$COL_QSO_DATE = date('Ymd',strtotime($qsl['COL_TIME_ON'])); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用