Exemplo n.º 1
0
        Response\Redirect('?action=show&menu=' . $menu . '&id=' . $id);
    }
    Response\Redirect('?action=' . $menu . '&offset=' . $offset . '&feed_id=' . $feed_id . '#item-' . $id);
});
// Display bookmarks page
Router\get_action('bookmarks', function () {
    $offset = Request\int_param('offset', 0);
    $nb_items = Model\Item\count_bookmarks();
    $items = Model\Item\get_bookmarks($offset, Model\Config\get('items_per_page'));
    Response\html(Template\layout('bookmarks', array('favicons' => Model\Feed\get_item_favicons($items), 'original_marks_read' => Model\Config\get('original_marks_read'), 'order' => '', 'direction' => '', 'display_mode' => Model\Config\get('items_display_mode'), 'items' => $items, 'nb_items' => $nb_items, 'offset' => $offset, 'items_per_page' => Model\Config\get('items_per_page'), 'nothing_to_read' => Request\int_param('nothing_to_read'), 'nb_unread_items' => Model\Item\count_by_status('unread'), 'menu' => 'bookmarks', 'title' => t('Bookmarks') . ' (' . $nb_items . ')')));
});
// Display bookmark feeds
Router\get_action('bookmark-feed', function () {
    // Check token
    $feed_token = Model\Config\get('feed_token');
    $request_token = Request\param('token');
    if ($feed_token !== $request_token) {
        Response\text('Access Forbidden', 403);
    }
    // Build Feed
    $writer = new Atom();
    $writer->title = t('Bookmarks') . ' - Miniflux';
    $writer->site_url = Helper\get_current_base_url();
    $writer->feed_url = $writer->site_url . '?action=bookmark-feed&token=' . urlencode($feed_token);
    $bookmarks = Model\Item\get_bookmarks();
    foreach ($bookmarks as $bookmark) {
        $article = Model\Item\get($bookmark['id']);
        $writer->items[] = array('id' => $article['id'], 'title' => $article['title'], 'updated' => $article['updated'], 'url' => $article['url'], 'content' => $article['content']);
    }
    Response\xml($writer->execute());
});
Exemplo n.º 2
0
    echo $project['token'];
    ?>
" target="_blank"><?php 
    echo t('Public link');
    ?>
</a></strong></li>
            <li><strong><i class="fa fa-rss-square"></i> <a href="?controller=project&amp;action=feed&amp;token=<?php 
    echo $project['token'];
    ?>
" target="_blank"><?php 
    echo t('RSS feed');
    ?>
</a></strong></li>
        </ul>
        <input type="text" readonly="readonly" value="<?php 
    echo Helper\get_current_base_url();
    ?>
?controller=board&amp;action=readonly&amp;token=<?php 
    echo $project['token'];
    ?>
"/>
    </div>

    <a href="?controller=project&amp;action=disablePublic&amp;project_id=<?php 
    echo $project['id'] . Helper\param_csrf();
    ?>
" class="btn btn-red"><?php 
    echo t('Disable public access');
    ?>
