pertama commit

This commit is contained in:
dyzulk
2023-09-21 23:32:36 +07:00
commit 01bbf11bbd
300 changed files with 73812 additions and 0 deletions

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('session','database','email');
/*
| -------------------------------------------------------------------
| 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');
/*
| -------------------------------------------------------------------
| 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,564 @@
<?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 to guess the protocol and
| path to 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'] = 'https://ci.is/';
$sname = $_SERVER['SERVER_NAME'];
$saddr = $_SERVER['SERVER_ADDR'];
$sport = $_SERVER['SERVER_PORT'];
// $config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'];
// Memeriksa alamat server dan mengatur $config['base_url'] sesuai dengan kondisi
if ($sname === '192.168.100.51') {
if ($_SERVER['SERVER_PORT'] == 80) {
$config['base_url'] = 'http://'.$sname.'/ci/';
} else {
$config['base_url'] = 'https://'.$$sname.'/ci/';
}
}elseif ($sname === 'localhost') {
$config['base_url'] = 'https://localhost/ci/';
} elseif ($sname === 'ci.is') {
// Default base URL jika alamat server tidak cocok dengan yang diharapkan
if ($sport == 80) {
$config['base_url'] = 'http://ci.is/';
} else {
$config['base_url'] = 'https://ci.is/';
}
} else {
// Default base URL jika alamat server tidak cocok dengan yang diharapkan
if ($sport == 80) {
$config['base_url'] = 'http://'.$saddr.'/ci/';
} else {
$config['base_url'] = 'https://'.$saddr.'/ci/';
}
}
/*
|--------------------------------------------------------------------------
| 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/userguide3/general/urls.html
|
| Note: This option is ignored for CLI requests.
*/
$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/userguide3/general/core_classes.html
| https://codeigniter.com/userguide3/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/userguide3/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_samesite'
|
| Session cookie SameSite attribute: Lax (default), Strict or None
|
| '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_samesite'] = 'Lax';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$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)
| 'cookie_samesite' = Cookie's samesite attribute (Lax, Strict or None)
|
| 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;
$config['cookie_samesite'] = 'Lax';
/*
|--------------------------------------------------------------------------
| 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' => 'ci',
'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/userguide3/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/userguide3/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,186 @@
<?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',
'heic' => 'image/heic',
'heif' => 'image/heif',
'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', 'image/svg', '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/userguide3/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/userguide3/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'] = 'welcome';
$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/userguide3/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,222 @@
<?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',
'huawei' => 'Huawei',
'xiaomi' => 'Xiaomi',
'oppo' => 'Oppo',
'vivo' => 'Vivo',
'infinix' => 'Infinix',
// 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',
'UptimeRobot' => 'UptimeRobot'
);

View File

@@ -0,0 +1,407 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Auth extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('form_validation');
$this->load->model('AuthModel');
$this->form_validation->set_error_delimiters('<small class="form-text text-danger">* ', '</small>');
$this->form_validation->set_message('required', 'Kolom {field} harus diisi');
$this->form_validation->set_message('numeric', 'Isi kolom {field} dengan angka (0-9)');
$this->form_validation->set_message('min_length', 'Kolom {field} minimal {param} digit');
$this->form_validation->set_message('max_length', 'Kolom {field} maksimal {param} digit');
$this->form_validation->set_message('is_unique', '%s ini sudah ada');
$this->form_validation->set_message('matches', 'Kolom {field} harus sama dengan kolom {param}');
}
private function template($page, $data = null) {
$this->load->view($page, $data);
}
public function index() {
if($this->session->userdata('email')){
redirect('dashboard');
}
$data['title'] = 'Login Page';
$this->form_validation->set_rules('email', 'email', 'required|trim');
$this->form_validation->set_rules('password', 'Password', 'required|trim');
if ($this->form_validation->run() == false) {
$this->template('auth/login', $data);
} else {
$this->_login();
}
}
public function login() {
if($this->session->userdata('email')){
redirect('dashboard');
}
$data['title'] = 'Login Page';
$this->form_validation->set_rules('email', 'email', 'required|trim');
$this->form_validation->set_rules('password', 'Password', 'required|trim');
if ($this->form_validation->run() == false) {
$this->template('auth/login', $data);
} else {
$this->_login();
}
}
private function _login(){
$email = $this->input->post('email');
$password = $this->input->post('password');
$user = $this->db->get_where('users_account', ['email' => $email])->row_array();
// Jika usernya ada.
if ($user) {
// JIka user nya aktif.
if ($user['is_active'] == 1) {
# Cek Password
if (password_verify($password, $user['password'])) {
$session = array(
'user_id' => $user['id'],
'email' => $user['email'],
'role_id' => $user['role_id'],
'status_login' => 'online'
);
$this->AuthModel->updateStatusOnline($session['user_id']);
$this->session->set_userdata($session);
redirect('dashboard');
} else {
$this->session->set_flashdata('message', '<div class="alert alert-warning text-white" role="alert"><strong>Password</strong> anda salah!</span></div>');
redirect('auth/login');
}
} else {
$this->session->set_flashdata('message', '<div class="alert alert-warning text-white" role="alert"><strong>Akun</strong> anda belum aktif. Silahkan hubungi admin!</span></div>');
redirect('auth/login');
}
} else {
$this->session->set_flashdata('message', '<div class="alert alert-warning text-white" role="alert"><strong>Akun</strong> anda belum terdaftar. Silahkan daftarkan akun!</span></div>');
redirect('auth/login');
}
}
public function signup() {
if($this->session->userdata('email')){
redirect('welcome');
}
$data['title'] = 'Daftar';
$this->form_validation->set_rules('nama', 'Nama', 'required|trim');
$this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email|is_unique[users_account.email]',[
'is_unique' => 'email sudah terdaftar!'
]);
$this->form_validation->set_rules('password1', 'Password', 'required|trim|min_length[3]', [
'matches' => 'Password tidak sama!',
'min_length' => 'Password terlalu pendek!'
]);
$this->form_validation->set_rules('password2', 'Password', 'required|trim|matches[password1]');
if ($this->form_validation->run() == false){
$this->load->view('auth/signup', $data);
} else {
$date = date('ymd');
$time = date('His');
$id = "ID".$date."-".rand(100,999);
$nama = $this->input->post('nama', true);
$email = $this->input->post('email', true);
$password = $this->input->post('password1');
$data = [
'id' => $id,
'nama' => htmlspecialchars($nama),
'email' => htmlspecialchars($email),
'password' => password_hash($password, PASSWORD_DEFAULT),
'image' => 'user.png',
'role_id' => 3,
'is_active' => 0,
'date_created' => time()
];
$token = base64_encode(random_bytes(32));
$user_token = [
'id_user' => $id,
'email' => $email,
'token' => $token,
'date_created' => time()
];
$this->db->insert('user_token', $user_token);
$this->db->insert('users_account', $data);
$this->_sendEmail($token, 'verify');
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert"><strong>Selamat!</strong> Akun anda berhasil dibuat. Silahkan aktivasi akun!</span></div>');
redirect('auth/login');
}
}
private function _sendEmail($token, $type){
$config = [
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
// 'smtp_user' => 'aku@dyzulk.com',
// 'smtp_pass' => '@Synthesis1996',
'smtp_user' => 'dyzulk04@gmail.com',
'smtp_pass' => 'qhfiugstswaehokp',
'smtp_port' => 465,
'smtp_timeout' => '7',
'mailtype' => 'html',
'charset' => 'utf-8',
'newline' => "\r\n",
];
$this->load->library('email', $config);
$this->email->initialize($config);
$this->email->from('dyzulksolution@dyzulk.com', 'CI App');
if ($type == 'verify'){
$email = $this->input->post('email');
$token_ok = urlencode($token);
$data['link'] = base_url().'auth/verify?email='.$email.'&token='.$token_ok;
$this->email -> to($this->input->post('email'));
$this->email -> subject('Account Verification Dyzulk DeveloperX');
$this->email -> message($this->load->view('email/activation', $data, true));
} else if ($type == 'forgot') {
$email = $this->session->userdata('reset_password');
$token_ok = urlencode($token);
$data['link'] = base_url().'auth/resetpassword?email='.$email.'&token='.$token_ok;
$data['email'] = $email;
$this->email -> to($email);
$this->email -> subject('Reset Password Dyzulk DeveloperX');
$this->email -> message($this->load->view('email/password', $data, true));
}
if($this->email->send()){
return true;
} else {
echo $this->email->print_debugger();
die;
}
}
public function verify(){
$data['title'] = 'Verify Account';
$email = $this->input->get('email');
$token = $this->input->get('token');
$user = $this->db->get_where('users_account', ['email' => $email])->row_array();
if($user){
$user_token = $this->db->get_where('user_token', ['token' => $token])->row_array();
if($user_token){
if(time() - $user_token['date_created'] < (60*60*24)){
$this->db->set('is_active', 1);
$this->db->where('email', $email);
$this->db->update('users_account');
$this->db->delete('user_token', ['email' => $email]);
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert"><strong>'.$email.'</strong> berhasil diaktifkan! Silahkan login!</span></div>');
redirect('auth/login');
} else {
$this->db->delete('users_account', ['email' => $email]);
$this->db->delete('user_token', ['email' => $email]);
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Account activation failed! Token expired!</span></div>');
redirect('auth/login');
}
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Account activation failed! Wrong Token!</span></div>');
redirect('auth/login');
}
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Account activation failed! Wrong Email!</span></div>');
redirect('auth/login');
}
}
public function logout(){
$data['title'] = 'Logout';
$this->AuthModel->updateStatusOffline($this->session->userdata('user_id'));
$this->session->sess_destroy();
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert"><strong>Anda</strong> berhasil logout!</span></div>');
redirect('auth/login');
}
public function blocked(){
// $this->load->view('utility/blocked');
$this->load->view('utility/access_denied');
}
public function forgotPassword(){
$this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email');
$data['title'] = 'Forgot Password';
if ($this->form_validation->run() == false) {
$this->template('auth/forgotpassword', $data);
} else {
$email = $this->input->post('email');
$user = $this->db->get_where('users_account', ['email' => $this->input->post('email'), 'is_active' => 1])->row_array();
if($user){
$id = $user['id'];
$email = $user['email'];
$token = base64_encode(random_bytes(32));
$this->session->set_userdata('reset_password', $email);
$user_token = [
'id_user' => $id,
'email' => $email,
'token' => $token,
'date_created' => time()
];
$this->db->insert('user_token', $user_token);
$this->_sendEmail($token, 'forgot', $email);
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert"><strong>Silahkan</strong> cek email anda untuk reset password!</span></div>');
redirect('auth/forgotpassword');
} else {
$this->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Email is not registered or activated!</span></div>');
redirect('auth/forgotpassword');
}
}
}
public function resetPassword(){
$email = $this->input->get('email');
$token = $this->input->get('token');
$user = $this->db->get_where('users_account', ['email' => $email])->row_array();
if($user) {
$user_token = $this->db->get_where('user_token', ['token' => $token])->row_array();
if($user_token) {
$this->session->set_userdata('reset_password', $email);
$this->changePassword();
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Reset password failed! Wrong Token!</span></div>');
redirect('auth/login');
}
} else {
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Reset password failed! Wrong Email!</span></div>');
redirect('auth/login');
}
}
public function changePassword(){
if(!$this->session->userdata('reset_password')){
redirect('auth/login');
}
$data['title'] = 'Change Password';
$this->form_validation->set_rules('password1', 'Password', 'required|trim|min_length[3]');
$this->form_validation->set_rules('password2', 'Password', 'required|trim|min_length[3]|matches[password1]');
if($this->form_validation->run() == false){
$this->template('auth/change-password', $data);
} else {
$password = password_hash($this->input->post('password1'), PASSWORD_DEFAULT);
$email = $this->session->userdata('reset_password');
$this->db->set('password', $password);
$this->db->where('email', $email);
$this->db->update('users_account');
$this->session->unset_userdata('reset_password');
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert"><strong>Password</strong> berhasil diubah! Silahkan login!</span></div>');
redirect('auth/login');
}
}
}

View File

@@ -0,0 +1,18 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Cards extends CI_Controller {
public function index()
{
$data['title'] = 'Cards';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$this->load->view('partials/01header', $data);
$this->load->view('cards', $data);
}
}

View File

@@ -0,0 +1,40 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->library('session');
// Memeriksa status login pengguna
if (!$this->session->userdata('email')) {
// Jika pengguna belum login, alihkan ke halaman login atau tindakan lainnya
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Silahkan login terlebih dahulu !</div>');
redirect('auth');
}
}
public function index()
{
$this->load->model('UserModel');
$data['total_users'] = $this->UserModel->getTotalUsers();
$data['total_amount'] = $this->UserModel->getTotalAmount();
$data['total_online_users'] = $this->UserModel->getTotalOnlineUsers();
$data['users'] = $this->UserModel->getUsers();
$data['title'] = 'Dashboard';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$this->load->view('partials/01header', $data);
$this->load->view('Dashboard', $data);
}
}

View File

@@ -0,0 +1,18 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Forms extends CI_Controller {
public function index()
{
$data['title'] = 'Forms';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$this->load->view('partials/01header', $data);
$this->load->view('forms', $data);
}
}

View File

@@ -0,0 +1,109 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Test extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('Transaction_model');
}
public function index()
{
echo "======================== array get_data() ========================"."<br><br>";
$this->get_data();
echo "<br><br>"."======================== terjemah time() ========================"."<br><br>";
$this->time();
echo "<br><br>"."======================== totalTransaction() ========================"."<br><br>";
$this->totalTransaction();
echo "<br><br>"."======================== transaction() ========================"."<br><br>";
$this->transaction();
echo "<br><br>"."======================== session ========================"."<br><br>";
print_r($this->session->userdata());
}
private function get_data(){
$query = $this->db->get('users_account'); // Ambil data dari tabel 'users_account'
if ($query->num_rows() > 0) {
$result = $query->result_array(); // Konversi hasil kueri menjadi array
// Sekarang $result berisi data dari tabel users_account dalam bentuk array
echo "<pre>"; // Tampilkan dengan format preformatted agar lebih rapih
print_r($result); // Menampilkan data sebagai array
echo "</pre>";
} else {
echo "Tidak ada data ditemukan.";
}
}
private function time(){
$timestamp = 1694737797;
$waktu_kalendar = date("Y-m-d H:i:s", $timestamp);
$tgl_lahir = date("Y-m-d");
$time = time();
echo "Timestamp\t:" . $timestamp ."\t\t=\t" . "Converted\t:".$waktu_kalendar;
echo "<br>";
echo "Tgl_Lahir\t:".$tgl_lahir;
echo "<br>";
echo "time()\t:".$time;
}
private function totalTransaction(){
$data = $this->db->get('user_total_transaction')->result_array();
echo "<pre>";
print_r($data);
echo "</pre>";
}
private function transaction(){
$data = $this->Transaction_model->getTransactions();
echo "<pre>";
print_r($data);
echo "</pre>";
}
public function aktivasi(){
$email = 'dyzulkdeveloper@gmail.com';
$token = base64_encode(random_bytes(32));
$data['title'] = 'Aktivasi';
$data['link'] = base_url().'auth/verify?email='.$email.'&token='.urlencode($token);
$this->load->view('email/activation', $data);
}
public function password(){
$email = 'dyzulkdeveloper@gmail.com';
$token = base64_encode(random_bytes(32));
$data['title'] = 'Password';
$data['email'] = $email;
$data['link'] = base_url().'auth/resetpassword?email='.$email.'&token='.$token;
$this->load->view('email/password', $data);
}
}

View File

@@ -0,0 +1,156 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Transaksi extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->library('form_validation');
$this->load->model('Transaction_model');
// Memeriksa status login pengguna
if (!$this->session->userdata('email')) {
// Jika pengguna belum login, alihkan ke halaman login atau tindakan lainnya
$this->session->set_flashdata('message', '<div class="alert alert-danger text-white" role="alert">Silahkan login terlebih dahulu !</div>');
redirect('auth');
}
}
private function template($page, $data = null) {
$this->load->view('partials/01header', $data);
$this->load->view($page, $data);
}
public function index()
{
$data['title'] = 'Transaksi';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$data['total'] = $this->totalTransaction();
$this->template('transaction/view', $data);
}
public function admin()
{
$data['title'] = 'Transaction for Admin';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$data['users'] = $this->db->get('users_account')->result_array();
$data['transData'] = $this->Transaction_model->getTransactions();
$this->template('transaction/admin', $data);
}
public function addData(){
$this->_addData();
}
private function _addData(){
$id_user = $this->input->post('id');
$db = $this->db->get_where('users_account', ['id' => $id_user])->row_array();
$id = 'IT-'.date('ymd').rand(100, 999); // 'IT-20210914_1234
$nama = $db['nama'];
$email = $db['email'];
$amount = $this->input->post('amount');
$time = time();
$data = [
'id' => $id,
'categori_id' => 'K-000001',
'user_id' => $id_user,
'user_email' => $email,
'amount' => $amount,
'time_transaction' => $time
];
$this->db->insert('user_transaction', $data);
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert">Data berhasil ditambahkan !</div>');
redirect('transaksi/admin');
print_r($data);
}
public function editData(){
$data['title'] = 'Edit User';
$data['user'] = $this->db->get_where('users_account', ['email' => $this->session->userdata('email')])->row_array();
$id = $this->input->get('id');
$data['userEdit'] = $this->db->query("SELECT * FROM user_transaction WHERE id='$id'")->result();
$data['transData'] = $this->Transaction_model->getTransactionById($id);
$this->template('transaction/edit', $data);
}
public function updateData(){
$id = $this->input->post('id');
$amount = $this->input->post('amount');
$time = time();
$data = array(
'amount' => $amount,
'other' => $time
);
$this->db->where('id', $id);
$this->db->set($data);
$this->db->update('user_transaction');
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert">Data berhasil diubah !</div>');
redirect('transaksi/admin');
}
public function deleteData(){
$id = $this->input->get('id');
$where = array('id' => $id);
$this->db->delete('user_transaction', $where);
$this->session->set_flashdata('message', '<div class="alert alert-success text-white" role="alert">Data berhasil dihapus !</div>');
redirect('transaksi/admin');
}
private function transData(){
$data = $this->db->get('user_transaction')->result_array();
return $data;
}
private function totalTransaction(){
$data = $this->db->get('user_total_transaction')->result_array();
return $data;
}
}

View File

@@ -0,0 +1,25 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/userguide3/general/urls.html
*/
public function index()
{
$this->load->view('welcome_message');
}
}

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>

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,30 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class AuthModel extends CI_Model
{
public function cekUsername($username) {
return $this->db->get_where('user', ['username' => $username])->row_array();
}
public function getMaxId($table, $field, $prefix) {
$this->db->select_max($field);
$this->db->like($field, $prefix, 'after');
return $this->db->get($table)->row_array()[$field];
}
public function updateStatusOnline($user_id) {
$data = array('status_login' => 'online');
$this->db->where('id', $user_id);
$this->db->update('users_account', $data);
}
public function updateStatusOffline($user_id) {
$data = array('status_login' => 'offline');
$this->db->where('id', $user_id);
$this->db->update('users_account', $data);
}
}

