Browse Source

don't use php shorttags

pull/25/head
Pelle Wessman 8 years ago
parent
commit
d979c81758
2 changed files with 13 additions and 13 deletions
  1. +6
    -6
      views/layout.php
  2. +7
    -7
      views/photo.php

+ 6
- 6
views/layout.php View File

@ -61,30 +61,30 @@ if(property_exists($this, 'include_facebook')) {
<div class="nav"> <div class="nav">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<? if(session('me')) { ?>
<?php if(session('me')) { ?>
<li><a href="/editor">Editor</a></li> <li><a href="/editor">Editor</a></li>
<li><a href="/new">Note</a></li> <li><a href="/new">Note</a></li>
<li><a href="/bookmark">Bookmark</a></li> <li><a href="/bookmark">Bookmark</a></li>
<li><a href="/favorite">Favorite</a></li> <li><a href="/favorite">Favorite</a></li>
<li><a href="/photo">Photo</a></li> <li><a href="/photo">Photo</a></li>
<li><a href="/email">Email</a></li> <li><a href="/email">Email</a></li>
<? } ?>
<?php } ?>
<li><a href="/docs">Docs</a></li> <li><a href="/docs">Docs</a></li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<? if(session('me')) { ?>
<?php if(session('me')) { ?>
<li><a href="/settings"><?= preg_replace(array('/https?:\/\//','/\/$/'),'',session('me')) ?></a></li> <li><a href="/settings"><?= preg_replace(array('/https?:\/\//','/\/$/'),'',session('me')) ?></a></li>
<li><a href="/signout">Sign Out</a></li> <li><a href="/signout">Sign Out</a></li>
<? } else if(property_exists($this, 'authorizing')) { ?>
<?php } else if(property_exists($this, 'authorizing')) { ?>
<li class="navbar-text"><?= $this->authorizing ?></li> <li class="navbar-text"><?= $this->authorizing ?></li>
<? } else { ?>
<?php } else { ?>
<form action="/auth/start" method="get" class="navbar-form"> <form action="/auth/start" method="get" class="navbar-form">
<input type="text" name="me" placeholder="yourdomain.com" class="form-control" /> <input type="text" name="me" placeholder="yourdomain.com" class="form-control" />
<button type="submit" class="btn">Sign In</button> <button type="submit" class="btn">Sign In</button>
<input type="hidden" name="redirect_uri" value="https://<?= $_SERVER['SERVER_NAME'] ?>/indieauth" /> <input type="hidden" name="redirect_uri" value="https://<?= $_SERVER['SERVER_NAME'] ?>/indieauth" />
</form> </form>
<? } ?>
<?php } ?>
</ul> </ul>
</div> </div>

+ 7
- 7
views/photo.php View File

@ -17,7 +17,7 @@
<div class="form-group"> <div class="form-group">
<label for="note_content"><code>content</code> (optional)</label> <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>
<textarea name="note_content" id="note_content" value="" class="form-control" style="height: 4em;"><?php if(isset($this->note_content)) echo $this->note_content ?></textarea>
</div> </div>
<button class="btn btn-success" id="btn_post">Post</button> <button class="btn btn-success" id="btn_post">Post</button>
@ -25,22 +25,22 @@
<div style="clear:both;"></div> <div style="clear:both;"></div>
</form> </form>
<? if(!empty($this->location)): ?>
<?php if(!empty($this->location)): ?>
<div class="alert alert-success"> <div class="alert alert-success">
<strong>Success!</strong> Photo posted to: <em><a href="<?= $this->location ?>"><?= $this->location ?></a></em> <strong>Success!</strong> Photo posted to: <em><a href="<?= $this->location ?>"><?= $this->location ?></a></em>
</div> </div>
<? endif ?>
<?php endif ?>
<? if(!empty($this->error)): ?>
<?php if(!empty($this->error)): ?>
<div class="alert alert-danger"> <div class="alert alert-danger">
<strong>Error:</strong> <em><?= $this->error ?></em> <strong>Error:</strong> <em><?= $this->error ?></em>
</div> </div>
<? endif ?>
<?php endif ?>
<? if(!empty($this->response)): ?>
<?php if(!empty($this->response)): ?>
<h4>Response:</h4> <h4>Response:</h4>
<pre><?= $this->response ?></pre> <pre><?= $this->response ?></pre>
<? endif ?>
<?php endif ?>
</div> </div>
<script> <script>
$(function(){ $(function(){

Loading…
Cancel
Save