当前提交
						de310b2362
					
				
					共有  8 个文件被更改,包括 42 次插入 和 6 次删除
				
			
		|  | @ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | ||||||
| | be upgraded / downgraded to. | | be upgraded / downgraded to. | ||||||
| | | | | ||||||
| */ | */ | ||||||
| $config['migration_version'] = 98; | $config['migration_version'] = 99; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| |-------------------------------------------------------------------------- | |-------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  | @ -127,6 +127,7 @@ class Band extends CI_Controller { | ||||||
| 		$band['sota']		= $this->security->xss_clean($this->input->post('sota')); | 		$band['sota']		= $this->security->xss_clean($this->input->post('sota')); | ||||||
| 		$band['uscounties'] = $this->security->xss_clean($this->input->post('uscounties')); | 		$band['uscounties'] = $this->security->xss_clean($this->input->post('uscounties')); | ||||||
| 		$band['was'] 		= $this->security->xss_clean($this->input->post('was')); | 		$band['was'] 		= $this->security->xss_clean($this->input->post('was')); | ||||||
|  | 		$band['wwff'] 		= $this->security->xss_clean($this->input->post('wwff')); | ||||||
| 		$band['vucc'] 		= $this->security->xss_clean($this->input->post('vucc')); | 		$band['vucc'] 		= $this->security->xss_clean($this->input->post('vucc')); | ||||||
|          |          | ||||||
| 		$this->load->model('bands'); | 		$this->load->model('bands'); | ||||||
|  |  | ||||||
|  | @ -0,0 +1,26 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | defined('BASEPATH') OR exit('No direct script access allowed'); | ||||||
|  | 
 | ||||||
|  | class Migration_add_wwff_to_bandxuser extends CI_Migration { | ||||||
|  |     public function up() | ||||||
|  |     { | ||||||
|  |         if (!$this->db->field_exists('wwff', 'bandxuser')) { | ||||||
|  |             $fields = array( | ||||||
|  |                     'wwff' => array( | ||||||
|  |                     'type' => 'INT', | ||||||
|  |                     'constraint' => 20, | ||||||
|  |                     'unsigned' => TRUE, | ||||||
|  |                 ), | ||||||
|  |             ); | ||||||
|  |             $this->dbforge->add_column('bandxuser', $fields); | ||||||
|  | 
 | ||||||
|  |             $this->db->query("update bandxuser set wwff = 1"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function down() | ||||||
|  |     { | ||||||
|  |         $this->dbforge->drop_column('bandxuser', 'wwff'); | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -251,6 +251,7 @@ class Bands extends CI_Model { | ||||||
| 			'sota'		 => $band['sota'] 		== "true" ? '1' : '0', | 			'sota'		 => $band['sota'] 		== "true" ? '1' : '0', | ||||||
| 			'uscounties' => $band['uscounties'] == "true" ? '1' : '0', | 			'uscounties' => $band['uscounties'] == "true" ? '1' : '0', | ||||||
| 			'was' 		 => $band['was'] 		== "true" ? '1' : '0', | 			'was' 		 => $band['was'] 		== "true" ? '1' : '0', | ||||||
|  | 			'wwff' 		 => $band['wwff'] 		== "true" ? '1' : '0', | ||||||
| 			'vucc'		 => $band['vucc'] 		== "true" ? '1' : '0' | 			'vucc'		 => $band['vucc'] 		== "true" ? '1' : '0' | ||||||
|         ); |         ); | ||||||
| 
 | 
 | ||||||
|  | @ -278,8 +279,8 @@ class Bands extends CI_Model { | ||||||
| 		   $this->db->insert('bands', $data); | 		   $this->db->insert('bands', $data); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, vucc) 
 | 		$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, wwff, vucc) 
 | ||||||
| 		select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);");
 | 		select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);");
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	function getband($id) { | 	function getband($id) { | ||||||
|  |  | ||||||
|  | @ -152,7 +152,7 @@ class User_Model extends CI_Model { | ||||||
| 			// Add user and insert bandsettings for user
 | 			// Add user and insert bandsettings for user
 | ||||||
| 			$this->db->insert($this->config->item('auth_table'), $data); | 			$this->db->insert($this->config->item('auth_table'), $data); | ||||||
| 			$insert_id = $this->db->insert_id(); | 			$insert_id = $this->db->insert_id(); | ||||||
| 			$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, vucc) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); | 			$this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, iota, sig, sota, uscounties, was, wwff, vucc) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); | ||||||
| 			return OK; | 			return OK; | ||||||
| 		} else { | 		} else { | ||||||
| 			return EUSERNAMEEXISTS; | 			return EUSERNAMEEXISTS; | ||||||
|  |  | ||||||
|  | @ -11,7 +11,12 @@ class Wwff extends CI_Model { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | 		$this->load->model('bands'); | ||||||
|  | 
 | ||||||
|  | 		$bandslots = $this->bands->get_worked_bands('wwff'); | ||||||
|  | 
 | ||||||
| 		$this->db->where_in("station_id", $logbooks_locations_array); | 		$this->db->where_in("station_id", $logbooks_locations_array); | ||||||
|  | 		$this->db->where_in("col_band", $bandslots); | ||||||
| 		$this->db->order_by("COL_WWFF_REF", "ASC"); | 		$this->db->order_by("COL_WWFF_REF", "ASC"); | ||||||
| 		$this->db->where('COL_WWFF_REF !=', ''); | 		$this->db->where('COL_WWFF_REF !=', ''); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -35,8 +35,9 @@ | ||||||
| 					<th>SIG</th> | 					<th>SIG</th> | ||||||
|                     <th>SOTA</th> |                     <th>SOTA</th> | ||||||
|                     <th>US Counties</th> |                     <th>US Counties</th> | ||||||
|                     <th>WAS</th> |  | ||||||
|                     <th>VUCC</th> |                     <th>VUCC</th> | ||||||
|  |                     <th>WAS</th> | ||||||
|  | 					<th>WWFF</th> | ||||||
| 					<th>Bandgroup</th> | 					<th>Bandgroup</th> | ||||||
| 					<th>SSB QRG</th> | 					<th>SSB QRG</th> | ||||||
| 					<th>DATA QRG</th> | 					<th>DATA QRG</th> | ||||||
|  | @ -57,8 +58,9 @@ | ||||||
|                     <td class='sig_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sig == 1) {echo 'checked';}?>></td>
 |                     <td class='sig_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sig == 1) {echo 'checked';}?>></td>
 | ||||||
|                     <td class='sota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sota == 1) {echo 'checked';}?>></td>
 |                     <td class='sota_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->sota == 1) {echo 'checked';}?>></td>
 | ||||||
|                     <td class='uscounties_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->uscounties == 1) {echo 'checked';}?>></td>
 |                     <td class='uscounties_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->uscounties == 1) {echo 'checked';}?>></td>
 | ||||||
|                     <td class='was_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->was == 1) {echo 'checked';}?>></td>
 |  | ||||||
|                     <td class='vucc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->vucc == 1) {echo 'checked';}?>></td>
 |                     <td class='vucc_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->vucc == 1) {echo 'checked';}?>></td>
 | ||||||
|  |                     <td class='was_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->was == 1) {echo 'checked';}?>></td>
 | ||||||
|  | 					<td class='wwff_<?php echo $band->id ?>'><input type="checkbox" <?php if ($band->wwff == 1) {echo 'checked';}?>></td>
 | ||||||
| 					<td><?php echo $band->bandgroup;?></td>
 | 					<td><?php echo $band->bandgroup;?></td>
 | ||||||
| 					<td><?php echo $band->ssb;?></td>
 | 					<td><?php echo $band->ssb;?></td>
 | ||||||
| 					<td><?php echo $band->data;?></td>
 | 					<td><?php echo $band->data;?></td>
 | ||||||
|  |  | ||||||
|  | @ -190,6 +190,7 @@ function saveBand(id) { | ||||||
| 			'sota': $(".sota_"+id+" input[type='checkbox']").is(":checked"), | 			'sota': $(".sota_"+id+" input[type='checkbox']").is(":checked"), | ||||||
| 			'uscounties': $(".uscounties_"+id+" input[type='checkbox']").is(":checked"), | 			'uscounties': $(".uscounties_"+id+" input[type='checkbox']").is(":checked"), | ||||||
| 			'was': $(".was_"+id+" input[type='checkbox']").is(":checked"), | 			'was': $(".was_"+id+" input[type='checkbox']").is(":checked"), | ||||||
|  | 			'wwff': $(".wwff_"+id+" input[type='checkbox']").is(":checked"), | ||||||
| 			'vucc': $(".vucc_"+id+" input[type='checkbox']").is(":checked") | 			'vucc': $(".vucc_"+id+" input[type='checkbox']").is(":checked") | ||||||
| 		}, | 		}, | ||||||
| 		success: function (html) { | 		success: function (html) { | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用