Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
620db83def
|
|||
f742dd5e87
|
|||
0095ef14fa
|
|||
7431986a96
|
|||
ff31885c93
|
@ -10,7 +10,8 @@
|
||||
".git",
|
||||
".eslintrc",
|
||||
".nova",
|
||||
"*.log"
|
||||
"*.log",
|
||||
"config.php"
|
||||
],
|
||||
"remotePath" : "\/var\/www\/html\/Dragonpolls",
|
||||
"remoteURL" : "https:\/\/phlaym.net\/Dragonpolls\/",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hutattedonmyarm/dragonpolls",
|
||||
"version": "0.9.0",
|
||||
"version": "0.9.1",
|
||||
"description": "A polling client for pnut.io",
|
||||
"require": {
|
||||
"hutattedonmyarm/apnuti": "@dev"
|
||||
|
@ -58,7 +58,7 @@ function get_page_footer()
|
||||
{
|
||||
$version = json_decode(file_get_contents(__DIR__ . '/composer.json'), true)['version'];
|
||||
return '</main><footer>'
|
||||
. '<a href="https://phlaym.net/git/phlaym/Pfadlock/releases/tag/'.$version.'">Version ' . $version . '</a>'
|
||||
. '<a href="https://phlaym.net/git/phlaym/Dragonpolls/releases/tag/'.$version.'">Version ' . $version . '</a>'
|
||||
. '<a href="https://phlaym.net/git/phlaym/Dragonpolls" title="Source" class="sourcecode"><div class="linkcontents">'
|
||||
. file_get_contents(__DIR__.'/icons/src.svg')
|
||||
. '<span class="linklabel">Source Code</span></div></a>'
|
||||
|
7
logout.php
Normal file
7
logout.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ .'/bootstrap.php';
|
||||
|
||||
$api->logout();
|
||||
$url = empty($_SERVER['HTTP_REFERER']) ? 'index.php' : $_SERVER['HTTP_REFERER'];
|
||||
redirect($url);
|
@ -112,13 +112,15 @@ if (array_key_exists('poll_created', $_GET) && $_GET['poll_created'] == 1) { ?>
|
||||
$input_type = $poll->max_options === 1 ? 'radio' : 'checkbox';
|
||||
$input_name = $poll->max_options === 1 ? 'options' : 'options[]';
|
||||
foreach ($poll->options as $option) {
|
||||
$checked = $option->is_your_response ? 'checked' : ''; ?>
|
||||
$checked = $option->is_your_response ? 'checked' : '';
|
||||
$num_respondents_text = $option->respondents > 0 ? ' (' . $option->respondents . ')' : '';
|
||||
?>
|
||||
<div class="option" style="grid-row: <?= $row ?>;">
|
||||
<input
|
||||
type="<?= $input_type ?>" <?= $checked.' '.$disabled ?>
|
||||
value="<?= $option->position ?>"
|
||||
name="<?= $input_name ?>"/>
|
||||
<span class="option-text"><?= $option->text . ' (' . $option->respondents . ')'?></span>
|
||||
<span class="option-text"><?= $option->text . $num_respondents_text?></span>
|
||||
</div>
|
||||
<div class="option-responses" style="grid-row: <?= $row++ ?>;grid-column: 2;">
|
||||
<?php foreach ($option->respondent_ids as $res_id) {
|
||||
@ -138,7 +140,7 @@ if (array_key_exists('poll_created', $_GET) && $_GET['poll_created'] == 1) { ?>
|
||||
name="submit_vote"
|
||||
value="submit" <?= $disabled_button?>
|
||||
data-can-vote="<?= $data_can_vote ?>">
|
||||
Vote
|
||||
<?= count($user_votes) > 0 ? 'Update' : '' ?> Vote
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user