Пример #1
0
$collection = $_REQUEST["collection"];
$row = sql_get_row("select title,xid,post,parent,xsl from {$collection}_{$db_files} where name='{$file}'");
//print "$query";
$title = $row[0];
$current_xid = $did = $row[1];
// document ID
$postid = $row[2];
// post id
$xslfilename = dirname(__FILE__) . "/xsl/" . $row[4] . ".xsl";
$xmlfilename = "{$xml_documents}/{$collection}/{$file}.xml";
// Begins output
if ($id_pool) {
    $localisation[] = array("{$pool['name']}", "pool.php?id_pool={$id_pool}", "Pool for topic {$pool['id_pool']}");
}
$i = sizeof($localisation);
while ($row["parent"] != $row["name"] && ($row = sql_get_row("SELECT * FROM {$collection}_{$db_files} WHERE name='{$row['parent']}'", false))) {
    array_splice($localisation, $i, 0, array(array($row["name"], "{$base_url}/collections/{$row['name']}?id_pool={$id_pool}", $row["title"])));
}
$up_url = $localisation[sizeof($localisation) - 1][1];
$localisation[] = array("File {$file}", "{$PHP_SELF}?id_pool={$id_pool}&file={$file}", "{$title}");
add_icon("img_treeview", "{$base_url}/img/tree.png", "Tree view (shift + T)", "javascript:void(0)", "toggle_treeview()", '<div class="help_top">Displays/hides the panel with the tree view of the XML document, where only tag names appear. In this panel, you can click on any tag name to view it in the main document view.<br/><b>Shortcut</b>: hold <code>shift</code> and press <code>t</code></div>');
add_icon("img_bookmarks", "{$base_url}/img/trombone.png", "Bookmarks (shift + B)", "javascript:void(0)", "toggle_bookmarks()", '<div class="help_top">Displays/hides the panel with the current document bookmarks. In this panel, you can click on any displayed path to view it in the main document view.<br/><b>Shortcut</b>: hold <code>shift</code> and press <code>b</code></div>');
make_header($title);
$force_update = $_GET["force"];
if (!$force_update) {
    $force_update = 0;
}
$no_mathml = $force_update == 2;
// 2nd update ==> no mathml
?>
<!-- Our own style & js -->
Пример #2
0
*/
header("Content-cache: 0");
require_once "include/xrai.inc";
require_once "include/assessments.inc";
set_time_limit(360);
$xraiatag = "j";
// ------------------------
// --- Retrieve article ---
// ------------------------
// Redirect to the next article to assess
if ($_REQUEST["view_jump"] == 1) {
    $view_xid = $_REQUEST["view_xid"];
    $next = $_REQUEST["next"];
    $sql_begin = "SELECT * FROM assessments WHERE id_pool={$id_pool} AND (assessment = 'U' or inconsistant='Y') AND xid ";
    if (($row = sql_get_row($sql_begin . ($next ? ">" : "<") . " {$view_xid} ORDER BY xid " . ($next ? "" : "DESC") . " LIMIT 0,1", false)) || ($row = sql_get_row($sql_begin . ($next ? "<" : ">") . " {$view_xid} ORDER BY xid " . ($next ? "" : "DESC") . " LIMIT 0,1", false))) {
        $rfile = sql_get_row("SELECT * FROM files WHERE type='xml' AND xid <= {$row['xid']} AND post >= {$row['xid']}");
        header("Location: {$PHP_SELF}?id_pool={$id_pool}&file={$rfile['name']}");
        exit;
    } else {
        header("Location: {$base_url}/pool.php?id_pool={$id_pool}&message=Pool%20completed%20!!!");
        exit;
    }
}
// Retrieve information on the current file & display the current assessments
$file = $_REQUEST["file"];
$directory = dirname($file);
$collection = $_REQUEST["collection"];
$documentns = "urn:xrai:c:{$collection}";
$row = $xrai_db->getRow("select id,title,parent from {$db_files} where collection=? AND filename=?", array($collection, $file));
//print "$query";
$title = $row["title"];