diff --git a/README.md b/README.md
index 5d59c16e..76ae3117 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,6 @@ Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K
Cloudlog is supported by Patreon and donations via PayPal, thanks to the following people:
-Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU)
+Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU), Theo (PD9DP).
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)
diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php
index 6beb4edf..a32765ff 100644
--- a/application/controllers/Contesting.php
+++ b/application/controllers/Contesting.php
@@ -134,4 +134,40 @@ class Contesting extends CI_Controller {
echo json_encode(array('message' => 'OK'));
return;
}
+
+ public function deactivateall() {
+ $this->load->model('Contesting_model');
+ $this->Contesting_model->deactivateall();
+ header('Content-Type: application/json');
+ echo json_encode(array('message' => 'OK'));
+ return;
+ }
+
+ public function activateall() {
+ $this->load->model('Contesting_model');
+ $this->Contesting_model->activateall();
+ header('Content-Type: application/json');
+ echo json_encode(array('message' => 'OK'));
+ return;
+ }
+
+ /*
+ * Function is used for dupe-checking in contestinglogging
+ */
+ public function checkIfWorkedBefore() {
+ $call = $this->input->post('call');
+ $band = $this->input->post('band');
+ $mode = $this->input->post('mode');
+ $contest = $this->input->post('contest');
+ $qso = $this->input->post('qso');
+
+ $this->load->model('Contesting_model');
+ $result = $this->Contesting_model->checkIfWorkedBefore($call, $band, $mode, $contest, $qso);
+
+ header('Content-Type: application/json');
+ if ($result->num_rows()) {
+ echo json_encode(array('message' => 'Worked before'));
+ }
+ return;
+ }
}
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index d061d156..56219f83 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -620,7 +620,7 @@ class eqsl extends CI_Controller {
$dom->preserveWhiteSpace = false;
$images = $dom->getElementsByTagName('img');
- if(!isset($images)) {
+ if(!isset($images) || count($images) == 0) {
echo "Rate Limited";
exit;
}
@@ -628,17 +628,21 @@ class eqsl extends CI_Controller {
foreach ($images as $image)
{
header('Content-Type: image/jpg');
- readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
+ if ($content === false) {
+ echo "No response";
+ exit;
+ }
+ echo $content;
$filename = uniqid().'.jpg';
- file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
-
- $this->Eqsl_images->save_image($id, $filename);
+ if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
+ $this->Eqsl_images->save_image($id, $filename);
+ }
}
} else {
header('Content-Type: image/jpg');
$image_url = base_url('images/eqsl_card_images/'.$this->Eqsl_images->get_image($id));
- readfile($image_url);
+ header('Location: ' . $image_url);
}
}
diff --git a/application/controllers/Kml.php b/application/controllers/Kml.php
index 72db490d..b3126fe5 100644
--- a/application/controllers/Kml.php
+++ b/application/controllers/Kml.php
@@ -9,8 +9,7 @@
class Kml extends CI_Controller {
- public function index()
- {
+ public function index() {
$this->load->model('user_model');
$this->load->model('modes');
$this->load->model('logbook_model');
@@ -27,12 +26,10 @@ class Kml extends CI_Controller {
$this->load->view('interface_assets/header', $data);
$this->load->view('kml/index');
$this->load->view('interface_assets/footer');
-
}
- public function export()
- {
- // Load Librarys
+ public function export() {
+ // Load Libraries
$this->load->library('qra');
$this->load->helper('file');
@@ -56,10 +53,7 @@ class Kml extends CI_Controller {
$output .= "
Band: ".$row->COL_BAND."
Достъпът до директорията е забранен.
+ + +