More SVG
This commit is contained in:
parent
02b55b54e4
commit
b743448db3
|
|
@ -229,13 +229,13 @@ if(is_string($content)) {
|
|||
}
|
||||
echo "</ul></li>\n";
|
||||
}
|
||||
foreach(array('pdf','eps','png') as $a) {
|
||||
foreach(array('pdf','svg','eps','png') as $a) {
|
||||
echo '<li><a href="download.php?id='.$c['id'].'&format='.$a.'">'.strtoupper($a).'</a></li>'."\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
if($c['gabc_verses'] || $c['tex_verses']){
|
||||
echo "<ul>\n";
|
||||
foreach(array('gabc','pdf','eps','png') as $a) {
|
||||
foreach(array('gabc','pdf','svg','eps','png') as $a) {
|
||||
echo '<li><a href="download.php?id='.$c['id'].'&format='.$a.'&1verse=1">'.strtoupper($a).' (1st verse only)</a></li>'."\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ function mgabc2tex($c, $firstverse = False) {
|
|||
$tex .= '\greannotation{\small \textbf{'.$mode.".}}\n";
|
||||
}
|
||||
if($c['commentary']) {
|
||||
$tex .= '\commentary{{\small \emph{'.$c['commentary']."}}}\n";
|
||||
$tex .= '\grecommentary{{\small \emph{'.$c['commentary']."}}}\n";
|
||||
$tex .= '\nolinebreak[4]'."\n";
|
||||
}
|
||||
#
|
||||
|
|
@ -196,7 +196,7 @@ function makeimgfiles($id, $tex, $suffix = '') {
|
|||
unlink(substr($f[1],0,-4).'.pdf');
|
||||
}
|
||||
|
||||
$uri = __DIR__.'/scores/'.$id.'.png';
|
||||
$uri = __DIR__.'/scores/svg/'.$id.'.svg';
|
||||
if(!is_file($uri) || (array_key_exists("force", $_GET) && $_GET["force"] == "1")) {
|
||||
$sql1 = 'SELECT * FROM '.db('chants').' WHERE id = '.$id;
|
||||
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
|
||||
|
|
@ -206,7 +206,7 @@ if(!is_file($uri) || (array_key_exists("force", $_GET) && $_GET["force"] == "1")
|
|||
}
|
||||
makeimg($c);
|
||||
}
|
||||
header('Content-Disposition: inline; filename='.$id.'.png');
|
||||
header("Content-type: image/png");
|
||||
header('Content-Disposition: inline; filename='.$id.'.svg');
|
||||
header("Content-type: image/svg+xml");
|
||||
readfile($uri);
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue