first commit

This commit is contained in:
FarhanABD 2025-03-07 22:27:29 +07:00
commit 036a34db87
4818 changed files with 2019999 additions and 0 deletions

4
.htaccess Normal file
View File

@ -0,0 +1,4 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

6
application/.htaccess Normal file
View File

@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

11
application/cache/index.html vendored Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,135 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('email', 'session', 'database','form_validation');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url', 'file', 'security', 'admin');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();

View File

@ -0,0 +1,524 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
//$config['base_url'] = 'http://localhost/pencernaanku/';
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://" . $_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']);
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
| 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!
*/
$config['uri_protocol'] = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$config['charset'] = 'UTF-8';
/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| Allow $_GET array
|--------------------------------------------------------------------------
|
| By default CodeIgniter enables access to the $_GET array. If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['allow_get_array'] = TRUE;
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default '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 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| 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.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| 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
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';
/*
|--------------------------------------------------------------------------
| 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.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, 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!
|
| 'sess_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.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_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.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
| Global XSS Filtering
|--------------------------------------------------------------------------
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery
|--------------------------------------------------------------------------
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
| checked on a submitted form. If you are accepting user data, it is strongly
| recommended CSRF protection be enabled.
|
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = 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
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';

View File

@ -0,0 +1,85 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
| 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') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code

View File

@ -0,0 +1,96 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificates in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'dbnaivebayes',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

View File

@ -0,0 +1,24 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'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">'
);

View File

@ -0,0 +1,114 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|ǽ/' => 'ae',
'/ö|œ/' => 'oe',
'/ü/' => 'ue',
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Д|Δ/' => 'D',
'/д|δ/' => 'd',
'/Ð|Ď|Đ/' => 'Dj',
'/ð|ď|đ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Θ/' => 'TH',
'/θ/' => 'th',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|Τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|τ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Φ/' => 'F',
'/φ/' => 'f',
'/Χ/' => 'CH',
'/χ/' => 'ch',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/Ξ/' => 'KS',
'/ξ/' => 'ks',
'/Π/' => 'P',
'/π/' => 'p',
'/Β/' => 'V',
'/β/' => 'v',
'/Μ/' => 'M',
'/μ/' => 'm',
'/Ψ/' => 'PS',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);

View File

@ -0,0 +1,13 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/hooks.html
|
*/

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,19 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => '11211',
'weight' => '1',
),
);

View File

@ -0,0 +1,84 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| 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
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';

View File

@ -0,0 +1,184 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
| Upload class to help identify allowed file types.
|
*/
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('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' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('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' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'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' => array('application/x-httpd-php', 'application/php', 'application/x-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' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('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' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('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',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('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' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => array('audio/x-aac', 'audio/aac'),
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
'odc' => 'application/vnd.oasis.opendocument.chart',
'otc' => 'application/vnd.oasis.opendocument.chart-template',
'odf' => 'application/vnd.oasis.opendocument.formula',
'otf' => 'application/vnd.oasis.opendocument.formula-template',
'odg' => 'application/vnd.oasis.opendocument.graphics',
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
'odi' => 'application/vnd.oasis.opendocument.image',
'oti' => 'application/vnd.oasis.opendocument.image-template',
'odp' => 'application/vnd.oasis.opendocument.presentation',
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
'odt' => 'application/vnd.oasis.opendocument.text',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'ott' => 'application/vnd.oasis.opendocument.text-template',
'oth' => 'application/vnd.oasis.opendocument.text-web'
);

View File

@ -0,0 +1,14 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/profiling.html
|
*/

View File

@ -0,0 +1,54 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

View File

@ -0,0 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| SMILEYS
| -------------------------------------------------------------------
| This file contains an array of smileys for use with the emoticon helper.
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
':-)' => array('grin.gif', '19', '19', 'grin'),
':lol:' => array('lol.gif', '19', '19', 'LOL'),
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
':)' => array('smile.gif', '19', '19', 'smile'),
';-)' => array('wink.gif', '19', '19', 'wink'),
';)' => array('wink.gif', '19', '19', 'wink'),
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
':-S' => array('confused.gif', '19', '19', 'confused'),
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
':long:' => array('longface.gif', '19', '19', 'long face'),
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
':down:' => array('downer.gif', '19', '19', 'downer'),
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
':sick:' => array('sick.gif', '19', '19', 'sick'),
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
'>:(' => array('mad.gif', '19', '19', 'mad'),
':mad:' => array('mad.gif', '19', '19', 'mad'),
'>:-(' => array('angry.gif', '19', '19', 'angry'),
':angry:' => array('angry.gif', '19', '19', 'angry'),
':zip:' => array('zip.gif', '19', '19', 'zipper'),
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
':snake:' => array('snake.gif', '19', '19', 'snake'),
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);

View File

@ -0,0 +1,216 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| 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.
*/
$platforms = array(
'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'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => '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'
);
$mobiles = array(
// 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',
'nexus' => 'Nexus',
'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',
'meizu' => 'Meizu',
// 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'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'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'
);

View File

@ -0,0 +1,141 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Admin_model $admin
* @property Rule_model $rule
*/
class Admin extends CI_Controller
{
public function __construct()
{
parent::__construct();
sudah_login();
$this->load->library('form_validation');
$this->load->model('Admin_model', 'admin');
$this->load->helper('Admin_helper');
$this->load->database();
$this->load->library('session');
$this->load->model('Rule_model', 'rule');
}
public function index()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['jml_user'] = $this->db->get('user')->num_rows();
$data['jml_rule'] = $this->db->get('rule')->num_rows();
$data['jml_dftr_konsul'] = $this->db->get('daftar_konsultasi')->num_rows();
$data['jml_penyakit'] = $this->db->get('penyakit')->num_rows();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/index', $data);
$this->load->view('templates/footer');
}
public function member()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 3])->row_array();
$data['member'] = $this->db->get('user')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/data_member', $data);
$this->load->view('templates/footer', $data);
$this->load->view('admin/modals/modal_edit_member', $data);
}
public function gejala()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 4])->row_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$data['kode'] = $this->admin->cekKodeGejala();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/data_gejala', $data);
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_gejala', $data);
$this->load->view('admin/modals/modal_edit_gejala', $data);
}
public function grafik(){
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 11])->row_array();
$data['grafik'] = $this->db->get('grafik')->result_array();
$data['kode'] = $this->admin->cekKodeGrafik();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/data_grafik', $data);
$this->load->view('templates/footer', $data);
$this->load->view('admin/modals/modal_tambah_grafik');
$this->load->view('admin/modals/modal_edit_grafik');
}
public function penyakit()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 5])->row_array();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['kode'] = $this->admin->cekKodePenyakit();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/data_penyakit', $data);
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_penyakit');
$this->load->view('admin/modals/modal_edit_penyakit', $data);
}
public function rule()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['kwarshiorkor'] = $this->rule->getRuleKwarshiorkor();
$data['marasmus'] = $this->rule->getRuleMarasmus();
$data['marasmus_kwarshiorkor'] = $this->rule->getRuleMarasmusKwarshiorkor();
$data['beri_beri'] = $this->rule->getRuleBeriBeri();
$data['skorbut'] = $this->rule->getRuleSkorbut();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/data_rule', $data);
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function konsultasi()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 7])->row_array();
$data['dftr_konsul'] = $this->db->get('daftar_konsultasi')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/daftar_konsultasi', $data);
$this->load->view('templates/footer');
}
}

View File

@ -0,0 +1,141 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Auth_model $auth
* @property form_validation $form_validation
* @property input $input
*/
class Auth extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->model('Auth_model', 'auth');
}
public function index()
{
//cek jika sudah ada login session pada user
if ($this->session->userdata('email')) {
redirect('user');
}
//form validasi
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
$this->form_validation->set_rules('password', 'Password', 'trim|required');
//jika validasi gagal kembalikn ke halaman login
if ($this->form_validation->run() == false) {
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$this->load->view('auth/login', $data);
//jika validasi sukses menuju ke method _login
} else {
$this->_login();
}
}
private function _login()
{
//mendapatkan inputan user dari form login
$email = $this->input->post('email');
$password = $this->input->post('password');
//query ke tbl user utk mendapatkn semua data hanya satu user
$auth = $this->auth->getUser($email);
// cek jika user dgn email yg diinputkn ada apa tdk di tbl user
if ($auth) {
// cek jika usernya aktif atau sudah verifikasi apa belum
if ($auth['is_active'] == 1) {
// cek password yang di inputkan user dgn tbl user
if (password_verify($password, $auth['password'])) {
$data = [
'email' => $auth['email'],
'role_id' => $auth['role_id']
];
//membuat session
$this->session->set_userdata($data);
//login berhasil alihkan ke halaman masing-masing rolenya
if ($auth['role_id'] == 1) {
redirect('admin');
} else {
redirect('home');
}
//password salah
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Password salah!</div>');
redirect('auth');
}
//Email belum diverifikasi
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Email belum diverifiaksi!</div>');
redirect('auth');
}
//email tidak terdaftar
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Email belum terdaftar!</div>');
redirect('auth');
}
}
public function registrasi()
{
if ($this->session->userdata('email')) {
redirect('user');
}
// Form validasi
$this->form_validation->set_rules('name', 'Nama', 'required|trim');
$this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email|is_unique[user.email]', [
'is_unique' => 'Email ini sudah terdaftar!'
]);
$this->form_validation->set_rules('password1', 'Password', 'required|trim|min_length[3]|matches[password2]', [
'matches' => 'Password tidak cocok!',
'min_length' => 'Password terlalu pendek!'
]);
$this->form_validation->set_rules('password2', 'Konfirmasi Password', 'required|trim|matches[password1]');
$this->form_validation->set_rules('berat_badan', 'Berat Badan', 'required|numeric', [
'numeric' => 'Harus berupa angka!'
]);
$this->form_validation->set_rules('tinggi_badan', 'Tinggi Badan', 'required|numeric', [
'numeric' => 'Harus berupa angka!'
]);
$this->form_validation->set_rules('lingkar_kepala', 'Lingkar Kepala', 'required|numeric', [
'numeric' => 'Harus berupa angka!'
]);
$this->form_validation->set_rules('lingkar_lengan_atas', 'Lingkar Lengan Atas', 'required|numeric', [
'numeric' => 'Harus berupa angka!'
]);
if ($this->form_validation->run() == false) {
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$this->load->view('auth/registrasi', $data);
} else {
$this->load->model('Auth_model');
if ($this->Auth_model->daftar()) {
$this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Selamat! Kamu sudah terdaftar. Silakan login.</div>');
redirect('auth');
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Email sudah digunakan, coba gunakan email lain.</div>');
redirect('auth/registrasi');
}
}
}
public function logout()
{
//hapus session email
$this->session->unset_userdata('email');
//hapus session role_id
$this->session->unset_userdata('role_id');
//pesan flashdata telah berhasil logout
$this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Kamu berhasil logout!</div>');
redirect('home');
}
public function block()
{
$data['judul'] = 'Akses Tidak Diizinkan!';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$this->load->view('templates/header', $data);
$this->load->view('auth/blocked', $data);
}
}

View File

@ -0,0 +1,88 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Auth_model $auth
* @property form_validation $form_validation
* @property diagnosa $diagnosa
* @property input $input
*/
class Diagnosa extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Diagnosa_model', 'diagnosa');
if (!$this->session->userdata('email')) {
redirect('home');
}
}
public function hasil()
{
// Kosongkan tabel temporary sebelum diagnosa dimulai
$this->diagnosa->kosongkanTemp();
$this->diagnosa->kosongkanTempFinal();
// Tangkap input checkbox gejala
$gejala = $this->input->post('gejala');
if (!empty($gejala)) {
foreach ($gejala as $g) {
$data = ['id_gejala' => $g];
$this->db->insert('temporary', $data);
}
}
// Insert ke temporary final dengan id_penyakit & probabilitas
$temp = $this->diagnosa->insertTempFinal();
if (!empty($temp)) {
$this->db->insert_batch('temporary_final', $temp);
}
// Ambil probabilitas untuk setiap penyakit
$probKwarshiorkor = $this->diagnosa->getProbKwarshiorkor();
$probMarasmus = $this->diagnosa->getProbMarasmus();
$probMarasmusKwarshiokor = $this->diagnosa->getProbMarasmusKwarshiorkor();
$probBeriBeri = $this->diagnosa->getProbBeriBeri();
$probSkorbut = $this->diagnosa->getProbSkorbut();
// Siapkan array data untuk menjumlahkan probabilitas total
$data = [
'kwarshiorkor' => $probKwarshiorkor,
'marasmus' => $probMarasmus,
'marasmus_kwarshiorkor' => $probMarasmusKwarshiokor,
'beri_beri' => $probBeriBeri,
'skorbut' => $probSkorbut
];
$jmlProb = array_sum($data);
// Hindari pembagian dengan nol
$kwarshiorkor = ($jmlProb > 0) ? ($probKwarshiorkor / $jmlProb) : 0;
$marasmus = ($jmlProb > 0) ? ($probMarasmus / $jmlProb) : 0;
$marasmus_kwarshiorkor = ($jmlProb > 0) ? ($probMarasmusKwarshiokor / $jmlProb) : 0;
$beri_beri = ($jmlProb > 0) ? ($probBeriBeri / $jmlProb) : 0;
$skorbut = ($jmlProb > 0) ? ($probSkorbut / $jmlProb) : 0;
// Simpan hasil probabilitas ke database
$this->diagnosa->hasilProbKwarshiorkor($kwarshiorkor);
$this->diagnosa->hasilProbMarasmus($marasmus);
$this->diagnosa->hasilProbMarasmusKwarshiorkor($marasmus_kwarshiorkor);
$this->diagnosa->hasilBeriBeri($beri_beri);
$this->diagnosa->hasilProbSkorbut($skorbut);
// Ambil hasil diagnosa berdasarkan probabilitas terbesar
$data['hasil'] = $this->diagnosa->diagnosis();
$data['hasilMax'] = $this->diagnosa->diagnosisMax();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
// Simpan daftar konsultasi user
$this->diagnosa->insertDaftarKonsult();
// Load tampilan hasil diagnosa
$this->load->view('home/hasil_diagnosa', $data);
}
}

View File

@ -0,0 +1,44 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Auth_model $auth
* @property form_validation $form_validation
* @property input $input
* @property Admin_model $admin
*/
class Gejala extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Admin_model', 'admin');
if (!$this->session->userdata('email')) {
// tendang ke auth/login page
redirect('auth');
}
}
public function tambahGejala()
{
$this->admin->tambahGejala();
$this->session->set_flashdata('flash', 'Ditambahkan');
redirect('admin/gejala');
}
public function editGejala()
{
$this->admin->editGejala();
$this->session->set_flashdata('flash', 'Diubah');
redirect('admin/gejala');
}
public function hapusGejala($id)
{
$this->admin->hapusGejala($id);
$this->session->set_flashdata('flash', 'Dihapus');
redirect('admin/gejala');
}
}

View File

@ -0,0 +1,41 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Admin_model $admin
* @property Rule_model $rule
* @property form_validation $form_validation
*/
class Grafik extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('Admin_model', 'admin');
if (!$this->session->userdata('email')) {
redirect('auth');
}
}
public function tambahGrafik()
{
$this->admin->tambahGrafik();
$this->session->set_flashdata('flash', 'Ditambahkan');
redirect('admin/grafik');
}
public function editGrafik()
{
$this->admin->editGrafik();
$this->session->set_flashdata('flash', 'Diubah');
redirect('admin/grafik');
}
public function hapusGrafik($id)
{
$this->admin->hapusGrafik($id);
$this->session->set_flashdata('flash', 'Dihapus');
redirect('admin/grafik');
}
}

View File

@ -0,0 +1,37 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Auth_model $auth
* @property Admin_model $admin
*/
class Home extends CI_Controller
{
public function index()
{
$data['grafik'] = $this->db->get('grafik')->result_array();
$this->load->view('home/index', $data);
}
public function hasil_diagnosa()
{
$this->load->view('home/hasil_diagnosa');
}
public function diagnosa()
{
if (!$this->session->userdata('email')) {
redirect('auth');
}
$this->session->set_flashdata('hasil');
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('home/diagnosa', $data);
}
}

View File

@ -0,0 +1,41 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Admin_model $admin
* @property Rule_model $rule
*/
class Penyakit extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Admin_model', 'admin');
if (!$this->session->userdata('email')) {
redirect('auth');
}
}
public function tambahPenyakit()
{
$this->admin->tambahPenyakit();
$this->session->set_flashdata('flash', 'Ditambahkan');
redirect('admin/penyakit');
}
public function editPenyakit()
{
$this->admin->editPenyakit();
$this->session->set_flashdata('flash', 'Diubah');
redirect('admin/penyakit');
}
public function hapusPenyakit($id)
{
$this->admin->hapusPenyakit($id);
$this->session->set_flashdata('flash', 'Dihapus');
redirect('admin/penyakit');
}
}

View File

@ -0,0 +1,137 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Admin_model $admin
* @property Rule_model $rule
*/
class Rule extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Admin_model', 'admin');
if (!$this->session->userdata('email')) {
redirect('auth');
}
}
public function kwarshiorkor()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['kwarshiorkor'] = $this->rule->getRuleKwarshiorkor();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/tbl_rule/rule_diare');
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function marasmus()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['marasmus'] = $this->rule->getRuleMarasmus();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/tbl_rule/rule_disentri');
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function marasmusKwarshiorkor()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['marasmus_kwarshiorkor'] = $this->rule->getRuleMarasmusKwarshiorkor();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/tbl_rule/rule_apendictis');
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function beriBeri()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['beri_beri'] = $this->rule->getRuleBeriBeri();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/tbl_rule/rule_maag');
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function skorbut()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 6])->row_array();
$data['rule'] = $this->admin->getRules();
$this->load->model('Rule_model', 'rule');
$data['skorbut'] = $this->rule->getRuleSkorbut();
$data['penyakit'] = $this->db->get('penyakit')->result_array();
$data['gejala'] = $this->db->get('gejala')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('admin/tbl_rule/rule_keracunan');
$this->load->view('templates/footer');
$this->load->view('admin/modals/modal_tambah_rule');
$this->load->view('admin/modals/modal_edit_rule', $data);
}
public function tambahRule()
{
$this->admin->tambahRule();
$this->session->set_flashdata('flash', 'Ditambahkan');
redirect('admin/rule');
}
public function editRule()
{
$this->admin->editRule();
$this->session->set_flashdata('flash', 'Diubah');
redirect('admin/rule');
}
public function hapusRule($id)
{
$this->admin->hapusRule($id);
$this->session->set_flashdata('flash', 'Dihapus');
redirect('admin/rule');
}
}

View File

