commitall
This commit is contained in:
5
library/application/.htaccess
Normal file
5
library/application/.htaccess
Normal file
@ -0,0 +1,5 @@
|
||||
RewriteEngine On
|
||||
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ ./index.php/$1 [L]
|
11
library/application/cache/index.html
vendored
Normal file
11
library/application/cache/index.html
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
135
library/application/config/autoload.php
Normal file
135
library/application/config/autoload.php
Normal 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('database','session','encryption','form_validation');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Drivers
|
||||
| -------------------------------------------------------------------
|
||||
| These classes are located in system/libraries/ or in your
|
||||
| application/libraries/ directory, but are also placed inside their
|
||||
| own subdirectory and they extend the CI_Driver_Library class. They
|
||||
| offer multiple interchangeable driver options.
|
||||
|
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['drivers'] = array('cache');
|
||||
|
|
||||
| You can also supply an alternative property name to be assigned in
|
||||
| the controller:
|
||||
|
|
||||
| $autoload['drivers'] = array('cache' => 'cch');
|
||||
|
|
||||
*/
|
||||
$autoload['drivers'] = array();
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Helper Files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
$autoload['helper'] = array('url');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| 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();
|
531
library/application/config/config.php
Normal file
531
library/application/config/config.php
Normal file
@ -0,0 +1,531 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Site URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||
| WITH a trailing slash:
|
||||
|
|
||||
| http://example.com/
|
||||
|
|
||||
| WARNING: You MUST set this value!
|
||||
|
|
||||
| If it is not set, then CodeIgniter will try guess the protocol and path
|
||||
| your installation, but due to security concerns the hostname will be set
|
||||
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
|
||||
| The auto-detection mechanism exists only for convenience during
|
||||
| development and MUST NOT be used in production!
|
||||
|
|
||||
| If you need to allow multiple domains, remember that this file is still
|
||||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
//$config['base_url'] = 'http://localhost/erisn-classroom-lms/';
|
||||
|
||||
/*$root = "https://".$_SERVER['HTTP_HOST'];
|
||||
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
$config['base_url'] = $root;*/
|
||||
|
||||
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
|
||||
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
|
||||
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically this will be your index.php file, unless you've renamed it to
|
||||
| something else. If you are using mod_rewrite to remove the page set this
|
||||
| variable so that it is blank.
|
||||
|
|
||||
*/
|
||||
$config['index_page'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URI PROTOCOL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item determines which server global should be used to retrieve the
|
||||
| URI string. The default setting of 'REQUEST_URI' works for most servers.
|
||||
| If your links do not seem to work, try one of the other delicious flavors:
|
||||
|
|
||||
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
|
||||
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
|
||||
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
||||
|
|
||||
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||
*/
|
||||
$config['uri_protocol'] = 'REQUEST_URI';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URL suffix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||
| For more information please see the user guide:
|
||||
|
|
||||
| https://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
$config['url_suffix'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Language
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which set of language files should be used. Make sure
|
||||
| there is an available translation if you intend to use something other
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = 'english';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Character Set
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which character set is used by default in various methods
|
||||
| that require a character set to be provided.
|
||||
|
|
||||
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
||||
|
|
||||
*/
|
||||
$config['charset'] = 'UTF-8';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable System Hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you would like to use the 'hooks' feature you must enable it by
|
||||
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||
|
|
||||
*/
|
||||
$config['enable_hooks'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Extension Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item allows you to set the filename/classname prefix when extending
|
||||
| native libraries. For more information please see the user guide:
|
||||
|
|
||||
| https://codeigniter.com/user_guide/general/core_classes.html
|
||||
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
||||
|
|
||||
*/
|
||||
$config['subclass_prefix'] = 'MY_';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Composer auto-loading
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enabling this setting will tell CodeIgniter to look for a Composer
|
||||
| package auto-loader script in application/vendor/autoload.php.
|
||||
|
|
||||
| $config['composer_autoload'] = TRUE;
|
||||
|
|
||||
| Or if you have your vendor/ directory located somewhere else, you
|
||||
| can opt to set a specific path as well:
|
||||
|
|
||||
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
||||
|
|
||||
| For more information about Composer, please visit http://getcomposer.org/
|
||||
|
|
||||
| Note: This will NOT disable or override the CodeIgniter-specific
|
||||
| autoloading (application/config/autoload.php)
|
||||
*/
|
||||
$config['composer_autoload'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed URL Characters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This lets you specify which characters are permitted within your URLs.
|
||||
| When someone tries to submit a URL with disallowed characters they will
|
||||
| get a warning message.
|
||||
|
|
||||
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||
|
|
||||
| Leave blank to allow all characters -- but only if you are insane.
|
||||
|
|
||||
| The configured value is actually a regular expression character group
|
||||
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
||||
|
|
||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||
|
|
||||
*/
|
||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable Query Strings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||
| example.com/who/what/where/
|
||||
|
|
||||
| You can optionally enable standard query string based URLs:
|
||||
| example.com?who=me&what=something&where=here
|
||||
|
|
||||
| Options are: TRUE or FALSE (boolean)
|
||||
|
|
||||
| The other items let you set the query string 'words' that will
|
||||
| invoke your controllers and its functions:
|
||||
| example.com/index.php?c=controller&m=function
|
||||
|
|
||||
| Please note that some of the helpers won't work as expected when
|
||||
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||
| use segment based URLs.
|
||||
|
|
||||
*/
|
||||
$config['enable_query_strings'] = FALSE;
|
||||
$config['controller_trigger'] = 'c';
|
||||
$config['function_trigger'] = 'm';
|
||||
$config['directory_trigger'] = 'd';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allow $_GET array
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||
|
|
||||
| WARNING: This feature is DEPRECATED and currently available only
|
||||
| for backwards compatibility purposes!
|
||||
|
|
||||
*/
|
||||
$config['allow_get_array'] = TRUE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Threshold
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can enable error logging by setting a threshold over zero. The
|
||||
| threshold determines what gets logged. Threshold options are:
|
||||
|
|
||||
| 0 = Disables logging, Error logging TURNED OFF
|
||||
| 1 = Error Messages (including PHP errors)
|
||||
| 2 = Debug Messages
|
||||
| 3 = Informational Messages
|
||||
| 4 = All Messages
|
||||
|
|
||||
| You can also pass an array with threshold levels to show individual error types
|
||||
|
|
||||
| array(2) = Debug Messages, without Error Messages
|
||||
|
|
||||
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||
| your log files will fill up very fast.
|
||||
|
|
||||
*/
|
||||
$config['log_threshold'] = 0;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/logs/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['log_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log File Extension
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default filename extension for log files. The default 'php' allows for
|
||||
| protecting the log files via basic scripting, when they are to be stored
|
||||
| under a publicly accessible directory.
|
||||
|
|
||||
| Note: Leaving it blank will default to 'php'.
|
||||
|
|
||||
*/
|
||||
$config['log_file_extension'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log File Permissions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The file system permissions to be applied on newly created log files.
|
||||
|
|
||||
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|
||||
| integer notation (i.e. 0700, 0644, etc.)
|
||||
*/
|
||||
$config['log_file_permissions'] = 0644;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date Format for Logs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Each item that is logged has an associated date. You can use PHP date
|
||||
| codes to set your own date formatting
|
||||
|
|
||||
*/
|
||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Views Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/views/errors/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['error_views_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/cache/ directory. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['cache_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Include Query String
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Whether to take the URL query string into consideration when generating
|
||||
| output cache files. Valid options are:
|
||||
|
|
||||
| FALSE = Disabled
|
||||
| TRUE = Enabled, take all query parameters into account.
|
||||
| Please be aware that this may result in numerous cache
|
||||
| files generated for the same page over and over again.
|
||||
| array('q') = Enabled, but only take into account the specified list
|
||||
| of query parameters.
|
||||
|
|
||||
*/
|
||||
$config['cache_query_string'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you use the Encryption class, you must set an encryption key.
|
||||
| See the user guide for more info.
|
||||
|
|
||||
| https://codeigniter.com/user_guide/libraries/encryption.html
|
||||
|
|
||||
*/
|
||||
$config['encryption_key'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'sess_driver'
|
||||
|
|
||||
| The storage driver to use: files, database, redis, memcached
|
||||
|
|
||||
| 'sess_cookie_name'
|
||||
|
|
||||
| The session cookie name, must contain only [0-9a-z_-] characters
|
||||
|
|
||||
| 'sess_expiration'
|
||||
|
|
||||
| The number of SECONDS you want the session to last.
|
||||
| Setting to 0 (zero) means expire when the browser is closed.
|
||||
|
|
||||
| 'sess_save_path'
|
||||
|
|
||||
| The location to save sessions to, driver dependent.
|
||||
|
|
||||
| For the 'files' driver, it's a path to a writable directory.
|
||||
| WARNING: Only absolute paths are supported!
|
||||
|
|
||||
| For the 'database' driver, it's a table name.
|
||||
| Please read up the manual for the format with other session drivers.
|
||||
|
|
||||
| IMPORTANT: You are REQUIRED to set a valid save path!
|
||||
|
|
||||
| 'sess_match_ip'
|
||||
|
|
||||
| Whether to match the user's IP address when reading the session data.
|
||||
|
|
||||
| WARNING: If you're using the database driver, don't forget to update
|
||||
| your session table's PRIMARY KEY when changing this setting.
|
||||
|
|
||||
| 'sess_time_to_update'
|
||||
|
|
||||
| How many seconds between CI regenerating the session ID.
|
||||
|
|
||||
| 'sess_regenerate_destroy'
|
||||
|
|
||||
| Whether to destroy session data associated with the old session ID
|
||||
| when auto-regenerating the session ID. When set to FALSE, the data
|
||||
| will be later deleted by the garbage collector.
|
||||
|
|
||||
| Other session cookie settings are shared with the rest of the application,
|
||||
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
||||
|
|
||||
*/
|
||||
$config['sess_driver'] = 'files';
|
||||
$config['sess_cookie_name'] = 'ci_session';
|
||||
$config['sess_expiration'] = 7200;
|
||||
$config['sess_save_path'] = 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)
|
||||
|
|
||||
| Note: These settings (with the exception of 'cookie_prefix' and
|
||||
| 'cookie_httponly') will also affect sessions.
|
||||
|
|
||||
*/
|
||||
$config['cookie_prefix'] = '';
|
||||
$config['cookie_domain'] = '';
|
||||
$config['cookie_path'] = '/';
|
||||
$config['cookie_secure'] = FALSE;
|
||||
$config['cookie_httponly'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Standardize newlines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether to standardize newline characters in input data,
|
||||
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
||||
|
|
||||
| WARNING: This feature is DEPRECATED and currently available only
|
||||
| for backwards compatibility purposes!
|
||||
|
|
||||
*/
|
||||
$config['standardize_newlines'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global XSS Filtering
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether the XSS filter is always active when GET, POST or
|
||||
| COOKIE data is encountered
|
||||
|
|
||||
| WARNING: This feature is DEPRECATED and currently available only
|
||||
| for backwards compatibility purposes!
|
||||
|
|
||||
*/
|
||||
$config['global_xss_filtering'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross Site Request Forgery
|
||||
|--------------------------------------------------------------------------
|
||||
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||
| recommended CSRF protection be enabled.
|
||||
|
|
||||
| 'csrf_token_name' = The token name
|
||||
| 'csrf_cookie_name' = The cookie name
|
||||
| 'csrf_expire' = The number in seconds the token should expire.
|
||||
| 'csrf_regenerate' = Regenerate token on every submission
|
||||
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||
*/
|
||||
$config['csrf_protection'] = FALSE;
|
||||
$config['csrf_token_name'] = 'csrf_test_name';
|
||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||
$config['csrf_expire'] = 7200;
|
||||
$config['csrf_regenerate'] = TRUE;
|
||||
$config['csrf_exclude_uris'] = array();
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Output Compression
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enables Gzip output compression for faster page loads. When enabled,
|
||||
| the output class will test whether your server supports Gzip.
|
||||
| Even if it does, however, not all browsers support compression
|
||||
| so enable only if you are reasonably sure your visitors can handle it.
|
||||
|
|
||||
| Only used if zlib.output_compression is turned off in your php.ini.
|
||||
| Please do not use it together with httpd-level output compression.
|
||||
|
|
||||
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||
| means you are prematurely outputting something to your browser. It could
|
||||
| even be a line of whitespace at the end of one of your scripts. For
|
||||
| compression to work, nothing can be sent before the output buffer is called
|
||||
| by the output class. Do not 'echo' any values with compression enabled.
|
||||
|
|
||||
*/
|
||||
$config['compress_output'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Master Time Reference
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Options are 'local' or any PHP supported timezone. This preference tells
|
||||
| the system whether to use your server's local time as the master 'now'
|
||||
| reference, or convert it to the configured one timezone. See the 'date
|
||||
| helper' page of the user guide for information regarding date handling.
|
||||
|
|
||||
*/
|
||||
$config['time_reference'] = 'local';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Rewrite PHP Short Tags
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your PHP installation does not have short tag support enabled CI
|
||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||
| in your view files. Options are TRUE or FALSE (boolean)
|
||||
|
|
||||
| Note: You need to have eval() enabled for this to work.
|
||||
|
|
||||
*/
|
||||
$config['rewrite_short_tags'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reverse Proxy IPs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your server is behind a reverse proxy, you must whitelist the proxy
|
||||
| IP addresses from which CodeIgniter should trust headers such as
|
||||
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
|
||||
| the visitor's IP address.
|
||||
|
|
||||
| You can use both an array or a comma-separated list of proxy addresses,
|
||||
| as well as specifying whole subnets. Here are a few examples:
|
||||
|
|
||||
| Comma-separated: '10.0.1.200,192.168.5.0/24'
|
||||
| Array: array('10.0.1.200', '192.168.5.0/24')
|
||||
*/
|
||||
$config['proxy_ips'] = '';
|
98
library/application/config/constants.php
Normal file
98
library/application/config/constants.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?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
|
||||
|
||||
define('THE_ADD_SUCCESS_MSG', "The %s has been added successfully");
|
||||
define('THE_UPDATE_SUCCESS_MSG', "The %s has been updated successfully");
|
||||
define('THE_DELETE_ALERT_MSG', "Are you sure, you want to delete this %s");
|
||||
|
||||
define('THE_ADD_ERROR_MSG', "Oops.. Something went wrong while adding the %s");
|
||||
define('THE_UPDATE_ERROR_MSG', "Oops.. Something went wrong while updating the %s");
|
||||
|
||||
|
||||
define('STUDENT_PROFILE_PATH',"https://ezydemo.com/erisn-classroom/assets_student/application/");
|
||||
|
||||
define('DATE_FORMAT', 'd-m-Y');
|
||||
|
120
library/application/config/database.php
Normal file
120
library/application/config/database.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?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' => '',
|
||||
'password' => 'root',
|
||||
'database' => 'demo_library',
|
||||
'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
|
||||
);
|
||||
|
||||
$db['erisnClassroom'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'root',
|
||||
'password' => 'root',
|
||||
'database' => 'demo_main_classroom',
|
||||
'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
|
||||
);
|
24
library/application/config/doctypes.php
Normal file
24
library/application/config/doctypes.php
Normal 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">'
|
||||
);
|
114
library/application/config/foreign_chars.php
Normal file
114
library/application/config/foreign_chars.php
Normal 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'
|
||||
);
|
13
library/application/config/hooks.php
Normal file
13
library/application/config/hooks.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Hooks
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you define "hooks" to extend CI without hacking the core
|
||||
| files. Please see the user guide for info:
|
||||
|
|
||||
| https://codeigniter.com/user_guide/general/hooks.html
|
||||
|
|
||||
*/
|
11
library/application/config/index.html
Normal file
11
library/application/config/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
19
library/application/config/memcached.php
Normal file
19
library/application/config/memcached.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Memcached settings
|
||||
| -------------------------------------------------------------------------
|
||||
| Your Memcached servers can be specified below.
|
||||
|
|
||||
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
||||
|
|
||||
*/
|
||||
$config = array(
|
||||
'default' => array(
|
||||
'hostname' => '127.0.0.1',
|
||||
'port' => '11211',
|
||||
'weight' => '1',
|
||||
),
|
||||
);
|
84
library/application/config/migration.php
Normal file
84
library/application/config/migration.php
Normal 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/';
|
184
library/application/config/mimes.php
Normal file
184
library/application/config/mimes.php
Normal file
@ -0,0 +1,184 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| MIME TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of mime types. It is used by the
|
||||
| Upload class to help identify allowed file types.
|
||||
|
|
||||
*/
|
||||
return array(
|
||||
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
|
||||
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
|
||||
'dms' => 'application/octet-stream',
|
||||
'lha' => 'application/octet-stream',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||
'class' => 'application/octet-stream',
|
||||
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
|
||||
'so' => 'application/octet-stream',
|
||||
'sea' => 'application/octet-stream',
|
||||
'dll' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
|
||||
'ai' => array('application/pdf', 'application/postscript'),
|
||||
'eps' => 'application/postscript',
|
||||
'ps' => 'application/postscript',
|
||||
'smi' => 'application/smil',
|
||||
'smil' => 'application/smil',
|
||||
'mif' => 'application/vnd.mif',
|
||||
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
|
||||
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
|
||||
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
|
||||
'wbxml' => 'application/wbxml',
|
||||
'wmlc' => 'application/wmlc',
|
||||
'dcr' => 'application/x-director',
|
||||
'dir' => 'application/x-director',
|
||||
'dxr' => 'application/x-director',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gz' => 'application/x-gzip',
|
||||
'gzip' => 'application/x-gzip',
|
||||
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
|
||||
'php4' => 'application/x-httpd-php',
|
||||
'php3' => 'application/x-httpd-php',
|
||||
'phtml' => 'application/x-httpd-php',
|
||||
'phps' => 'application/x-httpd-php-source',
|
||||
'js' => array('application/x-javascript', 'text/plain'),
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'tar' => 'application/x-tar',
|
||||
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||
'z' => 'application/x-compress',
|
||||
'xhtml' => 'application/xhtml+xml',
|
||||
'xht' => 'application/xhtml+xml',
|
||||
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
|
||||
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||
'aif' => array('audio/x-aiff', 'audio/aiff'),
|
||||
'aiff' => array('audio/x-aiff', 'audio/aiff'),
|
||||
'aifc' => 'audio/x-aiff',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'rm' => 'audio/x-pn-realaudio',
|
||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||
'ra' => 'audio/x-realaudio',
|
||||
'rv' => 'video/vnd.rn-realvideo',
|
||||
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
||||
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
|
||||
'gif' => 'image/gif',
|
||||
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||
'png' => array('image/png', 'image/x-png'),
|
||||
'tiff' => 'image/tiff',
|
||||
'tif' => 'image/tiff',
|
||||
'css' => array('text/css', 'text/plain'),
|
||||
'html' => array('text/html', 'text/plain'),
|
||||
'htm' => array('text/html', 'text/plain'),
|
||||
'shtml' => array('text/html', 'text/plain'),
|
||||
'txt' => 'text/plain',
|
||||
'text' => 'text/plain',
|
||||
'log' => array('text/plain', 'text/x-log'),
|
||||
'rtx' => 'text/richtext',
|
||||
'rtf' => 'text/rtf',
|
||||
'xml' => array('application/xml', 'text/xml', 'text/plain'),
|
||||
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
'qt' => 'video/quicktime',
|
||||
'mov' => 'video/quicktime',
|
||||
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'doc' => array('application/msword', 'application/vnd.ms-office'),
|
||||
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
|
||||
'dot' => array('application/msword', 'application/vnd.ms-office'),
|
||||
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
|
||||
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
|
||||
'word' => array('application/msword', 'application/octet-stream'),
|
||||
'xl' => 'application/excel',
|
||||
'eml' => 'message/rfc822',
|
||||
'json' => array('application/json', 'text/json'),
|
||||
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
|
||||
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
|
||||
'p12' => 'application/x-pkcs12',
|
||||
'p7a' => 'application/x-pkcs7-signature',
|
||||
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||
'p7s' => 'application/pkcs7-signature',
|
||||
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
|
||||
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
|
||||
'der' => 'application/x-x509-ca-cert',
|
||||
'kdb' => 'application/octet-stream',
|
||||
'pgp' => 'application/pgp',
|
||||
'gpg' => 'application/gpg-keys',
|
||||
'sst' => 'application/octet-stream',
|
||||
'csr' => 'application/octet-stream',
|
||||
'rsa' => 'application/x-pkcs7',
|
||||
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
|
||||
'3g2' => 'video/3gpp2',
|
||||
'3gp' => array('video/3gp', 'video/3gpp'),
|
||||
'mp4' => 'video/mp4',
|
||||
'm4a' => 'audio/x-m4a',
|
||||
'f4v' => array('video/mp4', 'video/x-f4v'),
|
||||
'flv' => 'video/x-flv',
|
||||
'webm' => 'video/webm',
|
||||
'aac' => array('audio/x-aac', 'audio/aac'),
|
||||
'm4u' => 'application/vnd.mpegurl',
|
||||
'm3u' => 'text/plain',
|
||||
'xspf' => 'application/xspf+xml',
|
||||
'vlc' => 'application/videolan',
|
||||
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
|
||||
'au' => 'audio/x-au',
|
||||
'ac3' => 'audio/ac3',
|
||||
'flac' => 'audio/x-flac',
|
||||
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
|
||||
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
|
||||
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
|
||||
'ics' => 'text/calendar',
|
||||
'ical' => 'text/calendar',
|
||||
'zsh' => 'text/x-scriptzsh',
|
||||
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
|
||||
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
|
||||
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
|
||||
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
|
||||
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
|
||||
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
|
||||
'vcf' => 'text/x-vcard',
|
||||
'srt' => array('text/srt', 'text/plain'),
|
||||
'vtt' => array('text/vtt', 'text/plain'),
|
||||
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
|
||||
'odc' => 'application/vnd.oasis.opendocument.chart',
|
||||
'otc' => 'application/vnd.oasis.opendocument.chart-template',
|
||||
'odf' => 'application/vnd.oasis.opendocument.formula',
|
||||
'otf' => 'application/vnd.oasis.opendocument.formula-template',
|
||||
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
|
||||
'odi' => 'application/vnd.oasis.opendocument.image',
|
||||
'oti' => 'application/vnd.oasis.opendocument.image-template',
|
||||
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
|
||||
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
||||
);
|
14
library/application/config/profiler.php
Normal file
14
library/application/config/profiler.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Profiler Sections
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you determine whether or not various sections of Profiler
|
||||
| data are displayed when the Profiler is enabled.
|
||||
| Please see the user guide for info:
|
||||
|
|
||||
| https://codeigniter.com/user_guide/general/profiling.html
|
||||
|
|
||||
*/
|
90
library/application/config/routes.php
Normal file
90
library/application/config/routes.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| URI ROUTING
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you re-map URI requests to specific controller functions.
|
||||
|
|
||||
| Typically there is a one-to-one relationship between a URL string
|
||||
| and its corresponding controller class/method. The segments in a
|
||||
| URL normally follow this pattern:
|
||||
|
|
||||
| example.com/class/method/id/
|
||||
|
|
||||
| In some instances, however, you may want to remap this relationship
|
||||
| so that a different class/function is called than the one
|
||||
| corresponding to the URL.
|
||||
|
|
||||
| Please see the user guide for complete details:
|
||||
|
|
||||
| https://codeigniter.com/user_guide/general/routing.html
|
||||
|
|
||||
| -------------------------------------------------------------------------
|
||||
| RESERVED ROUTES
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| There are three reserved routes:
|
||||
|
|
||||
| $route['default_controller'] = 'welcome';
|
||||
|
|
||||
| This route indicates which controller class should be loaded if the
|
||||
| URI contains no data. In the above example, the "welcome" class
|
||||
| would be loaded.
|
||||
|
|
||||
| $route['404_override'] = 'errors/page_missing';
|
||||
|
|
||||
| This route will tell the Router which controller/method to use if those
|
||||
| provided in the URL cannot be matched to a valid route.
|
||||
|
|
||||
| $route['translate_uri_dashes'] = FALSE;
|
||||
|
|
||||
| This is not exactly a route, but allows you to automatically route
|
||||
| controller and method names that contain dashes. '-' isn't a valid
|
||||
| class or method name character, so it requires translation.
|
||||
| When you set this option to TRUE, it will replace ALL dashes in the
|
||||
| controller and method URI segments.
|
||||
|
|
||||
| Examples: my-controller/index -> my_controller/index
|
||||
| my-controller/my-method -> my_controller/my_method
|
||||
*/
|
||||
$route['default_controller'] = 'welcome';
|
||||
|
||||
$route['admin'] = 'LmsAdmin/login';
|
||||
$route['logout'] = 'LmsAdmin/logout';
|
||||
|
||||
$route['dashboard'] = 'LmsAdmin/dashboard';
|
||||
|
||||
$route['roles'] = 'LmsAdmin/roles';
|
||||
$route['add-edit-role/(:any)'] = 'LmsAdmin/add_edit_role/$1';
|
||||
$route['users'] = 'LmsAdmin/users';
|
||||
$route['add-edit-user/(:any)'] = 'LmsAdmin/add_edit_user/$1';
|
||||
|
||||
$route['books'] = 'LmsAdmin/books';
|
||||
$route['add-edit-book/(:any)'] = 'LmsAdmin/add_edit_book/$1';
|
||||
$route['importBooks'] = 'LmsAdmin/importBooks';
|
||||
|
||||
$route['issued-books'] = 'LmsAdmin/issued_books';
|
||||
$route['add-edit-issue-book/(:any)'] = 'LmsAdmin/add_edit_issue_book/$1';
|
||||
|
||||
$route['returned-books'] = 'LmsAdmin/returned_books';
|
||||
$route['receive-book'] = 'LmsAdmin/receive_book';
|
||||
$route['receive-book-detail/(:any)'] = 'LmsAdmin/receive_book_detail/$1';
|
||||
|
||||
$route['students'] = 'LmsAdmin/students';
|
||||
$route['students-info/(:num)'] = 'LmsAdmin/students_info/$1';
|
||||
|
||||
$route['damaged-books'] = 'LmsAdmin/damaged_books';
|
||||
$route['damaged-books-details/(:num)'] = 'LmsAdmin/damaged_books_details/$1';
|
||||
|
||||
$route['general-settings'] = 'LmsAdmin/generalSettings';
|
||||
$route['category'] = 'LmsAdmin/getCategoryData';
|
||||
|
||||
$route['forgot-password'] = 'LmsAdmin/forgot_password';
|
||||
$route['reset-password/(:any)'] = 'LmsAdmin/reset_password/$1';
|
||||
|
||||
$route['404_override'] = '';
|
||||
$route['translate_uri_dashes'] = FALSE;
|
||||
|
||||
$route['add/(:any)'] = 'LmsAdmin/add_student/';
|
64
library/application/config/smileys.php
Normal file
64
library/application/config/smileys.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| SMILEYS
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of smileys for use with the emoticon helper.
|
||||
| Individual images can be used to replace multiple smileys. For example:
|
||||
| :-) and :) use the same image replacement.
|
||||
|
|
||||
| Please see user guide for more info:
|
||||
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||
|
|
||||
*/
|
||||
$smileys = array(
|
||||
|
||||
// smiley image name width height alt
|
||||
|
||||
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
||||
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
|
||||
':question:' => array('question.gif', '19', '19', 'question')
|
||||
|
||||
);
|
216
library/application/config/user_agents.php
Normal file
216
library/application/config/user_agents.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| USER AGENT TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains four arrays of user agent data. It is used by the
|
||||
| User Agent Class to help identify browser, platform, robot, and
|
||||
| mobile device data. The array keys are used to identify the device
|
||||
| and the array values are used to set the actual name of the item.
|
||||
*/
|
||||
$platforms = array(
|
||||
'windows nt 10.0' => 'Windows 10',
|
||||
'windows nt 6.3' => 'Windows 8.1',
|
||||
'windows nt 6.2' => 'Windows 8',
|
||||
'windows nt 6.1' => 'Windows 7',
|
||||
'windows nt 6.0' => 'Windows Vista',
|
||||
'windows nt 5.2' => 'Windows 2003',
|
||||
'windows nt 5.1' => 'Windows XP',
|
||||
'windows nt 5.0' => 'Windows 2000',
|
||||
'windows nt 4.0' => 'Windows NT 4.0',
|
||||
'winnt4.0' => 'Windows NT 4.0',
|
||||
'winnt 4.0' => 'Windows NT',
|
||||
'winnt' => 'Windows NT',
|
||||
'windows 98' => 'Windows 98',
|
||||
'win98' => 'Windows 98',
|
||||
'windows 95' => 'Windows 95',
|
||||
'win95' => 'Windows 95',
|
||||
'windows phone' => 'Windows Phone',
|
||||
'windows' => 'Unknown Windows OS',
|
||||
'android' => 'Android',
|
||||
'blackberry' => 'BlackBerry',
|
||||
'iphone' => 'iOS',
|
||||
'ipad' => 'iOS',
|
||||
'ipod' => 'iOS',
|
||||
'os x' => 'Mac OS X',
|
||||
'ppc mac' => 'Power PC Mac',
|
||||
'freebsd' => 'FreeBSD',
|
||||
'ppc' => 'Macintosh',
|
||||
'linux' => 'Linux',
|
||||
'debian' => 'Debian',
|
||||
'sunos' => 'Sun Solaris',
|
||||
'beos' => 'BeOS',
|
||||
'apachebench' => 'ApacheBench',
|
||||
'aix' => 'AIX',
|
||||
'irix' => 'Irix',
|
||||
'osf' => 'DEC OSF',
|
||||
'hp-ux' => 'HP-UX',
|
||||
'netbsd' => 'NetBSD',
|
||||
'bsdi' => 'BSDi',
|
||||
'openbsd' => 'OpenBSD',
|
||||
'gnu' => 'GNU/Linux',
|
||||
'unix' => 'Unknown Unix OS',
|
||||
'symbian' => 'Symbian OS'
|
||||
);
|
||||
|
||||
|
||||
// The order of this array should NOT be changed. Many browsers return
|
||||
// multiple browser types so we want to identify the sub-type first.
|
||||
$browsers = array(
|
||||
'OPR' => 'Opera',
|
||||
'Flock' => 'Flock',
|
||||
'Edge' => 'Edge',
|
||||
'Chrome' => 'Chrome',
|
||||
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
||||
'Opera.*?Version' => 'Opera',
|
||||
'Opera' => 'Opera',
|
||||
'MSIE' => 'Internet Explorer',
|
||||
'Internet Explorer' => 'Internet Explorer',
|
||||
'Trident.* rv' => 'Internet Explorer',
|
||||
'Shiira' => 'Shiira',
|
||||
'Firefox' => 'Firefox',
|
||||
'Chimera' => 'Chimera',
|
||||
'Phoenix' => 'Phoenix',
|
||||
'Firebird' => 'Firebird',
|
||||
'Camino' => 'Camino',
|
||||
'Netscape' => 'Netscape',
|
||||
'OmniWeb' => 'OmniWeb',
|
||||
'Safari' => 'Safari',
|
||||
'Mozilla' => 'Mozilla',
|
||||
'Konqueror' => 'Konqueror',
|
||||
'icab' => 'iCab',
|
||||
'Lynx' => 'Lynx',
|
||||
'Links' => 'Links',
|
||||
'hotjava' => 'HotJava',
|
||||
'amaya' => 'Amaya',
|
||||
'IBrowse' => 'IBrowse',
|
||||
'Maxthon' => 'Maxthon',
|
||||
'Ubuntu' => 'Ubuntu Web Browser'
|
||||
);
|
||||
|
||||
$mobiles = array(
|
||||
// legacy array, old values commented out
|
||||
'mobileexplorer' => 'Mobile Explorer',
|
||||
// 'openwave' => 'Open Wave',
|
||||
// 'opera mini' => 'Opera Mini',
|
||||
// 'operamini' => 'Opera Mini',
|
||||
// 'elaine' => 'Palm',
|
||||
'palmsource' => 'Palm',
|
||||
// 'digital paths' => 'Palm',
|
||||
// 'avantgo' => 'Avantgo',
|
||||
// 'xiino' => 'Xiino',
|
||||
'palmscape' => 'Palmscape',
|
||||
// 'nokia' => 'Nokia',
|
||||
// 'ericsson' => 'Ericsson',
|
||||
// 'blackberry' => 'BlackBerry',
|
||||
// 'motorola' => 'Motorola'
|
||||
|
||||
// Phones and Manufacturers
|
||||
'motorola' => 'Motorola',
|
||||
'nokia' => 'Nokia',
|
||||
'nexus' => 'Nexus',
|
||||
'palm' => 'Palm',
|
||||
'iphone' => 'Apple iPhone',
|
||||
'ipad' => 'iPad',
|
||||
'ipod' => 'Apple iPod Touch',
|
||||
'sony' => 'Sony Ericsson',
|
||||
'ericsson' => 'Sony Ericsson',
|
||||
'blackberry' => 'BlackBerry',
|
||||
'cocoon' => 'O2 Cocoon',
|
||||
'blazer' => 'Treo',
|
||||
'lg' => 'LG',
|
||||
'amoi' => 'Amoi',
|
||||
'xda' => 'XDA',
|
||||
'mda' => 'MDA',
|
||||
'vario' => 'Vario',
|
||||
'htc' => 'HTC',
|
||||
'samsung' => 'Samsung',
|
||||
'sharp' => 'Sharp',
|
||||
'sie-' => 'Siemens',
|
||||
'alcatel' => 'Alcatel',
|
||||
'benq' => 'BenQ',
|
||||
'ipaq' => 'HP iPaq',
|
||||
'mot-' => 'Motorola',
|
||||
'playstation portable' => 'PlayStation Portable',
|
||||
'playstation 3' => 'PlayStation 3',
|
||||
'playstation vita' => 'PlayStation Vita',
|
||||
'hiptop' => 'Danger Hiptop',
|
||||
'nec-' => 'NEC',
|
||||
'panasonic' => 'Panasonic',
|
||||
'philips' => 'Philips',
|
||||
'sagem' => 'Sagem',
|
||||
'sanyo' => 'Sanyo',
|
||||
'spv' => 'SPV',
|
||||
'zte' => 'ZTE',
|
||||
'sendo' => 'Sendo',
|
||||
'nintendo dsi' => 'Nintendo DSi',
|
||||
'nintendo ds' => 'Nintendo DS',
|
||||
'nintendo 3ds' => 'Nintendo 3DS',
|
||||
'wii' => 'Nintendo Wii',
|
||||
'open web' => 'Open Web',
|
||||
'openweb' => 'OpenWeb',
|
||||
'meizu' => 'Meizu',
|
||||
|
||||
// Operating Systems
|
||||
'android' => 'Android',
|
||||
'symbian' => 'Symbian',
|
||||
'SymbianOS' => 'SymbianOS',
|
||||
'elaine' => 'Palm',
|
||||
'series60' => 'Symbian S60',
|
||||
'windows ce' => 'Windows CE',
|
||||
|
||||
// Browsers
|
||||
'obigo' => 'Obigo',
|
||||
'netfront' => 'Netfront Browser',
|
||||
'openwave' => 'Openwave Browser',
|
||||
'mobilexplorer' => 'Mobile Explorer',
|
||||
'operamini' => 'Opera Mini',
|
||||
'opera mini' => 'Opera Mini',
|
||||
'opera mobi' => 'Opera Mobile',
|
||||
'fennec' => 'Firefox Mobile',
|
||||
|
||||
// Other
|
||||
'digital paths' => 'Digital Paths',
|
||||
'avantgo' => 'AvantGo',
|
||||
'xiino' => 'Xiino',
|
||||
'novarra' => 'Novarra Transcoder',
|
||||
'vodafone' => 'Vodafone',
|
||||
'docomo' => 'NTT DoCoMo',
|
||||
'o2' => 'O2',
|
||||
|
||||
// Fallback
|
||||
'mobile' => 'Generic Mobile',
|
||||
'wireless' => 'Generic Mobile',
|
||||
'j2me' => 'Generic Mobile',
|
||||
'midp' => 'Generic Mobile',
|
||||
'cldc' => 'Generic Mobile',
|
||||
'up.link' => 'Generic Mobile',
|
||||
'up.browser' => 'Generic Mobile',
|
||||
'smartphone' => 'Generic Mobile',
|
||||
'cellphone' => 'Generic Mobile'
|
||||
);
|
||||
|
||||
// There are hundreds of bots but these are the most common.
|
||||
$robots = array(
|
||||
'googlebot' => 'Googlebot',
|
||||
'msnbot' => 'MSNBot',
|
||||
'baiduspider' => 'Baiduspider',
|
||||
'bingbot' => 'Bing',
|
||||
'slurp' => 'Inktomi Slurp',
|
||||
'yahoo' => 'Yahoo',
|
||||
'ask jeeves' => 'Ask Jeeves',
|
||||
'fastcrawler' => 'FastCrawler',
|
||||
'infoseek' => 'InfoSeek Robot 1.0',
|
||||
'lycos' => 'Lycos',
|
||||
'yandex' => 'YandexBot',
|
||||
'mediapartners-google' => 'MediaPartners Google',
|
||||
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
|
||||
'adsbot-google' => 'AdsBot Google',
|
||||
'feedfetcher-google' => 'Feedfetcher Google',
|
||||
'curious george' => 'Curious George',
|
||||
'ia_archiver' => 'Alexa Crawler',
|
||||
'MJ12bot' => 'Majestic-12',
|
||||
'Uptimebot' => 'Uptimebot'
|
||||
);
|
1300
library/application/controllers/LmsAdmin.php
Normal file
1300
library/application/controllers/LmsAdmin.php
Normal file
File diff suppressed because it is too large
Load Diff
25
library/application/controllers/Welcome.php
Normal file
25
library/application/controllers/Welcome.php
Normal 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/user_guide/general/urls.html
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('welcome_message');
|
||||
}
|
||||
}
|
11
library/application/controllers/index.html
Normal file
11
library/application/controllers/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/core/index.html
Normal file
11
library/application/core/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
79
library/application/helpers/common_helper.php
Normal file
79
library/application/helpers/common_helper.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
function urlsafe_b64encode($string)
|
||||
{
|
||||
$data = base64_encode($string);
|
||||
$data = str_replace(array('+','/','='),array('-','_',''),$data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
function urlsafe_b64decode($string) {
|
||||
$data = str_replace(array('-','_'),array('+','/'),$string);
|
||||
$mod4 = strlen($data) % 4;
|
||||
if ($mod4) {
|
||||
$data .= substr('====', $mod4);
|
||||
}
|
||||
return base64_decode($data);
|
||||
}
|
||||
|
||||
/*function loggedin_admin_user_permissions()
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('AdminRule_Model');
|
||||
$adminRules = $CI->AdminRule_Model->get_admin_rule_details('', "SELECT menu_id FROM admin_rule WHERE role_id=".$CI->session->userdata('role_id'));
|
||||
return $adminRules;
|
||||
}*/
|
||||
|
||||
|
||||
function ciSendEmail($data=array())
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$CI->load->library('email');
|
||||
|
||||
//$CI->email->clear();
|
||||
//$config['mailtype'] = 'html';
|
||||
//$CI->email->initialize($config);
|
||||
|
||||
$CI->email->from('bb.blackboardnepal@gmail.com', 'Black - Library');
|
||||
$CI->email->to($data['to']);
|
||||
|
||||
//if(isset($data['cc_to']) && $data['cc_to']!='')
|
||||
//$CI->email->cc($data['cc_to']);
|
||||
|
||||
$CI->email->subject($data['subject']);
|
||||
$CI->email->message($data['message']);
|
||||
$CI->email->set_mailtype('html');
|
||||
|
||||
$res = $CI->email->send();
|
||||
//echo $res;exit;
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
function cuurentNepaliDate($dateObj)
|
||||
{
|
||||
$date_arr = explode('-', date('Y-m-d'));
|
||||
list($y, $m, $d) = $date_arr;
|
||||
|
||||
// Convert BS to AD.
|
||||
$datearr = $dateObj->convertAdToBs($y, $m, $d);
|
||||
extract($datearr);
|
||||
$string = $year.'-'.$month.'-'.$day;
|
||||
$date = date_create_from_format('Y-m-d', $string);
|
||||
return $php_date = date_format($date, 'Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
|
||||
function convert_ADdate_to_BSdate($dateObj,$date,$character='-')
|
||||
{
|
||||
$date_arr = explode('-', $date);
|
||||
list($y, $m, $d) = $date_arr;
|
||||
$datearr = $dateObj->convertAdToBs($y, $m, $d);
|
||||
extract($datearr);
|
||||
$string = $year.'-'.$month.'-'.$day;
|
||||
$date = date_create_from_format('Y-m-d', $string);
|
||||
return $php_date = date_format($date, 'Y-m-d');
|
||||
}
|
||||
|
||||
|
||||
?>
|
11
library/application/helpers/index.html
Normal file
11
library/application/helpers/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/hooks/index.html
Normal file
11
library/application/hooks/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/index.html
Normal file
11
library/application/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/language/english/index.html
Normal file
11
library/application/language/english/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/language/index.html
Normal file
11
library/application/language/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/libraries/index.html
Normal file
11
library/application/libraries/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/logs/index.html
Normal file
11
library/application/logs/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
576
library/application/models/LmsAdmin_Model.php
Normal file
576
library/application/models/LmsAdmin_Model.php
Normal file
@ -0,0 +1,576 @@
|
||||
<?php
|
||||
|
||||
use Nilambar\NepaliDate\NepaliDate;
|
||||
|
||||
require_once '../vendor/autoload.php';
|
||||
|
||||
class LmsAdmin_Model extends CI_Model
|
||||
{
|
||||
/*############################################ START Of Coding By Nandini ############################################*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->load->database();
|
||||
|
||||
$this->load->helper('common_helper');
|
||||
|
||||
date_default_timezone_set('Asia/Kathmandu');
|
||||
|
||||
$this->nepaliDateObject = new NepaliDate();
|
||||
$this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject);
|
||||
}
|
||||
|
||||
public function get_lms_dashboard_records($where = '', $sqlQry = '', $limit = FALSE, $offset = FALSE)
|
||||
{
|
||||
if ($limit)
|
||||
$this->db->limit($limit, $offset);
|
||||
|
||||
if ($where != '')
|
||||
$this->db->where($where);
|
||||
|
||||
if ($sqlQry != '')
|
||||
$query = $this->db->query($sqlQry);
|
||||
|
||||
return $query->row_array();
|
||||
}
|
||||
/**************************************** START of Admin Roles - Nandini ************************************/
|
||||
public function get_lms_admin_roles($where = '', $sqlQry = '', $limit = FALSE, $offset = FALSE)
|
||||
{
|
||||
if ($limit)
|
||||
$this->db->limit($limit, $offset);
|
||||
|
||||
if ($where != '')
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by('lms_admin_roles.id', 'DESC');
|
||||
$query = $this->db->get('lms_admin_roles');
|
||||
|
||||
if ($sqlQry != '')
|
||||
$query = $this->db->query($sqlQry);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
public function check_role_exists($id, $rname)
|
||||
{
|
||||
$rId = ($this->input->post('id') !== NULL) ? $this->input->post('id') : $id;
|
||||
$rName = ($this->input->post('role_name') !== NULL) ? $this->input->post('role_name') : $rname;
|
||||
|
||||
$query = $this->db->get_where('lms_admin_roles', array('role_name' => $rName));
|
||||
if (!empty($query->row_array())) {
|
||||
if ($rId == 0)
|
||||
return false; //Duplicate role_name
|
||||
else {
|
||||
if ($query->row(0)->id != $rId)
|
||||
return false; //Duplicate role_name
|
||||
}
|
||||
}
|
||||
return true; //No duplicate
|
||||
}
|
||||
|
||||
function add_edit_admin_role($rId = 0, $data)
|
||||
{
|
||||
if ($rId == 0) {
|
||||
$this->db->insert('lms_admin_roles', $data);
|
||||
if ($this->db->affected_rows() > 0) {
|
||||
$insertid = $this->db->insert_id();
|
||||
return $insertid;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->db->where('id', $rId);
|
||||
$this->db->update('lms_admin_roles', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return true;
|
||||
else {
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**************************************** ENDDD of Admin Roles - Nandini ************************************/
|
||||
|
||||
|
||||
/**************************************** START of Admin Menu - Nandini ************************************/
|
||||
public function get_admin_menu_details($where = '', $sqlQry = '', $limit = FALSE, $offset = FALSE)
|
||||
{
|
||||
if ($limit) {
|
||||
$this->db->limit($limit, $offset);
|
||||
}
|
||||
if ($where != '')
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by('lms_admin_menu.id', 'DESC');
|
||||
$query = $this->db->get('lms_admin_menu');
|
||||
|
||||
if ($sqlQry != '')
|
||||
$query = $this->db->query($sqlQry);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
function recursive_menue($parentId = 0)
|
||||
{
|
||||
$this->db->where('parent_id', $parentId);
|
||||
//$this->db->where('is_active', 'Y');
|
||||
$this->db->order_by('order_number', 'ASC');
|
||||
$query = $this->db->get('lms_admin_menu');
|
||||
$result = $query->result_array();
|
||||
|
||||
$adminMenu = array();
|
||||
if (!empty($result)) {
|
||||
foreach ($result as $res) {
|
||||
array_push($adminMenu, $res);
|
||||
}
|
||||
}
|
||||
return $adminMenu;
|
||||
}
|
||||
|
||||
function get_admin_menu($parentId = 0)
|
||||
{
|
||||
$zeroMenu = $this->recursive_menue(0);
|
||||
$adminMenu = array();
|
||||
if (!empty($zeroMenu)) {
|
||||
foreach ($zeroMenu as $zero) {
|
||||
$adminMenu[$zero['id']] = $zero;
|
||||
|
||||
$oneMenu = $this->recursive_menue($zero['id']);
|
||||
if (!empty($oneMenu)) {
|
||||
foreach ($oneMenu as $one) {
|
||||
$adminMenu[$zero['id']][$zero['id']][$one['id']] = $one;
|
||||
|
||||
$twoMenu = $this->recursive_menue($one['id']);
|
||||
if (!empty($twoMenu)) {
|
||||
foreach ($twoMenu as $two) {
|
||||
$adminMenu[$zero['id']][$zero['id']][$one['id']][$one['id']][$two['id']] = $two;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//echo '<pre>';print_r($adminMenu);
|
||||
return $adminMenu;
|
||||
}
|
||||
|
||||
public function get_lms_admin_role_permissions($where = '', $sqlQry = '', $limit = FALSE, $offset = FALSE)
|
||||
{
|
||||
if ($limit)
|
||||
$this->db->limit($limit, $offset);
|
||||
|
||||
if ($where != '')
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by('lms_admin_role_permissions.id', 'DESC');
|
||||
$query = $this->db->get('lms_admin_role_permissions');
|
||||
|
||||
if ($sqlQry != '')
|
||||
$query = $this->db->query($sqlQry);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
function add_edit_admin_role_permissions($rpId = 0, $data)
|
||||
{
|
||||
if ($rpId == 0) {
|
||||
$this->db->insert('lms_admin_role_permissions', $data);
|
||||
if ($this->db->affected_rows() > 0) {
|
||||
$insertid = $this->db->insert_id();
|
||||
return $insertid;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->db->where('id', $rpId);
|
||||
$this->db->update('lms_admin_role_permissions', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return true;
|
||||
else {
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**************************************** END of Admin Menu - Nandini ************************************/
|
||||
|
||||
public function check_emailid_exists($id, $email)
|
||||
{
|
||||
$uId = ($this->input->post('id') !== NULL) ? $this->input->post('id') : $id;
|
||||
$eId = ($this->input->post('email') !== NULL) ? $this->input->post('email') : $email;
|
||||
|
||||
$query = $this->db->get_where('lms_admin', array('email' => $eId));
|
||||
if (!empty($query->row_array())) {
|
||||
if ($uId == 0)
|
||||
return false; //Duplicate email id
|
||||
else {
|
||||
if ($query->row(0)->id != $uId)
|
||||
return false; //Duplicate email id
|
||||
}
|
||||
}
|
||||
return true; //No duplicate
|
||||
}
|
||||
|
||||
function add_edit_admin_user($uId = 0, $data)
|
||||
{
|
||||
if ($uId == 0) {
|
||||
$this->db->insert('lms_admin', $data);
|
||||
if ($this->db->affected_rows() > 0) {
|
||||
$insertid = $this->db->insert_id();
|
||||
return $insertid;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->db->where('id', $uId);
|
||||
$this->db->update('lms_admin', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return true;
|
||||
else {
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function get_admin_details($where = '', $sqlQry = '', $limit = FALSE, $offset = FALSE)
|
||||
{
|
||||
if ($limit) {
|
||||
$this->db->limit($limit, $offset);
|
||||
}
|
||||
if ($where != '')
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by('lms_admin.id', 'DESC');
|
||||
$query = $this->db->get('lms_admin');
|
||||
|
||||
if ($sqlQry != '')
|
||||
$query = $this->db->query($sqlQry);
|
||||
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
public function check_is_emailid_valid($email)
|
||||
{
|
||||
$query = $this->db->query("SELECT id FROM lms_admin WHERE email='$email'");
|
||||
if ($row = $query->row()) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------- START of Admin User Login Functionality -----------------------------*/
|
||||
public function check_login_credentials($email, $encrypt_password)
|
||||
{
|
||||
$where = 'email="' . $email . '" AND password="' . $encrypt_password . '"';
|
||||
$this->db->where($where);
|
||||
$result = $this->db->get('lms_admin');
|
||||
|
||||
if ($result->num_rows() == 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*----------------------------- ENDDD of Admin User Login Functionality -----------------------------*/
|
||||
|
||||
/*----------------------------- START of Admin User Password Functionality -----------------------------*/
|
||||
public function reset_admin_password($uId, $new_password)
|
||||
{
|
||||
$data = array(
|
||||
'password' => md5($new_password)
|
||||
);
|
||||
$this->db->where('id', $uId);
|
||||
return $this->db->update('lms_admin', $data);
|
||||
}
|
||||
/*----------------------------- ENDDD of Admin User Password Functionality -----------------------------*/
|
||||
/*############################################ ENDDD Of Coding By Nandini ############################################*/
|
||||
|
||||
/*############################################ START Of Coding By Keerthi ############################################*/
|
||||
//start book
|
||||
function getData($table, $where)
|
||||
{
|
||||
if ($where != '') {
|
||||
$this->db->where($where);
|
||||
if (strpos($where, "category_id") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} elseif (strpos($where, "returned_on_date") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} elseif (strpos($where, "eu_unique_id") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} elseif (strpos($where, "is_damaged") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} elseif (strpos($where, "book_id") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} elseif (strpos($where, "is_active") !== false) {
|
||||
return $this->db->get($table)->result_array();
|
||||
} else {
|
||||
return $this->db->get($table)->row_array();
|
||||
}
|
||||
} else {
|
||||
return $this->db->get($table)->result_array();
|
||||
}
|
||||
}
|
||||
|
||||
function addEditBook($id, $data, $ttlRemQty = '', $ttlBookQty = '')
|
||||
{
|
||||
if ($id == 0) {
|
||||
$data['remaining_quantity'] = $data['total_quantity'];
|
||||
$this->db->insert('lms_books', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return $insert_id = $this->db->insert_id();
|
||||
else
|
||||
return 0;
|
||||
} else {
|
||||
$data['remaining_quantity'] = $ttlRemQty;
|
||||
$data['total_quantity'] = $ttlBookQty;
|
||||
$this->db->where('id', $id);
|
||||
$this->db->update('lms_books', $data);
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//end book
|
||||
|
||||
//start settings
|
||||
public function addEditGeneralSettings($id, $data)
|
||||
{
|
||||
if ($id == 0) {
|
||||
$this->db->insert('lms_general_settings', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return $insert_id = $this->db->insert_id();
|
||||
else
|
||||
return 0;
|
||||
} else {
|
||||
$this->db->where('id', $id);
|
||||
$this->db->update('lms_general_settings', $data);
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function getGeneralSettingData($table)
|
||||
{
|
||||
return $this->db->get($table)->row_array();
|
||||
}
|
||||
|
||||
public function addEditCatgeoryData($id, $data)
|
||||
{
|
||||
if ($id == 0) {
|
||||
$this->db->insert('lms_categories', $data);
|
||||
if ($this->db->affected_rows() > 0)
|
||||
return $insert_id = $this->db->insert_id();
|
||||
else
|
||||
return 0;
|
||||
} else {
|
||||
$this->db->where('id', $id);
|
||||
$this->db->update('lms_categories', $data);
|
||||
if ($this->db->trans_status() === FALSE)
|
||||
return 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteData($tableName, $where)
|
||||
{
|
||||
$this->db->where($where);
|
||||
$this->db->delete($tableName);
|
||||
return true;
|
||||
}
|
||||
//end settings
|
||||
|
||||
//start issued book
|
||||
public function get_issed_book_data($table = '', $where = '')
|
||||
{
|
||||
$this->db->order_by('created_on', 'DESC');
|
||||
|
||||
if (!empty($where)) {
|
||||
$this->db->where($where);
|
||||
}
|
||||
return $this->db->get($table)->result_array();
|
||||
}
|
||||
|
||||
public function addEditissuedBookData($idVal, $dataArray)
|
||||
{
|
||||
if ($idVal == 0) {
|
||||
for ($i = 0; $i < count($dataArray['book_id']); $i++) {
|
||||
$bid = $dataArray['book_id'][$i];
|
||||
$euid = $dataArray['eu_unique_id'][$i];
|
||||
$i_date = $dataArray['issued_date'][$i];
|
||||
$r_date = $dataArray['return_date'][$i];
|
||||
$b_health = $dataArray['book_health'][$i];
|
||||
$c_date = $dataArray['created_on'];
|
||||
$m_date = $dataArray['modified_on'];
|
||||
|
||||
$data = array(
|
||||
'book_id' => $bid,
|
||||
'eu_unique_id' => $euid,
|
||||
'issued_date' => $i_date,
|
||||
'return_date' => $r_date,
|
||||
'book_health' => $b_health,
|
||||
'created_on' => $c_date,
|
||||
'modified_on' => $m_date
|
||||
);
|
||||
|
||||
// var_dump($data);
|
||||
// exit();
|
||||
|
||||
$insert = $this->db->insert('lms_book_transactions', $data);
|
||||
|
||||
$select = $this->db->get_where('lms_books', ['id' => $bid])->row_array();
|
||||
if ($select) {
|
||||
$oldremain_qty = $select['remaining_quantity'];
|
||||
$remaning_qyt = ($oldremain_qty) - (1);
|
||||
|
||||
$this->db->query("UPDATE lms_books SET remaining_quantity='$remaning_qyt' WHERE id=$bid");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//end issued book
|
||||
|
||||
//start retuned book
|
||||
public function get_returned_book_data($table = '', $where = '')
|
||||
{
|
||||
|
||||
|
||||
$this->db->order_by('id', 'DESC');
|
||||
$this->db->where($where);
|
||||
// echo '<pre>';
|
||||
// print_r($this->db->where($where));
|
||||
// exit();
|
||||
return $this->db->get($table)->result_array();
|
||||
}
|
||||
|
||||
public function addCommentData($idVal, $dataArray)
|
||||
{
|
||||
$this->db->where('id', $idVal);
|
||||
$this->db->update('lms_book_transactions', $dataArray);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function addReturnedBook($returnedId)
|
||||
{
|
||||
foreach ($returnedId as $ridata) {
|
||||
$bdata = $this->db->get_where('lms_book_transactions', ['id' => $ridata])->row_array();
|
||||
$bookData = $this->db->get_where('lms_books', ['id' => $bdata['book_id']])->row_array();
|
||||
$gsData = $this->LmsAdmin_Model->getGeneralSettingData('lms_general_settings');
|
||||
if ($gsData)
|
||||
$late_fee = $gsData['due_fee_per_day'];
|
||||
|
||||
$fineperday = 0;
|
||||
if ($bookData['fine_per_day'] == 0)
|
||||
$fineperday = $late_fee;
|
||||
else
|
||||
$fineperday = $bookData['fine_per_day'];
|
||||
|
||||
//calculating over due days
|
||||
/*$today = date('Y-m-d');
|
||||
$return_date = $bdata['return_date'];
|
||||
$overdue_diff = strtotime($today)-strtotime($return_date);
|
||||
$overdue_days = round($overdue_diff / 86400);
|
||||
if($today>$return_date){
|
||||
$oddays = $overdue_days;
|
||||
$latefee = ($fineperday)*($oddays);
|
||||
}elseif($today<$return_date){
|
||||
$oddays = 00;
|
||||
$latefee = 00.00;
|
||||
}*/
|
||||
|
||||
$todayDateObj = new DateTime($this->nepali_current_date);
|
||||
$today = $todayDateObj->format('Y-m-d');
|
||||
|
||||
$retDateObj = new DateTime($bdata['return_date']);
|
||||
$return_date = $retDateObj->format('Y-m-d');
|
||||
|
||||
$date11 = date_create($return_date);
|
||||
$date22 = date_create($today);
|
||||
$overdue_days = $date11->diff($date22)->format("%r%a");
|
||||
if ($today > $return_date) {
|
||||
$oddays = $overdue_days;
|
||||
$latefee = ($fineperday) * ($oddays);
|
||||
} elseif ($today < $return_date) {
|
||||
$oddays = 00;
|
||||
$latefee = 00.00;
|
||||
}
|
||||
|
||||
//return $oddays.' == '.$latefee;
|
||||
$dataArray = array(
|
||||
'returned_on_date' => $today,
|
||||
'total_overdue_days' => $oddays,
|
||||
'late_fee_per_day' => $fineperday,
|
||||
'total_late_fee' => $latefee
|
||||
);
|
||||
|
||||
$this->db->where('id', $ridata);
|
||||
$this->db->update('lms_book_transactions', $dataArray);
|
||||
|
||||
$select = $this->db->get_where('lms_books', ['id' => $bdata['book_id']])->row_array();
|
||||
if ($select) {
|
||||
$bid = $bdata['book_id'];
|
||||
$ttl_quantity = $select['total_quantity'];
|
||||
$oldremain_qty = $select['remaining_quantity'];
|
||||
$remaning_qyt = ($oldremain_qty) + (1);
|
||||
if ($remaning_qyt >= $ttl_quantity) {
|
||||
$remQty = $ttl_quantity;
|
||||
} else {
|
||||
$remQty = $remaning_qyt;
|
||||
}
|
||||
|
||||
$this->db->query("UPDATE lms_books SET remaining_quantity='$remQty' WHERE id=$bid");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//end returned book
|
||||
|
||||
//start student
|
||||
public function get_user_data($table)
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$ecDB = $CI->load->database('erisnClassroom', TRUE);
|
||||
// $query = $ecDB->query("Select s.name,s.email,s.studentId,c.classroom_name as class_name, b.b_name from students s
|
||||
// INNER JOIN student_batch sb on s.id = sb.student_id AND s.batch_id = sb.batch_id
|
||||
// INNER JOIN classroom c on c.id = sb.classroom_id
|
||||
// INNER JOIN batch b on b.id = s.batch_id
|
||||
// ORDER BY sb.id DESC");
|
||||
// $query = $ecDB->query("SELECT c.id,c.name, c.studentId,c.mobile,(select classroom_name from classroom a join student_batch b on a.id=b.classroom_id WHERE b.student_id=c.id) as class_name FROM students c ORDER BY c.id");
|
||||
$stdSql = $ecDB->query("SELECT s.id,s.studentId,s.name,s.course,s.mobile,s.batch_id,cl.section_id,sb.roll_no,c.course_name,se.section_name
|
||||
FROM students s
|
||||
JOIN student_batch sb ON sb.student_id=s.id AND s.batch_id=sb.batch_id
|
||||
JOIN classroom cl ON cl.id = sb.classroom_id AND s.course=cl.course_id
|
||||
JOIN section se ON cl.section_id=se.id
|
||||
JOIN course c ON c.id=cl.course_id ORDER BY sb.roll_no ASC");
|
||||
return $stdSql->result_array();
|
||||
}
|
||||
|
||||
public function getStudentInfo($stdId)
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$ecDB = $CI->load->database('erisnClassroom', TRUE);
|
||||
$query = $ecDB->query("SELECT c.*,(select classroom_name from classroom a join student_batch b on a.id=b.classroom_id WHERE b.student_id=c.id) as class_name FROM students c WHERE c.id='$stdId'");
|
||||
return $query->row_array();
|
||||
}
|
||||
|
||||
public function getStudentDataById($stdIs)
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$ecDB = $CI->load->database('erisnClassroom', TRUE);
|
||||
$query = $ecDB->query("SELECT c.studentId,c.id,c.mobile,c.name,(select classroom_name from classroom a join student_batch b on a.id=b.classroom_id WHERE b.student_id=c.id) as class_name FROM students c WHERE c.studentId='$stdIs'");
|
||||
return $query->row_array();
|
||||
}
|
||||
//end student
|
||||
/*############################################ ENDDD Of Coding By Keerthi ############################################*/
|
||||
}
|
11
library/application/models/index.html
Normal file
11
library/application/models/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/third_party/index.html
vendored
Normal file
11
library/application/third_party/index.html
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
8
library/application/views/errors/cli/error_404.php
Normal file
8
library/application/views/errors/cli/error_404.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
8
library/application/views/errors/cli/error_db.php
Normal file
8
library/application/views/errors/cli/error_db.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nDatabase error: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
21
library/application/views/errors/cli/error_exception.php
Normal file
21
library/application/views/errors/cli/error_exception.php
Normal 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 ?>
|
8
library/application/views/errors/cli/error_general.php
Normal file
8
library/application/views/errors/cli/error_general.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
21
library/application/views/errors/cli/error_php.php
Normal file
21
library/application/views/errors/cli/error_php.php
Normal 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 ?>
|
11
library/application/views/errors/cli/index.html
Normal file
11
library/application/views/errors/cli/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
64
library/application/views/errors/html/error_404.php
Normal file
64
library/application/views/errors/html/error_404.php
Normal 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>
|
64
library/application/views/errors/html/error_db.php
Normal file
64
library/application/views/errors/html/error_db.php
Normal 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>
|
32
library/application/views/errors/html/error_exception.php
Normal file
32
library/application/views/errors/html/error_exception.php
Normal 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>
|
64
library/application/views/errors/html/error_general.php
Normal file
64
library/application/views/errors/html/error_general.php
Normal 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>
|
33
library/application/views/errors/html/error_php.php
Normal file
33
library/application/views/errors/html/error_php.php
Normal 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>
|
11
library/application/views/errors/html/index.html
Normal file
11
library/application/views/errors/html/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/views/errors/index.html
Normal file
11
library/application/views/errors/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/application/views/index.html
Normal file
11
library/application/views/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
366
library/application/views/lms-admin/add-edit-book.php
Normal file
366
library/application/views/lms-admin/add-edit-book.php
Normal file
@ -0,0 +1,366 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_r">
|
||||
<div class="subject_lsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success" id="success" style="display:none;">
|
||||
<?php if ($idVal == 0) { ?>
|
||||
<strong>Success!</strong> The new book added successfully.
|
||||
<?php } else { ?>
|
||||
<strong>Success!</strong> The book data updated successfully.
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$isbn = '';
|
||||
$book_code = '';
|
||||
$title = '';
|
||||
$author = '';
|
||||
$publisher = '';
|
||||
$published_year = '';
|
||||
$price = '';
|
||||
$total_no_of_pages = '';
|
||||
$total_quantity = '';
|
||||
$rack_no = '';
|
||||
$description = '';
|
||||
$can_be_issued_for = '';
|
||||
$fine_per_day = 0;
|
||||
$cat_id = '';
|
||||
$cat_na = '';
|
||||
if (isset($details) && !empty($details)) {
|
||||
$isbn = $details['isbn'];
|
||||
$book_code = $details['book_code'];
|
||||
$title = $details['title'];
|
||||
$author = $details['author'];
|
||||
$publisher = $details['publisher'];
|
||||
$published_year = $details['published_year'];
|
||||
$price = (int)$details['price'];
|
||||
$total_no_of_pages = $details['total_no_of_pages'];
|
||||
$total_quantity = $details['total_quantity'];
|
||||
$rack_no = $details['rack_no'];
|
||||
$description = $details['description'];
|
||||
$can_be_issued_for = $details['can_be_issued_for'];
|
||||
|
||||
$category_id = $details['category_id'];
|
||||
$data = $this->db->get_where('lms_categories', ['id' => $category_id])->row();
|
||||
if (!empty($data)) {
|
||||
$cat_id = $data->id;
|
||||
$cat_name = $data->name;
|
||||
}
|
||||
}
|
||||
if (isset($gSData) && !empty($gSData) && ($idVal == 0)) {
|
||||
$fine_per_day = $gSData['due_fee_per_day'];
|
||||
}
|
||||
?>
|
||||
<div class="common-sub-heading">Book Details</div>
|
||||
<form id="bookForm" method="POST">
|
||||
<input type="hidden" id="id" name="id" value="<?= $idVal; ?>" />
|
||||
<input type="hidden" name="fine_per_day" value="<?= $fine_per_day; ?>">
|
||||
<div class="subject_lformarea book-form-area">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="ISBN*" name="isbn" id="isbn" autocomplete="off" value="<?= $isbn; ?>">
|
||||
<i class="fas fa-barcode"></i>
|
||||
<p class="form_err" id="error-isbn"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Book Code" name="book_code" id="book_code" autocomplete="off" value="<?= $book_code; ?>">
|
||||
<i class="fas fa-barcode"></i>
|
||||
<p class="form_err" id="error-isbn"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Book Title*" name="title" id="title" autocomplete="off" value="<?= $title; ?>">
|
||||
<p class="form_err" id="error-title"></p>
|
||||
</div>
|
||||
<div class="form-group assign_subject">
|
||||
<select class="form-control txtData" name="category_id" id="category_id">
|
||||
<?php if (!empty($data)) { ?>
|
||||
<option value="<?= $cat_id; ?>" selected disabled><?= $cat_name; ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="">Select Category*</option>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($categoryData) && !empty($categoryData)) {
|
||||
foreach ($categoryData as $cData) { ?>
|
||||
<option value="<?= $cData['id']; ?>"><?= $cData['name']; ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
<p class="form_err" id="error-category_id"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Author" name="author" id="author" autocomplete="off" value="<?= $author; ?>">
|
||||
<p class="form_err" id="error-author"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Publisher" name="publisher" id="publisher" autocomplete="off" value="<?= $publisher; ?>">
|
||||
<p class="form_err" id="error-publisher"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Year" name="published_year" id="published_year" autocomplete="off" value="<?= $published_year; ?>">
|
||||
<p class="form_err" id="error-year"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Total Pages" name="total_no_of_pages" id="total_no_of_pages" autocomplete="off" value="<?= $total_no_of_pages; ?>">
|
||||
<p class="form_err" id="error-ttl_page"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Total Quantity*" name="total_quantity" id="total_quantity" autocomplete="off" value="<?= $total_quantity; ?>">
|
||||
<p class="form_err" id="error-ttl_qty"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Rack no" name="rack_no" id="rack_no" autocomplete="off" value="<?= $rack_no; ?>">
|
||||
<p class="form_err" id="error-rack_no"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Price" name="price" id="price" autocomplete="off" value="<?= $price; ?>">
|
||||
<p class="form_err" id="error-price"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" placeholder="Description" name="description" id="description" autocomplete="off" value="<?= $description; ?>">
|
||||
<p class="form_err" id="error-description"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-inner-div">
|
||||
<input type="checkbox" id="overwriteDays" <?php if ($can_be_issued_for != 0) {
|
||||
echo 'checked';
|
||||
} else {
|
||||
echo '';
|
||||
} ?> onclick="check()" /><label>Overwrite default lending days</label>
|
||||
<input type="number" step="1" min="0" class="form-control txtData" name="can_be_issued_for" id="can_be_issued_for" value="<?= $can_be_issued_for; ?>" autocomplete="off" />
|
||||
</div>
|
||||
<p class="form_err" id="error-lending_days"></p>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="subject_addbtn"><?= $button; ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
function check() {
|
||||
var id = $('#id').val();
|
||||
if ($("#overwriteDays").is(":checked")) {
|
||||
$('#error-lending_days').text('Please enter lending days');
|
||||
} else {
|
||||
if (id > 0) {
|
||||
$('#can_be_issued_for').val('');
|
||||
} else {
|
||||
$('#can_be_issued_for').val('');
|
||||
}
|
||||
$('#error-lending_days').html('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$.validator.addMethod("nameRegex", function(value, element) {
|
||||
return this.optional(element) || /^[a-zA-Z0-9\s]*$/.test(value);
|
||||
}, "Contain only letters.");
|
||||
|
||||
$("#bookForm").validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
isbn: {
|
||||
required: true,
|
||||
minlength: 10,
|
||||
maxlength: 13,
|
||||
digits: true,
|
||||
alphanumeric: true
|
||||
},
|
||||
title: {
|
||||
required: true,
|
||||
minlength: 3,
|
||||
nameRegex: true
|
||||
},
|
||||
category_id: {
|
||||
required: {
|
||||
depends: function(element) {
|
||||
return $("#category_id").val() == '';
|
||||
}
|
||||
}
|
||||
},
|
||||
author: {
|
||||
nameRegex: true,
|
||||
},
|
||||
publisher: {
|
||||
nameRegex: true
|
||||
},
|
||||
published_year: {
|
||||
minlength: 4,
|
||||
maxlength: 4,
|
||||
digits: true
|
||||
},
|
||||
total_no_of_pages: {
|
||||
digits: true,
|
||||
alphanumeric: true
|
||||
},
|
||||
total_quantity: {
|
||||
required: true,
|
||||
digits: true,
|
||||
alphanumeric: true
|
||||
},
|
||||
rack_no: {
|
||||
alphanumeric: true
|
||||
},
|
||||
price: {
|
||||
number: true,
|
||||
alphanumeric: true
|
||||
},
|
||||
can_be_issued_for: {
|
||||
min: 0
|
||||
}
|
||||
|
||||
},
|
||||
messages: {
|
||||
isbn: {
|
||||
required: "ISBN is required",
|
||||
minlength: "At least 10 characters long",
|
||||
maxlength: "Should not exceed 13 characters",
|
||||
digits: "Accepts only integer",
|
||||
alphanumeric: "Special character not allowed"
|
||||
},
|
||||
title: {
|
||||
required: "Title is required",
|
||||
minlength: "At least 3 characters long",
|
||||
nameRegex: "Contains only characters"
|
||||
},
|
||||
category_id: {
|
||||
required: "category is required"
|
||||
},
|
||||
author: {
|
||||
nameRegex: "Contains only characters"
|
||||
},
|
||||
publisher: {
|
||||
nameRegex: "Contains only characters"
|
||||
},
|
||||
published_year: {
|
||||
minlength: "At least 4 characters long",
|
||||
maxlength: "Should not exceed 4 characters",
|
||||
digits: "Accepts only integer"
|
||||
},
|
||||
total_no_of_pages: {
|
||||
digits: "Accepts only integer",
|
||||
alphanumeric: "Special character not allowed"
|
||||
},
|
||||
total_quantity: {
|
||||
required: "Total quantity is required",
|
||||
digits: "Accepts only integer",
|
||||
alphanumeric: "Special character not allowed"
|
||||
},
|
||||
rack_no: {
|
||||
alphanumeric: "Special character not allowed"
|
||||
},
|
||||
price: {
|
||||
number: "Accepts only integer",
|
||||
alphanumeric: "Special character not allowed"
|
||||
},
|
||||
can_be_issued_for: {
|
||||
min: "Value must be greater than 0"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "isbn") {
|
||||
error.appendTo($("#error-isbn"));
|
||||
} else if (element.attr("name") == "title") {
|
||||
error.appendTo($("#error-title"));
|
||||
} else if (element.attr("name") == "category_id") {
|
||||
error.appendTo($("#error-category_id"));
|
||||
} else if (element.attr("name") == "author") {
|
||||
error.appendTo($("#error-author"));
|
||||
} else if (element.attr("name") == "publisher") {
|
||||
error.appendTo($("#error-publisher"));
|
||||
} else if (element.attr("name") == "published_year") {
|
||||
error.appendTo($("#error-year"));
|
||||
} else if (element.attr("name") == "total_no_of_pages") {
|
||||
error.appendTo($("#error-ttl_page"));
|
||||
} else if (element.attr("name") == "total_quantity") {
|
||||
error.appendTo($("#error-ttl_qty"));
|
||||
} else if (element.attr("name") == "rack_no") {
|
||||
error.appendTo($("#error-rack_no"));
|
||||
} else if (element.attr("name") == "price") {
|
||||
error.appendTo($("#error-price"));
|
||||
} else if (element.attr("name") == "can_be_issued_for") {
|
||||
error.appendTo($("#error-lending_days"));
|
||||
} else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formdata = new FormData(form);
|
||||
var id = $('#id').val();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/add_edit_book/' + id,
|
||||
data: formdata,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result) {
|
||||
$('#error-isbn').html('');
|
||||
if (result == 0) {
|
||||
$("#error-ttl_qty").html('');
|
||||
$('#error-isbn').text('Already exists book.');
|
||||
} else if (result == 1) {
|
||||
$('.txtData').val('');
|
||||
$("#error-ttl_qty").html('');
|
||||
$('#error-lending_days').html('');
|
||||
$("#overwriteDays").prop('checked', false);
|
||||
$('#success').show();
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
} else {
|
||||
var qtyVals = result.split('_');
|
||||
var issuedQty = qtyVals[0];
|
||||
var remQty = qtyVals[1];
|
||||
$("#error-ttl_qty").text('Total quantity is having remaining and issued quantity respectively (' + remQty + '+' + issuedQty + '). if u want to edit enter greater than total value.');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
457
library/application/views/lms-admin/add-edit-issue-book.php
Normal file
457
library/application/views/lms-admin/add-edit-issue-book.php
Normal file
@ -0,0 +1,457 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_l_new">
|
||||
<div class="subject_lsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2>Issue Book</h2>
|
||||
</div>
|
||||
<?php if ($this->session->flashdata('success')) : ?>
|
||||
<div class="alert alert-success"><strong>Success!</strong><?= $this->session->flashdata('success'); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->session->flashdata('failure')) : ?>
|
||||
<div class="alert alert-danger"><strong>Failure!</strong><?= $this->session->flashdata('failure'); ?></div>
|
||||
<?php endif; ?>
|
||||
<form id="issuedBookForm">
|
||||
<input type="hidden" id="divCount" value="1">
|
||||
<input type="hidden" id="no_of_book_per_user" value="<?= $gSData['no_of_book_per_user']; ?>">
|
||||
<div class="common-sub-heading">Student Details</div>
|
||||
<div class="subject_lformarea book-form-area">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="eu_id" id="eu_id" placeholder="Student ID" onkeyup="getEndUserData(this.value)" autocomplete="off">
|
||||
<p class="form_err" id="error-eu_unique_id"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="student_class" id="student_class" placeholder="Class" readonly>
|
||||
<p class="form_err" id="error-student_class"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="fname" id="fname" placeholder="First Name" readonly>
|
||||
<p class="form_err" id="error-fname"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="lname" id="lname" placeholder="Last Name" readonly>
|
||||
<p class="form_err" class="error-lname"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="color:red;font-size: small;" id="alertMsg"></div>
|
||||
<input type="hidden" id="rem_issued_book_cnt" value="" />
|
||||
<input type="hidden" id="ttl_issue_book_cnt" value="" />
|
||||
<div class="common-sub-heading" id="bookDetailDiv">Book Details</div>
|
||||
<div class="subject_lformarea book-form-area" id="hidebookDiv1">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="book_id" id="book_id1" placeholder="ISBN" onkeyup="getBookData(this.value, 1)">
|
||||
<p class="form_err" id="error-book_id"></p>
|
||||
<i class="fas fa-barcode"></i>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="title" id="title1" placeholder="Book Title" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="category" id="category1" placeholder="Category" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="author" id="author1" placeholder="Author" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="publisher" id="publisher1" placeholder="Publisher" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="number" class="form-control txtData" name="year" id="year1" placeholder="Year" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="ttl_pages" id="ttl_pages1" placeholder="Total Pages" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control txtData" name="description" id="description1" placeholder="Description" readonly>
|
||||
<p class="form_err"></p>
|
||||
</div>
|
||||
<div class="form-group assign_subject">
|
||||
<select class="form-control txtData" name="book_health[]" id="book_health1">
|
||||
<option value="">Select Book Health</option>
|
||||
<option value="good">Good</option>
|
||||
<option value="average">Average</option>
|
||||
<option value="damaged">Damaged</option>
|
||||
</select>
|
||||
<p class="form_err" id="error-book_health"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="date" class="form-control txtData" name="issued_date[]" id="issued_date1" placeholder="Date of Issue" readonly>
|
||||
<p class="form_err" id="error-issued_date"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="date" class="form-control txtData" name="return_date[]" id="return_date1" placeholder="Date of Return" readonly>
|
||||
<p class="form_err" id="error-return_date"></p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form_err" id="error-existingBook1"></p>
|
||||
<div class="addBookWrap">
|
||||
<button type="submit" id="button1" class="subject_addbtn add-btn-border" onclick="addMoreBook()">Add another book</button>
|
||||
</div>
|
||||
<div class="subject_lformarea book-form-area" id="moreBookDetailDiv"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sibject_r_new">
|
||||
<div class="dashboard-cover-wrap">
|
||||
<form id="iBForm" method="POST">
|
||||
<input type="hidden" name="name" value="1">
|
||||
<input type="hidden" name="id" id="id" value="<?= $idVal; ?>">
|
||||
<input type="hidden" name="eu_unique_id" id="eu_unique_id" value="">
|
||||
<input type="hidden" name="issueddate" id="issueddate" value="">
|
||||
<input type="hidden" name="returndate" id="returndate" value="">
|
||||
<input type="hidden" name="bookhealth" id="bookhealth" value="">
|
||||
<input type="hidden" name="ttlrows" id="ttlrows" value="">
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sl No.</th>
|
||||
<th>ISBN</th>
|
||||
<th>Title</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="contentBody"></tbody>
|
||||
</table>
|
||||
<div class="issue_book_btn">
|
||||
<button type="submit" class="subject_addbtn" onclick="saveData()">Issue Book</button>
|
||||
</div>
|
||||
<p style="color:red;" id="error-msg"></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
function getEndUserData(eu_id) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/getStudentDataById',
|
||||
data: {
|
||||
'id': eu_id
|
||||
},
|
||||
success: function(result) {
|
||||
var obj = JSON.parse(result);
|
||||
var stdname = obj.name.split(" ");
|
||||
var rembook = (obj.ttl_issued_book_cnt) - (obj.eu_issued_book_cnt);
|
||||
var html = "You have already issued " + obj.eu_issued_book_cnt + " book out of " + obj.ttl_issued_book_cnt + " books, remaining you can issue " + rembook + " book to this user.";
|
||||
$('#student_class').val(obj.class_name);
|
||||
$('#fname').val(stdname[0]);
|
||||
$('#lname').val(stdname[1]);
|
||||
$('#rem_issued_book_cnt').val(rembook);
|
||||
$('#ttl_issue_book_cnt').val(obj.ttl_issued_book_cnt);
|
||||
$('#alertMsg').text(html);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getBookData(isbn, ref) {
|
||||
var tableName = 'lms_books';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/getDataById',
|
||||
data: {
|
||||
'id': isbn,
|
||||
'tableName': tableName
|
||||
},
|
||||
success: function(result) {
|
||||
var obj = JSON.parse(result);
|
||||
//issed_for = obj.lending_days;
|
||||
//issed_date = getTodayDate();
|
||||
//return_date = getreturndate(issed_for);
|
||||
|
||||
var crrDateObj = NepaliFunctions.GetCurrentBsDate();
|
||||
issed_date = crrDateObj.year + '-' + NepaliFunctions.Get2DigitNo(crrDateObj.month) + '-' + NepaliFunctions.Get2DigitNo(crrDateObj.day);
|
||||
|
||||
retDateObj = NepaliFunctions.BsAddDays(crrDateObj, Number(obj.lending_days));
|
||||
return_date = retDateObj.year + '-' + NepaliFunctions.Get2DigitNo(retDateObj.month) + '-' + NepaliFunctions.Get2DigitNo(retDateObj.day);
|
||||
|
||||
$('#title' + ref).val(obj.title);
|
||||
$('#category' + ref).val(obj.category_name);
|
||||
$('#author' + ref).val(obj.author);
|
||||
$('#publisher' + ref).val(obj.publisher);
|
||||
$('#year' + ref).val(obj.published_year);
|
||||
$('#ttl_pages' + ref).val(obj.total_no_of_pages);
|
||||
$('#description' + ref).val(obj.description);
|
||||
$('#issued_date' + ref).val(issed_date);
|
||||
$('#return_date' + ref).val(return_date);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getTodayDate() {
|
||||
var today = new Date();
|
||||
var dd = String(today.getDate()).padStart(2, '0');
|
||||
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
||||
var yyyy = today.getFullYear();
|
||||
|
||||
today = yyyy + '-' + mm + '-' + dd;
|
||||
return today;
|
||||
}
|
||||
|
||||
function getreturndate(issed_for) {
|
||||
var today = new Date();
|
||||
var newDate = addDays(today, issed_for);
|
||||
if (issed_for == 0) {
|
||||
var dd = String(today.getDate()).padStart(2, '0');
|
||||
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
||||
var yyyy = today.getFullYear();
|
||||
} else if (issed_for > 0) {
|
||||
var dd = String(newDate.getDate()).padStart(2, '0');
|
||||
var mm = String(newDate.getMonth() + 1).padStart(2, '0');
|
||||
var yyyy = newDate.getFullYear();
|
||||
}
|
||||
|
||||
today = yyyy + '-' + mm + '-' + dd;
|
||||
return today;
|
||||
}
|
||||
|
||||
function addDays(theDate, days) {
|
||||
return new Date(theDate.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function addMoreBook() {
|
||||
$("#issuedBookForm").validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
eu_id: {
|
||||
required: true
|
||||
},
|
||||
book_id: {
|
||||
required: true
|
||||
},
|
||||
book_health: {
|
||||
required: {
|
||||
depends: function(element) {
|
||||
return $("#book_health").val() == '';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
eu_id: {
|
||||
required: "Student Id is required"
|
||||
},
|
||||
book_id: {
|
||||
required: "ISBN is required"
|
||||
},
|
||||
book_health: {
|
||||
required: "Book Health is required"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "eu_id") {
|
||||
error.appendTo($("#error-eu_unique_id"));
|
||||
} else if (element.attr("name") == "book_id") {
|
||||
error.appendTo($("#error-book_id"));
|
||||
} else if (element.attr("name") == "book_health") {
|
||||
error.appendTo($("#error-book_health"));
|
||||
} else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var dcnts = $('#divCount').val();
|
||||
var bookIsbn = $('#book_id' + dcnts).val();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/checkExistingBook',
|
||||
data: {
|
||||
'isbn': bookIsbn
|
||||
},
|
||||
success: function(result) {
|
||||
if (result == 0) {
|
||||
$('#error-existingBook' + dcnts).text('The book is out of stock');
|
||||
}
|
||||
if (result == 1) {
|
||||
$('#error-existingBook' + dcnts).html('');
|
||||
|
||||
var rem_issue_book = $('#rem_issued_book_cnt').val();
|
||||
var ttl_issue_book = $('#ttl_issue_book_cnt').val();
|
||||
var ttlrows = $('#contentBody tr').length;
|
||||
$('#ttlrows').val(ttlrows);
|
||||
var rowCount = $('#tbl tr').length;
|
||||
if (rowCount <= ttl_issue_book) {
|
||||
var eu_id = $('#eu_id').val();
|
||||
var iDate = $("input[name='issued_date[]']").map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
var rDate = $("input[name='return_date[]']").map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
var bhealth = [];
|
||||
$('select[name="book_health[]"] option:selected').each(function() {
|
||||
bhealth.push($(this).val());
|
||||
});
|
||||
$('#eu_unique_id').val(eu_id);
|
||||
$('#issueddate').val(iDate);
|
||||
$('#returndate').val(rDate);
|
||||
$('#bookhealth').val(bhealth);
|
||||
|
||||
var dcnt = $('#divCount').val();
|
||||
var incval = Number(dcnt) + 1;
|
||||
$('#divCount').val(incval);
|
||||
|
||||
var nobpu = Number($('#no_of_book_per_user').val());
|
||||
if (dcnt == 1) {
|
||||
var extval = dcnt;
|
||||
} else {
|
||||
var extvals = $('#divCount').val();
|
||||
extval = extvals - 1;
|
||||
}
|
||||
var isbn = $('#book_id' + extval).val();
|
||||
var title = $('#title' + extval).val();
|
||||
|
||||
htmll = '<tr id="rowcnt' + extval + '"><td><span class="text-center">' + extval + '</span></td><td>' + isbn + '</td><input type="hidden" name="isbn[]" id="isbn" value="' + isbn + '"><td>' + title + '</td><input type="hidden" name="title[]" id="title" value="' + title + '"><td><div class="sub_tabbtnsec"><div class="sub_delbtn"><i class="fa fa-trash" aria-hidden="true"></i></div></div></td></tr>';
|
||||
$('#contentBody').append(htmll);
|
||||
|
||||
$('#button' + extval).hide();
|
||||
|
||||
var thestring = '#hidebookDiv' + incval;
|
||||
var thenum = thestring.replace(/^\D+/g, '');
|
||||
if (thenum >= dcnt) {
|
||||
$('#hidebookDiv' + dcnt).hide();
|
||||
}
|
||||
|
||||
if (extval <= nobpu) {
|
||||
|
||||
var html = '<div class="subject_lformarea book-form-area morediv" id="hidebookDiv' + incval + '"><div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="book_id" id="book_id' + incval + '" placeholder="ISBN" onkeyup="getBookData(this.value, ' + incval + ')" autocomplete="off">';
|
||||
html += '<p class="form_err" id="error-book_id"></p>';
|
||||
html += '<i class="fas fa-barcode"></i>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="title" id="title' + incval + '" placeholder="Book Title" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="category" id="category' + incval + '" placeholder="Category" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="author" id="author' + incval + '" placeholder="Author" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="publisher" id="publisher' + incval + '" placeholder="Publisher" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="number" class="form-control txtData" name="year" id="year' + incval + '" placeholder="Year" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="ttl_pages" id="ttl_pages' + incval + '" placeholder="Total Pages" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="text" class="form-control txtData" name="description" id="description' + incval + '" placeholder="Description" readonly>';
|
||||
html += '<p class="form_err"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group assign_subject">';
|
||||
html += '<select class="form-control txtData" name="book_health[]" id="book_health' + incval + '">';
|
||||
html += '<option value="">Select Book Health</option>';
|
||||
html += '<option value="good">Good</option>';
|
||||
html += '<option value="average">Average</option>';
|
||||
html += '<option value="damaged">Damaged</option>';
|
||||
html += '</select><p class="form_err" id="error-book_health"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="date" class="form-control txtData" name="issued_date[]" id="issued_date' + incval + '" placeholder="Date of Issue" readonly>';
|
||||
html += '<p class="form_err" id="error-issued_date"></p>';
|
||||
html += '</div>';
|
||||
html += '<div class="form-group">';
|
||||
html += '<input type="date" class="form-control txtData" name="return_date[]" id="return_date' + incval + '" placeholder="Date of Return" readonly>';
|
||||
html += '<p class="form_err" id="error-return_date"></p>';
|
||||
html += '</div></div><p class="form_err" id="error-existingBook' + incval + '" ></p>';
|
||||
html += '<div class="addBookWrap">';
|
||||
html += '<button type="submit" id="button' + incval + '" class="subject_addbtn add-btn-border" onclick="addMoreBook()">Add another book</button>';
|
||||
html += '</div>';
|
||||
$('#moreBookDetailDiv').append(html);
|
||||
}
|
||||
} else {
|
||||
if (rem_issue_book == 0) {
|
||||
$('#error-existingBook' + dcnts).text('You can not issue book for this user.');
|
||||
} else {
|
||||
$('#error-existingBook' + dcnts).text('You can issue only ' + rem_issue_book + ' book for this user.');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$("#tbl").on('click', '.sub_delbtn', function() {
|
||||
$(this).closest('tr').remove();
|
||||
});
|
||||
|
||||
function saveData() {
|
||||
var formdata = new FormData(form);
|
||||
var eu_id = $()
|
||||
var id = $('#id').val();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/add_edit_issue_book/' + id,
|
||||
data: formdata,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result) {
|
||||
alert(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
188
library/application/views/lms-admin/add-edit-role.php
Normal file
188
library/application/views/lms-admin/add-edit-role.php
Normal file
@ -0,0 +1,188 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_r">
|
||||
<div class="subject_lsec">
|
||||
<div class="common-heading">
|
||||
<h2>Add New Role</h2>
|
||||
</div>
|
||||
<?php
|
||||
$name=''; $status=''; $desc=''; $permissions=array();
|
||||
if(isset($details) && !empty($details))
|
||||
{
|
||||
$name = $details[0]['role_name'];
|
||||
$status = $details[0]['status'];
|
||||
$desc = $details[0]['role_desc'];
|
||||
//$permissions = $details[0]['admin_role_ids'];
|
||||
}
|
||||
|
||||
if(isset($role_permissions[0]['menu_ids']) && $role_permissions[0]['menu_ids']!='')
|
||||
$permissions = explode(',', $role_permissions[0]['menu_ids']);
|
||||
?>
|
||||
<form action='<?php echo base_url().'add-edit-role/'.$idVal;?>' id="addEditRoleForm" method="post">
|
||||
<input type='hidden' name='id' id='id' value='<?php echo $idVal;?>' />
|
||||
<div class="subject_lformarea role_formarea">
|
||||
<div class="form-group">
|
||||
<label for="">Role Name<span class="text-danger font-weight-bold">*</span></label>
|
||||
<input type="text" name="role_name" id="role_name" value='<?php echo $name;?>' class="form-control" >
|
||||
<label style="display : none" class="form_err" id='role_name_error'></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Choose Status</option>
|
||||
<option value="Active" <?php if($status == 'Active'){?>selected<?php } ?>>Active</option>
|
||||
<option value="Inactive" <?php if($status == 'Inactive'){?>selected<?php } ?>>Inactive</option>
|
||||
</select>
|
||||
<label style="display : none" class="form_err" id='status_error'></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""> Description</label>
|
||||
<textarea class="form-control" data-altName="Description" name="role_desc" id="role_desc" rows="6" ><?php echo $desc;?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for=""> Role Permissions<span class="text-danger font-weight-bold">*</span></label>
|
||||
<div class="roles_checkbox">
|
||||
<?php
|
||||
if(isset($menus) && !empty($menus))
|
||||
{
|
||||
foreach($menus as $m)
|
||||
{
|
||||
?>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input role_perm" type="checkbox" value="<?php echo $m['id'];?>" name="role_permissions[]" <?php if(in_array($m['id'], $permissions)){?>checked<?php } ?> >
|
||||
<label class="form-check-label" ><?php echo $m['menu_name'];?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<label style="display : none" class="form_err" id='permissions_error'></label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<button type="button" class="subject_addbtn" onclick='validate_role_form()'><?= $button; ?></button>
|
||||
|
||||
|
||||
<a href='<?php echo base_url()."roles";?>'>
|
||||
<button class="btn btn-dark btn-sm">Back</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var jsAddOrEdit = '<?php echo $idVal;?>';
|
||||
$(document).ready(function(){
|
||||
$(document).on('keypress', function(e){
|
||||
if(e.which==13)
|
||||
{
|
||||
validate_role_form();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function hide_all_role_errors()
|
||||
{
|
||||
$('#role_name_error').hide();
|
||||
$('#status_error').hide();
|
||||
$('#permissions_error').hide();
|
||||
}
|
||||
|
||||
function validate_role_form()
|
||||
{
|
||||
hide_all_role_errors();
|
||||
|
||||
var errArr = new Array();
|
||||
|
||||
var rname = $('#role_name').val().trim();
|
||||
var rnameRegEx = /^[a-zA-Z\s]+$/;
|
||||
if(rname=='')
|
||||
errArr.push('role_name_Sep@Str_Please enter the role name.');
|
||||
else if(!rnameRegEx.test(rname))
|
||||
errArr.push('role_name_Sep@Str_Please enter only characters.');
|
||||
else
|
||||
{
|
||||
var urltogo = '<?php echo base_url();?>'+'LmsAdmin/ajaxCheckIsRoleAlreadyExists';
|
||||
var reqdData = 'role_name='+$('#role_name').val()+'&id='+$('#id').val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: urltogo,
|
||||
data: reqdData,
|
||||
async: false,
|
||||
success: function(result)
|
||||
{
|
||||
result = result.trim();
|
||||
//alert(result);
|
||||
if(result == 'Duplicate Role')
|
||||
errArr.push('role_name_Sep@Str_This role name already exists.');
|
||||
else if(result == 'Insufficient Data')
|
||||
errArr.push('role_name_Sep@Str_Insufficient Data Sent. Please check again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var status = $('#status').val().trim();
|
||||
if(status=='')
|
||||
errArr.push('status_Sep@Str_Please select the user status.');
|
||||
|
||||
var epCnt = 0;
|
||||
$('.role_perm').each(function(){
|
||||
if($(this).prop('checked'))
|
||||
epCnt++;
|
||||
});
|
||||
if(epCnt == 0)
|
||||
errArr.push('permissions_Sep@Str_Please select the role permissions.');
|
||||
|
||||
//var errArr = new Array();
|
||||
if(errArr.length>0)
|
||||
{
|
||||
for(i=0; i<errArr.length; i++)
|
||||
{
|
||||
var resArr = errArr[i].split("_Sep@Str_");
|
||||
$("#"+resArr[0]+"_error").html(resArr[1]);;
|
||||
$("#"+resArr[0]+"_error").show();
|
||||
}
|
||||
var xxxVal = errArr[0].split('_Sep@Str_');
|
||||
$('#'+xxxVal[0]).focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#addEditRoleForm').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
238
library/application/views/lms-admin/add-edit-user.php
Normal file
238
library/application/views/lms-admin/add-edit-user.php
Normal file
@ -0,0 +1,238 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_r">
|
||||
<div class="subject_lsec">
|
||||
<div class="common-heading">
|
||||
<h2><?php echo $title;?></h2>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$name=''; $eid=''; $rid=''; $status='';
|
||||
if(isset($details) && !empty($details))
|
||||
{
|
||||
$name = $details[0]['admin_name'];
|
||||
$eid = $details[0]['email'];
|
||||
$rid = $details[0]['admin_role_ids'];
|
||||
$status = $details[0]['status'];
|
||||
}
|
||||
?>
|
||||
|
||||
<form action='<?php echo base_url().'add-edit-user/'.$idVal;?>' id="addEditUserForm" method="post">
|
||||
<input type='hidden' name='id' id='id' value='<?php echo $idVal;?>' />
|
||||
<div class="subject_lformarea role_formarea">
|
||||
<div class="form-group">
|
||||
<label for="">Full Name<span class="text-danger font-weight-bold">*</span></label>
|
||||
<input type="text" name="admin_name" id="admin_name" value='<?php echo $name;?>' class="form-control" >
|
||||
<label style="display:none" class="form_err" id='admin_name_error'></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Email ID<span class="text-danger font-weight-bold">*</span></label>
|
||||
<input type="email" name="email" id="email" value='<?php echo $eid;?>' class="form-control">
|
||||
<label style="display:none" class="form_err" id='email_error'></label>
|
||||
</div>
|
||||
|
||||
<?php if($idVal == 0){?>
|
||||
<div class="form-group">
|
||||
<label for="">Password<span class="text-danger font-weight-bold">*</span></label>
|
||||
<div class="password-wrp">
|
||||
<input type="password" name="password" id="password" class="form-control password_hide" >
|
||||
<span class="passwrd-icon icon-y"><i class="far fa-eye"></i></span>
|
||||
</div>
|
||||
<label style="display:none" class="form_err" id='password_error'></label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="">Confirm Password<span class="text-danger font-weight-bold">*</span></label>
|
||||
<div class="password-wrp">
|
||||
<input type="password" id="confirm-password" name="confirm_password" class=" form-control password_hide_c" >
|
||||
<span class="con-pass icon-y"><i class="far fa-eye"></i></span>
|
||||
</div>
|
||||
<label style="display:none" class="form_err" id='confirm-password_error'></label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="">User Role<span class="text-danger font-weight-bold">*</span></label>
|
||||
<select name="admin_role_ids" id="admin_role_ids" class="form-control">
|
||||
<option value="">Choose Role</option>
|
||||
<?php
|
||||
if(isset($roles) && !empty($roles))
|
||||
{
|
||||
foreach($roles as $rs)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rs['id'];?>" <?php if($rs['id'] == $rid){?>selected<?php } ?>><?php echo $rs['role_name'];?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label style="display:none" class="form_err" id='admin_role_ids_error'></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Status<span class="text-danger font-weight-bold">*</span></label>
|
||||
<select name="status" id="status" class="form-control">
|
||||
<option value="">Choose Status</option>
|
||||
<option value="Active" <?php if($status == 'Active'){?>selected<?php } ?>>Active</option>
|
||||
<option value="Inactive" <?php if($status == 'Inactive'){?>selected<?php } ?>>Inactive</option>
|
||||
</select>
|
||||
<label style="display:none" class="form_err" id='status_error'></label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<button type="button" type='button' onclick="validate_user_form()" class="subject_addbtn"><?= $button; ?></button>
|
||||
|
||||
|
||||
<a href='<?php echo base_url()."users";?>'>
|
||||
<button class="btn btn-dark btn-sm">Back</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var jsAddOrEdit = '<?php echo $idVal;?>';
|
||||
$(document).ready(function(){
|
||||
$(document).on('keypress', function(e){
|
||||
if(e.which==13)
|
||||
{
|
||||
validate_user_form();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function hide_all_user_errors()
|
||||
{
|
||||
$('#admin_name_error').hide();
|
||||
$('#email_error').hide();
|
||||
|
||||
if(jsAddOrEdit == 0){
|
||||
$('#password_error').hide();
|
||||
$('#confirm-password_error').hide();
|
||||
}
|
||||
|
||||
$('#admin_role_ids_error').hide();
|
||||
$('#status_error').hide();
|
||||
}
|
||||
|
||||
function validate_user_form()
|
||||
{
|
||||
hide_all_user_errors();
|
||||
|
||||
var errArr = new Array();
|
||||
|
||||
var admin_name = $('#admin_name').val().trim();
|
||||
var rnameRegEx = /^[a-zA-Z\s]+$/;
|
||||
if(admin_name=='')
|
||||
errArr.push('admin_name_Sep@Str_Please enter the full name.');
|
||||
else if(!rnameRegEx.test(admin_name))
|
||||
errArr.push('admin_name_Sep@Str_Please enter only characters.');
|
||||
|
||||
var email = $('#email').val().trim();
|
||||
if(email=='')
|
||||
errArr.push('email_Sep@Str_Please enter the Email Id.');
|
||||
else
|
||||
{
|
||||
var regEmailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
|
||||
if(!regEmailReg.test($('#email').val()))
|
||||
errArr.push('email_Sep@Str_Please enter a valid email address.');
|
||||
else
|
||||
{
|
||||
var urltogo = '<?php echo base_url();?>'+'LmsAdmin/ajaxCheckIsUserEmailAlreadyExists';
|
||||
var reqdData = 'email='+$('#email').val()+'&id='+$('#id').val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: urltogo,
|
||||
data: reqdData,
|
||||
async: false,
|
||||
success: function(result)
|
||||
{
|
||||
result = result.trim();
|
||||
//alert(result);
|
||||
if(result == 'Duplicate Email')
|
||||
errArr.push('email_Sep@Str_This email id already exists.');
|
||||
else if(result == 'Insufficient Data')
|
||||
errArr.push('email_Sep@Str_Insufficient Data Sent. Please check again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(jsAddOrEdit == 0)
|
||||
{
|
||||
var password = $('#password').val().trim();
|
||||
if(password=='')
|
||||
errArr.push('password_Sep@Str_Please enter the password.');
|
||||
else{
|
||||
var regPwdReg = /(?=.*[a-zA-Z0-9])(?=.*?\W).{6,}/;
|
||||
if(!regPwdReg.test($('#password').val()))
|
||||
errArr.push('password_Sep@Str_Password should be minimum 6 characters and should have atleast one special character.');
|
||||
}
|
||||
|
||||
var confirm_password = $('#confirm-password').val().trim();
|
||||
if(confirm_password=='')
|
||||
errArr.push('confirm-password_Sep@Str_Please confirm the password.');
|
||||
|
||||
if($('#password').val()!='' && $('#confirm-password').val()!='' && ($('#password').val() != $('#confirm-password').val()) )
|
||||
errArr.push('confirm-password_Sep@Str_Password & confirm Password does not match.');
|
||||
}
|
||||
|
||||
var role_id = $('#admin_role_ids').val().trim();
|
||||
if(role_id=='')
|
||||
errArr.push('admin_role_ids_Sep@Str_Please select the user role.');
|
||||
|
||||
var status = $('#status').val().trim();
|
||||
if(status=='')
|
||||
errArr.push('status_Sep@Str_Please select the user status.');
|
||||
|
||||
//var errArr = new Array();
|
||||
if(errArr.length>0)
|
||||
{
|
||||
for(i=0; i<errArr.length; i++)
|
||||
{
|
||||
var resArr = errArr[i].split("_Sep@Str_");
|
||||
$("#"+resArr[0]+"_error").html(resArr[1]);;
|
||||
$("#"+resArr[0]+"_error").show();
|
||||
}
|
||||
var xxxVal = errArr[0].split('_Sep@Str_');
|
||||
$('#'+xxxVal[0]).focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#addEditUserForm').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
72
library/application/views/lms-admin/books-reload.php
Normal file
72
library/application/views/lms-admin/books-reload.php
Normal file
@ -0,0 +1,72 @@
|
||||
<table id="tbl" class="display dataTable table-responsive text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th>ISBN</th>
|
||||
<th>Title</th>
|
||||
<th>Category</th>
|
||||
<th>Author</th>
|
||||
<th>Rack No</th>
|
||||
<th>Total</th>
|
||||
<th>Issued</th>
|
||||
<th>Available</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (isset($bookDetail) && !empty($bookDetail)) {
|
||||
$i = 1;
|
||||
foreach ($bookDetail as $bData) {
|
||||
$where = " id=" . $bData['category_id'];
|
||||
$categoryData = $this->LmsAdmin_Model->getData('lms_categories', $where);
|
||||
$catName = '';
|
||||
if ($categoryData) {
|
||||
$catName = $categoryData['name'];
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $i; ?></td>
|
||||
<td><?= $bData['isbn']; ?></td>
|
||||
<td><?= $bData['title']; ?></td>
|
||||
<td><?= $catName; ?></td>
|
||||
<td><?= $bData['author']; ?></td>
|
||||
<td><?= $bData['rack_no']; ?></td>
|
||||
<td><?= $bData['total_quantity']; ?></td>
|
||||
<td><?= $bData['total_quantity'] - $bData['remaining_quantity']; ?></td>
|
||||
<td><?= $bData['remaining_quantity']; ?></td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<a href="<?= base_url(); ?>add-edit-book/<?= $bData['id']; ?>">
|
||||
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
|
||||
</a>
|
||||
<div class="sub_delbtn" onclick="deleteBook(<?= $bData['id']; ?>)"><i class="fa fa-trash" aria-hidden="true"></i></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
121
library/application/views/lms-admin/books.php
Normal file
121
library/application/views/lms-admin/books.php
Normal file
@ -0,0 +1,121 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
<div class="alert alert-success mt-4"><strong>Success!</strong> <?php echo $this->session->flashdata('success'); ?></div>
|
||||
<?php } ?>
|
||||
<div class="alert alert-danger mt-4" id="errShow" style="display:none;"><strong>Failure!</strong> Book is having dependent data you can not delete this book.</div>
|
||||
<div class="alert alert-success mt-4" id="successshow" style="display:none;"><strong>Success!</strong> Book has been deleted successfully.</div>
|
||||
<div class="common-heading">
|
||||
<h2>Books</h2>
|
||||
|
||||
<div class="dashboard-btn-wrap">
|
||||
<div class="bookImport-cover">
|
||||
<form id="importForm" action="<?= base_url(); ?>importBooks" method="POST" enctype="multipart/form-data">
|
||||
<input id="upload_file" name="upload_file" type="file" accept=".csv" class="bookImport" />
|
||||
<label class="bookUploadLbl">Import Books from CSV </label>
|
||||
</form>
|
||||
</div>
|
||||
<a href="<?= base_url(); ?>add-edit-book/0"><button class="btn btn-success btn-sm">+ Add Book</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select_div">
|
||||
<select class="form-control txtData" name="category_id" id="category_id" onchange="getBookData(this.value)">
|
||||
<option value="" selected disabled>Select Category</option>
|
||||
<?php if (isset($categoryData) && !empty($categoryData)) {
|
||||
foreach ($categoryData as $cData) { ?>
|
||||
<option value="<?= $cData['id']; ?>"><?= $cData['name']; ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="" id="bookLists">
|
||||
<?php
|
||||
if (isset($bookDetail))
|
||||
echo $bookDetail;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
function getBookData(cat_id) {
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/ajaxGetBookLists',
|
||||
data: {
|
||||
'categoryId': cat_id
|
||||
},
|
||||
success: function(result) {
|
||||
result = result.trim();
|
||||
$('#bookLists').empty();
|
||||
$('#bookLists').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteBook(bookId) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/deleteBookData',
|
||||
data: {
|
||||
'bookId': bookId
|
||||
},
|
||||
success: function(result) {
|
||||
if (result == 0) {
|
||||
$('#successshow').hide();
|
||||
$('#errShow').show();
|
||||
} else if (result == 1) {
|
||||
$('#errShow').hide();
|
||||
$('#successshow').show();
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#upload_file').change(function() {
|
||||
$('#importForm').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
246
library/application/views/lms-admin/category.php
Normal file
246
library/application/views/lms-admin/category.php
Normal file
@ -0,0 +1,246 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2>Categories</h2>
|
||||
<div class="dashboard-btn-wrap">
|
||||
<button class="btn btn-success" data-toggle="modal" onclick="showModal()">Add Category</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-danger" id="errShow" style="display:none;"><strong>Failure!</strong> The category having dependent data you cannot delete this category.</div>
|
||||
<div class="alert alert-success" id="success" style="display:none;"><strong>Success!</strong> The category deleted successfully.</div>
|
||||
<div class="alert alert-success" id="successMsg" style="display:none;"><strong>Success!</strong> The changes done on category table successfully.</div>
|
||||
<div class="settings-tbl">
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th>Category Name</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(isset($categoryData) && !empty($categoryData)){ $i=1; foreach($categoryData as $cData) { ?>
|
||||
<tr>
|
||||
<td><span class="text-center"><?= $i; ?></span></td>
|
||||
<td><?= $cData['name']; ?></td>
|
||||
<td><?php if($cData['is_active'] == 'Y'){ echo 'Active';}else{echo 'Inactive'; } ?></td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<div class="sub_editbtn" onclick="editCategory(<?= $cData['id']; ?>)"><i class="fas fa-pencil-alt"></i></div>
|
||||
<div class="sub_delbtn" onclick="deleteCategory(<?= $cData['id']; ?>)"><i class="fa fa-trash" aria-hidden="true"></i></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<div class="addCategory_modal">
|
||||
<div class="modal fade" id="addCategory" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<form id="categoryForm" method="POST">
|
||||
<input type="hidden" name="id" id="id" value="0">
|
||||
<div class="modal-body" id="modalBody">
|
||||
<div class="form-group">
|
||||
<label>Category Name</label>
|
||||
<input type="text" class="form-control txtData" name="name" id="name" placeholder="Category Name">
|
||||
<p class="form_err" id="error-name"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Status</label>
|
||||
<select class="form-control txtData" name="is_active" id="is_active" style="padding:0;">
|
||||
<option value="">Select Option</option>
|
||||
<option value="Y">Active</option>
|
||||
<option value="N">Inactive</option>
|
||||
</select>
|
||||
<p class="form_err" id="error-is_active"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="dashboard-btn-wrap">
|
||||
<button type="submit" class="btn btn-success btn-sm" id="buttonName">Add</button>
|
||||
<button class="btn btn-dark btn-sm" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$.validator.addMethod("nameRegex", function(value, element) {
|
||||
return this.optional(element) || /^[a-zA-Z\s]*$/.test(value);
|
||||
}, "Category must contain only letters.");
|
||||
|
||||
$( "#categoryForm" ).validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
name: {
|
||||
required: true,
|
||||
minlength : 3,
|
||||
maxlength : 50,
|
||||
nameRegex: true
|
||||
},
|
||||
is_active: {
|
||||
required: {
|
||||
depends: function(element) {
|
||||
return $("#is_active").val() == '';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: "Category name is required",
|
||||
minlength : "At least 3 characters long",
|
||||
maxlength : "Should not exceed 50 characters",
|
||||
nameRegex: "Contain only letters."
|
||||
},
|
||||
is_active:{
|
||||
required: "Option is required"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "name") {
|
||||
error.appendTo($("#error-name"));
|
||||
}else if (element.attr("name") == "is_active") {
|
||||
error.appendTo($("#error-is_active"));
|
||||
}else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function (form)
|
||||
{
|
||||
var formdata = new FormData(form);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/getCategoryData',
|
||||
data: formdata,
|
||||
cache:false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result){
|
||||
if(result == 0)
|
||||
{
|
||||
$('#error-name').text('Category already exists');
|
||||
}
|
||||
if(result == 1){
|
||||
$('#addCategory').modal('hide');
|
||||
$('#successMsg').show();
|
||||
setTimeout(() => { location.reload(); }, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function deleteCategory(cat_id)
|
||||
{
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Once deleted, you will not be able to recover this category!",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((willDelete) => {
|
||||
if (willDelete) {
|
||||
var tableName = 'lms_categories';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/deleteCategoryData',
|
||||
data: {'categoryId': cat_id, 'tableName': tableName},
|
||||
success: function(result){
|
||||
if(result == 0)
|
||||
{
|
||||
$('#success').hide();
|
||||
$('#errShow').show();
|
||||
}
|
||||
else if(result == 1)
|
||||
{
|
||||
$('#errShow').hide();
|
||||
$('#success').show();
|
||||
setTimeout(function(){ location.reload(); }, 3000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function editCategory(cat_id)
|
||||
{
|
||||
var tableName= 'lms_categories';
|
||||
$('#id').val(cat_id);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/getCategoryById',
|
||||
data: {'categoryId': cat_id, 'tableName': tableName},
|
||||
success: function(result){
|
||||
$('#buttonName').text('Update');
|
||||
$('#modalBody').html(result);
|
||||
$('#addCategory').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showModal()
|
||||
{
|
||||
$('#buttonName').text('Add');
|
||||
$('.txtData').val('');
|
||||
$('#error-name').html('');
|
||||
$('#error-is_active').html('');
|
||||
$('#addCategory').modal('show');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
11
library/application/views/lms-admin/common/footer.php
Normal file
11
library/application/views/lms-admin/common/footer.php
Normal file
@ -0,0 +1,11 @@
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
48
library/application/views/lms-admin/common/header.php
Normal file
48
library/application/views/lms-admin/common/header.php
Normal file
@ -0,0 +1,48 @@
|
||||
<!--right-top side-->
|
||||
<header class="common_margin" id="header">
|
||||
<div class="user-login-section">
|
||||
<?php
|
||||
$yourName = '';
|
||||
$namesFirstLetter = '';
|
||||
$linSessData = $_SESSION['lmsAULoginData'];
|
||||
if (isset($linSessData['lms_lin_name'])) {
|
||||
$yourName = $linSessData['lms_lin_name'];
|
||||
$namesFirstLetter = substr($yourName, 0, 1);
|
||||
}
|
||||
?>
|
||||
<!-- <div class="notification-icon-wrap">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/notification.png">
|
||||
<span></span>
|
||||
<div class="notifications-wrap">
|
||||
<div class="notifications">
|
||||
<h4>Notifications</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor </p>
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="user-wrap">
|
||||
<div class="user-login-head">
|
||||
<div class="profileImage"><?php echo $namesFirstLetter; ?></div>
|
||||
<h5><span class="user-name"><?php echo $yourName; ?></span><i class="fa fa-caret-down" aria-hidden="true"></i><i class="fa fa-caret-up" aria-hidden="true"></i></h5>
|
||||
</div>
|
||||
<div class="login-wrap-open">
|
||||
<ul>
|
||||
<!-- <li><a href=""><span><i class="fa fa-user" aria-hidden="true"></i></span>My Profile</a></li> -->
|
||||
<li>
|
||||
<a href="<?php echo base_url() . 'logout'; ?>">
|
||||
<span><i class="fas fa-sign-out-alt"></i></span>Sign Out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobileMenu">
|
||||
<i class="fas fa-bars"></i>
|
||||
</div>
|
||||
</header>
|
173
library/application/views/lms-admin/common/left-menu.php
Normal file
173
library/application/views/lms-admin/common/left-menu.php
Normal file
@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LMS | Home</title>
|
||||
<!--styles links-->
|
||||
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>assets-lms/fav.png">
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css">
|
||||
<!-- <link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap-select.css"> -->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/font-family.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/all.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/responsive.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/owl-carousel/css/owl.carousel.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin-responsive.css">
|
||||
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/nepali.datepicker.v3.7.min.css">
|
||||
<script src="<?= base_url(); ?>assets-lms/js/nepali.datepicker.v3.7.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wraper">
|
||||
<!--left side content-->
|
||||
<aside id="mySidebar" class="sideMenu">
|
||||
<div class="logo-wrap">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/erisn-white.png">
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
$linSessData = $_SESSION['lmsAULoginData'];
|
||||
if (!isset($linSessData['lms_lin_login']))
|
||||
redirect(base_url() . 'admin');
|
||||
//echo '<pre>'; print_r($linSessData);exit;
|
||||
|
||||
$currentURL = current_url();
|
||||
$url = explode(base_url(), $currentURL);
|
||||
//echo $currentURL;
|
||||
//echo '<pre>';print_r($url);
|
||||
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('LmsAdmin_Model');
|
||||
|
||||
$adminMenuHere = $CI->LmsAdmin_Model->get_admin_menu();
|
||||
//echo '<pre>'; print_r($adminMenuHere);exit;
|
||||
|
||||
$theRoleIds = '';
|
||||
$adminRolesHere = $CI->LmsAdmin_Model->get_admin_details('', "SELECT admin_role_ids FROM lms_admin WHERE id = " . $linSessData['lms_lin_id']);
|
||||
if (isset($adminRolesHere[0]['admin_role_ids']) && $adminRolesHere[0]['admin_role_ids'] != '')
|
||||
$theRoleIds = $adminRolesHere[0]['admin_role_ids'];
|
||||
$adminRolePerms = array();
|
||||
if ($theRoleIds != '')
|
||||
$adminRolePerms = $CI->LmsAdmin_Model->get_lms_admin_role_permissions("admin_role_ids IN(" . $theRoleIds . ")");
|
||||
|
||||
if (!empty($adminRolePerms)) {
|
||||
$arpStr = '';
|
||||
$arpArr = array();
|
||||
foreach ($adminRolePerms as $arp) {
|
||||
if ($arpStr == '')
|
||||
$arpStr = $arp['menu_ids'];
|
||||
else
|
||||
$arpStr .= ',' . $arp['menu_ids'];
|
||||
}
|
||||
$arpArr = array_unique(explode(',', $arpStr));
|
||||
|
||||
if (!empty($adminMenuHere)) {
|
||||
foreach ($adminMenuHere as $key => $menuData) {
|
||||
if (in_array($key, $arpArr)) {
|
||||
if (isset($menuData[$key]) && !empty($menuData[$key])) {
|
||||
$smPageLinks = array();
|
||||
foreach ($menuData[$key] as $tmactive) {
|
||||
array_push($smPageLinks, $tmactive['page_link']);
|
||||
}
|
||||
//echo '<pre>'; print_r($smPageLinks);
|
||||
//echo $url[0];
|
||||
$mmmActive = '';
|
||||
if (in_array($url[1], $smPageLinks))
|
||||
$mmmActive = 'active';
|
||||
?>
|
||||
<li class="list <?php echo $mmmActive; ?>">
|
||||
<a href="javascript:void(0)" id="btn-1" class="dropdown-toggle" data-toggle="collapse" data-target="#<?php echo $menuData['menu_name'] . '-submenu'; ?>" aria-expanded="false">
|
||||
<!-- <img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
|
||||
<span><?php echo $menuData['menu_name']; ?></span>
|
||||
</a>
|
||||
<div class="nav collapse" id="<?php echo $menuData['menu_name'] . '-submenu'; ?>" role="menu" aria-labelledby="btn-1">
|
||||
|
||||
<?php
|
||||
foreach ($menuData[$key] as $subMenu) {
|
||||
?>
|
||||
<a class="dropdown-item <?php if ($url[1] == $subMenu['page_link']) { ?>active<?php } ?>" href="<?php echo base_url() . $subMenu['page_link']; ?>"><?php echo $subMenu['menu_name']; ?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<li class="list <?php if ($url[1] == $menuData['page_link']) { ?>active<?php } ?>">
|
||||
<a href="<?php echo base_url() . $menuData['page_link']; ?>" class="dropdown">
|
||||
<!-- <img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
|
||||
<span><?php echo $menuData['menu_name']; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<!--<ul class="side-list">
|
||||
<li class="list active">
|
||||
<a href="index.html">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/dashboard1.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/dashboard2.png" class="icon-active">
|
||||
<span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list " >
|
||||
<a href="subject-create.html" >
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/books2.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/books1.png" class="icon-active">
|
||||
<span>Books</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="list ">
|
||||
<a href="syllabus-list.html">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/issued2.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/issued1.png" class="icon-active">
|
||||
<span>Issued Books</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list">
|
||||
<a href="course-list.html">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/returned2.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/returned1.png" class="icon-active">
|
||||
<span>Returned Books</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list">
|
||||
<a href="classroom-create.html">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/student2.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/student1.png" class="icon-active">
|
||||
<span>Students</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list listWithDrpdwn">
|
||||
<a href="classroom-create.html" class="dropdown-toggle" data-toggle="collapse" data-target="#submenu1" aria-expanded="false">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/student2.png" class="icon-inactive">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/student1.png" class="icon-active">
|
||||
<span>Authentication</span>
|
||||
</a>
|
||||
<div class="nav collapse tes " id="submenu1" role="menu" aria-labelledby="btn-1">
|
||||
<a class="dropdown-item active" href="#">Submenu 1</a>
|
||||
<a class="dropdown-item" href="#">option 2 submenu</a>
|
||||
<a class="dropdown-item" href="#">Something submenu</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>-->
|
||||
</aside>
|
||||
<!--End left side content-->
|
@ -0,0 +1,75 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<?php if(isset($damagedBookDetail) && !empty($damagedBookDetail)){ ?>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?> - <?= $bookData['isbn']; ?> - <?= $bookData['title']; ?></h2>
|
||||
</div>
|
||||
<div class="book-detail-cover">
|
||||
<?php $i=1; foreach($damagedBookDetail as $dbdata){
|
||||
$book_data = $this->db->get_where('lms_books', ['id'=> $dbdata['book_id']])->row_array();
|
||||
$stdIs = $dbdata['eu_unique_id'];
|
||||
$eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs);
|
||||
?>
|
||||
<div class="book-detail-row">
|
||||
<div class="book-detail_number"><?= $i; ?></div>
|
||||
<div class="dam_book_info">
|
||||
<ul>
|
||||
<li><label>Student ID</label><span><?= $dbdata['eu_unique_id']; ?></span></li>
|
||||
<li><label>Full Name</label><span><?= $eu_name['name']; ?></span></li>
|
||||
<li><label>Class</label><span><?= $eu_name['class_name']; ?></span></li>
|
||||
<li><label>Contact</label><span><?= $eu_name['mobile']; ?></span></li>
|
||||
<li><label>Issued</label><span><?= date('d-m-Y', strtotime($dbdata['issued_date'])); ?></span></li>
|
||||
<li><label>Return</label><span><?= date('d-m-Y', strtotime($dbdata['returned_on_date'])); ?></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dam_book_cmnt">
|
||||
<div class="dam_book">
|
||||
<h4>Comment</h4>
|
||||
<p><?= nl2br($dbdata['damaged_comment']); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++; } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
88
library/application/views/lms-admin/damaged-books.php
Normal file
88
library/application/views/lms-admin/damaged-books.php
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
</div>
|
||||
<div class="">
|
||||
<table id="tbl" class="display dataTable table-responsive text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th>Barcode ID(ISBN)</th>
|
||||
<th>Title</th>
|
||||
<th>Subject(Category)</th>
|
||||
<th>Author</th>
|
||||
<th>Rack No</th>
|
||||
<th>Year</th>
|
||||
<th>Pages</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(isset($damagedBookData) && !empty($damagedBookData)){ $i=1; foreach($damagedBookData as $dbdata) {
|
||||
$book_data = $this->db->get_where('lms_books', ['id'=> $dbdata['book_id']])->row_array();
|
||||
$category = $this->db->get_where('lms_categories', ['id'=> $book_data['category_id']])->row_array();
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $i; ?></td>
|
||||
<td><?= $book_data['isbn']; ?></td>
|
||||
<td><?= $book_data['title']; ?></td>
|
||||
<td><?= $category['name']; ?></td>
|
||||
<td><?= $book_data['author']; ?></td>
|
||||
<td><?= $book_data['rack_no']; ?></td>
|
||||
<td><?= $book_data['published_year']; ?></td>
|
||||
<td><?= $book_data['total_no_of_pages']; ?></td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<a href="<?= base_url(); ?>damaged-books-details/<?= $book_data['id']; ?>">
|
||||
<button class="subject_addbtn" data-toggle="modal" data-target="#bookCmnt">View Details</button>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
185
library/application/views/lms-admin/dashboard.php
Normal file
185
library/application/views/lms-admin/dashboard.php
Normal file
@ -0,0 +1,185 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="common-heading">
|
||||
<h2>DashBoard</h2>
|
||||
<!--<div class="dashboard-btn-wrap">-->
|
||||
<!-- <button class="btn btn-success btn-sm">Issue Book</button>-->
|
||||
<!-- <button class="subject_addbtn">Receive Book</button>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div class="dashboard-tabs-wrap">
|
||||
<div class="dashboard-tabs" onclick="showBook()">
|
||||
<div class="tab-info">
|
||||
<h3><?= $ttlData['ttl_books']; ?></h3>
|
||||
<h5>Total <br> Books</h5>
|
||||
</div>
|
||||
<div class="tab-img">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/total-books.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-tabs" onclick="showIssuedBook()">
|
||||
<div class="tab-info">
|
||||
<h3><?= $ttlData['ttl_issed_book']; ?></h3>
|
||||
<h5>Issued <br> Books</h5>
|
||||
</div>
|
||||
<div class="tab-img">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/issued-books.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-tabs" onclick="showReturnedBook()">
|
||||
<div class="tab-info">
|
||||
<h3><?= $ttlData['ttl_late_fee']; ?></h3>
|
||||
<h5>Late <br> Dues</h5>
|
||||
</div>
|
||||
<div class="tab-img">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/late-dues.png">
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-tabs" onclick="showDamagedBook()">
|
||||
<div class="tab-info">
|
||||
<h3><?= $ttlData['ttl_damaged_book']; ?></h3>
|
||||
<h5>Damaged <br> Books</h5>
|
||||
</div>
|
||||
<div class="tab-img">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/damaged-books.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<div class="subject_lhead">Recently Issued Books <a href="<?= base_url(); ?>issued-books" class="dashboardLink">View more</a></div>
|
||||
<div class="">
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Book Name</th>
|
||||
<th>Student Name</th>
|
||||
<th>Contact</th>
|
||||
<th>Issued Date</th>
|
||||
<th>Remaining Days</th>
|
||||
<th>Over Due</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(isset($recentlyIssuedBook) && !empty($recentlyIssuedBook)){ foreach($recentlyIssuedBook as $ridata){
|
||||
$book_name = $this->db->get_where('lms_books', ['id'=> $ridata['book_id']])->row_array();
|
||||
$stdIs = $ridata['eu_unique_id'];
|
||||
$eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs);
|
||||
$name=''; $mobile='';
|
||||
if($eu_name)
|
||||
{
|
||||
$name = $eu_name['name'];
|
||||
$mobile = $eu_name['mobile'];
|
||||
}
|
||||
//calculating of remaining days
|
||||
$today = date('Y-m-d');
|
||||
$remdays_diff = strtotime($ridata['return_date'])-strtotime($today);
|
||||
$remaining_days = round($remdays_diff / 86400);
|
||||
if($remaining_days<0)
|
||||
{
|
||||
$remaining_days = 0;
|
||||
}
|
||||
|
||||
//calculating of over due days
|
||||
$oddays = 0; $class='';
|
||||
$overdue_diff = strtotime($today)-strtotime($ridata['return_date']);
|
||||
$overdue_days = round($overdue_diff / 86400);
|
||||
if($overdue_days>$remaining_days){
|
||||
$oddays = $overdue_days;
|
||||
$class = 'class="due"';
|
||||
}
|
||||
|
||||
$issDateObj = new DateTime($ridata['issued_date']);
|
||||
$issueDate = $issDateObj->format('Y-m-d');
|
||||
|
||||
$todayDateObj = new DateTime($npCurrDate);
|
||||
$todayIs = $todayDateObj->format('Y-m-d');
|
||||
|
||||
$retDateObj = new DateTime($ridata['return_date']);
|
||||
$returnDate = $retDateObj->format('Y-m-d');
|
||||
|
||||
$remDaysClass='';
|
||||
$date1 = date_create($todayIs);
|
||||
$date2 = date_create($returnDate);
|
||||
$remaining_days = $date1->diff($date2)->format("%r%a");
|
||||
if($remaining_days == 0){
|
||||
$remaining_days = 'Due Today';
|
||||
$remDaysClass='due';
|
||||
}
|
||||
else if($remaining_days < 0)
|
||||
$remaining_days = '0 Days';
|
||||
else
|
||||
$remaining_days = $remaining_days.' Days';
|
||||
|
||||
$class=''; $over_due_days=0;
|
||||
$date11 = date_create($returnDate);
|
||||
$date22 = date_create($todayIs);
|
||||
$over_due_days = $date11->diff($date22)->format("%r%a");
|
||||
if($over_due_days > 0)
|
||||
$class = 'class="due"';
|
||||
if($over_due_days < 0)
|
||||
$over_due_days = 0;
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $book_name['title']; ?></td>
|
||||
<td><?= $name; ?></td>
|
||||
<td><?= $mobile; ?></td>
|
||||
<td><?= $issDateObj->format(DATE_FORMAT); ?></td>
|
||||
<td><?= $remaining_days; ?></td>
|
||||
<td <?= $class; ?> ><?= $over_due_days; ?> Days</td>
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
</script>
|
||||
<script>
|
||||
function showBook()
|
||||
{
|
||||
window.location.href="<?= base_url(); ?>books";
|
||||
}
|
||||
|
||||
function showIssuedBook()
|
||||
{
|
||||
window.location.href="<?= base_url(); ?>issued-books";
|
||||
}
|
||||
|
||||
function showReturnedBook()
|
||||
{
|
||||
window.location.href="<?= base_url(); ?>returned-books";
|
||||
}
|
||||
|
||||
function showDamagedBook()
|
||||
{
|
||||
window.location.href="<?= base_url(); ?>damaged-books";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,74 @@
|
||||
<!doctype html>
|
||||
<body style="background-color:#e2e1e0;font-family: Open Sans, sans-serif;font-size:100%;font-weight:400;line-height:1.4;color:#000;">
|
||||
<table style=" max-width: 670px;margin:50px auto 10px;background-color:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);-moz-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24); line-height: 25px;">
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
|
||||
<table style="padding:20px 30px;padding: 20px 30px;background: #fff;width: 100%;padding: 115px auto 0;">
|
||||
<tbody>
|
||||
<tr style="padding: 20px 0;text-align: center;">
|
||||
<td><img src="<?php echo base_url()?>assets-lms/images/erisn-blue.png"></td>
|
||||
</tr>
|
||||
<tr style="text-align: center;">
|
||||
<td><img src="<?php echo base_url()?>assets-lms/images/mail-image.png" style="margin-top: 20px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: 800;font-size: 22px;"> Reset Password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-top: 20px;font-weight: 500;font-size: 16px;"> Dear <?php echo $nameHere;?>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p style="font-weight: 400;font-size: 16px;">Your Request has been received to reset your password for your ErisnClassroom Library Management Sysytem Account</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="text-align: center;">
|
||||
<td>
|
||||
<a href="<?php echo base_url().'reset-password/'.$emailId;?>" target="_blank" style="color: #ffffff; text-decoration: none;">
|
||||
<span class="email-temp" style="padding: 1% 2%; border-radius: 4px;border: none; color: #fff;font-weight: 500;font-size: 16px;background-color: #032DA1; cursor:pointer;">Password Reset Link</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<p class="email-temp" style="font-size: 14px; font-weight: 400; margin: 2% 0 0% 0;">Best Regards,</p>
|
||||
<p class="email-temp" style="font-size: 14px; font-weight: 400; margin: 0% 0 3% 0;">Team Erisn</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!--<tr>
|
||||
<td colspan="3">
|
||||
<table style="width: 100%;background: #fff;color: #032DA1;padding:10px 20px">
|
||||
<tr style="text-align: center;">
|
||||
<td colspan="2">
|
||||
<ul style="list-style-type: none;padding: 0;">
|
||||
<li style="margin-bottom: 4px;">
|
||||
<a href="" style="color: #032DA1;text-decoration: none;font-size: 14px;">
|
||||
<img src="<?php echo base_url()?>assets-lms/images/mail-globe.png" style="width: 20px;margin-right: 10px;vertical-align: middle;">WWW.Erisnclassroom.com</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<ul style="list-style-type: none;padding: 0;">
|
||||
<li style="margin-bottom: 4px;">
|
||||
<a href="mailto:erisnclassroom@gmail.com" style="color: #032DA1;text-decoration: none;font-size: 14px;">
|
||||
<img src="<?php echo base_url()?>assets-lms/images/mail-envelope.png" style="width: 20px;margin-right: 10px;vertical-align: middle;">erisnclassroom@gmail.com</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>-->
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
160
library/application/views/lms-admin/forgot-password.php
Normal file
160
library/application/views/lms-admin/forgot-password.php
Normal file
@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> LMS | Forgot Password</title>
|
||||
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>assets-lms/fav.png">
|
||||
<!--styles links-->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/font-family.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/all.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/owl-carousel/css/owl.carousel.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin-responsive.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrap">
|
||||
<div class="logo-wrap">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/erisn-blue.png">
|
||||
</div>
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/library-login.gif" class="login-img">
|
||||
<?php
|
||||
$isForgotPasswordSuccess = 'No';
|
||||
if($this->session->userdata('isForgotPasswordSuccess')){
|
||||
$isForgotPasswordSuccess = 'Yes';
|
||||
$this->session->unset_userdata('isForgotPasswordSuccess');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$eid = '';
|
||||
if(count($_POST) > 0)
|
||||
{
|
||||
$eid = $_POST['email'];
|
||||
}
|
||||
?>
|
||||
<div class="login-box-cover">
|
||||
<div class="login-box">
|
||||
<h3>Forgot Password?</h3>
|
||||
<form action='<?php base_url().'forgot-password';?>' id="forgotPasswordForm" method="post">
|
||||
<div class="login-row">
|
||||
<p>Please enter your registered email address to get a link to reset your password.</p>
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<label class="login-lbl">
|
||||
Email Address*
|
||||
</label>
|
||||
<input type="text" name="email" id="email" value='<?php echo $eid;?>' placeholder="Enter your email address">
|
||||
<p class="login_err" id='email_error'></p>
|
||||
<span style="color:red;"><?php echo form_error('email'); ?><span>
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<button class="common-btn" type='button' onclick='validate_fp_form()' >Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="backto-login">
|
||||
<a href="<?php echo base_url().'admin';?>"> < Back to login </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="passwdChange_modal">
|
||||
<div class="modal fade" id="passwordChangeModal" role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<h4 class="modal-title">Success</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
An email has been sent to your registered email address which has a link to reset your password.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="dashboard-btn-wrap" style='justify-content:center;'>
|
||||
<button class="common-btn" onclick='go_to_admin_login()'>Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-ui.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var isForgotPasswordSuccess = '<?php echo $isForgotPasswordSuccess;?>';
|
||||
if(isForgotPasswordSuccess == 'Yes'){
|
||||
$('#passwordChangeModal').modal('show');
|
||||
}
|
||||
|
||||
function go_to_admin_login()
|
||||
{
|
||||
window.location = '<?php echo base_url()."admin";?>';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).on('keypress', function(e){
|
||||
if(e.which==13)
|
||||
{
|
||||
//if(js_status != 'Not Verified')
|
||||
validate_fp_form();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function hide_all_fp_errors()
|
||||
{
|
||||
$('#email_error').hide();
|
||||
$('#password_error').hide();
|
||||
}
|
||||
|
||||
|
||||
function validate_fp_form()
|
||||
{
|
||||
hide_all_fp_errors();
|
||||
|
||||
var errArr = new Array();
|
||||
|
||||
var lemail = $('#email').val().trim();
|
||||
var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
if(lemail==''){
|
||||
errArr.push('email_Sep@Str_Please enter your email address.');
|
||||
}else if(!regex.test(lemail)){
|
||||
errArr.push('email_Sep@Str_Please enter a valid email address.');
|
||||
}
|
||||
|
||||
|
||||
if(errArr.length>0)
|
||||
{
|
||||
for(i=0; i<errArr.length; i++)
|
||||
{
|
||||
var resArr = errArr[i].split("_Sep@Str_");
|
||||
$("#"+resArr[0]+"_error").html(resArr[1]);;
|
||||
$("#"+resArr[0]+"_error").show();
|
||||
}
|
||||
var xxxVal = errArr[0].split('_Sep@Str_');
|
||||
$('#'+xxxVal[0]).focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#forgotPasswordForm').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
193
library/application/views/lms-admin/general-settings.php
Normal file
193
library/application/views/lms-admin/general-settings.php
Normal file
@ -0,0 +1,193 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_r">
|
||||
<div class="subject_lsec">
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$idVal = 0;
|
||||
$cbifor = '';
|
||||
$dfpd = '';
|
||||
$nobpu = '';
|
||||
$curr = '';
|
||||
if (isset($gSData) && !empty($gSData)) {
|
||||
$idVal = $gSData['id'];
|
||||
$cbifor = $gSData['can_be_issued_for'];
|
||||
$dfpd = $gSData['due_fee_per_day'];
|
||||
$nobpu = $gSData['no_of_book_per_user'];
|
||||
$curr = $gSData['currency'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="alert alert-success" id="success" style="display:none;">
|
||||
<?php if ($idVal == 0) { ?>
|
||||
<strong>Success!</strong> The general settings data added successfully.
|
||||
<?php } else { ?>
|
||||
<strong>Success!</strong> The general settings data updated successfully.
|
||||
<?php } ?>
|
||||
</div>
|
||||
<form id="generalSettingForm" method="POST">
|
||||
<input type="hidden" name="id" id="id" value="<?= $idVal; ?>">
|
||||
<div class="settings_wrap">
|
||||
<div class="form-group">
|
||||
<label>Default lending time :</label>
|
||||
<input type="number" name="can_be_issued_for" id="can_be_issued_for" class="form-control txtData" step="1" min="0" placeholder="00" autocomplete="off" value="<?= $cbifor; ?>" />
|
||||
<span>Days</span>
|
||||
</div>
|
||||
<p class="form_err" id="error-lending_days"></p>
|
||||
<div class="form-group">
|
||||
<label>Late Fee per day :</label>
|
||||
<input type="number" name="due_fee_per_day" id="due_fee_per_day" class="form-control txtData" min="0" placeholder="0.00" autocomplete="off" value="<?= $dfpd; ?>" />
|
||||
</div>
|
||||
<p class="form_err" id="error-fee_per_day"></p>
|
||||
<div class="form-group">
|
||||
<label>Books per user :</label>
|
||||
<input type="number" name="no_of_book_per_user" id="no_of_book_per_user" class="form-control txtData" min="0" step="1" placeholder="1" autocomplete="off" value="<?= $nobpu; ?>" />
|
||||
</div>
|
||||
<p class="form_err" id="error-no_of_book"></p>
|
||||
<div class="form-group">
|
||||
<label>Choose Currency :</label>
|
||||
<select class="form-control txtData" name="currency" id="currency">
|
||||
<?php if (isset($curr) && !empty($curr)) { ?>
|
||||
<option value="<?= $curr; ?>"><?= $curr; ?></option>
|
||||
<?php } else { ?>
|
||||
<option value="">Choose Currency</option>
|
||||
<?php } ?>
|
||||
|
||||
<option value="NRs">₹.NRs</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="form_err" id="error-currency"></p>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Update</button>
|
||||
<a href="javascript:history.back()"><button type="button" class="btn btn-dark btn-sm">Back</button></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
$("#generalSettingForm").validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
can_be_issued_for: {
|
||||
required: true,
|
||||
minlength: 1,
|
||||
maxlength: 2,
|
||||
min: 1
|
||||
|
||||
},
|
||||
due_fee_per_day: {
|
||||
required: true,
|
||||
min: 1
|
||||
},
|
||||
no_of_book_per_user: {
|
||||
required: true,
|
||||
min: 1
|
||||
},
|
||||
currency: {
|
||||
required: {
|
||||
depends: function(element) {
|
||||
return $("#currency").val() == '';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
can_be_issued_for: {
|
||||
required: "Lending time is required",
|
||||
minlength: "At least 1 characters long",
|
||||
maxlength: "Should not exceed 2 characters",
|
||||
min: "Value must be greater than 0"
|
||||
},
|
||||
due_fee_per_day: {
|
||||
required: "Fee per day is required",
|
||||
min: "Value must be greater than 0"
|
||||
},
|
||||
no_of_book_per_user: {
|
||||
required: "Books per user is required",
|
||||
min: "Value must be greater than 0"
|
||||
},
|
||||
currency: {
|
||||
required: "Curreny is required"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "can_be_issued_for") {
|
||||
error.appendTo($("#error-lending_days"));
|
||||
} else if (element.attr("name") == "due_fee_per_day") {
|
||||
error.appendTo($("#error-fee_per_day"));
|
||||
} else if (element.attr("name") == "no_of_book_per_user") {
|
||||
error.appendTo($("#error-no_of_book"));
|
||||
} else if (element.attr("name") == "currency") {
|
||||
error.appendTo($("#error-currency"));
|
||||
} else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formdata = new FormData(form);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/generalSettings',
|
||||
data: formdata,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result) {
|
||||
if (result == 1) {
|
||||
//$('.txtData').val('');
|
||||
$('#success').show();
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
99
library/application/views/lms-admin/issued-books-reload.php
Normal file
99
library/application/views/lms-admin/issued-books-reload.php
Normal file
@ -0,0 +1,99 @@
|
||||
<table id="tbl" class="display dataTable table-responsive text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Book Name</th>
|
||||
<th>Student Id</th>
|
||||
<th>Student Name</th>
|
||||
<th>Contact</th>
|
||||
<th>Issued Date</th>
|
||||
<th>Remaining Days</th>
|
||||
<th>Over Due</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- class="due" -->
|
||||
<?php
|
||||
if (isset($issuedBookData) && !empty($issuedBookData)) {
|
||||
foreach ($issuedBookData as $ibData) {
|
||||
// print_r($ibData);
|
||||
$book_name = $this->db->get_where('lms_books', ['id' => $ibData['book_id']])->row_array();
|
||||
$stdIs = $ibData['eu_unique_id'];
|
||||
$eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs);
|
||||
$name = '';
|
||||
$mobile = '';
|
||||
if ($eu_name) {
|
||||
$name = $eu_name['name'];
|
||||
$mobile = $eu_name['mobile'];
|
||||
}
|
||||
|
||||
$issDateObj = new DateTime($ibData['issued_date']);
|
||||
$issueDate = $issDateObj->format('Y-m-d');
|
||||
|
||||
$todayDateObj = new DateTime($npCurrDate);
|
||||
$todayIs = $todayDateObj->format('Y-m-d');
|
||||
|
||||
$retDateObj = new DateTime($ibData['return_date']);
|
||||
$returnDate = $retDateObj->format('Y-m-d');
|
||||
|
||||
$remDaysClass = '';
|
||||
$date1 = date_create($todayIs);
|
||||
$date2 = date_create($returnDate);
|
||||
$remaining_days = $date1->diff($date2)->format("%r%a");
|
||||
if ($remaining_days == 0) {
|
||||
$remaining_days = 'Due Today';
|
||||
$remDaysClass = 'due';
|
||||
} else if ($remaining_days < 0)
|
||||
$remaining_days = '0 Days';
|
||||
else
|
||||
$remaining_days = $remaining_days . ' Days';
|
||||
|
||||
$class = '';
|
||||
$over_due_days = 0;
|
||||
$date11 = date_create($returnDate);
|
||||
$date22 = date_create($todayIs);
|
||||
$over_due_days = $date11->diff($date22)->format("%r%a");
|
||||
if ($over_due_days > 0)
|
||||
$class = 'class="due" style="font-weight:500"';
|
||||
if ($over_due_days < 0)
|
||||
$over_due_days = 0;
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $book_name['title']; ?></td>
|
||||
<td><?= $ibData['eu_unique_id']; ?></td>
|
||||
<td><?= $name; ?></td>
|
||||
<td><?= $mobile; ?></td>
|
||||
<td>
|
||||
<?= $issDateObj->format(DATE_FORMAT); ?>
|
||||
</td>
|
||||
<td class='<?php echo $remDaysClass; ?>' <?= !empty($ibData['returned_on_date']) ? "style='font-weight:500;'" : '' ?>> <?php echo empty($ibData['returned_on_date']) ? $remaining_days : '-' ?></td>
|
||||
<td <?= $class; ?>><?= $over_due_days; ?> Days</td>
|
||||
<td class="<?= !empty($ibData['returned_on_date']) ? 'text-success small' : 'text-danger' ?>">
|
||||
<?= !empty($ibData['returned_on_date']) ? 'Returned' : 'Issued' ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
//echo 'Nepali Current date === '.$todayIs;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
/*$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end*/
|
||||
</script>
|
131
library/application/views/lms-admin/issued-books.php
Normal file
131
library/application/views/lms-admin/issued-books.php
Normal file
@ -0,0 +1,131 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
<div class="dashboard-btn-wrap">
|
||||
<a href="<?= base_url(); ?>add-edit-issue-book/0"><button class="btn btn-success btn-sm">Issue Book</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="issuedBookForm" method="POST">
|
||||
<div class="top-filter">
|
||||
<div class="filter_lbl">
|
||||
<i class="fas fa-filter"></i>
|
||||
Filter
|
||||
</div>
|
||||
<div class="date-filter">
|
||||
<div class="date-fil-row">
|
||||
<label>Start Date</label>
|
||||
<div class='po-calendar'>
|
||||
<input type="text" name="startdate" id="startdate" class="form-control txtData nepali-date">
|
||||
<i class='fas fa-calendar-alt cal-icon'></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-fil-row">
|
||||
<label>End Date</label>
|
||||
<div class='po-calendar'>
|
||||
<input type="text" name="enddate" id="enddate" class="form-control txtData nepali-date">
|
||||
<i class='fas fa-calendar-alt cal-icon'></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subject-filter">
|
||||
<select class="form-control txtData" name="option" id="option" onchange='search_call()'>
|
||||
<option value=''>All</option>
|
||||
<option value='over_due'>Over Due</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-reset">
|
||||
<button type="button" id="filter_reset" class="subject_addbtn subject_addbtn_nobg">
|
||||
<i class="fas fa-redo"></i>Reset Filters
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="" id="theIssedBookAreHere">
|
||||
<?php
|
||||
if (isset($issuedBookData))
|
||||
echo $issuedBookData;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<!-- <script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script> -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
|
||||
$('.nepali-date').nepaliDatePicker({
|
||||
onChange: function() {
|
||||
search_call();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
|
||||
//multiple select js start
|
||||
//$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
$('#filter_reset').click(function() {
|
||||
$('.txtData').val('');
|
||||
reload_issed_books();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function search_call() {
|
||||
reload_issed_books();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function reload_issed_books() {
|
||||
var values = $('#issuedBookForm').serialize();
|
||||
//alert(values);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>LmsAdmin/ajaxIssuedBookDetail",
|
||||
data: values,
|
||||
success: function(result) {
|
||||
$('#theIssedBookAreHere').empty();
|
||||
$('#theIssedBookAreHere').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
157
library/application/views/lms-admin/login.php
Normal file
157
library/application/views/lms-admin/login.php
Normal file
@ -0,0 +1,157 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> LMS Login</title>
|
||||
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>assets-lms/fav.png">
|
||||
<!--styles links-->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/font-family.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/all.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/owl-carousel/css/owl.carousel.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin-responsive.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrap">
|
||||
<div class="logo-wrap">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/erisn-blue.png">
|
||||
</div>
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/library-login.gif" class="login-img">
|
||||
|
||||
<?php
|
||||
$uname = ''; $pass = ''; $rme = 'Off';
|
||||
if(isset($_COOKIE["username"]))
|
||||
$uname = $_COOKIE["username"];
|
||||
if(isset($_COOKIE["password"]))
|
||||
$pass = $_COOKIE["password"];
|
||||
if(isset($_COOKIE["rem_me"]))
|
||||
$rme = $_COOKIE["rem_me"];
|
||||
|
||||
if(count($_POST) > 0)
|
||||
{
|
||||
$uname = $_POST['email'];
|
||||
$pass = $_POST['password'];
|
||||
if(isset($_POST['remember_me']))
|
||||
$rme = 'On';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="login-box-cover">
|
||||
<div class="login-box">
|
||||
<h3><?php echo $title;?></h3>
|
||||
|
||||
<?php if($this->session->flashdata('danger')){?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('danger') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form action='<?php echo base_url().'admin';?>' id="loginform" method="post">
|
||||
<div class="login-row">
|
||||
<input type="text" name="email" id="email" value='<?php echo $uname;?>' placeholder="Enter Your Email ID">
|
||||
<p class="login_err" id='email_error'></p>
|
||||
<span style="color:red;"><?php echo form_error('email'); ?><span>
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<input type="password" name="password" id="paswd" value='<?php echo $pass;?>' placeholder="Password" class="password_hide">
|
||||
<span class="passwrd-icon icon-y"><i class="far fa-eye"></i></span>
|
||||
<p class="login_err" id='paswd_error'></p>
|
||||
<span style="color:red;"><?php echo form_error('password'); ?><span>
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<div class="forget-password">
|
||||
<a href="<?php echo base_url().'forgot-password';?>">Forgot Password?</a>
|
||||
</div>
|
||||
<div class="rem-paswd">
|
||||
<input type="checkbox" name="remember_me" <?php if($rme=='On'){?>checked<?php } ?> >
|
||||
<label>Remember Me</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<button class="common-btn" type='button' onclick="validate_login_form()">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-ui.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).on('keypress', function(e){
|
||||
if(e.which==13)
|
||||
{
|
||||
//if(js_status != 'Not Verified')
|
||||
validate_login_form();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function hide_all_login_errors()
|
||||
{
|
||||
$('#email_error').hide();
|
||||
$('#password_error').hide();
|
||||
}
|
||||
|
||||
|
||||
function validate_login_form()
|
||||
{
|
||||
hide_all_login_errors();
|
||||
|
||||
var errArr = new Array();
|
||||
|
||||
var lemail = $('#email').val().trim();
|
||||
var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
||||
if(lemail==''){
|
||||
errArr.push('email_Sep@Str_Please enter your email address.');
|
||||
}else if(!regex.test(lemail)){
|
||||
errArr.push('email_Sep@Str_Please enter a valid email address.');
|
||||
}
|
||||
|
||||
var lpwd = $('#paswd').val().trim();
|
||||
if(lpwd==''){
|
||||
errArr.push('paswd_Sep@Str_Please enter your password.');
|
||||
}
|
||||
|
||||
if(errArr.length>0)
|
||||
{
|
||||
for(i=0; i<errArr.length; i++)
|
||||
{
|
||||
var resArr = errArr[i].split("_Sep@Str_");
|
||||
$("#"+resArr[0]+"_error").html(resArr[1]);;
|
||||
$("#"+resArr[0]+"_error").show();
|
||||
}
|
||||
var xxxVal = errArr[0].split('_Sep@Str_');
|
||||
$('#'+xxxVal[0]).focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#loginform').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
310
library/application/views/lms-admin/receive-book-detail.php
Normal file
310
library/application/views/lms-admin/receive-book-detail.php
Normal file
@ -0,0 +1,310 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover-wrap">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="alert alert-danger" id="errShow" style="display:none;"><strong>Failure!</strong> Please select book id.</div>
|
||||
<div class="alert alert-success" id="success" style="display:none;"><strong>Success!</strong> The comment added successfully.</div>
|
||||
<div class="alert alert-success" id="successMsg" style="display:none;"><strong>Success!</strong> The book received successfully.</div>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
</div>
|
||||
<div class="common-sub-heading">Student Details</div>
|
||||
<?php
|
||||
$eu_id = '';
|
||||
$class = '';
|
||||
$fname = '';
|
||||
$lname = '';
|
||||
$contact = '';
|
||||
if (isset($userData) && !empty($userData)) {
|
||||
$eu_id = $userData['studentId'];
|
||||
$class = $userData['class_name'];
|
||||
$name = $userData['name'];
|
||||
$contact = $userData['mobile'];
|
||||
}
|
||||
?>
|
||||
<div class="student_details">
|
||||
<ul>
|
||||
<li><label>Student ID</label><span><?= $eu_id; ?></span></li>
|
||||
<li><label>Name</label><span><?= $name; ?></span></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><label>Contact</label><span><?= $contact; ?></span></li>
|
||||
<li><label>Class</label><span><?= $class; ?></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="common-sub-heading">Issued Books</div>
|
||||
<div class="">
|
||||
<table id="tbl" class="display dataTable table-responsive text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th>ISBN</th>
|
||||
<th>Title</th>
|
||||
<th>Issued On</th>
|
||||
<th>Due Date</th>
|
||||
<th>Over Due</th>
|
||||
<th>Late Fee</th>
|
||||
<th>Received</th>
|
||||
<th>Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $ttl_fee = 0;
|
||||
if (isset($bookDetail) && !empty($bookDetail)) {
|
||||
$i = 1;
|
||||
foreach ($bookDetail as $bdata) {
|
||||
$bookData = $this->db->get_where('lms_books', ['id' => $bdata['book_id']])->row_array();
|
||||
$gsData = $this->LmsAdmin_Model->getGeneralSettingData('lms_general_settings');
|
||||
if ($gsData) {
|
||||
$late_fee = $gsData['due_fee_per_day'];
|
||||
}
|
||||
|
||||
if ($bookData['fine_per_day'] == 0) {
|
||||
$fineperday = $late_fee;
|
||||
} else {
|
||||
$fineperday = $bookData['fine_per_day'];
|
||||
}
|
||||
|
||||
//calculating over due days
|
||||
/*$today = date('Y-m-d');
|
||||
$return_date = $bdata['return_date'];
|
||||
$overdue_diff = strtotime($today)-strtotime($return_date);
|
||||
$overdue_days = round($overdue_diff / 86400);
|
||||
if($today>$return_date){
|
||||
$oddays = $overdue_days;
|
||||
$latefee = ($fineperday)*($oddays);
|
||||
}elseif($today<=$return_date){
|
||||
$oddays = 0;
|
||||
$latefee = 0;
|
||||
}*/
|
||||
|
||||
$issDateObj = new DateTime($bdata['issued_date']);
|
||||
$issueDate = $issDateObj->format('Y-m-d');
|
||||
|
||||
$todayDateObj = new DateTime($npCurrDate);
|
||||
$todayIs = $todayDateObj->format('Y-m-d');
|
||||
|
||||
$retDateObj = new DateTime($bdata['return_date']);
|
||||
$returnDate = $retDateObj->format('Y-m-d');
|
||||
|
||||
$over_due_days = 0;
|
||||
$latefee = 0;
|
||||
|
||||
$class = '';
|
||||
$over_due_days = 0;
|
||||
$date11 = date_create($returnDate);
|
||||
$date22 = date_create($todayIs);
|
||||
$over_due_days = $date11->diff($date22)->format("%r%a");
|
||||
|
||||
if ($over_due_days > 0)
|
||||
$class = 'due';
|
||||
if ($over_due_days < 0)
|
||||
$over_due_days = 0;
|
||||
|
||||
if ($todayIs > $returnDate) {
|
||||
$latefee = ($fineperday) * ($over_due_days);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><span class="text-center"><?= $i; ?></span></td>
|
||||
<td><?= $bookData['isbn']; ?></td>
|
||||
<td><?= $bookData['title']; ?></td>
|
||||
<td><?= $issDateObj->format(DATE_FORMAT); ?></td>
|
||||
<td><?= $retDateObj->format(DATE_FORMAT); ?></td>
|
||||
<td class='<?php echo $class; ?>'><?= $over_due_days; ?> Days</td>
|
||||
<td><?= $gSData['currency'] ?><?= $latefee; ?> </td>
|
||||
<td>
|
||||
<div class="receivCheck_cover">
|
||||
<?php if ($bdata['returned_on_date'] != '') { ?>
|
||||
<input type="checkbox" id="returned" class="checkbx" checked>
|
||||
<?php } else { ?>
|
||||
<input type="checkbox" value="<?= $bdata['id']; ?>" name="returned" id="returned" class="checkbx">
|
||||
<?php } ?>
|
||||
<span class="checkmark"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<button class="subject_addbtn" data-toggle="modal" onclick="commentModal(<?= $bdata['id']; ?>)">+Comment</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$ttl_fee += $latefee;
|
||||
?>
|
||||
<?php $i++;
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<label class="mb-0" style="float: right;font-size: 13px; font-weight: 600;">Total Late Fee:</label>
|
||||
</td>
|
||||
<td style="font-size: 13px; font-weight: 600;">
|
||||
<?= $gSData['currency'] ?><?= $ttl_fee; ?>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<button class="btn btn-success" onclick="saveReceivedData()">Receive Book</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<div class="book_description book_comment">
|
||||
<div class="modal fade" id="bookCmnt" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<form id="commentForm" method="POST">
|
||||
<input type="hidden" name="id" id="id" value="">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Comment</h4>
|
||||
<div class="modal-check-box">
|
||||
<div class="receivCheck_cover" style="margin: 0 0 13px;">
|
||||
<input type="checkbox" class="checkbx" id="is_damaged" name="is_damaged">
|
||||
<span for="is_damaged" class="checkmark"></span>
|
||||
</div>
|
||||
<label>Damaged Book</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea class="txtData" placeholder="Add Comment" name="damaged_comment" id="damaged_comment"></textarea>
|
||||
<p id="error-damaged_comment" class="modal_err"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="dashboard-btn-wrap">
|
||||
<button type="submit" class="subject_addbtn">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
$("#commentForm").validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
damaged_comment: {
|
||||
required: true,
|
||||
minlength: 3,
|
||||
maxlength: 100
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
damaged_comment: {
|
||||
required: "Comment is required",
|
||||
minlength: "At least 3 characters long",
|
||||
maxlength: "Should not exceed 100 characters"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "damaged_comment") {
|
||||
error.appendTo($("#error-damaged_comment"));
|
||||
} else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formdata = new FormData(form);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/addComment',
|
||||
data: formdata,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result) {
|
||||
if (result == 1) {
|
||||
$('#bookCmnt').modal('hide');
|
||||
$('#success').show();
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function commentModal(bookId) {
|
||||
$('#id').val(bookId);
|
||||
$("#error-damaged_comment").html('');
|
||||
$('.txtData').val('');
|
||||
$('#is_damaged').prop('checked', false);
|
||||
$('#bookCmnt').modal('show');
|
||||
}
|
||||
|
||||
function saveReceivedData() {
|
||||
arrayVal = [];
|
||||
$('input[name="returned"]:checked').each(function() {
|
||||
arrayVal.push(this.value);
|
||||
});
|
||||
if (arrayVal != '') {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/returnedBookData',
|
||||
data: {
|
||||
'returnedBook': arrayVal
|
||||
},
|
||||
success: function(result) {
|
||||
// alert(result);
|
||||
if (result == 1) {
|
||||
$('#errShow').hide();
|
||||
$('#successMsg').show();
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#errShow').show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
103
library/application/views/lms-admin/receive-book.php
Normal file
103
library/application/views/lms-admin/receive-book.php
Normal file
@ -0,0 +1,103 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subsec_sec">
|
||||
<div class="subject_r">
|
||||
<div class="subject_lsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
</div>
|
||||
<form id="receiveForm" method="POST">
|
||||
<div class="common-sub-heading">Enter User ID</div>
|
||||
<div class="subject_lformarea book-form-area receive-book">
|
||||
<div class="form-group">
|
||||
<input type="text" name="eu_unique_id" id="eu_unique_id" class="form-control" placeholder="Enter ID" autocomplete="off">
|
||||
</div>
|
||||
<button type="submit" class="subject_addbtn">Submit</button>
|
||||
</div>
|
||||
<p class="form_err" id="error-eu_unique_id"></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery.validate.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/additional-methods.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
$("#receiveForm").validate({
|
||||
errorClass: 'error',
|
||||
rules: {
|
||||
eu_unique_id: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
eu_unique_id: {
|
||||
required: "User Id is required"
|
||||
}
|
||||
},
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.attr("name") == "eu_unique_id") {
|
||||
error.appendTo($("#error-eu_unique_id"));
|
||||
} else {
|
||||
error.appendTo(element);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formdata = new FormData(form);
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/receive_book',
|
||||
data: formdata,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(result) {
|
||||
if (result == 0) {
|
||||
$('#error-eu_unique_id').text('Issued Book not exists for this user.')
|
||||
} else {
|
||||
$('#error-eu_unique_id').html('');
|
||||
window.location.href = '<?= base_url(); ?>receive-book-detail/' + result;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
192
library/application/views/lms-admin/reset-password.php
Normal file
192
library/application/views/lms-admin/reset-password.php
Normal file
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> LMS | Reset Password</title>
|
||||
<!--styles links-->
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/font-family.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/all.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/owl-carousel/css/owl.carousel.min.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/fontawesome.min.css" />
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin.css">
|
||||
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin-responsive.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrap">
|
||||
<div class="logo-wrap">
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/erisn-blue.png">
|
||||
</div>
|
||||
<img src="<?php echo base_url(); ?>assets-lms/images/library-login.gif" class="login-img">
|
||||
<?php
|
||||
$isResetPasswordSuccess = 'No';
|
||||
if($this->session->userdata('isResetPasswordSuccess')){
|
||||
$isResetPasswordSuccess = 'Yes';
|
||||
$this->session->unset_userdata('isResetPasswordSuccess');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$pwd = ''; $conf_pwd = '';
|
||||
if(count($_POST) > 0)
|
||||
{
|
||||
$pwd = $_POST['password'];
|
||||
$conf_pwd = $_POST['conf_password'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="login-box-cover">
|
||||
<div class="login-box">
|
||||
<h3>Reset Your Password</h3>
|
||||
|
||||
<?php if($this->session->flashdata('danger')){?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('danger') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form action="<?php echo base_url().'reset-password/'.$encodedEmailId;?>" id="resetPasswordForm" method="post">
|
||||
<div class="login-row">
|
||||
<p>Your email address is verified successfully. You can now reset your password here.</p>
|
||||
</div>
|
||||
<div class="login-row paswd_reset">
|
||||
<label class="login-lbl">
|
||||
New Password*
|
||||
</label>
|
||||
<input type="password" name="password" id="password" placeholder="Enter new passwod" class="password_hide">
|
||||
<span class="passwrd-icon icon-y"><i class="far fa-eye"></i></span>
|
||||
<p class="login_err" id='password_error'></p>
|
||||
<span class="login_err"><?php echo form_error('password'); ?><span>
|
||||
</div>
|
||||
<div class="login-row paswd_reset">
|
||||
<label class="login-lbl">
|
||||
Retype New Password*
|
||||
</label>
|
||||
<input type="password" name="conf_password" id="conf_password" placeholder="Retype new password" class="paswd1">
|
||||
<span class="passwrd-con icon-con-y"><i class="far fa-eye"></i></span>
|
||||
<p class="login_err" id='conf_password_error'></p>
|
||||
<span class="login_err"><?php echo form_error('conf_password'); ?><span>
|
||||
</div>
|
||||
<div class="login-row">
|
||||
<button class="common-btn" type='button' onclick='validate_rp_form()'>Reset Password</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="backto-login">
|
||||
<a href="<?php echo base_url().'admin';?>"> < Back to login </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="passwdChange_modal">
|
||||
<div class="modal fade" id="passwordChangeModal" role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<i class="fas fa-check-circle"></i>
|
||||
<h4 class="modal-title">Success</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Your password has been reset successfully. You can now login with new password.
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="dashboard-btn-wrap" style='justify-content:center;'>
|
||||
<button class="common-btn" onclick='go_to_admin_login()'>Go to login page</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-ui.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var isResetPasswordSuccess = '<?php echo $isResetPasswordSuccess;?>';
|
||||
if(isResetPasswordSuccess == 'Yes'){
|
||||
$('#passwordChangeModal').modal('show');
|
||||
}
|
||||
|
||||
function go_to_admin_login()
|
||||
{
|
||||
window.location = '<?php echo base_url()."admin";?>';
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).on('keypress', function(e){
|
||||
if(e.which==13)
|
||||
{
|
||||
//if(js_status != 'Not Verified')
|
||||
validate_rp_form();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function hide_all_rp_errors()
|
||||
{
|
||||
$('#password_error').hide();
|
||||
$('#conf_password_error').hide();
|
||||
}
|
||||
|
||||
|
||||
function validate_rp_form()
|
||||
{
|
||||
hide_all_rp_errors();
|
||||
|
||||
var errArr = new Array();
|
||||
|
||||
var pwd = $('#password').val().trim();
|
||||
var conf_password = $('#conf_password').val().trim();
|
||||
|
||||
if(pwd==''){
|
||||
errArr.push('password_Sep@Str_Please enter your new password.');
|
||||
}
|
||||
else{
|
||||
var regPwdReg = /(?=.*[a-zA-Z0-9])(?=.*?\W).{6,}/;
|
||||
if(!regPwdReg.test($('#password').val()))
|
||||
errArr.push('password_Sep@Str_Password should be minimum 6 characters and should have atleast one special character.');
|
||||
}
|
||||
|
||||
if(conf_password==''){
|
||||
errArr.push('conf_password_Sep@Str_Please re-enter your new password.');
|
||||
}
|
||||
|
||||
if($('#password').val()!='' && $('#conf_password').val()!='' && ($('#password').val() != $('#conf_password').val()) )
|
||||
errArr.push('conf_password_Sep@Str_Password & Retype Password does not match.');
|
||||
|
||||
if(errArr.length>0)
|
||||
{
|
||||
for(i=0; i<errArr.length; i++)
|
||||
{
|
||||
var resArr = errArr[i].split("_Sep@Str_");
|
||||
$("#"+resArr[0]+"_error").html(resArr[1]);;
|
||||
$("#"+resArr[0]+"_error").show();
|
||||
}
|
||||
var xxxVal = errArr[0].split('_Sep@Str_');
|
||||
$('#'+xxxVal[0]).focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#resetPasswordForm').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
@ -0,0 +1,78 @@
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">Book Name</th>
|
||||
<th class="text-center">Student Id</th>
|
||||
<th class="text-center">Student Name</th>
|
||||
<th class="text-center">Issued Date</th>
|
||||
<th class="text-center">Submited Date</th>
|
||||
<th class="text-center">Late Due Days</th>
|
||||
<th class="text-center">Late fee</th>
|
||||
<th class="text-center">Comment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (isset($returnedBookData) && !empty($returnedBookData)) {
|
||||
foreach ($returnedBookData as $rbdata) {
|
||||
// echo '<pre>';
|
||||
// print_r($rbdata);
|
||||
$book_name = $this->db->get_where('lms_books', ['id' => $rbdata['book_id']])->row_array();
|
||||
$stdIs = $rbdata['eu_unique_id'];
|
||||
$eu_name = $this->LmsAdmin_Model->getStudentDataById($stdIs);
|
||||
$name = '';
|
||||
if ($eu_name) {
|
||||
$name = $eu_name['name'];
|
||||
}
|
||||
|
||||
$gsData = $this->LmsAdmin_Model->getGeneralSettingData('lms_general_settings');
|
||||
if ($gsData) {
|
||||
$late_fee = $gsData['due_fee_per_day'];
|
||||
}
|
||||
$latefee = 0;
|
||||
if ($rbdata['total_late_fee'] == 0) {
|
||||
$latefee = ($rbdata['total_overdue_days']) * ($late_fee);
|
||||
} else {
|
||||
$latefee = $rbdata['total_late_fee'];
|
||||
}
|
||||
|
||||
$issDateObj = new DateTime($rbdata['issued_date']);
|
||||
$issueDate = $issDateObj->format('Y-m-d');
|
||||
|
||||
$retDateObj = new DateTime($rbdata['returned_on_date']);
|
||||
$returnDate = $retDateObj->format('Y-m-d');
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center"><?= $book_name['title']; ?></td>
|
||||
<td class="text-center"><?= $rbdata['eu_unique_id']; ?></td>
|
||||
<td><?= $name; ?></td>
|
||||
<td class="text-center"><?= $issueDate; ?></td>
|
||||
<td class="text-center"><?= $returnDate; ?></td>
|
||||
<td><span class="text-center"><?= $rbdata['total_overdue_days']; ?> Days</span></td>
|
||||
<td class="text-center"><?= $latefee; ?> INR</td>
|
||||
<td>
|
||||
<div class="text-center">
|
||||
<div class="sub_commentbtn"><i class="fas fa-comment" data-toggle="modal" onclick="showComment(<?= $rbdata['id']; ?>)"></i></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- <script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script> -->
|
166
library/application/views/lms-admin/returned-books.php
Normal file
166
library/application/views/lms-admin/returned-books.php
Normal file
@ -0,0 +1,166 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2><?= $title; ?></h2>
|
||||
<div class="dashboard-btn-wrap">
|
||||
<a href="<?= base_url(); ?>receive-book"><button class="btn btn-success btn-sm">Receive Book</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="returnedBookForm" method="POST">
|
||||
<div class="top-filter">
|
||||
<div class="filter_lbl">
|
||||
<i class="fas fa-filter"></i>
|
||||
Filter
|
||||
</div>
|
||||
<div class="date-filter">
|
||||
<div class="date-fil-row">
|
||||
<label>Start date</label>
|
||||
<div class='po-calendar'>
|
||||
<input type="text" name="startdate" id="startdate" class="form-control txtData nepali-date" onchange='search_call()'>
|
||||
<i class='fas fa-calendar-alt cal-icon'></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-fil-row">
|
||||
<label>End date</label>
|
||||
<input type="text" name="enddate" id="enddate" class="form-control txtData nepali-date" onchange='search_call()'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subject-filter">
|
||||
<select class="form-control txtData" name="option" id="option" onchange='search_call()'>
|
||||
<option value=''>All</option>
|
||||
<option value='over_due'>Over Due</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="filter-reset">
|
||||
<button type="button" id="filter_reset" class="subject_addbtn subject_addbtn_nobg">
|
||||
<i class="fas fa-redo"></i>Reset Filters
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="" id="theReturnedBookAreHere">
|
||||
<?php
|
||||
if (isset($returnedBookData))
|
||||
echo $returnedBookData;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<div class="book_description">
|
||||
<div class="modal fade" id="categoryModal" role="dialog">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" id="hideCommentModal">×</button>
|
||||
<h4 class="modal-title">Description</h4>
|
||||
<label id="damagedTxt"></label>
|
||||
</div>
|
||||
<div class="modal-body" id="commentTxt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
|
||||
$('.nepali-date').nepaliDatePicker({
|
||||
onChange: function() {
|
||||
search_call();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, -1],
|
||||
[5, 10, 25, 50, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
$('#filter_reset').click(function() {
|
||||
$('.txtData').val('');
|
||||
reload_returned_books();
|
||||
});
|
||||
|
||||
$('#hideCommentModal').click(function() {
|
||||
$('#categoryModal').modal('hide');
|
||||
location.reload();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function search_call() {
|
||||
reload_returned_books();
|
||||
}
|
||||
|
||||
function reload_returned_books() {
|
||||
var values = $('#returnedBookForm').serialize();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>LmsAdmin/ajaxReturnedBookDetail",
|
||||
data: values,
|
||||
success: function(result) {
|
||||
$('#theReturnedBookAreHere').empty();
|
||||
$('#theReturnedBookAreHere').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function showComment(ref) {
|
||||
var tableName = 'lms_book_transactions';
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/getCommentData',
|
||||
data: {
|
||||
'CommentId': ref,
|
||||
'tableName': tableName
|
||||
},
|
||||
success: function(result) {
|
||||
var obj = JSON.parse(result);
|
||||
var cmt = obj.comment;
|
||||
var damged = obj.isDamaged;
|
||||
if (damged == 'Yes') {
|
||||
$('#damagedTxt').html('Damaged Book');
|
||||
}
|
||||
if (cmt != null) {
|
||||
$('#commentTxt').html(obj.comment);
|
||||
}
|
||||
$('#categoryModal').modal('show');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
149
library/application/views/lms-admin/roles.php
Normal file
149
library/application/views/lms-admin/roles.php
Normal file
@ -0,0 +1,149 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="from-group adding-class form-group_lng form-group_full-width ">
|
||||
<a href='<?php echo base_url()."add-edit-role/0";?>'><button type="button" class="btn btn-success btn-sm">Add New Role</button></a>
|
||||
</div>
|
||||
<div class="main-wrap">
|
||||
|
||||
<div class="roles-cover">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2>Roles</h2>
|
||||
<div class="alert alert-danger" id="errShow" style="display:none;"><strong>Failure!</strong> The role having dependent data you cannot delete this category.</div>
|
||||
<div class="alert alert-success" id="success" style="display:none;"><strong>Success!</strong> The role deleted successfully.</div>
|
||||
<?php if($this->session->flashdata('success')){?>
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('success') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->session->flashdata('danger')){?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('danger') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<div class="">
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sl No</th>
|
||||
<th>Role Name</th>
|
||||
<th>Permission</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(isset($roleList) && !empty($roleList))
|
||||
{
|
||||
$slNo=1;
|
||||
foreach($roleList as $post)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $slNo;?></td>
|
||||
<td><?php echo $post['role_name'];?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($post['permissions']!='')
|
||||
echo str_replace(',', '<br>', $post['permissions']);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $post['status'];?></td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<a href='<?php echo base_url()."add-edit-role/".$post['id'];?>'>
|
||||
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
|
||||
</a>
|
||||
|
||||
<?php if($post['can_delete']=='Yes'){?>
|
||||
<div class="sub_delbtn" onclick='delete_role(<?php echo $post['id'];?>)'>
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$slNo++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?php echo base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?php echo base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function delete_role(roleId)
|
||||
{
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Once deleted, you will not be able to recover this role!",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((willDelete) => {
|
||||
if (willDelete) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/deleteRoleData',
|
||||
data: {'id' : roleId},
|
||||
success: function(result){
|
||||
if(result == 0)
|
||||
{
|
||||
$('#success').hide();
|
||||
$('#errShow').show();
|
||||
}
|
||||
if(result == 1){
|
||||
$('#errShow').hide();
|
||||
$('#success').show();
|
||||
setTimeout(() => { location.reload(); }, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
107
library/application/views/lms-admin/students-info.php
Normal file
107
library/application/views/lms-admin/students-info.php
Normal file
@ -0,0 +1,107 @@
|
||||
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
|
||||
<!-- <div class="application-toggle-btn view-student-tab">
|
||||
<ul class="nav nav-pills">
|
||||
<li >
|
||||
<a href="#1b" data-toggle="tab" class="active">Student Info</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#2b" data-toggle="tab">Course Details</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
<?php
|
||||
$studentId = ''; $name=''; $email=''; $contact_no=''; $dob='';
|
||||
$gender = ''; $emrg_name=''; $emrg_conct=''; $address=''; $photo='';
|
||||
if(isset($studentInfo) && !empty($studentInfo)){
|
||||
$studentId = $studentInfo['studentId'];
|
||||
$name = $studentInfo['name'];
|
||||
$email = $studentInfo['email'];
|
||||
$contact_no = $studentInfo['mobile'];
|
||||
$dob = $studentInfo['dob'];
|
||||
$gender = $studentInfo['gender'];
|
||||
$emrg_name = $studentInfo['emergency_contact_name'];
|
||||
$emrg_conct = $studentInfo['emergency_contact_number'];
|
||||
$address = $studentInfo['address1'].'-'.$studentInfo['zipcode'];
|
||||
$photo = $studentInfo['photo'];
|
||||
}
|
||||
?>
|
||||
<div class="tab-content">
|
||||
<div class="tab-toggle-content active" id="1b">
|
||||
<div class="student-info-wrap">
|
||||
<img src="<?= STUDENT_PROFILE_PATH; ?><?= $photo; ?>" class="student-info-img">
|
||||
<ul>
|
||||
<li><label>Student ID:</label><span><?= $studentId; ?></span></li>
|
||||
<li><label>Name:</label><span><?= $name; ?></span></li>
|
||||
<li><label>Email:</label><span><?= $email; ?></span></li>
|
||||
<li><label>Contact number:</label><span><?= $contact_no; ?></span></li>
|
||||
<li><label>Date of birth:</label><span><?= $dob; ?></span></li>
|
||||
<li><label>Gender:</label><span><?= $gender; ?></span></li>
|
||||
</ul>
|
||||
<div class="common-sub-heading">Emergency contacts</div>
|
||||
<ul>
|
||||
<li><label>Name:</label><span><?= $emrg_name; ?></span></li>
|
||||
<li><label>Contact number:</label><span><?= $emrg_conct; ?></span></li>
|
||||
<li><label>Address:</label><span><?= $address; ?></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div class="tab-toggle-content" id="2b">
|
||||
<div class="student-info-wrap">
|
||||
<ul>
|
||||
<li><label>Student ID:</label><span>SUN-A-50007</span></li>
|
||||
<li><label>Level:</label><span>100 Level</span></li>
|
||||
<li><label>Batch:</label><span>June - 2020 to March 2021</span></li>
|
||||
<li><label>Programme:</label><span>9th Grade</span></li>
|
||||
<li><label>Subjects:</label><span>Subject 01<br>Subject 02<br>Subject 03<br>Subject 04<br>Subject 05</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
55
library/application/views/lms-admin/students-reload.php
Normal file
55
library/application/views/lms-admin/students-reload.php
Normal file
@ -0,0 +1,55 @@
|
||||
<table id="tbl" class="display dataTable table-responsive text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Student ID</th>
|
||||
<th>Student Name</th>
|
||||
<th>Class</th>
|
||||
<th>Section</th>
|
||||
<th>Contact</th>
|
||||
<th>Student profile</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (isset($studentData) && !empty($studentData)) {
|
||||
foreach ($studentData as $sData) { ?>
|
||||
<tr>
|
||||
<td><?= $sData['studentId']; ?></td>
|
||||
<td>
|
||||
<div class="student_name"><?= $sData['name']; ?></div>
|
||||
</td>
|
||||
<td><?= $sData['course_name']; ?></td>
|
||||
<td><?= $sData['section_name']; ?></td>
|
||||
<td><?= $sData['mobile']; ?></td>
|
||||
<td>
|
||||
<div>
|
||||
<a href="<?= base_url(); ?>students-info/<?= $sData['id']; ?>">
|
||||
<div class="sub_editbtn"><i class="fas fa-user"></i></div>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[50, 100, 250, 500, -1],
|
||||
[50, 100, 250, 500, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
85
library/application/views/lms-admin/students.php
Normal file
85
library/application/views/lms-admin/students.php
Normal file
@ -0,0 +1,85 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="main-wrap">
|
||||
<div class="dashboard-cover">
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2>Students</h2>
|
||||
<div class="dashboard-btn-wrap">
|
||||
<a href="<?= base_url(); ?>add-student"><button class="btn btn-success btn-sm">Add Student</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="select_div">
|
||||
<div class="form-group assign_subject">
|
||||
<select class="form-control txtData" name="class" id="class" onchange="getStudentData(this.value)">
|
||||
<option value="" selected disabled>Select Category</option>
|
||||
<?php if (isset($classData) && !empty($classData)) {
|
||||
foreach ($classData as $cData) { ?>
|
||||
<option value="<?= $cData['class_name']; ?>"><?= $cData['class_name']; ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="" id="userLists">
|
||||
<?php
|
||||
if (isset($studentData))
|
||||
echo $studentData;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/js/bootstrap-select.min.js"></script>
|
||||
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.user-drpdown').click(function() {
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
//table js
|
||||
$('#tbl').DataTable({
|
||||
"lengthMenu": [
|
||||
[50, 100, 250, 500, -1],
|
||||
[50, 100, 250, 500, "All"]
|
||||
]
|
||||
});
|
||||
//table js end
|
||||
//multiple select js start
|
||||
$('select').selectpicker();
|
||||
//multiple select js end
|
||||
</script>
|
||||
<script>
|
||||
function getStudentData(classId) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/ajaxGetUserData',
|
||||
data: {
|
||||
'class': classId
|
||||
},
|
||||
success: function(result) {
|
||||
result = result.trim();
|
||||
$('#userLists').empty();
|
||||
$('#userLists').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
139
library/application/views/lms-admin/users.php
Normal file
139
library/application/views/lms-admin/users.php
Normal file
@ -0,0 +1,139 @@
|
||||
<main class="common_margin" id="main">
|
||||
<div class="from-group adding-class form-group_lng form-group_full-width ">
|
||||
<a href="<?php echo base_url().'add-edit-user/0';?>"><button type="button" class="btn btn-success btn-sm">Add New User</button></a>
|
||||
</div>
|
||||
<div class="main-wrap">
|
||||
|
||||
<div class="roles-cover">
|
||||
<a href="javascript:history.back()"><button class="btn btn-dark btn-sm">Back</button></a>
|
||||
<div class="common-heading">
|
||||
<h2>Users</h2>
|
||||
<div class="alert alert-success" id="success" style="display:none;">
|
||||
<strong>Success!</strong> The user deleted successfully.
|
||||
</div>
|
||||
|
||||
<?php if($this->session->flashdata('success')){?>
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('success') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->session->flashdata('danger')){?>
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<p><?php echo $this->session->flashdata('danger') ?></p>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="subject_r">
|
||||
<div class="subject_rsec">
|
||||
<div class="">
|
||||
<table id="tbl" class="display dataTable table-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sl No</th>
|
||||
<th>Full Name</th>
|
||||
<th>Email ID</th>
|
||||
<th>User Role</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(isset($userList) && !empty($userList))
|
||||
{
|
||||
$slNo=1;
|
||||
foreach($userList as $post)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $slNo;?></td>
|
||||
<td><?php echo $post['admin_name'];?></td>
|
||||
<td><?php echo $post['email'];?></td>
|
||||
<td><?php echo $post['role_name'];?></td>
|
||||
<td><?php echo $post['status'];?></td>
|
||||
<td>
|
||||
<div class="sub_tabbtnsec">
|
||||
<a href='<?php echo base_url()."add-edit-user/".$post['id'];?>'>
|
||||
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
|
||||
</a>
|
||||
<?php if($post['can_delete']=='Yes'){?>
|
||||
<div class="sub_delbtn" onclick='delete_user(<?php echo $post['id'];?>)'>
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$slNo++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!--End right-top side-->
|
||||
</div>
|
||||
<!-- <script src="assets/js/jquery-3.2.1.slim.min.js"></script> -->
|
||||
<script src="<?= base_url(); ?>assets-lms/js/jquery-3.4.1.min.js" ></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/popper.min.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/all.js"></script>
|
||||
<script defer src="<?= base_url(); ?>assets-lms/js/main.js"></script>
|
||||
<script src="<?= base_url(); ?>assets-lms/owl-carousel/js/owl.carousel.min.js"></script>
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.user-drpdown').click(function(){
|
||||
$('.drpdown-items').toggle();
|
||||
});
|
||||
});
|
||||
//table js
|
||||
$('#tbl').DataTable( {
|
||||
"lengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]]
|
||||
} );
|
||||
//table js end
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function delete_user(userId)
|
||||
{
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Once deleted, you will not be able to recover this user!",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((willDelete) => {
|
||||
if (willDelete) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '<?= base_url(); ?>LmsAdmin/deleteUserData',
|
||||
data: {'id' : userId},
|
||||
success: function(result){
|
||||
if(result == 1){
|
||||
$('#success').show();
|
||||
setTimeout(() => { location.reload(); }, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
89
library/application/views/welcome_message.php
Normal file
89
library/application/views/welcome_message.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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="user_guide/">User Guide</a>.</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>
|
Reference in New Issue
Block a user