second commit
This commit is contained in:
parent
efac1fdd79
commit
2cbb2c6a83
|
@ -0,0 +1,143 @@
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Example Environment Configuration file
|
||||||
|
#
|
||||||
|
# This file can be used as a starting point for your own
|
||||||
|
# custom .env files, and contains most of the possible settings
|
||||||
|
# available in a default install.
|
||||||
|
#
|
||||||
|
# By default, all of the settings are commented out. If you want
|
||||||
|
# to override the setting, you must un-comment it by removing the '#'
|
||||||
|
# at the beginning of the line.
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# ENVIRONMENT
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
CI_ENVIRONMENT = production
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# APP
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
app.baseURL = 'http://localhost/Project/public/'
|
||||||
|
# If you have trouble with `.`, you could also use `_`.
|
||||||
|
# app_baseURL = ''
|
||||||
|
# app.forceGlobalSecureRequests = false
|
||||||
|
# app.CSPEnabled = false
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# DATABASE
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
database.default.hostname = localhost
|
||||||
|
database.default.database = tugas_akhir
|
||||||
|
database.default.username = root
|
||||||
|
database.default.password =
|
||||||
|
database.default.DBDriver = MySQLi
|
||||||
|
database.default.DBPrefix =
|
||||||
|
database.default.port = 3306
|
||||||
|
|
||||||
|
# database.tests.hostname = localhost
|
||||||
|
# database.tests.database = ci4_test
|
||||||
|
# database.tests.username = root
|
||||||
|
# database.tests.password = root
|
||||||
|
# database.tests.DBDriver = MySQLi
|
||||||
|
# database.tests.DBPrefix =
|
||||||
|
# database.tests.port = 3306
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# CONTENT SECURITY POLICY
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# contentsecuritypolicy.reportOnly = false
|
||||||
|
# contentsecuritypolicy.defaultSrc = 'none'
|
||||||
|
# contentsecuritypolicy.scriptSrc = 'self'
|
||||||
|
# contentsecuritypolicy.styleSrc = 'self'
|
||||||
|
# contentsecuritypolicy.imageSrc = 'self'
|
||||||
|
# contentsecuritypolicy.baseURI = null
|
||||||
|
# contentsecuritypolicy.childSrc = null
|
||||||
|
# contentsecuritypolicy.connectSrc = 'self'
|
||||||
|
# contentsecuritypolicy.fontSrc = null
|
||||||
|
# contentsecuritypolicy.formAction = null
|
||||||
|
# contentsecuritypolicy.frameAncestors = null
|
||||||
|
# contentsecuritypolicy.frameSrc = null
|
||||||
|
# contentsecuritypolicy.mediaSrc = null
|
||||||
|
# contentsecuritypolicy.objectSrc = null
|
||||||
|
# contentsecuritypolicy.pluginTypes = null
|
||||||
|
# contentsecuritypolicy.reportURI = null
|
||||||
|
# contentsecuritypolicy.sandbox = false
|
||||||
|
# contentsecuritypolicy.upgradeInsecureRequests = false
|
||||||
|
# contentsecuritypolicy.styleNonceTag = '{csp-style-nonce}'
|
||||||
|
# contentsecuritypolicy.scriptNonceTag = '{csp-script-nonce}'
|
||||||
|
# contentsecuritypolicy.autoNonce = true
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# COOKIE
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# cookie.prefix = ''
|
||||||
|
# cookie.expires = 0
|
||||||
|
# cookie.path = '/'
|
||||||
|
# cookie.domain = ''
|
||||||
|
# cookie.secure = false
|
||||||
|
# cookie.httponly = false
|
||||||
|
# cookie.samesite = 'Lax'
|
||||||
|
# cookie.raw = false
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# ENCRYPTION
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# encryption.key =
|
||||||
|
# encryption.driver = OpenSSL
|
||||||
|
# encryption.blockSize = 16
|
||||||
|
# encryption.digest = SHA512
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# HONEYPOT
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# honeypot.hidden = 'true'
|
||||||
|
# honeypot.label = 'Fill This Field'
|
||||||
|
# honeypot.name = 'honeypot'
|
||||||
|
# honeypot.template = '<label>{label}</label><input type="text" name="{name}" value=""/>'
|
||||||
|
# honeypot.container = '<div style="display:none">{template}</div>'
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# SECURITY
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# security.csrfProtection = 'cookie'
|
||||||
|
# security.tokenRandomize = false
|
||||||
|
# security.tokenName = 'csrf_token_name'
|
||||||
|
# security.headerName = 'X-CSRF-TOKEN'
|
||||||
|
# security.cookieName = 'csrf_cookie_name'
|
||||||
|
# security.expires = 7200
|
||||||
|
# security.regenerate = true
|
||||||
|
# security.redirect = false
|
||||||
|
# security.samesite = 'Lax'
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# SESSION
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
|
||||||
|
# session.cookieName = 'ci_session'
|
||||||
|
# session.expiration = 7200
|
||||||
|
# session.savePath = null
|
||||||
|
# session.matchIP = false
|
||||||
|
# session.timeToUpdate = 300
|
||||||
|
# session.regenerateDestroy = false
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# LOGGER
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# logger.threshold = 4
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# CURLRequest
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
# curlrequest.shareOptions = false
|
|
@ -0,0 +1,22 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014-2019 British Columbia Institute of Technology
|
||||||
|
Copyright (c) 2019-2023 CodeIgniter Foundation
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
|
@ -0,0 +1,6 @@
|
||||||
|
<IfModule authz_core_module>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !authz_core_module>
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The goal of this file is to allow developers a location
|
||||||
|
* where they can overwrite core procedural functions and
|
||||||
|
* replace them with their own. This file is loaded during
|
||||||
|
* the bootstrap process and is called during the framework's
|
||||||
|
* execution.
|
||||||
|
*
|
||||||
|
* This can be looked at as a `master helper` file that is
|
||||||
|
* loaded early on, and may also contain additional functions
|
||||||
|
* that you'd like to use throughout your entire application
|
||||||
|
*
|
||||||
|
* @see: https://codeigniter.com/user_guide/extending/common.html
|
||||||
|
*/
|
|
@ -0,0 +1,177 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class App extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Base Site URL
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* URL to your CodeIgniter root. Typically, this will be your base URL,
|
||||||
|
* WITH a trailing slash:
|
||||||
|
*
|
||||||
|
* http://example.com/
|
||||||
|
*/
|
||||||
|
public string $baseURL = 'http://localhost/Project/public/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
|
||||||
|
* If you want to accept multiple Hostnames, set this.
|
||||||
|
*
|
||||||
|
* E.g. When your site URL ($baseURL) is 'http://example.com/', and your site
|
||||||
|
* also accepts 'http://media.example.com/' and
|
||||||
|
* 'http://accounts.example.com/':
|
||||||
|
* ['media.example.com', 'accounts.example.com']
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
public array $allowedHostnames = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Index File
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Typically this will be your index.php file, unless you've renamed it to
|
||||||
|
* something else. If you are using mod_rewrite to remove the page set this
|
||||||
|
* variable so that it is blank.
|
||||||
|
*/
|
||||||
|
public string $indexPage = 'index.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* URI PROTOCOL
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This item determines which server global should be used to retrieve the
|
||||||
|
* URI string. The default setting of 'REQUEST_URI' works for most servers.
|
||||||
|
* If your links do not seem to work, try one of the other delicious flavors:
|
||||||
|
*
|
||||||
|
* 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
|
||||||
|
* 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
|
||||||
|
* 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
||||||
|
*
|
||||||
|
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||||
|
*/
|
||||||
|
public string $uriProtocol = 'REQUEST_URI';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Default Locale
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The Locale roughly represents the language and location that your visitor
|
||||||
|
* is viewing the site from. It affects the language strings and other
|
||||||
|
* strings (like currency markers, numbers, etc), that your program
|
||||||
|
* should run under for this request.
|
||||||
|
*/
|
||||||
|
public string $defaultLocale = 'en';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Negotiate Locale
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If true, the current Request object will automatically determine the
|
||||||
|
* language to use based on the value of the Accept-Language header.
|
||||||
|
*
|
||||||
|
* If false, no automatic detection will be performed.
|
||||||
|
*/
|
||||||
|
public bool $negotiateLocale = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Supported Locales
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If $negotiateLocale is true, this array lists the locales supported
|
||||||
|
* by the application in descending order of priority. If no match is
|
||||||
|
* found, the first locale will be used.
|
||||||
|
*
|
||||||
|
* IncomingRequest::setLocale() also uses this list.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public array $supportedLocales = ['en'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Application Timezone
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The default timezone that will be used in your application to display
|
||||||
|
* dates with the date helper, and can be retrieved through app_timezone()
|
||||||
|
*
|
||||||
|
* @see https://www.php.net/manual/en/timezones.php for list of timezones supported by PHP.
|
||||||
|
*/
|
||||||
|
public string $appTimezone = 'UTC';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Default Character Set
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This determines which character set is used by default in various methods
|
||||||
|
* that require a character set to be provided.
|
||||||
|
*
|
||||||
|
* @see http://php.net/htmlspecialchars for a list of supported charsets.
|
||||||
|
*/
|
||||||
|
public string $charset = 'UTF-8';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Force Global Secure Requests
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If true, this will force every request made to this application to be
|
||||||
|
* made via a secure connection (HTTPS). If the incoming request is not
|
||||||
|
* secure, the user will be redirected to a secure version of the page
|
||||||
|
* and the HTTP Strict Transport Security header will be set.
|
||||||
|
*/
|
||||||
|
public bool $forceGlobalSecureRequests = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Reverse Proxy IPs
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If your server is behind a reverse proxy, you must whitelist the proxy
|
||||||
|
* IP addresses from which CodeIgniter should trust headers such as
|
||||||
|
* X-Forwarded-For or Client-IP in order to properly identify
|
||||||
|
* the visitor's IP address.
|
||||||
|
*
|
||||||
|
* You need to set a proxy IP address or IP address with subnets and
|
||||||
|
* the HTTP header for the client IP address.
|
||||||
|
*
|
||||||
|
* Here are some examples:
|
||||||
|
* [
|
||||||
|
* '10.0.1.200' => 'X-Forwarded-For',
|
||||||
|
* '192.168.5.0/24' => 'X-Real-IP',
|
||||||
|
* ]
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $proxyIPs = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Content Security Policy
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Enables the Response's Content Secure Policy to restrict the sources that
|
||||||
|
* can be used for images, scripts, CSS files, audio, video, etc. If enabled,
|
||||||
|
* the Response object will populate default values for the policy from the
|
||||||
|
* `ContentSecurityPolicy.php` file. Controllers can always add to those
|
||||||
|
* restrictions at run time.
|
||||||
|
*
|
||||||
|
* For a better understanding of CSP, see these documents:
|
||||||
|
*
|
||||||
|
* @see http://www.html5rocks.com/en/tutorials/security/content-security-policy/
|
||||||
|
* @see http://www.w3.org/TR/CSP/
|
||||||
|
*/
|
||||||
|
public bool $CSPEnabled = false;
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\AutoloadConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* AUTOLOADER CONFIGURATION
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file defines the namespaces and class maps so the Autoloader
|
||||||
|
* can find the files as needed.
|
||||||
|
*
|
||||||
|
* NOTE: If you use an identical key in $psr4 or $classmap, then
|
||||||
|
* the values in this file will overwrite the framework's values.
|
||||||
|
*
|
||||||
|
* NOTE: This class is required prior to Autoloader instantiation,
|
||||||
|
* and does not extend BaseConfig.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class Autoload extends AutoloadConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Namespaces
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* This maps the locations of any namespaces in your application to
|
||||||
|
* their location on the file system. These are used by the autoloader
|
||||||
|
* to locate files the first time they have been instantiated.
|
||||||
|
*
|
||||||
|
* The '/app' and '/system' directories are already mapped for you.
|
||||||
|
* you may change the name of the 'App' namespace if you wish,
|
||||||
|
* but this should be done prior to creating any namespaced classes,
|
||||||
|
* else you will need to modify all of those classes for this to work.
|
||||||
|
*
|
||||||
|
* Prototype:
|
||||||
|
* $psr4 = [
|
||||||
|
* 'CodeIgniter' => SYSTEMPATH,
|
||||||
|
* 'App' => APPPATH
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @var array<string, list<string>|string>
|
||||||
|
*/
|
||||||
|
public $psr4 = [
|
||||||
|
APP_NAMESPACE => APPPATH, // For custom app namespace
|
||||||
|
'Config' => APPPATH . 'Config',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Class Map
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* The class map provides a map of class names and their exact
|
||||||
|
* location on the drive. Classes loaded in this manner will have
|
||||||
|
* slightly faster performance because they will not have to be
|
||||||
|
* searched for within one or more directories as they would if they
|
||||||
|
* were being autoloaded through a namespace.
|
||||||
|
*
|
||||||
|
* Prototype:
|
||||||
|
* $classmap = [
|
||||||
|
* 'MyClass' => '/path/to/class/file.php'
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public $classmap = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Files
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* The files array provides a list of paths to __non-class__ files
|
||||||
|
* that will be autoloaded. This can be useful for bootstrap operations
|
||||||
|
* or for loading functions.
|
||||||
|
*
|
||||||
|
* Prototype:
|
||||||
|
* $files = [
|
||||||
|
* '/path/to/my/file.php',
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
public $files = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Helpers
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Prototype:
|
||||||
|
* $helpers = [
|
||||||
|
* 'form',
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
public $helpers = [];
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| ERROR DISPLAY
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| In development, we want to show as many errors as possible to help
|
||||||
|
| make sure they don't make it to production. And save us hours of
|
||||||
|
| painful debugging.
|
||||||
|
|
|
||||||
|
| If you set 'display_errors' to '1', CI4's detailed error report will show.
|
||||||
|
*/
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DEBUG BACKTRACES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| If true, this constant will tell the error screens to display debug
|
||||||
|
| backtraces along with the other error information. If you would
|
||||||
|
| prefer to not see this, set this value to false.
|
||||||
|
*/
|
||||||
|
defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DEBUG MODE
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Debug mode is an experimental flag that can allow changes throughout
|
||||||
|
| the system. This will control whether Kint is loaded, and a few other
|
||||||
|
| items. It can always be used within your own application too.
|
||||||
|
*/
|
||||||
|
defined('CI_DEBUG') || define('CI_DEBUG', true);
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| ERROR DISPLAY
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Don't show ANY in production environments. Instead, let the system catch
|
||||||
|
| it and display a generic error message.
|
||||||
|
|
|
||||||
|
| If you set 'display_errors' to '1', CI4's detailed error report will show.
|
||||||
|
*/
|
||||||
|
ini_set('display_errors', '0');
|
||||||
|
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DEBUG MODE
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Debug mode is an experimental flag that can allow changes throughout
|
||||||
|
| the system. It's not widely used currently, and may not survive
|
||||||
|
| release of the framework.
|
||||||
|
*/
|
||||||
|
defined('CI_DEBUG') || define('CI_DEBUG', false);
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The environment testing is reserved for PHPUnit testing. It has special
|
||||||
|
* conditions built into the framework at various places to assist with that.
|
||||||
|
* You can’t use it for your development.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| ERROR DISPLAY
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| In development, we want to show as many errors as possible to help
|
||||||
|
| make sure they don't make it to production. And save us hours of
|
||||||
|
| painful debugging.
|
||||||
|
*/
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DEBUG BACKTRACES
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| If true, this constant will tell the error screens to display debug
|
||||||
|
| backtraces along with the other error information. If you would
|
||||||
|
| prefer to not see this, set this value to false.
|
||||||
|
*/
|
||||||
|
defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DEBUG MODE
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Debug mode is an experimental flag that can allow changes throughout
|
||||||
|
| the system. It's not widely used currently, and may not survive
|
||||||
|
| release of the framework.
|
||||||
|
*/
|
||||||
|
defined('CI_DEBUG') || define('CI_DEBUG', true);
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class CURLRequest extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CURLRequest Share Options
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Whether share options between requests or not.
|
||||||
|
*
|
||||||
|
* If true, all the options won't be reset between requests.
|
||||||
|
* It may cause an error request with unnecessary headers.
|
||||||
|
*/
|
||||||
|
public bool $shareOptions = false;
|
||||||
|
}
|
|
@ -0,0 +1,171 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Cache\CacheInterface;
|
||||||
|
use CodeIgniter\Cache\Handlers\DummyHandler;
|
||||||
|
use CodeIgniter\Cache\Handlers\FileHandler;
|
||||||
|
use CodeIgniter\Cache\Handlers\MemcachedHandler;
|
||||||
|
use CodeIgniter\Cache\Handlers\PredisHandler;
|
||||||
|
use CodeIgniter\Cache\Handlers\RedisHandler;
|
||||||
|
use CodeIgniter\Cache\Handlers\WincacheHandler;
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Cache extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Primary Handler
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The name of the preferred handler that should be used. If for some reason
|
||||||
|
* it is not available, the $backupHandler will be used in its place.
|
||||||
|
*/
|
||||||
|
public string $handler = 'file';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Backup Handler
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The name of the handler that will be used in case the first one is
|
||||||
|
* unreachable. Often, 'file' is used here since the filesystem is
|
||||||
|
* always available, though that's not always practical for the app.
|
||||||
|
*/
|
||||||
|
public string $backupHandler = 'dummy';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cache Directory Path
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The path to where cache files should be stored, if using a file-based
|
||||||
|
* system.
|
||||||
|
*
|
||||||
|
* @deprecated Use the driver-specific variant under $file
|
||||||
|
*/
|
||||||
|
public string $storePath = WRITEPATH . 'cache/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cache Include Query String
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Whether to take the URL query string into consideration when generating
|
||||||
|
* output cache files. Valid options are:
|
||||||
|
*
|
||||||
|
* false = Disabled
|
||||||
|
* true = Enabled, take all query parameters into account.
|
||||||
|
* Please be aware that this may result in numerous cache
|
||||||
|
* files generated for the same page over and over again.
|
||||||
|
* ['q'] = Enabled, but only take into account the specified list
|
||||||
|
* of query parameters.
|
||||||
|
*
|
||||||
|
* @var bool|string[]
|
||||||
|
*/
|
||||||
|
public $cacheQueryString = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Key Prefix
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This string is added to all cache item names to help avoid collisions
|
||||||
|
* if you run multiple applications with the same cache engine.
|
||||||
|
*/
|
||||||
|
public string $prefix = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Default TTL
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The default number of seconds to save items when none is specified.
|
||||||
|
*
|
||||||
|
* WARNING: This is not used by framework handlers where 60 seconds is
|
||||||
|
* hard-coded, but may be useful to projects and modules. This will replace
|
||||||
|
* the hard-coded value in a future release.
|
||||||
|
*/
|
||||||
|
public int $ttl = 60;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Reserved Characters
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* A string of reserved characters that will not be allowed in keys or tags.
|
||||||
|
* Strings that violate this restriction will cause handlers to throw.
|
||||||
|
* Default: {}()/\@:
|
||||||
|
*
|
||||||
|
* NOTE: The default set is required for PSR-6 compliance.
|
||||||
|
*/
|
||||||
|
public string $reservedCharacters = '{}()/\@:';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* File settings
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Your file storage preferences can be specified below, if you are using
|
||||||
|
* the File driver.
|
||||||
|
*
|
||||||
|
* @var array<string, int|string|null>
|
||||||
|
*/
|
||||||
|
public array $file = [
|
||||||
|
'storePath' => WRITEPATH . 'cache/',
|
||||||
|
'mode' => 0640,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
* Memcached settings
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
* Your Memcached servers can be specified below, if you are using
|
||||||
|
* the Memcached drivers.
|
||||||
|
*
|
||||||
|
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
||||||
|
*
|
||||||
|
* @var array<string, bool|int|string>
|
||||||
|
*/
|
||||||
|
public array $memcached = [
|
||||||
|
'host' => '127.0.0.1',
|
||||||
|
'port' => 11211,
|
||||||
|
'weight' => 1,
|
||||||
|
'raw' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
* Redis settings
|
||||||
|
* -------------------------------------------------------------------------
|
||||||
|
* Your Redis server can be specified below, if you are using
|
||||||
|
* the Redis or Predis drivers.
|
||||||
|
*
|
||||||
|
* @var array<string, int|string|null>
|
||||||
|
*/
|
||||||
|
public array $redis = [
|
||||||
|
'host' => '127.0.0.1',
|
||||||
|
'password' => null,
|
||||||
|
'port' => 6379,
|
||||||
|
'timeout' => 0,
|
||||||
|
'database' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Available Cache Handlers
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This is an array of cache engine alias' and class names. Only engines
|
||||||
|
* that are listed here are allowed to be used.
|
||||||
|
*
|
||||||
|
* @var array<string, class-string<CacheInterface>>
|
||||||
|
*/
|
||||||
|
public array $validHandlers = [
|
||||||
|
'dummy' => DummyHandler::class,
|
||||||
|
'file' => FileHandler::class,
|
||||||
|
'memcached' => MemcachedHandler::class,
|
||||||
|
'predis' => PredisHandler::class,
|
||||||
|
'redis' => RedisHandler::class,
|
||||||
|
'wincache' => WincacheHandler::class,
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
| --------------------------------------------------------------------
|
||||||
|
| App Namespace
|
||||||
|
| --------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This defines the default Namespace that is used throughout
|
||||||
|
| CodeIgniter to refer to the Application directory. Change
|
||||||
|
| this constant to change the namespace that all application
|
||||||
|
| classes should use.
|
||||||
|
|
|
||||||
|
| NOTE: changing this will require manually modifying the
|
||||||
|
| existing namespaces of App\* namespaced-classes.
|
||||||
|
*/
|
||||||
|
defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| --------------------------------------------------------------------------
|
||||||
|
| Composer Path
|
||||||
|
| --------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The path that Composer's autoload file is expected to live. By default,
|
||||||
|
| the vendor folder is in the Root directory, but you can customize that here.
|
||||||
|
*/
|
||||||
|
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Timing Constants
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Provide simple ways to work with the myriad of PHP functions that
|
||||||
|
| require information to be in seconds.
|
||||||
|
*/
|
||||||
|
defined('SECOND') || define('SECOND', 1);
|
||||||
|
defined('MINUTE') || define('MINUTE', 60);
|
||||||
|
defined('HOUR') || define('HOUR', 3600);
|
||||||
|
defined('DAY') || define('DAY', 86400);
|
||||||
|
defined('WEEK') || define('WEEK', 604800);
|
||||||
|
defined('MONTH') || define('MONTH', 2_592_000);
|
||||||
|
defined('YEAR') || define('YEAR', 31_536_000);
|
||||||
|
defined('DECADE') || define('DECADE', 315_360_000);
|
||||||
|
|
||||||
|
/*
|
||||||
|
| --------------------------------------------------------------------------
|
||||||
|
| Exit Status Codes
|
||||||
|
| --------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Used to indicate the conditions under which the script is exit()ing.
|
||||||
|
| While there is no universal standard for error codes, there are some
|
||||||
|
| broad conventions. Three such conventions are mentioned below, for
|
||||||
|
| those who wish to make use of them. The CodeIgniter defaults were
|
||||||
|
| chosen for the least overlap with these conventions, while still
|
||||||
|
| leaving room for others to be defined in future versions and user
|
||||||
|
| applications.
|
||||||
|
|
|
||||||
|
| The three main conventions used for determining exit status codes
|
||||||
|
| are as follows:
|
||||||
|
|
|
||||||
|
| Standard C/C++ Library (stdlibc):
|
||||||
|
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
|
||||||
|
| (This link also contains other GNU-specific conventions)
|
||||||
|
| BSD sysexits.h:
|
||||||
|
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
|
||||||
|
| Bash scripting:
|
||||||
|
| http://tldp.org/LDP/abs/html/exitcodes.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
|
||||||
|
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
|
||||||
|
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
|
||||||
|
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
|
||||||
|
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
|
||||||
|
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
|
||||||
|
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
|
||||||
|
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
||||||
|
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||||
|
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_LOW instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_LOW', 200);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_NORMAL instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_NORMAL', 100);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
|
||||||
|
*/
|
||||||
|
define('EVENT_PRIORITY_HIGH', 10);
|
|
@ -0,0 +1,176 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the default settings for the ContentSecurityPolicy, if you
|
||||||
|
* choose to use it. The values here will be read in and set as defaults
|
||||||
|
* for the site. If needed, they can be overridden on a page-by-page basis.
|
||||||
|
*
|
||||||
|
* Suggested reference for explanations:
|
||||||
|
*
|
||||||
|
* @see https://www.html5rocks.com/en/tutorials/security/content-security-policy/
|
||||||
|
*/
|
||||||
|
class ContentSecurityPolicy extends BaseConfig
|
||||||
|
{
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Broadbrush CSP management
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default CSP report context
|
||||||
|
*/
|
||||||
|
public bool $reportOnly = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies a URL where a browser will send reports
|
||||||
|
* when a content security policy is violated.
|
||||||
|
*/
|
||||||
|
public ?string $reportURI = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instructs user agents to rewrite URL schemes, changing
|
||||||
|
* HTTP to HTTPS. This directive is for websites with
|
||||||
|
* large numbers of old URLs that need to be rewritten.
|
||||||
|
*/
|
||||||
|
public bool $upgradeInsecureRequests = false;
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Sources allowed
|
||||||
|
// NOTE: once you set a policy to 'none', it cannot be further restricted
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will default to self if not overridden
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $defaultSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists allowed scripts' URLs.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $scriptSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists allowed stylesheets' URLs.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $styleSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the origins from which images can be loaded.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $imageSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restricts the URLs that can appear in a page's `<base>` element.
|
||||||
|
*
|
||||||
|
* Will default to self if not overridden
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $baseURI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists the URLs for workers and embedded frame contents
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $childSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limits the origins that you can connect to (via XHR,
|
||||||
|
* WebSockets, and EventSource).
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $connectSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the origins that can serve web fonts.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $fontSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists valid endpoints for submission from `<form>` tags.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $formAction = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the sources that can embed the current page.
|
||||||
|
* This directive applies to `<frame>`, `<iframe>`, `<embed>`,
|
||||||
|
* and `<applet>` tags. This directive can't be used in
|
||||||
|
* `<meta>` tags and applies only to non-HTML resources.
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $frameAncestors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The frame-src directive restricts the URLs which may
|
||||||
|
* be loaded into nested browsing contexts.
|
||||||
|
*
|
||||||
|
* @var array|string|null
|
||||||
|
*/
|
||||||
|
public $frameSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restricts the origins allowed to deliver video and audio.
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $mediaSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows control over Flash and other plugins.
|
||||||
|
*
|
||||||
|
* @var string|string[]
|
||||||
|
*/
|
||||||
|
public $objectSrc = 'self';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $manifestSrc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limits the kinds of plugins a page may invoke.
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $pluginTypes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of actions allowed.
|
||||||
|
*
|
||||||
|
* @var string|string[]|null
|
||||||
|
*/
|
||||||
|
public $sandbox;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nonce tag for style
|
||||||
|
*/
|
||||||
|
public string $styleNonceTag = '{csp-style-nonce}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Nonce tag for script
|
||||||
|
*/
|
||||||
|
public string $scriptNonceTag = '{csp-script-nonce}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace nonce tag automatically
|
||||||
|
*/
|
||||||
|
public bool $autoNonce = true;
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use DateTimeInterface;
|
||||||
|
|
||||||
|
class Cookie extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Prefix
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Set a cookie name prefix if you need to avoid collisions.
|
||||||
|
*/
|
||||||
|
public string $prefix = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Expires Timestamp
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Default expires timestamp for cookies. Setting this to `0` will mean the
|
||||||
|
* cookie will not have the `Expires` attribute and will behave as a session
|
||||||
|
* cookie.
|
||||||
|
*
|
||||||
|
* @var DateTimeInterface|int|string
|
||||||
|
*/
|
||||||
|
public $expires = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Path
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Typically will be a forward slash.
|
||||||
|
*/
|
||||||
|
public string $path = '/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Domain
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Set to `.your-domain.com` for site-wide cookies.
|
||||||
|
*/
|
||||||
|
public string $domain = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Secure
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Cookie will only be set if a secure HTTPS connection exists.
|
||||||
|
*/
|
||||||
|
public bool $secure = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie HTTPOnly
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Cookie will only be accessible via HTTP(S) (no JavaScript).
|
||||||
|
*/
|
||||||
|
public bool $httponly = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie SameSite
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Configure cookie SameSite setting. Allowed values are:
|
||||||
|
* - None
|
||||||
|
* - Lax
|
||||||
|
* - Strict
|
||||||
|
* - ''
|
||||||
|
*
|
||||||
|
* Alternatively, you can use the constant names:
|
||||||
|
* - `Cookie::SAMESITE_NONE`
|
||||||
|
* - `Cookie::SAMESITE_LAX`
|
||||||
|
* - `Cookie::SAMESITE_STRICT`
|
||||||
|
*
|
||||||
|
* Defaults to `Lax` for compatibility with modern browsers. Setting `''`
|
||||||
|
* (empty string) means default SameSite attribute set by browsers (`Lax`)
|
||||||
|
* will be set on cookies. If set to `None`, `$secure` must also be set.
|
||||||
|
*
|
||||||
|
* @phpstan-var 'None'|'Lax'|'Strict'|''
|
||||||
|
*/
|
||||||
|
public string $samesite = 'Lax';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Cookie Raw
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This flag allows setting a "raw" cookie, i.e., its name and value are
|
||||||
|
* not URL encoded using `rawurlencode()`.
|
||||||
|
*
|
||||||
|
* If this is set to `true`, cookie names should be compliant of RFC 2616's
|
||||||
|
* list of allowed characters.
|
||||||
|
*
|
||||||
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
|
||||||
|
* @see https://tools.ietf.org/html/rfc2616#section-2.2
|
||||||
|
*/
|
||||||
|
public bool $raw = false;
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database Configuration
|
||||||
|
*/
|
||||||
|
class Database extends Config
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The directory that holds the Migrations
|
||||||
|
* and Seeds directories.
|
||||||
|
*/
|
||||||
|
public string $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lets you choose which connection group to
|
||||||
|
* use if no other is specified.
|
||||||
|
*/
|
||||||
|
public string $defaultGroup = 'default';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default database connection.
|
||||||
|
*/
|
||||||
|
public array $default = [
|
||||||
|
'DSN' => '',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => '',
|
||||||
|
'database' => 'tugas_akhir',
|
||||||
|
'DBDriver' => 'MySQLi',
|
||||||
|
'DBPrefix' => '',
|
||||||
|
'pConnect' => false,
|
||||||
|
'DBDebug' => true,
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'DBCollat' => 'utf8_general_ci',
|
||||||
|
'swapPre' => '',
|
||||||
|
'encrypt' => false,
|
||||||
|
'compress' => false,
|
||||||
|
'strictOn' => false,
|
||||||
|
'failover' => [],
|
||||||
|
'port' => 3306,
|
||||||
|
'numberNative' => false,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This database connection is used when
|
||||||
|
* running PHPUnit database tests.
|
||||||
|
*/
|
||||||
|
public array $tests = [
|
||||||
|
'DSN' => '',
|
||||||
|
'hostname' => '127.0.0.1',
|
||||||
|
'username' => '',
|
||||||
|
'password' => '',
|
||||||
|
'database' => ':memory:',
|
||||||
|
'DBDriver' => 'SQLite3',
|
||||||
|
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
|
||||||
|
'pConnect' => false,
|
||||||
|
'DBDebug' => true,
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'DBCollat' => 'utf8_general_ci',
|
||||||
|
'swapPre' => '',
|
||||||
|
'encrypt' => false,
|
||||||
|
'compress' => false,
|
||||||
|
'strictOn' => false,
|
||||||
|
'failover' => [],
|
||||||
|
'port' => 3306,
|
||||||
|
'foreignKeys' => true,
|
||||||
|
'busyTimeout' => 1000,
|
||||||
|
];
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
// Ensure that we always set the database group to 'tests' if
|
||||||
|
// we are currently running an automated test suite, so that
|
||||||
|
// we don't overwrite live data on accident.
|
||||||
|
if (ENVIRONMENT === 'testing') {
|
||||||
|
$this->defaultGroup = 'tests';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class DocTypes
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* List of valid document types.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $list = [
|
||||||
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||||
|
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||||
|
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||||
|
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||||
|
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
|
||||||
|
'html5' => '<!DOCTYPE html>',
|
||||||
|
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||||
|
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||||
|
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||||
|
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
|
||||||
|
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
|
||||||
|
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
|
||||||
|
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
|
||||||
|
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
|
||||||
|
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
|
||||||
|
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
|
||||||
|
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to remove the solidus (`/`) character for void HTML elements (e.g. `<input>`)
|
||||||
|
* for HTML5 compatibility.
|
||||||
|
*
|
||||||
|
* Set to:
|
||||||
|
* `true` - to be HTML5 compatible
|
||||||
|
* `false` - to be XHTML compatible
|
||||||
|
*/
|
||||||
|
public bool $html5 = true;
|
||||||
|
}
|
|
@ -0,0 +1,121 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Email extends BaseConfig
|
||||||
|
{
|
||||||
|
public string $fromEmail = '';
|
||||||
|
public string $fromName = '';
|
||||||
|
public string $recipients = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The "user agent"
|
||||||
|
*/
|
||||||
|
public string $userAgent = 'CodeIgniter';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The mail sending protocol: mail, sendmail, smtp
|
||||||
|
*/
|
||||||
|
public string $protocol = 'mail';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The server path to Sendmail.
|
||||||
|
*/
|
||||||
|
public string $mailPath = '/usr/sbin/sendmail';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Server Hostname
|
||||||
|
*/
|
||||||
|
public string $SMTPHost = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Username
|
||||||
|
*/
|
||||||
|
public string $SMTPUser = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Password
|
||||||
|
*/
|
||||||
|
public string $SMTPPass = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Port
|
||||||
|
*/
|
||||||
|
public int $SMTPPort = 25;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Timeout (in seconds)
|
||||||
|
*/
|
||||||
|
public int $SMTPTimeout = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable persistent SMTP connections
|
||||||
|
*/
|
||||||
|
public bool $SMTPKeepAlive = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SMTP Encryption.
|
||||||
|
*
|
||||||
|
* @var string '', 'tls' or 'ssl'. 'tls' will issue a STARTTLS command
|
||||||
|
* to the server. 'ssl' means implicit SSL. Connection on port
|
||||||
|
* 465 should set this to ''.
|
||||||
|
*/
|
||||||
|
public string $SMTPCrypto = 'tls';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable word-wrap
|
||||||
|
*/
|
||||||
|
public bool $wordWrap = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Character count to wrap at
|
||||||
|
*/
|
||||||
|
public int $wrapChars = 76;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of mail, either 'text' or 'html'
|
||||||
|
*/
|
||||||
|
public string $mailType = 'text';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Character set (utf-8, iso-8859-1, etc.)
|
||||||
|
*/
|
||||||
|
public string $charset = 'UTF-8';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to validate the email address
|
||||||
|
*/
|
||||||
|
public bool $validate = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
|
||||||
|
*/
|
||||||
|
public int $priority = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Newline character. (Use “\r\n” to comply with RFC 822)
|
||||||
|
*/
|
||||||
|
public string $CRLF = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Newline character. (Use “\r\n” to comply with RFC 822)
|
||||||
|
*/
|
||||||
|
public string $newline = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable BCC Batch Mode.
|
||||||
|
*/
|
||||||
|
public bool $BCCBatchMode = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of emails in each BCC batch
|
||||||
|
*/
|
||||||
|
public int $BCCBatchSize = 200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable notify message from server
|
||||||
|
*/
|
||||||
|
public bool $DSN = false;
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encryption configuration.
|
||||||
|
*
|
||||||
|
* These are the settings used for encryption, if you don't pass a parameter
|
||||||
|
* array to the encrypter for creation/initialization.
|
||||||
|
*/
|
||||||
|
class Encryption extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Encryption Key Starter
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If you use the Encryption class you must set an encryption key (seed).
|
||||||
|
* You need to ensure it is long enough for the cipher and mode you plan to use.
|
||||||
|
* See the user guide for more info.
|
||||||
|
*/
|
||||||
|
public string $key = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Encryption Driver to Use
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* One of the supported encryption drivers.
|
||||||
|
*
|
||||||
|
* Available drivers:
|
||||||
|
* - OpenSSL
|
||||||
|
* - Sodium
|
||||||
|
*/
|
||||||
|
public string $driver = 'OpenSSL';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* SodiumHandler's Padding Length in Bytes
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This is the number of bytes that will be padded to the plaintext message
|
||||||
|
* before it is encrypted. This value should be greater than zero.
|
||||||
|
*
|
||||||
|
* See the user guide for more information on padding.
|
||||||
|
*/
|
||||||
|
public int $blockSize = 16;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Encryption digest
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
|
||||||
|
*/
|
||||||
|
public string $digest = 'SHA512';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to false for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public bool $rawData = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encryption key info.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'encryption' for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public string $encryptKeyInfo = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authentication key info.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'authentication' for CI3 Encryption compatibility.
|
||||||
|
*/
|
||||||
|
public string $authKeyInfo = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cipher to use.
|
||||||
|
* This setting is only used by OpenSSLHandler.
|
||||||
|
*
|
||||||
|
* Set to 'AES-128-CBC' to decrypt encrypted data that encrypted
|
||||||
|
* by CI3 Encryption default configuration.
|
||||||
|
*/
|
||||||
|
public string $cipher = 'AES-256-CTR';
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Events\Events;
|
||||||
|
use CodeIgniter\Exceptions\FrameworkException;
|
||||||
|
use CodeIgniter\HotReloader\HotReloader;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
* Application Events
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
* Events allow you to tap into the execution of the program without
|
||||||
|
* modifying or extending core files. This file provides a central
|
||||||
|
* location to define your events, though they can always be added
|
||||||
|
* at run-time, also, if needed.
|
||||||
|
*
|
||||||
|
* You create code that can execute by subscribing to events with
|
||||||
|
* the 'on()' method. This accepts any form of callable, including
|
||||||
|
* Closures, that will be executed when the event is triggered.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* Events::on('create', [$myInstance, 'myMethod']);
|
||||||
|
*/
|
||||||
|
|
||||||
|
Events::on('pre_system', static function () {
|
||||||
|
if (ENVIRONMENT !== 'testing') {
|
||||||
|
if (ini_get('zlib.output_compression')) {
|
||||||
|
throw FrameworkException::forEnabledZlibOutputCompression();
|
||||||
|
}
|
||||||
|
|
||||||
|
while (ob_get_level() > 0) {
|
||||||
|
ob_end_flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
ob_start(static fn ($buffer) => $buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
* Debug Toolbar Listeners.
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
* If you delete, they will no longer be collected.
|
||||||
|
*/
|
||||||
|
if (CI_DEBUG && ! is_cli()) {
|
||||||
|
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
|
||||||
|
Services::toolbar()->respond();
|
||||||
|
// Hot Reload route - for framework use on the hot reloader.
|
||||||
|
if (ENVIRONMENT === 'development') {
|
||||||
|
Services::routes()->get('__hot-reload', static function () {
|
||||||
|
(new HotReloader())->run();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Debug\ExceptionHandler;
|
||||||
|
use CodeIgniter\Debug\ExceptionHandlerInterface;
|
||||||
|
use Psr\Log\LogLevel;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup how the exception handler works.
|
||||||
|
*/
|
||||||
|
class Exceptions extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* LOG EXCEPTIONS?
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* If true, then exceptions will be logged
|
||||||
|
* through Services::Log.
|
||||||
|
*
|
||||||
|
* Default: true
|
||||||
|
*/
|
||||||
|
public bool $log = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* DO NOT LOG STATUS CODES
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Any status codes here will NOT be logged if logging is turned on.
|
||||||
|
* By default, only 404 (Page Not Found) exceptions are ignored.
|
||||||
|
*/
|
||||||
|
public array $ignoreCodes = [404];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Error Views Path
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* This is the path to the directory that contains the 'cli' and 'html'
|
||||||
|
* directories that hold the views used to generate errors.
|
||||||
|
*
|
||||||
|
* Default: APPPATH.'Views/errors'
|
||||||
|
*/
|
||||||
|
public string $errorViewPath = APPPATH . 'Views/errors';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* HIDE FROM DEBUG TRACE
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Any data that you would like to hide from the debug trace.
|
||||||
|
* In order to specify 2 levels, use "/" to separate.
|
||||||
|
* ex. ['server', 'setup/password', 'secret_token']
|
||||||
|
*/
|
||||||
|
public array $sensitiveDataInTrace = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* LOG DEPRECATIONS INSTEAD OF THROWING?
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* By default, CodeIgniter converts deprecations into exceptions. Also,
|
||||||
|
* starting in PHP 8.1 will cause a lot of deprecated usage warnings.
|
||||||
|
* Use this option to temporarily cease the warnings and instead log those.
|
||||||
|
* This option also works for user deprecations.
|
||||||
|
*/
|
||||||
|
public bool $logDeprecations = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* LOG LEVEL THRESHOLD FOR DEPRECATIONS
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* If `$logDeprecations` is set to `true`, this sets the log level
|
||||||
|
* to which the deprecation will be logged. This should be one of the log
|
||||||
|
* levels recognized by PSR-3.
|
||||||
|
*
|
||||||
|
* The related `Config\Logger::$threshold` should be adjusted, if needed,
|
||||||
|
* to capture logging the deprecations.
|
||||||
|
*/
|
||||||
|
public string $deprecationLogLevel = LogLevel::WARNING;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* DEFINE THE HANDLERS USED
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Given the HTTP status code, returns exception handler that
|
||||||
|
* should be used to deal with this error. By default, it will run CodeIgniter's
|
||||||
|
* default handler and display the error information in the expected format
|
||||||
|
* for CLI, HTTP, or AJAX requests, as determined by is_cli() and the expected
|
||||||
|
* response format.
|
||||||
|
*
|
||||||
|
* Custom handlers can be returned if you want to handle one or more specific
|
||||||
|
* error codes yourself like:
|
||||||
|
*
|
||||||
|
* if (in_array($statusCode, [400, 404, 500])) {
|
||||||
|
* return new \App\Libraries\MyExceptionHandler();
|
||||||
|
* }
|
||||||
|
* if ($exception instanceOf PageNotFoundException) {
|
||||||
|
* return new \App\Libraries\MyExceptionHandler();
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface
|
||||||
|
{
|
||||||
|
return new ExceptionHandler($this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/disable backward compatibility breaking features.
|
||||||
|
*/
|
||||||
|
class Feature extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Enable multiple filters for a route or not.
|
||||||
|
*
|
||||||
|
* If you enable this:
|
||||||
|
* - CodeIgniter\CodeIgniter::handleRequest() uses:
|
||||||
|
* - CodeIgniter\Filters\Filters::enableFilters(), instead of enableFilter()
|
||||||
|
* - CodeIgniter\CodeIgniter::tryToRouteIt() uses:
|
||||||
|
* - CodeIgniter\Router\Router::getFilters(), instead of getFilter()
|
||||||
|
* - CodeIgniter\Router\Router::handle() uses:
|
||||||
|
* - property $filtersInfo, instead of $filterInfo
|
||||||
|
* - CodeIgniter\Router\RouteCollection::getFiltersForRoute(), instead of getFilterForRoute()
|
||||||
|
*/
|
||||||
|
public bool $multipleFilters = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use improved new auto routing instead of the default legacy version.
|
||||||
|
*/
|
||||||
|
public bool $autoRoutesImproved = false;
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Filters\CSRF;
|
||||||
|
use CodeIgniter\Filters\DebugToolbar;
|
||||||
|
use CodeIgniter\Filters\Honeypot;
|
||||||
|
use CodeIgniter\Filters\InvalidChars;
|
||||||
|
use CodeIgniter\Filters\SecureHeaders;
|
||||||
|
|
||||||
|
class Filters extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Configures aliases for Filter classes to
|
||||||
|
* make reading things nicer and simpler.
|
||||||
|
*
|
||||||
|
* @var array<string, class-string|list<class-string>> [filter_name => classname]
|
||||||
|
* or [filter_name => [classname1, classname2, ...]]
|
||||||
|
*/
|
||||||
|
public array $aliases = [
|
||||||
|
'csrf' => CSRF::class,
|
||||||
|
'toolbar' => DebugToolbar::class,
|
||||||
|
'honeypot' => Honeypot::class,
|
||||||
|
'invalidchars' => InvalidChars::class,
|
||||||
|
'secureheaders' => SecureHeaders::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of filter aliases that are always
|
||||||
|
* applied before and after every request.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, array<string, string>>>|array<string, list<string>>
|
||||||
|
*/
|
||||||
|
public array $globals = [
|
||||||
|
'before' => [
|
||||||
|
// 'honeypot',
|
||||||
|
// 'csrf',
|
||||||
|
// 'invalidchars',
|
||||||
|
],
|
||||||
|
'after' => [
|
||||||
|
'toolbar',
|
||||||
|
// 'honeypot',
|
||||||
|
// 'secureheaders',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of filter aliases that works on a
|
||||||
|
* particular HTTP method (GET, POST, etc.).
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* 'post' => ['foo', 'bar']
|
||||||
|
*
|
||||||
|
* If you use this, you should disable auto-routing because auto-routing
|
||||||
|
* permits any HTTP method to access a controller. Accessing the controller
|
||||||
|
* with a method you don't expect could bypass the filter.
|
||||||
|
*/
|
||||||
|
public array $methods = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of filter aliases that should run on any
|
||||||
|
* before or after URI patterns.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']]
|
||||||
|
*/
|
||||||
|
public array $filters = [];
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\ForeignCharacters as BaseForeignCharacters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class ForeignCharacters extends BaseForeignCharacters
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Format\FormatterInterface;
|
||||||
|
use CodeIgniter\Format\JSONFormatter;
|
||||||
|
use CodeIgniter\Format\XMLFormatter;
|
||||||
|
|
||||||
|
class Format extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Available Response Formats
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* When you perform content negotiation with the request, these are the
|
||||||
|
* available formats that your application supports. This is currently
|
||||||
|
* only used with the API\ResponseTrait. A valid Formatter must exist
|
||||||
|
* for the specified format.
|
||||||
|
*
|
||||||
|
* These formats are only checked when the data passed to the respond()
|
||||||
|
* method is an array.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public array $supportedResponseFormats = [
|
||||||
|
'application/json',
|
||||||
|
'application/xml', // machine-readable XML
|
||||||
|
'text/xml', // human-readable XML
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Formatters
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Lists the class to use to format responses with of a particular type.
|
||||||
|
* For each mime type, list the class that should be used. Formatters
|
||||||
|
* can be retrieved through the getFormatter() method.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $formatters = [
|
||||||
|
'application/json' => JSONFormatter::class,
|
||||||
|
'application/xml' => XMLFormatter::class,
|
||||||
|
'text/xml' => XMLFormatter::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Formatters Options
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Additional Options to adjust default formatters behaviour.
|
||||||
|
* For each mime type, list the additional options that should be used.
|
||||||
|
*
|
||||||
|
* @var array<string, int>
|
||||||
|
*/
|
||||||
|
public array $formatterOptions = [
|
||||||
|
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
|
||||||
|
'application/xml' => 0,
|
||||||
|
'text/xml' => 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Factory method to return the appropriate formatter for the given mime type.
|
||||||
|
*
|
||||||
|
* @return FormatterInterface
|
||||||
|
*
|
||||||
|
* @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead.
|
||||||
|
*/
|
||||||
|
public function getFormatter(string $mime)
|
||||||
|
{
|
||||||
|
return Services::format()->getFormatter($mime);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Generators extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Generator Commands' Views
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This array defines the mapping of generator commands to the view files
|
||||||
|
* they are using. If you need to customize them for your own, copy these
|
||||||
|
* view files in your own folder and indicate the location here.
|
||||||
|
*
|
||||||
|
* You will notice that the views have special placeholders enclosed in
|
||||||
|
* curly braces `{...}`. These placeholders are used internally by the
|
||||||
|
* generator commands in processing replacements, thus you are warned
|
||||||
|
* not to delete them or modify the names. If you will do so, you may
|
||||||
|
* end up disrupting the scaffolding process and throw errors.
|
||||||
|
*
|
||||||
|
* YOU HAVE BEEN WARNED!
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $views = [
|
||||||
|
'make:cell' => 'CodeIgniter\Commands\Generators\Views\cell.tpl.php',
|
||||||
|
'make:cell_view' => 'CodeIgniter\Commands\Generators\Views\cell_view.tpl.php',
|
||||||
|
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
|
||||||
|
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
|
||||||
|
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
|
||||||
|
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
|
||||||
|
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
|
||||||
|
'make:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
|
||||||
|
'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php',
|
||||||
|
'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
|
||||||
|
'make:validation' => 'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
|
||||||
|
'session:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Honeypot extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Makes Honeypot visible or not to human
|
||||||
|
*/
|
||||||
|
public bool $hidden = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Honeypot Label Content
|
||||||
|
*/
|
||||||
|
public string $label = 'Fill This Field';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Honeypot Field Name
|
||||||
|
*/
|
||||||
|
public string $name = 'honeypot';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Honeypot HTML Template
|
||||||
|
*/
|
||||||
|
public string $template = '<label>{label}</label><input type="text" name="{name}" value="">';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Honeypot container
|
||||||
|
*
|
||||||
|
* If you enabled CSP, you can remove `style="display:none"`.
|
||||||
|
*/
|
||||||
|
public string $container = '<div style="display:none">{template}</div>';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The id attribute for Honeypot container tag
|
||||||
|
*
|
||||||
|
* Used when CSP is enabled.
|
||||||
|
*/
|
||||||
|
public string $containerId = 'hpc';
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Images\Handlers\GDHandler;
|
||||||
|
use CodeIgniter\Images\Handlers\ImageMagickHandler;
|
||||||
|
|
||||||
|
class Images extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Default handler used if no other handler is specified.
|
||||||
|
*/
|
||||||
|
public string $defaultHandler = 'gd';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the image library.
|
||||||
|
* Required for ImageMagick, GraphicsMagick, or NetPBM.
|
||||||
|
*/
|
||||||
|
public string $libraryPath = '/usr/local/bin/convert';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The available handler classes.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $handlers = [
|
||||||
|
'gd' => GDHandler::class,
|
||||||
|
'imagick' => ImageMagickHandler::class,
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use Kint\Parser\ConstructablePluginInterface;
|
||||||
|
use Kint\Renderer\AbstractRenderer;
|
||||||
|
use Kint\Renderer\Rich\TabPluginInterface;
|
||||||
|
use Kint\Renderer\Rich\ValuePluginInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Kint
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* We use Kint's `RichRenderer` and `CLIRenderer`. This area contains options
|
||||||
|
* that you can set to customize how Kint works for you.
|
||||||
|
*
|
||||||
|
* @see https://kint-php.github.io/kint/ for details on these settings.
|
||||||
|
*/
|
||||||
|
class Kint extends BaseConfig
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var list<class-string<ConstructablePluginInterface>|ConstructablePluginInterface>|null
|
||||||
|
*/
|
||||||
|
public $plugins;
|
||||||
|
|
||||||
|
public int $maxDepth = 6;
|
||||||
|
public bool $displayCalledFrom = true;
|
||||||
|
public bool $expanded = false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| RichRenderer Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public string $richTheme = 'aante-light.css';
|
||||||
|
public bool $richFolder = false;
|
||||||
|
public int $richSort = AbstractRenderer::SORT_FULL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array<string, class-string<ValuePluginInterface>>|null
|
||||||
|
*/
|
||||||
|
public $richObjectPlugins;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array<string, class-string<TabPluginInterface>>|null
|
||||||
|
*/
|
||||||
|
public $richTabPlugins;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| CLI Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
public bool $cliColors = true;
|
||||||
|
public bool $cliForceUTF8 = false;
|
||||||
|
public bool $cliDetectWidth = true;
|
||||||
|
public int $cliMinWidth = 40;
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Log\Handlers\FileHandler;
|
||||||
|
|
||||||
|
class Logger extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Error Logging Threshold
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* You can enable error logging by setting a threshold over zero. The
|
||||||
|
* threshold determines what gets logged. Any values below or equal to the
|
||||||
|
* threshold will be logged.
|
||||||
|
*
|
||||||
|
* Threshold options are:
|
||||||
|
*
|
||||||
|
* - 0 = Disables logging, Error logging TURNED OFF
|
||||||
|
* - 1 = Emergency Messages - System is unusable
|
||||||
|
* - 2 = Alert Messages - Action Must Be Taken Immediately
|
||||||
|
* - 3 = Critical Messages - Application component unavailable, unexpected exception.
|
||||||
|
* - 4 = Runtime Errors - Don't need immediate action, but should be monitored.
|
||||||
|
* - 5 = Warnings - Exceptional occurrences that are not errors.
|
||||||
|
* - 6 = Notices - Normal but significant events.
|
||||||
|
* - 7 = Info - Interesting events, like user logging in, etc.
|
||||||
|
* - 8 = Debug - Detailed debug information.
|
||||||
|
* - 9 = All Messages
|
||||||
|
*
|
||||||
|
* You can also pass an array with threshold levels to show individual error types
|
||||||
|
*
|
||||||
|
* array(1, 2, 3, 8) = Emergency, Alert, Critical, and Debug messages
|
||||||
|
*
|
||||||
|
* For a live site you'll usually enable Critical or higher (3) to be logged otherwise
|
||||||
|
* your log files will fill up very fast.
|
||||||
|
*
|
||||||
|
* @var array|int
|
||||||
|
*/
|
||||||
|
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Date Format for Logs
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Each item that is logged has an associated date. You can use PHP date
|
||||||
|
* codes to set your own date formatting
|
||||||
|
*/
|
||||||
|
public string $dateFormat = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Log Handlers
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The logging system supports multiple actions to be taken when something
|
||||||
|
* is logged. This is done by allowing for multiple Handlers, special classes
|
||||||
|
* designed to write the log to their chosen destinations, whether that is
|
||||||
|
* a file on the getServer, a cloud-based service, or even taking actions such
|
||||||
|
* as emailing the dev team.
|
||||||
|
*
|
||||||
|
* Each handler is defined by the class name used for that handler, and it
|
||||||
|
* MUST implement the `CodeIgniter\Log\Handlers\HandlerInterface` interface.
|
||||||
|
*
|
||||||
|
* The value of each key is an array of configuration items that are sent
|
||||||
|
* to the constructor of each handler. The only required configuration item
|
||||||
|
* is the 'handles' element, which must be an array of integer log levels.
|
||||||
|
* This is most easily handled by using the constants defined in the
|
||||||
|
* `Psr\Log\LogLevel` class.
|
||||||
|
*
|
||||||
|
* Handlers are executed in the order defined in this array, starting with
|
||||||
|
* the handler on top and continuing down.
|
||||||
|
*/
|
||||||
|
public array $handlers = [
|
||||||
|
/*
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
* File Handler
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
FileHandler::class => [
|
||||||
|
// The log levels that this handler will handle.
|
||||||
|
'handles' => [
|
||||||
|
'critical',
|
||||||
|
'alert',
|
||||||
|
'emergency',
|
||||||
|
'debug',
|
||||||
|
'error',
|
||||||
|
'info',
|
||||||
|
'notice',
|
||||||
|
'warning',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The default filename extension for log files.
|
||||||
|
* An extension of 'php' allows for protecting the log files via basic
|
||||||
|
* scripting, when they are to be stored under a publicly accessible directory.
|
||||||
|
*
|
||||||
|
* NOTE: Leaving it blank will default to 'log'.
|
||||||
|
*/
|
||||||
|
'fileExtension' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The file system permissions to be applied on newly created log files.
|
||||||
|
*
|
||||||
|
* IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|
||||||
|
* integer notation (i.e. 0700, 0644, etc.)
|
||||||
|
*/
|
||||||
|
'filePermissions' => 0644,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logging Directory Path
|
||||||
|
*
|
||||||
|
* By default, logs are written to WRITEPATH . 'logs/'
|
||||||
|
* Specify a different destination here, if desired.
|
||||||
|
*/
|
||||||
|
'path' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The ChromeLoggerHandler requires the use of the Chrome web browser
|
||||||
|
* and the ChromeLogger extension. Uncomment this block to use it.
|
||||||
|
*/
|
||||||
|
// 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
|
||||||
|
// /*
|
||||||
|
// * The log levels that this handler will handle.
|
||||||
|
// */
|
||||||
|
// 'handles' => ['critical', 'alert', 'emergency', 'debug',
|
||||||
|
// 'error', 'info', 'notice', 'warning'],
|
||||||
|
// ],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The ErrorlogHandler writes the logs to PHP's native `error_log()` function.
|
||||||
|
* Uncomment this block to use it.
|
||||||
|
*/
|
||||||
|
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
|
||||||
|
// /* The log levels this handler can handle. */
|
||||||
|
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
|
||||||
|
//
|
||||||
|
// /*
|
||||||
|
// * The message type where the error should go. Can be 0 or 4, or use the
|
||||||
|
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
|
||||||
|
// */
|
||||||
|
// 'messageType' => 0,
|
||||||
|
// ],
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Migrations extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Enable/Disable Migrations
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Migrations are enabled by default.
|
||||||
|
*
|
||||||
|
* You should enable migrations whenever you intend to do a schema migration
|
||||||
|
* and disable it back when you're done.
|
||||||
|
*/
|
||||||
|
public bool $enabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Migrations Table
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This is the name of the table that will store the current migrations state.
|
||||||
|
* When migrations runs it will store in a database table which migration
|
||||||
|
* files have already been run.
|
||||||
|
*/
|
||||||
|
public string $table = 'migrations';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Timestamp Format
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This is the format that will be used when creating new migrations
|
||||||
|
* using the CLI command:
|
||||||
|
* > php spark make:migration
|
||||||
|
*
|
||||||
|
* NOTE: if you set an unsupported format, migration runner will not find
|
||||||
|
* your migration files.
|
||||||
|
*
|
||||||
|
* Supported formats:
|
||||||
|
* - YmdHis_
|
||||||
|
* - Y-m-d-His_
|
||||||
|
* - Y_m_d_His_
|
||||||
|
*/
|
||||||
|
public string $timestampFormat = 'Y-m-d-His_';
|
||||||
|
}
|
|
@ -0,0 +1,534 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mimes
|
||||||
|
*
|
||||||
|
* This file contains an array of mime types. It is used by the
|
||||||
|
* Upload class to help identify allowed file types.
|
||||||
|
*
|
||||||
|
* When more than one variation for an extension exist (like jpg, jpeg, etc)
|
||||||
|
* the most common one should be first in the array to aid the guess*
|
||||||
|
* methods. The same applies when more than one mime-type exists for a
|
||||||
|
* single extension.
|
||||||
|
*
|
||||||
|
* When working with mime types, please make sure you have the ´fileinfo´
|
||||||
|
* extension enabled to reliably detect the media types.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class Mimes
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Map of extensions to mime types.
|
||||||
|
*/
|
||||||
|
public static array $mimes = [
|
||||||
|
'hqx' => [
|
||||||
|
'application/mac-binhex40',
|
||||||
|
'application/mac-binhex',
|
||||||
|
'application/x-binhex40',
|
||||||
|
'application/x-mac-binhex40',
|
||||||
|
],
|
||||||
|
'cpt' => 'application/mac-compactpro',
|
||||||
|
'csv' => [
|
||||||
|
'text/csv',
|
||||||
|
'text/x-comma-separated-values',
|
||||||
|
'text/comma-separated-values',
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/x-csv',
|
||||||
|
'text/x-csv',
|
||||||
|
'application/csv',
|
||||||
|
'application/excel',
|
||||||
|
'application/vnd.msexcel',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'bin' => [
|
||||||
|
'application/macbinary',
|
||||||
|
'application/mac-binary',
|
||||||
|
'application/octet-stream',
|
||||||
|
'application/x-binary',
|
||||||
|
'application/x-macbinary',
|
||||||
|
],
|
||||||
|
'dms' => 'application/octet-stream',
|
||||||
|
'lha' => 'application/octet-stream',
|
||||||
|
'lzh' => 'application/octet-stream',
|
||||||
|
'exe' => [
|
||||||
|
'application/octet-stream',
|
||||||
|
'application/vnd.microsoft.portable-executable',
|
||||||
|
'application/x-dosexec',
|
||||||
|
'application/x-msdownload',
|
||||||
|
],
|
||||||
|
'class' => 'application/octet-stream',
|
||||||
|
'psd' => [
|
||||||
|
'application/x-photoshop',
|
||||||
|
'image/vnd.adobe.photoshop',
|
||||||
|
],
|
||||||
|
'so' => 'application/octet-stream',
|
||||||
|
'sea' => 'application/octet-stream',
|
||||||
|
'dll' => 'application/octet-stream',
|
||||||
|
'oda' => 'application/oda',
|
||||||
|
'pdf' => [
|
||||||
|
'application/pdf',
|
||||||
|
'application/force-download',
|
||||||
|
'application/x-download',
|
||||||
|
],
|
||||||
|
'ai' => [
|
||||||
|
'application/pdf',
|
||||||
|
'application/postscript',
|
||||||
|
],
|
||||||
|
'eps' => 'application/postscript',
|
||||||
|
'ps' => 'application/postscript',
|
||||||
|
'smi' => 'application/smil',
|
||||||
|
'smil' => 'application/smil',
|
||||||
|
'mif' => 'application/vnd.mif',
|
||||||
|
'xls' => [
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/msexcel',
|
||||||
|
'application/x-msexcel',
|
||||||
|
'application/x-ms-excel',
|
||||||
|
'application/x-excel',
|
||||||
|
'application/x-dos_ms_excel',
|
||||||
|
'application/xls',
|
||||||
|
'application/x-xls',
|
||||||
|
'application/excel',
|
||||||
|
'application/download',
|
||||||
|
'application/vnd.ms-office',
|
||||||
|
'application/msword',
|
||||||
|
],
|
||||||
|
'ppt' => [
|
||||||
|
'application/vnd.ms-powerpoint',
|
||||||
|
'application/powerpoint',
|
||||||
|
'application/vnd.ms-office',
|
||||||
|
'application/msword',
|
||||||
|
],
|
||||||
|
'pptx' => [
|
||||||
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||||
|
],
|
||||||
|
'wbxml' => 'application/wbxml',
|
||||||
|
'wmlc' => 'application/wmlc',
|
||||||
|
'dcr' => 'application/x-director',
|
||||||
|
'dir' => 'application/x-director',
|
||||||
|
'dxr' => 'application/x-director',
|
||||||
|
'dvi' => 'application/x-dvi',
|
||||||
|
'gtar' => 'application/x-gtar',
|
||||||
|
'gz' => 'application/x-gzip',
|
||||||
|
'gzip' => 'application/x-gzip',
|
||||||
|
'php' => [
|
||||||
|
'application/x-php',
|
||||||
|
'application/x-httpd-php',
|
||||||
|
'application/php',
|
||||||
|
'text/php',
|
||||||
|
'text/x-php',
|
||||||
|
'application/x-httpd-php-source',
|
||||||
|
],
|
||||||
|
'php4' => 'application/x-httpd-php',
|
||||||
|
'php3' => 'application/x-httpd-php',
|
||||||
|
'phtml' => 'application/x-httpd-php',
|
||||||
|
'phps' => 'application/x-httpd-php-source',
|
||||||
|
'js' => [
|
||||||
|
'application/x-javascript',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'swf' => 'application/x-shockwave-flash',
|
||||||
|
'sit' => 'application/x-stuffit',
|
||||||
|
'tar' => 'application/x-tar',
|
||||||
|
'tgz' => [
|
||||||
|
'application/x-tar',
|
||||||
|
'application/x-gzip-compressed',
|
||||||
|
],
|
||||||
|
'z' => 'application/x-compress',
|
||||||
|
'xhtml' => 'application/xhtml+xml',
|
||||||
|
'xht' => 'application/xhtml+xml',
|
||||||
|
'zip' => [
|
||||||
|
'application/x-zip',
|
||||||
|
'application/zip',
|
||||||
|
'application/x-zip-compressed',
|
||||||
|
'application/s-compressed',
|
||||||
|
'multipart/x-zip',
|
||||||
|
],
|
||||||
|
'rar' => [
|
||||||
|
'application/vnd.rar',
|
||||||
|
'application/x-rar',
|
||||||
|
'application/rar',
|
||||||
|
'application/x-rar-compressed',
|
||||||
|
],
|
||||||
|
'mid' => 'audio/midi',
|
||||||
|
'midi' => 'audio/midi',
|
||||||
|
'mpga' => 'audio/mpeg',
|
||||||
|
'mp2' => 'audio/mpeg',
|
||||||
|
'mp3' => [
|
||||||
|
'audio/mpeg',
|
||||||
|
'audio/mpg',
|
||||||
|
'audio/mpeg3',
|
||||||
|
'audio/mp3',
|
||||||
|
],
|
||||||
|
'aif' => [
|
||||||
|
'audio/x-aiff',
|
||||||
|
'audio/aiff',
|
||||||
|
],
|
||||||
|
'aiff' => [
|
||||||
|
'audio/x-aiff',
|
||||||
|
'audio/aiff',
|
||||||
|
],
|
||||||
|
'aifc' => 'audio/x-aiff',
|
||||||
|
'ram' => 'audio/x-pn-realaudio',
|
||||||
|
'rm' => 'audio/x-pn-realaudio',
|
||||||
|
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||||
|
'ra' => 'audio/x-realaudio',
|
||||||
|
'rv' => 'video/vnd.rn-realvideo',
|
||||||
|
'wav' => [
|
||||||
|
'audio/x-wav',
|
||||||
|
'audio/wave',
|
||||||
|
'audio/wav',
|
||||||
|
],
|
||||||
|
'bmp' => [
|
||||||
|
'image/bmp',
|
||||||
|
'image/x-bmp',
|
||||||
|
'image/x-bitmap',
|
||||||
|
'image/x-xbitmap',
|
||||||
|
'image/x-win-bitmap',
|
||||||
|
'image/x-windows-bmp',
|
||||||
|
'image/ms-bmp',
|
||||||
|
'image/x-ms-bmp',
|
||||||
|
'application/bmp',
|
||||||
|
'application/x-bmp',
|
||||||
|
'application/x-win-bitmap',
|
||||||
|
],
|
||||||
|
'gif' => 'image/gif',
|
||||||
|
'jpg' => [
|
||||||
|
'image/jpeg',
|
||||||
|
'image/pjpeg',
|
||||||
|
],
|
||||||
|
'jpeg' => [
|
||||||
|
'image/jpeg',
|
||||||
|
'image/pjpeg',
|
||||||
|
],
|
||||||
|
'jpe' => [
|
||||||
|
'image/jpeg',
|
||||||
|
'image/pjpeg',
|
||||||
|
],
|
||||||
|
'jp2' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'j2k' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'jpf' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'jpg2' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'jpx' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'jpm' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'mj2' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'mjp2' => [
|
||||||
|
'image/jp2',
|
||||||
|
'video/mj2',
|
||||||
|
'image/jpx',
|
||||||
|
'image/jpm',
|
||||||
|
],
|
||||||
|
'png' => [
|
||||||
|
'image/png',
|
||||||
|
'image/x-png',
|
||||||
|
],
|
||||||
|
'webp' => 'image/webp',
|
||||||
|
'tif' => 'image/tiff',
|
||||||
|
'tiff' => 'image/tiff',
|
||||||
|
'css' => [
|
||||||
|
'text/css',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'html' => [
|
||||||
|
'text/html',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'htm' => [
|
||||||
|
'text/html',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'shtml' => [
|
||||||
|
'text/html',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'text' => 'text/plain',
|
||||||
|
'log' => [
|
||||||
|
'text/plain',
|
||||||
|
'text/x-log',
|
||||||
|
],
|
||||||
|
'rtx' => 'text/richtext',
|
||||||
|
'rtf' => 'text/rtf',
|
||||||
|
'xml' => [
|
||||||
|
'application/xml',
|
||||||
|
'text/xml',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'xsl' => [
|
||||||
|
'application/xml',
|
||||||
|
'text/xsl',
|
||||||
|
'text/xml',
|
||||||
|
],
|
||||||
|
'mpeg' => 'video/mpeg',
|
||||||
|
'mpg' => 'video/mpeg',
|
||||||
|
'mpe' => 'video/mpeg',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
'mov' => 'video/quicktime',
|
||||||
|
'avi' => [
|
||||||
|
'video/x-msvideo',
|
||||||
|
'video/msvideo',
|
||||||
|
'video/avi',
|
||||||
|
'application/x-troff-msvideo',
|
||||||
|
],
|
||||||
|
'movie' => 'video/x-sgi-movie',
|
||||||
|
'doc' => [
|
||||||
|
'application/msword',
|
||||||
|
'application/vnd.ms-office',
|
||||||
|
],
|
||||||
|
'docx' => [
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'application/zip',
|
||||||
|
'application/msword',
|
||||||
|
'application/x-zip',
|
||||||
|
],
|
||||||
|
'dot' => [
|
||||||
|
'application/msword',
|
||||||
|
'application/vnd.ms-office',
|
||||||
|
],
|
||||||
|
'dotx' => [
|
||||||
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
'application/zip',
|
||||||
|
'application/msword',
|
||||||
|
],
|
||||||
|
'xlsx' => [
|
||||||
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
'application/zip',
|
||||||
|
'application/vnd.ms-excel',
|
||||||
|
'application/msword',
|
||||||
|
'application/x-zip',
|
||||||
|
],
|
||||||
|
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
|
||||||
|
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
||||||
|
'word' => [
|
||||||
|
'application/msword',
|
||||||
|
'application/octet-stream',
|
||||||
|
],
|
||||||
|
'xl' => 'application/excel',
|
||||||
|
'eml' => 'message/rfc822',
|
||||||
|
'json' => [
|
||||||
|
'application/json',
|
||||||
|
'text/json',
|
||||||
|
],
|
||||||
|
'pem' => [
|
||||||
|
'application/x-x509-user-cert',
|
||||||
|
'application/x-pem-file',
|
||||||
|
'application/octet-stream',
|
||||||
|
],
|
||||||
|
'p10' => [
|
||||||
|
'application/x-pkcs10',
|
||||||
|
'application/pkcs10',
|
||||||
|
],
|
||||||
|
'p12' => 'application/x-pkcs12',
|
||||||
|
'p7a' => 'application/x-pkcs7-signature',
|
||||||
|
'p7c' => [
|
||||||
|
'application/pkcs7-mime',
|
||||||
|
'application/x-pkcs7-mime',
|
||||||
|
],
|
||||||
|
'p7m' => [
|
||||||
|
'application/pkcs7-mime',
|
||||||
|
'application/x-pkcs7-mime',
|
||||||
|
],
|
||||||
|
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||||
|
'p7s' => 'application/pkcs7-signature',
|
||||||
|
'crt' => [
|
||||||
|
'application/x-x509-ca-cert',
|
||||||
|
'application/x-x509-user-cert',
|
||||||
|
'application/pkix-cert',
|
||||||
|
],
|
||||||
|
'crl' => [
|
||||||
|
'application/pkix-crl',
|
||||||
|
'application/pkcs-crl',
|
||||||
|
],
|
||||||
|
'der' => 'application/x-x509-ca-cert',
|
||||||
|
'kdb' => 'application/octet-stream',
|
||||||
|
'pgp' => 'application/pgp',
|
||||||
|
'gpg' => 'application/gpg-keys',
|
||||||
|
'sst' => 'application/octet-stream',
|
||||||
|
'csr' => 'application/octet-stream',
|
||||||
|
'rsa' => 'application/x-pkcs7',
|
||||||
|
'cer' => [
|
||||||
|
'application/pkix-cert',
|
||||||
|
'application/x-x509-ca-cert',
|
||||||
|
],
|
||||||
|
'3g2' => 'video/3gpp2',
|
||||||
|
'3gp' => [
|
||||||
|
'video/3gp',
|
||||||
|
'video/3gpp',
|
||||||
|
],
|
||||||
|
'mp4' => 'video/mp4',
|
||||||
|
'm4a' => 'audio/x-m4a',
|
||||||
|
'f4v' => [
|
||||||
|
'video/mp4',
|
||||||
|
'video/x-f4v',
|
||||||
|
],
|
||||||
|
'flv' => 'video/x-flv',
|
||||||
|
'webm' => 'video/webm',
|
||||||
|
'aac' => 'audio/x-acc',
|
||||||
|
'm4u' => 'application/vnd.mpegurl',
|
||||||
|
'm3u' => 'text/plain',
|
||||||
|
'xspf' => 'application/xspf+xml',
|
||||||
|
'vlc' => 'application/videolan',
|
||||||
|
'wmv' => [
|
||||||
|
'video/x-ms-wmv',
|
||||||
|
'video/x-ms-asf',
|
||||||
|
],
|
||||||
|
'au' => 'audio/x-au',
|
||||||
|
'ac3' => 'audio/ac3',
|
||||||
|
'flac' => 'audio/x-flac',
|
||||||
|
'ogg' => [
|
||||||
|
'audio/ogg',
|
||||||
|
'video/ogg',
|
||||||
|
'application/ogg',
|
||||||
|
],
|
||||||
|
'kmz' => [
|
||||||
|
'application/vnd.google-earth.kmz',
|
||||||
|
'application/zip',
|
||||||
|
'application/x-zip',
|
||||||
|
],
|
||||||
|
'kml' => [
|
||||||
|
'application/vnd.google-earth.kml+xml',
|
||||||
|
'application/xml',
|
||||||
|
'text/xml',
|
||||||
|
],
|
||||||
|
'ics' => 'text/calendar',
|
||||||
|
'ical' => 'text/calendar',
|
||||||
|
'zsh' => 'text/x-scriptzsh',
|
||||||
|
'7zip' => [
|
||||||
|
'application/x-compressed',
|
||||||
|
'application/x-zip-compressed',
|
||||||
|
'application/zip',
|
||||||
|
'multipart/x-zip',
|
||||||
|
],
|
||||||
|
'cdr' => [
|
||||||
|
'application/cdr',
|
||||||
|
'application/coreldraw',
|
||||||
|
'application/x-cdr',
|
||||||
|
'application/x-coreldraw',
|
||||||
|
'image/cdr',
|
||||||
|
'image/x-cdr',
|
||||||
|
'zz-application/zz-winassoc-cdr',
|
||||||
|
],
|
||||||
|
'wma' => [
|
||||||
|
'audio/x-ms-wma',
|
||||||
|
'video/x-ms-asf',
|
||||||
|
],
|
||||||
|
'jar' => [
|
||||||
|
'application/java-archive',
|
||||||
|
'application/x-java-application',
|
||||||
|
'application/x-jar',
|
||||||
|
'application/x-compressed',
|
||||||
|
],
|
||||||
|
'svg' => [
|
||||||
|
'image/svg+xml',
|
||||||
|
'image/svg',
|
||||||
|
'application/xml',
|
||||||
|
'text/xml',
|
||||||
|
],
|
||||||
|
'vcf' => 'text/x-vcard',
|
||||||
|
'srt' => [
|
||||||
|
'text/srt',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'vtt' => [
|
||||||
|
'text/vtt',
|
||||||
|
'text/plain',
|
||||||
|
],
|
||||||
|
'ico' => [
|
||||||
|
'image/x-icon',
|
||||||
|
'image/x-ico',
|
||||||
|
'image/vnd.microsoft.icon',
|
||||||
|
],
|
||||||
|
'stl' => [
|
||||||
|
'application/sla',
|
||||||
|
'application/vnd.ms-pki.stl',
|
||||||
|
'application/x-navistyle',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to determine the best mime type for the given file extension.
|
||||||
|
*
|
||||||
|
* @return string|null The mime type found, or none if unable to determine.
|
||||||
|
*/
|
||||||
|
public static function guessTypeFromExtension(string $extension)
|
||||||
|
{
|
||||||
|
$extension = trim(strtolower($extension), '. ');
|
||||||
|
|
||||||
|
if (! array_key_exists($extension, static::$mimes)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return is_array(static::$mimes[$extension]) ? static::$mimes[$extension][0] : static::$mimes[$extension];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to determine the best file extension for a given mime type.
|
||||||
|
*
|
||||||
|
* @param string|null $proposedExtension - default extension (in case there is more than one with the same mime type)
|
||||||
|
*
|
||||||
|
* @return string|null The extension determined, or null if unable to match.
|
||||||
|
*/
|
||||||
|
public static function guessExtensionFromType(string $type, ?string $proposedExtension = null)
|
||||||
|
{
|
||||||
|
$type = trim(strtolower($type), '. ');
|
||||||
|
|
||||||
|
$proposedExtension = trim(strtolower($proposedExtension ?? ''));
|
||||||
|
|
||||||
|
if (
|
||||||
|
$proposedExtension !== ''
|
||||||
|
&& array_key_exists($proposedExtension, static::$mimes)
|
||||||
|
&& in_array($type, (array) static::$mimes[$proposedExtension], true)
|
||||||
|
) {
|
||||||
|
// The detected mime type matches with the proposed extension.
|
||||||
|
return $proposedExtension;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reverse check the mime type list if no extension was proposed.
|
||||||
|
// This search is order sensitive!
|
||||||
|
foreach (static::$mimes as $ext => $types) {
|
||||||
|
if (in_array($type, (array) $types, true)) {
|
||||||
|
return $ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Modules\Modules as BaseModules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modules Configuration.
|
||||||
|
*
|
||||||
|
* NOTE: This class is required prior to Autoloader instantiation,
|
||||||
|
* and does not extend BaseConfig.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class Modules extends BaseModules
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Enable Auto-Discovery?
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If true, then auto-discovery will happen across all elements listed in
|
||||||
|
* $aliases below. If false, no auto-discovery will happen at all,
|
||||||
|
* giving a slight performance boost.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $enabled = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Enable Auto-Discovery Within Composer Packages?
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If true, then auto-discovery will happen across all namespaces loaded
|
||||||
|
* by Composer, as well as the namespaces configured locally.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $discoverInComposer = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Composer package list for Auto-Discovery
|
||||||
|
* This setting is optional.
|
||||||
|
*
|
||||||
|
* E.g.:
|
||||||
|
* [
|
||||||
|
* 'only' => [
|
||||||
|
* // List up all packages to auto-discover
|
||||||
|
* 'codeigniter4/shield',
|
||||||
|
* ],
|
||||||
|
* ]
|
||||||
|
* or
|
||||||
|
* [
|
||||||
|
* 'exclude' => [
|
||||||
|
* // List up packages to exclude.
|
||||||
|
* 'pestphp/pest',
|
||||||
|
* ],
|
||||||
|
* ]
|
||||||
|
*
|
||||||
|
* @var array{only?: list<string>, exclude?: list<string>}
|
||||||
|
*/
|
||||||
|
public $composerPackages = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Auto-Discovery Rules
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Aliases list of all discovery classes that will be active and used during
|
||||||
|
* the current application request.
|
||||||
|
*
|
||||||
|
* If it is not listed, only the base application elements will be used.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
public $aliases = [
|
||||||
|
'events',
|
||||||
|
'filters',
|
||||||
|
'registrars',
|
||||||
|
'routes',
|
||||||
|
'services',
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Pager extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Templates
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Pagination links are rendered out using views to configure their
|
||||||
|
* appearance. This array contains aliases and the view names to
|
||||||
|
* use when rendering the links.
|
||||||
|
*
|
||||||
|
* Within each view, the Pager object will be available as $pager,
|
||||||
|
* and the desired group as $pagerGroup;
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $templates = [
|
||||||
|
'default_full' => 'CodeIgniter\Pager\Views\default_full',
|
||||||
|
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
|
||||||
|
'default_head' => 'CodeIgniter\Pager\Views\default_head',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Items Per Page
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The default number of results shown in a single page.
|
||||||
|
*/
|
||||||
|
public int $perPage = 20;
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paths
|
||||||
|
*
|
||||||
|
* Holds the paths that are used by the system to
|
||||||
|
* locate the main directories, app, system, etc.
|
||||||
|
*
|
||||||
|
* Modifying these allows you to restructure your application,
|
||||||
|
* share a system folder between multiple applications, and more.
|
||||||
|
*
|
||||||
|
* All paths are relative to the project's root folder.
|
||||||
|
*
|
||||||
|
* NOTE: This class is required prior to Autoloader instantiation,
|
||||||
|
* and does not extend BaseConfig.
|
||||||
|
*
|
||||||
|
* @immutable
|
||||||
|
*/
|
||||||
|
class Paths
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
* SYSTEM FOLDER NAME
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This must contain the name of your "system" folder. Include
|
||||||
|
* the path if the folder is not in the same directory as this file.
|
||||||
|
*/
|
||||||
|
public string $systemDirectory = __DIR__ . '/../../system';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
* APPLICATION FOLDER NAME
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If you want this front controller to use a different "app"
|
||||||
|
* folder than the default one you can set its name here. The folder
|
||||||
|
* can also be renamed or relocated anywhere on your server. If
|
||||||
|
* you do, use a full server path.
|
||||||
|
*
|
||||||
|
* @see http://codeigniter.com/user_guide/general/managing_apps.html
|
||||||
|
*/
|
||||||
|
public string $appDirectory = __DIR__ . '/..';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
* WRITABLE DIRECTORY NAME
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This variable must contain the name of your "writable" directory.
|
||||||
|
* The writable directory allows you to group all directories that
|
||||||
|
* need write permission to a single place that can be tucked away
|
||||||
|
* for maximum security, keeping it out of the app and/or
|
||||||
|
* system directories.
|
||||||
|
*/
|
||||||
|
public string $writableDirectory = __DIR__ . '/../../writable';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
* TESTS DIRECTORY NAME
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This variable must contain the name of your "tests" directory.
|
||||||
|
*/
|
||||||
|
public string $testsDirectory = __DIR__ . '/../../tests';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
* VIEW DIRECTORY NAME
|
||||||
|
* ---------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This variable must contain the name of the directory that
|
||||||
|
* contains the view files used by your application. By
|
||||||
|
* default this is in `app/Views`. This value
|
||||||
|
* is used when no value is provided to `Services::renderer()`.
|
||||||
|
*/
|
||||||
|
public string $viewDirectory = __DIR__ . '/../Views';
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\Publisher as BasePublisher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publisher Configuration
|
||||||
|
*
|
||||||
|
* Defines basic security restrictions for the Publisher class
|
||||||
|
* to prevent abuse by injecting malicious files into a project.
|
||||||
|
*/
|
||||||
|
class Publisher extends BasePublisher
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A list of allowed destinations with a (pseudo-)regex
|
||||||
|
* of allowed files for each destination.
|
||||||
|
* Attempts to publish to directories not in this list will
|
||||||
|
* result in a PublisherException. Files that do no fit the
|
||||||
|
* pattern will cause copy/merge to fail.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public $restrictions = [
|
||||||
|
ROOTPATH => '*',
|
||||||
|
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use CodeIgniter\Router\RouteCollection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var RouteCollection $routes
|
||||||
|
*/
|
||||||
|
|
||||||
|
$routes->get('/login', 'Auth::index');
|
||||||
|
$routes->post('/proses_login', 'Auth::login_aksi');
|
||||||
|
$routes->get('/logout', 'Auth::proses_logout');
|
||||||
|
|
||||||
|
$routes->get('/', 'Auth::index');
|
||||||
|
$routes->get('/index', 'Home::index');
|
||||||
|
$routes->post('/home', 'Home::index');
|
||||||
|
$routes->get('/home/generatePdf/(:num)', 'Home::cetakRapor/$1');
|
||||||
|
|
||||||
|
//Guru
|
||||||
|
$routes->get('/guru/list', 'Guru::index');
|
||||||
|
$routes->get('/guru/input', 'Guru::input');
|
||||||
|
$routes->post('/guru/insert', 'Guru::insert');
|
||||||
|
$routes->get('guru/edit/(:num)', 'Guru::edit/$1');
|
||||||
|
$routes->post('/guru/update/(:num)', 'Guru::update/$1');
|
||||||
|
$routes->get('guru/delete/(:num)', 'Guru::delete/$1');
|
||||||
|
$routes->get('guru/restore/(:num)', 'Guru::restore/$1');
|
||||||
|
|
||||||
|
//Absensi
|
||||||
|
$routes->get('/absensi/list', 'Absensi::index');
|
||||||
|
$routes->get('/absensi/input', 'Absensi::input');
|
||||||
|
$routes->post('/absensi/insert', 'Absensi::insert');
|
||||||
|
$routes->post('/absensi/import', 'Absensi::insertExcel');
|
||||||
|
$routes->get('absensi/edit/(:num)', 'Absensi::edit/$1');
|
||||||
|
$routes->post('/absensi/update/(:num)', 'Absensi::update/$1');
|
||||||
|
$routes->get('absensi/delete/(:num)', 'Absensi::delete/$1');
|
||||||
|
|
||||||
|
//Jurnal
|
||||||
|
$routes->get('/jurnal/list', 'Jurnal::index');
|
||||||
|
$routes->get('/jurnal/input', 'Jurnal::input');
|
||||||
|
$routes->post('/jurnal/insert', 'Jurnal::insert');
|
||||||
|
$routes->get('jurnal/edit/(:num)', 'Jurnal::edit/$1');
|
||||||
|
$routes->post('/jurnal/update/(:num)', 'Jurnal::update/$1');
|
||||||
|
$routes->get('jurnal/delete/(:num)', 'Jurnal::delete/$1');
|
||||||
|
|
||||||
|
//Jurnal ALL
|
||||||
|
$routes->get('/jurnal/listAll', 'Jurnal::index2');
|
||||||
|
$routes->get('/jurnal/input2', 'Jurnal::input2');
|
||||||
|
$routes->get('jurnal/edit2/(:num)', 'Jurnal::edit2/$1');
|
||||||
|
|
||||||
|
|
||||||
|
//Amal
|
||||||
|
$routes->get('/amal/list', 'Amal::index');
|
||||||
|
$routes->get('/amal/input', 'Amal::input');
|
||||||
|
$routes->post('/amal/insert', 'Amal::insert');
|
||||||
|
$routes->get('amal/edit/(:num)', 'Amal::edit/$1');
|
||||||
|
$routes->post('/amal/update/(:num)', 'Amal::update/$1');
|
||||||
|
$routes->get('amal/delete/(:num)', 'Amal::delete/$1');
|
||||||
|
|
||||||
|
//Surat
|
||||||
|
$routes->get('/surat/list', 'Surat::index');
|
||||||
|
$routes->get('/surat/input', 'Surat::input');
|
||||||
|
$routes->post('/surat/insert', 'Surat::insert');
|
||||||
|
$routes->get('surat/edit/(:num)', 'Surat::edit/$1');
|
||||||
|
$routes->post('/surat/update/(:num)', 'Surat::update/$1');
|
||||||
|
$routes->get('surat/delete/(:num)', 'Surat::delete/$1');
|
||||||
|
|
||||||
|
//Kriteria
|
||||||
|
$routes->get('/kriteria/list', 'Kriteria::index');
|
||||||
|
$routes->get('/kriteria/input', 'Kriteria::input');
|
||||||
|
$routes->post('/kriteria/insert', 'Kriteria::insert');
|
||||||
|
$routes->get('kriteria/edit/(:num)', 'Kriteria::edit/$1');
|
||||||
|
$routes->post('/kriteria/update/(:num)', 'Kriteria::update/$1');
|
||||||
|
$routes->get('kriteria/delete/(:num)', 'Kriteria::delete/$1');
|
||||||
|
|
||||||
|
//Kategori
|
||||||
|
$routes->get('/kategori/list', 'Kategori::index');
|
||||||
|
$routes->get('/kategori/input', 'Kategori::input');
|
||||||
|
$routes->post('/kategori/insert', 'Kategori::insert');
|
||||||
|
$routes->get('kategori/edit/(:num)', 'Kategori::edit/$1');
|
||||||
|
$routes->post('/kategori/update/(:num)', 'Kategori::update/$1');
|
||||||
|
$routes->get('kategori/delete/(:num)', 'Kategori::delete/$1');
|
||||||
|
|
||||||
|
//Penilaian
|
||||||
|
$routes->get('/penilaian/list', 'Penilaian::index');
|
||||||
|
$routes->post('/penilaian/index', 'Penilaian::index');
|
||||||
|
$routes->post('/penilaian/insert', 'Penilaian::insert');
|
||||||
|
$routes->get('penilaian/edit/(:num)', 'Penilaian::edit/$1');
|
||||||
|
$routes->post('/penilaian/update/(:num)', 'Penilaian::update/$1');
|
||||||
|
$routes->get('penilaian/delete/(:num)', 'Penilaian::delete/$1');
|
||||||
|
$routes->get('/penilaian/generatePdf/(:num)', 'Penilaian::cetakPenilaian/$1');
|
||||||
|
|
||||||
|
//Evaluasi
|
||||||
|
$routes->get('/evaluasi/list', 'Evaluasi::index');
|
||||||
|
$routes->post('/evaluasi/index', 'Evaluasi::index');
|
||||||
|
$routes->get('evaluasi/input/(:num)', 'Evaluasi::input/$1');
|
||||||
|
$routes->post('/evaluasi/insert/(:num)', 'Evaluasi::insert/$1');
|
||||||
|
$routes->get('evaluasi/edit/(:num)', 'Evaluasi::edit/$1');
|
||||||
|
$routes->post('/evaluasi/update/(:num)', 'Evaluasi::update/$1');
|
||||||
|
$routes->get('evaluasi/delete/(:num)', 'Evaluasi::delete/$1');
|
||||||
|
$routes->get('/evaluasi/generatePdf/(:num)', 'Evaluasi::cetakRapor/$1');
|
||||||
|
|
||||||
|
//Perhitungan
|
||||||
|
$routes->get('/perhitungan/list', 'Perhitungan::index');
|
||||||
|
$routes->post('/perhitungan/index', 'Perhitungan::index');
|
||||||
|
|
||||||
|
//Hasil Akhir
|
||||||
|
$routes->get('/hasil/list', 'Hasil::index');
|
||||||
|
$routes->post('/hasil/index', 'Hasil::index');
|
||||||
|
$routes->get('/hasil/input', 'Kriteria::input');
|
||||||
|
$routes->post('/kriteria/insert', 'Kriteria::insert');
|
||||||
|
$routes->get('kriteria/edit/(:num)', 'Kriteria::edit/$1');
|
||||||
|
$routes->post('/kriteria/update/(:num)', 'Kriteria::update/$1');
|
||||||
|
$routes->get('kriteria/delete/(:num)', 'Kriteria::delete/$1');
|
|
@ -0,0 +1,113 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of CodeIgniter 4 framework.
|
||||||
|
*
|
||||||
|
* (c) CodeIgniter Foundation <admin@codeigniter.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\Routing as BaseRouting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Routing configuration
|
||||||
|
*/
|
||||||
|
class Routing extends BaseRouting
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* An array of files that contain route definitions.
|
||||||
|
* Route files are read in order, with the first match
|
||||||
|
* found taking precedence.
|
||||||
|
*
|
||||||
|
* Default: APPPATH . 'Config/Routes.php'
|
||||||
|
*/
|
||||||
|
public array $routeFiles = [
|
||||||
|
APPPATH . 'Config/Routes.php',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default namespace to use for Controllers when no other
|
||||||
|
* namespace has been specified.
|
||||||
|
*
|
||||||
|
* Default: 'App\Controllers'
|
||||||
|
*/
|
||||||
|
public string $defaultNamespace = 'App\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default controller to use when no other controller has been
|
||||||
|
* specified.
|
||||||
|
*
|
||||||
|
* Default: 'Home'
|
||||||
|
*/
|
||||||
|
public string $defaultController = 'Home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default method to call on the controller when no other
|
||||||
|
* method has been set in the route.
|
||||||
|
*
|
||||||
|
* Default: 'index'
|
||||||
|
*/
|
||||||
|
public string $defaultMethod = 'index';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to translate dashes in URIs to underscores.
|
||||||
|
* Primarily useful when using the auto-routing.
|
||||||
|
*
|
||||||
|
* Default: false
|
||||||
|
*/
|
||||||
|
public bool $translateURIDashes = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the class/method that should be called if routing doesn't
|
||||||
|
* find a match. It can be either a closure or the controller/method
|
||||||
|
* name exactly like a route is defined: Users::index
|
||||||
|
*
|
||||||
|
* This setting is passed to the Router class and handled there.
|
||||||
|
*
|
||||||
|
* If you want to use a closure, you will have to set it in the
|
||||||
|
* class constructor or the routes file by calling:
|
||||||
|
*
|
||||||
|
* $routes->set404Override(function() {
|
||||||
|
* // Do something here
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* public $override404 = 'App\Errors::show404';
|
||||||
|
*/
|
||||||
|
public ?string $override404 = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If TRUE, the system will attempt to match the URI against
|
||||||
|
* Controllers by matching each segment against folders/files
|
||||||
|
* in APPPATH/Controllers, when a match wasn't found against
|
||||||
|
* defined routes.
|
||||||
|
*
|
||||||
|
* If FALSE, will stop searching and do NO automatic routing.
|
||||||
|
*/
|
||||||
|
public bool $autoRoute = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If TRUE, will enable the use of the 'prioritize' option
|
||||||
|
* when defining routes.
|
||||||
|
*
|
||||||
|
* Default: false
|
||||||
|
*/
|
||||||
|
public bool $prioritize = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map of URI segments and namespaces. For Auto Routing (Improved).
|
||||||
|
*
|
||||||
|
* The key is the first URI segment. The value is the controller namespace.
|
||||||
|
* E.g.,
|
||||||
|
* [
|
||||||
|
* 'blog' => 'Acme\Blog\Controllers',
|
||||||
|
* ]
|
||||||
|
*
|
||||||
|
* @var array [ uri_segment => namespace ]
|
||||||
|
*/
|
||||||
|
public array $moduleRoutes = [];
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
class Security extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Protection Method
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Protection Method for Cross Site Request Forgery protection.
|
||||||
|
*
|
||||||
|
* @var string 'cookie' or 'session'
|
||||||
|
*/
|
||||||
|
public string $csrfProtection = 'cookie';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Token Randomization
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Randomize the CSRF Token for added security.
|
||||||
|
*/
|
||||||
|
public bool $tokenRandomize = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Token Name
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Token name for Cross Site Request Forgery protection.
|
||||||
|
*/
|
||||||
|
public string $tokenName = 'csrf_test_name';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Header Name
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Header name for Cross Site Request Forgery protection.
|
||||||
|
*/
|
||||||
|
public string $headerName = 'X-CSRF-TOKEN';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Cookie Name
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Cookie name for Cross Site Request Forgery protection.
|
||||||
|
*/
|
||||||
|
public string $cookieName = 'csrf_cookie_name';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Expires
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Expiration time for Cross Site Request Forgery protection cookie.
|
||||||
|
*
|
||||||
|
* Defaults to two hours (in seconds).
|
||||||
|
*/
|
||||||
|
public int $expires = 7200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Regenerate
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Regenerate CSRF Token on every submission.
|
||||||
|
*/
|
||||||
|
public bool $regenerate = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF Redirect
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Redirect to previous page with error on failure.
|
||||||
|
*/
|
||||||
|
public bool $redirect = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* CSRF SameSite
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Setting for CSRF SameSite cookie token.
|
||||||
|
*
|
||||||
|
* Allowed values are: None - Lax - Strict - ''.
|
||||||
|
*
|
||||||
|
* Defaults to `Lax` as recommended in this link:
|
||||||
|
*
|
||||||
|
* @see https://portswigger.net/web-security/csrf/samesite-cookies
|
||||||
|
*
|
||||||
|
* @deprecated `Config\Cookie` $samesite property is used.
|
||||||
|
*/
|
||||||
|
public string $samesite = 'Lax';
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Services Configuration file.
|
||||||
|
*
|
||||||
|
* Services are simply other classes/libraries that the system uses
|
||||||
|
* to do its job. This is used by CodeIgniter to allow the core of the
|
||||||
|
* framework to be swapped out easily without affecting the usage within
|
||||||
|
* the rest of your application.
|
||||||
|
*
|
||||||
|
* This file holds any application-specific services, or service overrides
|
||||||
|
* that you might need. An example has been included with the general
|
||||||
|
* method format you should use for your service methods. For more examples,
|
||||||
|
* see the core Services file at system/Config/Services.php.
|
||||||
|
*/
|
||||||
|
class Services extends BaseService
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* public static function example($getShared = true)
|
||||||
|
* {
|
||||||
|
* if ($getShared) {
|
||||||
|
* return static::getSharedInstance('example');
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* return new \CodeIgniter\Example();
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Session\Handlers\BaseHandler;
|
||||||
|
use CodeIgniter\Session\Handlers\FileHandler;
|
||||||
|
|
||||||
|
class Session extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Driver
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The session storage driver to use:
|
||||||
|
* - `CodeIgniter\Session\Handlers\FileHandler`
|
||||||
|
* - `CodeIgniter\Session\Handlers\DatabaseHandler`
|
||||||
|
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
|
||||||
|
* - `CodeIgniter\Session\Handlers\RedisHandler`
|
||||||
|
*
|
||||||
|
* @var class-string<BaseHandler>
|
||||||
|
*/
|
||||||
|
public string $driver = FileHandler::class;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Cookie Name
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The session cookie name, must contain only [0-9a-z_-] characters
|
||||||
|
*/
|
||||||
|
public string $cookieName = 'ci_session';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Expiration
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The number of SECONDS you want the session to last.
|
||||||
|
* Setting to 0 (zero) means expire when the browser is closed.
|
||||||
|
*/
|
||||||
|
public int $expiration = 7200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Save Path
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The location to save sessions to and is driver dependent.
|
||||||
|
*
|
||||||
|
* For the 'files' driver, it's a path to a writable directory.
|
||||||
|
* WARNING: Only absolute paths are supported!
|
||||||
|
*
|
||||||
|
* For the 'database' driver, it's a table name.
|
||||||
|
* Please read up the manual for the format with other session drivers.
|
||||||
|
*
|
||||||
|
* IMPORTANT: You are REQUIRED to set a valid save path!
|
||||||
|
*/
|
||||||
|
public string $savePath = WRITEPATH . 'session';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Match IP
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Whether to match the user's IP address when reading the session data.
|
||||||
|
*
|
||||||
|
* WARNING: If you're using the database driver, don't forget to update
|
||||||
|
* your session table's PRIMARY KEY when changing this setting.
|
||||||
|
*/
|
||||||
|
public bool $matchIP = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Time to Update
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* How many seconds between CI regenerating the session ID.
|
||||||
|
*/
|
||||||
|
public int $timeToUpdate = 300;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Regenerate Destroy
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Whether to destroy session data associated with the old session ID
|
||||||
|
* when auto-regenerating the session ID. When set to FALSE, the data
|
||||||
|
* will be later deleted by the garbage collector.
|
||||||
|
*/
|
||||||
|
public bool $regenerateDestroy = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Session Database Group
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* DB Group for the database session.
|
||||||
|
*/
|
||||||
|
public ?string $DBGroup = null;
|
||||||
|
}
|
|
@ -0,0 +1,118 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Database;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Events;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Files;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Logs;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Routes;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Timers;
|
||||||
|
use CodeIgniter\Debug\Toolbar\Collectors\Views;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Debug Toolbar
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The Debug Toolbar provides a way to see information about the performance
|
||||||
|
* and state of your application during that page display. By default it will
|
||||||
|
* NOT be displayed under production environments, and will only display if
|
||||||
|
* `CI_DEBUG` is true, since if it's not, there's not much to display anyway.
|
||||||
|
*/
|
||||||
|
class Toolbar extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Toolbar Collectors
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* List of toolbar collectors that will be called when Debug Toolbar
|
||||||
|
* fires up and collects data from.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public array $collectors = [
|
||||||
|
Timers::class,
|
||||||
|
Database::class,
|
||||||
|
Logs::class,
|
||||||
|
Views::class,
|
||||||
|
// \CodeIgniter\Debug\Toolbar\Collectors\Cache::class,
|
||||||
|
Files::class,
|
||||||
|
Routes::class,
|
||||||
|
Events::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Collect Var Data
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If set to false var data from the views will not be colleted. Useful to
|
||||||
|
* avoid high memory usage when there are lots of data passed to the view.
|
||||||
|
*/
|
||||||
|
public bool $collectVarData = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Max History
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* `$maxHistory` sets a limit on the number of past requests that are stored,
|
||||||
|
* helping to conserve file space used to store them. You can set it to
|
||||||
|
* 0 (zero) to not have any history stored, or -1 for unlimited history.
|
||||||
|
*/
|
||||||
|
public int $maxHistory = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Toolbar Views Path
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The full path to the the views that are used by the toolbar.
|
||||||
|
* This MUST have a trailing slash.
|
||||||
|
*/
|
||||||
|
public string $viewsPath = SYSTEMPATH . 'Debug/Toolbar/Views/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Max Queries
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* If the Database Collector is enabled, it will log every query that the
|
||||||
|
* the system generates so they can be displayed on the toolbar's timeline
|
||||||
|
* and in the query log. This can lead to memory issues in some instances
|
||||||
|
* with hundreds of queries.
|
||||||
|
*
|
||||||
|
* `$maxQueries` defines the maximum amount of queries that will be stored.
|
||||||
|
*/
|
||||||
|
public int $maxQueries = 100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Watched Directories
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Contains an array of directories that will be watched for changes and
|
||||||
|
* used to determine if the hot-reload feature should reload the page or not.
|
||||||
|
* We restrict the values to keep performance as high as possible.
|
||||||
|
*
|
||||||
|
* NOTE: The ROOTPATH will be prepended to all values.
|
||||||
|
*/
|
||||||
|
public array $watchedDirectories = [
|
||||||
|
'app',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
* Watched File Extensions
|
||||||
|
* --------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Contains an array of file extensions that will be watched for changes and
|
||||||
|
* used to determine if the hot-reload feature should reload the page or not.
|
||||||
|
*/
|
||||||
|
public array $watchedExtensions = [
|
||||||
|
'php', 'css', 'js', 'html', 'svg', 'json', 'env',
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,252 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* User Agents
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file contains four arrays of user agent data. It is used by the
|
||||||
|
* User Agent Class to help identify browser, platform, robot, and
|
||||||
|
* mobile device data. The array keys are used to identify the device
|
||||||
|
* and the array values are used to set the actual name of the item.
|
||||||
|
*/
|
||||||
|
class UserAgents extends BaseConfig
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* OS Platforms
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $platforms = [
|
||||||
|
'windows nt 10.0' => 'Windows 10',
|
||||||
|
'windows nt 6.3' => 'Windows 8.1',
|
||||||
|
'windows nt 6.2' => 'Windows 8',
|
||||||
|
'windows nt 6.1' => 'Windows 7',
|
||||||
|
'windows nt 6.0' => 'Windows Vista',
|
||||||
|
'windows nt 5.2' => 'Windows 2003',
|
||||||
|
'windows nt 5.1' => 'Windows XP',
|
||||||
|
'windows nt 5.0' => 'Windows 2000',
|
||||||
|
'windows nt 4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt 4.0' => 'Windows NT',
|
||||||
|
'winnt' => 'Windows NT',
|
||||||
|
'windows 98' => 'Windows 98',
|
||||||
|
'win98' => 'Windows 98',
|
||||||
|
'windows 95' => 'Windows 95',
|
||||||
|
'win95' => 'Windows 95',
|
||||||
|
'windows phone' => 'Windows Phone',
|
||||||
|
'windows' => 'Unknown Windows OS',
|
||||||
|
'android' => 'Android',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'iphone' => 'iOS',
|
||||||
|
'ipad' => 'iOS',
|
||||||
|
'ipod' => 'iOS',
|
||||||
|
'os x' => 'Mac OS X',
|
||||||
|
'ppc mac' => 'Power PC Mac',
|
||||||
|
'freebsd' => 'FreeBSD',
|
||||||
|
'ppc' => 'Macintosh',
|
||||||
|
'linux' => 'Linux',
|
||||||
|
'debian' => 'Debian',
|
||||||
|
'sunos' => 'Sun Solaris',
|
||||||
|
'beos' => 'BeOS',
|
||||||
|
'apachebench' => 'ApacheBench',
|
||||||
|
'aix' => 'AIX',
|
||||||
|
'irix' => 'Irix',
|
||||||
|
'osf' => 'DEC OSF',
|
||||||
|
'hp-ux' => 'HP-UX',
|
||||||
|
'netbsd' => 'NetBSD',
|
||||||
|
'bsdi' => 'BSDi',
|
||||||
|
'openbsd' => 'OpenBSD',
|
||||||
|
'gnu' => 'GNU/Linux',
|
||||||
|
'unix' => 'Unknown Unix OS',
|
||||||
|
'symbian' => 'Symbian OS',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Browsers
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The order of this array should NOT be changed. Many browsers return
|
||||||
|
* multiple browser types so we want to identify the subtype first.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $browsers = [
|
||||||
|
'OPR' => 'Opera',
|
||||||
|
'Flock' => 'Flock',
|
||||||
|
'Edge' => 'Spartan',
|
||||||
|
'Edg' => 'Edge',
|
||||||
|
'Chrome' => 'Chrome',
|
||||||
|
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
||||||
|
'Opera.*?Version' => 'Opera',
|
||||||
|
'Opera' => 'Opera',
|
||||||
|
'MSIE' => 'Internet Explorer',
|
||||||
|
'Internet Explorer' => 'Internet Explorer',
|
||||||
|
'Trident.* rv' => 'Internet Explorer',
|
||||||
|
'Shiira' => 'Shiira',
|
||||||
|
'Firefox' => 'Firefox',
|
||||||
|
'Chimera' => 'Chimera',
|
||||||
|
'Phoenix' => 'Phoenix',
|
||||||
|
'Firebird' => 'Firebird',
|
||||||
|
'Camino' => 'Camino',
|
||||||
|
'Netscape' => 'Netscape',
|
||||||
|
'OmniWeb' => 'OmniWeb',
|
||||||
|
'Safari' => 'Safari',
|
||||||
|
'Mozilla' => 'Mozilla',
|
||||||
|
'Konqueror' => 'Konqueror',
|
||||||
|
'icab' => 'iCab',
|
||||||
|
'Lynx' => 'Lynx',
|
||||||
|
'Links' => 'Links',
|
||||||
|
'hotjava' => 'HotJava',
|
||||||
|
'amaya' => 'Amaya',
|
||||||
|
'IBrowse' => 'IBrowse',
|
||||||
|
'Maxthon' => 'Maxthon',
|
||||||
|
'Ubuntu' => 'Ubuntu Web Browser',
|
||||||
|
'Vivaldi' => 'Vivaldi',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Mobiles
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $mobiles = [
|
||||||
|
// legacy array, old values commented out
|
||||||
|
'mobileexplorer' => 'Mobile Explorer',
|
||||||
|
// 'openwave' => 'Open Wave',
|
||||||
|
// 'opera mini' => 'Opera Mini',
|
||||||
|
// 'operamini' => 'Opera Mini',
|
||||||
|
// 'elaine' => 'Palm',
|
||||||
|
'palmsource' => 'Palm',
|
||||||
|
// 'digital paths' => 'Palm',
|
||||||
|
// 'avantgo' => 'Avantgo',
|
||||||
|
// 'xiino' => 'Xiino',
|
||||||
|
'palmscape' => 'Palmscape',
|
||||||
|
// 'nokia' => 'Nokia',
|
||||||
|
// 'ericsson' => 'Ericsson',
|
||||||
|
// 'blackberry' => 'BlackBerry',
|
||||||
|
// 'motorola' => 'Motorola'
|
||||||
|
|
||||||
|
// Phones and Manufacturers
|
||||||
|
'motorola' => 'Motorola',
|
||||||
|
'nokia' => 'Nokia',
|
||||||
|
'palm' => 'Palm',
|
||||||
|
'iphone' => 'Apple iPhone',
|
||||||
|
'ipad' => 'iPad',
|
||||||
|
'ipod' => 'Apple iPod Touch',
|
||||||
|
'sony' => 'Sony Ericsson',
|
||||||
|
'ericsson' => 'Sony Ericsson',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'cocoon' => 'O2 Cocoon',
|
||||||
|
'blazer' => 'Treo',
|
||||||
|
'lg' => 'LG',
|
||||||
|
'amoi' => 'Amoi',
|
||||||
|
'xda' => 'XDA',
|
||||||
|
'mda' => 'MDA',
|
||||||
|
'vario' => 'Vario',
|
||||||
|
'htc' => 'HTC',
|
||||||
|
'samsung' => 'Samsung',
|
||||||
|
'sharp' => 'Sharp',
|
||||||
|
'sie-' => 'Siemens',
|
||||||
|
'alcatel' => 'Alcatel',
|
||||||
|
'benq' => 'BenQ',
|
||||||
|
'ipaq' => 'HP iPaq',
|
||||||
|
'mot-' => 'Motorola',
|
||||||
|
'playstation portable' => 'PlayStation Portable',
|
||||||
|
'playstation 3' => 'PlayStation 3',
|
||||||
|
'playstation vita' => 'PlayStation Vita',
|
||||||
|
'hiptop' => 'Danger Hiptop',
|
||||||
|
'nec-' => 'NEC',
|
||||||
|
'panasonic' => 'Panasonic',
|
||||||
|
'philips' => 'Philips',
|
||||||
|
'sagem' => 'Sagem',
|
||||||
|
'sanyo' => 'Sanyo',
|
||||||
|
'spv' => 'SPV',
|
||||||
|
'zte' => 'ZTE',
|
||||||
|
'sendo' => 'Sendo',
|
||||||
|
'nintendo dsi' => 'Nintendo DSi',
|
||||||
|
'nintendo ds' => 'Nintendo DS',
|
||||||
|
'nintendo 3ds' => 'Nintendo 3DS',
|
||||||
|
'wii' => 'Nintendo Wii',
|
||||||
|
'open web' => 'Open Web',
|
||||||
|
'openweb' => 'OpenWeb',
|
||||||
|
|
||||||
|
// Operating Systems
|
||||||
|
'android' => 'Android',
|
||||||
|
'symbian' => 'Symbian',
|
||||||
|
'SymbianOS' => 'SymbianOS',
|
||||||
|
'elaine' => 'Palm',
|
||||||
|
'series60' => 'Symbian S60',
|
||||||
|
'windows ce' => 'Windows CE',
|
||||||
|
|
||||||
|
// Browsers
|
||||||
|
'obigo' => 'Obigo',
|
||||||
|
'netfront' => 'Netfront Browser',
|
||||||
|
'openwave' => 'Openwave Browser',
|
||||||
|
'mobilexplorer' => 'Mobile Explorer',
|
||||||
|
'operamini' => 'Opera Mini',
|
||||||
|
'opera mini' => 'Opera Mini',
|
||||||
|
'opera mobi' => 'Opera Mobile',
|
||||||
|
'fennec' => 'Firefox Mobile',
|
||||||
|
|
||||||
|
// Other
|
||||||
|
'digital paths' => 'Digital Paths',
|
||||||
|
'avantgo' => 'AvantGo',
|
||||||
|
'xiino' => 'Xiino',
|
||||||
|
'novarra' => 'Novarra Transcoder',
|
||||||
|
'vodafone' => 'Vodafone',
|
||||||
|
'docomo' => 'NTT DoCoMo',
|
||||||
|
'o2' => 'O2',
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
'mobile' => 'Generic Mobile',
|
||||||
|
'wireless' => 'Generic Mobile',
|
||||||
|
'j2me' => 'Generic Mobile',
|
||||||
|
'midp' => 'Generic Mobile',
|
||||||
|
'cldc' => 'Generic Mobile',
|
||||||
|
'up.link' => 'Generic Mobile',
|
||||||
|
'up.browser' => 'Generic Mobile',
|
||||||
|
'smartphone' => 'Generic Mobile',
|
||||||
|
'cellphone' => 'Generic Mobile',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
* Robots
|
||||||
|
* -------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* There are hundred of bots but these are the most common.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $robots = [
|
||||||
|
'googlebot' => 'Googlebot',
|
||||||
|
'msnbot' => 'MSNBot',
|
||||||
|
'baiduspider' => 'Baiduspider',
|
||||||
|
'bingbot' => 'Bing',
|
||||||
|
'slurp' => 'Inktomi Slurp',
|
||||||
|
'yahoo' => 'Yahoo',
|
||||||
|
'ask jeeves' => 'Ask Jeeves',
|
||||||
|
'fastcrawler' => 'FastCrawler',
|
||||||
|
'infoseek' => 'InfoSeek Robot 1.0',
|
||||||
|
'lycos' => 'Lycos',
|
||||||
|
'yandex' => 'YandexBot',
|
||||||
|
'mediapartners-google' => 'MediaPartners Google',
|
||||||
|
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
|
||||||
|
'adsbot-google' => 'AdsBot Google',
|
||||||
|
'feedfetcher-google' => 'Feedfetcher Google',
|
||||||
|
'curious george' => 'Curious George',
|
||||||
|
'ia_archiver' => 'Alexa Crawler',
|
||||||
|
'MJ12bot' => 'Majestic-12',
|
||||||
|
'Uptimebot' => 'Uptimebot',
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\BaseConfig;
|
||||||
|
use CodeIgniter\Validation\StrictRules\CreditCardRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\FileRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\FormatRules;
|
||||||
|
use CodeIgniter\Validation\StrictRules\Rules;
|
||||||
|
|
||||||
|
class Validation extends BaseConfig
|
||||||
|
{
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// Setup
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores the classes that contain the
|
||||||
|
* rules that are available.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public array $ruleSets = [
|
||||||
|
Rules::class,
|
||||||
|
FormatRules::class,
|
||||||
|
FileRules::class,
|
||||||
|
CreditCardRules::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the views that are used to display the
|
||||||
|
* errors.
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
*/
|
||||||
|
public array $templates = [
|
||||||
|
'list' => 'CodeIgniter\Validation\Views\list',
|
||||||
|
'single' => 'CodeIgniter\Validation\Views\single',
|
||||||
|
];
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
// Rules
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Config;
|
||||||
|
|
||||||
|
use CodeIgniter\Config\View as BaseView;
|
||||||
|
use CodeIgniter\View\ViewDecoratorInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-type ParserCallable (callable(mixed): mixed)
|
||||||
|
* @phpstan-type ParserCallableString (callable(mixed): mixed)&string
|
||||||
|
*/
|
||||||
|
class View extends BaseView
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* When false, the view method will clear the data between each
|
||||||
|
* call. This keeps your data safe and ensures there is no accidental
|
||||||
|
* leaking between calls, so you would need to explicitly pass the data
|
||||||
|
* to each view. You might prefer to have the data stick around between
|
||||||
|
* calls so that it is available to all views. If that is the case,
|
||||||
|
* set $saveData to true.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $saveData = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parser Filters map a filter name with any PHP callable. When the
|
||||||
|
* Parser prepares a variable for display, it will chain it
|
||||||
|
* through the filters in the order defined, inserting any parameters.
|
||||||
|
* To prevent potential abuse, all filters MUST be defined here
|
||||||
|
* in order for them to be available for use within the Parser.
|
||||||
|
*
|
||||||
|
* Examples:
|
||||||
|
* { title|esc(js) }
|
||||||
|
* { created_on|date(Y-m-d)|esc(attr) }
|
||||||
|
*
|
||||||
|
* @var array<string, string>
|
||||||
|
* @phpstan-var array<string, ParserCallableString>
|
||||||
|
*/
|
||||||
|
public $filters = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parser Plugins provide a way to extend the functionality provided
|
||||||
|
* by the core Parser by creating aliases that will be replaced with
|
||||||
|
* any callable. Can be single or tag pair.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string>|callable|string>
|
||||||
|
* @phpstan-var array<string, array<ParserCallableString>|ParserCallableString|ParserCallable>
|
||||||
|
*/
|
||||||
|
public $plugins = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View Decorators are class methods that will be run in sequence to
|
||||||
|
* have a chance to alter the generated output just prior to caching
|
||||||
|
* the results.
|
||||||
|
*
|
||||||
|
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
|
||||||
|
*
|
||||||
|
* @var class-string<ViewDecoratorInterface>[]
|
||||||
|
*/
|
||||||
|
public array $decorators = [];
|
||||||
|
}
|
|
@ -0,0 +1,189 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelAbsensi;
|
||||||
|
|
||||||
|
class Absensi extends BaseController
|
||||||
|
{
|
||||||
|
protected $AbsensiModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->AbsensiModel = new ModelAbsensi();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Absensi/list',
|
||||||
|
'absensi' => $this->AbsensiModel->getAbsensi(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Absensi/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$data = array(
|
||||||
|
'bulan' => $this->request->getPost('bulan'),
|
||||||
|
'tahun' => $this->request->getPost('tahun'),
|
||||||
|
'nip' => $this->request->getPost('nip'),
|
||||||
|
'nama' => $this->request->getPost('nama'),
|
||||||
|
'sakit' => $this->request->getPost('sakit'),
|
||||||
|
'ijin' => $this->request->getPost('ijin'),
|
||||||
|
'alpa' => $this->request->getPost('alpa'),
|
||||||
|
'cuti' => $this->request->getPost('cuti'),
|
||||||
|
'total_kehadiran' => $this->request->getPost('total_kehadiran'),
|
||||||
|
'total_kerja' => $this->request->getPost('total_kerja'),
|
||||||
|
);
|
||||||
|
if ($this->AbsensiModel->insert_absensi($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Data Absensi');
|
||||||
|
return redirect()->to(base_url() . 'absensi/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Data Absensi');
|
||||||
|
return redirect()->to(base_url() . 'absensi/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insertExcel()
|
||||||
|
{
|
||||||
|
$bulan = $this->request->getPost('bulan');
|
||||||
|
$tahun = $this->request->getPost('tahun');
|
||||||
|
|
||||||
|
$file_excel = $this->request->getFile('fileexcel');
|
||||||
|
$ext = $file_excel->getClientExtension();
|
||||||
|
if ($ext == 'xls') {
|
||||||
|
$render = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
|
||||||
|
} else {
|
||||||
|
$render = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
|
||||||
|
}
|
||||||
|
$spreadsheet = $render->load($file_excel);
|
||||||
|
|
||||||
|
$data = $spreadsheet->getActiveSheet()->toArray();
|
||||||
|
|
||||||
|
$errors = [];
|
||||||
|
$successCount = 0;
|
||||||
|
|
||||||
|
foreach ($data as $x => $row) {
|
||||||
|
if ($x < 4) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (empty($row[0])) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$nip = $row[0];
|
||||||
|
$nama = $row[1];
|
||||||
|
$sakit = $row[2];
|
||||||
|
$ijin = $row[3];
|
||||||
|
$alpa = $row[4];
|
||||||
|
$cuti = $row[5];
|
||||||
|
$total_kehadiran = $row[11];
|
||||||
|
$total_kerja = $row[6];
|
||||||
|
|
||||||
|
$cek = $this->AbsensiModel->getByBulanTahun($bulan, $tahun, $nip);
|
||||||
|
if (count($cek) > 0) {
|
||||||
|
$errors[] = "Data gagal diimport, guru dengan NIP $nip pada bulan $bulan dan tahun $tahun sudah ada.";
|
||||||
|
} else {
|
||||||
|
$dataInsert = [
|
||||||
|
'bulan' => $bulan,
|
||||||
|
'tahun' => $tahun,
|
||||||
|
'nip' => $nip,
|
||||||
|
'nama' => $nama,
|
||||||
|
'sakit' => $sakit,
|
||||||
|
'ijin' => $ijin,
|
||||||
|
'alpa' => $alpa,
|
||||||
|
'cuti' => $cuti,
|
||||||
|
'total_kehadiran' => $total_kehadiran,
|
||||||
|
'total_kerja' => $total_kerja,
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($this->AbsensiModel->insert_absensi($dataInsert)) {
|
||||||
|
$successCount++;
|
||||||
|
} else {
|
||||||
|
$errors[] = "Gagal mengimport data untuk NIP $nip.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($successCount > 0) {
|
||||||
|
session()->setFlashdata('success', "Berhasil mengimport $successCount data Excel.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($errors)) {
|
||||||
|
session()->setFlashdata('error', $errors);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->to(base_url() . 'absensi/list');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_absensi = new ModelAbsensi();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Absensi/edit',
|
||||||
|
'data' => $data_absensi->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$data = $this->AbsensiModel->update($id, [
|
||||||
|
'nip' => $this->request->getVar('nip'),
|
||||||
|
'nama_guru' => $this->request->getVar('nama_guru'),
|
||||||
|
'tanggal_lahir' => $this->request->getVar('tanggal_lahir'),
|
||||||
|
'jenis_kelamin' => $this->request->getVar('jenis_kelamin'),
|
||||||
|
'alamat' => $this->request->getVar('alamat'),
|
||||||
|
'jabatan' => $this->request->getVar('jabatan'),
|
||||||
|
'username' => $this->request->getVar('username'),
|
||||||
|
'password' => $this->request->getVar('password'),
|
||||||
|
'hak_akses' => $this->request->getVar('hak_akses'),
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'absensin/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'absensi/edit')->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->AbsensiModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'absensin/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,195 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelAmal;
|
||||||
|
|
||||||
|
class Amal extends BaseController
|
||||||
|
{
|
||||||
|
protected $AmalModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->AmalModel = new ModelAmal();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$nip = session('nip');
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Amal/list',
|
||||||
|
'amal' => $this->AmalModel->getAmal($nip),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Amal/listAll',
|
||||||
|
'amal' => $this->AmalModel->getAmalAll(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Amal/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Amal/input2',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran');
|
||||||
|
$newName = '';
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/amal/'); // Move the image to the desired directory
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'bulan' => $this->request->getPost('bulan'),
|
||||||
|
'tahun' => $this->request->getPost('tahun'),
|
||||||
|
'sholat_jamaah' => $this->request->getPost('sholat_jamaah'),
|
||||||
|
'tilawah' => $this->request->getPost('tilawah'),
|
||||||
|
'sholat_tahajud' => $this->request->getPost('sholat_tahajud'),
|
||||||
|
'sholat_dhuha' => $this->request->getPost('sholat_dhuha'),
|
||||||
|
'bantu_ortu' => $this->request->getPost('bantu_ortu'),
|
||||||
|
'literasi' => $this->request->getPost('literasi'),
|
||||||
|
'infaq' => $this->request->getPost('infaq'),
|
||||||
|
'olahraga' => $this->request->getPost('olahraga'),
|
||||||
|
'hafalan' => $this->request->getPost('hafalan'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'lampiran' => $newName,
|
||||||
|
);
|
||||||
|
if ($this->AmalModel->insert_amal($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Amal Yaumi!');
|
||||||
|
return redirect()->to(base_url() . 'amal/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Amal Yaumi!');
|
||||||
|
return redirect()->to(base_url() . 'amal/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_amal = new ModelAmal();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Amal/edit',
|
||||||
|
'data' => $data_amal->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran'); // Get the uploaded image file
|
||||||
|
|
||||||
|
// Get the current data from database
|
||||||
|
$currentData = $this->AmalModel->getById($id)->getRow();
|
||||||
|
|
||||||
|
// Initialize newName with the current file name
|
||||||
|
$newName = $currentData->lampiran;
|
||||||
|
|
||||||
|
// Check if there is a new file uploaded
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
// Get the new file name
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/amal/'); // Move the image to the desired directory
|
||||||
|
|
||||||
|
// Delete old file if there was a previous file
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/amal/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the database record
|
||||||
|
$data = $this->AmalModel->update($id, [
|
||||||
|
'bulan' => $this->request->getVar('bulan'),
|
||||||
|
'tahun' => $this->request->getVar('tahun'),
|
||||||
|
'sholat_jamaah' => $this->request->getVar('sholat_jamaah'),
|
||||||
|
'tilawah' => $this->request->getVar('tilawah'),
|
||||||
|
'sholat_tahajud' => $this->request->getVar('sholat_tahajud'),
|
||||||
|
'sholat_dhuha' => $this->request->getVar('sholat_dhuha'),
|
||||||
|
'bantu_ortu' => $this->request->getVar('bantu_ortu'),
|
||||||
|
'literasi' => $this->request->getVar('literasi'),
|
||||||
|
'infaq' => $this->request->getVar('infaq'),
|
||||||
|
'olahraga' => $this->request->getVar('olahraga'),
|
||||||
|
'hafalan' => $this->request->getVar('hafalan'),
|
||||||
|
'lampiran' => $newName
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Check if update was successful and redirect accordingly
|
||||||
|
if ($data) {
|
||||||
|
return redirect()->to(base_url() . 'amal/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'amal/edit/' . $id)->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$currentData = $this->AmalModel->getById($id)->getRow();
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/amal/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->AmalModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'amal/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
|
||||||
|
class Auth extends BaseController
|
||||||
|
{
|
||||||
|
protected $GuruModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
}
|
||||||
|
public function index(): string
|
||||||
|
{
|
||||||
|
$data = array(
|
||||||
|
'body' => '',
|
||||||
|
);
|
||||||
|
return view('Auth/login', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function login_aksi()
|
||||||
|
{
|
||||||
|
$username = $this->request->getPost('username');
|
||||||
|
$password = $this->request->getPost('password');
|
||||||
|
|
||||||
|
$cek_login = $this->GuruModel->cekUsername($username);
|
||||||
|
if ($cek_login->getNumRows() > 0) {
|
||||||
|
$akun = $cek_login->getRowArray();
|
||||||
|
$pw_valid = $akun['password'];
|
||||||
|
if ($password == $pw_valid) {
|
||||||
|
$newSession = [
|
||||||
|
'username' => $akun['username'],
|
||||||
|
'nip' => $akun['nip'],
|
||||||
|
'nama' => $akun['nama_guru'],
|
||||||
|
'hak_akses' => $akun['hak_akses']
|
||||||
|
];
|
||||||
|
session()->set($newSession);
|
||||||
|
session()->setFlashdata('success_login', 'Selamat Anda Berhasil Login');
|
||||||
|
return redirect()->to(base_url('index'));
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Username atau Password salah');
|
||||||
|
return redirect()->to(base_url('login'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Username atau Password salah');
|
||||||
|
return redirect()->to(base_url('login'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function proses_logout()
|
||||||
|
{
|
||||||
|
session()->destroy();
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use CodeIgniter\Controller;
|
||||||
|
use CodeIgniter\HTTP\CLIRequest;
|
||||||
|
use CodeIgniter\HTTP\IncomingRequest;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class BaseController
|
||||||
|
*
|
||||||
|
* BaseController provides a convenient place for loading components
|
||||||
|
* and performing functions that are needed by all your controllers.
|
||||||
|
* Extend this class in any new controllers:
|
||||||
|
* class Home extends BaseController
|
||||||
|
*
|
||||||
|
* For security be sure to declare any new methods as protected or private.
|
||||||
|
*/
|
||||||
|
abstract class BaseController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Instance of the main Request object.
|
||||||
|
*
|
||||||
|
* @var CLIRequest|IncomingRequest
|
||||||
|
*/
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of helpers to be loaded automatically upon
|
||||||
|
* class instantiation. These helpers will be available
|
||||||
|
* to all other controllers that extend BaseController.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $helpers = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Be sure to declare properties for any property fetch you initialized.
|
||||||
|
* The creation of dynamic property is deprecated in PHP 8.2.
|
||||||
|
*/
|
||||||
|
// protected $session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
// Do Not Edit This Line
|
||||||
|
parent::initController($request, $response, $logger);
|
||||||
|
|
||||||
|
// Preload any models, libraries, etc, here.
|
||||||
|
|
||||||
|
// E.g.: $this->session = \Config\Services::session();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,188 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use Dompdf\Dompdf;
|
||||||
|
use Dompdf\Options;
|
||||||
|
use App\Models\ModelPenilaian;
|
||||||
|
use App\Models\ModelDetailPenilaian;
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
use App\Models\ModelKriteria;
|
||||||
|
use App\Models\ModelEvaluasi;
|
||||||
|
use App\Models\ModelAbsensi;
|
||||||
|
|
||||||
|
class Evaluasi extends BaseController
|
||||||
|
{
|
||||||
|
protected $PenilaianModel;
|
||||||
|
protected $DetailPenilaianModel;
|
||||||
|
protected $GuruModel;
|
||||||
|
protected $KriteriaModel;
|
||||||
|
protected $EvaluasiModel;
|
||||||
|
protected $AbsensiModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->PenilaianModel = new ModelPenilaian();
|
||||||
|
$this->DetailPenilaianModel = new ModelDetailPenilaian();
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
$this->KriteriaModel = new ModelKriteria();
|
||||||
|
$this->EvaluasiModel = new ModelEvaluasi();
|
||||||
|
$this->AbsensiModel = new ModelAbsensi();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$bulan_selected = $this->request->getPost('bulan');
|
||||||
|
$tahun_selected = $this->request->getPost('tahun');
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Evaluasi/list',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'bulan_selected' => $bulan_selected,
|
||||||
|
'tahun_selected' => $tahun_selected,
|
||||||
|
'evalBelum' => $this->EvaluasiModel->getEvaluasiBelum(),
|
||||||
|
);
|
||||||
|
if ($bulan_selected !== null || $tahun_selected !== null) {
|
||||||
|
// Jika kategori dipilih, ambil data penilaian sesuai kategori
|
||||||
|
$data['evalSudah'] = $this->EvaluasiModel->getEvaluasiSudah($bulan_selected, $tahun_selected);
|
||||||
|
} else {
|
||||||
|
$bulan_selected = date('m');
|
||||||
|
$tahun_selected = date('Y');
|
||||||
|
// Jika kategori tidak dipilih, inisialisasi $perhitungan dengan array kosong
|
||||||
|
$data['evalSudah'] = $this->EvaluasiModel->getEvaluasiSudah($bulan_selected, $tahun_selected);
|
||||||
|
}
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Evaluasi/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'kriteria' => $this->KriteriaModel->getKriteria(),
|
||||||
|
'data' => $this->EvaluasiModel->getById($id)->getRow(),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert($id)
|
||||||
|
{
|
||||||
|
$data = $this->DetailPenilaianModel->update($id, [
|
||||||
|
'is_eval' => 1,
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
$data = array(
|
||||||
|
'id_detailpenilaian' => $id,
|
||||||
|
'keterangan' => $this->request->getPost('keterangan'),
|
||||||
|
);
|
||||||
|
if ($this->EvaluasiModel->insert_eval($data)) {
|
||||||
|
session()->setFlashdata('success', 'Evaluasi Berhasil');
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Evaluasi Gagal!');
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/input');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/input')->with('error', 'Evaluasi Gagal');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Evaluasi/edit',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'kriteria' => $this->KriteriaModel->getKriteria(),
|
||||||
|
'data' => $this->EvaluasiModel->getById2($id)->getRow(),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$data = $this->EvaluasiModel->update($id, [
|
||||||
|
'keterangan' => $this->request->getVar('keterangan'),
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/edit')->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->EvaluasiModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'evaluasi/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function indexCetak()
|
||||||
|
{
|
||||||
|
return view('Penilaian/cetak');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cetakRapor($id)
|
||||||
|
{
|
||||||
|
$data['data'] = $this->EvaluasiModel->getById2($id)->getRow();
|
||||||
|
|
||||||
|
if ($data['data']) {
|
||||||
|
$nip = $data['data']->nip;
|
||||||
|
|
||||||
|
// Ambil data absensi 3 bulan terakhir
|
||||||
|
$modelAbsensi = new ModelAbsensi();
|
||||||
|
$bulanSekarang = $data['data']->bulan; // Bulan sekarang (1-12)
|
||||||
|
$tahunSekarang = $data['data']->tahun; // Tahun sekarang
|
||||||
|
|
||||||
|
$rekapAbsensi = $modelAbsensi->getRekapAbsensi($bulanSekarang, $tahunSekarang, $nip);
|
||||||
|
$data['rekap_absensi'] = $rekapAbsensi;
|
||||||
|
|
||||||
|
// Mulai pembuatan PDF
|
||||||
|
$dompdf = new Dompdf();
|
||||||
|
$options = new Options();
|
||||||
|
$dompdf->set_option('isRemoteEnabled', true);
|
||||||
|
|
||||||
|
// Muat HTML ke Dompdf
|
||||||
|
$dompdf->loadHtml(view('Evaluasi/cetak', $data));
|
||||||
|
|
||||||
|
// Atur ukuran dan orientasi halaman (opsional)
|
||||||
|
$dompdf->setPaper('A4', 'portrait');
|
||||||
|
|
||||||
|
// Render PDF
|
||||||
|
$dompdf->render();
|
||||||
|
|
||||||
|
// Output PDF ke browser atau simpan di server
|
||||||
|
$dompdf->stream("output.pdf", ["Attachment" => false]);
|
||||||
|
// Jika ingin menyimpan PDF ke server, gunakan:
|
||||||
|
// $pdfOutput = $dompdf->output();
|
||||||
|
// file_put_contents('path/to/save/output.pdf', $pdfOutput);
|
||||||
|
} else {
|
||||||
|
// Handle jika data tidak ditemukan
|
||||||
|
return redirect()->to(base_url() . 'error');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
|
||||||
|
class Guru extends BaseController
|
||||||
|
{
|
||||||
|
protected $GuruModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Guru/list',
|
||||||
|
'guru' => $this->GuruModel->getGuru(),
|
||||||
|
'guru2' => $this->GuruModel->getGuru2(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Guru/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$nip = $this->request->getPost('nip');
|
||||||
|
$username = $this->request->getPost('username');
|
||||||
|
|
||||||
|
// Check if NIP or username already exist
|
||||||
|
if ($this->GuruModel->check_nip_exists($nip)) {
|
||||||
|
session()->setFlashdata('warning', 'NIP sudah ada di database!');
|
||||||
|
return redirect()->to(base_url() . 'guru/input');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->GuruModel->check_username_exists($username)) {
|
||||||
|
session()->setFlashdata('warning', 'Username sudah ada di database!');
|
||||||
|
return redirect()->to(base_url() . 'guru/input');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'nip' => $nip,
|
||||||
|
'nama_guru' => $this->request->getPost('nama_guru'),
|
||||||
|
'tanggal_lahir' => $this->request->getPost('tanggal_lahir'),
|
||||||
|
'jenis_kelamin' => $this->request->getPost('jenis_kelamin'),
|
||||||
|
'alamat' => $this->request->getPost('alamat'),
|
||||||
|
'jabatan' => $this->request->getPost('jabatan'),
|
||||||
|
'username' => $username,
|
||||||
|
'password' => $this->request->getPost('password'),
|
||||||
|
'hak_akses' => $this->request->getPost('hak_akses'),
|
||||||
|
'is_aktif' => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->GuruModel->insert_guru($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Data Guru!');
|
||||||
|
return redirect()->to(base_url() . 'guru/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Data Guru!');
|
||||||
|
return redirect()->to(base_url() . 'guru/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_guru = new ModelGuru();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Guru/edit',
|
||||||
|
'data' => $data_guru->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$data = $this->GuruModel->update($id, [
|
||||||
|
'nip' => $this->request->getVar('nip'),
|
||||||
|
'nama_guru' => $this->request->getVar('nama_guru'),
|
||||||
|
'tanggal_lahir' => $this->request->getVar('tanggal_lahir'),
|
||||||
|
'jenis_kelamin' => $this->request->getVar('jenis_kelamin'),
|
||||||
|
'alamat' => $this->request->getVar('alamat'),
|
||||||
|
'jabatan' => $this->request->getVar('jabatan'),
|
||||||
|
'username' => $this->request->getVar('username'),
|
||||||
|
'password' => $this->request->getVar('password'),
|
||||||
|
'hak_akses' => $this->request->getVar('hak_akses'),
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'guru/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'guru/edit')->with('error', 'Data Gagal Diubah');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$data = $this->GuruModel->update($id, [
|
||||||
|
'is_aktif' => 0,
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'guru/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'guru/list')->with('success', 'Data Gagal Dihapus!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function restore($id)
|
||||||
|
{
|
||||||
|
$data = $this->GuruModel->update($id, [
|
||||||
|
'is_aktif' => 1,
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'guru/list')->with('success', 'Data Berhasil Dipulihkan!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'guru/list')->with('success', 'Data Gagal Dipulihkan!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelPenilaian;
|
||||||
|
use App\Models\ModelDetailPenilaian;
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
use App\Models\ModelKriteria;
|
||||||
|
|
||||||
|
class Hasil extends BaseController
|
||||||
|
{
|
||||||
|
protected $PenilaianModel;
|
||||||
|
protected $DetailPenilaianModel;
|
||||||
|
protected $GuruModel;
|
||||||
|
protected $KriteriaModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->PenilaianModel = new ModelPenilaian();
|
||||||
|
$this->DetailPenilaianModel = new ModelDetailPenilaian();
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
$this->KriteriaModel = new ModelKriteria();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$bulan_selected = $this->request->getPost('bulan');
|
||||||
|
$tahun_selected = $this->request->getPost('tahun');
|
||||||
|
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Hasil/list',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'bulan_selected' => $bulan_selected,
|
||||||
|
'tahun_selected' => $tahun_selected,
|
||||||
|
'kriteria' => $this->KriteriaModel->getKriteria(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($bulan_selected !== null || $tahun_selected !== null) {
|
||||||
|
// Jika kategori dipilih, ambil data penilaian sesuai kategori
|
||||||
|
$data['hasil'] = $this->PenilaianModel->getRanking($bulan_selected, $tahun_selected);
|
||||||
|
} else {
|
||||||
|
// Jika kategori tidak dipilih, inisialisasi $perhitungan dengan array kosong
|
||||||
|
$bulan_selected = date('m');
|
||||||
|
$tahun_selected = date('Y');
|
||||||
|
$data['hasil'] = $this->PenilaianModel->getRanking($bulan_selected, $tahun_selected);
|
||||||
|
}
|
||||||
|
return view('index', $data);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelAbsensi;
|
||||||
|
use App\Models\ModelEvaluasi;
|
||||||
|
|
||||||
|
class Home extends BaseController
|
||||||
|
{
|
||||||
|
protected $AbsensiModel;
|
||||||
|
protected $EvaluasiModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->AbsensiModel = new ModelAbsensi();
|
||||||
|
$this->EvaluasiModel = new ModelEvaluasi();
|
||||||
|
}
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$selectedYear = $this->request->getPost('tahun');
|
||||||
|
$nip = session('nip');
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'dashboard',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'selectedYear' => $selectedYear,
|
||||||
|
'rapor' => $this->EvaluasiModel->getRapor($nip),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($selectedYear !== null) {
|
||||||
|
// Jika kategori dipilih, ambil data penilaian sesuai kategori
|
||||||
|
$absensiData = $this->AbsensiModel->getAbsensiTahun($nip, $selectedYear);
|
||||||
|
$data['absensiData'] = $this->fillAbsensiData($absensiData, $selectedYear);
|
||||||
|
} else {
|
||||||
|
$selectedYear = date('Y');
|
||||||
|
$absensiData = $this->AbsensiModel->getAbsensiTahun($nip, $selectedYear);
|
||||||
|
$data['absensiData'] = $this->fillAbsensiData($absensiData, $selectedYear);
|
||||||
|
}
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private function fillAbsensiData($absensiData, $selectedYear)
|
||||||
|
{
|
||||||
|
$filledData = [];
|
||||||
|
$months = [
|
||||||
|
'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
|
||||||
|
'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'
|
||||||
|
];
|
||||||
|
|
||||||
|
// Initialize filledData with zero values
|
||||||
|
foreach ($months as $index => $month) {
|
||||||
|
$filledData[] = [
|
||||||
|
'bulan' => $month,
|
||||||
|
'sakit' => 0,
|
||||||
|
'ijin' => 0,
|
||||||
|
'alpa' => 0,
|
||||||
|
'cuti' => 0,
|
||||||
|
'total_kehadiran' => 0
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill the data from database
|
||||||
|
foreach ($absensiData as $data) {
|
||||||
|
$monthIndex = intval($data->bulan) - 1; // Assuming $data->bulan is 1-12
|
||||||
|
$filledData[$monthIndex] = [
|
||||||
|
'bulan' => $months[$monthIndex],
|
||||||
|
'sakit' => $data->sakit ?? 0,
|
||||||
|
'ijin' => $data->ijin ?? 0,
|
||||||
|
'alpa' => $data->alpa ?? 0,
|
||||||
|
'cuti' => $data->cuti ?? 0,
|
||||||
|
'total_kehadiran' => $data->total_kehadiran ?? 0
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $filledData;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelJurnal;
|
||||||
|
|
||||||
|
class Jurnal extends BaseController
|
||||||
|
{
|
||||||
|
protected $JurnalModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->JurnalModel = new ModelJurnal();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$nip = session('nip');
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Jurnal/list',
|
||||||
|
'jurnal' => $this->JurnalModel->getJurnal($nip),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Jurnal/listAll',
|
||||||
|
'jurnal' => $this->JurnalModel->getJurnalAll(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Jurnal/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Jurnal/input2',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran');
|
||||||
|
$newName = '';
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/jurnal/'); // Move the image to the desired directory
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'bulan' => $this->request->getPost('bulan'),
|
||||||
|
'mapel' => $this->request->getPost('mapel'),
|
||||||
|
'keterangan' => $this->request->getPost('keterangan'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'lampiran' => $newName,
|
||||||
|
);
|
||||||
|
if ($this->JurnalModel->insert_jurnal($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Jurnal!');
|
||||||
|
return redirect()->to(base_url() . 'jurnal/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Jurnal!');
|
||||||
|
return redirect()->to(base_url() . 'jurnal/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_jurnal = new ModelJurnal();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Jurnal/edit',
|
||||||
|
'data' => $data_jurnal->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran'); // Get the uploaded image file
|
||||||
|
|
||||||
|
// Get the current data from database
|
||||||
|
$currentData = $this->JurnalModel->getById($id)->getRow();
|
||||||
|
|
||||||
|
// Initialize newName with the current file name
|
||||||
|
$newName = $currentData->lampiran;
|
||||||
|
|
||||||
|
// Check if there is a new file uploaded
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
// Get the new file name
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/jurnal/'); // Move the image to the desired directory
|
||||||
|
|
||||||
|
// Delete old file if there was a previous file
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/jurnal/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the database record
|
||||||
|
$data = $this->JurnalModel->update($id, [
|
||||||
|
'bulan' => $this->request->getVar('bulan'),
|
||||||
|
'mapel' => $this->request->getVar('mapel'),
|
||||||
|
'keterangan' => $this->request->getVar('keterangan'),
|
||||||
|
'lampiran' => $newName
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Check if update was successful and redirect accordingly
|
||||||
|
if ($data) {
|
||||||
|
return redirect()->to(base_url() . 'jurnal/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'jurnal/edit/' . $id)->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$currentData = $this->JurnalModel->getById($id)->getRow();
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/jurnal/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->JurnalModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'jurnal/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelPenilaian;
|
||||||
|
use App\Models\ModelDetailPenilaian;
|
||||||
|
|
||||||
|
class Kategori extends BaseController
|
||||||
|
{
|
||||||
|
protected $PenilaianModel;
|
||||||
|
protected $DetailPenilaianModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->PenilaianModel = new ModelPenilaian();
|
||||||
|
$this->DetailPenilaianModel = new ModelDetailPenilaian();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Kategori/list',
|
||||||
|
'kategori' => $this->PenilaianModel->getKategori(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Kategori/edit',
|
||||||
|
'data' => $this->PenilaianModel->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$data = $this->PenilaianModel->update($id, [
|
||||||
|
'bulan' => $this->request->getVar('bulan'),
|
||||||
|
'tahun' => $this->request->getVar('tahun'),
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'kategori/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'kategori/edit')->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->PenilaianModel->delete($id);
|
||||||
|
$this->DetailPenilaianModel->where('id_penilaian', $id)->delete();
|
||||||
|
return redirect()->to(base_url() . 'kategori/list')->with('success', 'Data Berhasil Dihapus');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelKriteria;
|
||||||
|
|
||||||
|
class Kriteria extends BaseController
|
||||||
|
{
|
||||||
|
protected $KriteriaModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->KriteriaModel = new ModelKriteria();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Kriteria/list',
|
||||||
|
'kriteria' => $this->KriteriaModel->getKriteria(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Kriteria/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$data = array(
|
||||||
|
'kode_kriteria' => $this->request->getPost('kode_kriteria'),
|
||||||
|
'nama_kriteria' => $this->request->getPost('nama_kriteria'),
|
||||||
|
'tipe' => $this->request->getPost('tipe'),
|
||||||
|
'bobot' => $this->request->getPost('bobot'),
|
||||||
|
);
|
||||||
|
if ($this->KriteriaModel->insert_kriteria($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Data Kriteria!');
|
||||||
|
return redirect()->to(base_url() . 'kriteria/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Data Kriteria!');
|
||||||
|
return redirect()->to(base_url() . 'kriteria/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_kriteria = new ModelKriteria();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Kriteria/edit',
|
||||||
|
'data' => $data_kriteria->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$data = $this->KriteriaModel->update($id, [
|
||||||
|
'kode_kriteria' => $this->request->getVar('kode_kriteria'),
|
||||||
|
'nama_kriteria' => $this->request->getVar('nama_kriteria'),
|
||||||
|
'tipe' => $this->request->getVar('tipe'),
|
||||||
|
'bobot' => $this->request->getVar('bobot'),
|
||||||
|
]);
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'kriteria/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'kriteria/edit')->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->KriteriaModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'kriteria/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,292 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use Dompdf\Dompdf;
|
||||||
|
use Dompdf\Options;
|
||||||
|
use App\Models\ModelPenilaian;
|
||||||
|
use App\Models\ModelDetailPenilaian;
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
use App\Models\ModelKriteria;
|
||||||
|
use App\Models\ModelAbsensi;
|
||||||
|
use App\Models\ModelAmal;
|
||||||
|
use App\Models\ModelSurat;
|
||||||
|
use App\Models\ModelJurnal;
|
||||||
|
|
||||||
|
class Penilaian extends BaseController
|
||||||
|
{
|
||||||
|
protected $PenilaianModel;
|
||||||
|
protected $DetailPenilaianModel;
|
||||||
|
protected $GuruModel;
|
||||||
|
protected $KriteriaModel;
|
||||||
|
protected $AbsensiModel;
|
||||||
|
protected $AmalModel;
|
||||||
|
protected $SuratModel;
|
||||||
|
protected $JurnalModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->PenilaianModel = new ModelPenilaian();
|
||||||
|
$this->DetailPenilaianModel = new ModelDetailPenilaian();
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
$this->KriteriaModel = new ModelKriteria();
|
||||||
|
$this->AbsensiModel = new ModelAbsensi();
|
||||||
|
$this->AmalModel = new ModelAmal();
|
||||||
|
$this->SuratModel = new ModelSurat();
|
||||||
|
$this->JurnalModel = new ModelJurnal();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$bulan_selected = $this->request->getPost('bulan');
|
||||||
|
$tahun_selected = $this->request->getPost('tahun');
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Penilaian/list',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'bulan_selected' => $bulan_selected,
|
||||||
|
'tahun_selected' => $tahun_selected,
|
||||||
|
'nilaiBelum' => $this->DetailPenilaianModel->getPenilaianBelum(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($bulan_selected !== null || $tahun_selected !== null) {
|
||||||
|
// Jika kategori dipilih, ambil data penilaian sesuai kategori
|
||||||
|
$data['nilaiSudah'] = $this->DetailPenilaianModel->getPenilaianSudah($bulan_selected, $tahun_selected);
|
||||||
|
} else {
|
||||||
|
$bulan_selected = date('m');
|
||||||
|
$tahun_selected = date('Y');
|
||||||
|
// Jika kategori tidak dipilih, inisialisasi $perhitungan dengan array kosong
|
||||||
|
$data['nilaiSudah'] = $this->DetailPenilaianModel->getPenilaianSudah($bulan_selected, $tahun_selected);
|
||||||
|
}
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
// Ambil data bulan dan tahun dari form atau dari inputan mana pun yang sesuai dengan implementasi Anda
|
||||||
|
$bulan = $this->request->getPost('bulan');
|
||||||
|
$tahun = $this->request->getPost('tahun');
|
||||||
|
|
||||||
|
// Simpan data penilaian ke dalam tabel penilaian
|
||||||
|
$dataPenilaian = [
|
||||||
|
'bulan' => $bulan,
|
||||||
|
'tahun' => $tahun,
|
||||||
|
];
|
||||||
|
if ($this->PenilaianModel->insert_penilaian($dataPenilaian)) {
|
||||||
|
// Ambil Id Penilaian
|
||||||
|
$idPenilaian = $this->PenilaianModel->insertID();
|
||||||
|
|
||||||
|
// Ambil semua data guru dari tabel guru
|
||||||
|
$dataGuru = $this->GuruModel->getGuru();
|
||||||
|
|
||||||
|
// Simpan data detail penilaian ke dalam tabel detail_penilaian
|
||||||
|
foreach ($dataGuru as $guru) {
|
||||||
|
$dataDetailPenilaian = [
|
||||||
|
'id_penilaian' => $idPenilaian,
|
||||||
|
'nip' => $guru->nip,
|
||||||
|
];
|
||||||
|
$insertDetail = $this->DetailPenilaianModel->insert($dataDetailPenilaian);
|
||||||
|
if (!$insertDetail) {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Data');
|
||||||
|
return redirect()->to(base_url() . 'penilaian/list');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Data');
|
||||||
|
return redirect()->to(base_url() . 'penilaian/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Data');
|
||||||
|
return redirect()->to(base_url() . 'penilaian/list');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_detailPenilaian = new ModelDetailPenilaian();
|
||||||
|
$detailPenilaian = $data_detailPenilaian->getById($id)->getRow();
|
||||||
|
|
||||||
|
if ($detailPenilaian) {
|
||||||
|
$bulanSekarang = $detailPenilaian->bulan; // Bulan sekarang (1-12)
|
||||||
|
$tahunSekarang = $detailPenilaian->tahun; // Tahun sekarang
|
||||||
|
$nip = $detailPenilaian->nip;
|
||||||
|
|
||||||
|
// Ambil data absensi 3 bulan terakhir
|
||||||
|
$rekapAbsensi = $this->AbsensiModel->getRekapAbsensi($bulanSekarang, $tahunSekarang, $nip);
|
||||||
|
// Ambil data amal yaumi 3 bulan terakhir
|
||||||
|
$rekapAmal = $this->AmalModel->getRekapAmal($bulanSekarang, $tahunSekarang, $nip);
|
||||||
|
// Ambil data jurnal mengajar 3 bulan terakhir
|
||||||
|
$rekapJurnal = $this->JurnalModel->getRekapJurnal($bulanSekarang, $tahunSekarang, $nip);
|
||||||
|
// Ambil data surat tugas 3 bulan terakhir
|
||||||
|
$rekapTugas = $this->SuratModel->getRekapTugas($nip);
|
||||||
|
// Ambil data surat panitia 3 bulan terakhir
|
||||||
|
$rekapPanitia = $this->SuratModel->getRekapPanitia($nip);
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Penilaian/edit',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'data' => $detailPenilaian,
|
||||||
|
'rekap_absensi' => $rekapAbsensi,
|
||||||
|
'rekap_amal' => $rekapAmal,
|
||||||
|
'rekap_tugas' => $rekapTugas,
|
||||||
|
'rekap_panitia' => $rekapPanitia,
|
||||||
|
'rekap_jurnal' => $rekapJurnal,
|
||||||
|
);
|
||||||
|
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Handle jika detailPenilaian tidak ditemukan
|
||||||
|
return redirect()->to(base_url() . 'error');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$nip_penilai = $this->request->getVar('nip_penilai');
|
||||||
|
$tanggal = date('Y-m-d');
|
||||||
|
$k1 = $this->request->getVar('k1');
|
||||||
|
$k2 = $this->request->getVar('k2');
|
||||||
|
$k3 = $this->request->getVar('k3');
|
||||||
|
$k4 = $this->request->getVar('k4');
|
||||||
|
$k5 = $this->request->getVar('k5');
|
||||||
|
$k6 = $this->request->getVar('k6');
|
||||||
|
$k7 = $this->request->getVar('k7');
|
||||||
|
$k8 = $this->request->getVar('k8');
|
||||||
|
$k9 = $this->request->getVar('k9');
|
||||||
|
|
||||||
|
// Hitung nilai hasil
|
||||||
|
$hasil = $this->hitungHasil($k1, $k2, $k3, $k4, $k5, $k6, $k7, $k8, $k9);
|
||||||
|
|
||||||
|
$data = $this->DetailPenilaianModel->update($id, [
|
||||||
|
'nip_penilai' => $nip_penilai,
|
||||||
|
'tanggal' => $tanggal,
|
||||||
|
'k1' => $k1,
|
||||||
|
'k2' => $k2,
|
||||||
|
'k3' => $k3,
|
||||||
|
'k4' => $k4,
|
||||||
|
'k5' => $k5,
|
||||||
|
'k6' => $k6,
|
||||||
|
'k7' => $k7,
|
||||||
|
'k8' => $k8,
|
||||||
|
'k9' => $k9,
|
||||||
|
'hasil' => $hasil,
|
||||||
|
'status' => 1,
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($data == true) {
|
||||||
|
return redirect()->to(base_url() . 'penilaian/list')->with('success', 'Penilaian Berhasil!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'penilaian/edit')->with('error', 'Penilaian Gagal!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function hitungHasil($k1, $k2, $k3, $k4, $k5, $k6, $k7, $k8, $k9)
|
||||||
|
{
|
||||||
|
// Ambil bobot dari tabel kriteria
|
||||||
|
$bobot = [
|
||||||
|
'k1' => $this->getBobotByKode('K1'),
|
||||||
|
'k2' => $this->getBobotByKode('K2'),
|
||||||
|
'k3' => $this->getBobotByKode('K3'),
|
||||||
|
'k4' => $this->getBobotByKode('K4'),
|
||||||
|
'k5' => $this->getBobotByKode('K5'),
|
||||||
|
'k6' => $this->getBobotByKode('K6'),
|
||||||
|
'k7' => $this->getBobotByKode('K7'),
|
||||||
|
'k8' => $this->getBobotByKode('K8'),
|
||||||
|
'k9' => $this->getBobotByKode('K9'),
|
||||||
|
];
|
||||||
|
|
||||||
|
// Normalisasi nilai
|
||||||
|
$normalizedValues = [];
|
||||||
|
foreach (['K1', 'K2', 'K3', 'K4', 'K5', 'K6', 'K7', 'K8', 'K9'] as $kodeKriteria) {
|
||||||
|
$kriteria = strtolower($kodeKriteria); // Konversi kode kriteria menjadi huruf kecil
|
||||||
|
$normalizedValues[$kriteria] = $this->normalisasi(${$kriteria}, $kodeKriteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hitung nilai hasil
|
||||||
|
$hasil = 0;
|
||||||
|
foreach ($normalizedValues as $kriteria => $value) {
|
||||||
|
$hasil += $value * $bobot[$kriteria];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $hasil;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getBobotByKode($kode)
|
||||||
|
{
|
||||||
|
// Ambil bobot dari tabel kriteria berdasarkan kode kriteria
|
||||||
|
// Implementasi ini bergantung pada struktur tabel dan model Anda
|
||||||
|
// Gantilah dengan cara yang sesuai untuk aplikasi Anda
|
||||||
|
return $this->KriteriaModel->getBobotByKode($kode);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function normalisasi($nilai, $kriteria)
|
||||||
|
{
|
||||||
|
// Ambil tipe kriteria (benefit atau cost) dari tabel kriteria berdasarkan kode kriteria
|
||||||
|
$tipe = $this->KriteriaModel->getTipeByKode($kriteria);
|
||||||
|
|
||||||
|
// Tentukan nilai maksimum dan minimum berdasarkan tipe kriteria
|
||||||
|
$max = ($tipe == 'Benefit') ? 4 : 1;
|
||||||
|
$min = ($tipe == 'Benefit') ? 1 : 4;
|
||||||
|
|
||||||
|
// Normalisasi nilai
|
||||||
|
if ($tipe == 'Benefit') {
|
||||||
|
$normalisasi = $nilai / $max;
|
||||||
|
} else {
|
||||||
|
$normalisasi = $min / $nilai;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $normalisasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$this->DetailPenilaianModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'kriteria/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function indexCetak()
|
||||||
|
{
|
||||||
|
return view('Penilaian/cetak');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cetakPenilaian($id)
|
||||||
|
{
|
||||||
|
$data_detailPenilaian = new ModelDetailPenilaian();
|
||||||
|
$data['data'] = $data_detailPenilaian->getById($id)->getRow();
|
||||||
|
$data['dataP'] = $data_detailPenilaian->getByIdPenilai($id)->getRow();
|
||||||
|
// Mulai pembuatan PDF
|
||||||
|
$dompdf = new Dompdf();
|
||||||
|
$options = new Options();
|
||||||
|
|
||||||
|
$dompdf->set_option('isRemoteEnabled', true);
|
||||||
|
|
||||||
|
// Muat HTML ke Dompdf
|
||||||
|
$dompdf->loadHtml(view('Penilaian/cetak',$data));
|
||||||
|
|
||||||
|
// Atur ukuran dan orientasi halaman (opsional)
|
||||||
|
$dompdf->setPaper('A4', 'portrait');
|
||||||
|
|
||||||
|
// Render PDF
|
||||||
|
$dompdf->render();
|
||||||
|
|
||||||
|
// Output PDF ke browser atau simpan di server
|
||||||
|
$dompdf->stream("output.pdf", ["Attachment" => false]);
|
||||||
|
// Jika ingin menyimpan PDF ke server, gunakan:
|
||||||
|
// $dompdf->output();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelPenilaian;
|
||||||
|
use App\Models\ModelDetailPenilaian;
|
||||||
|
use App\Models\ModelGuru;
|
||||||
|
use App\Models\ModelKriteria;
|
||||||
|
|
||||||
|
class Perhitungan extends BaseController
|
||||||
|
{
|
||||||
|
protected $PenilaianModel;
|
||||||
|
protected $DetailPenilaianModel;
|
||||||
|
protected $GuruModel;
|
||||||
|
protected $KriteriaModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->PenilaianModel = new ModelPenilaian();
|
||||||
|
$this->DetailPenilaianModel = new ModelDetailPenilaian();
|
||||||
|
$this->GuruModel = new ModelGuru();
|
||||||
|
$this->KriteriaModel = new ModelKriteria();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$bulan_selected = $this->request->getPost('bulan');
|
||||||
|
$tahun_selected = $this->request->getPost('tahun');
|
||||||
|
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Perhitungan/list',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
'bulan_selected' => $bulan_selected,
|
||||||
|
'tahun_selected' => $tahun_selected,
|
||||||
|
'kriteria' => $this->KriteriaModel->getKriteria(),
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($bulan_selected !== null || $tahun_selected !== null) {
|
||||||
|
// Jika kategori dipilih, ambil data penilaian sesuai kategori
|
||||||
|
$data['perhitungan'] = $this->PenilaianModel->getPenilaian($bulan_selected, $tahun_selected);
|
||||||
|
} else {
|
||||||
|
$bulan_selected = date('m');
|
||||||
|
$tahun_selected = date('Y');
|
||||||
|
// Jika kategori tidak dipilih, inisialisasi $perhitungan dengan array kosong
|
||||||
|
$data['perhitungan'] = $this->PenilaianModel->getPenilaian($bulan_selected, $tahun_selected);
|
||||||
|
}
|
||||||
|
return view('index', $data);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,182 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers;
|
||||||
|
|
||||||
|
use App\Models\ModelSurat;
|
||||||
|
|
||||||
|
class Surat extends BaseController
|
||||||
|
{
|
||||||
|
protected $SuratModel;
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->SuratModel = new ModelSurat();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$nip = session('nip');
|
||||||
|
$data = array(
|
||||||
|
'body' => 'surat/list',
|
||||||
|
'surat' => $this->SuratModel->getSurat($nip),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$nip = session('nip');
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Surat/listAll',
|
||||||
|
'surat' => $this->SuratModel->getSuratAll(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Surat/input',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function input2()
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Surat/input2',
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert()
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran');
|
||||||
|
$newName = '';
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/surat/'); // Move the image to the desired directory
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'tanggal' => $this->request->getPost('tanggal'),
|
||||||
|
'jenis_surat' => $this->request->getPost('jenis_surat'),
|
||||||
|
'keterangan_surat' => $this->request->getPost('keterangan_surat'),
|
||||||
|
'jabatan' => $this->request->getPost('jabatan'),
|
||||||
|
'nip' => session('nip'),
|
||||||
|
'lampiran' => $newName,
|
||||||
|
);
|
||||||
|
if ($this->SuratModel->insert_surat($data)) {
|
||||||
|
session()->setFlashdata('success', 'Berhasil Menambahkan Surat Tugas!');
|
||||||
|
return redirect()->to(base_url() . 'surat/list');
|
||||||
|
} else {
|
||||||
|
session()->setFlashdata('error', 'Gagal Menambahkan Surat Tugas!');
|
||||||
|
return redirect()->to(base_url() . 'surat/input');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
if (session()->has('nip') && session()->has('username')) {
|
||||||
|
$data_surat = new ModelSurat();
|
||||||
|
$data = array(
|
||||||
|
'body' => 'Surat/edit',
|
||||||
|
'data' => $data_surat->getById($id)->getRow(),
|
||||||
|
'username' => session('username'),
|
||||||
|
'nama' => session('nama'),
|
||||||
|
'hak_akses' => session('hak_akses'),
|
||||||
|
);
|
||||||
|
return view('index', $data);
|
||||||
|
} else {
|
||||||
|
// Jika pengguna belum login, arahkan ke halaman login
|
||||||
|
return redirect()->to(base_url() . 'login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update($id)
|
||||||
|
{
|
||||||
|
$lampiran = $this->request->getFile('lampiran'); // Get the uploaded image file
|
||||||
|
|
||||||
|
// Get the current data from database
|
||||||
|
$currentData = $this->SuratModel->getById($id)->getRow();
|
||||||
|
|
||||||
|
// Initialize newName with the current file name
|
||||||
|
$newName = $currentData->lampiran;
|
||||||
|
|
||||||
|
// Check if there is a new file uploaded
|
||||||
|
if ($lampiran->isValid() && !$lampiran->hasMoved()) {
|
||||||
|
// Get the new file name
|
||||||
|
$newName = $lampiran->getName();
|
||||||
|
$lampiran->move(ROOTPATH . 'public/assets/dokumen/surat/'); // Move the image to the desired directory
|
||||||
|
|
||||||
|
// Delete old file if there was a previous file
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/surat/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the database record
|
||||||
|
$data = $this->SuratModel->update($id, [
|
||||||
|
'tanggal' => $this->request->getVar('tanggal'),
|
||||||
|
'jenis_surat' => $this->request->getVar('jenis_surat'),
|
||||||
|
'keterangan_surat' => $this->request->getVar('keterangan_surat'),
|
||||||
|
'jabatan' => $this->request->getVar('jabatan'),
|
||||||
|
'lampiran' => $newName
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Check if update was successful and redirect accordingly
|
||||||
|
if ($data) {
|
||||||
|
return redirect()->to(base_url() . 'surat/list')->with('success', 'Data Berhasil Diubah!');
|
||||||
|
} else {
|
||||||
|
return redirect()->to(base_url() . 'surat/edit/' . $id)->with('error', 'Data Gagal Diubah!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function delete($id)
|
||||||
|
{
|
||||||
|
$currentData = $this->SuratModel->getById($id)->getRow();
|
||||||
|
if (!empty($currentData->lampiran)) {
|
||||||
|
$oldFilePath = ROOTPATH . 'public/assets/dokumen/surat/' . $currentData->lampiran;
|
||||||
|
if (file_exists($oldFilePath)) {
|
||||||
|
unlink($oldFilePath); // Delete the old file
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->SuratModel->delete($id);
|
||||||
|
return redirect()->to(base_url() . 'surat/list')->with('success', 'Data Berhasil Dihapus!');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// override core en language system validation or define your own en language validation message
|
||||||
|
return [];
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelAbsensi extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'absensi';
|
||||||
|
protected $primaryKey = 'id_absensi';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_absensi', 'bulan', 'tahun', 'nip', 'nama', 'sakit', 'ijin', 'alpa', 'cuti', 'total_kehadiran', 'total_kerja'];
|
||||||
|
|
||||||
|
public function getAbsensi()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_absensi($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_absensi' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getByBulanTahun($bulan, $tahun, $nip)
|
||||||
|
{
|
||||||
|
return $this->where([
|
||||||
|
'bulan' => $bulan,
|
||||||
|
'tahun' => $tahun,
|
||||||
|
'nip' => $nip
|
||||||
|
])->get()->getResult();
|
||||||
|
}
|
||||||
|
public function getAbsensiTahun($nip, $selectedYear = null)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('absensi');
|
||||||
|
|
||||||
|
if (!empty($selectedYear)) {
|
||||||
|
$builder->where([
|
||||||
|
'nip' => $nip,
|
||||||
|
'tahun' => $selectedYear
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
$selectedYear = date('Y'); // Mengambil tahun sekarang
|
||||||
|
$builder->where([
|
||||||
|
'nip' => $nip,
|
||||||
|
'tahun' => $selectedYear
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRekapAbsensi($bulan, $tahun, $nip)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table($this->table);
|
||||||
|
$builder->select('*')
|
||||||
|
->where('nip', $nip)
|
||||||
|
->where('tahun', $tahun)
|
||||||
|
->where('bulan >=', $bulan - 2)
|
||||||
|
->where('bulan <=', $bulan)
|
||||||
|
->orderBy('bulan', 'ASC');
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelAmal extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'amal';
|
||||||
|
protected $primaryKey = 'id_amal';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_amal', 'nip', 'bulan', 'tahun', 'sholat_jamaah', 'tilawah', 'sholat_tahajud', 'sholat_dhuha', 'bantu_ortu', 'literasi', 'infaq', 'olahraga', 'hafalan', 'lampiran'];
|
||||||
|
|
||||||
|
public function getAmal($nip)
|
||||||
|
{
|
||||||
|
return $this->db->table('amal')
|
||||||
|
->join('guru', 'amal.nip = guru.nip')
|
||||||
|
->where([
|
||||||
|
'amal.nip' => $nip,
|
||||||
|
])
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAmalAll()
|
||||||
|
{
|
||||||
|
return $this->db->table('amal')
|
||||||
|
->join('guru', 'amal.nip = guru.nip')->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_amal($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_amal' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRekapAmal($bulan, $tahun, $nip)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table($this->table);
|
||||||
|
$builder->select('*')
|
||||||
|
->where('nip', $nip)
|
||||||
|
->where('tahun', $tahun)
|
||||||
|
->where('bulan >=', $bulan - 2)
|
||||||
|
->where('bulan <=', $bulan)
|
||||||
|
->orderBy('bulan', 'ASC');
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelDetailPenilaian extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'detail_penilaian';
|
||||||
|
protected $primaryKey = 'id_detailpenilaian';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_detailpenilaian', 'id_penilaian', 'nip', 'nip_penilai', 'tanggal', 'k1', 'k2', 'k3', 'k4', 'k5', 'k6', 'k7', 'k8', 'k9', 'hasil', 'status', 'is_eval'];
|
||||||
|
|
||||||
|
public function getDetailPenilaian()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_detail_penilaian($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->select('detail_penilaian.*, guru.*, penilaian.*')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->join('penilaian', 'penilaian.id_penilaian = detail_penilaian.id_penilaian')
|
||||||
|
->where(['id_detailpenilaian' => $id])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getByIdPenilai($id)
|
||||||
|
{
|
||||||
|
return $this->select('detail_penilaian.*, guru.*')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip_penilai')
|
||||||
|
->where(['id_detailpenilaian' => $id])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById2($id)
|
||||||
|
{
|
||||||
|
return $this->select('detail_penilaian.*, guru.*')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.id_penilai')
|
||||||
|
->where(['id_detailpenilaian' => $id])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPenilaianBelum()
|
||||||
|
{
|
||||||
|
return $this->select('detail_penilaian.*, guru.*')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->where('detail_penilaian.status', 0)
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPenilaianSudah($bulan_selected = null, $tahun_selected = null)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('penilaian')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_penilaian = penilaian.id_penilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->where('detail_penilaian.status', 1);
|
||||||
|
|
||||||
|
if (!empty($bulan_selected)) {
|
||||||
|
$builder->where('penilaian.bulan', $bulan_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($tahun_selected)) {
|
||||||
|
$builder->where('penilaian.tahun', $tahun_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,113 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelEvaluasi extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'evaluasi';
|
||||||
|
protected $primaryKey = 'id_evaluasi';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_evaluasi', 'id_detailpenilaian', 'keterangan'];
|
||||||
|
|
||||||
|
public function getEvaluasi()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_eval($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->db->table('detail_penilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->where([
|
||||||
|
'id_detailpenilaian' => $id,
|
||||||
|
])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById2($id)
|
||||||
|
{
|
||||||
|
return $this->db->table('evaluasi')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_detailpenilaian = evaluasi.id_detailpenilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->join('penilaian', 'penilaian.id_penilaian = detail_penilaian.id_penilaian')
|
||||||
|
->where([
|
||||||
|
'id_evaluasi' => $id,
|
||||||
|
])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEvaluasiBelum()
|
||||||
|
{
|
||||||
|
return $this->db->table('detail_penilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->where([
|
||||||
|
'is_eval' => 0,
|
||||||
|
'status' => 1
|
||||||
|
])
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEvaluasiSudah($bulan_selected = null, $tahun_selected = null)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('evaluasi')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_detailpenilaian = evaluasi.id_detailpenilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->join('penilaian', 'penilaian.id_penilaian = detail_penilaian.id_penilaian')
|
||||||
|
->where([
|
||||||
|
'is_eval' => 1,
|
||||||
|
'status' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (!empty($bulan_selected)) {
|
||||||
|
$builder->where('penilaian.bulan', $bulan_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($tahun_selected)) {
|
||||||
|
$builder->where('penilaian.tahun', $tahun_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRapor($nip)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('evaluasi')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_detailpenilaian = evaluasi.id_detailpenilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip')
|
||||||
|
->join('penilaian', 'penilaian.id_penilaian = detail_penilaian.id_penilaian')
|
||||||
|
->where([
|
||||||
|
'is_eval' => 1,
|
||||||
|
'status' => 1,
|
||||||
|
'detail_penilaian.nip' => $nip
|
||||||
|
]);
|
||||||
|
|
||||||
|
// if (!empty($bulan_selected)) {
|
||||||
|
// $builder->where('penilaian.bulan', $bulan_selected);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!empty($tahun_selected)) {
|
||||||
|
// $builder->where('penilaian.tahun', $tahun_selected);
|
||||||
|
// }
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelGuru extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'guru';
|
||||||
|
protected $primaryKey = 'nip';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['nip', 'nama_guru', 'tanggal_lahir', 'jenis_kelamin', 'alamat', 'jabatan', 'username', 'password', 'hak_akses', 'is_aktif'];
|
||||||
|
|
||||||
|
public function getGuru()
|
||||||
|
{
|
||||||
|
return $this->where(['is_aktif' => 1])->get()->getResult();
|
||||||
|
}
|
||||||
|
public function getGuru2()
|
||||||
|
{
|
||||||
|
return $this->where(['is_aktif' => 0])->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_guru($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['nip' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function cekUsername($username)
|
||||||
|
{
|
||||||
|
return $this->where('username', $username)->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function check_nip_exists($nip)
|
||||||
|
{
|
||||||
|
return $this->where('nip', $nip)->countAllResults() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function check_username_exists($username)
|
||||||
|
{
|
||||||
|
return $this->where('username', $username)->countAllResults() > 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelJurnal extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'jurnal';
|
||||||
|
protected $primaryKey = 'id_jurnal';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_jurnal', 'bulan', 'tahun', 'mapel', 'total_jurnal', 'keterangan', 'nip'];
|
||||||
|
|
||||||
|
public function getJurnal($nip)
|
||||||
|
{
|
||||||
|
return $this->db->table('jurnal')
|
||||||
|
->join('guru', 'jurnal.nip = guru.nip')
|
||||||
|
->where([
|
||||||
|
'jurnal.nip' => $nip,
|
||||||
|
])
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getJurnalAll()
|
||||||
|
{
|
||||||
|
return $this->db->table('jurnal')
|
||||||
|
->join('guru', 'jurnal.nip = guru.nip')->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAllJurnal()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_jurnal($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_jurnal' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRekapJurnal($bulan, $tahun, $nip)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table($this->table);
|
||||||
|
$builder->select('*')
|
||||||
|
->where('nip', $nip)
|
||||||
|
->where('tahun', $tahun)
|
||||||
|
->where('bulan >=', $bulan - 2)
|
||||||
|
->where('bulan <=', $bulan)
|
||||||
|
->orderBy('bulan', 'ASC');
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelKriteria extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'kriteria';
|
||||||
|
protected $primaryKey = 'id_kriteria';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_kriteria', 'kode_kriteria', 'nama_kriteria', 'tipe', 'bobot'];
|
||||||
|
|
||||||
|
public function getKriteria()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_kriteria($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_kriteria' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTipeByKode($kode)
|
||||||
|
{
|
||||||
|
$kriteria = $this->where('kode_kriteria', $kode)->get()->getRow();
|
||||||
|
if ($kriteria) {
|
||||||
|
return $kriteria->tipe;
|
||||||
|
} else {
|
||||||
|
return null; // Atau Anda bisa menangani kesalahan sesuai kebutuhan aplikasi Anda
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBobotByKode($kode)
|
||||||
|
{
|
||||||
|
$kriteria = $this->where('kode_kriteria', $kode)->get()->getRow();
|
||||||
|
if ($kriteria) {
|
||||||
|
return $kriteria->bobot;
|
||||||
|
} else {
|
||||||
|
return null; // Atau Anda bisa menangani kesalahan sesuai kebutuhan aplikasi Anda
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelPenilaian extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'penilaian';
|
||||||
|
protected $primaryKey = 'id_penilaian';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_penilaian', 'bulan', 'tahun'];
|
||||||
|
|
||||||
|
public function getKategori()
|
||||||
|
{
|
||||||
|
return $this->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPenilaian($bulan_selected = null, $tahun_selected = null)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('penilaian')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_penilaian = penilaian.id_penilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip');
|
||||||
|
|
||||||
|
if (!empty($bulan_selected)) {
|
||||||
|
$builder->where('penilaian.bulan', $bulan_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($tahun_selected)) {
|
||||||
|
$builder->where('penilaian.tahun', $tahun_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRanking($bulan_selected = null, $tahun_selected = null)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table('penilaian')
|
||||||
|
->join('detail_penilaian', 'detail_penilaian.id_penilaian = penilaian.id_penilaian')
|
||||||
|
->join('guru', 'guru.nip = detail_penilaian.nip');
|
||||||
|
|
||||||
|
if (!empty($bulan_selected)) {
|
||||||
|
$builder->where('penilaian.bulan', $bulan_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($tahun_selected)) {
|
||||||
|
$builder->where('penilaian.tahun', $tahun_selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Menambahkan orderBy untuk mengurutkan berdasarkan nilai tertinggi
|
||||||
|
$builder->orderBy('detail_penilaian.hasil', 'DESC');
|
||||||
|
|
||||||
|
return $builder->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_penilaian($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_penilaian' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function getDistinctKategori()
|
||||||
|
// {
|
||||||
|
// $result = $this->db->table('penilaian')->distinct()->select('kategori, id_penilaian')->get()->getResultArray();
|
||||||
|
// return $result;
|
||||||
|
// }
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
use Codeigniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
|
class ModelSurat extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->db = \Config\Database::connect();
|
||||||
|
$this->request = \Config\Services::request();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected $table = 'surat';
|
||||||
|
protected $primaryKey = 'id_surat';
|
||||||
|
protected $returnType = 'object';
|
||||||
|
protected $allowedFields = ['id_surat', 'nip', 'jenis_surat', 'jabatan', 'tanggal', 'keterangan_surat', 'lampiran'];
|
||||||
|
|
||||||
|
public function getSurat($nip)
|
||||||
|
{
|
||||||
|
return $this->db->table('surat')
|
||||||
|
->join('guru', 'surat.nip = guru.nip')
|
||||||
|
->where([
|
||||||
|
'surat.nip' => $nip,
|
||||||
|
])
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSuratAll()
|
||||||
|
{
|
||||||
|
return $this->db->table('surat')
|
||||||
|
->join('guru', 'surat.nip = guru.nip')->get()->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert_surat($data)
|
||||||
|
{
|
||||||
|
return $this->db->table($this->table)->insert($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getById($id)
|
||||||
|
{
|
||||||
|
return $this->where(['id_surat' => $id])->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRekapTugas($nip)
|
||||||
|
{
|
||||||
|
$builder = $this->db->table($this->table);
|
||||||
|
$currentDate = date('Y-m-d');
|
||||||
|
$threeMonthsAgo = date('Y-m-d', strtotime('-3 months'));
|
||||||
|
|
||||||
|
return $this->db->table('surat')
|
||||||
|
->join('guru', 'surat.nip = guru.nip')
|
||||||
|
->where('jenis_surat', 1)
|
||||||
|
->where('surat.nip', $nip)
|
||||||
|
->where('tanggal >=', $threeMonthsAgo)
|
||||||
|
->where('tanggal <=', $currentDate)
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRekapPanitia($nip)
|
||||||
|
{
|
||||||
|
$currentDate = date('Y-m-d');
|
||||||
|
$threeMonthsAgo = date('Y-m-d', strtotime('-3 months'));
|
||||||
|
|
||||||
|
return $this->db->table('surat')
|
||||||
|
->join('guru', 'surat.nip = guru.nip')
|
||||||
|
->where('jenis_surat', 2)
|
||||||
|
->where('surat.nip', $nip)
|
||||||
|
->where('tanggal >=', $threeMonthsAgo)
|
||||||
|
->where('tanggal <=', $currentDate)
|
||||||
|
->get()
|
||||||
|
->getResult();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Edit Data Absensi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Absensi</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/absensi/update/'. $data->id_absensi) ?>" method="post">
|
||||||
|
<?php echo view('Absensi/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,140 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header bg-info">
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-body">
|
||||||
|
<h3 class="card-title">Tambah</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Bulan</label>
|
||||||
|
<select class="form-control custom-select" name="bulan">
|
||||||
|
<?php
|
||||||
|
$namaBulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<?php
|
||||||
|
foreach ($namaBulan as $key => $value) {
|
||||||
|
$selected = ($key == @$data->bulan) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $key . '" ' . $selected . '>' . $value . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Tahun</label>
|
||||||
|
<select class="form-control custom-select" name="tahun">
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<?php
|
||||||
|
$tahun_sekarang = date("Y");
|
||||||
|
for ($i = $tahun_sekarang; $i >= 2000; $i--) {
|
||||||
|
$selected = ($i == @$data->tahun) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group ">
|
||||||
|
<label class="control-label">NIP</label>
|
||||||
|
<input type="text" id="nip" class="form-control" placeholder="Masukkan NIP"
|
||||||
|
name="nip" value="<?php echo @$data->nip ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Nama</label>
|
||||||
|
<input type="text" id="nama" class="form-control" placeholder="Masukkan Nama"
|
||||||
|
name="nama" value="<?php echo @$data->nama ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Sakit</label>
|
||||||
|
<input type="number" id="sakit" class="form-control" placeholder="Masukkan Jumlah Sakit"
|
||||||
|
name="sakit" value="<?php echo @$data->sakit ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Ijin</label>
|
||||||
|
<input type="number" id="ijin" class="form-control" placeholder="Masukkan Jumlah Ijin"
|
||||||
|
name="ijin" value="<?php echo @$data->ijin ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Alpa</label>
|
||||||
|
<input type="number" id="alpa" class="form-control" placeholder="Masukkan Jumlah Alpa"
|
||||||
|
name="alpa" value="<?php echo @$data->alpa ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Cuti</label>
|
||||||
|
<input type="number" id="cuti" class="form-control" placeholder="Masukkan Jumlah Cuti"
|
||||||
|
name="cuti" value="<?php echo @$data->ijin ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Total Kehadiran</label>
|
||||||
|
<input type="number" id="total_kehadiran" class="form-control" placeholder="Masukkan Total Kehadiran"
|
||||||
|
name="total_kehadiran" value="<?php echo @$data->total_kehadiran ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Total Kerja</label>
|
||||||
|
<input type="number" id="total_kerja" class="form-control" placeholder="Masukkan Total Kerja"
|
||||||
|
name="total_kerja" value="<?php echo @$data->total_kerja ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> Save</button>
|
||||||
|
<button type="button" class="btn btn-inverse">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Tambah Data Absensi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Absensi</a></li>
|
||||||
|
<li class="breadcrumb-item active">Tambah</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/absensi/insert') ?>" method="post">
|
||||||
|
<?php echo view('Absensi/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,173 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Data Absensi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item active">Data Absensi</li>
|
||||||
|
</ol>
|
||||||
|
<a href="<?= base_url('absensi/input') ?>">
|
||||||
|
<button type="button" class="btn btn-info d-none d-lg-block m-l-15"><i class="fa fa-plus-circle"></i>
|
||||||
|
Tambah</button>
|
||||||
|
</a>
|
||||||
|
<button type="button" class="btn btn-info d-none d-lg-block m-l-15" data-toggle="modal"
|
||||||
|
data-target="#exampleModal" data-whatever="@mdo"><i class="fa fa-plus-circle"></i> Import Excel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel1">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title" id="exampleModalLabel1">Impor Excel</h4>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||||
|
aria-hidden="true">×</span></button>
|
||||||
|
</div>
|
||||||
|
<form action="<?php echo base_url('/absensi/import') ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<?= csrf_field() ?>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6 col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="recipient-name" class="control-label">Bulan:</label>
|
||||||
|
<select class="form-control custom-select" style="width: 100%; height:36px;"
|
||||||
|
name="bulan">
|
||||||
|
<option value="">Pilih Bulan</option>
|
||||||
|
<option value="1">Januari</option>
|
||||||
|
<option value="2">Februari</option>
|
||||||
|
<option value="3">Maret</option>
|
||||||
|
<option value="4">April</option>
|
||||||
|
<option value="5">Mei</option>
|
||||||
|
<option value="6">Juni</option>
|
||||||
|
<option value="7">Juli</option>
|
||||||
|
<option value="8">Agustus</option>
|
||||||
|
<option value="9">September</option>
|
||||||
|
<option value="10">Oktober</option>
|
||||||
|
<option value="11">November</option>
|
||||||
|
<option value="12">Desember</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="message-text" class="control-label">Tahun:</label>
|
||||||
|
<select class="form-control custom-select" style="width: 100%; height:36px;"
|
||||||
|
name="tahun">
|
||||||
|
<option value="">Pilih Tahun</option>
|
||||||
|
<?php
|
||||||
|
$tahun_sekarang = date("Y");
|
||||||
|
for ($i = $tahun_sekarang; $i >= 2000; $i--) {
|
||||||
|
echo '<option value="' . $i . '">' . $i . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12">
|
||||||
|
<label for="input-file-now">Upload File (.Xls / .Xlsx)</label>
|
||||||
|
<input type="file" id="input-file-now" class="dropify" name="fileexcel" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Kembali</button>
|
||||||
|
<button type="submit" class="btn btn-info">Simpan</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Daftar Data Absensi</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example23" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>NIP</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Bulan</th>
|
||||||
|
<th>Sakit</th>
|
||||||
|
<th>Ijin</th>
|
||||||
|
<th>Alpa</th>
|
||||||
|
<th>Cuti</th>
|
||||||
|
<th>Total Kehadiran</th>
|
||||||
|
<th>Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$namaBulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
$no = 1;
|
||||||
|
foreach ($absensi as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nip; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $namaBulan[$row->bulan]; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->sakit; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->ijin; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->alpa; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->cuti; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->total_kehadiran; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('absensi/edit/' . $row->id_absensi) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline" data-toggle="tooltip"
|
||||||
|
data-original-title="Edit"><i class="ti-pencil" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('absensi/delete/' . $row->id_absensi) ?>"
|
||||||
|
onclick="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline" data-toggle="tooltip"
|
||||||
|
data-original-title="Delete"><i class="ti-close" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Edit Amal Yaumi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Pendukung</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Amal Yaumi</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/amal/update/'. $data->id_amal) ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<?php echo view('Amal/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,161 @@
|
||||||
|
<?= csrf_field() ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header bg-info">
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-body">
|
||||||
|
<h3 class="card-title">Person Info</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group has-success">
|
||||||
|
<label class="control-label">Bulan</label>
|
||||||
|
<select class="form-control custom-select" name="bulan">
|
||||||
|
<?php
|
||||||
|
$namaBulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<?php
|
||||||
|
foreach ($namaBulan as $key => $value) {
|
||||||
|
$selected = ($key == @$data->bulan) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $key . '" ' . $selected . '>' . $value . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Tahun</label>
|
||||||
|
<select class="form-control custom-select" name="tahun">
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<?php
|
||||||
|
$tahun_sekarang = date("Y");
|
||||||
|
for ($i = $tahun_sekarang; $i >= 2000; $i--) {
|
||||||
|
$selected = ($i == @$data->tahun) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Sholat Jamaah / Tepat Waktu</label>
|
||||||
|
<input type="text" id="sholat_jamaah" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Sholat Jamaah / Tepat Waktu" name="sholat_jamaah"
|
||||||
|
value="<?php echo @$data->sholat_jamaah ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Tilawah</label>
|
||||||
|
<input type="text" id="tilawah" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Tilawah" name="tilawah"
|
||||||
|
value="<?php echo @$data->tilawah ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Qiyamul Lail / Sholat Tahajud</label>
|
||||||
|
<input type="text" id="sholat_tahajud" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Qiyamul Lail / Sholat Tahajud" name="sholat_tahajud"
|
||||||
|
value="<?php echo @$data->sholat_tahajud ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Sholat Dhuha</label>
|
||||||
|
<input type="text" id="sholat_dhuha" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Sholat Dhuha" name="sholat_dhuha"
|
||||||
|
value="<?php echo @$data->sholat_dhuha ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Membantu Orang Tua / Bersih-Bersih</label>
|
||||||
|
<input type="text" id="bantu_ortu" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Membantu Orang Tua / Bersih-Bersih" name="bantu_ortu"
|
||||||
|
value="<?php echo @$data->bantu_ortu ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Literasi</label>
|
||||||
|
<input type="text" id="literasi" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Literasi" name="literasi"
|
||||||
|
value="<?php echo @$data->literasi ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Infaq / Sedekah</label>
|
||||||
|
<input type="text" id="infaq" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Infaq / Sedekah" name="infaq"
|
||||||
|
value="<?php echo @$data->infaq ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Olahraga</label>
|
||||||
|
<input type="text" id="olahraga" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Olahraga" name="olahraga"
|
||||||
|
value="<?php echo @$data->olahraga ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group has-success">
|
||||||
|
<label class="control-label">Hafalan</label>
|
||||||
|
<input type="text" id="hafalan" class="form-control"
|
||||||
|
placeholder="Masukkan Jumlah Hafalan Dalam Juz" name="hafalan"
|
||||||
|
value="<?php echo @$data->hafalan ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group has-success">
|
||||||
|
<label class="control-label">Lampiran</label>
|
||||||
|
<input type="file" id="input-file-now-custom-1" class="dropify" name="lampiran" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span data-default-file="../assets/dokumen/surat/"-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> Save</button>
|
||||||
|
<button type="button" class="btn btn-inverse">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Tambah Amal Yaumi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Pendukung</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Amal Yaumi</a></li>
|
||||||
|
<li class="breadcrumb-item active">Tambah</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/amal/insert') ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<?php echo view('Amal/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,94 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Amal Yaumi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Pendukung</a></li>
|
||||||
|
<li class="breadcrumb-item active">Amal Yaumi</li>
|
||||||
|
</ol>
|
||||||
|
<a href="<?= base_url('amal/input') ?>">
|
||||||
|
<button type="button" class="btn btn-info d-none d-lg-block m-l-15"><i class="fa fa-plus-circle"></i>
|
||||||
|
Tambah</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Daftar Amal Yaumi</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example23" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>Bulan</th>
|
||||||
|
<th>Sholat Jamaah / Tepat Waktu</th>
|
||||||
|
<th>Hafalan</th>
|
||||||
|
<th style="width: 100px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$namaBulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
$no = 1;
|
||||||
|
foreach ($amal as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $namaBulan[$row->bulan]; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->sholat_jamaah; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->hafalan; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('amal/edit/' . $row->id_amal) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Edit"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('amal/edit/' . $row->id_amal) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Lampiran"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('amal/delete/' . $row->id_amal) ?>" onclick="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Delete"><i class="ti-close"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,98 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Data Amal Yaumi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item active">Data Amal Yaumi</li>
|
||||||
|
</ol>
|
||||||
|
<a href="<?= base_url('amal/input') ?>">
|
||||||
|
<button type="button" class="btn btn-info d-none d-lg-block m-l-15"><i class="fa fa-plus-circle"></i>
|
||||||
|
Tambah</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Daftar Data Amal Yaumi</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example23" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Bulan</th>
|
||||||
|
<th>Sholat Jamaah / Tepat Waktu</th>
|
||||||
|
<th>Hafalan</th>
|
||||||
|
<th style="width: 100px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$namaBulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
$no = 1;
|
||||||
|
foreach ($jurnal as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $namaBulan[$row->bulan]; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->sholat_jamaah; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->hafalan; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('amal/edit/' . $row->id_amal) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Edit"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('amal/edit/' . $row->id_amal) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Lampiran"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('amal/delete/' . $row->id_amal) ?>" onclick="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Delete"><i class="ti-close"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,117 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="author" content="">
|
||||||
|
<!-- Favicon icon -->
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url() ?>assets/images/logo_smp.png">
|
||||||
|
<title>Login</title>
|
||||||
|
|
||||||
|
<!-- page css -->
|
||||||
|
<link href="<?php echo base_url() ?>dist/css/pages/login-register-lock.css" rel="stylesheet">
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link href="<?php echo base_url() ?>dist/css/style.min.css" rel="stylesheet">
|
||||||
|
<!--Toaster Popup message CSS -->
|
||||||
|
<link href="<?php echo base_url() ?>assets/node_modules/toast-master/css/jquery.toast.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="horizontal-nav skin-megna card-no-border">
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Preloader - style you can find in spinners.css -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<div class="preloader">
|
||||||
|
<div class="loader">
|
||||||
|
<div class="loader__figure"></div>
|
||||||
|
<p class="loader__label">SPK Penilaian</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Main wrapper - style you can find in pages.scss -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<section id="wrapper">
|
||||||
|
<div class="login-register" style="background-image:url(<?php echo base_url() ?>assets/images/bg.jpg);">
|
||||||
|
<div class="login-box card mx-auto mt-5">
|
||||||
|
<div class="card-body">
|
||||||
|
<form class="form-horizontal form-material" id="loginform"
|
||||||
|
action="<?php echo base_url('proses_login'); ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<h3 class="box-title m-b-20">Sign In</h3>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="form-control" type="text" required="" placeholder="Username" name="username">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="form-control" type="password" required="" placeholder="Password"
|
||||||
|
name="password">
|
||||||
|
</div>
|
||||||
|
<div class="form-group text-center">
|
||||||
|
<button class="btn btn-block btn-lg btn-info btn-rounded" type="submit" name="submit"
|
||||||
|
value="Login">Log In</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- End Wrapper -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- All Jquery -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<script src="<?php echo base_url() ?>assets/node_modules/jquery/jquery-3.2.1.min.js"></script>
|
||||||
|
<!-- Bootstrap tether Core JavaScript -->
|
||||||
|
<script src="<?php echo base_url() ?>assets/node_modules/popper/popper.min.js"></script>
|
||||||
|
<script src="<?php echo base_url() ?>assets/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<!-- Popup message jquery -->
|
||||||
|
<script src="<?php echo base_url() ?>assets/node_modules/toast-master/js/jquery.toast.js"></script>
|
||||||
|
<!--Custom JavaScript -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
$(".preloader").fadeOut();
|
||||||
|
});
|
||||||
|
$(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
});
|
||||||
|
// ==============================================================
|
||||||
|
// Login and Recover Password
|
||||||
|
// ==============================================================
|
||||||
|
$('#to-recover').on("click", function () {
|
||||||
|
$("#loginform").slideUp();
|
||||||
|
$("#recoverform").fadeIn();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
<?php if (session()->getFlashdata('error')): ?>
|
||||||
|
$.toast({
|
||||||
|
heading: 'Error',
|
||||||
|
text: '<?php echo session()->getFlashdata('error'); ?>',
|
||||||
|
position: 'top-right',
|
||||||
|
loaderBg: '#ff6849',
|
||||||
|
icon: 'error',
|
||||||
|
hideAfter: 3500,
|
||||||
|
stack: 6
|
||||||
|
});
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
$(".preloader").fadeOut();
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,846 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Rapor Kinerja</title>
|
||||||
|
<style>
|
||||||
|
.logo-left {
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
/* Adjust as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-right {
|
||||||
|
float: right;
|
||||||
|
margin-left: 10px;
|
||||||
|
/* Adjust as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix::after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="logo-left">
|
||||||
|
<img src="<?php echo base_url() ?>assets/images/logo1.png" alt="Logo 1">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="logo-right">
|
||||||
|
<img src="<?php echo base_url() ?>assets/images/logo2.png" alt="Logo 2">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"
|
||||||
|
style="border-bottom:4.5pt double #622423;border-left-style:none;border-right-style:none;border-top-style:none;padding:0cm 0cm 7.0pt;">
|
||||||
|
<p style="border-style:none;margin:0cm;padding:0cm;tab-stops:center 226.85pt right 451.3pt;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:14.0pt;"><strong>SMP ISLAM TERPADU
|
||||||
|
AL-GHOZALI JEMBER</strong></span>
|
||||||
|
</p>
|
||||||
|
<p style="border-style:none;margin:0cm;padding:0cm;tab-stops:center 226.85pt right 451.3pt;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:11pt;"><strong>NSS : 202052430298 |
|
||||||
|
NPSN : 20556102</strong></span>
|
||||||
|
</p>
|
||||||
|
<p style="border-style:none;margin:0cm;padding:0cm;tab-stops:center 226.85pt right 451.3pt;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:10.0pt;"><span lang="DE"
|
||||||
|
dir="ltr"><strong>J</strong></span><strong>a</strong><span lang="DE"
|
||||||
|
dir="ltr"><strong>l</strong></span><strong>an</strong><span lang="DE" dir="ltr"><strong> Kaliurang
|
||||||
|
175 </strong></span><strong>Tegalgede </strong><span lang="DE"
|
||||||
|
dir="ltr"><strong>Sumbersari Jember 68121 </strong></span></span><span
|
||||||
|
style="font-family:Wingdings;font-size:10.0pt;"><span><strong>(</strong></span></span><span
|
||||||
|
style="font-family:"Times New Roman",serif;font-size:10.0pt;"><span lang="DE"
|
||||||
|
dir="ltr"><strong> 0331 4436785</strong></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="border-style:none;margin:0cm;padding:0cm;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:10.0pt;"><strong>website
|
||||||
|
: </strong></span><a target="_blank" rel="noopener noreferrer"
|
||||||
|
href="http://www.smpitalghozali.sch.id"><span
|
||||||
|
style="font-family:"Times New Roman",serif;font-size:10.0pt;"><strong>www.smpitalghozali.sch.id</strong></span></a><span
|
||||||
|
style="font-family:"Times New Roman",serif;font-size:10.0pt;"><strong> email
|
||||||
|
: </strong></span><a href="mailto:smpit.alghozali@gmail.com"><span
|
||||||
|
style="font-family:"Times New Roman",serif;font-size:10.0pt;"><strong>smpit.alghozali@gmail.com</strong></span></a><span
|
||||||
|
style="font-family:"Times New Roman",serif;font-size:10.0pt;"><strong> </strong></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<!-- <a href="<?php //echo site_url('pdf/generate') ?>">
|
||||||
|
Download PDF
|
||||||
|
</a> -->
|
||||||
|
<p style="margin-top:0pt; margin-bottom:0pt; line-height:normal;"> </p>
|
||||||
|
</div>
|
||||||
|
<p style="line-height:115%;margin:0cm;tab-stops:266.9pt;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:115%;"><strong>RAPOR PENILAIAN KINERJA GURU/</strong></span><span style="line-height:115%;" lang="IN" dir="ltr"><strong>KARYAWAN </strong></span></span><br>
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:115%;" lang="IN" dir="ltr"><strong>SMPIT</strong></span><span style="line-height:115%;"><strong> AL-GHOZALI JEMBER</strong></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:115%;margin:0cm;tab-stops:266.9pt;text-align:center;">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<ol style="list-style-type:upper-alpha;padding-left:48px;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:150%;margin-bottom:0cm;margin-right:0cm;margin-top:0cm;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Identitas Guru</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Nama : <?php echo @$data->nama_guru?></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">NIP : <?php echo @$data->nip?></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<?php
|
||||||
|
// Array untuk konversi bulan
|
||||||
|
$bulanIndonesia = [
|
||||||
|
'January' => 'Januari',
|
||||||
|
'February' => 'Februari',
|
||||||
|
'March' => 'Maret',
|
||||||
|
'April' => 'April',
|
||||||
|
'May' => 'Mei',
|
||||||
|
'June' => 'Juni',
|
||||||
|
'July' => 'Juli',
|
||||||
|
'August' => 'Agustus',
|
||||||
|
'September' => 'September',
|
||||||
|
'October' => 'Oktober',
|
||||||
|
'November' => 'November',
|
||||||
|
'December' => 'Desember'
|
||||||
|
];
|
||||||
|
|
||||||
|
// Assume $data->tanggal contains a date in 'Y-m-d' format
|
||||||
|
$tanggal = @$data->tanggal_lahir;
|
||||||
|
|
||||||
|
// Create DateTime object
|
||||||
|
$date = new DateTime($tanggal);
|
||||||
|
|
||||||
|
// Format the date to English
|
||||||
|
$formattedDateEnglish = $date->format('j F Y');
|
||||||
|
|
||||||
|
// Replace English month with Indonesian month
|
||||||
|
$formattedDate = str_replace(array_keys($bulanIndonesia), array_values($bulanIndonesia), $formattedDateEnglish);
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Tanggal Lahir : <?php echo $formattedDate?></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Jabatan : <?php echo @$data->jabatan?></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Jenis Kelamin : <?php echo @$data->jenis_kelamin?></span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Alamat : <?php echo @$data->alamat?></span></span>
|
||||||
|
</p>
|
||||||
|
<ol style="list-style-type:upper-alpha;padding-left:48px;" start="2">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:150%;margin-bottom:0cm;margin-right:0cm;margin-top:0cm;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Identitas Sekolah</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Nama Instansi : SMPIT Al-Ghozali Jember</span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Telp/Fax : 0331-4436785</span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Kelurahan : Tegalgede</span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Kecamatan : Sumbersari</span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Kabupaten : Jember</span></span>
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 134.7pt;text-indent:-98.7pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;">Provinsi : Jawa Timur</span></span>
|
||||||
|
</p>
|
||||||
|
<ol style="list-style-type:upper-alpha;padding-left:48px;" start="3">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:150%;margin-bottom:8pt;margin-right:0cm;margin-top:0cm;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Rekap Absensi</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<figure class="table" style="margin-left:7.2px;margin-right:auto;width:604.8px;">
|
||||||
|
<table style="border-collapse:collapse;border:1px solid #000000;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:82.8px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">#</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:56.67px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Sakit</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Ijin</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.2px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Alpa</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Cuti</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:132.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Total Kehadiran</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:134.6px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Total Kerja</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
// Array nama bulan
|
||||||
|
$nama_bulan = [
|
||||||
|
1 => 'Januari',
|
||||||
|
2 => 'Februari',
|
||||||
|
3 => 'Maret',
|
||||||
|
4 => 'April',
|
||||||
|
5 => 'Mei',
|
||||||
|
6 => 'Juni',
|
||||||
|
7 => 'Juli',
|
||||||
|
8 => 'Agustus',
|
||||||
|
9 => 'September',
|
||||||
|
10 => 'Oktober',
|
||||||
|
11 => 'November',
|
||||||
|
12 => 'Desember'
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?php if (!empty($rekap_absensi)): ?>
|
||||||
|
<?php foreach ($rekap_absensi as $absensi): ?>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:82.8px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?= "Bulan ".$nama_bulan[$absensi->bulan]; ?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:56.67px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->sakit !== null ? $absensi->sakit : 0; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->ijin !== null ? $absensi->ijin : 0; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.2px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->alpa !== null ? $absensi->alpa : 0; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->cuti !== null ? $absensi->cuti : 0; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:132.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->total_kehadiran; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:134.6px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<?= $absensi->total_kerja; ?>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;padding:0px 7.2px;vertical-align:top;width:132.27px;" colspan="7">Data absensi tidak ditemukan</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</figure>
|
||||||
|
<ol style="list-style-type:upper-alpha;padding-left:48px;" start="4">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:150%;margin-bottom:8pt;margin-right:0cm;margin-top:12.0pt;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Hasil Kinerja</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<figure class="table">
|
||||||
|
<table style="border-collapse:collapse;border-style:solid;margin-left:5.4pt;" border="1" cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1.0pt solid windowtext;padding:0cm 5.4pt;vertical-align:top;width:225.2pt;" width="300">
|
||||||
|
<p style="line-height:150%;margin:0cm;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Waktu Penilaian</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border-bottom-style:solid;border-color:windowtext;border-left-style:none;border-right-style:solid;border-top-style:solid;border-width:1.0pt;padding:0cm 5.4pt;vertical-align:top;width:228.4pt;" width="305">
|
||||||
|
<p style="line-height:150%;margin:0cm;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><strong>Tahun</strong></span></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
// Array untuk konversi bulan
|
||||||
|
$bulanIndonesia = [
|
||||||
|
'January' => 'Januari',
|
||||||
|
'February' => 'Februari',
|
||||||
|
'March' => 'Maret',
|
||||||
|
'April' => 'April',
|
||||||
|
'May' => 'Mei',
|
||||||
|
'June' => 'Juni',
|
||||||
|
'July' => 'Juli',
|
||||||
|
'August' => 'Agustus',
|
||||||
|
'September' => 'September',
|
||||||
|
'October' => 'Oktober',
|
||||||
|
'November' => 'November',
|
||||||
|
'December' => 'Desember'
|
||||||
|
];
|
||||||
|
|
||||||
|
// Assume $data->tanggal contains a date in 'Y-m-d' format
|
||||||
|
$tanggal = @$data->tanggal;
|
||||||
|
|
||||||
|
// Create DateTime object
|
||||||
|
$date = new DateTime($tanggal);
|
||||||
|
|
||||||
|
// Format the date to English
|
||||||
|
$tanggalNilai = $date->format('j F Y');
|
||||||
|
$tahun = $date->format('Y');
|
||||||
|
|
||||||
|
// Replace English month with Indonesian month
|
||||||
|
$formattedDate2 = str_replace(array_keys($bulanIndonesia), array_values($bulanIndonesia), $tanggalNilai);
|
||||||
|
?>
|
||||||
|
<tr style="height:35.9pt;">
|
||||||
|
<td style="border-bottom-style:solid;border-color:windowtext;border-left-style:solid;border-right-style:solid;border-top-style:none;border-width:1.0pt;height:35.9pt;padding:0cm 5.4pt;width:225.2pt;" width="300">
|
||||||
|
<p style="line-height:150%;margin:0cm;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><?php echo $formattedDate2?></span></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border-bottom:1.0pt solid windowtext;border-left-style:none;border-right:1.0pt solid windowtext;border-top-style:none;height:35.9pt;padding:0cm 5.4pt;width:228.4pt;" width="305">
|
||||||
|
<p style="line-height:150%;margin:0cm;text-align:center;">
|
||||||
|
<span style="font-family:"Times New Roman",serif;font-size:12.0pt;"><span style="line-height:150%;"><?php echo $tahun?></span></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</figure>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 18.0pt;">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<div class="page-break" style="page-break-after:always;">
|
||||||
|
<span style="display:none;"> </span>
|
||||||
|
</div>
|
||||||
|
<p style="line-height:107%;margin:0cm 0cm 8pt;">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<p style="line-height:150%;margin:0cm 0cm 0cm 18.0pt;">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<figure class="table" style="margin-right:auto;width:704.8px;">
|
||||||
|
<table style="margin-left:7.2px;border-collapse:collapse;border:1px solid #000000;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:37.47px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><strong>NO</strong></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:37.47px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><strong>ASPEK YANG DINILAI</strong></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:37.47px;vertical-align:middle;width:322.4px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><strong>INDIKATOR</strong></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:37.47px;vertical-align:middle;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><strong>NILAI</strong></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">1.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:justify;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Ibadah</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Keterlibatan dalam BPI guru </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Hafalan Al Qur’an</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k1?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">2.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kesetiaan dan Ketaatan</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menerima tugas dari pimpinan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Mengutamakan kepentingan Lembaga</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menjaga nama baik lembaga lisan maupun Tindakan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menerima keputusan pimpinan/lembaga </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k2?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">3.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kedisiplinan dan Ketertiban</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Masuk kerja (rata-rata/bln selama 3 bulan terakhir)</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Keikutsertaan dalam pembinaan/ rapat dinas (3 bln terakhir)</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Datang tepat waktu (rata-rata/ bln selama 3 bulan terakhir)</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Ketertiban dalam berseragam (rata-rata/ bln selama 3 bulan terakhir)</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k3?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">4.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Tanggung Jawab</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Melaksanakan pekerjaan sampai tuntas</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Mempertanggung jawabkan pelaksanaan tugas</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Amanah terhadap rahasia jabatan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Amanah dalam menggunakan dan merawat aset Lembaga</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Sensitif terhadap kebersihan dan kerapian tempat kerja dan lingkungan nya</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Hemat & sensitif thd program penghematan air, telepon & listrik</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k4?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">5.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Ketuntasan Kerja dan Penguasaan Tugas</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menampilkan hasil kerja yang bermutu</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Tepat waktu dalam menyelesaikan tugas dan perintah dinas </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Cekatan /terampil dalam melaksanakan tugas </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Teliti dan rapi dalam melaksanakan pekerjaan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Efektif dan efisien dalam melaksanakan pekerjaan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k5?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">6.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kejujuran</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menjaga diri dari menggunakan fasilitas lembaga utk kepentingan pribadi </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Tidak melakukan kecurangan dan atau pemalsuan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Tidak menyalahgunakan tanggung jawab dan wewenang </span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k6?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">7.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Interaksi Sosial</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Santun, rendah hati dan ramah terhadap orang lain</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Menghargai pendapat orang lain</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k7?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">8.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kepemimpinan</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kemampuan dalam membimbing orang lain</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kemampuan dalam mengambil keputusan secara bijak</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kemamampuan bekerja dengan orang lain dalam rangka melaksanakan tugas</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kemampuan dalam memotivasi orang lain</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Kemampuan memberi keteladan yang baik</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k8?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:47.27px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">9.</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:189px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Inisiatif</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:302.4px;">
|
||||||
|
|
||||||
|
|
||||||
|
<ol style="list-style-type:lower-latin;">
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Berusaha mencari cara baru yang lebih efisien dalam rangka melaksanakkan tugas</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Tidak menungggu perintah/petunjuk atasan dalam melaksanakan tugas yang menjadi tanggung jawabnya</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Mampu mengambil keputusan/tindakan dengan cepat dan tepat</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Memberikan saran yang dipandang baik dan berguna bagi lembaga/pimpinan</span>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->k9?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:538.67px;" colspan="3">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Jumlah</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:top;width:66.13px;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;vertical-align:middle;width:538.67px;" colspan="3">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;">Nilai</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #000000;height:1.33px;width:66.13px;text-align:center;vertical-align:middle;">
|
||||||
|
<p style="line-height:1.5;margin-bottom:0px;margin-top:0px;text-align:center;">
|
||||||
|
<span style="font-family:'Times New Roman', Times, serif;font-size:16px;"><?php echo @$data->hasil?></span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" style="width: 16cm;border-right: 1pt solid windowtext;border-bottom: 1pt solid windowtext;border-left: 1pt solid windowtext;border-image: initial;border-top: none;padding: 0cm 5.4pt;height: 70.45pt;vertical-align: top;">
|
||||||
|
<p style='margin:0cm;font-size:15px;font-family:"Calibri",sans-serif;line-height:150%;'><span style='font-size:16px;line-height:150%;font-family:"Times New Roman",serif;'>Keterangan:</span></p>
|
||||||
|
<p style='margin:0cm;font-size:15px;font-family:"Calibri",sans-serif;line-height:150%;'><span style='font-size:16px;line-height:150%;font-family:"Times New Roman",serif;'><?php echo @$data->keterangan?></span></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom:0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:150%;'><span style='font-size:16px;line-height:150%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<table style="width:474.9pt;margin-left:-1.7pt;border-collapse:collapse;border:none;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 163.05pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 148.85pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 163pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Jember, ……………………….</span></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 163.05pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: bottom;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-4.1pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Guru yang dinilai</span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 148.85pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: bottom;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Penilai</span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 163pt;padding: 0cm 5.4pt;height: 3.1pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Kepala SMPIT Al-Ghozali Jember</span></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 163.05pt;padding: 0cm 5.4pt;height: 71.95pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Nama yang dinilai</span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>NIP.</span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 148.85pt;padding: 0cm 5.4pt;height: 71.95pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Nama penilai</span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>NIP.</span></p>
|
||||||
|
</td>
|
||||||
|
<td style="width: 163pt;padding: 0cm 5.4pt;height: 71.95pt;vertical-align: top;">
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'> </span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>Dwi Krisnanto, S.P.</span></p>
|
||||||
|
<p style='margin-top:0cm;margin-right:-45.05pt;margin-bottom: 0cm;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;line-height:115%;'><span style='font-size:16px;line-height:115%;font-family:"Times New Roman",serif;'>NIP.</span></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;'> </p>
|
||||||
|
<p style='margin-top:0cm;margin-right:0cm;margin-bottom:8.0pt;margin-left:0cm;font-size:11.0pt;font-family:"Calibri",sans-serif;'> </p>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Form Penilaian</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Penilaian</a></li>
|
||||||
|
<li class="breadcrumb-item active">Form Penilaian</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/evaluasi/update/'. $data->id_evaluasi) ?>" method="post">
|
||||||
|
<?php echo view('Evaluasi/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,85 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header bg-info">
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-body">
|
||||||
|
<h3 class="card-title">Informasi</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Nama Penilai</label>
|
||||||
|
<input type="text" id="nama_penilai" class="form-control"
|
||||||
|
placeholder="Masukkan Nama Penilai" name="nama_penilai" value="<?= $nama; ?>"
|
||||||
|
disabled>
|
||||||
|
<input type="hidden" id="id_penilai" class="form-control"
|
||||||
|
placeholder="Masukkan Nama Penilai" name="id_penilai" value="<?= $nip; ?>" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Nama Yang Dinilai</label>
|
||||||
|
<input type="text" id="nama_guru" class="form-control"
|
||||||
|
placeholder="Masukkan Nama Penilai" name="nama_guru"
|
||||||
|
value="<?php echo @$data->nama_guru ?>" disabled>
|
||||||
|
<input type="hidden" id="id_guru" class="form-control" name="id_guru"
|
||||||
|
value="<?php echo @$data->nip ?>" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<h3 class="card-title">Penilaian</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>No.</th>
|
||||||
|
<th>Nama Kriteria</th>
|
||||||
|
<th>Nilai</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($kriteria as $index => $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?= $no++; ?></td>
|
||||||
|
<td><?= $row->nama_kriteria; ?></td>
|
||||||
|
<td><?= isset($data->{'k' . ($index + 1)}) ? $data->{'k' . ($index + 1)} : ''; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="text-center">Hasil Penilaian</td>
|
||||||
|
<td><?= @$data->hasil; ?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h3 class="card-title">Evaluasi</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<label class="control-label">Keterangan Evaluasi</label>
|
||||||
|
<textarea name="keterangan" id="textarea" class="form-control" required
|
||||||
|
placeholder="Masukkan Hasil Evluasi"><?= @$data->keterangan; ?></textarea>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-actions mt-4">
|
||||||
|
<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> Save</button>
|
||||||
|
<button type="button" class="btn btn-inverse">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Evaluasi Hasil Penilaian Kinerja Guru</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Penilaian</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Evaluasi</a></li>
|
||||||
|
<li class="breadcrumb-item active">Evaluasi</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/evaluasi/insert/'. $data->id_detailpenilaian) ?>" method="post">
|
||||||
|
<?php echo view('Evaluasi/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,183 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Evaluasi Penilaian Guru</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Evaluasi</a></li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php if ($hak_akses == 1) { ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body p-b-0">
|
||||||
|
<h4 class="card-title">Daftar Belum Dievaluasi</h4>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="myTable" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th style="width: 150px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($evalBelum as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('evaluasi/input/' . $row->id_detailpenilaian) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Evaluasi"><i
|
||||||
|
class="ti-pencil" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body p-b-0">
|
||||||
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
|
<h4 class="card-title mb-0">Daftar Sudah Dievaluasi</h4>
|
||||||
|
<form id="filterForm" method="post" action="<?= base_url('evaluasi/index') ?>" class="d-flex">
|
||||||
|
<select class="form-control custom-select mx-2"
|
||||||
|
onchange="document.getElementById('filterForm').submit()" style="width: auto; height:36px;"
|
||||||
|
name="bulan">
|
||||||
|
<option value="NULL">Pilih Bulan</option>
|
||||||
|
<?php
|
||||||
|
$bulan_selected = isset($bulan_selected) ? $bulan_selected : '';
|
||||||
|
$bulan_sekarang = date("F");
|
||||||
|
$bulan = array(
|
||||||
|
"1" => "Januari",
|
||||||
|
"2" => "Februari",
|
||||||
|
"3" => "Maret",
|
||||||
|
"4" => "April",
|
||||||
|
"5" => "Mei",
|
||||||
|
"6" => "Juni",
|
||||||
|
"7" => "Juli",
|
||||||
|
"8" => "Agustus",
|
||||||
|
"9" => "September",
|
||||||
|
"10" => "Oktober",
|
||||||
|
"11" => "November",
|
||||||
|
"12" => "Desember"
|
||||||
|
);
|
||||||
|
|
||||||
|
$bulan_english = array(
|
||||||
|
"Januari" => "January",
|
||||||
|
"Februari" => "February",
|
||||||
|
"Maret" => "March",
|
||||||
|
"April" => "April",
|
||||||
|
"Mei" => "May",
|
||||||
|
"Juni" => "June",
|
||||||
|
"Juli" => "July",
|
||||||
|
"Agustus" => "August",
|
||||||
|
"September" => "September",
|
||||||
|
"Oktober" => "October",
|
||||||
|
"November" => "November",
|
||||||
|
"Desember" => "December"
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($bulan as $num => $nama_bulan) {
|
||||||
|
$nama_bulan_english = $bulan_english[$nama_bulan];
|
||||||
|
$selected = ($nama_bulan_english == $bulan_sekarang || $num == $bulan_selected) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $num . '" ' . $selected . '>' . $nama_bulan . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select class="form-control custom-select mx-2"
|
||||||
|
onchange="document.getElementById('filterForm').submit()" style="width: auto; height:36px;"
|
||||||
|
name="tahun">
|
||||||
|
<option value="NULL">Pilih Tahun</option>
|
||||||
|
<?php
|
||||||
|
$tahun_selected = isset($tahun_selected) ? $tahun_selected : '';
|
||||||
|
$tahun_sekarang = date("Y");
|
||||||
|
for ($i = $tahun_sekarang; $i >= 2010; $i--) {
|
||||||
|
$selected = ($i == $tahun_sekarang || $i == $tahun_selected) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="myTable2" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th style="width: 150px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($evalSudah as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('evaluasi/edit/' . $row->id_evaluasi) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Edit"><i
|
||||||
|
class="ti-pencil" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('evaluasi/generatePdf/' . $row->id_evaluasi) ?>"
|
||||||
|
target="_blank">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Unduh">
|
||||||
|
<i class="ti-printer" aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Edit Data Guru</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Guru</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/guru/update/'. $data->nip) ?>" method="post">
|
||||||
|
<?php echo view('Guru/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,110 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header bg-info">
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-body">
|
||||||
|
<h3 class="card-title">Person Info</h3>
|
||||||
|
<hr>
|
||||||
|
<div class="row p-t-20">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">NIP</label>
|
||||||
|
<input type="text" id="nip" class="form-control" placeholder="Masukkan NIP" name="nip" value="<?php echo @$data->nip?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Nama Lengkap</label>
|
||||||
|
<input type="text" id="nama_guru" class="form-control" placeholder="Masukkan Nama Lengkap" name="nama_guru" value="<?php echo @$data->nama_guru?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Tanggal Lahir</label>
|
||||||
|
<input type="date" class="form-control" placeholder="dd/mm/yyyy" name="tanggal_lahir" value="<?php echo @$data->tanggal_lahir?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group has-success">
|
||||||
|
<label class="control-label">Jenis Kelamin</label>
|
||||||
|
<select class="form-control custom-select" name="jenis_kelamin">
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<option value="Laki-Laki" <?php if (@$data->jenis_kelamin == 'Laki-Laki') echo 'selected'; ?>>Laki-Laki</option>
|
||||||
|
<option value="Perempuan" <?php if (@$data->jenis_kelamin == 'Perempuan') echo 'selected'; ?>>Perempuan</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-control-feedback"> Pilih Jenis Kelamin </small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Alamat</label>
|
||||||
|
<input type="text" class="form-control" placeholder="Masukkan Alamat" name="alamat" value="<?php echo @$data->alamat?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Username</label>
|
||||||
|
<input type="text" id="username" class="form-control" placeholder="Masukkan Username"
|
||||||
|
name="username" value="<?php echo @$data->username?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Password</label>
|
||||||
|
<input type="text" id="nama" class="form-control" placeholder="Masukkan Password"
|
||||||
|
name="password" value="<?php echo @$data->password?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">Jabatan</label>
|
||||||
|
<input type="text" id="Jabatan" class="form-control" placeholder="Masukkan Jabatan"
|
||||||
|
name="jabatan" value="<?php echo @$data->jabatan?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group has-success">
|
||||||
|
<label class="control-label">Akses</label>
|
||||||
|
<select class="form-control custom-select" name="hak_akses">
|
||||||
|
<option value="">Pilih</option>
|
||||||
|
<option value="1" <?php if (@$data->hak_akses == '1') echo 'selected'; ?>>1 - Kepala Sekolah</option>
|
||||||
|
<option value="2" <?php if (@$data->hak_akses == '2') echo 'selected'; ?>>2 - Admin</option>
|
||||||
|
<option value="2" <?php if (@$data->hak_akses == '3') echo 'selected'; ?>>3 - Penilai</option>
|
||||||
|
<option value="3" <?php if (@$data->hak_akses == '4') echo 'selected'; ?>>4 - Guru</option>
|
||||||
|
</select>
|
||||||
|
<small class="form-control-feedback"> Pilih Hak Akses </small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/span-->
|
||||||
|
</div>
|
||||||
|
<!--/row-->
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button type="submit" class="btn btn-success"> <i class="fa fa-check"></i> Save</button>
|
||||||
|
<button type="button" class="btn btn-inverse">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Tambah Data Guru</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Guru</a></li>
|
||||||
|
<li class="breadcrumb-item active">Tambah</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/guru/insert') ?>" method="post">
|
||||||
|
<?php echo view('Guru/form'); ?>
|
||||||
|
</form>
|
|
@ -0,0 +1,132 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Data Guru</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Master</a></li>
|
||||||
|
<li class="breadcrumb-item active">Data Guru</li>
|
||||||
|
</ol>
|
||||||
|
<a href="<?= base_url('guru/input') ?>">
|
||||||
|
<button type="button" class="btn btn-info d-none d-lg-block m-l-15"><i class="fa fa-plus-circle"></i>
|
||||||
|
Tambah</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Daftar Data Guru Aktif</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example23" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>NIP</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Jabatan</th>
|
||||||
|
<th style="width: 100px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($guru as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nip; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->jabatan; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('guru/edit/' . $row->nip) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Edit"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('guru/delete/' . $row->nip) ?>" onclick="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Delete"><i class="ti-close"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Daftar Data Guru Tidak Aktif</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="myTable" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">No.</th>
|
||||||
|
<th>NIP</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Jabatan</th>
|
||||||
|
<th style="width: 100px;">Aksi</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($guru2 as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nip; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->jabatan; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="<?= base_url('guru/edit/' . $row->nip) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Edit"><i class="ti-pencil"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="<?= base_url('guru/restore/' . $row->nip) ?>">
|
||||||
|
<button class="btn btn-sm btn-icon btn-pure btn-outline"
|
||||||
|
data-toggle="tooltip" data-original-title="Pulihkan"><i class="ti-cloud-up"
|
||||||
|
aria-hidden="true"></i>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,108 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Hasil Akhir</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb mr-3">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Hasil Akhir</a></li>
|
||||||
|
<li class="breadcrumb-item active">Hasil Perangkingan</li>
|
||||||
|
</ol>
|
||||||
|
<form id="filterForm" method="post" action="<?= base_url('hasil/index') ?>">
|
||||||
|
<select class="form-control custom-select" onchange="document.getElementById('filterForm').submit()"
|
||||||
|
style="width: auto; height:36px;" name="bulan">
|
||||||
|
<option value="NULL">Pilih Bulan</option>
|
||||||
|
<?php
|
||||||
|
$bulan_selected = isset($bulan_selected) ? $bulan_selected : '';
|
||||||
|
$bulan_sekarang = date("F");
|
||||||
|
$bulan = array(
|
||||||
|
"1" => "Januari",
|
||||||
|
"2" => "Februari",
|
||||||
|
"3" => "Maret",
|
||||||
|
"4" => "April",
|
||||||
|
"5" => "Mei",
|
||||||
|
"6" => "Juni",
|
||||||
|
"7" => "Juli",
|
||||||
|
"8" => "Agustus",
|
||||||
|
"9" => "September",
|
||||||
|
"10" => "Oktober",
|
||||||
|
"11" => "November",
|
||||||
|
"12" => "Desember"
|
||||||
|
);
|
||||||
|
|
||||||
|
$bulan_english = array(
|
||||||
|
"Januari" => "January",
|
||||||
|
"Februari" => "February",
|
||||||
|
"Maret" => "March",
|
||||||
|
"April" => "April",
|
||||||
|
"Mei" => "May",
|
||||||
|
"Juni" => "June",
|
||||||
|
"Juli" => "July",
|
||||||
|
"Agustus" => "August",
|
||||||
|
"September" => "September",
|
||||||
|
"Oktober" => "October",
|
||||||
|
"November" => "November",
|
||||||
|
"Desember" => "December"
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($bulan as $num => $nama_bulan) {
|
||||||
|
$nama_bulan_english = $bulan_english[$nama_bulan];
|
||||||
|
$selected = ($nama_bulan_english == $bulan_sekarang || $num == $bulan_selected) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $num . '" ' . $selected . '>' . $nama_bulan . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<select class="form-control custom-select" onchange="document.getElementById('filterForm').submit()"
|
||||||
|
style="width: auto; height:36px;" name="tahun">
|
||||||
|
<option value="NULL">Pilih Tahun</option>
|
||||||
|
<?php
|
||||||
|
$tahun_selected = isset($tahun_selected) ? $tahun_selected : '';
|
||||||
|
$tahun_sekarang = date("Y");
|
||||||
|
for ($i = $tahun_sekarang; $i >= 2010; $i--) {
|
||||||
|
$selected = ($i == $tahun_sekarang || $i == $tahun_selected) ? 'selected' : '';
|
||||||
|
echo '<option value="' . $i . '" ' . $selected . '>' . $i . '</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">Hasil Perangkingan</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="example23" class="display nowrap table table-hover table-striped table-bordered"
|
||||||
|
cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 10%;">Ranking</th>
|
||||||
|
<th>Nama Alternatif</th>
|
||||||
|
<th style="width: 10%;">Nilai</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$no = 1;
|
||||||
|
foreach ($hasil as $row): ?>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?= $no++; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->nama_guru; ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row->hasil; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="row page-titles">
|
||||||
|
<div class="col-md-5 align-self-center">
|
||||||
|
<h4 class="text-themecolor">Edit Jurnal</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-7 align-self-center text-right">
|
||||||
|
<div class="d-flex justify-content-end align-items-center">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Pendukung</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="javascript:void(0)">Data Jurnal</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="<?php echo base_url('/jurnal/update/'. $data->id_jurnal) ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<?php echo view('Jurnal/form'); ?>
|
||||||
|
</form>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue