First release of domframework
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1207 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
10
examples/blog/views/layout.html
Normal file
10
examples/blog/views/layout.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>{title}</title>
|
||||
</head>
|
||||
<body>
|
||||
{content}
|
||||
</body>
|
||||
</html>
|
||||
21
examples/blog/views/view_blog.php
Normal file
21
examples/blog/views/view_blog.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
class view_blog
|
||||
{
|
||||
function get ($data)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
function listing ($data)
|
||||
{
|
||||
$content = "<ul>\n";
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$content .= " <li>";
|
||||
$content .= "<a href='".urlencode ($val)."'>".htmlentities ($val)."</a>";
|
||||
$content .= "</li>\n";
|
||||
}
|
||||
$content .= "</ul>\n";
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user