This commit is contained in:
jperon 2014-06-16 18:45:46 +02:00
commit e2e5285434
11 changed files with 1878 additions and 7043 deletions

View File

@ -201,15 +201,17 @@ foreach($proof as $r) {
if(count($proof) > 0 || $logged_in) {
echo "</ul>\n";
}
echo '<p id="push1"><a href="#">Report a problem</a></p>';
$report_form = '<form action="'.$_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'').'" method="post"><textarea name="pleasefix" class="gabc"></textarea><br /><input type="submit" /></form>';
if($logged_in) {
echo '<p id="push1"><a href="#">Report a problem</a></p>';
$report_form = '<form action="'.$_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'').'" method="post"><textarea name="pleasefix" class="gabc"></textarea><br /><input type="submit" /></form>';
echo <<<POPUP1
echo <<<POPUP1
<div id="popup1">
Please describe the problem:<br />
$report_form
</div>
POPUP1;
}
echo "<h4>Download</h4>\n<ul>\n";
$content = json_decode($c['gabc']);
if(is_string($content)) {
@ -247,7 +249,7 @@ if($req1->num_rows > 0 || $c['transcriber'] > '') {
}
while ($m = $req1->fetch_assoc()) {
$user_info = get_userdata($m['user_id']);
echo "<li>".date("M d, Y",$m['time']).": ".$m['comment']." (".$user_info->display_name.') <a href="history.php?changeset='.$m['time'].'|'.$id.'|'.$m['user_id']."\">?</a></li>\n";
echo "<li>".date("M d, Y",$m['time']).": ".htmlspecialchars($m['comment'])." (".$user_info->display_name.') <a href="history.php?changeset='.$m['time'].'|'.$id.'|'.$m['user_id']."\">?</a></li>\n";
}
if($c['transcriber'] > '') {
echo "<li>Original transcriber: ".$c['transcriber']."</li>\n";

View File

@ -34,7 +34,7 @@ while ($t = $req->fetch_assoc()) {
$sql1 = 'SELECT * FROM '.db('tags').' WHERE id = '.$t['tag_id'];
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
$tt = $req1->fetch_assoc();
$tags[$tt['id']] = $tt['tag'];
$tags[] = $tt['tag'];
}
natcasesort($tags);
@ -287,7 +287,7 @@ if(!$logged_in) {
echo "<h4>Mode</h4>\n";
echo '<select name="mode">'."\n";
echo '<option value=""></option>'."\n";
foreach(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 'p' => 'T. pereg.') as $k => $v) {
foreach(array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 'c' => 'C', 'd' => 'D', 'e' => 'E', 'p' => 'T. pereg.') as $k => $v) {
echo '<option value="'.$k.'"'.($c['mode']==$k?' selected="selected"':'').'>'.$v.'</option>'."\n";
}
echo "</select>\n";
@ -328,6 +328,9 @@ if(!$logged_in) {
$sources_box .= "</select>\n";
echo $sources_box;
}
echo "<h4>Remarks</h4>\n";
echo '<textarea name="remarks" class="gabc">'.$c['remarks']."</textarea>\n";
echo "<h4>Sources</h4>\n";
echo '<span style="margin-left:295px;">Page</span><span style="margin-left:40px;">Sequence</span><span style="margin-left:20px;">Extent</span>';
$i = 0;
@ -351,9 +354,6 @@ if(!$logged_in) {
}
echo '<a href="#" class="add" rel=".clone2"><img src="list-add.png" alt="Add more" /></a>';
echo "<h4>Remarks</h4>\n";
echo '<textarea name="remarks" class="gabc">'.$c['remarks']."</textarea>\n";
echo '<p><input type="hidden" name="id" value="'.$id.'" /><input type="submit" /></p>';
foreach ($c_s as $s) {

View File

@ -85,6 +85,7 @@ function mgabc2tex($c, $firstverse = False) {
'pr' => False,
'ps' => False,
're' => 'Resp',
'rb' => 'R. br',
'se' => 'Seq',
'tr' => 'Tract',
'va' => False);
@ -134,6 +135,8 @@ function mgabc2tex($c, $firstverse = False) {
if($c['mode'] || $c['mode_var']) {
if($c['mode'] == 'p') {
$mode = "T. pereg.";
} elseif(in_array($c['mode'], array('c','d','e'))) {
$mode = strtoupper($c['mode']).($c['mode_var']?' '.$c['mode_var']:'');
} else {
$mode = $c['mode'].($c['mode_var']?' '.$c['mode_var']:'');
}

View File

@ -28,7 +28,7 @@ $user_info = get_userdata($m['user_id']);
echo '<entry>
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
<summary>'.$m['comment'].'</summary>
<summary>'.htmlspecialchars($m['comment']).'</summary>
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
<author>
<name>'.$user_info->display_name.'</name>
@ -43,7 +43,7 @@ while($m = $req1->fetch_assoc()) {
echo '<entry>
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
<summary>'.$m['comment'].'</summary>
<summary>'.htmlspecialchars($m['comment']).'</summary>
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
<author>
<name>'.$user_info->display_name.'</name>

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ if(count($chants)) {
}
echo "<ul class=\"incipit\">\n";
foreach($chants as $c) {
$incipit = $c['incipit']?format_incipit($c['incipit']):"===";
$incipit = $c['incipit']?format_incipit($c['incipit']):"░░░░";
echo '<li class="usage-marker '.$c['office-part'].'">';
if($c['gabc'] > '') {
echo '<a href="chant.php?id='.$c['id'].'">'.$incipit."</a>";

View File

@ -6,7 +6,7 @@ function chant_from_id($c) {
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
$chants = array();
$ch = $req1->fetch_assoc();
return array($ch['office-part'], $ch['incipit'], $ch['gabc'] > '', $ch['version']);
return array($ch['office-part'], $ch['incipit'] > ''?$ch['incipit']:'░░░░', $ch['gabc'] > '', $ch['version']);
}
define("HOST", ""); // The host you want to connect to.

View File

@ -14,6 +14,7 @@ $txt['usage']['ky'] = 'Kyriale';
$txt['usage']['of'] = 'Offertorium';
$txt['usage']['ps'] = 'Psalmus';
$txt['usage']['re'] = 'Responsorium';
$txt['usage']['rb'] = 'Responsorium brevis';
$txt['usage']['se'] = 'Sequentia';
$txt['usage']['tr'] = 'Tractus';
$txt['usage']['or'] = 'Toni Communes';
@ -33,6 +34,7 @@ $txt['usage_s']['ky'] = '';
$txt['usage_s']['of'] = 'Offert';
$txt['usage_s']['ps'] = '';
$txt['usage_s']['re'] = 'Resp';
$txt['usage_s']['rb'] = 'R. br';
$txt['usage_s']['se'] = 'Seq';
$txt['usage_s']['tr'] = 'Tract';
$txt['usage_s']['or'] = '';

View File

@ -27,7 +27,7 @@ echo "</ul></div>\n";
$sql1 = 'SELECT * FROM '.db('tags').' t WHERE EXISTS (SELECT * FROM '.db('chant_tags').' ts WHERE t.id = ts.tag_id) ORDER BY tag';
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
if($req1->num_rows > 0) {
echo "<h4>by tag</h4>\n<div><ul class=\"alphabet\">\n";
echo "<h4>by tag</h4>\n<div><ul>\n";
while($t = $req1->fetch_assoc()) {
echo "<li><a href=\"tag.php?id=".$t['id']."\">".$t['tag']."</a></li>\n";
}
@ -45,7 +45,9 @@ while($s = $req1->fetch_assoc()) {
}
foreach($sources as $id => $s) {
if(in_array($id, $used_sources)) {
echo "<li><a href=\"source.php?id=".$id."\">".$s['year']." - ".$s['editor']." - ".$s['title']."</a></li>\n";
echo "<li><a href=\"source.php?id=".$id."\">".$s['year']." - ".$s['editor']." - ".$s['title']."</a>";
if($s['description'] > '') echo "<br />\n<i>".$s['description']."</i>";
echo "</li>\n";
}
}
$sql1 = 'SELECT * FROM '.db('chants').' c WHERE NOT EXISTS (SELECT * FROM '.db('chant_sources').' cs WHERE c.id = cs.chant_id)';
@ -69,7 +71,7 @@ foreach($mod as $d => $ml) {
echo "<ul>\n";
foreach($ml as $m) {
echo '<li><a href="chant.php?id='.$m['chant_id'].'">'.format_incipit(chant_from_id($m['chant_id'])[1])."</a><br />\n";
echo "<i>".$m['comment']."</i></li>\n";
echo "<i>".htmlspecialchars($m['comment'])."</i></li>\n";
}
echo "</ul><br />\n";
}

View File

@ -245,6 +245,10 @@ ul.incipit li {
color: #736342;
}
.rb:before, .rb:after {
color: #736342;
}
.se:before, .se:after {
color: #8c7b5a;
}

View File

@ -24,7 +24,7 @@ foreach($mod as $d => $ml) {
foreach($ml as $m) {
$user_info = get_userdata($m['user_id']);
echo "<li>".' <a href="chant.php?id='.$m['chant_id'].'">'.format_incipit(chant_from_id($m['chant_id'])[1])."</a><br />\n";
echo "<i>".$m['comment'].'</i> <span class="version">('.$user_info->display_name.")</span></li>\n";
echo "<i>".htmlspecialchars($m['comment']).'</i> <span class="version">('.$user_info->display_name.")</span></li>\n";
}
echo "</ul>\n";
}