added some useful models and controllers

This commit is contained in:
Logsol 2013-07-08 21:02:22 +02:00
parent 9bb724147e
commit 1d4b2a3314
44 changed files with 6424 additions and 0 deletions

BIN
application/view/.DS_Store vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,11 @@
<div id="admin">
<form action="<?php echo $this->base ?>/admin/login" method="post">
<dl>
<dt>Admin</dt>
<dd>
<?php if($this->_getParam('wrongpassword')) echo 'passwort falsch<br/>' ?>
<input type="password" name="password" value="" /> <input type="submit" name="login" value="login" />
</dd>
</dl>
</form>
</div>

View file

@ -0,0 +1,5 @@
<div id="admin">
<p>
Willkommen im Admin Bereich.
</p>
</div>

View file

@ -0,0 +1,56 @@
<div id="admin">
<h3>Navigation/Menüpunkt bearbeiten</h3>
<form action="<?php echo $this->base ?>/adminNavigation/save"method="post">
<input type="hidden" name="id" value="<?php if($this->item['id']) echo $this->item['id'] ?>" />
<dl>
<dt>Aktiv</dt>
<dd>
<input type="checkbox" name="active" <?php if($this->item['active']) echo 'checked="checked"' ?> />
</dd>
</dl>
<dl>
<dt>Menüpunkttyp</dt>
<dd>
<select name="parentId">
<option value="0">Hauptpunkt</option>
<?php foreach($this->mainItems as $item): ?>
<option <?php if($item['id'] == $this->item['parent_id'] || $item['id'] == $this->_getParam('parentId')) echo 'selected="selected"' ?> value="<?php echo $item['id'] ?>">Unterpunkt von <?php echo $item['name'] ?></option>
<?php endforeach ?>
</select>
</dd>
</dl>
<dl>
<dt>Titel</dt>
<dd>
<input type="text" name="name" value="<?php echo $this->item['name'] ?>"/>
</dd>
</dl>
<dl>
<dt>Url</dt>
<dd>
<table>
<tr>
<td>
<?php foreach($this->sites['defaults'] as $key => $site): ?>
<input type="radio" checked="checked" name="url" id="sitedefault_<?php echo $key ?>" value="<?php echo $site ?>"/><label for="sitedefault_<?php echo $key ?>"><?php echo $site ?></label><br/>
<?php endforeach ?>
</td>
<td>
<?php foreach($this->sites['pages'] as $key => $site): ?>
<input type="radio" name="url" id="sitepage_<?php echo $key ?>" value="<?php echo $site ?>"/><label for="sitepage_<?php echo $key ?>"><?php echo $site ?></label><br/>
<?php endforeach ?>
</td>
<td>
<input type="radio" name="url" id="sitenew" value="-external-"/><label for="sitenew">Externe Adresse:</label><br/>
<input type="text" name="external" value="http://"/>
</tr>
</table>
</dd>
</dl>
<p>
<input type="submit" name="save" value="speichern" />
</p>
</form>
</div>

View file

@ -0,0 +1,111 @@
<div id="admin">
<h3>Navigation Bearbeiten</h3>
<table>
<tr>
<th>
Aktiv
</th>
<th>
Name
</th>
<th colspan="7">
Link
</th>
</tr>
<?php $o=0; foreach($this->list as $parent): $i=0; ?>
<tr>
<td>
<?php if($parent['active']) echo 'Ja'; else echo 'Nein'; ?>
</td>
<td>
<?php echo $parent['name'] ?>
</td>
<td>
<?php echo Navigation::buildLink($this->base, $parent, true); ?>
</td>
<td>
<?php if($o!=0): ?>
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/up/id/<?php echo $parent['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/arrow_up.png" alt="Nach oben verschieben" title="Nach oben verschieben"/>
</a>
<?php endif ?>
</td>
<td>
<?php if($o<count($this->list)-1): ?>
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/down/id/<?php echo $parent['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/arrow_down.png" alt="Nach unten verschieben" title="Nach unten verschieben" />
</a>
<?php endif ?>
</td>
<td>
<a href="<?php echo $this->base ?>/adminNavigation/delete/id/<?php echo $parent['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 ?>/adminNavigation/edit/parentId/<?php echo $parent['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/addSub.png" alt="Unterpunkt hinzufügen" title="Unterpunkt hinzufügen" />
</a>
</td>
<td>
<a href="<?php echo $this->base ?>/adminNavigation/edit/id/<?php echo $parent['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/change.png" alt="Ändern" title="Ändern" />
</a>
</td>
<td>
<a href="<?php echo Navigation::buildLink($this->base, $parent, false); ?>">
<img src="<?php echo $this->base ?>/img/leafs/preview.png" alt="Vorschau" title="Vorschau" />
</a>
</td>
</tr>
<?php foreach($parent['children'] as $child): ?>
<tr class="sub">
<td>
<?php if($child['active']) echo 'Ja'; else echo 'Nein'; ?>
</td>
<td>
<?php echo $child['name'] ?>
</td>
<td>
<?php echo Navigation::buildLink($this->base, $child, true); ?>
</td>
<td>
<?php if($i!=0): ?>
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/up/id/<?php echo $child['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/arrow_up.png" alt="Nach oben verschieben" title="Nach oben verschieben"/>
</a>
<?php endif ?>
</td>
<td>
<?php if($i<count($parent['children'])-1): ?>
<a href="<?php echo $this->base ?>/adminNavigation/move/direction/down/id/<?php echo $child['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/arrow_down.png" alt="Nach unten verschieben" title="Nach unten verschieben" />
</a>
<?php endif ?>
</td>
<td>
<a href="<?php echo $this->base ?>/adminNavigation/delete/id/<?php echo $child['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/delete.png" alt="Löschen" title="Löschen" />
</a>
</td>
<td>
&nbsp;
</td>
<td>
<a href="<?php echo $this->base ?>/adminNavigation/edit/id/<?php echo $child['id'] ?>">
<img src="<?php echo $this->base ?>/img/leafs/change.png" alt="Ändern" title="Ändern" />
</a>
</td>
<td>
<a href="<?php echo Navigation::buildLink($this->base, $child, false); ?>">
<img src="<?php echo $this->base ?>/img/leafs/preview.png" alt="Vorschau" title="Vorschau" />
</a>
</td>
</tr>
<?php $i++; endforeach ?>
<?php $o++; endforeach ?>
</table>
<p>
<a href="<?php echo $this->base ?>/adminNavigation/edit">Neuen Hauptpunkt anlegen</a>
</p>
</div>

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>

View file

@ -0,0 +1,34 @@
<div id="admin">
<h3>Produkt-Bild hinzufügen</h3>
<form action="<?php echo $this->base ?>/adminUpload/process" method="post" enctype="multipart/form-data">
<input type="hidden" name="productId" value="<?php echo $this->_getParam('productId') ?>"/>
<dl>
<dt>
Produkt
</dt>
<dd>
<?php echo $this->item['name'] ?>
</dd>
</dl>
<dl>
<dt>
Klein
</dt>
<dd>
<input type="file" value="" name="small" size="32" />
</dd>
</dl>
<dl>
<dt>
Groß
</dt>
<dd>
<input type="file" value="" name="big" size="32" />
</dd>
</dl>
<p>
<input type="submit" value="Hochladen" />
</p>
</form>
</div>

View file

@ -0,0 +1,34 @@
<div id="admin">
<h3>Produkt-Bild hinzufügen</h3>
<form action="<?php echo $this->base ?>/adminUpload/process" method="post" enctype="multipart/form-data">
<input type="hidden" name="productId" value="<?php echo $this->_getParam('productId') ?>"/>
<dl>
<dt>
Produkt
</dt>
<dd>
<?php echo $this->item['name'] ?>
</dd>
</dl>
<dl>
<dt>
Klein
</dt>
<dd>
<input type="file" value="" name="small" size="32" />
</dd>
</dl>
<dl>
<dt>
Groß
</dt>
<dd>
<input type="file" value="" name="big" size="32" />
</dd>
</dl>
<p>
<input type="submit" value="Hochladen" />
</p>
</form>
</div>

View file

@ -0,0 +1,17 @@
<div id="admin">
<h3>Hochladen</h3>
<form action="<?php echo $this->base ?>/adminUpload/process" method="post" enctype="multipart/form-data">
<input type="hidden" name="productId" value="<?php echo $this->_getParam('productId') ?>"/>
<dl>
<dt>
Datei
</dt>
<dd>
<input type="file" value="" name="myfile" size="32"/>
</dd>
</dl>
<p>
<input type="submit" value="Hochladen" />
</p>
</form>
</div>

View file

@ -0,0 +1,4 @@
<h3>Fehler</h3>
<p>
<?php echo $this->message ?>
</p>

View file

@ -0,0 +1,15 @@
<html>
<head>
<title>Swiss Didgeridoo Artwork - Schweizer Holz Didgeridoo bester Qualit&auml;t</title>
<link rel="stylesheet" type="text/css" href="/style/main.css" />
<link rel="shortcut icon" href="/img/leafs/favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Description" content="Bei uns findest du alles rund ums Didgeridoo - Qualitäts Instrumente aus einheimischen Hölzern - Taschen - Mundstücke - Musik - Konzertkalender - Unterricht -Therapie - Clapstick - Trommel Reparaturen - Diverse Links" />
<meta name="keywords" content="Didgeridoo, Didjeridoo, Yidaki, Clapstick, Mundstück, Holzblasinstrument, Australisches Instrument, Didgeridoo Reparaturen, Didgeridoo Konzert, Trommel Reparaturen, Didgeridoo Unterricht, Zirkularatmung, Rhythmus Didgeridoo" />
</head>
<body id="index">
<a href="<?php echo $this->base ?>/page/home" title="Klick!" alt="Willkommensbild">
<img src="<?php echo $this->base ?>/img/leafs/index.png" />
</a>
</body>
</html>

View file

@ -0,0 +1,12 @@
<html>
<head>
<title>Swiss Didgeridoo Artwork</title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->base ?>/style/main.css" />
<link rel="shortcut icon" href="<?php echo $this->base ?>/img/leafs/favicon.ico" type="image/x-icon" />
</head>
<body id="index">
<a href="<?php echo $this->base ?>/page/home" title="Klick!" alt="Willkommensbild">
<img src="<?php echo $this->base ?>/img/leafs/index.png" />
</a>
</body>
</html>