</a>
Exemplo n.º 3
0
<?php 
if ($project['is_public']) {
    ?>

    <div class="listing">
        <ul class="no-bullet">
            <li><strong><i class="fa fa-share-alt"></i> <?php 
    echo Helper\a(t('Public link'), 'board', 'readonly', array('token' => $project['token']));
    ?>
</strong></li>
            <li><strong><i class="fa fa-rss-square"></i> <?php 
    echo Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token']));
    ?>
</strong></li>
        </ul>
        <input type="text" readonly="readonly" value="<?php 
    echo Helper\get_current_base_url() . Helper\u('board', 'readonly', array('token' => $project['token']));
    ?>
"/>
    </div>

    <?php 
    echo Helper\a(t('Disable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'disable'), true, 'btn btn-red');
    ?>

<?php 
} else {
    ?>
    <?php 
    echo Helper\a(t('Enable public access'), 'project', 'share', array('project_id' => $project['id'], 'switch' => 'enable'), true, 'btn btn-blue');
}
Exemplo n.º 4
0
echo t('API');
?>
</h2>
</div>
<section class="listing">
    <ul>
        <li>
            <?php 
echo t('API token:');
?>
            <strong><?php 
echo Helper\escape($values['api_token']);
?>
</strong>
        </li>
        <li>
            <?php 
echo t('API endpoint:');
?>
            <input type="text" readonly="readonly" value="<?php 
echo Helper\get_current_base_url() . 'jsonrpc.php';
?>
">
        </li>
        <li>
            <?php 
echo Helper\a(t('Reset token'), 'config', 'token', array('type' => 'api'), true);
?>
        </li>
    </ul>
</section>
Exemplo n.º 5
0
    </tr>
    <?php 
}
?>
</table>

<?php 
if (Helper\is_admin()) {
    ?>
<div class="page-header">
    <h2><?php 
    echo t('Integration');
    ?>
</h2>
</div>

<h3><i class="fa fa-github fa-fw"></i><?php 
    echo t('Github webhook');
    ?>
</h3>
<input type="text" readonly="readonly" value="<?php 
    echo Helper\get_current_base_url() . Helper\u('webhook', 'github', array('token' => $webhook_token, 'project_id' => $project['id']));
    ?>
"/><br/>
<p class="form-help"><a href="http://kanboard.net/documentation/github-webhooks" target="_blank"><?php 
    echo t('Help on Github webhook');
    ?>
</a></p>

<?php 
}
Exemplo n.º 6
0
</id>
    <icon><?php 
echo Helper\get_current_base_url();
?>
assets/img/favicon.png</icon>

    <?php 
foreach ($events as $e) {
    ?>
    <entry>
        <title type="text"><?php 
    echo $e['event_title'];
    ?>
</title>
        <link rel="alternate" href="<?php 
    echo Helper\get_current_base_url() . '?controller=task&amp;action=show&amp;task_id=' . $e['task_id'];
    ?>
"/>
        <id><?php 
    echo $e['id'] . '-' . $e['event_name'] . '-' . $e['task_id'] . '-' . $e['date_creation'];
    ?>
</id>
        <published><?php 
    echo date(DATE_ATOM, $e['date_creation']);
    ?>
</published>
        <updated><?php 
    echo date(DATE_ATOM, $e['date_creation']);
    ?>
</updated>
        <author>
Exemplo n.º 7
0
echo t('URL and token');
?>
</h2>
</div>
<section class="listing">
    <ul>
        <li>
            <?php 
echo t('Webhook token:');
?>
            <strong><?php 
echo Helper\escape($values['webhook_token']);
?>
</strong>
        </li>
        <li>
            <?php 
echo t('URL for task creation:');
?>
            <input type="text" readonly="readonly" value="<?php 
echo Helper\get_current_base_url() . Helper\u('webhook', 'task', array('token' => $values['webhook_token']));
?>
">
        </li>
        <li>
            <?php 
echo Helper\a(t('Reset token'), 'config', 'token', array('type' => 'webhook'), true);
?>
        </li>
    </ul>
</section>
Exemplo n.º 8
0
</id>
    <icon><?php 
echo Helper\get_current_base_url();
?>
assets/img/favicon.png</icon>

    <?php 
foreach ($events as $e) {
    ?>
    <entry>
        <title type="text"><?php 
    echo $e['event_title'];
    ?>
</title>
        <link rel="alternate" href="<?php 
    echo Helper\get_current_base_url() . Helper\u('task', 'show', array('task_id' => $e['task_id']));
    ?>
"/>
        <id><?php 
    echo $e['id'] . '-' . $e['event_name'] . '-' . $e['task_id'] . '-' . $e['date_creation'];
    ?>
</id>
        <published><?php 
    echo date(DATE_ATOM, $e['date_creation']);
    ?>
</published>
        <updated><?php 
    echo date(DATE_ATOM, $e['date_creation']);
    ?>
</updated>
        <author>