About 32 results: "php trigger_error repo:sebs/mosolar"
Page 1 of 2
Filter Results
Sources
Languages
Filter Results
Try Search On


empire.php in mosolar https://bitbucket.org/sebs/mosolar | 675 lines | PHP
  1. 		$this->data = $this->DB->Execute($query);
  2. 		if (!$this->data) trigger_error($query ." = ".$this->DB->ErrorMsg());
  3. 		
  4. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_armyconvoy WHERE empire_from='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  5. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_army WHERE empire='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  6. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_event WHERE event_from='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  7. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_event WHERE event_to='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  8. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_loan WHERE empire='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  9. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_planets WHERE empire='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  10. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_production WHERE empire='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  11. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_stats WHERE empire='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  12. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_supply WHERE empire='".$this->data["id"]."'"))trigger_error($this->DB->ErrorMsg());
  13. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_tradeconvoy WHERE empire_from='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  14. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_tradeconvoy WHERE empire_to='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  15. 		if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_armyconvoy WHERE empire_from='".$this->data["id"]."'")) trigger_error($this->DB->ErrorMsg());

event_renderer.php in mosolar https://bitbucket.org/sebs/mosolar | 926 lines | PHP
  1. 		$rs = $this->DB->Execute("SELECT * FROM game".$this->game_id."_tb_event WHERE event_to='".$empire_data["id"]."' AND seen='0' ORDER BY id DESC LIMIT 0,30");
  2. 		if (!$rs) trigger_error($this->DB->ErrorMsg());
  3. 				if (($event_data["sticky"]==0) && ($event_data["seen"]==0)) {
  4. 					if (!$this->DB->Execute("UPDATE game".$this->game_id."_tb_event SET seen='1' WHERE id='".$event_data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  5. 				$rs = $this->DB->Execute("SELECT * FROM game".$this->game_id."_tb_empire WHERE id='".addslashes($event_data["event_from"])."'");
  6. 				if (!$rs) trigger_error($this->DB->ErrorMsg());
  7. 				$this->TEMPLATE->assign("empire",$this->GAME_TPL->displayEmpireHTML($params["empire_id"],$params["empire_emperor"],$params["empire_name"],$empire_data["networth"]));
  8. 				if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_treaty WHERE empire_from='".$event_data["event_to"]."' AND empire_to='".$event_data["event_from"]."'")) trigger_error($this->DB->ErrorMsg());
  9. 				if (!$this->DB->Execute("DELETE FROM game".$this->game_id."_tb_treaty WHERE empire_to='".$event_data["event_to"]."' AND empire_from='".$event_data["event_from"]."'")) trigger_error($this->DB->ErrorMsg());
  10. 				if (($event_data["sticky"]==0) && ($event_data["seen"]==0)) {
  11. 					if (!$this->DB->Execute("UPDATE game".$this->game_id."_tb_event SET seen='1' WHERE id='".$event_data["id"]."'")) trigger_error($this->DB->ErrorMsg());
  12. 					$rs = $this->DB->Execute("SELECT emperor,name FROM game".$this->game_id."_tb_empire WHERE id='".intval($params["army_attack"][$i]["empire_from"])."'");
  13. 					if (!$rs) trigger_error($this->DB->ErrorMsg());					
  14. 		if (($event_data["sticky"]==0) && ($event_data["seen"]==0)) {
  15. 			if (!$this->DB->Execute("UPDATE game".$this->game_id."_tb_event SET seen='1' WHERE id='".$event_data["id"]."'")) trigger_error($this->DB->ErrorMsg());

















Back to Top