kopia lustrzana https://github.com/magicbug/Cloudlog
fix to retrieval of eqsl images. callsign can contain /. therefore
change to only pass idpull/1173/head
rodzic
7329bd2c9d
commit
7207592276
|
@ -589,11 +589,24 @@ class eqsl extends CI_Controller {
|
|||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
function image($id, $callsign, $mode, $band, $hour, $minute, $day, $month, $year) {
|
||||
function image($id) {
|
||||
$this->load->library('electronicqsl');
|
||||
$this->load->model('Eqsl_images');
|
||||
|
||||
if($this->Eqsl_images->get_image($id) == "No Image") {
|
||||
$this->load->model('logbook_model');
|
||||
$qso_query = $this->logbook_model->get_qso($id);
|
||||
$qso = $qso_query->row();
|
||||
$qso_timestamp = strtotime($qso->COL_TIME_ON);
|
||||
$callsign = $qso->COL_CALL;
|
||||
$band = $qso->COL_BAND;
|
||||
$mode = $qso->COL_MODE;
|
||||
$year = date('Y', $qso_timestamp);
|
||||
$month = date('m', $qso_timestamp);
|
||||
$day = date('d', $qso_timestamp);
|
||||
$hour = date('H', $qso_timestamp);
|
||||
$minute = date('i', $qso_timestamp);
|
||||
|
||||
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
|
||||
$q = $query->row();
|
||||
$username = $q->user_eqsl_name;
|
||||
|
@ -613,14 +626,14 @@ 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'));
|
||||
$filename = uniqid().'.jpg';
|
||||
file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
|
||||
{
|
||||
header('Content-Type: image/jpg');
|
||||
readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
|
||||
$content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
|
||||
$filename = uniqid().'.jpg';
|
||||
file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
|
||||
|
||||
$this->Eqsl_images->save_image($id, $filename);
|
||||
$this->Eqsl_images->save_image($id, $filename);
|
||||
}
|
||||
} else {
|
||||
header('Content-Type: image/jpg');
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red'?>">▲</span>
|
||||
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red'?>">
|
||||
<?php if($row->COL_EQSL_QSL_RCVD =='Y') { ?>
|
||||
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY."/".$row->COL_CALL."/".$row->COL_MODE."/".$row->COL_BAND."/".date('H', $timestamp)."/".date('i', $timestamp)."/".date('d', $timestamp)."/".date('m', $timestamp)."/".date('Y', $timestamp)); ?>" data-fancybox="images" data-width="528" data-height="336">▼</a>
|
||||
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">▼</a>
|
||||
<?php } else { ?>
|
||||
▼
|
||||
<?php } ?>
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red'?>">▲</span>
|
||||
<span class="eqsl-<?php echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red'?>">
|
||||
<?php if($row->COL_EQSL_QSL_RCVD =='Y') { ?>
|
||||
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY."/".$row->COL_CALL."/".$row->COL_MODE."/".$row->COL_BAND."/".date('H', $timestamp)."/".date('i', $timestamp)."/".date('d', $timestamp)."/".date('m', $timestamp)."/".date('Y', $timestamp)); ?>" data-fancybox="images" data-width="528" data-height="336">▼</a>
|
||||
<a style="color: green" href="<?php echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">▼</a>
|
||||
<?php } else { ?>
|
||||
▼
|
||||
<?php } ?>
|
||||
|
|
Ładowanie…
Reference in New Issue