Skip to content
Snippets Groups Projects
Commit 86ba5c6d authored by Tim Repke's avatar Tim Repke
Browse files

initial commit towards editable event information, few changes throughout admin panel

parent 2882991c
No related branches found
No related tags found
No related merge requests found
Showing
with 220 additions and 11 deletions
......@@ -31,6 +31,7 @@ if (isLoggedIn())
"Rundmail" => "mail",
"Notizen" => "notes",
"Listenexport" => "export",
"Infos" => "infos",
"Deadlink" => "dead"
);
......@@ -60,6 +61,8 @@ if (isLoggedIn())
page_notes(); break;
case "export":
page_export(); break;
case "infos":
page_infos(); break;
default:
page_404($page);
}
......
......@@ -40,6 +40,9 @@ function page_cost(){
function page_export(){
require_page("pages_export.php");
}
function page_infos(){
require_page("pages_infos.php");
}
function require_page($page){
if(!@file_exists($page) ) {
......
<?php
/**
* Created by PhpStorm.
* User: tim
* Date: 9/23/14
* Time: 11:14 AM
*/
global $text, $headers, $admin_db, $config_current_fahrt_id, $ajax, $config_reisearten, $config_reisearten_0, $config_studitypen_o, $config_admin_verbose_level, $config_verbose_level, $config_essen;
//$config_admin_verbose_level = 4;
//$config_verbose_level = 4;
$text .= "<h1>Informationen</h1>";
if(isset($_POST['note-content'])){
comm_admin_verbose(2,"received submit");
$cont = $_REQUEST['note-content'];
$admin_db->update("fahrten",array("beschreibung"=>$cont),array("fahrt_id"=>$config_current_fahrt_id));
}
$data = $admin_db->get("fahrten", ["beschreibung", "titel", "von", "bis", "ziel", "map_pin", "leiter", "kontakt", "regopen"], array("fahrt_id"=>$config_current_fahrt_id));
$headers .="<!-- wysihtml5 parser rules -->
<script src=\"../view/js/wysihtml5-0.3.0_rc2.min.js\"></script>
<!-- Library -->
<script src=\"../view/js/wysihtml5-advanced.js\"></script>
<script src=\"../view/js/jquery-1.11.1.min.js\"></script>
<script src=\"../view/js/jquery-ui.min.js\"></script>
<script type=\"text/javascript\" src='http://maps.google.com/maps/api/js?sensor=false&libraries=places'></script>
<script src=\"../view/js/locationpicker.jquery.js\"></script>
<link type='text/css' rel='stylesheet' href='../view/jquery-ui/jquery-ui.min.css' />
<!--link type='text/css' rel='stylesheet' href='../view/css/wysihtml5/editor.css' /-->
<link type='text/css' rel='stylesheet' href='../view/css/wysihtml5/stylesheet.css' />
<style type='text/css'>
body {
/*width: 810px;*/
min-height: 100%;
/*margin: 0 auto;*/
padding-top: 40px !important;
padding-left: 10px !important;
}
section{
position: relative;
top: inherit;
bottom: inherit;
width: inherit;
}
.formlist li{
margin: 15px 5px;
}
</style> ";
$text .= '
<section>
<form method="POST" style="height:300px;">
<div style="float:left">
<input type="submit" name="submit" value="submit" class="submit-button" />
<p></p>
<ul class="formlist">
<li><label>Titel</label>
<input type="text" name="titel" id="titel" value="'.$data["titel"].'" /></li>
<li><label>Ziel</label>
<input type="text" name="ziel" id="ziel" value="'.$data["ziel"].'" /></li>
<li><label>Von</label>
<input type="text" name="von" id="von" value="'.$data["von"].'" />
<label>Bis</label>
<input type="text" name="bis" id="bis" value="'.$data["bis"].'" /></li>
<li><label>Registrierung offen</label>
<input type="checkbox" name="titel" id="titel" value="'.$data["regopen"].'" /></li>
<li><label>Leiter</label>
<input type="text" name="leiter" id="leiter" value="'.$data["leiter"].'" /></li>
<li><label>E-Mail-Adresse</label>
<input type="text" name="kontakt" id="kontakt" value="'.$data["kontakt"].'" /></li>
</ul>
</div>
<div style="float:left">
<label>Map Pin</label>
Location: <input type="text" id="us2-address" style="width: 200px"/>
<div id="us2" style="width: 500px; height: 400px;"></div>
<input type="hidden" id="us2-lat" value="'.explode(" ",$data["map_pin"])[0].'" />
<input type="hidden" id="us2-lon" value="'.explode(" ",$data["map_pin"])[1].'" />
<script>
$(\'#us2\').locationpicker({
/*location: {latitude: 52.52, longitude: 13.38},*/
radius:0,
inputBinding: {
latitudeInput: $(\'#us2-lat\'),
longitudeInput: $(\'#us2-lon\'),
locationNameInput: $(\'#us2-address\')
}
});
$(function() {
$( "#von" ).datepicker( { dateFormat: "yy-mm-dd"} );
$( "#bis" ).datepicker( { dateFormat: "yy-mm-dd"} );
});
</script>
</div>
<div style="clear:both"></div>
<br />
<div id="wysihtml5-editor-toolbar">
<header>
<ul class="commands">
<li data-wysihtml5-command="bold" title="Make text bold (CTRL + B)" class="command"></li>
<li data-wysihtml5-command="italic" title="Make text italic (CTRL + I)" class="command"></li>
<li data-wysihtml5-command="insertUnorderedList" title="Insert an unordered list" class="command"></li>
<li data-wysihtml5-command="insertOrderedList" title="Insert an ordered list" class="command"></li>
<li data-wysihtml5-command="createLink" title="Insert a link" class="command"></li>
<li data-wysihtml5-command="insertImage" title="Insert an image" class="command"></li>
<li data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h1" title="Insert headline 1" class="command"></li>
<li data-wysihtml5-command="formatBlock" data-wysihtml5-command-value="h2" title="Insert headline 2" class="command"></li>
<li data-wysihtml5-command-group="foreColor" class="fore-color" title="Color the selected text" class="command">
<ul>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="silver"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="gray"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="maroon"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="red"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="purple"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="green"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="olive"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="navy"></li>
<li data-wysihtml5-command="foreColor" data-wysihtml5-command-value="blue"></li>
</ul>
</li>
<li data-wysihtml5-command="insertSpeech" title="Insert speech" class="command"></li>
<li data-wysihtml5-action="change_view" title="Show HTML" class="action"></li>
</ul>
</header>
<div data-wysihtml5-dialog="createLink" style="display: none;">
<label>
Link:
<input data-wysihtml5-dialog-field="href" value="http://">
</label>
<a data-wysihtml5-dialog-action="save">OK</a>&nbsp;<a data-wysihtml5-dialog-action="cancel">Cancel</a>
</div>
<div data-wysihtml5-dialog="insertImage" style="display: none;">
<label>
Image:
<input data-wysihtml5-dialog-field="src" value="http://">
</label>
<a data-wysihtml5-dialog-action="save">OK</a>&nbsp;<a data-wysihtml5-dialog-action="cancel">Cancel</a>
</div>
</div>
<textarea name="note-content" id="wysihtml5-editor" spellcheck="false" wrap="off" placeholder="Enter your text ...">'.$data["beschreibung"].'</textarea>
</form>
</section>
<script>
var editor = new wysihtml5.Editor("wysihtml5-editor", {
toolbar: "wysihtml5-editor-toolbar",
stylesheets: ["../view/css/wysihtml5/editor.css"],
parserRules: wysihtml5ParserRules
});
editor.on("load", function() {
var composer = editor.composer,
h1 = editor.composer.element.querySelector("h1");
if (h1) {
composer.selection.selectNode(h1);
}
});
</script>';
\ No newline at end of file
......@@ -23,7 +23,16 @@ $headers .="<!-- wysihtml5 parser rules -->
<script src=\"../view/js/wysihtml5-advanced.js\"></script>
<link type='text/css' rel='stylesheet' href='../view/css/wysihtml5/editor.css' />
<link type='text/css' rel='stylesheet' href='../view/css/wysihtml5/stylesheet.css' />";
<link type='text/css' rel='stylesheet' href='../view/css/wysihtml5/stylesheet.css' />
<style type='text/css'>
body {
/*width: 810px;*/
min-height: 100%;
/*margin: 0 auto;*/
padding-top: 40px !important;
padding-left: 10px !important;
}
</style>";
$text .= '
<div id="wysihtml5-editor-toolbar">
......@@ -71,7 +80,7 @@ $text .= '
</div>
</div>
<section><form method="POST" style="height:100%"> <input type="submit" name="submit" value="submit" /><textarea name="note-content" id="wysihtml5-editor" spellcheck="false" wrap="off" placeholder="Enter your text ...">'.$content.'</textarea></form></section>
<section><form method="POST" style="height:100%"> <input type="submit" name="submit" value="submit" class="submit-button" /><textarea name="note-content" id="wysihtml5-editor" spellcheck="false" wrap="off" placeholder="Enter your text ...">'.$content.'</textarea></form></section>
<script>
var editor = new wysihtml5.Editor("wysihtml5-editor", {
......
......@@ -56,6 +56,12 @@ $config_reisearten_destroyed = array(
"mit Schlauchboot"
);
$config_superadmins = array(
// username => password
"tim_sa" => '{SHA-256}8013a101f26fd8dcc8c40d0eb1dcb513$c3a97d44e67564ed79a60fa0de6ea4193bb18932a8d08b5e8d664bd14b32a4f5', // broetchen
"manu_sa" => '{SHA-256}12c9b021c42741545f9f01e2afd67aa2$7112be28c0c11f987de4401798a2ba041e518bb3f22bcb8cf4f3bf3f590b65b9' // mepmepmep
);
$config_admins = array(
// username => password
"george" => "peter",
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}
/* wysihtml stuff */
html {
/*html {
overflow: hidden;
background: url(../../graphics/bg_pattern_r1.png);
height: 100%;
......@@ -18,7 +18,7 @@ body {
body, textarea, input {
font-family: Helvetica, Arial, Verdana;
}
}*/
strong {
font-weight: bold;
......@@ -311,4 +311,37 @@ a.fork {
top: 0;
right: 0;
border: 0;
}
.submit-button {
border-top: 1px solid #96d1f8;
background: #db7878;
background: -webkit-gradient(linear, left top, left bottom, from(#b00000), to(#db7878));
background: -webkit-linear-gradient(top, #b00000, #db7878);
background: -moz-linear-gradient(top, #b00000, #db7878);
background: -ms-linear-gradient(top, #b00000, #db7878);
background: -o-linear-gradient(top, #b00000, #db7878);
padding: 10px 20px;
-webkit-border-radius: 39px;
-moz-border-radius: 39px;
border-radius: 39px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Helvetica, Arial, Sans-Serif;
text-decoration: none;
vertical-align: middle;
margin:20px;
}
.submit-button:hover {
border-top-color: #5eff00;
background: #5eff00;
color: #ccc;
}
.submit-button:active {
border-top-color: #1b435e;
background: #1b435e;
}
\ No newline at end of file
registration-system/view/graphics/jqueryui.png

6.84 KiB

registration-system/view/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png

212 B

registration-system/view/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png

208 B

registration-system/view/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png

335 B

registration-system/view/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png

207 B

registration-system/view/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png

262 B

registration-system/view/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png

262 B

registration-system/view/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png

332 B

registration-system/view/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png

280 B

registration-system/view/jquery-ui/images/ui-icons_222222_256x240.png

6.76 KiB

registration-system/view/jquery-ui/images/ui-icons_2e83ff_256x240.png

4.44 KiB

registration-system/view/jquery-ui/images/ui-icons_454545_256x240.png

6.83 KiB

registration-system/view/jquery-ui/images/ui-icons_888888_256x240.png

6.83 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment