Aaron Parecki
9 years ago
10 changed files with 281 additions and 42 deletions
-
3composer.json
-
75composer.lock
-
3controllers/auth.php
-
81controllers/controllers.php
-
5lib/config.template.php
-
87lib/helpers.php
-
0schema/mysql.sql
-
22schema/sqlite.sql
-
1views/layout.php
-
38views/photo.php
@ -0,0 +1,22 @@ |
|||||
|
CREATE TABLE users ( |
||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
||||
|
url TEXT, |
||||
|
authorization_endpoint TEXT, |
||||
|
token_endpoint TEXT, |
||||
|
micropub_endpoint TEXT, |
||||
|
micropub_access_token TEXT, |
||||
|
micropub_scope TEXT, |
||||
|
micropub_response TEXT, |
||||
|
micropub_success INTEGER default 0, |
||||
|
date_created datetime, |
||||
|
last_login datetime, |
||||
|
last_micropub_response TEXT, |
||||
|
last_micropub_response_date datetime, |
||||
|
location_enabled INTEGER NOT NULL default 0, |
||||
|
syndication_targets TEXT, |
||||
|
facebook_access_token TEXT, |
||||
|
twitter_access_token TEXT, |
||||
|
twitter_token_secret TEXT, |
||||
|
twitter_username TEXT, |
||||
|
instagram_access_token TEXT |
||||
|
); |
@ -0,0 +1,38 @@ |
|||||
|
<div class="narrow"> |
||||
|
<?= partial('partials/header') ?>
|
||||
|
|
||||
|
<form method="POST" role="form" style="margin-top: 20px;" id="note_form" enctype="multipart/form-data"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label for="note_photo"><code>photo</code></label> |
||||
|
<input type="file" name="note_photo" id="note_photo" accept="image/jpg,image/jpeg,image/gif,image/png"> |
||||
|
<p class="help-block">Photo JPEG, GIF or PNG.</p> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label for="note_content"><code>content</code> (optional)</label> |
||||
|
<textarea name="note_content" id="note_content" value="" class="form-control" style="height: 4em;"><? if(isset($this->note_content)) echo $this->note_content ?></textarea>
|
||||
|
</div> |
||||
|
|
||||
|
<button class="btn btn-success" id="btn_post">Post</button> |
||||
|
</form> |
||||
|
|
||||
|
<? if(!empty($this->location)): ?>
|
||||
|
<div class="alert alert-success"> |
||||
|
<strong>Success!</strong> Photo posted to: <em><a href="<?= $this->location ?>"><?= $this->location ?></a></em>
|
||||
|
</div> |
||||
|
<? endif ?>
|
||||
|
|
||||
|
<? if(!empty($this->error)): ?>
|
||||
|
<div class="alert alert-danger"> |
||||
|
<strong>Error:</strong> <em><?= $this->error ?></em>
|
||||
|
</div> |
||||
|
<? endif ?>
|
||||
|
|
||||
|
<? if(!empty($this->response)): ?>
|
||||
|
<h4>Response:</h4> |
||||
|
<pre><?= $this->response ?></pre>
|
||||
|
<? endif ?>
|
||||
|
|
||||
|
|
||||
|
</div> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue