Пример #1
0
		  initShortcuts();
	  });
	</script>
</head>
<body>
	<?php 
$active_page = 'questions';
require_once 'views/topnav.php';
?>

    <div class="container">
    	<div class="row">
			<div class="col-md-9">
				<div class="row row1">
                    <?php 
if ($qbc->isAdmin()) {
    $theme['modal']['modal_id'] = 'question-stats';
    ?>
                        <div class="question-stats pull-right">
                            <a href="#" data-toggle="modal" data-target="#<?php 
    print $theme['modal']['modal_id'];
    ?>
"><span class="glyphicon glyphicon-stats"></span> Statistics</a>
                        </div>
                        <?php 
    $theme['modal']['title'] = 'Question #' . $qid . ' Statistics';
    $theme['modal']['body'] = $qbc->getQuestionStatistics($qid);
    include_once 'views/modal.php';
    ?>
                    <?php 
}
Пример #2
0
<?php

require_once 'includes/QBCoref.class.php';
$qbc = new QBCoref();
if (!$qbc->isAdmin()) {
    die("You don't have access to this page.");
}
function array2csv($array)
{
    if (count($array) == 0) {
        return null;
    }
    ob_start();
    $df = fopen("php://output", 'w');
    $headers = array();
    $headers[] = 'cid';
    $headers[] = 'qid';
    $headers[] = 'pos_start';
    $headers[] = 'pos_end';
    $headers[] = 'description';
    $headers[] = 'coref_group';
    $headers[] = 'author';
    $headers[] = 'date_added';
    fputcsv($df, $headers);
    foreach ($array as $row) {
        fputcsv($df, $row);
    }
    fclose($df);
    return ob_get_clean();
}
function download_send_headers($filename)