-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
class Main { | ||
|
||
function index() { | ||
$tmpl = new template("template.html"); | ||
$tmpl->page = "index.html"; | ||
$tmpl->js = "page_index.js"; | ||
$tmpl->heading = "HOME"; | ||
$tmpl->text = "yo ho.. <h1>whats happening?</h1> notice how the template is text|safe. its so that html is rendered"; | ||
$tmplOutput = $tmpl->load(); | ||
echo $tmplOutput; | ||
} | ||
|
||
function about() { | ||
$tmpl = new template("template.html"); | ||
$tmpl->page = "about.html"; | ||
$tmpl->js = "page_about.js"; | ||
$tmpl->heading = "About"; | ||
$tmpl->text = "hmm about text stuff"; | ||
$tmplOutput = $tmpl->load(); | ||
echo $tmplOutput; | ||
} | ||
|
||
function contact() { | ||
$tmpl = new template("template.html"); | ||
$tmpl->page = "contact.html"; | ||
$tmpl->heading = "Contact"; | ||
$tmpl->text = "if you havent figured it out.. this is how you set tmpl variables"; | ||
$tmplOutput = $tmpl->load(); | ||
echo $tmplOutput; | ||
} | ||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
welcome back - {{ name }} <hr> | ||
|
||
{% if validated == "1" %} | ||
| <a href="/home">dashboard</a> | ||
{% else %} | ||
Please validate your email address<br> | ||
<a href="/register/validate">send validate code</a> | ||
|
||
{% endif %} | ||
|
||
<a href="/logout">logout</a> | ||
<hr> | ||
{{ msg }} |