@ -0,0 +1,141 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
/**
* @property CI_DB_query_builder $db
* @property CI_Session $session
* @property Admin_model $admin
* @property Rule_model $rule
* @property form_validation $form_validation
* @property input $input
* @property upload $upload
* @property user $user
*/
class User extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->model('User_model', 'user');
if (!$this->session->userdata('email')) {
redirect('auth');
}
}
public function index()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('user/index', $data);
$this->load->view('templates/footer');
}
public function edit()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$this->form_validation->set_rules('name', 'Nama lengkap', 'required|trim');
$this->form_validation->set_rules('berat_badan', 'Berat Badan', 'required');
$this->form_validation->set_rules('tinggi_badan', 'Tinggi Badan', 'required');
$this->form_validation->set_rules('lingkar_kepala', 'Lingkar Kepala', 'required');
$this->form_validation->set_rules('lingkar_lengan_atas', 'Lingkar Lengan Atas', 'required');
if ($this->form_validation->run() == false) {
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('user/edit', $data);
$this->load->view('templates/footer');
} else {
// cek jika ada gambar yang akan diupload
$upload_image = $_FILES['image']['name'];
if ($upload_image) {
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '4096';
$config['upload_path'] = './assets/images/';
$this->load->library('upload', $config);
if ($this->upload->do_upload('image')) {
$old_image = $data['user']['image'];
if ($old_image != 'user.png') {
unlink(FCPATH . '/assets/images/' . $old_image);
}
$new_image = $this->upload->data('file_name');
$this->db->set('image', $new_image);
} else {
echo $this->upload->dispay_errors();
}
}
$this->user->editProfil();
$this->session->set_flashdata('flash', 'Diubah');
redirect('user');
redirect('user');
}
}
public function ubahPassword()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$this->form_validation->set_rules('current_password', 'Password lama', 'required|trim');
$this->form_validation->set_rules('new_password1', 'Password baru', 'required|trim|min_length[3]|matches[new_password2]');
$this->form_validation->set_rules('new_password2', 'Konfirmasi password baru', 'required|trim|min_length[3]|matches[new_password1]');
if ($this->form_validation->run() == false) {
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('user/ubah_password', $data);
$this->load->view('templates/footer');
} else {
$current_password = $this->input->post('current_password');
$new_password = $this->input->post('new_password1');
if (!password_verify($current_password, $data['user']['password'])) {
$this->session->set_flashdata('message', '<div class="col-md-6 alert alert-danger" role="alert">Password tidak cocok!</div>');
redirect('user/ubahPassword');
} else {
if ($current_password == $new_password) {
$this->session->set_flashdata('message', '<div class="col-md-6 alert alert-danger" role="alert">Password baru tidak boleh sama dengan password lama!</div>');
redirect('user/ubahPassword');
} else {
// password sudah ok
$password_hash = password_hash($new_password, PASSWORD_DEFAULT);
$this->user->ubahPassword($password_hash);
$this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Password sudah terubah!</div>');
redirect('user');
}
}
}
}
public function konsultasiku()
{
$data['judul'] = 'Sistem Pakar Metode Naive Bayes';
$data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();
$data['subMenu'] = $this->db->get_where('sub_menu_user', ['id' => 7])->row_array();
$data['dftr_konsul'] = $this->user->getKonsul();
$data['daftar'] = $this->db->get('daftar_konsultasi')->result_array();
$this->load->view('templates/header', $data);
$this->load->view('templates/sidebar', $data);
$this->load->view('templates/topbar', $data);
$this->load->view('user/daftar-konsultasi', $data);
$this->load->view('templates/footer');
}
public function hapusKonsultasi($id)
{
$this->load->model('User_model', 'user');
$this->user->hapusKonsultasi($id);
$this->session->set_flashdata('flash', 'Dihapus');
redirect('user/konsultasiku');
}
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,49 @@
<?php
function sudah_login()
{
$ci = get_instance();
//jika tidak ada session email pada userdata
//atau user belum login
if (!$ci->session->userdata('email')) {
// tendang ke auth/login page
redirect('auth');
//jika session ada pada url/method nya maka dapat (sudah login)
} else {
//yang melakukan login role id nya tangkap
$role_id = $ci->session->userdata('role_id');
//user akses ke controller mana, sesuai uri (url pada browser)
$menu = $ci->uri->segment(1);
//query ke tbl menu_user untuk mendapatkan id menu
$queryMenu = $ci->db->get_where('menu_user', ['menu' => $menu])->row_array();
//dapatkan id menu ke variabel id_menu
$id_menu = $queryMenu['id'];
//query mendapatkan akses menu user yang sesuai dengan role id && id menu nya
$aksesUser = $ci->db->get_where('akses_menu_user', [
'role_id' => $role_id,
'id_menu' => $id_menu
]);
//jika query akses user ke menu tersebut tidak ada
if ($aksesUser->num_rows() < 1) {
//maka kita tendang ke halaman block
//buat function block pada Auth.php
redirect('auth/block');
}
}
}
function check_access($role_id, $id_menu)
{
$ci = get_instance();
$ci->db->where('role_id', $role_id);
$ci->db->where('id_menu', $id_menu);
$result = $ci->db->get('akses_menu_user');
if ($result->num_rows() > 0) {
return "checked='checked'";
}
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

11
application/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,183 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Admin_model extends CI_Model
{
public function cekKodeGejala()
{
$query = $this->db->query("SELECT MAX(kode) as max_id from gejala");
$rows = $query->row();
$kode = $rows->max_id;
$noUurut = (int) substr($kode, 1, 2);
$noUurut++;
$char = "G";
$kode = $char . sprintf("%02s", $noUurut);
return $kode;
}
public function cekKodeGrafik(){
$query = $this->db->query("SELECT MAX(kode) as max_id from grafik");
$rows = $query->row();
$kode = $rows->max_id;
$noUurut = (int) substr($kode, 1, 2);
$noUurut++;
$char = "D";
$kode = $char . sprintf("%02s", $noUurut);
return $kode;
}
public function cekKodePenyakit()
{
$query = $this->db->query("SELECT MAX(kode) as max_id from penyakit");
$rows = $query->row();
$kode = $rows->max_id;
$noUurut = (int) substr($kode, 1, 2);
$noUurut++;
$char = "P";
$kode = $char . sprintf("%02s", $noUurut);
return $kode;
}
public function tambahGrafik()
{
$Kode = $this->cekKodeGrafik();
$data = [
'kode' => $Kode,
'jumlah' => $this->input->post('jumlah'),
'nama_kecamatan' => $this->input->post('nama_kecamatan'),
];
$this->db->insert('grafik', $data);
}
public function editGrafik()
{
$data = [
"kode" => $this->input->post('kode', true),
"jumlah" => $this->input->post('jumlah', true),
"nama_kecamatan" => $this->input->post('nama_kecamatan', true),
];
$this->db->where('id_grafik', $this->input->post('id'));
$this->db->update('grafik', $data);
}
public function hapusGrafik($id)
{
$this->db->where('id_grafik', $id);
$this->db->delete('grafik');
}
// gejala
public function tambahGejala()
{
$Kode = $this->cekKodeGejala();
$data = [
'kode' => $Kode,
'gejala' => $this->input->post('gejala'),
];
$this->db->insert('gejala', $data);
}
public function editGejala()
{
$data = [
"kode" => $this->input->post('kode', true),
"gejala" => $this->input->post('gejala', true)
];
$this->db->where('id_gejala', $this->input->post('id'));
$this->db->update('gejala', $data);
}
public function hapusGejala($id)
{
$this->db->where('id_gejala', $id);
$this->db->delete('gejala');
}
// penyakit
public function tambahPenyakit()
{
$Kode = $this->cekKodePenyakit();
$data = [
'kode' => $Kode,
'nama_penyakit' => $this->input->post('nama_penyakit'),
'probabilitas' => $this->input->post('probabilitas'),
'jumlah_muncul' => $this->input->post('jumlah_muncul'),
'saran' => $this->input->post('saran'),
'informasi' => $this->input->post('informasi')
];
$this->db->insert('penyakit', $data);
}
public function editPenyakit()
{
$data = [
'kode' => $this->input->post('kode'),
'nama_penyakit' => $this->input->post('nama_penyakit'),
'probabilitas' => $this->input->post('probabilitas'),
'jumlah_muncul' => $this->input->post('jumlah_muncul'),
'saran' => $this->input->post('saran'),
'informasi' => $this->input->post('informasi')
];
$this->db->where('id_penyakit', $this->input->post('id'));
$this->db->update('penyakit', $data);
}
public function hapusPenyakit($id)
{
$this->db->where('id_penyakit', $id);
$this->db->delete('penyakit');
}
public function getRules()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`,`rule`.`probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala`
";
return $this->db->query($queryRule)->result_array();
}
// rule
public function tambahRule()
{
$prob = $this->input->post('prob');
if ($prob == 0) {
$prob = 0.00001;
}
$data = [
'id_penyakit' => $this->input->post('nama_penyakit'),
'id_gejala' => $this->input->post('nama_gejala'),
'probabilitas' => $prob
];
$this->db->insert('rule', $data);
}
public function editRule()
{
$data = [
'probabilitas' => $this->input->post('prob')
];
$this->db->where('id', $this->input->post('id'));
$this->db->update('rule', $data);
}
public function hapusRule($id)
{
$this->db->where('id', $id);
$this->db->delete('rule');
}
public function editMember()
{
$data = [
"name" => $this->input->post('name', true),
"is_active" => $this->input->post('is_active', true)
];
$this->db->where('id', $this->input->post('id'));
$this->db->update('user', $data);
}
public function hapusMember($id)
{
$this->db->where('id', $id);
$this->db->delete('user');
}
}

View File

@ -0,0 +1,36 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Auth_model extends CI_Model
{
public function getUser($email)
{
return $this->db->get_where('user', ['email' => $email])->row_array();
}
public function daftar()
{
$email = $this->input->post('email', true);
// Cek apakah email sudah terdaftar
$existingUser = $this->db->get_where('user', ['email' => $email])->row_array();
if ($existingUser) {
return false;
}
$data = [
'name' => htmlspecialchars($this->input->post('name', true)),
'email' => htmlspecialchars($email),
'image' => 'user.png',
'password' => password_hash($this->input->post('password1'), PASSWORD_DEFAULT),
'role_id' => 2,
'is_active' => 1,
'berat_badan' => $this->input->post('berat_badan'),
'tinggi_badan' => $this->input->post('tinggi_badan'),
'lingkar_kepala' => $this->input->post('lingkar_kepala'),
'lingkar_lengan_atas' => $this->input->post('lingkar_lengan_atas'),
'date_created' => date('Y-m-d')
];
return $this->db->insert('user', $data);
}
}

View File

@ -0,0 +1,214 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Diagnosa_model extends CI_Model
{
public function kosongkanTemp()
{
return $this->db->truncate('temporary');
}
public function kosongkanTempFinal()
{
return $this->db->truncate('temporary_final');
}
public function getProbKwarshiorkor()
{
$this->db->select('*');
$this->db->from('temporary_final');
$this->db->where('id_penyakit', 1);
$data = $this->db->get()->result();
//inisialisasi untuk total probabilitas
$jumlah = 1;
foreach ($data as $row) {
//perkalian antar setiap id_gejala x probabilitasnya
$jumlah = $jumlah * $row->probabilitas;
}
$this->db->select('*');
$this->db->from('penyakit');
$this->db->where('id_penyakit', 1);
$data = $this->db->get()->result();
foreach ($data as $rowku) {
//P(H1|F)
$hasil = $jumlah * $rowku->probabilitas;
}
return $hasil;
}
public function getProbMarasmus()
{
$this->db->select('*');
$this->db->from('temporary_final');
$this->db->where('id_penyakit', 3);
$data = $this->db->get()->result();
//inisialisasi untuk total probabilitas
$jumlah = 1;
foreach ($data as $row) {
//perkalian antar setiap id_gejala x probabilitasnya
$jumlah = $jumlah * $row->probabilitas;
}
$this->db->select('*');
$this->db->from('penyakit');
$this->db->where('id_penyakit', 3);
$data = $this->db->get()->result();
foreach ($data as $rowku) {
//P(H2|F)
$hasil = $jumlah * $rowku->probabilitas;
}
return $hasil;
}
public function getProbMarasmusKwarshiorkor()
{
$this->db->select('*');
$this->db->from('temporary_final');
$this->db->where('id_penyakit', 4);
$data = $this->db->get()->result();
//inisialisasi untuk total probabilitas
$jumlah = 1;
foreach ($data as $row) {
$jumlah = $jumlah * $row->probabilitas;
}
$this->db->select('*');
$this->db->from('penyakit');
$this->db->where('id_penyakit', 4);
$data = $this->db->get()->result();
foreach ($data as $rowku) {
//P(H3|F)
$hasil = $jumlah * $rowku->probabilitas;
}
return $hasil;
}
public function getProbBeriBeri()
{
$this->db->select('*');
$this->db->from('temporary_final');
$this->db->where('id_penyakit', 5);
$data = $this->db->get()->result();
//inisialisasi untuk total probabilitas
$jumlah = 1;
foreach ($data as $row) {
$jumlah = $jumlah * $row->probabilitas;
}
$this->db->select('*');
$this->db->from('penyakit');
$this->db->where('id_penyakit', 5);
$data = $this->db->get()->result();
foreach ($data as $rowku) {
//P(H4|F)
$hasil = $jumlah * $rowku->probabilitas;
}
return $hasil;
}
public function getProbSkorbut()
{
$this->db->select('*');
$this->db->from('temporary_final');
$this->db->where('id_penyakit', 6);
$data = $this->db->get()->result();
//inisialisasi untuk total probabilitas
$jumlah = 1;
foreach ($data as $row) {
$jumlah = $jumlah * $row->probabilitas;
}
$this->db->select('*');
$this->db->from('penyakit');
$this->db->where('id_penyakit', 6);
$data = $this->db->get()->result();
foreach ($data as $rowku) {
////P(H5F)
$hasil = $jumlah * $rowku->probabilitas;
}
return $hasil;
}
public function insertTempFinal()
{
$query = "SELECT `rule`.`id_penyakit`,`rule`.`id_gejala`, `rule`.`probabilitas` from `rule` JOIN `temporary` ON `rule`.`id_gejala` = `temporary`.`id_gejala` ORDER BY `rule`.`id_penyakit` ASC";
return $this->db->query($query)->result_array();
}
public function hasilProbKwarshiorkor($kwarshiorkor)
{
$dataKwarshiorkor = [
'hasil_probabilitas' => $kwarshiorkor
];
$this->db->where('id_penyakit', 1);
$this->db->update('temporary_final', $dataKwarshiorkor);
}
public function hasilProbMarasmus($marasmus)
{
$dataMarasmus = [
'hasil_probabilitas' => $marasmus
];
$this->db->where('id_penyakit', 3);
$this->db->update('temporary_final', $dataMarasmus);
}
public function hasilProbMarasmusKwarshiorkor($marasmus_kwarshiorkor)
{
$datamarasmusKwarshiorkor = [
'hasil_probabilitas' => $marasmus_kwarshiorkor
];
$this->db->where('id_penyakit', 4);
$this->db->update('temporary_final', $datamarasmusKwarshiorkor);
}
public function hasilBeriBeri($beri_beri)
{
$dataBeriBeri = [
'hasil_probabilitas' => $beri_beri
];
$this->db->where('id_penyakit', 5);
$this->db->update('temporary_final', $dataBeriBeri);
}
public function hasilProbSkorbut($skorbut)
{
$dataSkorbut = [
'hasil_probabilitas' => $skorbut
];
$this->db->where('id_penyakit', 6);
$this->db->update('temporary_final', $dataSkorbut);
}
//query ambil 3 penyakit tertinggi hasil_probabilitasnya
public function diagnosis()
{
$query = "SELECT DISTINCT `temporary_final`.`id_penyakit`, `temporary_final`.`hasil_probabilitas`, `penyakit`.* FROM `temporary_final` JOIN `penyakit` ON `temporary_final`.`id_penyakit` = `penyakit`.`id_penyakit` ORDER BY `temporary_final`.`hasil_probabilitas` DESC LIMIT 3";
return $this->db->query($query)->result_array();
}
//query ambil penyakit tertinggi yg menjadi penyakit utama daripada hasil diagnosa
public function diagnosisMax()
{
$query = "SELECT `temporary_final`.`id`, MAX(hasil_probabilitas) as `hasil_probabilitas`, `penyakit`.* FROM temporary_final JOIN `penyakit` ON `temporary_final`.`id_penyakit` = `penyakit`.`id_penyakit` GROUP BY id_penyakit ORDER BY `hasil_probabilitas` DESC LIMIT 1";
return $this->db->query($query)->result_array();
}
public function insertDaftarKonsult()
{
$this->db->select('*');
$this->db->from('user');
$this->db->where('email', $this->session->userdata('email'));
$data = $this->db->get()->result();
foreach ($data as $row) {
$idUser = $row->id;
$nama = $row->name;
}
$penyakit = $this->diagnosisMax();
foreach ($penyakit as $p) {
$penyakitnya = $p['nama_penyakit'];
$nilai = floor($p['hasil_probabilitas'] * 100);
}
$data = [
'tanggal' => date('Y-m-d'),
'id_user' => $idUser,
'name' => $nama,
'nama_penyakit' => $penyakitnya,
'nilai' => $nilai
];
return $this->db->insert('daftar_konsultasi', $data);
}
}

View File

@ -0,0 +1,43 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Rule_model extends CI_Model
{
public function getRuleKwarshiorkor()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`, SUBSTRING(`rule`.`probabilitas`, 1,4) as `probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala` WHERE `rule`.`id_penyakit` = 1
";
return $this->db->query($queryRule)->result_array();
}
public function getRuleMarasmus()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`,SUBSTRING(`rule`.`probabilitas`, 1,4) as `probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala` WHERE `rule`.`id_penyakit` = 3
";
return $this->db->query($queryRule)->result_array();
}
public function getRuleMarasmusKwarshiorkor()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`,SUBSTRING(`rule`.`probabilitas`, 1,4) as `probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala` WHERE `rule`.`id_penyakit` = 4
";
return $this->db->query($queryRule)->result_array();
}
public function getRuleBeriBeri()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`,SUBSTRING(`rule`.`probabilitas`, 1,4) as `probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala` WHERE `rule`.`id_penyakit` = 5
";
return $this->db->query($queryRule)->result_array();
}
public function getRuleSkorbut()
{
$queryRule = "SELECT `rule`.`id`,`penyakit`.`nama_penyakit`,`gejala`.`gejala`,SUBSTRING(`rule`.`probabilitas`, 1,4) as `probabilitas` FROM `penyakit` JOIN `rule` ON `penyakit`.`id_penyakit`=`rule`.`id_penyakit` JOIN `gejala` ON `rule`.`id_gejala`=`gejala`.`id_gejala` WHERE `rule`.`id_penyakit` = 6
";
return $this->db->query($queryRule)->result_array();
}
}

View File

@ -0,0 +1,44 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class User_model extends CI_Model
{
public function editProfil()
{
$name = htmlspecialchars($this->input->post('name', true));
$email = htmlspecialchars($this->input->post('email', true));
$berat_badan = htmlspecialchars($this->input->post('berat_badan', true));
$tinggi_badan = htmlspecialchars($this->input->post('tinggi_badan', true));
$lingkar_kepala = htmlspecialchars($this->input->post('lingkar_kepala', true));
$lingkar_lengan_atas = htmlspecialchars($this->input->post('lingkar_lengan_atas', true));
// Set data baru ke tabel 'user'
$this->db->set('name', $name);
$this->db->set('berat_badan', $berat_badan);
$this->db->set('tinggi_badan', $tinggi_badan);
$this->db->set('lingkar_kepala', $lingkar_kepala);
$this->db->set('lingkar_lengan_atas', $lingkar_lengan_atas);
$this->db->where('email', $email);
$this->db->update('user');
}
public function getKonsul()
{
$this->db->select('*');
$this->db->from('user');
$this->db->where('email', $this->session->userdata('email'));
$data = $this->db->get()->result();
foreach ($data as $row) {
$idUser = $row->id;
}
$query = "SELECT `daftar_konsultasi`.* FROM `daftar_konsultasi` JOIN `user` ON `daftar_konsultasi`.`id_user` = `user`.`id` WHERE `daftar_konsultasi`.`id_user` = $idUser ORDER BY `daftar_konsultasi`.`id`";
return $this->db->query($query)->result_array();
}
public function hapusKonsultasi($id)
{
$this->db->where('id', $id);
$this->db->delete('daftar_konsultasi');
}
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

11
application/third_party/index.html vendored Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,48 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-user-md"></i> Daftar Konsultasi</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Tanggal</th>
<th>Username</th>
<th>Penyakit</th>
<th>Nilai</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($dftr_konsul as $konsul) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= (new DateTime($konsul['tanggal']))->format('d F Y'); ?></td>
<td><?= $konsul['name']; ?></td>
<td><?= $konsul['nama_penyakit']; ?></td>
<td><?= $konsul['nilai']; ?>%</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,74 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-stethoscope"></i> Data Gejala</h3>
</div>
<div class="title_right">
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newMenuModal"><i class="fa fa-fw fa-plus"></i> Tambah Data</a>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Kode</th>
<th>Gejala</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($gejala as $g) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $g['kode']; ?></td>
<td><?= $g['gejala']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editGejalaModal<?= $g['id_gejala']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('gejala/hapusGejala/') . $g['id_gejala']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,78 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-medkit"></i>Data Penderita Stunting</h3>
</div>
<div class="title_right">
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newGrafikModal">
<i class="fa fa-fw fa-plus"></i> Tambah Data
</a>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th>No</th>
<th>Kode</th>
<th>Nama Kecamatan</th>
<th>Jumlah</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($grafik as $p) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $p['kode']; ?></td>
<td><?= $p['nama_kecamatan']; ?></td>
<td><?= $p['jumlah']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editGrafikModal<?= $p['id_grafik']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('grafik/hapusGrafik/') . $p['id_grafik']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,79 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-users"></i> Data Pengguna</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Nama</th>
<th>Email</th>
<th>Status</th>
<th>Tgl Registrasi</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($member as $m) : ?>
<?php
if ($m['is_active'] == 1) {
$m['is_active'] = 'Aktif';
} else {
$m['is_active'] = 'Tidak Aktif';
}
?>
<tr>
<td><?= $i; ?></td>
<td><?= $m['name']; ?></td>
<td><?= $m['email']; ?></td>
<td><?= $m['is_active']; ?></td>
<td><?= (new DateTime($m['date_created']))->format('d F Y'); ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal" data-target="#editMemberModal<?= $m['id']; ?>"><i class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('member/hapusMember/') . $m['id']; ?>" class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,84 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-medkit"></i> Data Penyakit</h3>
</div>
<div class="title_right">
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal" data-target="#newPenyakitModal"><i class="fa fa-fw fa-plus"></i> Tambah Data</a>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th>No</th>
<th>Kode</th>
<th>Nama Penyakit</th>
<th>Probabilitas</th>
<th>Jumlah Muncul</th>
<th width="25%">Aksi</th>
<th>Saran</th>
<th>Informasi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($penyakit as $p) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $p['kode']; ?></td>
<td><?= $p['nama_penyakit']; ?></td>
<td><?= $p['probabilitas']; ?></td>
<td><?= $p['jumlah_muncul']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal" data-target="#editPenyakitModal<?= $p['id_penyakit']; ?>"><i class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('penyakit/hapusPenyakit/') . $p['id_penyakit']; ?>" class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
<td><?= $p['saran']; ?></td>
<td><?= $p['informasi']; ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,77 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule</h3>
</div>
</div>
<div class="clearfix"></div>
<!-- top tiles -->
<div class="row">
<div class="animated flipInY col-lg-12 col-xs-12">
<!-- <a href="base_url('rule/maag');"> -->
<a href="<?= base_url('rule/beriBeri'); ?>">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count">Beri Beri</div>
<h3>Data Rule Penyakit Beri Beri
</a></h3>
</div>
</a>
</div>
<div class="animated flipInY col-lg-12 col-xs-12">
<!-- <a href="= base_url('rule/diare');"> -->
<a href="<?= base_url('rule/kwarshiorkor'); ?>">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count">kwarshiorkor</div>
<h3>Data Rule Penyakit kwarshiorkor
</a></h3>
</div>
</a>
</div>
<div class="animated flipInY col-lg-12 col-xs-12">
<!-- <a href=" base_url('rule/disentri'); "> -->
<a href="<?= base_url('rule/marasmus'); ?>">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count">Marasmus</div>
<h3>Data Rule Penyakit Marasmus
</a></h3>
</div>
</a>
</div>
<div class="animated flipInY col-lg-12 col-xs-12">
<!-- <a href="base_url('rule/apendictis');"> -->
<a href="<?= base_url('rule/marasmusKwarshiorkor'); ?>">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count" style>Marasmus Kwarshiorkor</div>
<h3>Data Rule Penyakit Marasmus Kwarshiorkor
</a></h3>
</div>
</a>
</div>
<div class="animated flipInY col-lg-12 col-xs-12">
<!-- <a href="base_url('rule/keracunan');"> -->
<a href="<?= base_url('rule/skorbut'); ?>">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count">Skorbut</div>
<h3>Data Rule Penyakit Skorbut
</a></h3>
</div>
</a>
</div>
</div>
</div>
<!-- /top tiles -->
</div>
<!-- /page content -->

View File

@ -0,0 +1,46 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-home"></i> Dashboard</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><a href="<?= base_url('admin/konsultasi'); ?>"><i class="fa fa-user-md"></i></a></div>
<div class="count"><a href="<?= base_url('admin/konsultasi'); ?>"><?= $jml_dftr_konsul; ?></a></div>
<h3><a href="<?= base_url('admin/konsultasi'); ?>">Diagnosa</a></h3>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><a href="<?= base_url('admin/penyakit'); ?>"><i class="fa fa-medkit"></i></a></div>
<div class="count"><a href="<?= base_url('admin/penyakit'); ?>"><?= $jml_penyakit; ?></a></div>
<h3><a href="<?= base_url('admin/artikel'); ?>">Penyakit</a></h3>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><a href="<?= base_url('admin/member'); ?>"><i class="fa fa-users"></i></a></div>
<div class="count"><a href="<?= base_url('admin/member'); ?>"><?= $jml_user; ?></a></div>
<h3><a href="<?= base_url('admin/member'); ?>">User</a></h3>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><a href="<?= base_url('admin/rule'); ?>"><i class="fa fa-medkit"></i></a></div>
<div class="count"><a href="<?= base_url('admin/rule'); ?>"><?= $jml_rule; ?></a></div>
<h3><a href="<?= base_url('admin/rule'); ?>">Rule</a></h3>
</div>
</div>
</div>
</div>
<!-- page content -->

View File

@ -0,0 +1,30 @@
<!-- Modal Edit -->
<?php foreach ($gejala as $g) : ?>
<div class="modal fade" id="editGejalaModal<?= $g['id_gejala']; ?>" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Edit Gejala</h5>
<form action="<?= base_url('gejala/editGejala'); ?>" method="post">
</div>
<input type="hidden" name="id" value="<?= $g['id_gejala']; ?>">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $g['kode']; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="gejala" name="gejala" value="<?= $g['gejala']; ?>">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</form>
</div>
</div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,35 @@
<!-- Modal Edit -->
<?php foreach ($grafik as $g) : ?>
<div class="modal fade" id="editGrafikModal<?= $g['id_grafik']; ?>" tabindex="-1" role="dialog"
aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Edit Data Stunting</h5>
<form action="<?= base_url('grafik/editGrafik'); ?>" method="post">
</div>
<input type="hidden" name="id" value="<?= $g['id_grafik']; ?>">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $g['kode']; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="nama_kecamatan" name="nama_kecamatan"
value="<?= $g['nama_kecamatan']; ?>">
</div>
<div class="form-group">
<input type="text" class="form-control" id="jumlah" name="jumlah" value="<?= $g['jumlah']; ?>">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</form>
</div>
</div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,52 @@
<!-- Modal Edit -->
<?php foreach ($member as $m) : ?>
<div class="modal fade" id="editMemberModal<?= $m['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Edit Member</h5>
</div>
<form action="<?= base_url('member/editMember'); ?>" method="post">
<input type="hidden" name="id" value="<?= $m['id']; ?>">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="email" name="email" value="<?= $m['email']; ?>" readonly>
</div>
<div class="form-group">
<div class='input-group date' id='datetimepicker7'>
<input type='text' class="form-control" name="date_created" value="<?= (new DateTime($m['date_created']))->format('d F Y'); ?>" readonly />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="form-group">
<input type="text" class="form-control" id="name" name="name" value="<?= $m['name']; ?>">
</div>
<div class="form-group">
<select class="form-control" name="is_active">
<?php
if ($m['is_active'] == 1) {
$m['is_active'] = 'Aktif';
} else {
$m['is_active'] = 'Tidak Aktif';
}
?>
<option value="<?= $m['id']; ?>">Status Sekarang = <?= $m['is_active']; ?></option>
<option value="1">Aktif</option>
<option value="0">Tidak Aktif</option>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</form>
</div>
</div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,43 @@
<!-- Modal Edit -->
<?php foreach ($penyakit as $p) : ?>
<div class="modal fade" id="editPenyakitModal<?= $p['id_penyakit']; ?>" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Edit Penyakit</h5>
</div>
<form action="<?= base_url('penyakit/editPenyakit'); ?>" method="post">
<input type="hidden" name="id" value="<?= $p['id_penyakit']; ?>">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $p['kode']; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="nama_penyakit" name="nama_penyakit" value="<?= $p['nama_penyakit']; ?>">
</div>
<div class="form-group">
<input type="text" class="form-control" id="probabilitas" name="probabilitas" value="<?= $p['probabilitas']; ?>">
</div>
<div class="form-group">
<input type="text" class="form-control" id="jumlah_muncul" name="jumlah_muncul" value="<?= $p['jumlah_muncul']; ?>">
</div>
<div class="form-group">
<textarea name="saran" id="saran" class="resizable_textarea form-control"><?= $p['saran']; ?></textarea>
</div>
<div class="form-group">
<textarea name="informasi" id="informasi" class="resizable_textarea form-control"><?= $p['informasi']; ?></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</div>
</form>
</div>
</div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,33 @@
<!-- Modal Edit -->
<?php foreach ($rule as $p) : ?>
<div class="modal fade" id="editRuleModal<?= $p['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Edit Rule</h5>
</div>
<form action="<?= base_url('rule/editRule'); ?>" method="post">
<input type="hidden" name="id" value="<?= $p['id']; ?>">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="nama_penyakit" name="nama_penyakit" value="<?= $p['nama_penyakit']; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="nama_gejala" name="nama_gejala" value="<?= $p['gejala']; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="prob" name="prob" value="<?= $p['probabilitas']; ?>">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<button type="submit" class="btn btn-primary">Edit</button>
</div>
</form>
</div>
</div>
</div>
<?php endforeach; ?>

View File

@ -0,0 +1,27 @@
<!-- Modal Tambah -->
<div class="modal fade" id="newMenuModal" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Tambah Gejala</h5>
</div>
<form action="<?= base_url('gejala/tambahGejala'); ?>" method="post">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $kode; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="gejala" name="gejala" placeholder="Nama gejala" required>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Tambah</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
<!-- Modal Tambah -->
<div class="modal fade" id="newGrafikModal" tabindex="-1" role="dialog" aria-labelledby="forModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Tambah Data Stunting</h5>
</div>
<form action="<?= base_url('grafik/tambahGrafik'); ?>" method="post">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $kode; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="nama_kecamatan" name="nama_kecamatan"
placeholder="Nama Kecamatan" required>
</div>
<div class="form-group">
<input type="text" class="form-control" id="jumlah" name="jumlah"
placeholder="Jumlah Prevalensi" required>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Tambah</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,39 @@
<!-- Modal Tambah -->
<div class="modal fade" id="newPenyakitModal" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Tambah Penyakit</h5>
</div>
<form action="<?= base_url('penyakit/tambahPenyakit'); ?>" method="post">
<div class="modal-body">
<div class="form-group">
<input type="text" class="form-control" id="kode" name="kode" value="<?= $kode; ?>" readonly>
</div>
<div class="form-group">
<input type="text" class="form-control" id="nama_penyakit" name="nama_penyakit" placeholder="Nama Penyakit" required>
</div>
<div class="form-group">
<input type="text" class="form-control" id="probabilitas" name="probabilitas" placeholder="Nilai Probabilitas" required>
</div>
<div class="form-group">
<input type="text" class="form-control" id="jumlah_muncul" name="jumlah_muncul" placeholder="Jumlah Muncul" required>
</div>
<div class="form-group">
<textarea name="saran" id="saran" class="resizable_textarea form-control" placeholder="Saran" required></textarea>
</div>
<div class="form-group">
<textarea name="informasi" id="informasi" class="resizable_textarea form-control" placeholder="Info Penyakit" required></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Tambah</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,40 @@
<!-- Modal Tambah -->
<div class="modal fade" id="newRuleModal" tabindex="-1" role="dialog" aria-labelledby="forModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="apasih">Tambah Rule</h5>
</div>
<form action="<?= base_url('rule/tambahRule'); ?>" method="post">
<div class="modal-body">
<div class="form-group">
<select class="form-control" name="nama_penyakit">
<option>-- Nama Penyakit --</option>
<?php foreach ($penyakit as $p) : ?>
<option value="<?= $p['id_penyakit']; ?>"><?= $p['nama_penyakit']; ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<select class="form-control" name="nama_gejala">
<option>-- Gejala --</option>
<?php foreach ($gejala as $g) : ?>
<option value="<?= $g['id_gejala']; ?>"><?= $g['gejala']; ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<input type="text" class="form-control" id="prob" name="prob" placeholder="Nilai Probabilitas">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Tambah</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,78 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule Marasmus Kwarshiorkor</h3>
</div>
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newRuleModal"><i class="fa fa-fw fa-plus"></i> Tambah Rule</a>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<!-- <a href="" class="btn btn-round btn-primary mb-3" data-toggle="modal" data-target="#newRuleModal">Tambah Rule</a> -->
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Penyakit</th>
<th>Gejala</th>
<th>Probabilitas</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($marasmus_kwarshiorkor as $d) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $d['nama_penyakit']; ?></td>
<td><?= $d['gejala']; ?></td>
<td><?= $d['probabilitas']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editRuleModal<?= $d['id']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('rule/hapusRule/') . $d['id']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,78 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule Kwarshiorkor</h3>
</div>
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newRuleModal"><i class="fa fa-fw fa-plus"></i> Tambah Rule</a>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<!-- <a href="" class="btn btn-round btn-primary mb-3" data-toggle="modal" data-target="#newRuleModal">Tambah Rule</a> -->
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Penyakit</th>
<th>Gejala</th>
<th>Probabilitas</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($kwarshiorkor as $d) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $d['nama_penyakit']; ?></td>
<td><?= $d['gejala']; ?></td>
<td><?= $d['probabilitas']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editRuleModal<?= $d['id']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('rule/hapusRule/') . $d['id']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,78 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule Marasmus</h3>
</div>
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newRuleModal"><i class="fa fa-fw fa-plus"></i> Tambah Rule</a>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<!-- <a href="" class="btn btn-round btn-primary mb-3" data-toggle="modal" data-target="#newRuleModal">Tambah Rule</a> -->
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Penyakit</th>
<th>Gejala</th>
<th>Probabilitas</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($marasmus as $ds) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $ds['nama_penyakit']; ?></td>
<td><?= $ds['gejala']; ?></td>
<td><?= $ds['probabilitas']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editRuleModal<?= $ds['id']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('rule/hapusRule/') . $ds['id']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,78 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule Skorbut</h3>
</div>
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newRuleModal"><i class="fa fa-fw fa-plus"></i> Tambah Rule</a>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<!-- <a href="" class="btn btn-round btn-primary mb-3" data-toggle="modal" data-target="#newRuleModal">Tambah Rule</a> -->
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Penyakit</th>
<th>Gejala</th>
<th>Probabilitas</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($skorbut as $k) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $k['nama_penyakit']; ?></td>
<td><?= $k['gejala']; ?></td>
<td><?= $k['probabilitas']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editRuleModal<?= $k['id']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('rule/hapusRule/') . $k['id']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,76 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-database"></i> Data Rule Beri Beri</h3>
</div>
<a href="" class="btn btn-success mb-3 pull-right" data-toggle="modal"
data-target="#newRuleModal"><i class="fa fa-fw fa-plus"></i> Tambah Rule</a>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<!-- <a href="" class="btn btn-round btn-primary mb-3" data-toggle="modal" data-target="#newRuleModal">Tambah Rule</a> -->
<div class="x_content">
<table id="datatable-responsive"
class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Penyakit</th>
<th>Gejala</th>
<th>Probabilitas</th>
<th width="25%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($beri_beri as $m) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= $m['nama_penyakit']; ?></td>
<td><?= $m['gejala']; ?></td>
<td><?= $m['probabilitas']; ?></td>
<td style="text-align: center">
<a href="" class="btn btn-warning" data-toggle="modal"
data-target="#editRuleModal<?= $m['id']; ?>"><i
class="fa fa-fw fa-edit"></i> Ubah</a>
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<a href="<?= base_url('rule/hapusRule/') . $m['id']; ?>"
class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,16 @@
<div class="container body">
<div class="main_container">
<!-- page content -->
<div class="col-md-12">
<div class="col-middle">
<div class="text-center text-center">
<h1 class="error-number">403</h1>
<h2>Akses Ditolak</h2>
<p>Maaf, anda tidak mempunyai wewenang untuk mengakses laman ini!</p>
<a class="btn btn-info" href="<?= base_url('auth'); ?>">Kembali</a>
</div>
</div>
</div>
<!-- /page content -->
</div>
</div>

View File

@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
body {
background: url('assets/images/background-img.jpg') no-repeat center center fixed;
background-size: cover;
font-family: 'Roboto', sans-serif;
color: #fff;
}
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
}
.login-container {
position: relative;
z-index: 2;
background: rgba(74, 114, 77, 0.9);
border-radius: 15px;
padding: 30px;
max-width: 450px;
width: 600px;
margin: auto;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.form-label {
font-weight: bold;
}
.form-control {
font-size: 16px;
padding: 10px 15px;
}
.btn-custom {
background-color: #28a745;
color: #fff;
border: none;
}
.btn-custom:hover {
background-color: #218838;
}
.forgot-password-link {
color: #007bff;
}
.forgot-password-link:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="overlay"></div>
<div class="d-flex justify-content-center align-items-center vh-100">
<div class="login-container">
<h2 class="text-center mb-4">Login</h2>
<!-- Flash Message -->
<?php if ($this->session->flashdata('message')) : ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<?= $this->session->flashdata('message'); ?>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<?php endif; ?>
<form method="POST" action="<?= base_url('auth'); ?>">
<!-- Email -->
<div class="mb-4">
<label for="email" class="form-label">Email</label>
<input type="email" id="email" name="email" class="form-control" placeholder="Enter your email"
value="<?= set_value('email'); ?>" required>
<small class="text-danger"><?= form_error('email'); ?></small>
</div>
<!-- Password -->
<div class="mb-4">
<label for="password" class="form-label">Password</label>
<input type="password" id="password" name="password" class="form-control"
placeholder="Enter your password" required>
<small class="text-danger"><?= form_error('password'); ?></small>
</div>
<!-- Remember Me and Forgot Password -->
<div class="d-flex justify-content-between align-items-center mb-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="rememberMe">
<label class="form-check-label" for="rememberMe">Remember me</label>
</div>
<a href="#!" class="forgot-password-link">Forgot password?</a>
</div>
<!-- Login Button -->
<div class="d-grid">
<button type="submit" class="btn btn-custom btn-lg">Login</button>
</div>
<!-- Link to Register -->
<p class="text-center mt-3">Don't have an account? <a href="<?= base_url('auth/registrasi'); ?>"
class="link-danger">Register here</a></p>
</form>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
body {
font-family: sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-image: url('assets/images/background-img.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: rgba(0, 0, 0, 0.7);
/* Black with 70% opacity */
}
.container {
background-color: #fff;
padding: 40px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
margin-bottom: 30px;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 12px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 3px;
}
button {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 3px;
cursor: pointer;
}
.error {
color: red;
font-size: 12px;
margin-bottom: 10px;
}
.success {
color: green;
font-size: 12px;
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1>Login</h1>
<?php if ($this->session->flashdata('message')): ?>
<p class="success"><?php echo $this->session->flashdata('message'); ?></p>
<?php endif; ?>
<form method="POST" action="<?= base_url('auth'); ?>">
<label for="email">Email:</label>
<input type="text" name="email" id="email" placeholder="Enter your email"
value="<?= set_value('email'); ?>">
<?php if (form_error('email')): ?>
<p class="error"><?= form_error('email'); ?></p>
<?php endif; ?>
<label for="password">Password:</label>
<input type="password" name="password" id="password" placeholder="Enter your password">
<?php if (form_error('password')): ?>
<p class="error"><?= form_error('password'); ?></p>
<?php endif; ?>
<button type="submit">Login</button>
</form>
<p>Don't have an account? <a href="<?= base_url('auth/registrasi'); ?>">Register now</a></p>
</div>
</body>
</html>

View File

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sistem Pakar Metode Naive Bayes</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
body {
background: url('<?= base_url("assets/images/background-img.jpg"); ?>') no-repeat center center fixed;
background-size: cover;
color: #fff;
font-family: 'Roboto', sans-serif;
}
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
}
.register-container {
position: relative;
z-index: 2;
background: rgba(74, 114, 77, 0.9);
border-radius: 15px;
padding: 30px;
max-width: 450px;
margin: auto;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.form-label {
font-weight: bold;
}
.btn-custom {
background-color: #28a745;
color: #fff;
border: none;
}
.btn-custom:hover {
background-color: #218838;
}
</style>
</head>
<body>
<div class="overlay"></div>
<div class="d-flex justify-content-center align-items-center vh-100">
<div class="register-container">
<h2 class="text-center mb-4">Buat Akun Baru</h2>
<!-- Pesan Error Validasi -->
<?= $this->session->flashdata('message'); ?>
<?= validation_errors('<div class="alert alert-danger">', '</div>'); ?>
<form method="POST" action="<?= base_url('auth/registrasi'); ?>">
<!-- Username -->
<div class="mb-3">
<label for="name" class="form-label">Username</label>
<input type="text" name="name" id="name" class="form-control" placeholder="Masukkan username"
value="<?= set_value('name'); ?>" required>
<small class="text-danger"><?= form_error('name'); ?></small>
</div>
<!-- Email -->
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" name="email" id="email" class="form-control" placeholder="Masukkan email"
value="<?= set_value('email'); ?>" required>
<small class="text-danger"><?= form_error('email'); ?></small>
</div>
<!-- Password -->
<div class="mb-3">
<label for="password1" class="form-label">Password</label>
<input type="password" name="password1" id="password1" class="form-control"
placeholder="Masukkan password" required>
<small class="text-danger"><?= form_error('password1'); ?></small>
</div>
<!-- Confirm Password -->
<div class="mb-3">
<label for="password2" class="form-label">Konfirmasi Password</label>
<input type="password" name="password2" id="password2" class="form-control"
placeholder="Konfirmasi password" required>
<small class="text-danger"><?= form_error('password2'); ?></small>
</div>
<!-- Data Tambahan -->
<div class="row">
<div class="col-md-6 mb-3">
<label for="berat_badan" class="form-label">Berat Badan (kg)</label>
<input type="text" name="berat_badan" id="berat_badan" class="form-control"
placeholder="Masukkan berat badan" value="<?= set_value('berat_badan'); ?>">
<small class="text-danger"><?= form_error('berat_badan'); ?></small>
</div>
<div class="col-md-6 mb-3">
<label for="tinggi_badan" class="form-label">Tinggi Badan (cm)</label>
<input type="text" name="tinggi_badan" id="tinggi_badan" class="form-control"
placeholder="Masukkan tinggi badan" value="<?= set_value('tinggi_badan'); ?>">
<small class="text-danger"><?= form_error('tinggi_badan'); ?></small>
</div>
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="lingkar_kepala" class="form-label">Lingkar Kepala (cm)</label>
<input type="text" name="lingkar_kepala" id="lingkar_kepala" class="form-control"
placeholder="Masukkan lingkar kepala" value="<?= set_value('lingkar_kepala'); ?>">
<small class="text-danger"><?= form_error('lingkar_kepala'); ?></small>
</div>
<div class="col-md-6 mb-3">
<label for="lingkar_lengan_atas" class="form-label">Lingkar Lengan Atas</label>
<input type="text" name="lingkar_lengan_atas" id="lingkar_lengan_atas" class="form-control"
placeholder="Masukkan lingkar lengan atas" value="<?= set_value('lingkar_lengan_atas'); ?>">
<small class="text-danger"><?= form_error('lingkar_lengan_atas'); ?></small>
</div>
</div>
<!-- Submit Button -->
<div class="d-grid">
<button type="submit" class="btn btn-custom btn-lg">Daftar</button>
</div>
<!-- Link to Login -->
<p class="text-center mt-3">Sudah punya akun? <a href="<?= base_url('auth'); ?>"
class="text-primary">Login di sini</a></p>
</form>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,107 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register Page</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
.divider:after,
.divider:before {
content: "";
flex: 1;
height: 1px;
background: #eee;
}
.h-custom {
height: calc(100% - 73px);
}
@media (max-width: 450px) {
.h-custom {
height: 100%;
}
}
</style>
</head>
<body>
<section class="vh-100">
<div class="container-fluid h-custom">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-md-9 col-lg-6 col-xl-5">
<img src="assets/images/pyramid.jpg" class="img-fluid" alt="Sample image">
</div>
<div class="col-md-8 col-lg-6 col-xl-4 offset-xl-1">
<form method="POST" action="<?= base_url('auth/registrasi'); ?>">
<!-- Nama input -->
<div data-mdb-input-init class="form-outline mb-4">
<input type="text" name="name" class="form-control form-control-lg"
placeholder="Masukkan Nama anda" value="<?= set_value('name'); ?>" />
<label style="margin-top: 24px" class="form-label" for="form3Example3">Nama</label>
</div>
<!-- Email input -->
<div data-mdb-input-init class="form-outline mb-4">
<input type="email" id="email" name="email" class="form-control form-control-lg"
placeholder="Masukkan email valid anda" value="<?= set_value('email'); ?>" />
<label style="margin-top: 24px" class="form-label" for="form3Example3">Email address</label>
</div>
<!-- Password input -->
<div data-mdb-input-init class="form-outline mb-3">
<input type="password" name="password1" class="form-control form-control-lg"
placeholder="Masukkan password" />
<label style="margin-top: 24px" class="form-label" for="form3Example4">Password</label>
</div>
<div data-mdb-input-init class="form-outline mb-3">
<input type="password" name="password2" class="form-control form-control-lg"
placeholder="Masukkan password" />
<label style="margin-top: 24px" class="form-label" for="form3Example4">Konfirmasi
Password</label>
</div>
<div class="d-flex justify-content-between align-items-center">
<!-- Checkbox -->
<div class="form-check mb-0">
<input class="form-check-input me-2" type="checkbox" value="" id="form2Example3" />
<label class="form-check-label" for="form2Example3">
Remember me
</label>
</div>
<a href="#!" class="text-body">Forgot password?</a>
</div>
<div class="text-center text-lg-start mt-4 pt-2">
<button type="submit" data-mdb-button-init data-mdb-ripple-init
class="btn btn-primary btn-lg"
style="padding-left: 2.5rem; padding-right: 2.5rem;">Register</button>
<p class="small fw-bold mt-2 pt-1 mb-0">Sudah Punya akun ? <a
href="<?= base_url('auth'); ?>" class="link-danger">Login</a></p>
</div>
</form>
</div>
</div>
</div>
</section>
<!-- Bootstrap Bundle JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- MDB JS (Jika Anda menggunakan MDBootstrap) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/6.2.0/mdb.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";

View File

@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nDatabase error: ",
$heading,
"\n\n",
$message,
"\n\n";

View File

@ -0,0 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
An uncaught Exception was encountered
Type: <?php echo get_class($exception), "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $exception->getFile(), "\n"; ?>
Line Number: <?php echo $exception->getLine(); ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>

View File

@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";

View File

@ -0,0 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
A PHP Error was encountered
Severity: <?php echo $severity, "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $filepath, "\n"; ?>
Line Number: <?php echo $line; ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,62 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<?php
$ci = new CI_Controller();
$ci = &get_instance();
$ci->load->helper('url');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Halaman Tidak Ditemukan</title>
<!-- Bootstrap -->
<link href="<?= base_url('assets'); ?>/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="<?= base_url('assets'); ?>/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- NProgress -->
<link href="<?= base_url('assets'); ?>/vendors/nprogress/nprogress.css" rel="stylesheet">
<!-- Custom Theme Style -->
<link href="<?= base_url('assets'); ?>/build/css/custom.min.css" rel="stylesheet">
</head>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<!-- page content -->
<div class="col-md-12">
<div class="col-middle">
<div class="text-center text-center">
<h1 class="error-number">404</h1>
<h2>Maaf, halaman tidak ditemukan</h2>
<p><a class="btn btn-info" href="<?= base_url('auth'); ?>">Kembali</a>
</p>
</div>
</div>
</div>
<!-- /page content -->
</div>
<!-- jQuery -->
<script src="<?= base_url('assets'); ?>/vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="<?= base_url('assets'); ?>/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="<?= base_url('assets'); ?>/vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="<?= base_url('assets'); ?>/vendors/nprogress/nprogress.js"></script>
<!-- Custom Theme Scripts -->
<script src="<?= base_url('assets'); ?>/build/js/custom.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>

View File

@ -0,0 +1,32 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>An uncaught Exception was encountered</h4>
<p>Type: <?php echo get_class($exception); ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $exception->getFile(); ?></p>
<p>Line Number: <?php echo $exception->getLine(); ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file']; ?><br />
Line: <?php echo $error['line']; ?><br />
Function: <?php echo $error['function']; ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>

View File

@ -0,0 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>

View File

@ -0,0 +1,33 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file'] ?><br />
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sistem Pakar - Naïve Bayes</title>
<link rel="stylesheet" href="<?= base_url('assets/'); ?>style_diagnosa.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" rel="stylesheet">
<style>
.card-transparent {
background: rgba(102, 223, 183, 0.1) !important;
backdrop-filter: blur(10px);
border: none;
}
</style>
</head>
<body class="bg-success text-white">
<div class="container py-5">
<div class="card card-transparent p-4 text-white rounded">
<h2 class="text-center mb-4">Pilih Gejala yang Dialami</h2>
<form onsubmit="return validate();" action="<?= base_url('diagnosa/hasil'); ?>" method="POST">
<div class="row row-cols-1 row-cols-md-2 g-3">
<?php foreach ($gejala as $g) : ?>
<div class="col">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="<?= $g['id_gejala']; ?>" name="gejala[]"
value="<?= $g['id_gejala']; ?>">
<label class="form-check-label" for="<?= $g['id_gejala']; ?>">
<?= $g['gejala']; ?>
</label>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="mt-4 d-flex justify-content-center gap-3">
<button type="submit" class="btn btn-primary px-4"><i class="fas fa-cogs"></i> Proses</button>
<button type="reset" class="btn btn-danger px-4"><i class="fas fa-undo"></i> Reset</button>
</div>
</form>
</div>
</div>
<script>
function validate() {
let checkboxes = document.querySelectorAll("input[name='gejala[]']:checked");
if (checkboxes.length === 0) {
alert('Gejala harus dipilih terlebih dahulu!');
return false;
} else if (checkboxes.length < 2) {
alert('Pilih minimal 2 gejala!');
return false;
}
return true;
}
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hasil Diagnosa</title>
<link rel="stylesheet" href="<?= base_url('assets/'); ?>style_hasil_diagnosis.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-success">
<div class="container">
<a class="navbar-brand" href="<?= base_url('home'); ?>">
<i class="fa-brands fa-windows"></i> Sistem Pakar Naive Bayes
</a>
<div class="ms-auto">
<?php
if ($this->session->userdata('email')) {
$log = '<i class="fa fa-power-off"></i> Logout';
$url = 'logout';
} else {
$log = '<i class="fa fa-lock"></i> Login';
$url = '';
}
?>
<a href="<?= base_url('auth/' . $url); ?>" class="btn btn-light"> <?= $log; ?> </a>
</div>
</div>
</nav>
<div class="container mt-5 text-center">
<h1 class="mb-4" style="font-weight: bold;">Hasil Diagnosis Penyakit</h1>
<div class="alert alert-info fs-4" role="alert">
<?php foreach ($hasilMax as $h) : ?>
<strong><?= $h['nama_penyakit']; ?></strong>
<?php endforeach; ?>
</div>
</div>
<div class="container mt-4">
<div class="row">
<div class="col-md-6">
<div class="card p-4">
<h5><b>Info Penyakit</b></h5>
<p><?= $h['informasi']; ?></p>
<h5><b>Saran</b></h5>
<p><?= $h['saran']; ?></p>
</div>
</div>
<div class="col-md-6">
<div class="card p-4">
<h5><b>Probabilitas Penyakit</b></h5>
<?php foreach ($hasil as $h) : ?>
<div class="mb-3">
<strong><?= $h['nama_penyakit']; ?> (<?= floor($h['hasil_probabilitas'] * 100); ?>%)</strong>
<div class="progress">
<div class="progress-bar bg-success" role="progressbar"
style="width: <?= floor($h['hasil_probabilitas'] * 100); ?>%"
aria-valuenow="<?= floor($h['hasil_probabilitas'] * 100); ?>" aria-valuemin="0"
aria-valuemax="100">
<?= floor($h['hasil_probabilitas'] * 100); ?>%
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<!-- <div class="container mt-4 text-center">
<h5><b>Gambar Terkait Penyakit</b></h5>
<img src="<?= base_url('assets/images/'); ?>gambar_penyakit.jpg" class="img-fluid rounded"
alt="Gambar Penyakit">
</div> -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,407 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Index - eNno Bootstrap Template</title>
<meta name="description" content="">
<meta name="keywords" content="">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Fonts -->
<link href="https://fonts.googleapis.com" rel="preconnect">
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"
rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Main CSS File -->
<link href="assets/css/main.css" rel="stylesheet">
</head>
<body class="index-page">
<header id="header" class="header d-flex align-items-center sticky-top">
<div class="container-fluid container-xl position-relative d-flex align-items-center">
<a href="index.html" class="logo d-flex align-items-center me-auto">
<!-- Uncomment the line below if you also wish to use an image logo -->
<!-- <img src="assets/img/logo.png" alt=""> -->
<h1 class="sitename">Si Gizi</h1>
</a>
<nav id="navmenu" class="navmenu">
<ul>
<li><a href="#hero" class="active">Home</a></li>
<li><a href="#about">Tentang</a></li>
<li><a href="#services">Informasi</a></li>
<!-- Conditional Button -->
<?php if ($this->session->userdata('email')): ?>
<li><a href="<?= base_url('user'); ?>"><i class="fa fa-home"></i> Dashboard</a></li>
<li><a href="<?= base_url('logout'); ?>"><i class="fa fa-power-off"></i> Logout</a></li>
<?php else: ?>
<li><a href="<?= base_url('auth'); ?>"><i class="fa fa-lock"></i> Login</a></li>
<?php endif; ?>
</ul>
<i class="mobile-nav-toggle d-xl-none bi bi-list"></i>
</nav>
</div>
</header>
<main class="main">
<!-- Hero Section -->
<section id="hero" class="hero section">
<div class="container">
<div class="row gy-4">
<div class="col-lg-6 order-2 order-lg-1 d-flex flex-column justify-content-center"
data-aos="fade-up">
<h1>Sistem Pakar Diagnosa Penyakit Gizi Buruk Pada Balita</h1>
<p>Deteksi dini gangguan gizi buruk anak anda</p>
<div class="d-flex">
<a href="<?= base_url('home/diagnosa'); ?>" class="btn-get-started">Mulai Diagnosa</a>
<a href="https://www.youtube.com/watch?v=Y7f98aduVJ8"
class="glightbox btn-watch-video d-flex align-items-center"><i
class="bi bi-play-circle"></i><span>Watch Video</span></a>
</div>
</div>
<div class="col-lg-6 order-1 order-lg-2 hero-img" data-aos="zoom-out" data-aos-delay="100">
<img style="width: 100%; height: 100%;" src="assets/img/busui_2.png" class="img-fluid animated"
alt="">
</div>
</div>
</div>
</section><!-- /Hero Section -->
<!-- Featured Services Section -->
<section id="featured-services" class="featured-services section">
<div class="container">
<div class="row gy-4">
<div class="col-lg-4 d-flex" data-aos="fade-up" data-aos-delay="100">
<div class="service-item position-relative">
<div class="icon"><i class="bi bi-activity icon"></i></div>
<h4><a href="" class="stretched-link">Masukkan Gejala</a></h4>
<p>Pilih Gejala yang terlihat pada anak anda</p>
</div>
</div><!-- End Service Item -->
<div class="col-lg-4 d-flex" data-aos="fade-up" data-aos-delay="200">
<div class="service-item position-relative">
<div class="icon"><i class="bi bi-bounding-box-circles icon"></i></div>
<h4><a href="" class="stretched-link">Muncul Diagnosa</a></h4>
<p>Sistem memunculkan diagnosa penyakit dan pencegahan</p>
</div>
</div><!-- End Service Item -->
<div class="col-lg-4 d-flex" data-aos="fade-up" data-aos-delay="300">
<div class="service-item position-relative">
<div class="icon"><i class="bi bi-calendar4-week icon"></i></div>
<h4><a href="" class="stretched-link">Konsultasi Segera</a></h4>
<p>Segera konsultasikan hasil diagnosa anda dengan dokter gizi</p>
</div>
</div><!-- End Service Item -->
</div>
</div>
</section><!-- /Featured Services Section -->
<!-- About Section -->
<section id="about" class="about section">
<!-- Section Title -->
<div class="container section-title" data-aos="fade-up">
<span>About Us<br></span>
<h2>About</h2>
<p style="font-size: medium;">Si Gizi adalah sebuah website yang diharapkan dapat membantu orang tua
dalam mendeteksi gejala gizi
buruk pada balita </p>
</div><!-- End Section Title -->
<div class="container">
<div class="row gy-4">
<div class="col-lg-6 position-relative align-self-start" data-aos="fade-up" data-aos-delay="100">
<img src="assets/img/about.png" class="img-fluid" alt="">
<a href="https://www.youtube.com/watch?v=Y7f98aduVJ8" class="glightbox pulsating-play-btn"></a>
</div>
<div class="col-lg-6 content" data-aos="fade-up" data-aos-delay="200">
<h3>Keuntungan Aplikasi</h3>
<p class="fst-italic">
Dengan menggunakan Si Gizi pengguna akan dapat kemudahan sebagai berikut
</p>
<ul>
<li><i class="bi bi-check2-all"></i> <span>Diagnosa Secara Langsung</span></li>
<li><i class="bi bi-check2-all"></i> <span>Muncul cara pencegahan Gizi Buruk berdasarkan
hasil diagnosa</span></li>
<li><i class="bi bi-check2-all"></i> <span>Melihat riwayat konsultasi</span></li>
</ul>
<p>
Kenali gejala awal gizi buruk anak anda dengan Si Gizi
</p>
</div>
</div>
</div>
</section><!-- /About Section -->
<!-- Services Section -->
<section id="services" class="services section light-background">
<div class="container section-title" data-aos="fade-up">
<span>Penyebab Utama Gizi Buruk</span>
<h2>Penyebab Utama Gizi Buruk</h2>
<p>Beberapa penyebab utama terjadinya penyakit gizi buruk</p>
</div>
<div class="container">
<div class="row gy-4">
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="100">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-activity"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Asupan Makanan Tidak Seimbang</h3>
</a>
<p>Kurangnya konsumsi makanan bergizi seperti protein, vitamin, dan mineral.
Pola makan yang tidak mencukupi kebutuhan gizi harian.</p>
</div>
</div>
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="200">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-broadcast"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Keterbatasan Akses Pangan</h3>
</a>
<p>Kesulitan mendapatkan makanan bergizi karena faktor ekonomi.
Tinggal di daerah yang sulit dijangkau dengan bahan makanan bergizi.</p>
</div>
</div>
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="300">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-easel"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Infeksi dan Penyakit Kronis</h3>
</a>
<p>Penyakit seperti diare, tuberkulosis, dan infeksi kronis dapat menghambat penyerapan
nutrisi. Infeksi cacing yang menyebabkan tubuh kehilangan zat gizi penting.</p>
</div>
</div>
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="400">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-bounding-box-circles"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Kurangnya Edukasi tentang Gizi</h3>
</a>
<p>Minimnya pengetahuan orang tua atau masyarakat tentang pentingnya gizi seimbang.
Kesalahan dalam pemberian makanan pada bayi dan anak-anak.</p>
<a href="service-details.html" class="stretched-link"></a>
</div>
</div>
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="500">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-calendar4-week"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Sanitasi dan Kebersihan yang Buruk</h3>
</a>
<p>Lingkungan yang tidak higienis meningkatkan risiko infeksi, yang dapat mengganggu
penyerapan nutrisi.
Air minum yang terkontaminasi bisa menyebabkan penyakit yang memperburuk kondisi gizi.
</p>
<a href="service-details.html" class="stretched-link"></a>
</div>
</div>
<div class="col-lg-4 col-md-6" data-aos="fade-up" data-aos-delay="600">
<div class="service-item position-relative">
<div class="icon">
<i class="bi bi-chat-square-text"></i>
</div>
<a href="service-details.html" class="stretched-link">
<h3>Faktor Sosial dan Budaya</h3>
</a>
<p>Kebiasaan atau mitos yang membatasi konsumsi makanan bergizi tertentu.
Pembagian makanan yang tidak meratadalam keluarga.</p>
<a href="service-details.html" class="stretched-link"></a>
</div>
</div>
</div>
</div>
</section>
<!-- Services Section (Replaced with Bar Chart) -->
<section id="services" class="services section light-background">
<div class="container section-title" data-aos="fade-up">
<span>Statistik</span>
<h2>Kasus Stunting di Jember</h2>
<p style="font-size: 24px;">Jumlah kasus stunting di setiap kecamatan di Jember berdasarkan data
terbaru.</p>
</div>
<div class="container">
<canvas id="stuntingChart"></canvas>
</div>
</section>
<!-- Tambahkan ini di bagian <head> jika belum ada -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
var ctx = document.getElementById("stuntingChart").getContext("2d");
var labels = [];
var data = [];
<?php foreach ($grafik as $row) : ?>
labels.push("<?= $row['nama_kecamatan']; ?>");
data.push(<?= $row['jumlah']; ?>);
<?php endforeach; ?>
var stuntingChart = new Chart(ctx, {
type: "bar",
data: {
labels: labels,
datasets: [{
label: "Jumlah Kasus Stunting",
data: data,
backgroundColor: "rgba(39, 250, 152, 0.6)",
borderColor: "rgb(9, 193, 55)",
borderWidth: 1
}]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
<!-- Load Bootstrap and Chart.js -->
<!-- Call To Action Section -->
<section id="call-to-action" class="call-to-action section accent-background">
<div class="container">
<div class="row justify-content-center" data-aos="zoom-in" data-aos-delay="100">
<div class="col-xl-10">
<div class="text-center">
<h3>Coba Sekarang</h3>
<p>Mulai Diagnosa sekarang sebelum terlambat</p>
<a class="cta-btn" href="#">Coba</a>
</div>
</div>
</div>
</div>
</section><!-- /Call To Action Section -->
</main>
<footer id="footer" class="footer">
<div class="container footer-top">
<div class="row gy-4">
<div class="col-lg-4 col-md-6 footer-about">
<a href="index.html" class="d-flex align-items-center">
<span class="sitename">eNno</span>
</a>
<div class="footer-contact pt-3">
<p>A108 Adam Street</p>
<p>New York, NY 535022</p>
<p class="mt-3"><strong>Phone:</strong> <span>+1 5589 55488 55</span></p>
<p><strong>Email:</strong> <span>info@example.com</span></p>
</div>
</div>
<div class="col-lg-2 col-md-3 footer-links">
<h4>Useful Links</h4>
<ul>
<li><i class="bi bi-chevron-right"></i> <a href="#">Home</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">About us</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">Services</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">Terms of service</a></li>
</ul>
</div>
<div class="col-lg-2 col-md-3 footer-links">
<h4>Our Services</h4>
<ul>
<li><i class="bi bi-chevron-right"></i> <a href="#">Web Design</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">Web Development</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">Product Management</a></li>
<li><i class="bi bi-chevron-right"></i> <a href="#">Marketing</a></li>
</ul>
</div>
<div class="col-lg-4 col-md-12">
<h4>Follow Us</h4>
<p>Cras fermentum odio eu feugiat lide par naso tierra videa magna derita valies</p>
<div class="social-links d-flex">
<a href=""><i class="bi bi-twitter-x"></i></a>
<a href=""><i class="bi bi-facebook"></i></a>
<a href=""><i class="bi bi-instagram"></i></a>
<a href=""><i class="bi bi-linkedin"></i></a>
</div>
</div>
</div>
</div>
<div class="container copyright text-center mt-4">
<p>© <span>Copyright</span> <strong class="px-1 sitename">eNno</strong> <span>All Rights Reserved</span></p>
<div class="credits">
Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> Distributed by <a
href=“https://themewagon.com>ThemeWagon
</div>
</div>
</footer>
<!-- Scroll Top -->
<a href="#" id="scroll-top" class="scroll-top d-flex align-items-center justify-content-center"><i
class="bi bi-arrow-up-short"></i></a>
<!-- Preloader -->
<div id="preloader"></div>
<!-- Vendor JS Files -->
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<script src="assets/vendor/aos/aos.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/imagesloaded/imagesloaded.pkgd.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<!-- Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>

View File

@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title style="font-weight: bold;">Sistem Pakar Metode Naive Bayes</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<style>
.banner-section {
position: relative;
background-image: url('<?= base_url("assets/images/background-img.jpg"); ?>');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
color: white;
z-index: 1;
}
.banner-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
z-index: -1;
}
.hover-effect {
position: relative;
overflow: hidden;
transition: color 0.3s ease;
}
.hover-effect::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background-color: white;
transition: all 0.3s ease;
}
.hover-effect:hover {
color: #ffd700 !important;
}
.hover-effect:hover::after {
width: 100%;
left: 0;
}
.navbar .btn:hover {
background-color: #ffffff !important;
color: #0056b3 !important;
}
</style>
</head>
<body>
<!-- Header Section -->
<nav class="navbar navbar-expand-lg navbar-dark bg-success shadow-sm">
<div class="container">
<a class="navbar-brand fw-bold text-white d-flex align-items-center" href="<?= base_url('home'); ?>">
<i class="fa fa-lightbulb me-2"></i> Sistem Pakar Naive Bayes
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto align-items-center">
<?php
if ($this->session->userdata('email')) {
$log = '<i class="fa fa-power-off"></i> Logout';
$url = 'logout';
$link = base_url('user');
$menu = '<li class="nav-item"><a class="nav-link text-white me-3 hover-effect" href="' . $link . '"><i class="fa fa-home"></i> Dashboard</a></li>';
} else {
$log = '<i class="fa fa-lock"></i> Login';
$url = 'login';
$menu = '';
}
?>
<?= $menu; ?>
<li class="nav-item">
<a class="btn btn-light text-primary fw-semibold hover-effect"
href="<?= base_url("auth/" . $url); ?>"><?= $log; ?></a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Banner Section -->
<div class="banner-section text-white py-5">
<div class="container text-center">
<div class="row align-items-center">
<div class="col-lg-6">
<h1>Sistem Pakar Diagnosa Penyakit Gizi Buruk Pada Balita</h1>
<a href="<?= base_url('home/diagnosa'); ?>" class="btn btn-light text-primary mt-4">
<i class="fa fa-play"></i> Mulai Diagnosa
</a>
</div>
<div class="col-lg-6">
<img src="<?= base_url('assets/images/'); ?>bayi.png" class="img-fluid" alt="Banner Image">
</div>
</div>
</div>
</div>
<!-- Info Section -->
<section class="py-5 bg-light">
<div class="container">
<div class="row align-items-center">
<div class="col-md-6">
<h2 class="text-primary">Info</h2>
<p class="mt-4" style="max-width: 800px;">
Sistem Pakar ini membantu Anda mendiagnosa penyakit gizi buruk pada balita secara dini.
Dengan menggunakan metode Naïve Bayes, kami memberikan hasil analisis yang cepat dan akurat
untuk membantu Anda mengambil tindakan yang tepat.
</p>
</div>
<div class="col-md-6 text-center">
<img src="<?= base_url('assets/images'); ?>/balita-dan-gizi.jpg" alt="Info Gambar"
class="img-fluid rounded">
</div>
</div>
</div>
</section>
<!-- About Us Section -->
<section class="py-5">
<div class="container text-center">
<h2 class="text-primary">About Us</h2>
<p class="mt-4 mx-auto" style="max-width: 800px;">
Kami adalah tim yang berdedikasi untuk meningkatkan kesadaran akan kesehatan balita melalui teknologi.
Sistem ini dirancang untuk memudahkan para orang tua, dokter, dan tenaga kesehatan dalam
menganalisis risiko gizi buruk dengan akurat dan efisien.
</p>
<div class="row mt-5">
<div class="col-md-4">
<i class="fa fa-user-circle fa-4x text-success mb-3"></i>
<h5>John Doe</h5>
<p>Ahli Gizi dan Kesehatan Anak</p>
</div>
<div class="col-md-4">
<i class="fa fa-user-circle fa-4x text-success mb-3"></i>
<h5>Jane Smith</h5>
<p>Developer Sistem Pakar</p>
</div>
<div class="col-md-4">
<i class="fa fa-user-circle fa-4x text-success mb-3"></i>
<h5>Mark Wilson</h5>
<p>Data Scientist</p>
</div>
</div>
</div>
</section>
<!-- Footer Section -->
<footer class="bg-dark text-white py-4">
<div class="container text-center">
<p class="mb-0">© 2025 Sistem Pakar Naive Bayes. All Rights Reserved.</p>
<p class="mb-0">Follow us:
<a href="#" class="text-white mx-1"><i class="fa fa-facebook"></i></a>
<a href="#" class="text-white mx-1"><i class="fa fa-twitter"></i></a>
<a href="#" class="text-white mx-1"><i class="fa fa-instagram"></i></a>
</p>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@ -0,0 +1,139 @@
<!-- footer content -->
<!-- /footer content -->
</div>
</div>
<!-- jQuery -->
<script src="<?= base_url('assets'); ?>/vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="<?= base_url('assets'); ?>/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="<?= base_url('assets'); ?>/vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="<?= base_url('assets'); ?>/vendors/nprogress/nprogress.js"></script>
<!-- iCheck -->
<script src="<?= base_url('assets'); ?>/vendors/iCheck/icheck.min.js"></script>
<!-- Datatables -->
<script src="<?= base_url('assets'); ?>/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js">
</script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-responsive/js/dataTables.responsive.min.js">
</script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js">
</script>
<script src="<?= base_url('assets'); ?>/vendors/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/jszip/dist/jszip.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/pdfmake/build/vfs_fonts.js"></script>
<!-- Chart.js -->
<script src="<?= base_url('assets'); ?>/vendors/Chart.js/dist/Chart.min.js"></script>
<!-- jQuery Sparklines -->
<script src="<?= base_url('assets'); ?>/vendors/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
<!-- morris.js -->
<script src="<?= base_url('assets'); ?>/vendors/raphael/raphael.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/morris.js/morris.min.js"></script>
<!-- gauge.js -->
<script src="<?= base_url('assets'); ?>/vendors/gauge.js/dist/gauge.min.js"></script>
<!-- bootstrap-progressbar -->
<script src="<?= base_url('assets'); ?>/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- Skycons -->
<script src="<?= base_url('assets'); ?>/vendors/skycons/skycons.js"></script>
<!-- Flot -->
<script src="<?= base_url('assets'); ?>/vendors/Flot/jquery.flot.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/Flot/jquery.flot.pie.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/Flot/jquery.flot.time.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/Flot/jquery.flot.stack.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/Flot/jquery.flot.resize.js"></script>
<!-- Flot plugins -->
<script src="<?= base_url('assets'); ?>/vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/flot-spline/js/jquery.flot.spline.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/flot.curvedlines/curvedLines.js"></script>
<!-- DateJS -->
<script src="<?= base_url('assets'); ?>/vendors/DateJS/build/date.js"></script>
<!-- bootstrap-progressbar -->
<script src="<?= base_url('assets'); ?>/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="<?= base_url('assets'); ?>/vendors/moment/min/moment.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- bootstrap-datetimepicker -->
<script
src="<?= base_url('assets'); ?>/vendors/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js">
</script>
<!-- bootstrap-wysiwyg -->
<script src="<?= base_url('assets'); ?>/vendors/bootstrap-wysiwyg/js/bootstrap-wysiwyg.min.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/jquery.hotkeys/jquery.hotkeys.js"></script>
<script src="<?= base_url('assets'); ?>/vendors/google-code-prettify/src/prettify.js"></script>
<!-- jQuery Tags Input -->
<script src="<?= base_url('assets'); ?>/vendors/jquery.tagsinput/src/jquery.tagsinput.js"></script>
<!-- Switchery -->
<script src="<?= base_url('assets'); ?>/vendors/switchery/dist/switchery.min.js"></script>
<!-- Select2 -->
<script src="<?= base_url('assets'); ?>/vendors/select2/dist/js/select2.full.min.js"></script>
<!-- Parsley -->
<script src="<?= base_url('assets'); ?>/vendors/parsleyjs/dist/parsley.min.js"></script>
<!-- Autosize -->
<script src="<?= base_url('assets'); ?>/vendors/autosize/dist/autosize.min.js"></script>
<!-- jQuery autocomplete -->
<script src="<?= base_url('assets'); ?>/vendors/devbridge-autocomplete/dist/jquery.autocomplete.min.js">
</script>
<!-- starrr -->
<script src="<?= base_url('assets'); ?>/vendors/starrr/dist/starrr.js"></script>
<!-- Custom Theme Scripts -->
<script src="<?= base_url('assets'); ?>/build/js/custom.min.js"></script>
<script src="<?= base_url(); ?>assets/js/sweetalert2.all.min.js"></script>
<script src="<?= base_url(); ?>assets/js/myscript.js"></script>
<script src="<?= base_url('assets/js/'); ?>textarea/jquery.mintextarea"></script>
<script src="<?= base_url('assets/js/'); ?>textarea/jquery.richtext.js"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
$('#myDatepicker').datetimepicker();
$('#myDatepicker2').datetimepicker({
format: 'DD.MM.YYYY'
});
$('#myDatepicker3').datetimepicker({
format: 'hh:mm A'
});
$('#myDatepicker4').datetimepicker({
ignoreReadonly: true,
allowInputToggle: true
});
$('#datetimepicker6').datetimepicker();
$('#datetimepicker7').datetimepicker({
useCurrent: true,
format: 'DD/MM/YYYY'
});
$("#datetimepicker6").on("dp.change", function(e) {
$('#datetimepicker7').data("DateTimePicker").minDate(e.date);
});
$("#datetimepicker7").on("dp.change", function(e) {
$('#datetimepicker6').data("DateTimePicker").maxDate(e.date);
});
</script>
</body>
<script>
$(document).ready(function() {
$('.content').richText();
});
</script>
</html>

View File

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sistem Pakar Metode Naive Bayes</title>
<link rel="stylesheet" href="<?= base_url('assets/'); ?>style_btn.css">
<link rel="stylesheet" href="<?= base_url('assets/css/'); ?>textarea/site.css">
<link rel="stylesheet" href="<?= base_url('assets/css/'); ?>textarea/richtext.min.css">
<!-- Bootstrap -->
<link href="<?= base_url('assets'); ?>/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="<?= base_url('assets'); ?>/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- NProgress -->
<link href="<?= base_url('assets'); ?>/vendors/nprogress/nprogress.css" rel="stylesheet">
<!-- iCheck -->
<link href="<?= base_url('assets'); ?>/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
<!-- Datatables -->
<link href="<?= base_url('assets'); ?>/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">
<link href="<?= base_url('assets'); ?>/vendors/nprogress/nprogress.css" rel="stylesheet">
<!-- bootstrap-progressbar -->
<link href="<?= base_url('assets'); ?>/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
<!-- bootstrap-daterangepicker -->
<link href="<?= base_url('assets'); ?>/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
<!-- bootstrap-datetimepicker -->
<link href="<?= base_url('assets'); ?>/vendors/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
<!-- bootstrap-wysiwyg -->
<link href="<?= base_url('assets'); ?>/vendors/google-code-prettify/bin/prettify.min.css" rel="stylesheet">
<!-- Select2 -->
<link href="<?= base_url('assets'); ?>/vendors/select2/dist/css/select2.min.css" rel="stylesheet">
<!-- Switchery -->
<link href="<?= base_url('assets'); ?>/vendors/switchery/dist/switchery.min.css" rel="stylesheet">
<!-- starrr -->
<link href="<?= base_url('assets'); ?>/vendors/starrr/dist/starrr.css" rel="stylesheet">
<!-- Custom Theme Style -->
<link href="<?= base_url('assets'); ?>/build/css/custom.min.css" rel="stylesheet">
</head>
<body class="footer_fixed nav-md">

View File

@ -0,0 +1,42 @@
<div class="container body">
<div class="main_container">
<div class="col-md-3 left_col">
<div class="left_col scroll-view">
<div class="navbar nav_title" style="border: 0;">
<a href="<?= base_url(); ?>" class="site_title"><i class="fa fa-windows"></i> <span>Sistem
Bayes</span></a>
</div>
<div class="clearfix"></div>
<!-- QUERY MENU -->
<?php $role_id = $this->session->userdata('role_id');
$queryMenu = "SELECT `menu_user`.`id`, `menu` FROM `menu_user` JOIN `akses_menu_user` ON `menu_user`.`id` = `akses_menu_user`.`id_menu` WHERE `akses_menu_user`.`role_id` = $role_id ORDER BY `akses_menu_user`.`id_menu` ASC";
$menu = $this->db->query($queryMenu)->result_array();?>
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
<div class="menu_section">
<!-- LOOPING MENU -->
<?php foreach ($menu as $m) : ?>
<hr style="border-top: 1px solid gray;">
<h3><?= $m['menu']; ?></h3>
<!-- SIAPKAN SUB-MENU SESUAI MENU -->
<?php
$idMenu = $m['id'];
$querySubMenu = "SELECT * FROM `sub_menu_user` JOIN `menu_user` ON `sub_menu_user`.`id_menu` = `menu_user`.`id` WHERE `sub_menu_user`.`id_menu` = $idMenu ";
$subMenu = $this->db->query($querySubMenu)->result_array();
?>
<?php foreach ($subMenu as $sm) : ?>
<ul class="nav side-menu">
<li><a href="<?= base_url($sm['url']); ?>"><i
class="<?= $sm['icon']; ?>"></i><?= $sm['judul']; ?></a></li>
</ul>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
<!-- /sidebar menu -->
</div>
</div>

View File

@ -0,0 +1,25 @@
<!-- top navigation -->
<div class="top_nav">
<div class="nav_menu">
<nav>
<div class="nav toggle">
<a id="menu_toggle"><i class="fa fa-bars"></i></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="">
<a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="<?= base_url('assets/images/') . $user['image'] ?>"><?= $user['name']; ?>
<span class=" fa fa-angle-down"></span>
</a>
<ul class="dropdown-menu dropdown-usermenu pull-right">
<li><a class="tombol-logout" href="<?= base_url('auth/logout'); ?>"><i class="fa fa-sign-out pull-right"></i> Logout</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
<!-- /top navigation -->

View File

@ -0,0 +1,75 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-list-alt"></i> Daftar Konsultasi</h3>
</div>
<div class="title_right">
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_content">
<table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
<thead>
<tr>
<th width="5%">No</th>
<th>Tanggal</th>
<th>Username</th>
<th>Penyakit</th>
<th>Nilai</th>
<th width="15%">Aksi</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach ($dftr_konsul as $konsul) : ?>
<tr>
<td><?= $i; ?></td>
<td><?= (new DateTime($konsul['tanggal']))->format('d F Y'); ?></td>
<td><?= $konsul['name']; ?></td>
<td><?= $konsul['nama_penyakit']; ?></td>
<td><?= $konsul['nilai']; ?>%</td>
<td style="text-align: center">
<script>
$(".tombol-hapus").on("click", function(e) {
e.preventDefault();
const href = $(this).attr("href");
Swal({
title: "Apakah anda yakin",
text: "data ini akan dihapus",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Hapus Data!"
}).then(result => {
if (result.value) {
document.location.href = href;
}
});
});
</script>
<!-- <php foreach ($daftar as $df) : ?> -->
<a href="<?= base_url('user/hapusKonsultasi/') . $konsul['id']; ?>" class="btn btn-danger"><i class="fa fa-fw fa-trash"></i> Hapus</a>
<!-- <php endforeach; ?> -->
</td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,90 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-pencil"></i> Edit Profile</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="clearfix"></div>
<div class="x_content">
<?= form_open_multipart('user/edit'); ?>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="email" name="email"
value="<?= $user['email']; ?>" readonly>
<span class="fa fa-envelope form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="name" name="name"
value="<?= $user['name']; ?>">
<span class="fa fa-user form-control-feedback left" aria-hidden="true"></span>
<?= form_error('name', '<small class="text-danger pl-3">', '</small>'); ?>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="berat_badan"
name="berat_badan" placeholder="Berat Badan (kg)" value="<?= $user['berat_badan']; ?>">
<span class="fa fa-balance-scale form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="tinggi_badan"
name="tinggi_badan" placeholder="Tinggi Badan (cm)"
value="<?= $user['tinggi_badan']; ?>">
<span class="fa fa-arrows-v form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="lingkar_kepala"
name="lingkar_kepala" placeholder="Lingkar Kepala (cm)"
value="<?= $user['lingkar_kepala']; ?>">
<span class="fa fa-circle-o form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="text" class="form-control has-feedback-left" id="lingkar-lengan-atas"
name="lingkar_lengan_atas" placeholder="Lingkar Lengan Atas (cm)"
value="<?= $user['lingkar_lengan_atas']; ?>">
<span class="fa fa-child form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="form-group">
<div class="col-sm-2" style="margin-bottom: 10px;">
<img src="<?= base_url('assets/images/') . $user['image']; ?>" class="img-thumbnail">
</div>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-primary">Pilih foto</button>
</span>
<input type="file" class="form-control" id="image" name="image">
</div>
<div style="margin-bottom: 55px; margin-top: 85px;">
<button type="submit" class="btn btn-success tombol-submit">Submit</button>
<button class="btn btn-warning" type="reset">Reset</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,38 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-user"></i> Profile</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="clearfix"></div>
<div class="card mb-3" style="max-width: 640px;">
<div class="row no-gutters">
<div class="col-md-4">
<img src="<?= base_url('assets/images/') . $user['image'] ?>" class="img-thumbnail">
</div>
<div class="col-md-8" style="padding-top: 30px;">
<div class="card-body">
<h5 class="card-title"><?= $user['name']; ?></h5>
<p class="card-text"><?= $user['email']; ?></p>
<p class="card-text"><small class="text-muted">Terdaftar sejak
<?= (new DateTime($user['date_created']))->format('d F Y'); ?></small></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -0,0 +1,49 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3><i class="fa fa-fw fa-key"></i> Ubah Password</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<?= $this->session->flashdata('message'); ?>
<div class="clearfix"></div>
<div class="x_content">
<form class="form-horizontal form-label-left input_mask" action="<?= base_url('user/ubahPassword'); ?>" method="POST">
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="password" class="form-control has-feedback-left" id="current_password" name="current_password" placeholder="Password lama">
<?= form_error('current_password', '<small class="text-danger pl-3">', '</small>'); ?>
<span class="fa fa-key form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="password" class="form-control has-feedback-left" id="new_password1" name="new_password1" placeholder="Password baru">
<span class="fa fa-lock form-control-feedback left" aria-hidden="true"></span>
<?= form_error('new_password1', '<small class="text-danger pl-3">', '</small>'); ?>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-12 form-group has-feedback">
<input type="password" class="form-control has-feedback-left" id="new_password2" name="new_password2" placeholder="Konfirmasi password baru">
<span class="fa fa-unlock form-control-feedback left" aria-hidden="true"></span>
<?= form_error('new_password2', '<small class="text-danger pl-3">', '</small>'); ?>
</div>
<div class="clearfix"></div>
<div class="col-md-6 col-sm-6 col-xs-6">
<button class="btn btn-warning" type="reset">Reset</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

4255
assets/build/css/custom.css Normal file

File diff suppressed because it is too large Load Diff

7
assets/build/css/custom.min.css vendored Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More