Druckfunktion Anzeige Liednr bei Noten bearbeiten
This commit is contained in:
parent
60ba98308e
commit
07a4afe4ce
@ -30,7 +30,7 @@ require_once "../language/german.inc.php";
|
||||
|
||||
|
||||
|
||||
$query = "SELECT a.jndid, titel, anz_lizenzen, streamlizenz, bemerkung, c.bezeichnung verlag
|
||||
$query = "SELECT a.jndid, titel, liednr, anz_lizenzen, streamlizenz, bemerkung, c.bezeichnung verlag
|
||||
FROM jumi_noten_daten a, jumi_noten_verlag c
|
||||
WHERE a.vid=c.vid
|
||||
ORDER BY titel ASC;";
|
||||
@ -46,6 +46,14 @@ require_once "../language/german.inc.php";
|
||||
$streamlizenz_vorh = "nein";
|
||||
}
|
||||
|
||||
if($row['liednr'] == ''){
|
||||
$liednr = "";
|
||||
}elseif($row['liednr'] == '0'){
|
||||
$liednr = "";
|
||||
}else{
|
||||
$liednr = $row['liednr'];
|
||||
}
|
||||
|
||||
$result_link = $db->query("SELECT filename
|
||||
FROM jumi_noten_uploads
|
||||
WHERE jndid=$row[jndid]");
|
||||
@ -75,6 +83,7 @@ require_once "../language/german.inc.php";
|
||||
}
|
||||
$songbook = substr($songbook,0,-2);
|
||||
$row['restlizenz'] = $row_rl['Rest'];
|
||||
$row['liednr'] = $liednr;
|
||||
$row['link'] = $row_link['filename'];
|
||||
$row['fileexists'] = $fileexists;
|
||||
$row['songbook'] = $songbook;
|
||||
|
@ -5,17 +5,39 @@ require_once('../fpdf186/FPDI-master/src/autoload.php');
|
||||
use setasign\Fpdi\Fpdi;
|
||||
$pdf = new FPDI('P','mm','A4');
|
||||
$pdf->SetAutoPageBreak(false);
|
||||
$art = $_GET['art'];
|
||||
|
||||
$zsid= 4;
|
||||
|
||||
$query = "SELECT liednr, filename, titel
|
||||
FROM jumi_noten_daten a, jumi_noten_uploads b, jumi_noten_zusammenstellung_zuord c
|
||||
WHERE b.jndid=c.jndid
|
||||
AND a.jndid=b.jndid
|
||||
AND c.zsid=$zsid
|
||||
ORDER BY CAST(liednr AS UNSIGNED), liednr";
|
||||
$result = $db->query ($query)
|
||||
# Notenbuch =B
|
||||
# Einzelnoten = E
|
||||
if($art == 'B'){
|
||||
$zsid = $_GET['zsid'];
|
||||
$query = "SELECT liednr, filename, titel
|
||||
FROM jumi_noten_daten a, jumi_noten_uploads b, jumi_noten_zusammenstellung_zuord c
|
||||
WHERE b.jndid=c.jndid
|
||||
AND a.jndid=b.jndid
|
||||
AND c.zsid=$zsid
|
||||
ORDER BY CAST(liednr AS UNSIGNED), liednr";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
$query_titel = $db->query ("SELECT bezeichnung
|
||||
FROM jumi_noten_zusammenstellung
|
||||
WHERE zsid =$zsid");
|
||||
$row_titel = $query_titel->fetch_array();
|
||||
}
|
||||
if($art == 'E'){
|
||||
$jndid = $_GET['jndid'];
|
||||
$query = "SELECT liednr, filename, titel
|
||||
FROM jumi_noten_daten a, jumi_noten_uploads b
|
||||
WHERE a.jndid=b.jndid
|
||||
AND a.jndid=$jndid
|
||||
ORDER BY CAST(liednr AS UNSIGNED), liednr";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
$query_titel = $db->query ("SELECT titel bezeichnung
|
||||
FROM jumi_noten_daten
|
||||
WHERE jndid =$jndid");
|
||||
$row_titel = $query_titel->fetch_array();
|
||||
}
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
@ -40,9 +62,6 @@ while ($row = $result->fetch_array()){
|
||||
#$pdf->Write(0, "$i");
|
||||
}
|
||||
}
|
||||
$query_titel = $db->query ("SELECT bezeichnung
|
||||
FROM jumi_noten_zusammenstellung
|
||||
WHERE zsid =$zsid");
|
||||
$row_titel = $query_titel->fetch_array();
|
||||
$pdf->Output('I',"$row_titel[bezeichnung]");
|
||||
|
||||
$pdf->Output('I',utf8_decode($row_titel['bezeichnung']));
|
||||
?>
|
@ -70,6 +70,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th>Liednummer</th>
|
||||
<th class="d-none d-md-table-cell">Verlag</th>
|
||||
<th>Songbook</th>
|
||||
<th class="d-none d-md-table-cell"> Lizenzmenge</th>
|
||||
@ -80,7 +81,7 @@
|
||||
<tbody>
|
||||
{section name=table_data loop=$table_data}
|
||||
<tr>
|
||||
<td>{if $table_data[table_data].fileexists == 1}<a href="{$table_data[table_data].link}" target="_new">{$table_data[table_data].titel}</a>{else}{$table_data[table_data].titel}{/if}
|
||||
<td>{if $table_data[table_data].fileexists == 1}<a href="print.php?art=E&jndid={$table_data[table_data].jndid}" target='_new'>{$table_data[table_data].titel}</a>{else}{$table_data[table_data].titel}{/if}
|
||||
{if $table_data[table_data].bemerkung != ''}
|
||||
<a href="javascript:void(0)" type="button" class="link-secondary" data-bs-toggle="popover" data-bs-html="true" data-bs-trigger="hover focus"
|
||||
title="Bemerkung"
|
||||
@ -89,6 +90,7 @@
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$table_data[table_data].liednr}</td>
|
||||
<td class="d-none d-md-table-cell">{$table_data[table_data].verlag}</td>
|
||||
<td>{$table_data[table_data].songbook}</td>
|
||||
<td class="d-none d-md-table-cell">{$table_data[table_data].restlizenz}/{$table_data[table_data].anz_lizenzen}</td>
|
||||
|
@ -103,7 +103,7 @@ $(document).ready(function(){
|
||||
</div>
|
||||
{section name=table_data loop=$table_data}
|
||||
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
|
||||
<div class="col-8 col-md-5">{$table_data[table_data].bezeichnung}</div>
|
||||
<div class="col-8 col-md-5"><a href="print.php?art=B&zsid={$table_data[table_data].zsid}" target='_new'>{$table_data[table_data].bezeichnung}</a></div>
|
||||
<div class="d-none col-md-4 d-md-block">{if $table_data[table_data].lizenzpflicht == 1}{$table_data[table_data].restlizenz}/{$table_data[table_data].anzahl_lizenz}{else}<i>keine</i>{/if}</div>
|
||||
<div class="col-4 col-md-3 text-end">
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" onclick="editNotenbuch({$table_data[table_data].zsid})"><i class="fa fa-edit" style="width:18px;"></i></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user