added some useful models and controllers

This commit is contained in:
Logsol 2013-07-08 21:02:22 +02:00
parent a6873ee6c8
commit 57c0436f14
45 changed files with 6456 additions and 0 deletions

View file

@ -0,0 +1,93 @@
<div id="admin">
<h3>Page bearbeiten</h3>
<!-- TinyMCE -->
<script type="text/javascript" src="<?php echo $this->base ?>/scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
language : "de",
mode : "textareas",
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "<?php echo $this->base ?>/style/tiny.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<!-- /TinyMCE -->
<form action="<?php echo $this->base ?>/adminPage/save"method="post">
<input type="hidden" name="id" value="<?php echo $this->page['id'] ?>" />
<dl>
<dt>Aktiv</dt>
<dd>
<input type="checkbox" name="active" <?php if($this->page['active']) echo 'checked="checked"' ?> />
</dd>
</dl>
<dl>
<dt>Titel</dt>
<dd>
<input class="textfield" type="text" name="title" value="<?php echo $this->page['title'] ?>"/>
</dd>
</dl>
<dl>
<dt>Untertitel</dt>
<dd>
<input class="textfield" type="text" name="subtitle" value="<?php echo $this->page['subtitle'] ?>"/>
</dd>
</dl>
<dl>
<dt>Url</dt>
<dd>
<input class="textfield" type="text" name="url" value="<?php echo $this->page['url'] ?>"/>
</dd>
</dl>
<dl>
<dt>Inhalt</dt>
<dd>
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
<div>
<textarea id="content" name="content" rows="15" cols="80" style="width: 500px"><?php echo htmlentities($this->page['content']) ?></textarea>
</div>
</dd>
</dl>
<p>
<input type="submit" name="save" value="speichern" />
</p>
</form>
</div>

View file

@ -0,0 +1,31 @@
<html>
<head>
<title>Swiss Didgeridoo Artwork</title>
<link rel="stylesheet" type="text/css" href="/style/main.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Description" content="Swiss Didgeridoo Artwork - Online Shop" />
</head>
<body>
<div style="padding: 10px;">
<h3 style="color:white; padding: 3px;background-color: #CB3829;">Bild Hochladen</h3>
<p><form method="post" enctype="multipart/form-data">
<input name="myfile" type="file" size="50" maxlength="100000" accept="text/*"> <input type="submit" value="Go" />
</form>
</p>
<h3 style="color:white; padding: 3px;background-color: #CB3829;">Bild Ausw&auml;hlen</h3>
<ul style="padding-left: 16px; list-style-type: none">
<?php foreach($this->files as $file): ?>
<li>
<a href="javascript: void(0);" onclick="window.open('/img/page/<?php echo $file; ?>', 'Bild', 'width=400,height=300,status=yes,scrollbars=yes,resizable=yes');"><img src="/img/page/<?php echo $file; ?>" width="50" height="50" /></a>
<a href="javascript: void(0);" onclick="opener.document.getElementById('src').value='/img/page/<?php echo $file; ?>'; window.close();" >Einf&uuml;gen</a>
<a href="?delete=<?php echo $file ?>" style="float:right; margin-top: 35px">L&ouml;schen</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</body>
</html>

View file

@ -0,0 +1,57 @@
<div id="admin">
<h3>Page Übersicht</h3>
<table>
<tr>
<th>
Aktiv
</th>
<th>
Titel
</th>
<th>
Untertitel
</th>
<th>
Url
</th>
<th colspan="3">
&nbsp;
</th>
</tr>
<?php foreach($this->pages as $page): ?>
<tr>
<td>
<?php if($page['active']) echo 'Ja'; else echo 'Nein'; ?>
</td>
<td>
<?php echo $page['title'] ?>
</td>
<td>
<?php echo $page['subtitle'] ?>
</td>
<td>
<?php echo $page['url'] ?>
</td>
<td>
<a href="<?php echo $this->base ?>/adminPage/delete/pageId/<?php echo $page['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/delete.png" alt="Löschen" title="Löschen" />
</a>
</td>
<td>
<a href="<?php echo $this->base ?>/adminPage/edit/pageId/<?php echo $page['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/change.png" alt="Ändern" title="Ändern" />
</a>
</td>
<td>
<a href="<?php echo $this->base ?>/page/<?php echo $page['url'] ?>/preview">
<img src="<?php echo $this->base ?>/img/leafs/preview.png" alt="Vorschau" title="Vorschau" />
</a>
</td>
</tr>
<?php endforeach ?>
</table>
<p>
<a href="<?php echo $this->base ?>/adminPage/edit">Neue Seite anlegen</a>
</p>
</div>