YaWK  24.1
Yet another WebKit
tourdates-new.php
Go to the documentation of this file.
1 <!-- bootstrap date-timepicker -->
2 <link type="text/css" href="../system/engines/datetimepicker/css/datetimepicker.min.css" rel="stylesheet"/>
3 <script type="text/javascript" src="../system/engines/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
4 <!-- init datetimepicker -->
5 <script type="text/javascript">
6  $(document).ready(function () {
7  $('#datetimepicker1').datetimepicker({
8  format: 'yyyy-mm-dd hh:ii'
9  });
10  });//]]> /* END document.ready */
11 </script>
12 <?php
13 // check if language is set
14 if (!isset($language) || (!isset($lang)))
15 { // inject (add) language tags to core $lang array
16  $lang = \YAWK\language::inject(@$lang, "../system/plugins/tourdates/language/");
17 }
18 
19 include '../system/plugins/tourdates/classes/tourdates.php';
20 
21 /* if form is sent... */
22 if (isset($_POST['date'])) {
23  $tourdates = new \YAWK\PLUGINS\TOURDATES\tourdates();
24  $tourdates->date = filter_input(INPUT_POST, 'date');
25  $tourdates->band = filter_input(INPUT_POST, 'band');
26  $tourdates->venue = filter_input(INPUT_POST, 'venue');
27  $tourdates->fburl = filter_input(INPUT_POST, 'fburl');
28 
29  if (!$res = $tourdates->create($db, $tourdates->date, $tourdates->band, $tourdates->venue, $tourdates->fburl))
30  { // q failed
31  print \YAWK\alert::draw("danger", "Error", "Could not add event. Maybe there is a database error. We're sorry!", "plugin=tourdates","4200");
32  exit;
33  }
34  else
35  { //
36  \YAWK\backend::setTimeout("index.php?plugin=tourdates", 0);
37  }
38 }
39 
40 
41 // TEMPLATE WRAPPER - HEADER & breadcrumbs
42 echo "
43  <!-- Content Wrapper. Contains page content -->
44  <div class=\"content-wrapper\" id=\"content-FX\">
45  <!-- Content Header (Page header) -->
46  <section class=\"content-header\">";
47 /* draw Title on top */
48 echo \YAWK\backend::getTitle($lang['TOUR_DATES'], $lang['TOUR_DATES_ADD']);
49 echo"<ol class=\"breadcrumb\">
50  <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
51  <li><a href=\"index.php?page=plugins\" title=\"$lang[PLUGINS]\"> $lang[PLUGINS]</a></li>
52  <li><a href=\"index.php?plugin=tourdates\" title=\"$lang[TOUR_DATES]\"> $lang[TOUR_DATES]</a></li>
53  <li class=\"active\"><a href=\"index.php?plugin=tourdates&pluginpage=tourdates-new\" title=\"$lang[ADD]\"> $lang[ADD]</a></li>
54  </ol>
55  </section>
56  <!-- Main content -->
57  <section class=\"content\">";
58 /* page content start here */
59 ?>
60 
61 <div class="box box-default">
62  <div class="box-body">
63 
64  <!-- FORM -->
65  <form role="form" class="form" action="index.php?plugin=tourdates&pluginpage=tourdates-new&addgig=1" method="post">
66  <!-- PUBLISH DATE -->
67  <label for="datetimepicker1"><?php print $lang['DATE']; ?>:&nbsp;
68  <input class="form-control" id="datetimepicker1" data-date-format="yyyy-mm-dd hh:mm:ss" type="text"
69  name="date" maxlength="19">
70  </label>
71  <!-- BAND -->
72  <label for="band"><?php print $lang['TOUR_BAND']; ?>&nbsp;
73  <input type="text" id="band" size="28" name="band" class="form-control" maxlength="128"
74  placeholder="<?php print $lang['TOUR_BAND_INPUT']; ?>"/>
75  </label>
76  <!-- VENUE -->
77  <label for="venue"><?php print $lang['TOUR_VENUE']; ?>&nbsp;
78  <input type="text" id="venue" size="28" name="venue" class="form-control" maxlength="128"
79  placeholder="<?php print $lang['TOUR_VENUE_INPUT']; ?>"/>
80  </label>
81  <!-- FB LINK -->
82  <label for="fburl"><?php print $lang['TOUR_FBLINK']; ?>&nbsp;
83  <input type="text" id="fblink" size="28" name="fburl" class="form-control" maxlength="255"
84  placeholder="<?php print $lang['TOUR_FBLINK']; ?>"/>
85  </label>
86  <!-- SUBMIT BUTTON -->
87  <input type="submit" class="btn btn-success" value="<?php print $lang['TOUR_DATES_ADD']; ?>"/>
88  </form>
89  </div>
90 </div>
$tourdates
Definition: tourdates.php:80
static setTimeout($location, $wait)
Definition: backend.php:106
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
Definition: language.php:439
type
Definition: menu-new.php:35
exit
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp
$template name
print $tourdates date
print $lang['DATE']
document ready(function() { $('a[data-confirm]').click(function(ev) { modal='#dataConfirmModal';var href=$(this).attr('href');var title=$(this).attr('title');var icon=$(this).attr('data-icon');if(!icon) { icon='fa fa-trash-o';} if(!$(modal).length) { $('body').append('< div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">< div class="modal-dialog">< div class="modal-content">< div class="modal-header">< button type="button" class="close" data-dismiss="modal" aria-hidden="true">< i class="fa fa-times"></i ></button >< br >< div class="col-md-1">< h3 class="modal-title">< i class="'+icon+'"></i ></h3 ></div >< div class="col-md-11">< h3 class="modal-title" id="dataConfirmLabel">'+title+'</h3 ></div ></h3 ></div >< div class="modal-body"></div >< div class="modal-footer">< button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Abbrechen</button >< a type="button" class="btn btn-danger" id="dataConfirmOK">< i class="'+icon+'"></i > L &ouml;schen</a ></div ></div ></div ></div >');} $(modal).find('.modal-body').text($(this).attr('data-confirm'));$('#dataConfirmOK').attr('href', href);$(modal).modal({show:true});return false;});$('#terminateUser').click(function() { var terminate=window.confirm("ACHTUNG!\nDas wird Deinen Account permanent deaktivieren.\n"+"Bist Du Dir sicher, dass Du das tun willst?");if(terminate===true) { var terminateUser=window.confirm("Bist Du Dir wirklich ganz sicher?\n"+"Diese Aktion kann nicht rueckgaengig gemacht werden.");if(terminateUser===true) { $.get('system/templates/YaWK-bootstrap3/js/terminate-user.php', function(data) { if(data==="true") { setTimeout("window.location='logout.html'", 0);} else { alert("Fehler: "+data);} });} } });function dismissNotifications() { $.ajax({ url:'js/dismiss-notifications.php', type:'POST', success:function(data) { if(!data) { alert('Something went wrong!');return false;} } });$("#bell-label").fadeOut();$('#notification-header').html('You have 0 notifications');$('#notification-menu').fadeOut();} $("#dismiss").click(function() { dismissNotifications();});function disableButtons(delay) { $('#loginButton').removeClass().addClass('btn btn-success disabled').attr('id', 'LOGIN_FORBIDDEN');$('#resetPasswordButton').removeClass().addClass('btn btn-danger disabled');setTimeout(function() { $('#LOGIN_FORBIDDEN').attr('id', 'loginButton').removeClass().addClass('btn btn-success');$('#resetPasswordButton').removeClass().addClass('btn btn-danger');}, delay);} $("#loginButton").click(function(){ if($('#loginButton').length > 0) { if($('#loginButton').hasClass('btn') &&$('#loginButton').hasClass('btn-success') &&$('#loginButton').hasClass('disabled')) { } else { $("#loginForm").submit();disableButtons(10000);} } else if($('#LOGIN_FORBIDDEN').length > 0) { if($('#LOGIN_FORBIDDEN').hasClass('btn') &&$('#LOGIN_FORBIDDEN').hasClass('btn-success') &&$('#LOGIN_FORBIDDEN').hasClass('disabled')) { } else { } } });$("#blockedBtn").hover(function() { $("#blockedBtn").hide();$("#askBtn").fadeIn(820);});})