Some bugfixes + feed improvement + database update
This commit is contained in:
parent
db955b099d
commit
f5a64023c4
|
|
@ -245,10 +245,9 @@ if(!$logged_in) {
|
|||
foreach ($c_s as $s) {
|
||||
echo '<p class="clone2'.($i>0?' copy'.$i:'').'">';
|
||||
sources_box($s['source']);
|
||||
echo "</select>\n";
|
||||
echo '<input size="3" name="page[]" value="'.$s['page'].'" />';
|
||||
echo '<input size="3" name="sequence[]" value="'.$s['sequence'].'" />';
|
||||
echo '<input size="3" name="extent[]" value="'.$s['extent'].'" />';
|
||||
echo '<input size="2" name="page[]" value="'.$s['page'].'" />';
|
||||
echo '<input size="2" name="sequence[]" value="'.$s['sequence'].'" />';
|
||||
echo '<input size="2" name="extent[]" value="'.$s['extent'].'" />';
|
||||
echo ($i>0?' <a class="remove" href="#" onclick="$(this).parent().slideUp(function(){ $(this).remove() }); return false"><img src="list-remove.png" alt="Remove" /></a>':'');
|
||||
echo '</p>';
|
||||
$i++;
|
||||
|
|
@ -257,9 +256,9 @@ if(!$logged_in) {
|
|||
echo '<p class="clone2">';
|
||||
sources_box('0');
|
||||
echo "</select>\n";
|
||||
echo '<input size="3" name="page[]" />';
|
||||
echo '<input size="3" name="sequence[]" />';
|
||||
echo '<input size="3" name="extent[]" />';
|
||||
echo '<input size="2" name="page[]" />';
|
||||
echo '<input size="2" name="sequence[]" />';
|
||||
echo '<input size="2" name="extent[]" />';
|
||||
echo '</p>';
|
||||
}
|
||||
echo '<a href="#" class="add" rel=".clone2"><img src="list-add.png" alt="Add more" /></a>';
|
||||
|
|
|
|||
18
feed.php
18
feed.php
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$dir = 'http'.(empty($_SERVER['HTTPS'])?'':'s').'://'.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'],0,-8);
|
||||
$dir = 'http'.(empty($_SERVER['HTTPS'])?'':'s').'://'.$_SERVER['HTTP_HOST'].substr($_SERVER['SCRIPT_NAME'],0,-8);
|
||||
|
||||
include('include/db.php');
|
||||
include('include/functions.php');
|
||||
|
|
@ -13,7 +13,11 @@ echo '<?xml version="1.0" encoding="utf-8"?>
|
|||
<link href="'.$dir.'scores.php" />
|
||||
<link href="'.$dir.'feed.php" rel="self" />
|
||||
';
|
||||
$sql1 = 'SELECT * FROM '.db('changesets').' ORDER BY `time` DESC LIMIT 10';
|
||||
|
||||
$start = array_key_exists('start-index', $_GET)?intval($_GET['start-index']):0;
|
||||
$max = array_key_exists('max-results', $_GET)?intval($_GET['max-results']):50;
|
||||
|
||||
$sql1 = 'SELECT * FROM '.db('changesets').' ORDER BY `time` DESC LIMIT '.$start.','.$max;
|
||||
$req1 = $mysqli->query($sql1) or die('Erreur SQL !<br />'.$sql1.'<br />'.$mysqli->error);
|
||||
|
||||
$m = $req1->fetch_assoc();
|
||||
|
|
@ -22,7 +26,7 @@ echo '<updated>'.date(DATE_ATOM,$m['time']).'</updated>
|
|||
';
|
||||
$user_info = get_userdata($m['user_id']);
|
||||
echo '<entry>
|
||||
<title type="html">'.format_incipit(chant_from_id($m['chant_id'])[1]).'</title>
|
||||
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
|
||||
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
|
||||
<summary>'.$m['comment'].'</summary>
|
||||
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
|
||||
|
|
@ -37,16 +41,16 @@ echo '<entry>
|
|||
while($m = $req1->fetch_assoc()) {
|
||||
$user_info = get_userdata($m['user_id']);
|
||||
echo '<entry>
|
||||
<title type="html">'.format_incipit(chant_from_id($m['chant_id'])[1]).'</title>
|
||||
<link href="http://test.selapa.net/gregobase/chant.php?id='.$m['chant_id'].'" />
|
||||
<title type="html">'.chant_from_id($m['chant_id'])[1].'</title>
|
||||
<link href="'.$dir.'chant.php?id='.$m['chant_id'].'" />
|
||||
<summary>'.$m['comment'].'</summary>
|
||||
<updated>'.date(DATE_ATOM,$m['time']).'</updated>
|
||||
<author>
|
||||
<name>'.$user_info->display_name.'</name>
|
||||
</author>
|
||||
<id>http://test.selapa.net/gregobase/history.php?changeset='.$m['time'].'%7C'.$m['chant_id'].'%7C'.$m['user_id'].'</id>
|
||||
<id>'.$dir.'history.php?changeset='.$m['time'].'%7C'.$m['chant_id'].'%7C'.$m['user_id'].'</id>
|
||||
</entry>
|
||||
';
|
||||
}
|
||||
echo '</feed>';
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
2255
grego_online.sql
2255
grego_online.sql
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue