From bc6abdaa5192d679cbd656c6e89c9ff7ca40b945 Mon Sep 17 00:00:00 2001 From: Jacques Date: Fri, 3 Jan 2014 13:48:34 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20quelques=20ent=C3=AAtes=20dans=20l?= =?UTF-8?q?'envoi=20vers=20gregoriophp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chant_submit.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/chant_submit.php b/chant_submit.php index ed79f63..2fb3a56 100644 --- a/chant_submit.php +++ b/chant_submit.php @@ -199,7 +199,20 @@ if(!$c) { die('Wrong id'); } # makeimg($c); -$content='name: '.$c['incipit'].';%0A%25%25%0A'.json_decode($c['gabc']); +$content="name:".$c['incipit'].";"; +if($c['annotation1'] > ''){ + $content=$content."%0A"."annotation:".$c['annotation1'].";"; +} +if($c['annotation2'] > ''){ + $content=$content."%0A"."annotation:".$c['annotation2'].";%0A"; +} +if($c['mode'] > '' and $c['annotation2'] == ''){ + $content=$content."%0A"."annotation:".$c['mode'].";"; +} +if($c['commentary'] > ''){ + $content=$content."%0A"."commentary:".$c['commentary'].";"; +} +$content=$content."%0A"."%25%25"."%0A".json_decode($c['gabc']); header('HTTP/1.1 301 Moved Permanently'); header('Location: /gregoriophp/?crop=0#'.$content); ?>