View File

@@ -0,0 +1,24 @@
<?php
class Transaction_model extends CI_Model {
public function __construct() {
parent::__construct();
}
// Fungsi untuk mengambil data transaksi dengan join ke tabel users_account
public function getTransactions() {
$this->db->select('user_transaction.*, users_account.nama, users_account.email, users_account.image');
$this->db->from('user_transaction');
$this->db->join('users_account', 'user_transaction.user_email = users_account.email', 'left');
$this->db->order_by('user_transaction.time_transaction', 'DESC');
return $this->db->get()->result_array();
}
public function getTransactionById($id) {
$this->db->select('user_transaction.*, users_account.nama, users_account.email, users_account.image');
$this->db->from('user_transaction');
$this->db->join('users_account', 'user_transaction.user_email = users_account.email', 'left');
$this->db->where('user_transaction.id', $id);
return $this->db->get()->row_array();
}
}

View File

@@ -0,0 +1,29 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class UserModel extends CI_Model
{
public function getUsers(){
$query = $this->db->get('users_account');
return $query->result_array();
}
public function getTotalUsers() {
$query = $this->db->query("SELECT COUNT(*) AS total_users FROM users_account");
return $query->row()->total_users;
}
public function getTotalAmount() {
$query = $this->db->query("SELECT SUM(amount) AS total_amount FROM user_transaction");
return $query->row()->total_amount;
}
public function getTotalOnlineUsers() {
$this->db->select('COUNT(*) as total_online_users');
$this->db->where('status_login', 'online');
$query = $this->db->get('users_account');
return $query->row()->total_online_users;
}
}

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>

