update auf neuen codeigniter
benutzerverwaltung hinzugefügt sync scheduled implementiert
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Disable directory browsing
|
||||
Options All -Indexes
|
||||
Options -Indexes
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Rewrite engine
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
// Check PHP version.
|
||||
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* CHECK PHP VERSION
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$minPhpVersion = '8.1'; // If you update this, don't forget to update `spark`.
|
||||
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
|
||||
$message = sprintf(
|
||||
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
|
||||
@@ -9,14 +14,25 @@ if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
|
||||
PHP_VERSION
|
||||
);
|
||||
|
||||
exit($message);
|
||||
header('HTTP/1.1 503 Service Unavailable.', true, 503);
|
||||
echo $message;
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* SET THE CURRENT DIRECTORY
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Path to the front controller (this file)
|
||||
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
|
||||
|
||||
// Ensure the current directory is pointing to the front controller's directory
|
||||
chdir(FCPATH);
|
||||
if (getcwd() . DIRECTORY_SEPARATOR !== FCPATH) {
|
||||
chdir(FCPATH);
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
@@ -27,41 +43,14 @@ chdir(FCPATH);
|
||||
* and fires up an environment-specific bootstrapping.
|
||||
*/
|
||||
|
||||
// Load our paths config file
|
||||
// LOAD OUR PATHS CONFIG FILE
|
||||
// This is the line that might need to be changed, depending on your folder structure.
|
||||
require FCPATH . '../app/Config/Paths.php';
|
||||
// ^^^ Change this line if you move your application folder
|
||||
|
||||
$paths = new Config\Paths();
|
||||
|
||||
// Location of the framework bootstrap file.
|
||||
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
|
||||
// LOAD THE FRAMEWORK BOOTSTRAP FILE
|
||||
require $paths->systemDirectory . '/Boot.php';
|
||||
|
||||
// Load environment settings from .env files into $_SERVER and $_ENV
|
||||
require_once SYSTEMPATH . 'Config/DotEnv.php';
|
||||
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------
|
||||
* GRAB OUR CODEIGNITER INSTANCE
|
||||
* ---------------------------------------------------------------
|
||||
*
|
||||
* The CodeIgniter class contains the core functionality to make
|
||||
* the application run, and does all of the dirty work to get
|
||||
* the pieces all working together.
|
||||
*/
|
||||
|
||||
$app = Config\Services::codeigniter();
|
||||
$app->initialize();
|
||||
$context = is_cli() ? 'php-cli' : 'web';
|
||||
$app->setContext($context);
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* LAUNCH THE APPLICATION
|
||||
*---------------------------------------------------------------
|
||||
* Now that everything is setup, it's time to actually fire
|
||||
* up the engines and make this app do its thang.
|
||||
*/
|
||||
|
||||
$app->run();
|
||||
exit(CodeIgniter\Boot::bootWeb($paths));
|
||||
|
||||
@@ -10,11 +10,22 @@ $(document).ready(function(){
|
||||
info:false,
|
||||
order: [[ 1, 'asc' ]],
|
||||
ajax: {url: '/Ajax/getScheduledData',dataSrc:''},
|
||||
dom: '<"toolbar">frt',
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Neue Rechnung',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newScheduled';
|
||||
}},
|
||||
{text:'Neuer Transfer',className:'btn-sm mx-2',action: function ( e, dt, node, config ) {
|
||||
location.href = '/newScheduledTransfer';
|
||||
}},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
},
|
||||
columns: columnspez
|
||||
});
|
||||
$("div.toolbar").html('<a class="btn-sm btn-secondary" href="/newScheduled" role="button">Neue Rechnung</a><a class="btn-sm btn-secondary" href="/newScheduledTransfer" role="button">Neuer Transfer</a>');
|
||||
|
||||
|
||||
$('#scheduled tbody').on('click', 'td.dt-receiver', function () {collapseDetails($(this), datatable);} );
|
||||
$('#scheduled tbody').on('click', 'td.dt-datum', function () {location.href = '/editScheduled/'+getId($(this),datatable);});
|
||||
$('#scheduled tbody').on('click', 'table.tabdet', function () {location.href = '/editScheduled/'+$(this).attr('data-bs-id');});
|
||||
|
||||
@@ -1,6 +1,33 @@
|
||||
var datatable;
|
||||
var todos;
|
||||
|
||||
function syncScheduled(){
|
||||
$('#mySnycModal').modal('show');
|
||||
$('#mySnycModal').find('.modal-title').html("Synchronisierte Einträge!");
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/syncScheduled/",
|
||||
data: {}, // serializes the form's elements.
|
||||
success: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalText.innerHTML = data;
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
},
|
||||
error: function(data){
|
||||
const myModale = document.querySelector('#mySnycModal');
|
||||
var modalText = myModale.querySelector('.modal-body');
|
||||
var modalFenster = myModale.querySelector('.modal-dialog');
|
||||
modalFenster.classList.add("alert");
|
||||
modalFenster.classList.add("alert-danger");
|
||||
modalText.textContent = 'Fehler bei der Ausführung!';
|
||||
$('#todos').DataTable().ajax.reload();
|
||||
}
|
||||
});
|
||||
// location.href = '/syncScheduled/';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
datatable = $('#bookings').DataTable({
|
||||
paging: false,
|
||||
@@ -38,9 +65,7 @@ $(document).ready(function(){
|
||||
layout: {
|
||||
topStart: {
|
||||
buttons: [
|
||||
{text:'Sync',className:'btn-sm',action: function ( e, dt, node, config ) {
|
||||
location.href = '/syncScheduled/';
|
||||
}},
|
||||
{text:'Sync',className:'btn-sm',action: syncScheduled},
|
||||
]
|
||||
},
|
||||
topEnd: 'search'
|
||||
|
||||
Reference in New Issue
Block a user