302
application/views/Forms.php Normal file
View File

@@ -0,0 +1,302 @@
<main class="h-full pb-16 overflow-y-auto">
<div class="container px-6 mx-auto grid">
<h2
class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
>
Forms
</h2>
<!-- CTA -->
<a
class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
href="https://github.com/estevanmaito/windmill-dashboard"
>
<div class="flex items-center">
<svg
class="w-5 h-5 mr-2"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
></path>
</svg>
<span>Star this project on GitHub</span>
</div>
<span>View more &RightArrow;</span>
</a>
<!-- General elements -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Elements
</h4>
<div
class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
>
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Name</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
</label>
<div class="mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Account Type
</span>
<div class="mt-2">
<label
class="inline-flex items-center text-gray-600 dark:text-gray-400"
>
<input
type="radio"
class="text-purple-600 form-radio focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
name="accountType"
value="personal"
/>
<span class="ml-2">Personal</span>
</label>
<label
class="inline-flex items-center ml-6 text-gray-600 dark:text-gray-400"
>
<input
type="radio"
class="text-purple-600 form-radio focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
name="accountType"
value="busines"
/>
<span class="ml-2">Business</span>
</label>
</div>
</div>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Requested Limit
</span>
<select
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
>
<option>$1,000</option>
<option>$5,000</option>
<option>$10,000</option>
<option>$25,000</option>
</select>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Multiselect
</span>
<select
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-multiselect focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
multiple
>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
<option>Option 5</option>
</select>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Message</span>
<textarea
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
rows="3"
placeholder="Enter some long form content."
></textarea>
</label>
<div class="flex mt-6 text-sm">
<label class="flex items-center dark:text-gray-400">
<input
type="checkbox"
class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
/>
<span class="ml-2">
I agree to the
<span class="underline">privacy policy</span>
</span>
</label>
</div>
</div>
<!-- Validation inputs -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Validation
</h4>
<div
class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
>
<!-- Invalid input -->
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">
Invalid input
</span>
<input
class="block w-full mt-1 text-sm border-red-600 dark:text-gray-300 dark:bg-gray-700 focus:border-red-400 focus:outline-none focus:shadow-outline-red form-input"
placeholder="Jane Doe"
/>
<span class="text-xs text-red-600 dark:text-red-400">
Your password is too short.
</span>
</label>
<!-- Valid input -->
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Valid input
</span>
<input
class="block w-full mt-1 text-sm border-green-600 dark:text-gray-300 dark:bg-gray-700 focus:border-green-400 focus:outline-none focus:shadow-outline-green form-input"
placeholder="Jane Doe"
/>
<span class="text-xs text-green-600 dark:text-green-400">
Your password is strong.
</span>
</label>
<!-- Helper text -->
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Helper text
</span>
<input
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
<span class="text-xs text-gray-600 dark:text-gray-400">
Your password must be at least 6 characters long.
</span>
</label>
</div>
<!-- Inputs with icons -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Icons
</h4>
<div
class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
>
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Icon left</span>
<!-- focus-within sets the color for the icon when input is focused -->
<div
class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400"
>
<input
class="block w-full pl-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
<div
class="absolute inset-y-0 flex items-center ml-3 pointer-events-none"
>
<svg
class="w-5 h-5"
aria-hidden="true"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
></path>
</svg>
</div>
</div>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Icon right</span>
<!-- focus-within sets the color for the icon when input is focused -->
<div
class="relative text-gray-500 focus-within:text-purple-600 dark:focus-within:text-purple-400"
>
<input
class="block w-full pr-10 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
<div
class="absolute inset-y-0 right-0 flex items-center mr-3 pointer-events-none"
>
<svg
class="w-5 h-5"
aria-hidden="true"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
></path>
</svg>
</div>
</div>
</label>
</div>
<!-- Inputs with buttons -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Buttons
</h4>
<div
class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
>
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">
Button left
</span>
<div class="relative">
<input
class="block w-full pl-20 mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
<button
class="absolute inset-y-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-l-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
>
Click
</button>
</div>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Button right
</span>
<div
class="relative text-gray-500 focus-within:text-purple-600"
>
<input
class="block w-full pr-20 mt-1 text-sm text-black dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
/>
<button
class="absolute inset-y-0 right-0 px-4 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-r-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
>
Click
</button>
</div>
</label>
</div>
</div>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html :class="{ 'theme-dark': dark }" x-data="data()" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://dyzulk.me/dist/img/favicon.png" rel="icon" sizes=”32×32″ type="image/png">
<title><?=$title;?> - App Dashboard</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="<?=base_url();?>src/css/tailwind.output.css" />
<script
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
<script src="<?=base_url();?>src/js/init-alpine.js"></script>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/css/all.min.css">
<script src="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/js/pro.min.js"></script>
</head>
<body>
<div class="flex items-center min-h-screen p-6 bg-gray-50 dark:bg-gray-900">
<div
class="flex-1 h-full max-w-4xl mx-auto overflow-hidden bg-white rounded-lg shadow-xl dark:bg-gray-800"
>
<div class="flex flex-col overflow-y-auto md:flex-row">
<div class="h-32 md:h-auto md:w-1/2">
<img
aria-hidden="true"
class="object-cover w-full h-full dark:hidden"
src="<?=base_url();?>src/img/login-office.jpeg"
alt="Office"
/>
<img
aria-hidden="true"
class="hidden object-cover w-full h-full dark:block"
src="<?=base_url();?>src/img/login-office-dark.jpeg"
alt="Office"
/>
</div>
<div class="flex items-center justify-center p-6 sm:p-12 md:w-1/2">
<div class="w-full">
<h1
class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200"
>
Change Password
</h1>
<form action="<?=base_url('auth/changepassword');?>" method="post">
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">New Password</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Enter new password" name="password1" value="<?=set_value('password1');?>"
type="password"
/>
<?= form_error('password1', '<p><small class="text-danger text-xs"><strong>', '</strong></small></p>'); ?>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Confirm New Password</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Enter new password again" name="password2"
type="password"
/>
<?= form_error('password2', '<p><small class="text-danger text-xs"><strong>', '</strong></small></p>'); ?>
</label>
<!-- You should use a button here, as the anchor is only used for the example -->
<button
type="submit" class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
>
Change Password
</button>
</form>
<hr class="my-8" />
<div class="mb-0"><?= $this->session->flashdata('message'); ?></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<!DOCTYPE html>
<html :class="{ 'theme-dark': dark }" x-data="data()" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://dyzulk.me/dist/img/favicon.png" rel="icon" sizes=”32×32″ type="image/png">
<title><?=$title;?> - App Dashboard</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="<?=base_url();?>src/css/tailwind.output.css" />
<script
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
<script src="<?=base_url();?>src/js/init-alpine.js"></script>
</head>
<body>
<div class="flex items-center min-h-screen p-6 bg-gray-50 dark:bg-gray-900">
<div
class="flex-1 h-full max-w-4xl mx-auto overflow-hidden bg-white rounded-lg shadow-xl dark:bg-gray-800"
>
<div class="flex flex-col overflow-y-auto md:flex-row">
<div class="h-32 md:h-auto md:w-1/2">
<img
aria-hidden="true"
class="object-cover w-full h-full dark:hidden"
src="<?=base_url();?>src/img/forgot-password-office.jpeg"
alt="Office"
/>
<img
aria-hidden="true"
class="hidden object-cover w-full h-full dark:block"
src="<?=base_url();?>src/img/forgot-password-office-dark.jpeg"
alt="Office"
/>
</div>
<div class="flex items-center justify-center p-6 sm:p-12 md:w-1/2">
<div class="w-full">
<h1
class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200"
>
Forgot password
</h1>
<form action="<?=base_url('auth/forgotpassword');?>" method="post">
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Email</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="your@mail.com" name="email" value="<?=set_value('email');?>"
type="email"
/>
</label>
<!-- You should use a button here, as the anchor is only used for the example -->
<button
class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
type="submit"
>
Recover password
</button>
</form>
<div class="mb-0"><?= $this->session->flashdata('message'); ?></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html :class="{ 'theme-dark': dark }" x-data="data()" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://dyzulk.me/dist/img/favicon.png" rel="icon" sizes=”32×32″ type="image/png">
<title>Login - App Dashboard</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet" />
<link rel="stylesheet" href="<?=base_url();?>src/css/tailwind.output.css" />
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
<script src="<?=base_url();?>src/js/init-alpine.js"></script>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/css/all.min.css">
<script src="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/js/pro.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<div class="flex items-center min-h-screen p-6 bg-gray-50 dark:bg-gray-900">
<div class="flex-1 h-full max-w-4xl mx-auto overflow-hidden bg-white rounded-lg shadow-xl dark:bg-gray-800">
<div class="flex flex-col overflow-y-auto md:flex-row">
<div class="h-32 md:h-auto md:w-1/2">
<img aria-hidden="true" class="object-cover w-full h-full dark:hidden"
src="<?=base_url();?>src/img/login-office.jpeg" alt="Office" />
<img aria-hidden="true" class="hidden object-cover w-full h-full dark:block"
src="<?=base_url();?>src/img/login-office-dark.jpeg" alt="Office" />
</div>
<div class="flex items-center justify-center p-6 sm:p-12 md:w-1/2">
<div class="w-full">
<h1 class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200">
Login
</h1>
<form action="<?=base_url('auth');?>" method="post">
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Email</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="your@mail.com" name="email" value="<?=set_value('email');?>" />
<?= form_error('email', '<p><small style="color: #DE5154;"><strong>', '</strong></small></p>'); ?>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Password</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Password" name="password" type="password" />
<?= form_error('password', '<p><small style="color: #DE5154;"><strong>', '</strong></small></p>'); ?>
</label>
<!-- You should use a button here, as the anchor is only used for the example -->
<button type="submit"
class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
Log in
</button>
</form>
<div style="margin-top: 9px"><?= $this->session->flashdata('message'); ?></div>
<hr class="my-8" />
<button
class="flex items-center justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray">
<i class="fab fa-google mr-2"></i>
With Google
</button>
<p class="mt-4">
<a class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline"
href="<?=base_url('auth/forgotpassword');?>">
Forgot your password?
</a>
</p>
<p class="mt-1">
<a class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline"
href="<?=base_url('auth/signup');?>">
Create account
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html :class="{ 'theme-dark': dark }" x-data="data()" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://dyzulk.me/dist/img/favicon.png" rel="icon" sizes=”32×32″ type="image/png">
<title>Create account - Windmill Dashboard</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="<?=base_url();?>src/css/tailwind.output.css" />
<script
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
<script src="<?=base_url();?>src/js/init-alpine.js"></script>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/css/all.min.css">
<script src="https://cdn.jsdelivr.net/gh/dyzcdn/fas@main/js/pro.min.js"></script>
</head>
<body>
<div class="flex items-center min-h-screen p-6 bg-gray-50 dark:bg-gray-900">
<div
class="flex-1 h-full max-w-4xl mx-auto overflow-hidden bg-white rounded-lg shadow-xl dark:bg-gray-800"
>
<div class="flex flex-col overflow-y-auto md:flex-row">
<div class="h-32 md:h-auto md:w-1/2">
<img
aria-hidden="true"
class="object-cover w-full h-full dark:hidden"
src="<?=base_url();?>src/img/create-account-office.jpeg"
alt="Office"
/>
<img
aria-hidden="true"
class="hidden object-cover w-full h-full dark:block"
src="<?=base_url();?>src/img/create-account-office-dark.jpeg"
alt="Office"
/>
</div>
<div class="flex items-center justify-center p-6 sm:p-12 md:w-1/2">
<div class="w-full">
<h1
class="mb-4 text-xl font-semibold text-gray-700 dark:text-gray-200"
>
Create account
</h1>
<form action="<?=base_url('auth/signup');?>" method="post">
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Full name</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Jane Doe"
type="text"
name="nama" value="<?=set_value('nama');?>"
/>
</label>
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Email</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="your@mail.com"
type="email"
name="email" value="<?=set_value('email');?>"
/>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Password</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Type your password"
type="password"
name="password1"
/>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Confirm password
</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Type your password again"
type="password"
name="password2"
/>
</label>
<div class="flex mt-6 text-sm">
<label class="flex items-center dark:text-gray-400">
<input
type="checkbox"
class="text-purple-600 form-checkbox focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
/>
<span class="ml-2">
I agree to the
<span class="underline">privacy policy</span>
</span>
</label>
</div>
<!-- You should use a button here, as the anchor is only used for the example -->
<button
class="block w-full px-4 py-2 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
type="submit"
>
Create account
</button>
</form>
<div style="margin-top: 9px"><?= $this->session->flashdata('message'); ?></div>
<hr class="my-8" />
<button
class="flex items-center justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray"
>
<i class="fab fa-google mr-2"></i>
With Google
</button>
<p class="mt-4">
<a
class="text-sm font-medium text-purple-600 dark:text-purple-400 hover:underline"
href="<?=base_url('auth');?>"
>
Already have an account? Login
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

198
application/views/cards.php Normal file
View File

@@ -0,0 +1,198 @@
<main class="h-full pb-16 overflow-y-auto">
<div class="container px-6 mx-auto grid">
<h2
class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
>
Cards
</h2>
<!-- CTA -->
<a
class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
href="https://github.com/estevanmaito/windmill-dashboard"
>
<div class="flex items-center">
<svg
class="w-5 h-5 mr-2"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
></path>
</svg>
<span>Star this project on GitHub</span>
</div>
<span>View more &RightArrow;</span>
</a>
<!-- Big section cards -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Big section cards
</h4>
<div
class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800"
>
<p class="text-sm text-gray-600 dark:text-gray-400">
Large, full width sections goes here
</p>
</div>
<!-- Responsive cards -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Responsive cards
</h4>
<div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Total clients
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
6389
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
clip-rule="evenodd"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Account balance
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
$ 46,760.89
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
New sales
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
376
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z"
clip-rule="evenodd"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Pending contacts
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
35
</p>
</div>
</div>
</div>
<!-- Cards with title -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Cards with title
</h4>
<div class="grid gap-6 mb-8 md:grid-cols-2">
<div
class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<h4 class="mb-4 font-semibold text-gray-600 dark:text-gray-300">
Revenue
</h4>
<p class="text-gray-600 dark:text-gray-400">
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
Fuga, cum commodi a omnis numquam quod? Totam exercitationem
quos hic ipsam at qui cum numquam, sed amet ratione! Ratione,
nihil dolorum.
</p>
</div>
<div
class="min-w-0 p-4 text-white bg-purple-600 rounded-lg shadow-xs"
>
<h4 class="mb-4 font-semibold">
Colored card
</h4>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
Fuga, cum commodi a omnis numquam quod? Totam exercitationem
quos hic ipsam at qui cum numquam, sed amet ratione! Ratione,
nihil dolorum.
</p>
</div>
</div>
</div>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,364 @@
<main class="h-full overflow-y-auto">
<?php
function rupiah($angka){
$hasil_rupiah = "Rp. " . number_format($angka, 0, ',', '.');
return $hasil_rupiah;
}
?>
<div class="container px-6 mx-auto grid">
<h2
class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
>
Dashboard
</h2>
<!-- CTA -->
<!-- Cards -->
<div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-4">
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Number of Users
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
<?=$total_users;?>
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-green-500 bg-green-100 rounded-full dark:text-green-100 dark:bg-green-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z"
clip-rule="evenodd"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Online
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
<?=$total_online_users;?>
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-blue-500 bg-blue-100 rounded-full dark:text-blue-100 dark:bg-blue-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
d="M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Account balance
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
<?=rupiah($total_amount);?>
</p>
</div>
</div>
<!-- Card -->
<div
class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<div
class="p-3 mr-4 text-teal-500 bg-teal-100 rounded-full dark:text-teal-100 dark:bg-teal-500"
>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z"
clip-rule="evenodd"
></path>
</svg>
</div>
<div>
<p
class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"
>
Remainder of Balance
</p>
<p
class="text-lg font-semibold text-gray-700 dark:text-gray-200"
>
<?php
$remainder = 12000000 - $total_amount; echo rupiah($remainder);
?>
</p>
</div>
</div>
</div>
<!-- New Table -->
<div class="w-full overflow-hidden rounded-lg shadow-xs">
<div class="w-full overflow-x-auto">
<table class="w-full whitespace-no-wrap">
<thead>
<tr
class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
>
<th class="px-4 py-3">Whos</th>
<th class="px-4 py-3">Address</th>
<th class="px-4 py-3">Status</th>
<th class="px-4 py-3">Date Created</th>
</tr>
</thead>
<tbody
class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"
>
<?php foreach($users as $usr) : ?>
<tr class="text-gray-700 dark:text-gray-400">
<td class="px-4 py-3">
<div class="flex items-center text-sm">
<!-- Avatar with inset shadow -->
<div
class="relative hidden w-8 h-8 mr-3 rounded-full md:block"
>
<img
class="object-cover w-full h-full rounded-full"
src="<?=base_url('src/user/image/').$usr['image'];?>"
alt=""
loading="lazy"
/>
<div
class="absolute inset-0 rounded-full shadow-inner"
aria-hidden="true"
></div>
</div>
<div>
<p class="font-semibold"><?=$usr['nama'];?></p>
<p class="text-xs text-gray-600 dark:text-gray-400">
<?=$usr['email'];?>
</p>
</div>
</div>
</td>
<td class="px-4 py-3 text-sm">
<?=$usr['address'];?>
</td>
<td class="px-4 py-3 text-xs">
<span
<?php if($usr['status_login'] == 'online') : ?>
class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100"
<?php else : ?>
class="px-2 py-1 font-semibold leading-tight text-gray-700 bg-gray-100 rounded-full dark:text-gray-100 dark:bg-gray-700"
<?php endif; ?>
>
<?=$usr['status_login'];?>
</span>
</td>
<td class="px-4 py-3 text-sm">
<?=date('d F Y', $usr['date_created']);?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div
class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"
>
<span class="flex items-center col-span-3">
Showing 21-30 of 100
</span>
<span class="col-span-2"></span>
<!-- Pagination -->
<span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end">
<nav aria-label="Table navigation">
<ul class="inline-flex items-center">
<li>
<button
class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Previous"
>
<svg
aria-hidden="true"
class="w-4 h-4 fill-current"
viewBox="0 0 20 20"
>
<path
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
1
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
2
</button>
</li>
<li>
<button
class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple"
>
3
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
4
</button>
</li>
<li>
<span class="px-3 py-1">...</span>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
8
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
9
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Next"
>
<svg
class="w-4 h-4 fill-current"
aria-hidden="true"
viewBox="0 0 20 20"
>
<path
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
</button>
</li>
</ul>
</nav>
</span>
</div>
</div>
<!-- Charts -->
<h2
class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
>
Charts
</h2>
<div class="grid gap-6 mb-8 md:grid-cols-2">
<div
class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300">
Revenue
</h4>
<canvas id="pie"></canvas>
<div
class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400"
>
<!-- Chart legend -->
<div class="flex items-center">
<span
class="inline-block w-3 h-3 mr-1 bg-blue-500 rounded-full"
></span>
<span>Shirts</span>
</div>
<div class="flex items-center">
<span
class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full"
></span>
<span>Shoes</span>
</div>
<div class="flex items-center">
<span
class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full"
></span>
<span>Bags</span>
</div>
</div>
</div>
<div
class="min-w-0 p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"
>
<h4 class="mb-4 font-semibold text-gray-800 dark:text-gray-300">
Traffic
</h4>
<canvas id="line"></canvas>
<div
class="flex justify-center mt-4 space-x-3 text-sm text-gray-600 dark:text-gray-400"
>
<!-- Chart legend -->
<div class="flex items-center">
<span
class="inline-block w-3 h-3 mr-1 bg-teal-600 rounded-full"
></span>
<span>Organic</span>
</div>
<div class="flex items-center">
<span
class="inline-block w-3 h-3 mr-1 bg-purple-600 rounded-full"
></span>
<span>Paid</span>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Konfirmasi Email</title>
<!-- Tautkan ke Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Segoe+UI&display=swap" rel="stylesheet">
<style>
body {
padding: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f7f7f7;
}
.email-container {
font-family: 'Segoe UI', Arial, sans-serif;
max-width: 600px;
margin: 0 20px;
/* Margin kiri dan kanan */
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
</style>
</head>
<body>
<div class="email-container">
<h1>Silakan konfirmasi alamat email Anda untuk mendaftar</h1>
<p>Terima kasih telah bergabung dengan Dyzulk Apps. Kami perlu mengkonfirmasi alamat email Anda. Silakan klik
tautan di bawah ini.</p>
<p style="margin-top: 30px; font-size: 14px; color: #888;">Jika Anda tidak meminta email ini, harap abaikan
saja.</p>
<a href="https://www.example.com/konfirmasi-email"
style="display: inline-block; padding: 10px 20px; background-color: #007bff; color: #fff; text-decoration: none; border-radius: 5px; margin-top: 20px;">Lanjutkan
ke Dyzulk Apps</a>
<p style="font-size: 14px; color: #888; margin-top: 20px;">Demi keamanan, tautan ini hanya akan aktif selama 24
jam.</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Konfirmasi Email</title>
<link href="https://fonts.googleapis.com/css2?family=Segoe+UI&display=swap" rel="stylesheet">
<style>
body {
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
background-color: #26577C;
}
h1 {
font-family: 'Segoe UI', Arial, sans-serif;
font-size: 40px;
font-weight: 800;
}
.email-container {
font-family: 'Segoe UI', Arial, sans-serif;
max-width: 600px;
margin: 0 auto;
margin-top: 50px;
border: 1px solid #eee;
background-color: #fff;
padding-top: 20px;
padding-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
text-align: left;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #E55604;
color: #fff;
text-decoration: none;
border-radius: 5px;
margin-top: 20px;
font-weight: bold;
}
.btn:hover {
opacity: 0.8;
transition: 0.3s;
}
.header-logo {
display: block;
margin: 0 auto;
max-width: 100%;
}
.tipis {
font-size: 14px;
color: #888;
margin-top: 30px;
}
.copyright {
font-family: 'Segoe UI', Arial, sans-serif;
text-align: center;
margin-top: 20px;
font-size: 12px;
color: #EBE4D1;
}
.unsubscribe {
text-align: center;
font-size: 12px;
color: #EBE4D1;
text-decoration: none;
display: block;
margin-top: 5px;
}
.link-container {
margin-top: 20px;
margin-bottom: 20px;
max-width: 75%;
}
.link {
font-size: 14px;
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
.hr2 {
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="email-container">
<img class="header-logo" src="https://dyzulk.me/dist/img/favicon.png" alt="Logo" width="100">
<h1>Silakan konfirmasi email<br/>Untuk mendaftar</h1>
<p>Terima kasih telah bergabung dengan Dyzulk Apps. Kami perlu mengkonfirmasi alamat email Anda. Silakan klik tautan di bawah ini.</p>
<a href="<?=$link;?>" target="_blank" class="btn">Aktifkan Akun</a>
<p class="tipis">Demi keamanan, tautan ini hanya akan aktif selama 24jam</p>
<hr>
<p>Jika Anda mengalami masalah saat mengklik tombol "<b>Aktifkan Akun</b>", salin dan tempel tautan di bawah ini ke browser web Anda:</p>
<div class="link-container">
<a href="<?=$link;?>" target="_blank" class="link"><?=$link;?></a>
</div>
<hr class="hr2">
<p class="tipis">Jika Anda tidak meminta email ini, harap abaikan saja.</p>
</div>
<div class="copyright">
Copyright © 2023 Dyzulk Apps. All rights reserved.
</div>
</body>
</html>

View File

@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pemulihan Password</title>
<link href="https://fonts.googleapis.com/css2?family=Segoe+UI&display=swap" rel="stylesheet">
<style>
body {
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
background-color: #26577C;
}
h1 {
font-family: 'Segoe UI', Arial, sans-serif;
font-size: 40px;
font-weight: 800;
}
.email-container {
font-family: 'Segoe UI', Arial, sans-serif;
max-width: 600px;
margin: 0 auto;
margin-top: 50px;
border: 1px solid #eee;
background-color: #fff;
padding-top: 20px;
padding-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
text-align: left;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #E55604;
color: #ffffff;
text-decoration: none;
border-radius: 5px;
margin-top: 20px;
font-weight: bold;
}
.btn:hover {
opacity: 0.8;
transition: 0.3s;
}
.header-logo {
display: block;
margin: 0 auto;
max-width: 100%;
}
.tipis {
font-size: 14px;
color: #888;
margin-top: 30px;
}
.copyright {
font-family: 'Segoe UI', Arial, sans-serif;
text-align: center;
margin-top: 20px;
font-size: 12px;
color: #EBE4D1;
}
.unsubscribe {
text-align: center;
font-size: 12px;
color: #EBE4D1;
text-decoration: none;
display: block;
margin-top: 5px;
}
.link-container {
margin-top: 20px;
margin-bottom: 20px;
max-width: 75%;
}
.link {
font-size: 14px;
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
}
.hr2 {
margin-bottom: 20px;
}
.email {
color: #E55604;
font-size: 30px;
}
.untuk {
font-size: 30px;
}
</style>
</head>
<body>
<div class="email-container">
<img class="header-logo" src="https://dyzulk.me/dist/img/favicon.png" alt="Logo" width="100">
<h1>Pemulihan password<br/><span class="untuk">Untuk </span><span class="email"><?=$email.'.';?></span></h1>
<p>Terima kasih telah bersama dengan Dyzulk Apps. Untuk memperbarui password Anda. Silakan klik tautan di bawah ini.</p>
<a href="<?=$link;?>" target="_blank" class="btn">Perbarui Password</a>
<p class="tipis">Demi keamanan, tautan ini hanya akan aktif selama 24jam</p>
<hr>
<p>Jika Anda mengalami masalah saat mengklik tombol "<b>Perbarui Password</b>", salin dan tempel tautan di bawah ini ke browser web Anda:</p>
<div class="link-container">
<a href="<?=$link;?>" target="_blank" class="link"><?=$link;?></a>
</div>
<hr class="hr2">
<p class="tipis">Jika Anda tidak meminta email ini, harap abaikan saja.</p>
</div>
<div class="copyright">
Copyright © 2023 Dyzulk Apps. All rights reserved.
</div>
</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,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</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,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,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

View File

@@ -0,0 +1,416 @@
<!DOCTYPE html>
<html :class="{ 'theme-dark': dark }" x-data="data()" lang="en">
<head>
<link href="https://dyzulk.me/dist/img/favicon.png" rel="icon" sizes=”32×32″ type="image/png">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?=$title;?> - App Dashboard</title>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="<?=base_url();?>src/css/tailwind.output.css" />
<script
src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
<script src="<?=base_url();?>src/js/init-alpine.js"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"
defer
></script>
<script src="<?=base_url();?>src/js/charts-lines.js" defer></script>
<script src="<?=base_url();?>src/js/charts-pie.js" defer></script>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/dyzcdn/fontawesome-pro-5.15.4@main/css/all.css">
<script src="https://cdn.jsdelivr.net/gh/dyzcdn/fontawesome-pro-5.15.4@main/js/pro.js"></script>
<!-- SweetAlert2 -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.28/dist/sweetalert2.all.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.28/dist/sweetalert2.min.css">
</head>
<body>
<div
class="flex h-screen bg-gray-50 dark:bg-gray-900"
:class="{ 'overflow-hidden': isSideMenuOpen }"
>
<!-- Query Menu -->
<?php
$role_id = $this->session->userdata('role_id');
$queryMenu = " SELECT `user_menu`.`id`, `title`, `url`, `icon`
FROM `user_menu` JOIN `user_access_menu`
ON `user_menu`.`id` = `user_access_menu`.`menu_id`
WHERE `user_access_menu`.`role_id` = $role_id
ORDER BY `user_access_menu`.`menu_id` ASC
";
$menu = $this->db->query($queryMenu)->result_array();
?>
<!-- Desktop sidebar -->
<aside
class="z-20 hidden w-64 overflow-y-auto bg-white dark:bg-gray-800 md:block flex-shrink-0"
>
<div class="py-4 text-gray-500 dark:text-gray-400">
<a
class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200"
href="#"
>
DyzPanel
</a>
<ul class="mt-6"></ul>
<?php foreach ($menu as $m) : ?>
<ul>
<li class="relative px-6 py-3">
<?php if ($title == $m['title']) : ?>
<span class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg" aria-hidden="true"></span>
<?php endif; ?>
<a
href="<?=base_url($m['url']);?>"
<?php if ($title == $m['title']) : ?>
class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100"
<?php else : ?>
class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
<?php endif; ?>>
<i class="<?=$m['icon'];?>"></i>
<span class="ml-4"><?=$m['title'];?></span>
</a>
</li>
</ul>
<?php endforeach; ?>
<div class="px-6 my-6">
<a href="<?=base_url('auth/logout');?>"
class="flex items-center justify-between w-full px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
>
Log Out
<i class="ml-4 fad fa-power-off"></i>
</a>
</div>
</div>
</aside>
<!-- Mobile sidebar -->
<!-- Backdrop -->
<div
x-show="isSideMenuOpen"
x-transition:enter="transition ease-in-out duration-150"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in-out duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="fixed inset-0 z-10 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center"
></div>
<aside
class="fixed inset-y-0 z-20 flex-shrink-0 w-64 mt-16 overflow-y-auto bg-white dark:bg-gray-800 md:hidden"
x-show="isSideMenuOpen"
x-transition:enter="transition ease-in-out duration-150"
x-transition:enter-start="opacity-0 transform -translate-x-20"
x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in-out duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0 transform -translate-x-20"
@click.away="closeSideMenu"
@keydown.escape="closeSideMenu"
>
<div class="py-4 text-gray-500 dark:text-gray-400">
<a
class="ml-6 text-lg font-bold text-gray-800 dark:text-gray-200"
href="#"
>
DyzPanel
</a>
<ul class="mt-6"></ul>
<?php foreach ($menu as $m) : ?>
<ul>
<li class="relative px-6 py-3">
<?php if ($title == $m['title']) : ?>
<span
class="absolute inset-y-0 left-0 w-1 bg-purple-600 rounded-tr-lg rounded-br-lg"
aria-hidden="true"
></span>
<?php endif; ?>
<a
<?php if ($title == $m['title']) : ?>
class="inline-flex items-center w-full text-sm font-semibold text-gray-800 transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200 dark:text-gray-100"
<?php else : ?>
class="inline-flex items-center w-full text-sm font-semibold transition-colors duration-150 hover:text-gray-800 dark:hover:text-gray-200"
<?php endif; ?>
href="<?=base_url($m['url']);?>"
>
<i class="<?=$m['icon'];?>"></i>
<span class="ml-4"><?=$m['title'];?></span>
</a>
</li>
</ul>
<?php endforeach; ?>
<div class="px-6 my-6">
<a href="<?=base_url('auth/logout');?>"
class="flex items-center justify-between px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"
>
Log Out
<i class="ml-4 fad fa-power-off"></i>
</a>
</div>
</div>
</aside>
<div class="flex flex-col flex-1 w-full">
<header class="z-10 py-4 bg-white shadow-md dark:bg-gray-800">
<div
class="container flex items-center justify-between h-full px-6 mx-auto text-purple-600 dark:text-purple-300"
>
<!-- Mobile hamburger -->
<button
class="p-1 mr-5 -ml-1 rounded-md md:hidden focus:outline-none focus:shadow-outline-purple"
@click="toggleSideMenu"
aria-label="Menu"
>
<svg
class="w-6 h-6"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
fill-rule="evenodd"
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd"
></path>
</svg>
</button>
<!-- Search input -->
<div class="flex justify-center flex-1 lg:mr-32">
<div
class="relative w-full max-w-xl mr-6 focus-within:text-purple-500"
>
<div class="absolute inset-y-0 flex items-center pl-2">
<svg
class="w-4 h-4"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
fill-rule="evenodd"
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
clip-rule="evenodd"
></path>
</svg>
</div>
<input
class="w-full pl-8 pr-2 text-sm text-gray-700 placeholder-gray-600 bg-gray-100 border-0 rounded-md dark:placeholder-gray-500 dark:focus:shadow-outline-gray dark:focus:placeholder-gray-600 dark:bg-gray-700 dark:text-gray-200 focus:placeholder-gray-500 focus:bg-white focus:border-purple-300 focus:outline-none focus:shadow-outline-purple form-input"
type="text"
placeholder="Search for projects"
aria-label="Search"
/>
</div>
</div>
<ul class="flex items-center flex-shrink-0 space-x-6">
<!-- Theme toggler -->
<li class="flex">
<button
class="rounded-md focus:outline-none focus:shadow-outline-purple"
@click="toggleTheme"
aria-label="Toggle color mode"
>
<template x-if="!dark">
<svg
class="w-5 h-5"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"
></path>
</svg>
</template>
<template x-if="dark">
<svg
class="w-5 h-5"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
fill-rule="evenodd"
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
clip-rule="evenodd"
></path>
</svg>
</template>
</button>
</li>
<!-- Notifications menu -->
<li class="relative">
<button
class="relative align-middle rounded-md focus:outline-none focus:shadow-outline-purple"
@click="toggleNotificationsMenu"
@keydown.escape="closeNotificationsMenu"
aria-label="Notifications"
aria-haspopup="true"
>
<svg
class="w-5 h-5"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"
></path>
</svg>
<!-- Notification badge -->
<span
aria-hidden="true"
class="absolute top-0 right-0 inline-block w-3 h-3 transform translate-x-1 -translate-y-1 bg-red-600 border-2 border-white rounded-full dark:border-gray-800"
></span>
</button>
<template x-if="isNotificationsMenuOpen">
<ul
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
@click.away="closeNotificationsMenu"
@keydown.escape="closeNotificationsMenu"
class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:text-gray-300 dark:border-gray-700 dark:bg-gray-700"
>
<li class="flex">
<a
class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="#"
>
<span>Messages</span>
<span
class="inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-600 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-600"
>
13
</span>
</a>
</li>
<li class="flex">
<a
class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="#"
>
<span>Sales</span>
<span
class="inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-600 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-600"
>
2
</span>
</a>
</li>
<li class="flex">
<a
class="inline-flex items-center justify-between w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="#"
>
<span>Alerts</span>
</a>
</li>
</ul>
</template>
</li>
<!-- Profile menu -->
<li class="relative">
<button
class="align-middle rounded-full focus:shadow-outline-purple focus:outline-none"
@click="toggleProfileMenu"
@keydown.escape="closeProfileMenu"
aria-label="Account"
aria-haspopup="true"
>
<img
class="object-cover w-8 h-8 rounded-full"
src="<?=base_url('src/user/image/'); echo $user['image'];?>"
alt="Your Avatar"
aria-hidden="true"
/>
</button>
<template x-if="isProfileMenuOpen">
<ul
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
@click.away="closeProfileMenu"
@keydown.escape="closeProfileMenu"
class="absolute right-0 w-56 p-2 mt-2 space-y-2 text-gray-600 bg-white border border-gray-100 rounded-md shadow-md dark:border-gray-700 dark:text-gray-300 dark:bg-gray-700"
aria-label="submenu"
>
<li class="flex">
<a
class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="#"
>
<svg
class="w-4 h-4 mr-3"
aria-hidden="true"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
></path>
</svg>
<span>Profile</span>
</a>
</li>
<li class="flex">
<a
class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="#"
>
<svg
class="w-4 h-4 mr-3"
aria-hidden="true"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
></path>
<path d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
<span>Settings</span>
</a>
</li>
<li class="flex">
<a
class="inline-flex items-center w-full px-2 py-1 text-sm font-semibold transition-colors duration-150 rounded-md hover:bg-gray-100 hover:text-gray-800 dark:hover:bg-gray-800 dark:hover:text-gray-200"
href="<?=base_url('auth/logout');?>"
>
<svg
class="w-4 h-4 mr-3"
aria-hidden="true"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
></path>
</svg>
<span>Log out</span>
</a>
</li>
</ul>
</template>
</li>
</ul>
</div>
</header>

View File

@@ -0,0 +1,252 @@
<main class="h-full pb-16 overflow-y-auto">
<div class="container grid px-6 mx-auto">
<h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200">
Tables
</h2>
<!-- CTA -->
<a class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
href="<?=base_url('transaksi');?>">
<div class="flex items-center">
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
<path
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z">
</path>
</svg>
<span>Star this project on GitHub</span>
</div>
<span>View more &RightArrow;</span>
</a>
<div class="mb-4">
<button @click="openModal"
class="flex items-center justify-between px-4 py-2 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
<i class="fad fa-plus w-4 h-4 mr-2 -ml-1"></i>
<span>Create</span>
</button>
</div>
<!-- With actions -->
<h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">
Table with actions
</h4>
<div class="w-full overflow-hidden rounded-lg shadow-xs">
<div class="w-full overflow-x-auto">
<table class="w-full whitespace-no-wrap">
<thead>
<tr
class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800">
<th class="px-4 py-3">Whos</th>
<th class="px-4 py-3">Amount</th>
<th class="px-4 py-3">Date</th>
<th class="px-4 py-3">Other</th>
<th class="px-4 py-3">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
<?php foreach ($transData as $transaction) : ?>
<tr class="text-gray-700 dark:text-gray-400">
<td class="px-4 py-3">
<div class="flex items-center text-sm">
<!-- Avatar with inset shadow -->
<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block">
<img class="object-cover w-full h-full rounded-full"
src="<?=base_url('src/user/image/' . $transaction['image']);?>" alt=""
loading="lazy" />
<div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true">
</div>
</div>
<div>
<p class="font-semibold">
<?=$transaction['nama'];?>
</p>
<p class="text-xs text-gray-600 dark:text-gray-400">
<?=$transaction['email'];?>
</p>
</div>
</div>
</td>
<td class="px-4 py-3 text-sm">
<?=$transaction['amount'];?>
</td>
<td class="px-4 py-3 text-sm">
<?= date('d F Y', $transaction['time_transaction']); ?>
</td>
<td class="px-4 py-3 text-sm">
<?= date('d F Y', $transaction['other']);?>
</td>
<td class="px-4 py-3">
<div class="flex items-center space-x-4 text-sm">
<?php echo anchor(base_url('transaksi/editData?id=').$transaction['id'], '<button class="flex items-center justify-between px-2 py-2 text-sm font-medium leading-5 text-purple-600 rounded-lg dark:text-gray-400 focus:outline-none focus:shadow-outline-gray" aria-label="Edit"><svg class="w-5 h-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20"><path d="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"></path></svg></button>');?>
<button
onclick="hapusData('<?php echo $transaction['id']; ?>')"
class="flex items-center justify-between px-2 py-2 text-sm font-medium leading-5 text-purple-600 rounded-lg dark:text-gray-400 focus:outline-none focus:shadow-outline-gray"
aria-label="Delete">
<svg class="w-5 h-5" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
clip-rule="evenodd"></path>
</svg>
</button>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div
class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800">
<span class="flex items-center col-span-3">
Showing 21-30 of 100
</span>
<span class="col-span-2"></span>
<!-- Pagination -->
<span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end">
<nav aria-label="Table navigation">
<ul class="inline-flex items-center">
<li>
<button
class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Previous">
<svg class="w-4 h-4 fill-current" aria-hidden="true" viewBox="0 0 20 20">
<path
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
clip-rule="evenodd" fill-rule="evenodd"></path>
</svg>
</button>
</li>
<li>
<button class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">
1
</button>
</li>
<li>
<button class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">
2
</button>
</li>
<li>
<button
class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple">
3
</button>
</li>
<li>
<button class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">
4
</button>
</li>
<li>
<span class="px-3 py-1">...</span>
</li>
<li>
<button class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">
8
</button>
</li>
<li>
<button class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple">
9
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Next">
<svg class="w-4 h-4 fill-current" aria-hidden="true" viewBox="0 0 20 20">
<path
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd" fill-rule="evenodd"></path>
</svg>
</button>
</li>
</ul>
</nav>
</span>
</div>
<!-- Modal backdrop. This what you want to place close to the closing body tag -->
<div x-show="isModalOpen" x-transition:enter="transition ease-out duration-150"
x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in duration-150" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center">
<!-- Modal -->
<div x-show="isModalOpen" x-transition:enter="transition ease-out duration-150"
x-transition:enter-start="opacity-0 transform translate-y-1/2" x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in duration-150" x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0 transform translate-y-1/2" @click.away="closeModal"
@keydown.escape="closeModal"
class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl"
role="dialog" id="modal">
<!-- Remove header if you don't want a close icon. Use modal body to place modal tile. -->
<form action="<?=base_url('transaksi/addData');?>" method="post">
<header class="flex justify-end">
<button
class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700"
aria-label="close" @click="closeModal">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20" role="img" aria-hidden="true">
<path
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
clip-rule="evenodd" fill-rule="evenodd"></path>
</svg>
</button>
</header>
<!-- Modal body -->
<div class="mt-4 mb-6">
<!-- Modal title -->
<p class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300">
Add
</p>
<!-- Modal description -->
<div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">
Whos
</span>
<select
class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-select focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray"
name="id">
<?php foreach ($users as $usr) : ?>
<option value="<?= $usr['id']; ?>">
<?= $usr['id']; ?> - <?= $usr['nama']; ?>
</option>
<?php endforeach; ?>
</select>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Amount</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
placeholder="Rp. " type="text" name="amount" id="amountInput"
required="required" />
</label>
</div>
</div>
<footer
class="flex flex-col items-center justify-end px-6 py-3 -mx-6 -mb-4 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800">
<button @click="closeModal"
class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray">
Cancel
</button>
<button
type="submit"
class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
Accept
</button>
</footer>
</form>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="<?=base_url('src/js/rupiah.js');?>"></script>
<script src="<?=base_url('src/js/deleteWalert.js');?>"></script>
<script>
var baseUrl = "<?=base_url();?>";
</script>
</body>
</html>

View File

@@ -0,0 +1,58 @@
<main class="h-full pb-16 overflow-y-auto">
<div class="container px-6 mx-auto grid">
<h2 class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200">
Forms
</h2>
<!-- CTA -->
<a class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
href="https://github.com/estevanmaito/windmill-dashboard">
<div class="flex items-center">
<svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
<path
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z">
</path>
</svg>
<span>Star this project on GitHub</span>
</div>
<span>View more &RightArrow;</span>
</a>
<!-- General elements -->
<h4 class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300">
Elements
</h4>
<div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">
<form action="<?=base_url('transaksi/updateData');?>" method="post">
<label class="block text-sm">
<span class="text-gray-700 dark:text-gray-400">Whos</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
name="id" value="<?=$transData['id'];?>" readonly/>
</label>
<label class="block mt-4 text-sm">
<span class="text-gray-700 dark:text-gray-400">Amount</span>
<input
class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"
name="amount" value="<?=$transData['amount'];?>"/>
</label>
<div
class="flex flex-col items-center justify-end py-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-50 dark:bg-gray-800">
<a
href="javascript:history.back()" class="w-full px-5 py-3 text-sm font-medium leading-5 text-white text-gray-700 transition-colors duration-150 border border-gray-300 rounded-lg dark:text-gray-400 sm:px-4 sm:py-2 sm:w-auto active:bg-transparent hover:border-gray-500 focus:border-gray-500 active:text-gray-500 focus:outline-none focus:shadow-outline-gray">
Cancel
</a>
<button
type="submit"
class="w-full px-5 py-3 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg sm:w-auto sm:px-4 sm:py-2 active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">
Accept
</button>
</div>
</form>
</div>
</div>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,221 @@
<main class="h-full pb-16 overflow-y-auto">
<div class="container grid px-6 mx-auto">
<h2
class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"
>
Tables
</h2>
<!-- CTA -->
<a
class="flex items-center justify-between p-4 mb-8 text-sm font-semibold text-purple-100 bg-purple-600 rounded-lg shadow-md focus:outline-none focus:shadow-outline-purple"
href="<?=base_url('transaksi/admin');?>"
>
<div class="flex items-center">
<svg
class="w-5 h-5 mr-2"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
></path>
</svg>
<span>Star this project on GitHub</span>
</div>
<span>View more &RightArrow;</span>
</a>
<!-- With avatar -->
<h4
class="mb-4 text-lg font-semibold text-gray-600 dark:text-gray-300"
>
Table with avatars
</h4>
<div class="w-full mb-8 overflow-hidden rounded-lg shadow-xs">
<div class="w-full overflow-x-auto">
<table class="w-full whitespace-no-wrap">
<thead>
<tr
class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
>
<th class="px-4 py-3">Whos</th>
<th class="px-4 py-2">Amount</th>
<th class="px-4 py-2">Remainder</th>
<th class="px-4 py-2">Status</th>
<th class="px-4 py-3">Date</th>
</tr>
</thead>
<tbody
class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"
>
<?php
$session = $this->session->userdata('email');
$queryTransaksi = "SELECT *
FROM `users_account`
JOIN `user_transaction` ON `users_account`.`email` = `user_transaction`.`user_email`
WHERE `users_account`.`email` = '$session'
ORDER BY `user_transaction`.`time_transaction` DESC";
$transaksiData = $this->db->query($queryTransaksi)->result_array();
function rupiah($angka){
$hasil_rupiah = "Rp. " . number_format($angka, 0, ',', '.');
return $hasil_rupiah;
}
$sisaSebelumnya = 1000000; // Inisialisasi sisa yang harus dibayar
foreach ($transaksiData as $transaksi) {
// Mengurangkan sisa yang harus dibayar dengan nilai amount pada transaksi
$sisa = $sisaSebelumnya - $transaksi['amount'];
// Menampilkan data transaksi
echo '<tr class="text-gray-700 dark:text-gray-400">';
echo '<td class="px-4 py-3">';
echo '<div class="flex items-center text-sm">';
// Avatar
echo '<div class="relative hidden w-8 h-8 mr-3 rounded-full md:block">';
echo '<img class="object-cover w-full h-full rounded-full" src="' . base_url('src/user/image/' . $transaksi['image']) . '" alt="" loading="lazy" />';
echo '<div class="absolute inset-0 rounded-full shadow-inner" aria-hidden="true"></div>';
echo '</div>';
// Nama dan Email
echo '<div>';
echo '<p class="font-semibold">' . $transaksi['nama'] . '</p>';
echo '<p class="text-xs text-gray-600 dark:text-gray-400">' . $transaksi['email'] . '</p>';
echo '</div>';
echo '</div>';
echo '</td>';
// Amount
echo '<td class="px-4 py-3 text-sm">' . rupiah($transaksi['amount']) . '</td>';
// Sisa yang harus dibayar
echo '<td class="px-4 py-3 text-sm">' . rupiah($sisa) . '</td>';
// Status Pembayaran
echo '<td class="px-4 py-3 text-xs">';
if ($sisa <= 0) {
echo '<span class="px-2 py-1 font-semibold leading-tight text-green-700 bg-green-100 rounded-full dark:bg-green-700 dark:text-green-100">Lunas</span>';
} else {
echo '<span class="px-2 py-1 font-semibold leading-tight text-red-700 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-700">Belum Lunas</span>';
}
echo '</td>';
// Tanggal Transaksi
echo '<td class="px-4 py-3 text-sm">' . date('d F Y', $transaksi['time_transaction']) . '</td>';
echo '</tr>';
// Mengupdate nilai sisa yang harus dibayar untuk transaksi berikutnya
$sisaSebelumnya = $sisa;
}
?>
</tbody>
</table>
</div>
<div
class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800"
>
<span class="flex items-center col-span-3">
Showing 21-30 of 100
</span>
<span class="col-span-2"></span>
<!-- Pagination -->
<span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end">
<nav aria-label="Table navigation">
<ul class="inline-flex items-center">
<li>
<button
class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Previous"
>
<svg
aria-hidden="true"
class="w-4 h-4 fill-current"
viewBox="0 0 20 20"
>
<path
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
1
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
2
</button>
</li>
<li>
<button
class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple"
>
3
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
4
</button>
</li>
<li>
<span class="px-3 py-1">...</span>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
8
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple"
>
9
</button>
</li>
<li>
<button
class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple"
aria-label="Next"
>
<svg
class="w-4 h-4 fill-current"
aria-hidden="true"
viewBox="0 0 20 20"
>
<path
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
</button>
</li>
</ul>
</nav>
</span>
</div>
</div>
</div>
</main>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,101 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Welcome to CodeIgniter</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;
text-decoration: none;
}
a:hover {
color: #97310e;
}
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;
}
#body {
margin: 0 15px 0 15px;
min-height: 96px;
}
p {
margin: 0 0 10px;
padding:0;
}
p.footer {
text-align: right;
font-size: 11px;
border-top: 1px solid #D0D0D0;
line-height: 32px;
padding: 0 10px 0 10px;
margin: 20px 0 0 0;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
</style>
</head>
<body>
<div id="container">
<h1>Welcome to CodeIgniter!</h1>
<div id="body">
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
<p>If you would like to edit this page you'll find it located at:</p>
<code>application/views/welcome_message.php</code>
<p>The corresponding controller for this page is found at:</p>
<code>application/controllers/Welcome.php</code>
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="userguide3/">User Guide</a>.</p><br/>
<p><strong><a href="<?=base_url('auth');?>">Login</a> | <a href="<?=base_url('auth/signup');?>">Signup</a></strong></p>
</div>
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
</div>
</body>
</html>