commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

6
application/.htaccess Normal file
View File

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

BIN
application/assets/images Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

2
application/cache/frame_1.dat vendored Normal file
View File

@ -0,0 +1,2 @@
<EFBFBD><EFBFBD>
<EFBFBD> E9<45>u<06><>`<60>"PńC<C584>T!0$

BIN
application/cache/frame_6.dat vendored Normal file

Binary file not shown.

BIN
application/cache/frame_8.dat vendored Normal file

Binary file not shown.

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

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

BIN
application/cache/mask_0/mask_21_0.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_0/mask_41_0.dat vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
x<EFBFBD><EFBFBD><EFBFBD>K<0E> E<>9<EFBFBD><39><EFBFBD>o<EFBFBD>#?H/<03>6g$<24>-<2D><><EFBFBD>,X]
<EFBFBD><EFBFBD>xݘ;<3B><><EFBFBD><EFBFBD> <58>9<EFBFBD><39><<3C>Ѻ<EFBFBD><D1BA>q<EFBFBD><71>2<EFBFBD>Af<41><66>H<EFBFBD>7<EFBFBD><37>/5We<57>{<7B>#<19><19><><66><DEA8>?<18><>4<EFBFBD>=N ><3E><>

BIN
application/cache/mask_1/mask_21_1.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_1/mask_41_1.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_1/mask_49_1.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_2/mask_21_2.dat vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
x<EFBFBD>30<EFBFBD>C<06> <0C><>JB<4A>&<26>ù<EFBFBD>Ш<>Q<EFBFBD><51>*<2A><>JXi@l<>0<EFBFBD>U<EFBFBD><55>><3E>*F<>><3E>

BIN
application/cache/mask_2/mask_49_2.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_3/mask_21_3.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_3/mask_41_3.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_3/mask_49_3.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_4/mask_21_4.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_4/mask_41_4.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_4/mask_49_4.dat vendored Normal file

Binary file not shown.

BIN
application/cache/mask_5/mask_21_5.dat vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
x<EFBFBD><EFBFBD>TA
<EFBFBD> <0C><>5<EFBFBD><35>?7<><37><EFBFBD>XMtxҴx<D2B4><78> <09><>?@<40><><EFBFBD>7@<40><>~"<22>N$<24><>S<EFBFBD>ɰ<EFBFBD>{<7B>+C<><43><EFBFBD>A'<27><>r\P<>p<0E><>-<2D> ͺ:S3s<>ԉ<EFBFBD>ۻ<EFBFBD>ީ<EFBFBD>z#<23><>qw<71><77><02> ><3E>

BIN
application/cache/mask_5/mask_49_5.dat vendored Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
<EFBFBD>Q<0E> C<>9M{<7B><>i]<5D><><EFBFBD>X<EFBFBD>1<EFBFBD><31><13><>-<2D> C!<21><><EFBFBD><1B>D<EFBFBD><44>7

BIN
application/cache/mask_6/mask_41_6.dat vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
x<EFBFBD><EFBFBD>VQ<0E> <08><>i<EFBFBD><69><EFBFBD>{K&<11><><EFBFBD><EFBFBD><EFBFBD><13>YX<59><58>؁<EFBFBD>0<EFBFBD>̦!=<3D><><EFBFBD><EFBFBD>t<EFBFBD><74>n&<26><>fp<66>WL
<EFBFBD>`<60>/<2F><ϓKVrU<72>\1<>bGp<47><70>@<40><>ӑ&fN<66><4E>/+ƽq<C6BD><71><01><>`<60><><EFBFBD>AW<><57><EFBFBD>S<EFBFBD><53><03>RGp<47><70>_5|<7C>|z<><15>xν:<14><><15><>J<EFBFBD><4A>+WE<57>m4h<34>4<>3tܭ<>.<2E><><EFBFBD>A<EFBFBD>g`\<5C><19><><EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD>*<2A><0F>F<EFBFBD><46>

View File

@ -0,0 +1,4 @@
<EFBFBD>Q
<EFBFBD>0 B<>=<3D><><EFBFBD>r]<5D><>-?]Rl<52><6C><EFBFBD><1E><1B>2<EFBFBD><32><EFBFBD>nc
<EFBFBD>[<5B><><EFBFBD><EFBFBD>n<EFBFBD><6E>A<EFBFBD>".<2E>j+<2B>i
~<7E>x3<<3C>aX<61>{H<><48>C1x<0F><>)<29><><EFBFBD><02><>S<EFBFBD>

View File

@ -0,0 +1 @@
x<EFBFBD><EFBFBD>TA<0E> <08><>5<EFBFBD><35><EFBFBD>[fDY<44>(O<13>^<5E><>bR3/~t/L"<22><>7SQQ5<>j<EFBFBD>\S<><53>i<EFBFBD><69><EFBFBD>b<EFBFBD><62>#Նȏ<03><><>w#<23>z<05>x?<3F>㽧A-<2D><>w<EFBFBD>u曑Y7$b.%A<><41>;<3B>w<EFBFBD>R<EFBFBD><52><EFBFBD>oxG}?<3F>

View File

@ -0,0 +1 @@
x<EFBFBD><EFBFBD>V<EFBFBD><0E>0<08><>k<EFBFBD><6B><EFBFBD>h<EFBFBD>C-X.<2E><><0E><<3C><>h6̋ 3<><33><EFBFBD>,B

View File

@ -0,0 +1,27 @@
<?php namespace Config;
use CodeIgniter\Config\BaseConfig;
class Zoom extends \Daycry\Zoom\Config\Zoom
{
// public $clientId = 'c5n3MF0JSiKfZxROXR3AeA';
// public $clientSecret = '6xoSpQntO747QISdWAaHzcspU7ozhC38';
public $clientId = 'k6aMa_CQTEG5EnYP2V5xuA';
public $clientSecret = 'P3I0MWyZSHc1g27oQ0DWzKZXWaCsD7GbdMdq';
public $redirectUrl = 'http://zoom.local/zoom/authentication/';
}
??php namespace Config;
use CodeIgniter\Config\BaseConfig;
class Zoom extends \Daycry\Zoom\Config\Zoom
{
// public $clientId = 'c5n3MF0JSiKfZxROXR3AeA';
// public $clientSecret = '6xoSpQntO747QISdWAaHzcspU7ozhC38';
public $clientId = 'k6aMa_CQTEG5EnYP2V5xuA';
public $clientSecret = 'P3I0MWyZSHc1g27oQ0DWzKZXWaCsD7GbdMdq';
public $redirectUrl = 'http://zoom.local/zoom/authentication/';
}
?>

View File

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

View File

@ -0,0 +1,533 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
define("ACCOUNTING", true);
/*
|--------------------------------------------------------------------------
| 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'] = 'https://ezydemo.com/erisn-classroom/';
$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$base_url .= "://" . @$_SERVER['HTTP_HOST'];
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']);
$config['base_url'] = $base_url;
$config['auth_api_key'] = 'A3224$sdh#2*72';
// $config['base_url'] = 'http://localhost/Erisn-classroom/';
/*
|--------------------------------------------------------------------------
| 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'] = 'index.php';
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$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'] = TRUE;
/*
|--------------------------------------------------------------------------
| 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'] = 'Asia/Kathmandu';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';

View File

@ -0,0 +1,142 @@
<?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
defined('MS_CLIENT_ID') or define('MS_CLIENT_ID', 'cbab4954-057c-40c2-bb15-a6f87593f048');
defined('MS_CLIENT_SECURITY') or define('MS_CLIENT_SECURITY', '3-WViiNF_5e-k8JD0R77L--JTPefr9pROe');
defined('MS_USER_ID') or define('MS_USER_ID', '1c2d9d4a-eb8b-4bfa-ab64-7a84ca24e506');
// 07-10-2021
define('MY_DATE_FORMAT', "d-m-Y");
// define('SUBJECT_SUCCESS_ADD_MSG', "The Subject has been added succesfully");
// define('SUBJECT_SUCCESS_EDIT_MSG', "The Subject has been updated succesfully");
// define('SUBJECT_SUCCESS_FAILED_MSG', "The Subject Insertion failed");
define('RUPEE_NAME', 'Rs');
define('THE_INSERT_FAILED_MSG', "The %s Insertion failed");
define('THE_UPDATE_FAILED_MSG', "The %s Update failed");
define('THE_ADD_SUCCESS_MSG', "The %s has been added successfully");
define('THE_UPDATE_SUCCESS_MSG', "The %s has been updated successfully");
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");
// Afras Khan
define('THE_DELETE_SUCCESS_MSG', "The %s has been deleted successfully");
define('THE_DELETE_ERROR_MSG', "Oops.. Something went wrong while updating the %s");
define('THE_DELETE_ALERT_MSG', "Are you sure you want to delete this %s?");
define('THE_EXISTS_ERROR_MSG', "The %s already exists");
define('ADMIN_PASSWORD_MAIL_TO', 'info@gmail.com');
define('ERISN_WEB_URL', 'www.blackboard.com.np');
define('CLASSROOM_NOTEXISTS_MSG', "ClassRoom is Not created, Please Create %s");
define('CLASSROOM_ALREADY_ASSIGNED_MSG', "Then Mentioned %s students are already assigned to Another Clasroom, Please Check");
define('ALREADY_ASSIGNED_MSG', "The Selected %s is assigned with another module ");
define('ONLINE_SESSION_INSERT_MSG', "The Session link has been Inserted successfully");
define('ONLINE_SESSION_UPDATE_MSG', "The Session link has been updated successfully");
define('ONLINE_SESSION_UPDATE_FAILED_MSG', "The Session link Updated failed");
define('ONLINE_SESSION_INSERT_FAILED_MSG', "The Session link Inserted failed");
define('ONLINE_SESSION_CHECK_FAILED_MSG', " The Session Already assigned with other subject at the same time.");
define('NO_IMAGE_PATH', "/common_assets/No-Image.jpg");
define('ALREADY_ASSIGNED_TIMETABLE_MSG', "The %s Already Scheduled So We Can't Delete");
define('THE_UPDATE_NO_CHANGES_MSG', "No Changes");
define('STUDENT_APPLICATION_PREFIX', 'A');
define('STUDENT_PREFIX', 'S');
define('STUDENT_PARENT_PREFIX', 'P');
define('TEACHER_ID_PREFIX', 'T');
define('FROM_EMAIL', 'info@blackboard.com.np');
define('FROM_EMAIL_USERNAME', 'Blackboard');
// define('ACCOUNTING', true);
// define('GRADE_SETTING', 'GRADE');

View File

@ -0,0 +1,165 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => ($_SERVER['HTTP_HOST']=="localhost")?'root':'myurlsco_bbnepal_user',
'password' => ($_SERVER['HTTP_HOST']=="localhost")?'':'NayaNepal@123',
'database' => ($_SERVER['HTTP_HOST']=="localhost")?'bbnepal_main':'myurlsco_bbnepal_main',
'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_lms'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'blackb_bbnepal_user',
// 'password' => '',
'password' => 'q2IxAnPe-m%)',
'database' => 'bbnepal_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['hr'] = array(
'dsn' => '',
'hostname' => 'localhost',
// 'username' => 'blackb_bbnepal_user',
// // 'password' => '',
// 'password' => 'q2IxAnPe-m%)',
'username' => 'root',
'password' => 'root',
'database' => 'blackb_bbnepal_hr',
'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['hms'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'blackb_bbnepal_user',
// 'password' => '',
'password' => 'q2IxAnPe-m%)',
'database' => 'blackb_bbnepal_hostel',
'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_bts'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'root',
'database' => 'demo_bus_tracking',
'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['schoolSetting'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'blackb_main_user',
'password' => 'XWYnG?JM&2A^',
'database' => 'blackb_main_list',
'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['accounting'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => ($_SERVER['HTTP_HOST']=="localhost")?'root':'myurlsco_bbnepal_user',
'password' => ($_SERVER['HTTP_HOST']=="localhost")?'':'NayaNepal@123',
'database' => ($_SERVER['HTTP_HOST']=="localhost")?'bbnepal_accounting':'myurlsco_bbnepal_accounts',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

View File

@ -0,0 +1,24 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);

View File

@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// $config['protocol'] = 'smtp';
// $config['smtp_host'] = 'smtp.office365.com'; // $config['smtp_host'] = 'ssl://smtp.gmail.com' smtp.office365.com;
// $config['smtp_user'] = 'erisnclassroom@erisn.com';
// $config['smtp_pass'] = 'Bas87490';
// $config['smtp_port'] = '587'; // for gmail port 465 587
// $config['smtp_timeout'] = '60';
// $config['smtp_crypto'] = 'tls';
// $config['mailtype'] = 'html';
// $config['charset']='utf-8';
// $config['newline']="\r\n";
// $config['crlf'] = "\r\n";
$config['protocol'] = 'sendmail';
$config['smtp_host'] = 'smtp.googlemail.com';
$config['smtp_port'] = '587';
$config['smtp_timeout'] = '5';
// $config['smtp_user'] = 'bb.blackboardnepal@gmail.com';
// $config['smtp_pass'] = 'Black#312';
$config['smtp_user'] = 'info@blackboard.com.np';
$config['smtp_pass'] = 'pfG3OdbHKaCu';
$config['smtp_crypto'] = 'tls';
$config['charset'] = 'utf-8';
$config['newline']="\r\n";
$config['crlf'] = "\r\n";
$config['mailtype'] = 'html';
// $config['dsn'] = 'html';
// $config['validation'] = TRUE;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,27 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// client : Ac4nhCa1qqQOJmfrLkZhmOnCicXE7XFZh8J30yyfclwnHIKW6jAM_vHI46e7Y80UWuw7weLAxY959Gil
// secret key: EMOjdXSEhOfciBDuetTGt6YbsT9CCjDhQBHVM1ZLqwFqFgAeyRP41oe16UalsSY5alFsZg5Z7K_oLQEG
// ------------------------------------------------------------------------
// Paypal IPN Class
// ------------------------------------------------------------------------
// Use PayPal on Sandbox or Live
$config['sandbox'] = TRUE; // FALSE for live environment
// sb-8q2uk7196373@business.example.com
// PayPal Business Email ID
$config['business'] = 'sb-jfjqt8277261@business.example.com';
// sb-tpnrl7808427@business.example.com
// access_token$sandbox$9qyq7q2psqqtmkt7$76f98c62ce23f9a174bd857ede75c329
// If (and where) to log ipn to file
$config['paypal_lib_ipn_log_file'] = BASEPATH . 'logs/paypal_ipn.log';
$config['paypal_lib_ipn_log'] = TRUE;
// Where are the buttons located at
$config['paypal_lib_button_path'] = 'buttons';
// What is the default currency?
$config['paypal_lib_currency_code'] = 'USD';

View File

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

View File

@ -0,0 +1,373 @@
<?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
*/
//student portal
$route['student/admission-process'] = 'Student/admission_process';
$route['student/student-reset'] = 'Student/student_reset';
$route['student/my-classes'] = 'Student/my_classes';
$route['student/my-calendar'] = 'Student/my_calendar';
$route['student/my-assignments'] = 'Student/my_assignments';
$route['student/my-tests-exams'] = 'Student/my_tests_exams';
$route['student/my-grades'] = 'Student/my_grades';
$route['student/my-notifications'] = 'Student/my_notifications';
$route['student/my-syllabus'] = 'Student/my_syllabus';
$route['student/attendance-detail'] = 'Student/attendance_detail';
$route['student/view-test-detail/(:num)'] = 'Student/view_test_detail';
$route['student/question-paper/(:num)'] = 'Student/question_paper';
$route['student/view-grade-detail/(:num)'] = 'Student/view_grade_detail';
$route['student/my-profile'] = 'Student/my_profile';
$route['student/addedit-apllication'] = 'Student/addedit_apllication';
$route['student/paymentSuccess'] = 'Student/paymentSuccess';
$route['student/paymentFail'] = 'Student/paymentFail';
/*$route['student/paypalipn'] = 'Student/paypalipn';
$route['student/ipn'] = 'Student/ipn';*/
$route['student/admission_payment'] = 'Student/admission-payment';
$route['student/get_installdetails'] = 'Student/get-installdetails';
$route['student/paypalipn_admission'] = 'Student/paypalipn-admission';
$route['admin'] = 'Admin/index';
$route['admin-logout'] = 'Admin/admin_logout';
//admin portal
$route['admin/ae-subject/(:any)'] = 'Admin/add_edit_subject/$1';
$route['admin/fee-installment'] = 'Admin/fee_installment';
$route['admin/add-edit-course/(:any)'] = 'Admin/add_edit_course/$1';
$route['admin/add-edit-teacher/(:any)'] = 'Admin/add_edit_teacher/$1';
$route['admin/add-edit-classroom/(:any)'] = 'Admin/add_edit_classroom/$1';
$route['admin/fee-installment'] = 'Admin/fee_installment/$1';
$route['admin/ae-fee-installment/(:any)'] = 'Admin/add_edit_fee_installment/$1';
$route['admin/addedit-installment/(:any)'] = 'Admin/addedit_installment/$1';
$route['admin/get-application/(:any)'] = 'Admin/get_application/$1';
$route['admin/view-application/(:any)'] = 'Admin/view_application/$1';
$route['admin/download_applicant/(:any)'] = 'Admin/download_applicant/$1';
$route['admin/student_notassigned/(:any)'] = 'Admin/students-notassigned/$1';
$route['admin/view_classstudent/(:any)'] = 'Admin/view-classstudent/$1';
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
// Routes - Afras khan
//START - Nandini -------------------------------------------------------------------------------------
$route['admin/batches'] = 'Admin/batches';
$route['admin/add-edit-batch/(:any)'] = 'Admin/add_edit_batch/$1';
$route['admin/assign-all-fees'] = 'Admin/assign_all_fees_atonce';
$route['admin/student-fees/(:any)'] = 'Admin/assign_student_fees/$1';
$route['admin/db-backups'] = 'Admin/database_backups';
$route['admin/create-db-backups'] = 'Admin/create_database_backup';
$route['admin/delete-db-backup/(:any)'] = 'Admin/delete_database_backup/$1';
$route['admin/assign-additional-subjects'] = 'Admin/assign_additional_subjects_to_students';
$route['admin/assign-optional-subjects'] = 'Admin/assign_optional_subjects_to_students';
//END - Nandini -------------------------------------------------------------------------------------
// Section Routes
$route['admin/sections'] = 'Admin/section';
$route['admin/ae-section/(:any)'] = 'Admin/add_edit_section/$1';
$route['admin/delete-section/(:any)'] = 'Admin/deleteSection/$1';
// Notification Routes
$route['admin/send-notification'] = 'Admin/sendNotifications';
$route['admin/view-notification/(:any)'] = 'Admin/viewNotifications/$1';
// Routes Ends- Afras khan
// Routes start - shivu
$route['admin/subjects'] = 'Admin/subject';
$route['admin/ae-subject/(:any)'] = 'Admin/add_edit_subject/$1';
$route['admin/assign-syllabus/(:any)'] = 'Admin/assign_syllabus/$1';
// classroom
$route['admin/classroom'] = 'Admin/classroom';
$route['admin/ae-classroom/(:any)'] = 'Admin/add_edit_classroom/$1';
$route['admin/assign-students/(:any)'] = 'Admin/assign_students/$1';
$route['admin/assign-to-classroom/(:any)'] = 'Admin/assign_classroom/$1';
// Routes end - shivu
//teacher portal
//shankar code
$route['teacher/asgn_cls/(:num)'] = 'Teacher/assignment_class';
$route['teacher/assignment_cls/(:num)/(:num)'] = 'Teacher/assignment_class';
$route['teacher/teacher_assignment_view/(:num)/(:num)'] = 'teacher/teachers_assignments_review';
$route['teacher/date_search/(:num)/(:num)/(:num)/(:num)'] = 'Teacher/assignment_class';
//shankar end
// Courses Routes - Afras Khan
$route['admin/courses'] = 'admin/course';
$route['admin/ae-course/(:any)'] = 'Admin/add_edit_course/$1';
$route['admin/delete-course/(:any)'] = 'Admin/delete_course/$1';
// Courses Routes End - Afras Khan
// Notification Routes - Afras Khan
$route['admin/notifications'] = 'Admin/notifications';
$route['admin/send-notification'] = 'Admin/send_notifications';
$route['admin/view-notification/(:any)'] = 'Admin/view_notification/$1';
// Notification Routes Ends - Afras Khan
//Admin Roles - Afras Khan
$route['admin/roles/list'] = 'admin/roles';
$route['admin/roles/ae-role/(:any)'] = 'Admin/add_edit_roles/$1';
//User Routes - Afras Khan
$route['admin/users/list'] = 'admin/users';
$route['admin/users/ae-user/(:any)'] = 'Admin/add_edit_users/$1';
// Forgot Password Routes
$route['admin/forgot-password'] = 'admin/forgot_password';
$route['admin/reset-password/(:any)'] = 'admin/reset_admin_password/$1';
//Reset Password shankar code 25-10-21
$route['student/reset-password'] = 'student/student_fp_password';
$route['student/check-valid-email'] = 'student/fp_check_is_emailid_valid';
$route['student/reset-email'] = 'student/send_email_reset_password';
$route['student/create-password/(:any)'] = 'student/student_create_password/$1';
$route['student/student-reset-password'] = 'student/change_student_password';
// shankar code for teacher view 27-10-21
$route['admin/view-teacher/(:num)'] = 'Admin/view_teacher/$1';
// shankar code for teacher view syllabus 01-11-21
$route['teacher/view-syllabus'] = 'Teacher/teacher_syllabus';
// Students Information Routes
$route['student/my-info'] = 'student/view_info';
$route['student/my-course'] = 'student/view_course';
$route['student/my-payments'] = 'student/view_payments';
//Fee installments - Afras khan
$route['admin/ae-fee-course/(:num)'] = 'admin/add_edit_fee_course/$1';
$route['admin/fee-course'] = 'admin/fee_course';
$route['admin/fee-types'] = 'admin/fee_types';
$route['admin/expense-types'] = 'admin/expense_types';
// Teacher Module - MyGrade Routes
$route['teacher/teacher-grade'] = 'teacher/teacher_grade';
//Student's Information - Admin Module
$route['admin/view-student/(:num)'] = 'admin/view_student/$1';
$route['admin/editInfo-student/(:num)'] = 'admin/editInfo_Student/$1';
$route['admin/view-student-payments/(:num)'] = 'admin/view_student_payments/$1';
//Reset Password teacher shankar code 18/11/21
$route['teacher/teacher-reset'] = 'teacher/teacher_reset_view';
$route['teacher/check-valid-email'] = 'teacher/fp_check_is_emailid_valid';
$route['teacher/reset-email'] = 'teacher/send_email_reset_password';
$route['teacher/create-password/(:any)'] = 'teacher/teacher_create_password/$1';
$route['teacher/teacher-reset-password'] = 'teacher/teacher_student_password';
// report by shivakumar
$route['admin/payment-overview/(:num)'] = 'admin/payment_overview/$1';
$route['admin/report-recent-transactions'] = 'admin/report_recent_transactions';
$route['admin/report-overview'] = 'admin/report_overview';
$route['admin/getreport'] = 'admin/getreportBydate';
$route['admin/getAnnualReportDetails'] = 'admin/getAnnualReportDetails';
$route['admin/invoice-reports'] = 'admin/invoice_reports';
$route['admin/invoice-fee-reports'] = 'admin/invoice_fee_reports';
$route['admin/fee-revert-reports'] = 'admin/fee_revert_reports';
$route['admin/due-reports'] = 'admin/due_fee_reports';
$route['admin/total-due-report'] = 'admin/total_due_report';
// Hostel
$route['student/hostel'] = 'student/hostel';
$route['student/hostel-fee'] = 'student/hostel_fee';
//bus_payment_method - shankar
$route['student/bus-facility'] = 'student/BusFacility';
$route['student/bus-details'] = 'student/BusFacilityDetails';
$route['student/bus-fee'] = 'student/bus_fee_management';
//start keerthi code
$route['api/security-login'] = 'api/Transport_Api/securityLogin';
$route['api/myinfo'] = 'api/Transport_Api/myInfo';
$route['api/addcheckinoutinfo'] = 'api/Transport_Api/addCheckInOutInfo';
$route['api/getcheckinoutinfo'] = 'api/Transport_Api/getCheckInOutInfo';
$route['api/getclassfilter'] = 'api/Transport_Api/getClassFilter';
$route['api/getduplicatecheckinoutinfo'] = 'api/Transport_Api/getDuplicateCheckInOutInfo';
//end keerthi code
// start by shivu
$route['admin/add-new-application'] = 'Admin/add_new_application';
$route['admin/fee-collection/(:any)'] = 'Admin/fee_collection/$1';
// end by shivu
//Shankar code for download csv File
$route['admin/downloadCsvFile'] = 'Admin/download_Csv_File';
//shankar ccode for admin change password
$route['admin/admin-change-password'] = 'Admin/change_admin_password';
$route['teacher/teacher-change-password'] = 'Teacher/changeTeacher_password';
// Shivakumar code for Attendance (admin section) start by Shivu
$route['admin/results'] = 'Admin/getstudentsresults';
$route['admin/add-student'] = 'Admin/newstudentview';
$route['admin/add-new-student'] = 'Admin/addnewstudent';
// end by shivu
//shankar code for Student changePassword
$route['admin/student-change-password'] = 'Admin/studentChangePassword';
//suspend student
$route['admin/suspend-student'] = 'admin/suspend_Student';
$route['admin/enable-student'] = 'admin/student_suspend_list';
// Teacher's Leave
$route['teacher/leaves'] = 'teacher/leaves';
$route['teacher/view-leave/(:any)'] = 'teacher/view_leave/$1';
// Transport module
$route['admin/assign-routes'] = 'admin/assign_routes_students';
//Admin New Installments
$route['admin/manage-installments/(:num)'] = 'admin/manage_installments_add/$1';
$route['admin/update-installments/(:num)'] = 'admin/manage_installments_update/$1';
//shankar route for bus route 12-04-22
$route['student/route-list-batch'] = 'student/routes_list_batch_wise';
// Hostel Modules
$route['admin/assign-to-hostel'] = 'admin/students_assign_to_hostel';
$route['getSchoolData'] = 'api/SchoolApi/GetSchoolData';
$route['checkSchool'] = 'api/SchoolApi/CheckSchoolData';
$route['admin/roll-change/(:any)'] = 'Admin/rollNumberChange/$1';
$route['admin/registration-number/(:any)'] = 'Admin/registrationNumberUpdate/$1';
$route['admin/symbol-number/(:any)'] = 'Admin/symbolNumberUpdate/$1';
$route['admin/assign-due-fees'] = 'Admin/assign_due_fees';
// scholarships
$route['admin/ae-scholarship-type/(:num)'] = 'admin/add_edit_scholarship_type/$1';
$route['admin/scholarship'] = 'admin/scholarship';
$route['admin/scholarship-types'] = 'admin/scholarship_types';
$route['admin/scholarship-list'] = 'admin/scholarship_list';
$route['admin/send-message'] = 'Admin/send_message';
$route['admin/transport-report'] = 'Admin/transport_report';
$route['admin/assign-class-teacher/(:any)'] = 'Admin/assign_class_teacher/$1';
$route['admin/multiple-edit'] = 'Admin/multiple_edit';
$route['admin/school-calendar'] = 'Admin/school_calendar';
$route['admin/event-types'] = 'Admin/school_event_type';
$route['admin/designation'] = 'Admin/designation';
$route['admin/staff-roles'] = 'Admin/staff_roles';
$route['admin/department'] = 'Admin/department';
$route['admin/school-administration'] = 'Admin/school_administration';
$route['admin/staffs'] = 'Admin/school_staffs';
$route['admin/add-edit-staff/(:any)'] = 'Admin/add_edit_staff/$1';
$route['admin/classroom-schedule'] = 'Admin/classroom_schedule';
$route['admin/classroom-schedule-update/(:any)'] = 'Admin/classroom_schedule_update/$1';
$route['admin/add-edit-class-schedule/(:any)'] = 'Admin/add_edit_class_schedule/$1';
// $route['admin/send-sms'] = 'Admin/send_sms';
// Inventory
$route['admin/inventory/dashboard'] = 'Inventory/dashboard';
$route['admin/inventory/item-unit'] = 'Inventory/item_unit';
$route['admin/inventory/book-publication'] = 'Inventory/book_publications';
$route['admin/inventory/suppliers'] = 'Inventory/suppliers';
$route['admin/inventory/item-categories'] = 'Inventory/item_category';
$route['admin/inventory/item-variants'] = 'Inventory/item_variants';
$route['admin/inventory/items'] = 'Inventory/item_list';
$route['admin/inventory/item-purchase'] = 'Inventory/item_purchase';
$route['admin/inventory/item-sales'] = 'Inventory/sales';
$route['admin/inventory/add-edit-new-entry/(:num)'] = 'Inventory/add_edit_new_entry/$1';
$route['admin/inventory/add-new-sales-record/(:num)'] = 'Inventory/add_new_sales/$1';
$route['admin/inventory/settings'] = 'Inventory/add_edit_staff/$1';
$route['admin/inventory/item-stocks'] = 'Inventory/item_stocks';
$route['admin/inventory/view-sales-detail/(:num)'] = 'Inventory/view_sales_details/$1';
$route['admin/inventory/view-item-detail/(:num)'] = 'Inventory/view_item_details/$1';
$route['admin/inventory/view-invoice/(:any)'] = 'Inventory/view_invoice/$1';
$route['admin/accounting-ledgers'] = 'Admin/accounting_ledgers';
$route['admin/journal-vouchers'] = 'Admin/journal_vouchers';
// $route['admin/create-account/(:any)/(:any)'] = 'Admin/create_ledger_account/$1/$2';
// Inventory Finish

View File

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

View File

@ -0,0 +1,216 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
*/
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$mobiles = array(
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'nexus' => 'Nexus',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
'meizu' => 'Meizu',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot'
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
<?php
namespace App\Controllers;
/**
* Class BaseController
*
* BaseController provides a convenient place for loading components
* and performing functions that are needed by all your controllers.
* Extend this class in any new controllers:
* class Home extends BaseController
*
* For security be sure to declare any new methods as protected or private.
*
* @package CodeIgniter
*/
use CodeIgniter\Controller;
class BaseController extends Controller
{
/**
* An array of helpers to be loaded automatically upon
* class instantiation. These helpers will be available
* to all other controllers that extend BaseController.
*
* @var array
*/
protected $helpers = [ 'twig_helper', 'doctrine_helper', 'filesystem' ];
/**
* Constructor.
*/
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
{
// Do Not Edit This Line
parent::initController($request, $response, $logger);
//--------------------------------------------------------------------
// Preload any models, libraries, etc, here.
//--------------------------------------------------------------------
// E.g.:
// $this->session = \Config\Services::session();
}
}
?>

View File

@ -0,0 +1,38 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class DbCorrection extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Admin_model');
}
function index()
{
//echo base_url();
$students = $this->db->query("SELECT id from students")->result_array();
$i=0;
foreach($students as $std)
{
$stdBatchDets = $this->db->query("SELECT * from student_batch where student_id = ".$std['id']." order by id DESC limit 1")->result_array();
if(isset($stdBatchDets[0]))
{
$this->db->insert('sb_temp', $stdBatchDets[0]);
}
else {
$i++;
}
}
echo $i;
exit;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('Admin_model');
}
public function index()
{
$data['school_info'] = $this->Admin_model->get_logo_from_setting();
$this->load->view('welcome_message',$data);
}
public function createapp(){
$data=array('baseurl' => base_url());
$this->load->view('email-applicationfee',$data);
}
}

View File

@ -0,0 +1,291 @@
<?php namespace App\Controllers;
class Zoom extends BaseController
{
private $tokenPath = __DIR__ . DIRECTORY_SEPARATOR . 'token.json';
public function authentication()
{
try
{
$zoom = new \Daycry\Zoom\Zoom();
$token = $zoom->authentication();
if( !empty( $token ) )
{
write_file( $this->tokenPath, json_encode( $token ) );
}
} catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch ( \Daycry\Zoom\Exceptions\ExceptionInterface $e)
{
die( $e->getMessage() );
}
}
public function refresh()
{
try
{
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->refreshAccessToken();
if( !empty( $response ) )
{
write_file( $this->tokenPath, json_encode( $response ) );
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( \Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
public function getMeetingsForEmpty()
{
try
{
$this->refresh();
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->request( 'GET', 'users/jmano@mediapro.tv/meetings?type=live' );
if( $response )
{
if( is_array( $response ) && isset( $response[ 'meetings' ] ) )
{
foreach( $response[ 'meetings' ] as $meeting )
{
if( intval( strtotime( $meeting[ 'start_time'] ) ) + ( intval( $meeting[ 'duration'] ) * 60 ) <= strtotime( date( 'Y-m-d H:i:s' ) ) )
{
//change status of meeting and block
$status = $zoom->request( 'PUT', 'meetings/' . $meeting[ 'id' ] . '/status', [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'action' => 'end' ) )
]);
//empty room
$emptyRoom = $zoom->request( 'PATCH', 'meetings/' . $meeting[ 'id' ], [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'settings' => array( 'waiting_room' => true, 'join_before_host' => false ) ) )
]);
}
}
}
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
public function getMeetingsForEnable()
{
try
{
$this->refresh();
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->request( 'GET', 'users/jmano@mediapro.tv/meetings?type=upcoming' );
if( $response )
{
if( is_array( $response ) && isset( $response[ 'meetings' ] ) )
{
foreach( $response[ 'meetings' ] as $meeting )
{
if( strtotime( '-1 minutes', time() ) < strtotime( $meeting[ 'start_time'] ) && strtotime( $meeting[ 'start_time'] ) <= time() )
{
//set conf
$setRoom = $zoom->request( 'PATCH', 'meetings/' . $meeting[ 'id' ], [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'settings' => array( 'waiting_room' => false, 'join_before_host' => true ) ) )
]);
}
}
}
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( \Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
//--------------------------------------------------------------------
}
<??php namespace App\Controllers;
class Zoom extends BaseController
{
private $tokenPath = __DIR__ . DIRECTORY_SEPARATOR . 'token.json';
public function authentication()
{
try
{
$zoom = new \Daycry\Zoom\Zoom();
$token = $zoom->authentication();
if( !empty( $token ) )
{
write_file( $this->tokenPath, json_encode( $token ) );
}
} catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch ( \Daycry\Zoom\Exceptions\ExceptionInterface $e)
{
die( $e->getMessage() );
}
}
public function refresh()
{
try
{
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->refreshAccessToken();
if( !empty( $response ) )
{
write_file( $this->tokenPath, json_encode( $response ) );
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( \Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
public function getMeetingsForEmpty()
{
try
{
$this->refresh();
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->request( 'GET', 'users/jmano@mediapro.tv/meetings?type=live' );
if( $response )
{
if( is_array( $response ) && isset( $response[ 'meetings' ] ) )
{
foreach( $response[ 'meetings' ] as $meeting )
{
if( intval( strtotime( $meeting[ 'start_time'] ) ) + ( intval( $meeting[ 'duration'] ) * 60 ) <= strtotime( date( 'Y-m-d H:i:s' ) ) )
{
//change status of meeting and block
$status = $zoom->request( 'PUT', 'meetings/' . $meeting[ 'id' ] . '/status', [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'action' => 'end' ) )
]);
//empty room
$emptyRoom = $zoom->request( 'PATCH', 'meetings/' . $meeting[ 'id' ], [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'settings' => array( 'waiting_room' => true, 'join_before_host' => false ) ) )
]);
}
}
}
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
public function getMeetingsForEnable()
{
try
{
$this->refresh();
$content = file_get_contents( $this->tokenPath );
$token = json_decode( $content, true );
$zoom = new \Daycry\Zoom\Zoom();
$zoom->setAccessToken( $token );
$response = $zoom->request( 'GET', 'users/jmano@mediapro.tv/meetings?type=upcoming' );
if( $response )
{
if( is_array( $response ) && isset( $response[ 'meetings' ] ) )
{
foreach( $response[ 'meetings' ] as $meeting )
{
if( strtotime( '-1 minutes', time() ) < strtotime( $meeting[ 'start_time'] ) && strtotime( $meeting[ 'start_time'] ) <= time() )
{
//set conf
$setRoom = $zoom->request( 'PATCH', 'meetings/' . $meeting[ 'id' ], [
'headers' => array( 'Content-Type' => 'application/json' ),
'body' => json_encode( array( 'settings' => array( 'waiting_room' => false, 'join_before_host' => true ) ) )
]);
}
}
}
}
}catch ( \League\OAuth2\Client\Provider\Exception\IdentityProviderException $e )
{
die( $e->getMessage() );
}catch( \Daycry\Zoom\Exceptions\ZoomException $e )
{
die( $e->getMessage() );
}
}
//--------------------------------------------------------------------
}
?>

View File

@ -0,0 +1,10 @@
<?php
class admin extends CI_Controller
{
function index()
{
echo "THIS IS WHERE WE CAN LATER INTEGRATE ACCOUNTING PARTS";
$this->accounting->init();
}
}

View File

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

View File

@ -0,0 +1 @@
{"name":"TimesNewRomanPSMT","type":"TTF","desc":{"CapHeight":662,"XHeight":447,"FontBBox":"[-77 -216 1009 877]","Flags":4,"Ascent":877,"Descent":-216,"Leading":0,"ItalicAngle":0,"StemV":87,"MissingWidth":778},"unitsPerEm":2048,"up":-109,"ut":49,"strp":259,"strs":50,"ttffile":"C:\\xampp\\htdocs\\bbnepal\\application\\third_party\\mpdf\\vendor\\mpdf\\mpdf\\src\\Config\/..\/..\/ttfonts\/Times New Roman Font.ttf","TTCfontID":0,"originalsize":85240,"sip":false,"smp":false,"BMPselected":false,"fontkey":"bentonsans","panose":" 1 5 2 2 6 3 5 4 5 2 3 4","haskerninfo":true,"haskernGPOS":false,"hassmallcapsGSUB":false,"fontmetrics":"win","useOTL":0,"rtlPUAstr":"","GSUBScriptLang":[],"GSUBFeatures":[],"GSUBLookups":[],"GPOSScriptLang":[],"GPOSFeatures":[],"GPOSLookups":[],"kerninfo":{"49":{"49":-37},"65":{"84":-110,"86":-128,"87":-80,"89":-91,"118":-74,"119":-91,"121":-91,"8217":-110},"70":{"44":-80,"46":-80,"65":-74},"76":{"84":-91,"86":-91,"87":-74,"89":-100,"121":-55,"8217":-91},"80":{"44":-110,"46":-110,"65":-91},"82":{"84":-60,"86":-80,"87":-55,"89":-55,"121":-40},"84":{"44":-74,"46":-74,"58":-49,"59":-55,"65":-80,"79":-18,"97":-69,"99":-69,"101":-69,"105":-35,"111":-69,"114":-35,"115":-69,"117":-35,"119":-69,"121":-69},"86":{"44":-128,"46":-128,"58":-74,"59":-74,"65":-128,"97":-110,"101":-110,"105":-60,"111":-128,"114":-60,"117":-60,"121":-110},"87":{"44":-91,"46":-91,"58":-37,"59":-37,"65":-110,"97":-80,"101":-80,"105":-40,"111":-80,"114":-40,"117":-40,"121":-60},"89":{"44":-128,"46":-128,"58":-91,"59":-91,"65":-110,"97":-100,"101":-100,"105":-55,"111":-100,"112":-91,"113":-110,"117":-110,"118":-100},"102":{"102":-18,"8217":55},"114":{"44":-40,"46":-55,"103":-18,"8217":37},"118":{"44":-64,"46":-64},"119":{"44":-64,"46":-64},"121":{"44":-64,"46":-64},"8216":{"8216":-74},"8217":{"115":-55,"116":-18,"8217":-74}}}

View File

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

View File

@ -0,0 +1,272 @@
<?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 dd($array) {
echo '<pre>';
print_r($array);
exit();
}
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_BSdate_to_ADdate($dateObj,$date,$character='-') {
$date_arr = explode('-', $date);
list($y, $m, $d) = $date_arr;
$datearr = $dateObj->convertBsToAd($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');
}
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');
}
function convert_BSdateTime_to_ADdateTime($dateObj,$dateTime,$character='-') {
$date = date('Y-m-d', strtotime($dateTime));
$time = date('H:i:s', strtotime($dateTime));
$date_arr = explode('-', $date);
list($y, $m, $d) = $date_arr;
$datearr = $dateObj->convertBsToAd($y, $m, $d);
extract($datearr);
$string = $year.'-'.$month.'-'.$day.' '.$time;
$date = date_create_from_format('Y-m-d H:i:s', $string);
return $php_date = date_format($date, 'Y-m-d H:i:s');
}
function convert_ADdateTime_to_BSdateTime($dateObj,$dateTime,$character='-') {
$date = date('Y-m-d', strtotime($dateTime));
$time = date('H:i:s', strtotime($dateTime));
$date_arr = explode('-', $date);
list($y, $m, $d) = $date_arr;
$datearr = $dateObj->convertAdToBs($y, $m, $d);
extract($datearr);
$string = $year.'-'.$month.'-'.$day.' '.$time;
$date = date_create_from_format('Y-m-d H:i:s', $string);
return $php_date = date_format($date, 'Y-m-d H:i:s');
}
function get_complete_BS_date_info($dateObj, $date) {
$date_arr = explode('-', $date);
list($y, $m, $d) = $date_arr;
return $date = $dateObj->getDetails($y, $m, $d, 'bs');
}
function get_complete_AD_date_info($dateObj, $date) {
$date_arr = explode('-', $date);
list($y, $m, $d) = $date_arr;
return $date = $dateObj->getDetails($y, $m, $d, 'ad');
}
//Do not make any changes to this function for now.. Just call and use it as it is
// function ciSendEmail($data=array())
// {
// $CI = &get_instance();
// $CI->load->library('email');
// // $config = Array(
// // 'protocol' => 'smtp',
// // 'smtp_host' => 'smtp.gmail.com',
// // 'smtp_port' => 465,
// // 'smtp_user' => 'info@blackboard.com.np',
// // 'smtp_pass' => 'pfG3OdbHKaCu',
// // 'smtp_crypto'=>'ssl',
// // 'mailtype'=>'html',
// // 'newline'=>"\r\n",
// // 'crlf' => "\r\n"
// // );
// $config = Array(
// 'protocol' => 'ssmtp',
// 'smtp_host' => 'ssmtp.gmail.com',
// 'smtp_port' => 465,
// 'smtp_user' => 'bb.blackboardnepal@gmail.com',
// 'smtp_pass' => 'Black#312',
// 'mailtype' => 'html',
// 'charset' => 'utf-8'
// );
// $CI->email->initialize($config);
// $CI->email->set_newline("\r\n");
// $CI->email->from('bb.blackboardnepal@gmail.com', 'Blackboard');
// $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_newline("\r\n");
// $CI->email->set_mailtype('html');
// $res = $CI->email->send();
// echo "Mailer Error: " . $CI->email->print_debugger();
// return $res;
// }
// php Mail send
function sendMail($to,$subject,$message){
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From:'.FROM_EMAIL. "\r\n";
$retval =mail($to,$subject,$message,$headers);
return $retval;
}
// For batch display format by shivu
function batchdateFormat($date1,$date2){
return date('M-Y', strtotime($date1)) . '/' . date('M-Y', strtotime($date2));
}
function batchdateFormatTo($date1,$date2){
return date('M-Y', strtotime($date1)) . ' to ' . date('M-Y', strtotime($date2));
}
function student_grade_show($marks_frm)
{
$ci =& get_instance();
$ci->load->database();
$sql = 'SELECT * FROM grades where CAST(marks_from AS DECIMAL) <= CAST('. $marks_frm .' AS DECIMAL) AND CAST(marks_upto AS DECIMAL) >= CAST('. $marks_frm . ' AS DECIMAL)';
$q = $ci->db->query($sql);
if($q->num_rows() > 0)
{
return $q->row_array();
}
return false;
}
//helper function to set response type.
if (!function_exists('setResponse')) {
function setResponse($status, $data = array(), $message = "", $code = 200) {
$ci = & get_instance();
$response['status'] = $status;
$response['data'] = isset($data) ? $data : new stdClass();
$response['message'] = $message;
$ci->OutputResult = $response;
header('Content-Type: application/json', true, $code);
echo json_encode($response);
}
}
function currency_data()
{
$data = array('NPR-Rs');
return $data;
}
function amountInWords(float $amount)
{
$amount_after_decimal = round($amount - ($num = floor($amount)), 2) * 100;
$amt_hundred = null;
$count_length = strlen($num);
$x = 0;
$string = array();
$change_words = array(0 => '', 1 => 'One', 2 => 'Two',
3 => 'Three', 4 => 'Four', 5 => 'Five', 6 => 'Six',
7 => 'Seven', 8 => 'Eight', 9 => 'Nine',
10 => 'Ten', 11 => 'Eleven', 12 => 'Twelve',
13 => 'Thirteen', 14 => 'Fourteen', 15 => 'Fifteen',
16 => 'Sixteen', 17 => 'Seventeen', 18 => 'Eighteen',
19 => 'Nineteen', 20 => 'Twenty', 30 => 'Thirty',
40 => 'Forty', 50 => 'Fifty', 60 => 'Sixty',
70 => 'Seventy', 80 => 'Eighty', 90 => 'Ninety');
$here_digits = array('', 'Hundred','Thousand','Lakh', 'Crore');
while( $x < $count_length ) {
$get_divider = ($x == 2) ? 10 : 100;
$amount = floor($num % $get_divider);
$num = floor($num / $get_divider);
$x += $get_divider == 10 ? 1 : 2;
if ($amount) {
$add_plural = (($counter = count($string)) && $amount > 9) ? 's' : null;
$amt_hundred = ($counter == 1 && $string[0]) ? ' and ' : null;
$string [] = ($amount < 21) ? $change_words[$amount].' '. $here_digits[$counter]. $add_plural.'
'.$amt_hundred:$change_words[floor($amount / 10) * 10].' '.$change_words[$amount % 10]. '
'.$here_digits[$counter].$add_plural.' '.$amt_hundred;
}
else $string[] = null;
}
$implode_to_Rupees = implode('', array_reverse($string));
$get_paise = ($amount_after_decimal > 0) ? "And " . ($change_words[$amount_after_decimal / 10] . "
" . $change_words[$amount_after_decimal % 10]) . ' Paise' : '';
return ($implode_to_Rupees ? $implode_to_Rupees . 'Rupees ' : '') . $get_paise . 'Only';
}
function cuurentNepaliDateShankar($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);
$month = ($month < 10) ? '0'.$month : $month;
$string = $year.'-'.$month.'-'.$day;
return $string." ".date('H:i:s');
}
function cuurentNepaliDateShankarYMD($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);
$month = ($month < 10) ? '0'.$month : $month;
$string = $year.'-'.$month.'-'.$day;
return $string;
}
?>

View File

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

View File

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

11
application/index.html Normal file
View File

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

View File

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

View File

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

View File

@ -0,0 +1,333 @@
<?php
class Accounting
{
private $ci;
private $db;
public function __construct()
{
$this->ci = &get_instance();
$this->db = $this->ci->load->database('accounting', TRUE);
$t = "select * from admin_menu where parent_id=22 and page_link='account/defaults'";
$r = $this->ci->db->query($t);
if ($r->num_rows() == 0) {
$t = "INSERT INTO `admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `is_active`, `page_link`, `created_on`) VALUES (NULL, 'Accounting Settings', '22', '6', ' ', ' ', 'yes', 'account/defaults', '" . date("y-m-d h:i:s") . "');";
$q = $this->ci->db->query($t);
}
}
function pre($Obj)
{
echo "<pre>";
print_r($Obj);
echo "</pre>";
}
function init()
{
$tbl_acgroups = "CREATE TABLE IF NOT EXISTS `tbl_acgroups` (
`acgroup_id` INT(11) NOT NULL,
`acgroup_code` VARCHAR(250) NOT NULL,
`acgroup_name` VARCHAR(250) NOT NULL,
`posting_side` VARCHAR(20) NOT NULL,
`created_on` DATE NOT NULL,
`created_by` VARCHAR(250) NOT NULL,
`remarks` TEXT NOT NULL,
`status` INT(11) NOT NULL,
`display_order` INT(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($tbl_acgroups);
}
function showFeeTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateFeeTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'fee_types', '$feetype_id')");
}
}
function fetchMappedAccount($model, $bbpk)
{
$q = $this->db->query("SELECT * FROM tbl_accounts WHERE account_id=(SELECT account_id FROM tbl_accmaping WHERE bbmodel='$model' AND bbpk='$bbpk')");
if ($q->num_rows() > 0) {
return $q->row()->account_name;
} else {
return null;
}
}
function showExpenseTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 4)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateExpenseTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'expense_types', '$feetype_id')");
}
}
function userCreateAcc($userId, $userType, $username, $createdOn)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->result();
print_r($userAcc);
if (empty($userAcc)) {
if ($userType == 'student') {
$accategory_id = 64;
} else {
$accategory_id = 65;
}
$td['account_code'] = $userId;
$td['account_name'] = $username;
$td['accategory_id'] = $accategory_id;
$td['created_on'] = $createdOn;
$td['created_by'] = 'Admin';
$td['status'] = 1;
// dd($td);
$insert = $this->db->insert('tbl_accounts', $td);
if ($insert) {
return 'success';
} else {
return 'error';
}
} else {
return 'already_existed';
}
// return $userId . ' = ' . $userType;
}
function fetchAccountInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->row_array();
return $userAcc;
}
function createVoucher($userId, $userType)
{
$userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->result();
if (empty($userAcc)) {
$voucher = $this->db->query("select * from tbl_vouchers")->result();
$voucher_type = $this->db->query("select * from tbl_vouchers WHERE voucher_type = 'Journal'")->result();
$voucherType = $this->db->query("select * from tbl_vouchertypes WHERE voucher_type = 'Journal'")->row_array();
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$td['voucher_no'] = count($voucher) + 1;
$td['voucher_ref'] = $voucherType['voucher_alias'] . '' . (count($voucher_type) + 1);
$td['voucher_date'] = date('Y-m-d');
$td['voucher_state'] = 'Entered';
$td['voucher_type'] = 'Journal';
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['branch_id'] = $branches['branch_id'];
$td['reference_id'] = $userId;
$td['reference_type'] = $userType;
$td['created_by'] = $_SESSION['admin_name'];
$td['created_on'] = date('Y-m-d H:m:s');
$td['remarks'] = '';
$td['status'] = 1;
// dd($td);
// echo '<pre>';
// print_r($td);
$insert = $this->db->insert('tbl_vouchers', $td);
if ($insert) {
return 'success';
} else {
return 'error';
}
} else {
return 'already_existed';
}
// return $userId . ' = ' . $userType;
}
function fetchVoucherInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->row_array();
return $userAcc;
}
function voucherEntry($userId, $theUserId, $course_fee, $scholarship)
{
$userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->result();
if (!empty($userAcc)) {
$voucher = $this->db->query("select * from tbl_vouchers WHERE reference_id = $userId AND reference_type = 'student'")->row_array();
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$entry = !empty($scholarship) ? 3 : 2;
$fee_amt = $course_fee['amount'];
$dr = 0;
$cr = 0;
for ($i = 0; $i < $entry; $i++) {
if ($entry == 3) {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$dr = $fee_amt;
$cr = 0;
} else if ($i == 1) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$cr = $scholarship_amt;
$dr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$dr = 0;
$cr = $fee_amt - $scholarship_amt;
}
} else {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$dr = $fee_amt;
$cr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$cr = $fee_amt;
$dr = 0;
}
}
$td['voucher_id'] = $voucher['voucher_id'];
$td['entry_no'] = $i + 1;
$td['transaction_date'] = date('Y-m-d');
$td['account_id'] = $account['account_id'];
$td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
$td['dr'] = $dr;
$td['cr'] = $cr;
$td['branch_id'] = $branches['branch_id'];
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['batch_id'] = $course_fee['batch_id'];
$td['course_id'] = $course_fee['course_id'];
$td['course_fee_id'] = $course_fee['id'];
$td['student_id'] = $userId;
$td['created_on'] = date('Y-m-d');
$td['created_by'] = $_SESSION['admin_name'];
$td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
$td['status'] = 1;
// echo '<pre>';
// print_r($td);
$this->db->insert('tbl_voucherdetails', $td);
}
} else {
return 'already_existed';
}
// return $userId . ' = ' . $userType;
}
function removeVoucherEntry($userId, $course_fee)
{
$coondition_data = array(
'student_id' => $userId,
'course_fee_id' => $course_fee['id'],
'batch_id' => $course_fee['batch_id']
);
$this->db->where($coondition_data);
$this->db->delete('tbl_voucherdetails');
}
}

View File

@ -0,0 +1,480 @@
<?php
class Accounting
{
private $ci;
private $db;
public function __construct()
{
$this->ci = &get_instance();
$this->db = $this->ci->load->database('accounting', TRUE);
$t = "select * from admin_menu where parent_id=22 and page_link='account/defaults'";
$r = $this->ci->db->query($t);
if ($r->num_rows() == 0) {
$t = "INSERT INTO `admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `is_active`, `page_link`, `created_on`) VALUES (NULL, 'Accounting Settings', '22', '6', ' ', ' ', 'yes', 'account/defaults', '" . date("y-m-d h:i:s") . "');";
$q = $this->ci->db->query($t);
}
}
function pre($Obj)
{
echo "<pre>";
print_r($Obj);
echo "</pre>";
}
function init()
{
$tbl_acgroups = "CREATE TABLE IF NOT EXISTS `tbl_acgroups` (
`acgroup_id` INT(11) NOT NULL,
`acgroup_code` VARCHAR(250) NOT NULL,
`acgroup_name` VARCHAR(250) NOT NULL,
`posting_side` VARCHAR(20) NOT NULL,
`created_on` DATE NOT NULL,
`created_by` VARCHAR(250) NOT NULL,
`remarks` TEXT NOT NULL,
`status` INT(11) NOT NULL,
`display_order` INT(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($tbl_acgroups);
}
function showFeeTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateFeeTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'fee_types', '$feetype_id')");
}
}
function fetchMappedAccount($model, $bbpk)
{
$q = $this->db->query("SELECT * FROM tbl_accounts WHERE account_id=(SELECT account_id FROM tbl_accmaping WHERE bbmodel='$model' AND bbpk='$bbpk')");
if ($q->num_rows() > 0) {
return $q->row()->account_name;
} else {
return null;
}
}
function showExpenseTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 4)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateExpenseTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'expense_types', '$feetype_id')");
}
}
function userCreateAcc($userId, $userType, $username, $createdOn)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->result();
print_r($userAcc);
if (empty($userAcc)) {
if ($userType == 'student') {
$accategory_id = 64;
} else {
$accategory_id = 65;
}
$td['account_code'] = $userId;
$td['account_name'] = $username;
$td['accategory_id'] = $accategory_id;
$td['created_on'] = $createdOn;
$td['created_by'] = 'Admin';
$td['status'] = 1;
// dd($td);
$insert = $this->db->insert('tbl_accounts', $td);
if ($insert) {
return 'success';
} else {
return 'error';
}
} else {
return 'already_existed';
}
// return $userId . ' = ' . $userType;
}
function fetchAccountInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->row_array();
return $userAcc;
}
function createVoucherId($userId, $course_fee_id, $userType)
{
$userAcc = $this->db->query("select * from tbl_vouchers where user_id = $userId AND course_fee_id = $course_fee_id")->row_array();
if (empty($userAcc)) {
$voucher = $this->db->query("select * from tbl_vouchers")->result();
$voucher_type = $this->db->query("select * from tbl_vouchers WHERE voucher_type = 'Journal'")->result();
$voucherType = $this->db->query("select * from tbl_vouchertypes WHERE voucher_type = 'Journal'")->row_array();
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$td['voucher_no'] = count($voucher) + 1;
$td['voucher_ref'] = $voucherType['voucher_alias'] . '' . (count($voucher_type) + 1);
$td['voucher_date'] = date('Y-m-d');
$td['voucher_state'] = 'Entered';
$td['voucher_type'] = 'Journal';
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['branch_id'] = $branches['branch_id'];
$td['user_id'] = $userId;
$td['course_fee_id'] = $course_fee_id;
$td['reference_type'] = $userType;
$td['created_by'] = $_SESSION['admin_name'];
$td['created_on'] = date('Y-m-d H:m:s');
$td['remarks'] = '';
$td['status'] = 1;
// dd($td);
// echo '<pre>';
// print_r($td);
$insert = $this->db->insert('tbl_vouchers', $td);
if ($insert) {
return $this->db->insert_id();
} else {
return 0;
}
} else {
return $userAcc['voucher_id'];
}
}
function fetchVoucherInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->row_array();
return $userAcc;
}
// function voucherEntry($userId, $theUserId, $course_fee, $scholarship)
// {
// $userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->result();
// if (!empty($userAcc)) {
// $voucher = $this->db->query("select * from tbl_vouchers WHERE reference_id = $userId AND reference_type = 'student'")->row_array();
// $fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
// $branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
// $entry = !empty($scholarship) ? 3 : 2;
// $fee_amt = $course_fee['amount'];
// $dr = 0;
// $cr = 0;
// for ($i = 0; $i < $entry; $i++) {
// if ($entry == 3) {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else if ($i == 1) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $cr = $scholarship_amt;
// $dr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $dr = 0;
// $cr = $fee_amt - $scholarship_amt;
// }
// } else {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $cr = $fee_amt;
// $dr = 0;
// }
// }
// $td['voucher_id'] = $voucher['voucher_id'];
// $td['entry_no'] = $i + 1;
// $td['transaction_date'] = date('Y-m-d');
// $td['account_id'] = $account['account_id'];
// $td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
// $td['dr'] = $dr;
// $td['cr'] = $cr;
// $td['branch_id'] = $branches['branch_id'];
// $td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
// $td['batch_id'] = $course_fee['batch_id'];
// $td['course_id'] = $course_fee['course_id'];
// $td['course_fee_id'] = $course_fee['id'];
// $td['student_id'] = $userId;
// $td['created_on'] = date('Y-m-d');
// $td['created_by'] = $_SESSION['admin_name'];
// $td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
// $td['status'] = 1;
// // echo '<pre>';
// // print_r($td);
// $this->db->insert('tbl_voucherdetails', $td);
// }
// } else {
// $voucher = $this->db->query("select * from tbl_vouchers WHERE reference_id = $userId AND reference_type = 'student'")->row_array();
// $this->db->select_max('voucher_id');
// $query = $this->db->get('tbl_vouchers');
// $res = $query->row_array();
// $vid = $res['id'] + 1;
// $fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
// $branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
// $entry = !empty($scholarship) ? 3 : 2;
// $fee_amt = $course_fee['amount'];
// $dr = 0;
// $cr = 0;
// for (
// $i = 0;
// $i < $entry;
// $i++
// ) {
// if ($entry == 3) {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else if ($i == 1) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $cr = $scholarship_amt;
// $dr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $dr = 0;
// $cr = $fee_amt - $scholarship_amt;
// }
// } else {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $cr = $fee_amt;
// $dr = 0;
// }
// }
// $td['voucher_id'] = $vid;
// $td['entry_no'] = $i + 1;
// $td['transaction_date'] = date('Y-m-d');
// $td['account_id'] = $account['account_id'];
// $td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
// $td['dr'] = $dr;
// $td['cr'] = $cr;
// $td['branch_id'] = $branches['branch_id'];
// $td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
// $td['batch_id'] = $course_fee['batch_id'];
// $td['course_id'] = $course_fee['course_id'];
// $td['course_fee_id'] = $course_fee['id'];
// $td['student_id'] = $userId;
// $td['created_on'] = date('Y-m-d');
// $td['created_by'] = $_SESSION['admin_name'];
// $td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
// $td['status'] = 1;
// // echo '<pre>';
// $this->db->insert('tbl_voucherdetails', $td);
// // dd($td);
// }
// }
// // return $userId . ' = ' . $userType;
// }
function voucherEntry($userId, $theUserId, $course_fee, $scholarship)
{
$course_fee_id = $course_fee['id'];
$voucher = $this->db->query("select * from tbl_vouchers where user_id = $userId AND course_fee_id = $course_fee_id")->result();
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$entry = !empty($scholarship) ? 3 : 2;
$fee_amt = $course_fee['amount'];
$dr = 0;
$cr = 0;
for ($i = 0; $i < $entry; $i++) {
if ($entry == 3) {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$dr = $fee_amt;
$cr = 0;
} else if ($i == 1) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$cr = $scholarship_amt;
$dr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$dr = 0;
$cr = $fee_amt - $scholarship_amt;
}
} else {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$dr = $fee_amt;
$cr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$cr = $fee_amt;
$dr = 0;
}
}
$voucherId = $this->createVoucherId($userId, $course_fee['id'], "student",);
$td['voucher_id'] = $voucherId;
$td['entry_no'] = $i + 1;
$td['transaction_date'] = date('Y-m-d');
$td['account_id'] = $account['account_id'];
$td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
$td['dr'] = $dr;
$td['cr'] = $cr;
$td['branch_id'] = $branches['branch_id'];
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['batch_id'] = $course_fee['batch_id'];
$td['course_id'] = $course_fee['course_id'];
$td['course_fee_id'] = $course_fee['id'];
$td['student_id'] = $userId;
$td['created_on'] = date('Y-m-d');
$td['created_by'] = $_SESSION['admin_name'];
$td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
$td['status'] = 1;
// echo '<pre>';
// print_r($td);
$this->db->insert('tbl_voucherdetails', $td);
}
}
function removeVoucherEntry($userId, $course_fee)
{
$coondition_data = array(
'student_id' => $userId,
'course_fee_id' => $course_fee['id'],
'batch_id' => $course_fee['batch_id']
);
$this->db->where($coondition_data);
$this->db->delete('tbl_voucherdetails');
}
}

View File

@ -0,0 +1,585 @@
<?php
class Accounting
{
private $ci;
private $db;
public function __construct()
{
$this->ci = &get_instance();
$this->db = $this->ci->load->database('accounting', TRUE);
$t = "select * from admin_menu where parent_id=22 and page_link='account/defaults'";
$r = $this->ci->db->query($t);
if ($r->num_rows() == 0) {
$t = "INSERT INTO `admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `is_active`, `page_link`, `created_on`) VALUES (NULL, 'Accounting Settings', '22', '6', ' ', ' ', 'yes', 'account/defaults', '" . date("y-m-d h:i:s") . "');";
$q = $this->ci->db->query($t);
}
$this->init();
}
function pre($Obj)
{
echo "<pre>";
print_r($Obj);
echo "</pre>";
}
function init()
{
$tbl_acgroups = "CREATE TABLE IF NOT EXISTS `tbl_acgroups` (
`acgroup_id` INT(11) NOT NULL,
`acgroup_code` VARCHAR(250) NOT NULL,
`acgroup_name` VARCHAR(250) NOT NULL,
`posting_side` VARCHAR(20) NOT NULL,
`created_on` DATE NOT NULL,
`created_by` VARCHAR(250) NOT NULL,
`remarks` TEXT NOT NULL,
`status` INT(11) NOT NULL,
`display_order` INT(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($tbl_acgroups);
// $columnExists = $this->db->table_exists('tbl_vouchertypes') ? in_array('default_credits', $this->db->list_fields('tbl_vouchertypes')) : false;
// if($columnExists)$this->db->add_column('tbl_vouchertypes', array('default_credits' => array('type' => 'VARCHAR', 'constraint' => 255)));
// $columnExists = $this->db->table_exists('tbl_vouchertypes') ? in_array('default_debits', $this->db->list_fields('tbl_vouchertypes')) : false;
// if($columnExists)$this->db->add_column('tbl_vouchertypes', array('default_debits' => array('type' => 'VARCHAR', 'constraint' => 255)));
}
function showFeeTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateFeeTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'fee_types', '$feetype_id')");
}
}
function fetchMappedAccount($model, $bbpk)
{
$q = $this->db->query("SELECT * FROM tbl_accounts WHERE account_id=(SELECT account_id FROM tbl_accmaping WHERE bbmodel='$model' AND bbpk='$bbpk')");
if ($q->num_rows() > 0) {
return $q->row()->account_name;
} else {
return null;
}
}
function showExpenseTypeMappingOption($default = "")
{
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
// $Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 3 AND tbl_accounts.status<>1)")->result();
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accategories.acgroup_id = 4)")->result();
// $Accategoreies = $this->db->query("select ac.* from tbl_accategories ac JOIN tbl_accounts acc ON acc.accategory_id = ac.accategory_id WHERE ac.acgroup_id = 3")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
// echo '<pre>';
// print_r($Accategoreies);
// die();
?>
<div class="form-group mt-4 mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if ($default != "" && $default == $Account->account_name) : ?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateExpenseTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='expense_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'expense_types', '$feetype_id')");
}
}
function userCreateAcc($userId, $userType, $username, $createdOn)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->result();
print_r($userAcc);
if (empty($userAcc)) {
if ($userType == 'student') {
$accategory_id = 64;
} else {
$accategory_id = 65;
}
$td['account_code'] = $userId;
$td['account_name'] = $username;
$td['accategory_id'] = $accategory_id;
$td['created_on'] = $createdOn;
$td['created_by'] = 'Admin';
$td['status'] = 1;
// dd($td);
$insert = $this->db->insert('tbl_accounts', $td);
if ($insert) {
return 'success';
} else {
return 'error';
}
} else {
return 'already_existed';
}
// return $userId . ' = ' . $userType;
}
function fetchAccountInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_accounts where account_code = '$userId'")->row_array();
return $userAcc;
}
function createVoucherId($userId, $course_fee_id, $userType, $vType)
{
$userAcc = $this->db->query("select * from tbl_vouchers where user_id = $userId AND course_fee_id = $course_fee_id AND voucher_state = 'Entered'")->row_array();
$voucher = $this->db->query("select * from tbl_vouchers WHERE voucher_type = '$vType'")->result();
$voucher_type = $this->db->query("select * from tbl_vouchers WHERE voucher_type = '$vType'")->result();
$voucherType = $this->db->query("select * from tbl_vouchertypes WHERE voucher_type = '$vType'")->row_array();
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
if (empty($userAcc)) {
$td['voucher_no'] = count($voucher) + 1;
$td['voucher_ref'] = $voucherType['voucher_alias'] . '' . (count($voucher_type) + 1);
$td['voucher_date'] = date('Y-m-d');
$td['voucher_state'] = 'Entered';
$td['voucher_type'] = $vType;
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['branch_id'] = $branches['branch_id'];
$td['user_id'] = $userId;
$td['course_fee_id'] = $course_fee_id;
$td['reference_type'] = $userType;
$td['created_by'] = $_SESSION['admin_name'];
$td['created_on'] = date('Y-m-d H:m:s');
$td['remarks'] = '';
$td['status'] = 1;
$insert = $this->db->insert('tbl_vouchers', $td);
if ($insert) {
return $this->db->insert_id();
} else {
return 0;
}
} else {
return $userAcc['voucher_id'];
}
}
function fetchVoucherInfo($userId)
{
$userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->row_array();
return $userAcc;
}
// function voucherEntry($userId, $theUserId, $course_fee, $scholarship)
// {
// $userAcc = $this->db->query("select * from tbl_vouchers where reference_id = $userId")->result();
// if (!empty($userAcc)) {
// $voucher = $this->db->query("select * from tbl_vouchers WHERE reference_id = $userId AND reference_type = 'student'")->row_array();
// $fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
// $branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
// $entry = !empty($scholarship) ? 3 : 2;
// $fee_amt = $course_fee['amount'];
// $dr = 0;
// $cr = 0;
// for ($i = 0; $i < $entry; $i++) {
// if ($entry == 3) {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else if ($i == 1) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $cr = $scholarship_amt;
// $dr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $dr = 0;
// $cr = $fee_amt - $scholarship_amt;
// }
// } else {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $cr = $fee_amt;
// $dr = 0;
// }
// }
// $td['voucher_id'] = $voucher['voucher_id'];
// $td['entry_no'] = $i + 1;
// $td['transaction_date'] = date('Y-m-d');
// $td['account_id'] = $account['account_id'];
// $td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
// $td['dr'] = $dr;
// $td['cr'] = $cr;
// $td['branch_id'] = $branches['branch_id'];
// $td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
// $td['batch_id'] = $course_fee['batch_id'];
// $td['course_id'] = $course_fee['course_id'];
// $td['course_fee_id'] = $course_fee['id'];
// $td['student_id'] = $userId;
// $td['created_on'] = date('Y-m-d');
// $td['created_by'] = $_SESSION['admin_name'];
// $td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
// $td['status'] = 1;
// // echo '<pre>';
// // print_r($td);
// $this->db->insert('tbl_voucherdetails', $td);
// }
// } else {
// $voucher = $this->db->query("select * from tbl_vouchers WHERE reference_id = $userId AND reference_type = 'student'")->row_array();
// $this->db->select_max('voucher_id');
// $query = $this->db->get('tbl_vouchers');
// $res = $query->row_array();
// $vid = $res['id'] + 1;
// $fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
// $branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
// $entry = !empty($scholarship) ? 3 : 2;
// $fee_amt = $course_fee['amount'];
// $dr = 0;
// $cr = 0;
// for (
// $i = 0;
// $i < $entry;
// $i++
// ) {
// if ($entry == 3) {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else if ($i == 1) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $cr = $scholarship_amt;
// $dr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
// $dr = 0;
// $cr = $fee_amt - $scholarship_amt;
// }
// } else {
// if ($i == 0) {
// $account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
// $dr = $fee_amt;
// $cr = 0;
// } else {
// $account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
// $cr = $fee_amt;
// $dr = 0;
// }
// }
// $td['voucher_id'] = $vid;
// $td['entry_no'] = $i + 1;
// $td['transaction_date'] = date('Y-m-d');
// $td['account_id'] = $account['account_id'];
// $td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
// $td['dr'] = $dr;
// $td['cr'] = $cr;
// $td['branch_id'] = $branches['branch_id'];
// $td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
// $td['batch_id'] = $course_fee['batch_id'];
// $td['course_id'] = $course_fee['course_id'];
// $td['course_fee_id'] = $course_fee['id'];
// $td['student_id'] = $userId;
// $td['created_on'] = date('Y-m-d');
// $td['created_by'] = $_SESSION['admin_name'];
// $td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
// $td['status'] = 1;
// // echo '<pre>';
// $this->db->insert('tbl_voucherdetails', $td);
// // dd($td);
// }
// }
// // return $userId . ' = ' . $userType;
// }
function voucherEntry($userId, $theUserId, $course_fee, $scholarship, $voucher_type, $paidAmount = 0)
{
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$entry = !empty($scholarship) ? 3 : 2;
$fee_amt = $course_fee['amount'];
$dr = 0;
$cr = 0;
for ($i = 0; $i < $entry; $i++) {
if ($entry == 3) {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$cr = $fee_amt;
$dr = 0;
} else if ($i == 1) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = 'Scholarship' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$dr = $scholarship_amt;
$cr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$scholarship_amt = round(($scholarship['scholarship_discount'] / 100) * $fee_amt);
$cr = 0;
$dr = $fee_amt - $scholarship_amt;
}
} else {
if ($i == 0) {
$account = $this->db->query("select * from tbl_accounts WHERE account_name = '" . $course_fee['feetype_name'] . "' AND status = 1")->row_array();
$cr = $fee_amt;
$dr = 0;
} else {
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId' AND status = 1")->row_array();
$dr = $fee_amt;
$cr = 0;
}
}
$voucherId = $this->createVoucherId($userId, $course_fee['id'], "student", $voucher_type);
$td['voucher_id'] = $voucherId;
$td['entry_no'] = $i + 1;
$td['transaction_date'] = date('Y-m-d');
$td['account_id'] = $account['account_id'];
$td['narration'] = $course_fee['fee_values'] . ' ( ' . $course_fee['feetype_name'] . ' )';
$td['dr'] = $dr;
$td['cr'] = $cr;
$td['branch_id'] = $branches['branch_id'];
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['batch_id'] = $course_fee['batch_id'];
$td['course_id'] = $course_fee['course_id'];
$td['course_fee_id'] = $course_fee['id'];
$td['student_id'] = $userId;
$td['created_on'] = date('Y-m-d');
$td['created_by'] = $_SESSION['admin_name'];
$td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
$td['status'] = 1;
$this->db->insert('tbl_voucherdetails', $td);
}
}
function receiptVoucherEntry($userId, $theUserId, $batch_id, $course_id, $paidAmount = 0)
{
$fiscalyear = $this->db->query("select * from tbl_fiscalyear WHERE status = 1")->row_array();
$branches = $this->db->query("select * from tbl_branches WHERE status = 1")->row_array();
$voucher = $this->db->query("select * from tbl_vouchers WHERE voucher_type = 'Receipt' ORDER BY voucher_no DESC")->row_array();
$voucherType = $this->db->query("select * from tbl_vouchertypes WHERE voucher_type = 'Receipt'")->row_array();
$account = $this->db->query("select * from tbl_accounts WHERE account_code = '$theUserId'")->row_array();
$cash_account = $this->db->query("select * from tbl_accounts WHERE account_id = 2")->row_array();
$voucher_no = !empty($voucher) ? $voucher["voucher_no"] + 1 : 1;
$td['voucher_no'] = $voucher_no;
$td['voucher_ref'] = $voucherType['voucher_alias'] . '' . $voucher_no;
$td['voucher_date'] = date('Y-m-d');
$td['voucher_state'] = 'Entered';
$td['voucher_type'] = 'Receipt';
$td['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$td['branch_id'] = $branches['branch_id'];
$td['user_id'] = $userId;
$td['course_fee_id'] = 0;
$td['reference_type'] = "student";
$td['created_by'] = $_SESSION['admin_name'];
$td['created_on'] = date('Y-m-d H:m:s');
$td['remarks'] = '';
$td['status'] = 1;
$this->db->insert('tbl_vouchers', $td);
$vId = $this->db->insert_id();
$vtd['voucher_id'] = $vId;
$vtd['entry_no'] = 1;
$vtd['transaction_date'] = date('Y-m-d');
$vtd['account_id'] = $account['account_id'];
$vtd['narration'] = "Being cash received from $theUserId";
$vtd['dr'] = 0;
$vtd['cr'] = $paidAmount;
$vtd['branch_id'] = $branches['branch_id'];
$vtd['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$vtd['batch_id'] = $batch_id;
$vtd['course_id'] = $course_id;
$vtd['course_fee_id'] = 0;
$vtd['student_id'] = $userId;
$vtd['created_on'] = date('Y-m-d');
$vtd['created_by'] = $_SESSION['admin_name'];
$vtd['remarks'] = '';
$vtd['status'] = 1;
$this->db->insert('tbl_voucherdetails', $vtd);
$ctd['voucher_id'] = $vId;
$ctd['entry_no'] = 2;
$ctd['transaction_date'] = date('Y-m-d');
$ctd['account_id'] = $cash_account['account_id'];
$ctd['narration'] = "Being cash received from $theUserId";
$ctd['dr'] = $paidAmount;
$ctd['cr'] = 0;
$ctd['branch_id'] = $branches['branch_id'];
$ctd['fiscalyear_id'] = $fiscalyear['fiscalyear_id'];
$ctd['batch_id'] = $batch_id;
$ctd['course_id'] = $course_id;
$ctd['course_fee_id'] = 0;
$ctd['student_id'] = $userId;
$ctd['created_on'] = date('Y-m-d');
$ctd['created_by'] = $_SESSION['admin_name'];
$ctd['remarks'] = '';
$ctd['status'] = 1;
$this->db->insert('tbl_voucherdetails', $ctd);
}
function removeVoucherEntry($userId, $course_fee)
{
$coondition_data = array(
'student_id' => $userId,
'course_fee_id' => $course_fee['id'],
'batch_id' => $course_fee['batch_id']
);
$this->db->where($coondition_data);
$this->db->delete('tbl_voucherdetails');
}
function reversalVoucherEntry($userId, $course_fee)
{
$voucher = $this->db->query("select * from tbl_vouchers where user_id = $userId AND course_fee_id = " . $course_fee['id'] . " AND voucher_state = 'Entered'")->row_array();
if (!empty($voucher)) {
$voucher_details = $this->db->query('select * from tbl_voucherdetails where voucher_id = ' . $voucher['voucher_id'])->result_array();
$voucherId = $this->createVoucherId($userId, $course_fee['id'], "student", 'Journal');
foreach ($voucher_details as $v_key => $voucher_info) {
$td['voucher_id'] = $voucherId;
$td['entry_no'] = count($voucher_details) + ($v_key + 1);
$td['transaction_date'] = date('Y-m-d');
$td['account_id'] = $voucher_info['account_id'];
$td['narration'] = 'Reversal of Voucher #' . $voucher['voucher_no'];
$td['dr'] = $voucher_info['cr'];
$td['cr'] = $voucher_info['dr'];
$td['branch_id'] = $voucher_info['branch_id'];
$td['fiscalyear_id'] = $voucher_info['fiscalyear_id'];
$td['batch_id'] = $voucher_info['batch_id'];
$td['course_id'] = $voucher_info['course_id'];
$td['course_fee_id'] = $voucher_info['course_fee_id'];
$td['student_id'] = $voucher_info['student_id'];
$td['created_on'] = date('Y-m-d');
$td['created_by'] = $_SESSION['admin_name'];
$td['remarks'] = !empty($scholarship) ? $scholarship['scholarship_discount'] . ' % scholarship on ' . $course_fee['feetype_name'] : '';
$td['status'] = 1;
$this->db->insert('tbl_voucherdetails', $td);
// echo '<pre>';
// print_r($td);
}
$utd['voucher_state'] = 'Reversed';
$this->db->where('voucher_id', $voucher['voucher_id']);
$this->db->update('tbl_vouchers', $utd);
}
}
}

View File

@ -0,0 +1,51 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class CSVReader {
var $fields; /** columns names retrieved after parsing */
var $separator = ';'; /** separator used to explode each line */
var $enclosure = '"'; /** enclosure used to decorate each field */
var $max_row_size = 4096; /** maximum row size to be used for decoding */
function parse_file($p_Filepath) {
$file = fopen($p_Filepath, 'r');
$this->fields = fgetcsv($file, $this->max_row_size, $this->separator, $this->enclosure);
$keys_values = explode(',',$this->fields[0]);
$content = array();
$keys = $this->escape_string($keys_values);
$i = 1;
while( ($row = fgetcsv($file, $this->max_row_size, $this->separator, $this->enclosure)) != false ) {
if( $row != null ) { // skip empty lines
$values = explode(',',$row[0]);
if(count($keys) == count($values)){
$arr = array();
$new_values = array();
$new_values = $this->escape_string($values);
for($j=0;$j<count($keys);$j++){
if($keys[$j] != ""){
$arr[$keys[$j]] = $new_values[$j];
}
}
$content[$i]= $arr;
$i++;
}
}
}
fclose($file);
return $content;
}
function escape_string($data){
$result = array();
foreach($data as $row){
$result[] = str_replace('"', '',$row);
}
return $result;
}
}
?>

View File

@ -0,0 +1,103 @@
<?php
/**
* PHP QR Code porting for Codeigniter
*
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @porting author dwi.setiyadi@gmail.com
* @original author http://phpqrcode.sourceforge.net/
*
* @version 1.0
*/
class Ciqrcode
{
var $cacheable = true;
var $cachedir = 'application/cache/';
var $errorlog = 'application/logs/';
var $quality = true;
var $size = 1024;
function __construct($config = array()) {
include APPPATH. "/third_party/qrcode/qrconst.php";
include APPPATH. "/third_party/qrcode/qrtools.php";
include APPPATH. "/third_party/qrcode/qrspec.php";
include APPPATH. "/third_party/qrcode/qrimage.php";
include APPPATH. "/third_party/qrcode/qrinput.php";
include APPPATH. "/third_party/qrcode/qrbitstream.php";
include APPPATH. "/third_party/qrcode/qrsplit.php";
include APPPATH. "/third_party/qrcode/qrrscode.php";
include APPPATH. "/third_party/qrcode/qrmask.php";
include APPPATH. "/third_party/qrcode/qrencode.php";
$this->initialize($config);
}
public function initialize($config = array()) {
$this->cacheable = (isset($config['cacheable'])) ? $config['cacheable'] : $this->cacheable;
$this->cachedir = (isset($config['cachedir'])) ? $config['cachedir'] : FCPATH.$this->cachedir;
$this->errorlog = (isset($config['errorlog'])) ? $config['errorlog'] : FCPATH.$this->errorlog;
$this->quality = (isset($config['quality'])) ? $config['quality'] : $this->quality;
$this->size = (isset($config['size'])) ? $config['size'] : $this->size;
// use cache - more disk reads but less CPU power, masks and format templates are stored there
if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', $this->cacheable);
// used when QR_CACHEABLE === true
if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', $this->cachedir);
// default error logs dir
if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', $this->errorlog);
// if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
if ($this->quality) {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true);
} else {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', false);
if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', $this->quality);
}
// if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', false);
// maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', $this->size);
}
public function generate($params = array()) {
if (isset($params['black'])
&& is_array($params['black'])
&& count($params['black']) == 3
&& array_filter($params['black'], 'is_int') === $params['black']) {
QRimage::$black = $params['black'];
}
if (isset($params['white'])
&& is_array($params['white'])
&& count($params['white']) == 3
&& array_filter($params['white'], 'is_int') === $params['white']) {
QRimage::$white = $params['white'];
}
$params['data'] = (isset($params['data'])) ? $params['data'] : 'QR Code Library';
if (isset($params['savename'])) {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], $params['savename'], $level, $size, 2);
return $params['savename'];
} else {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], NULL, $level, $size, 2);
}
}
}

View File

@ -0,0 +1,218 @@
<?php
require_once APPPATH . '/third_party/mpdf/vendor/autoload.php';
if (!defined('BASEPATH')) exit('No direct script access allowed');
class M_pdf
{
function m_pdf()
{
$CI = &get_instance();
}
function loadforStudentIdCard()
{
// ['mode' => 'utf-8', 'format' => [56, 86]]
$mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8', 'format' => [58, 86], 'margin_left' => 0,
'margin_right' => 0,
'margin_top' => 0,
'margin_bottom' => 0
]);
return $mpdf;
}
function loadforStudentAdmitCard()
{
// ['mode' => 'utf-8', 'format' => [56, 86]]
$mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8', 'format' => [100, 60],
'margin_left' => 2,
'margin_right' => 2,
'margin_top' => 0,
'margin_bottom' => 0
]);
return $mpdf;
}
function load()
{
$mpdf = new \Mpdf\Mpdf();
return $mpdf;
}
function loadforinvoice()
{
$defaultConfig = (new \Mpdf\Config\ConfigVariables())->getDefaults();
$fontDirs = $defaultConfig['fontDir'];
$defaultFontConfig = (new \Mpdf\Config\FontVariables())->getDefaults();
$fontData = $defaultFontConfig['fontdata'];
$mpdf = new \Mpdf\Mpdf([
'mode' => '',
'format' => 'A4',
'default_font_size' => 0,
'default_font' => '',
'margin_left' => 5,
'margin_right' => 5,
'margin_top' => 5,
'margin_bottom' => 5,
'margin_header' => 0,
'margin_footer' => 0,
'orientation' => 'L',
'tempDir' => __DIR__ . '/upload',
'fontDir' => array_merge($fontDirs, [
__DIR__ . '/fonts'
]),
'fontdata' => $fontData + [
'bentonsans' => [
'R' => "Times New Roman Font.ttf",
],
],
// 'default_font' => 'bentonsans'
]);
return $mpdf;
}
function loadformarkscard()
{
$mpdf = new \Mpdf\Mpdf([
'mode' => '',
'format' => 'A4',
'default_font_size' => 0,
'default_font' => '',
'margin_left' => 3,
'margin_right' => 3,
'margin_top' => 3,
'margin_bottom' => 3,
'margin_header' => 0,
'margin_footer' => 0,
'orientation' => 'P',
// 'default_font' => 'dejavusans'
]);
// $mpdf->SetWatermarkText('DRAFT');
// $mpdf->showWatermarkText = true;
// $mpdf->SetWatermarkImage('https://demo.bbnepal.com/common_assets/watermark-emerald.png', 0.1);
// $mpdf->showWatermarkImage = true;
// $mpdf->watermarkAngle = 0;
return $mpdf;
}
function loadFromCertificate()
{
$mpdf = new \Mpdf\Mpdf([
'mode' => '',
'format' => 'A4',
'default_font_size' => 12,
'default_font' => '',
'margin_left' => 4,
'margin_right' => 4,
'margin_top' => 4,
'margin_bottom' => 4,
'margin_header' => 0,
'margin_footer' => 0,
'orientation' => 'L',
]);
$mpdf->watermarkAngle = 45;
return $mpdf;
}
function loadforStudentQRCode()
{
// ['mode' => 'utf-8', 'format' => [56, 86]]
$mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8', 'format' => [120, 100],
'margin_left' => 4,
'margin_right' => 4,
'margin_top' => 4,
'margin_bottom' => 4
]);
return $mpdf;
}
function loadforAdmissionForm()
{
$mpdf = new \Mpdf\Mpdf([
'mode' => '',
'format' => 'A4',
'default_font_size' => 0,
'default_font' => '',
'margin_left' => 3,
'margin_right' => 3,
'margin_top' => 3,
'margin_bottom' => 3,
'margin_header' => 0,
'margin_footer' => 0,
'orientation' => 'P',
// 'default_font' => 'dejavusans'
]);
// $mpdf->SetWatermarkText('DRAFT');
// $mpdf->showWatermarkText = true;
// $mpdf->SetWatermarkImage('https://demo.bbnepal.com/common_assets/watermark-emerald.png', 0.1);
// $mpdf->showWatermarkImage = true;
// $mpdf->watermarkAngle = 0;
return $mpdf;
}
}

View File

@ -0,0 +1,265 @@
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Code Igniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author Rick Ellis
* @copyright Copyright (c) 2006, pMachine, Inc.
* @license http://www.codeignitor.com/user_guide/license.html
* @link http://www.codeigniter.com
* @since Version 1.0
* @filesource
*/
// ------------------------------------------------------------------------
/**
* PayPal_Lib Controller Class (Paypal IPN Class)
*
* This CI library is based on the Paypal PHP class by Micah Carrick
* See www.micahcarrick.com for the most recent version of this class
* along with any applicable sample files and other documentaion.
*
* This file provides a neat and simple method to interface with paypal and
* The paypal Instant Payment Notification (IPN) interface. This file is
* NOT intended to make the paypal integration "plug 'n' play". It still
* requires the developer (that should be you) to understand the paypal
* process and know the variables you want/need to pass to paypal to
* achieve what you want.
*
* This class handles the submission of an order to paypal as well as the
* processing an Instant Payment Notification.
* This class enables you to mark points and calculate the time difference
* between them. Memory consumption can also be displayed.
*
* The class requires the use of the PayPal_Lib config file.
*
* @package CodeIgniter
* @subpackage Libraries
* @category Commerce
* @author Ran Aroussi <ran@aroussi.com>
* @copyright Copyright (c) 2006, http://aroussi.com/ci/
*
*/
// ------------------------------------------------------------------------
class paypal_lib
{
var $last_error; // holds the last error encountered
var $ipn_log; // bool: log IPN results to text file?
var $ipn_log_file; // filename of the IPN log
var $ipn_response; // holds the IPN response from paypal
var $ipn_data = array(); // array contains the POST values for IPN
var $fields = array(); // array holds the fields to submit to paypal
var $submit_btn = ''; // Image/Form button
var $button_path = ''; // The path of the buttons
var $CI;
function __construct()
{
$this->CI = &get_instance();
$this->CI->load->helper('url');
$this->CI->load->helper('form');
$this->CI->load->config('paypallib_config');
$sanbox = $this->CI->config->item('sandbox');
$this->paypal_url = ($sanbox == TRUE) ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
$this->last_error = '';
$this->ipn_response = '';
$this->ipn_log_file = $this->CI->config->item('paypal_lib_ipn_log_file');
$this->ipn_log = $this->CI->config->item('paypal_lib_ipn_log');
$this->button_path = $this->CI->config->item('paypal_lib_button_path');
// populate $fields array with a few default values. See the paypal
// documentation for a list of fields and their data types. These defaul
// values can be overwritten by the calling script.
$businessEmail = $this->CI->config->item('business');
$this->add_field('business', $businessEmail);
$this->add_field('rm', '2'); // Return method = POST
$this->add_field('cmd', '_xclick');
$this->add_field('currency_code', $this->CI->config->item('paypal_lib_currency_code'));
$this->add_field('quantity', '1');
$this->button('Pay Now!');
}
function button($value)
{
// changes the default caption of the submit button
$this->submit_btn = form_submit('pp_submit', $value);
}
function image($file)
{
$this->submit_btn = '<input type="image" name="add" src="' . site_url($this->button_path . '/' . $file) . '" border="0" />';
}
function add_field($field, $value)
{
// adds a key=>value pair to the fields array, which is what will be
// sent to paypal as POST variables. If the value is already in the
// array, it will be overwritten.
$this->fields[$field] = $value;
}
function paypal_auto_form()
{
// this function actually generates an entire HTML page consisting of
// a form with hidden elements which is submitted to paypal via the
// BODY element's onLoad attribute. We do this so that you can validate
// any POST vars from you custom form before submitting to paypal. So
// basically, you'll have your own form which is submitted to your script
// to validate the data, which in turn calls this function to create
// another hidden form and submit to paypal.
$this->button('Click here if you\'re not automatically redirected...');
echo '<html>' . "\n";
echo '<head><title>Processing Payment...</title></head>' . "\n";
echo '<body style="text-align:center;" onLoad="document.forms[\'paypal_auto_form\'].submit();">' . "\n";
echo '<p style="text-align:center;">Please wait, your order is being processed and you will be redirected to the paypal website.</p>' . "\n";
echo $this->paypal_form('paypal_auto_form');
echo '</body></html>';
}
function paypal_form($form_name = 'paypal_form')
{
$str = '';
$str .= '<form method="post" action="' . $this->paypal_url . '" name="' . $form_name . '"/>' . "\n";
// echo "<pre>";
// print_r($this->fields);
// die();
foreach ($this->fields as $name => $value)
$str .= form_hidden($name, $value) . "\n";
$str .= '<p>' . $this->submit_btn . '</p>';
$str .= form_close() . "\n";
return $str;
}
function validate_ipn()
{
// parse the paypal URL
$url_parsed = parse_url($this->paypal_url);
// generate the post string from the _POST vars aswell as load the
// _POST vars into an arry so we can play with them from the calling
// script.
$post_string = '';
if ($this->CI->input->post()) {
foreach ($this->CI->input->post() as $field => $value) {
$this->ipn_data[$field] = $value;
$post_string .= $field . '=' . urlencode(stripslashes($value)) . '&';
}
}
$post_string .= "cmd=_notify-validate"; // append ipn command
// open the connection to paypal
$fp = fsockopen($url_parsed['host'], "80", $err_num, $err_str, 30);
if (!$fp) {
// could not open the connection. If loggin is on, the error message
// will be in the log.
$this->last_error = "fsockopen error no. $errnum: $errstr";
$this->log_ipn_results(false);
return false;
} else {
// Post the data back to paypal
fputs($fp, "POST $url_parsed[path] HTTP/1.1\r\n");
fputs($fp, "Host: $url_parsed[host]\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: " . strlen($post_string) . "\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $post_string . "\r\n\r\n");
// loop through the response from the server and append to variable
while (!feof($fp))
$this->ipn_response .= fgets($fp, 1024);
fclose($fp); // close connection
}
if (preg_match("/VERIFIED/", $this->ipn_response)) {
// Valid IPN transaction.
$this->log_ipn_results(true);
return true;
} else {
// Invalid IPN transaction. Check the log for details.
$this->last_error = 'IPN Validation Failed.';
$this->log_ipn_results(false);
return false;
}
}
function log_ipn_results($success)
{
if (!$this->ipn_log) return; // is logging turned off?
// Timestamp
$text = '[' . date('m/d/Y g:i A') . '] - ';
// Success or failure being logged?
if ($success) $text .= "SUCCESS!\n";
else $text .= 'FAIL: ' . $this->last_error . "\n";
// Log the POST variables
$text .= "IPN POST Vars from Paypal:\n";
foreach ($this->ipn_data as $key => $value)
$text .= "$key=$value, ";
// Log the response from the paypal server
$text .= "\nIPN Response from Paypal Server:\n " . $this->ipn_response;
// Write to log
$fp = fopen($this->ipn_log_file, 'a');
fwrite($fp, $text . "\n\n");
fclose($fp); // close file
}
function dump()
{
// Used for debugging, this function will output all the field/value pairs
// that are currently defined in the instance of the class using the
// add_field() function.
ksort($this->fields);
echo '<h2>ppal->dump() Output:</h2>' . "\n";
echo '<code style="font: 12px Monaco, \'Courier New\', Verdana, Sans-serif; background: #f9f9f9; border: 1px solid #D0D0D0; color: #002166; display: block; margin: 14px 0; padding: 12px 10px;">' . "\n";
foreach ($this->fields as $key => $value) echo '<strong>' . $key . '</strong>: ' . urldecode($value) . '<br/>';
echo "</code>\n";
}
function curlPost($paypalurl, $paypalreturnarr)
{
$req = 'cmd=_notify-validate';
foreach ($paypalreturnarr as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
$ipnsiteurl = $paypalurl;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ipnsiteurl);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
}

View File

@ -0,0 +1,98 @@
<?php
class Accounting
{
private $ci;
private $db;
public function __construct()
{
$this->ci = &get_instance();
$this->db = $this->ci->load->database('accounting', TRUE);
$t="select * from admin_menu where parent_id=22 and page_link='account/defaults'";
$r=$this->ci->db->query($t);
if($r->num_rows()==0){
$t="INSERT INTO `admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `is_active`, `page_link`, `created_on`) VALUES (NULL, 'Accounting Settings', '22', '6', ' ', ' ', 'yes', 'account/defaults', '".date("y-m-d h:i:s")."');";
$q=$this->ci->db->query($t);
}
// $this->init();
}
function pre($Obj)
{
echo "<pre>";
print_r($Obj);
echo "</pre>";
}
function init()
{
$tbl_acgroups = "CREATE TABLE IF NOT EXISTS `tbl_acgroups` (
`acgroup_id` INT(11) NOT NULL,
`acgroup_code` VARCHAR(250) NOT NULL,
`acgroup_name` VARCHAR(250) NOT NULL,
`posting_side` VARCHAR(20) NOT NULL,
`created_on` DATE NOT NULL,
`created_by` VARCHAR(250) NOT NULL,
`remarks` TEXT NOT NULL,
`status` INT(11) NOT NULL,
`display_order` INT(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
}
function showFeeTypeMappingOption($default="")
{
$Accategoreies = $this->db->query("select * from tbl_accategories where accategory_id in (select accategory_id from tbl_accounts where tbl_accounts.status<>1)")->result();
foreach ($Accategoreies as $AccountCategory) {
$AccountCategory->Accounts = $this->db->query("select * from tbl_accounts where accategory_id='$AccountCategory->accategory_id'")->result();
}
?>
<div class="form-group mb-0">
<label class="has-float-label">
<select class="form-control" name="account_id" id="account_id_selector" required>
<option value="">Select Default Account</option>
<?php foreach ($Accategoreies as $AccountCategory) : ?>
<optgroup label="<?php echo $AccountCategory->accategory_name; ?>">
<?php foreach ($AccountCategory->Accounts as $Account) : ?>
<option value="<?php echo $Account->account_id; ?>" <?php if($default!="" && $default==$Account->account_name):?>SELECTED<?php endif; ?>><?php echo $Account->account_name; ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
<span>Select Default Account</span>
</label>
</div>
<?php
}
function updateFeeTypeAccountMapping($feetype_id, $account_id)
{
$t = "CREATE TABLE IF NOT EXISTS `tbl_accmaping` (
`accmaping_id` int(11) NOT NULL,
`bbmodel` varchar(35) NOT NULL,
`bbpk` int(11) NOT NULL,
`account_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
";
$this->db->query($t);
$q = $this->db->query("SELECT * FROM tbl_accmaping WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
if ($q->num_rows() > 0) {
$q = $this->db->query("UPDATE tbl_accmaping SET account_id='$account_id' WHERE bbmodel='fee_types' AND bbpk='$feetype_id'");
} else {
$q = $this->db->query("INSERT INTO tbl_accmaping (account_id, bbmodel, bbpk) VALUES ('$account_id', 'fee_types', '$feetype_id')");
}
}
function fetchMappedAccount($model, $bbpk)
{
$q = $this->db->query("SELECT * FROM tbl_accounts WHERE account_id=(SELECT account_id FROM tbl_accmaping WHERE bbmodel='$model' AND bbpk='$bbpk')");
if ($q->num_rows() > 0) {
return $q->row()->account_name;
} else {
return null;
}
}
}

View File

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

Binary file not shown.

View File

@ -0,0 +1,18 @@
/W [ 32 [ 250 333 408 500 500 833 778 180 333 333 ]
42 [ 500 564 250 333 250 278 500 500 500 500 500 500 500 500 500 500 ]
58 59 278 60 62 564 63 [ 444 921 722 667 667 ]
68 [ 722 611 556 722 722 ]
73 [ 333 389 722 611 889 722 722 556 722 667 556 611 722 722 944 722 722 611 333 278 333 469 500 333 444 500 444 500 444 333 500 500 278 278 ]
107 [ 500 278 778 500 500 500 500 ]
114 [ 333 389 278 500 500 722 500 500 444 480 200 480 541 ]
160 [ 250 333 ]
162 165 500 166 [ 200 500 333 760 276 500 564 333 760 500 400 549 300 300 ]
180 [ 333 576 453 333 333 ]
185 [ 300 310 500 ]
188 190 750 191 191 444 192 197 722 198 [ 889 667 ]
200 203 611 204 207 333 208 214 722 215 215 564 216 221 722 222 [ 556 500 ]
224 229 444 230 230 667 231 235 444 236 239 278 240 246 500 247 247 549 248 255 500 338 [ 889 722 ]
352 [ 556 389 ]
376 376 722 402 402 500 710 710 333 732 732 333 8211 [ 500 1000 ]
8216 8218 333 8220 8222 444 8224 [ 500 500 350 ]
8230 8230 1000 8240 8240 1000 8249 8250 333 8482 8482 980 8729 8729 250 ]

View File

@ -0,0 +1 @@
{"name":"TimesNewRomanPSMT","type":"TTF","desc":{"CapHeight":662,"XHeight":447,"FontBBox":"[-77 -216 1009 877]","Flags":4,"Ascent":877,"Descent":-216,"Leading":0,"ItalicAngle":0,"StemV":87,"MissingWidth":778},"unitsPerEm":2048,"up":-109,"ut":49,"strp":259,"strs":50,"ttffile":"C:\\xampp\\htdocs\\bbnepal-rnd\\application\\third_party\\mpdf\\vendor\\mpdf\\mpdf\\src\\Config\/..\/..\/ttfonts\/Times New Roman Font.ttf","TTCfontID":0,"originalsize":85240,"sip":false,"smp":false,"BMPselected":false,"fontkey":"bentonsans","panose":" 1 5 2 2 6 3 5 4 5 2 3 4","haskerninfo":true,"haskernGPOS":false,"hassmallcapsGSUB":false,"fontmetrics":"win","useOTL":0,"rtlPUAstr":"","GSUBScriptLang":[],"GSUBFeatures":[],"GSUBLookups":[],"GPOSScriptLang":[],"GPOSFeatures":[],"GPOSLookups":[],"kerninfo":{"49":{"49":-37},"65":{"84":-110,"86":-128,"87":-80,"89":-91,"118":-74,"119":-91,"121":-91,"8217":-110},"70":{"44":-80,"46":-80,"65":-74},"76":{"84":-91,"86":-91,"87":-74,"89":-100,"121":-55,"8217":-91},"80":{"44":-110,"46":-110,"65":-91},"82":{"84":-60,"86":-80,"87":-55,"89":-55,"121":-40},"84":{"44":-74,"46":-74,"58":-49,"59":-55,"65":-80,"79":-18,"97":-69,"99":-69,"101":-69,"105":-35,"111":-69,"114":-35,"115":-69,"117":-35,"119":-69,"121":-69},"86":{"44":-128,"46":-128,"58":-74,"59":-74,"65":-128,"97":-110,"101":-110,"105":-60,"111":-128,"114":-60,"117":-60,"121":-110},"87":{"44":-91,"46":-91,"58":-37,"59":-37,"65":-110,"97":-80,"101":-80,"105":-40,"111":-80,"114":-40,"117":-40,"121":-60},"89":{"44":-128,"46":-128,"58":-91,"59":-91,"65":-110,"97":-100,"101":-100,"105":-55,"111":-100,"112":-91,"113":-110,"117":-110,"118":-100},"102":{"102":-18,"8217":55},"114":{"44":-40,"46":-55,"103":-18,"8217":37},"118":{"44":-64,"46":-64},"119":{"44":-64,"46":-64},"121":{"44":-64,"46":-64},"8216":{"8216":-74},"8217":{"115":-55,"116":-18,"8217":-74}}}

Binary file not shown.

View File

@ -0,0 +1,653 @@
2023-01-16 12:28:16:
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: strlen() expects parameter 1 to be string, array given</p>
<p>Filename: qrcode/qrsplit.php</p>
<p>Line Number: 250</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrsplit.php<br />
Line: 250<br />
Function: _error_handler </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrsplit.php<br />
Line: 309<br />
Function: splitString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 274<br />
Function: splitStringToQRinput </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 467<br />
Function: encodeString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 485<br />
Function: encode </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 286<br />
Function: encodePNG </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\libraries\Ciqrcode.php<br />
Line: 91<br />
Function: png </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\controllers\Admin.php<br />
Line: 6383<br />
Function: generate </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\index.php<br />
Line: 316<br />
Function: require_once </p>
</div>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: qrcode/qrinput.php</p>
<p>Line Number: 522</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 522<br />
Function: _error_handler </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 536<br />
Function: estimateBitStreamSize </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 609<br />
Function: estimateVersion </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 682<br />
Function: convertData </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 702<br />
Function: mergeBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 719<br />
Function: getBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 63<br />
Function: getByteStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 172<br />
Function: __construct </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 240<br />
Function: encodeMask </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 279<br />
Function: encodeInput </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 467<br />
Function: encodeString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 485<br />
Function: encode </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 286<br />
Function: encodePNG </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\libraries\Ciqrcode.php<br />
Line: 91<br />
Function: png </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\controllers\Admin.php<br />
Line: 6383<br />
Function: generate </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\index.php<br />
Line: 316<br />
Function: require_once </p>
</div>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: qrcode/qrinput.php</p>
<p>Line Number: 522</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 522<br />
Function: _error_handler </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 536<br />
Function: estimateBitStreamSize </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 609<br />
Function: estimateVersion </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 682<br />
Function: convertData </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 702<br />
Function: mergeBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 719<br />
Function: getBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 63<br />
Function: getByteStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 172<br />
Function: __construct </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 240<br />
Function: encodeMask </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 279<br />
Function: encodeInput </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 467<br />
Function: encodeString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 485<br />
Function: encode </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 286<br />
Function: encodePNG </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\libraries\Ciqrcode.php<br />
Line: 91<br />
Function: png </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\controllers\Admin.php<br />
Line: 6383<br />
Function: generate </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\index.php<br />
Line: 316<br />
Function: require_once </p>
</div>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: qrcode/qrinput.php</p>
<p>Line Number: 594</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 594<br />
Function: _error_handler </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 615<br />
Function: createBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 682<br />
Function: convertData </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 702<br />
Function: mergeBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 719<br />
Function: getBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 63<br />
Function: getByteStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 172<br />
Function: __construct </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 240<br />
Function: encodeMask </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 279<br />
Function: encodeInput </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 467<br />
Function: encodeString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 485<br />
Function: encode </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 286<br />
Function: encodePNG </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\libraries\Ciqrcode.php<br />
Line: 91<br />
Function: png </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\controllers\Admin.php<br />
Line: 6383<br />
Function: generate </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\index.php<br />
Line: 316<br />
Function: require_once </p>
</div>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: Warning</p>
<p>Message: Invalid argument supplied for foreach()</p>
<p>Filename: qrcode/qrinput.php</p>
<p>Line Number: 688</p>
<p>Backtrace:</p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 688<br />
Function: _error_handler </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 702<br />
Function: mergeBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrinput.php<br />
Line: 719<br />
Function: getBitStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 63<br />
Function: getByteStream </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 172<br />
Function: __construct </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 240<br />
Function: encodeMask </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 279<br />
Function: encodeInput </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 467<br />
Function: encodeString </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 485<br />
Function: encode </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\third_party\qrcode\qrencode.php<br />
Line: 286<br />
Function: encodePNG </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\libraries\Ciqrcode.php<br />
Line: 91<br />
Function: png </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\application\controllers\Admin.php<br />
Line: 6383<br />
Function: generate </p>
<p style="margin-left:10px">
File: C:\xampp\htdocs\bbnepal-rnd\index.php<br />
Line: 316<br />
Function: require_once </p>
</div>

View File

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

View File

@ -0,0 +1,92 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Accountant_model extends CI_Model
{
public function __construct()
{
$this->load->database();
}
public function login_accountant($uname, $pwd)
{
$pwd = md5($pwd);
$sql = "SELECT a.* FROM admin a
INNER JOIN admin_roles ar on ar.id = a.admin_role_ids
WHERE (a.email='$uname' AND a.password='$pwd') AND ar.role_name LIKE 'accountant%';";
$sql = $this->db->query($sql);
if ($sql->num_rows() > 0) {
return $sql->row_object();
} else {
return false;
}
}
public function checkEmailExist($email) {
$usernameCheck = "Select * from admin WHERE email = '".$email."'";
$unameCheck = $this->db->query($usernameCheck);
if ($unameCheck->num_rows() == 0) {
return false;
} else {
return true;
}
}
public function get_table_info($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function get_table_info_row($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->row_array();
}
public function update_table($id, $data, $table) {
$this->db->trans_start();
$this->db->where('id', $id);
$this->db->update($table, $data);
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE)
return 0;
return true;
}
public function insert_data($table, $data) {
$this->db->insert($table, $data);
if ($this->db->affected_rows() > 0)
return $insert_id = $this->db->insert_id();
else
return 0;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
use Nilambar\NepaliDate\NepaliDate;
require_once 'vendor/autoload.php';
class Inventory_model extends CI_Model
{
private $nepaliDateObject;
private $nepali_current_date;
public function __construct()
{
$this->load->database();
$this->load->helper('common_helper');
$this->nepaliDateObject = new NepaliDate();
$this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject);
}
public function get_unique_name($field_name, $field_value, $table_name)
{
$sql_query = "select * from " . $table_name . " WHERE " . $field_name . " = '" . $field_value . "'";
$query = $this->db->query($sql_query);
$results = $query->result_array();
if (empty($results)) {
return true;
} else {
return false;
}
}
}

View File

@ -0,0 +1,151 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
use Nilambar\NepaliDate\NepaliDate;
require_once 'vendor/autoload.php';
class Parent_driver_model extends CI_Model
{
public function __construct()
{
$this->load->database();
$this->load->helper('common_helper');
$this->nepaliDateObject = new NepaliDate();
$this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject);
}
public function parentlogin($uname, $pwd)
{
$pwd = md5($pwd);
$sql = $this->db->query("SELECT * FROM students WHERE parent_username='$uname' AND parent_password='$pwd'");
// echo $this->db->last_query($sql);
if ($sql->num_rows() > 0) {
if ($sql->row()->is_active == 'yes') {
return $sql->row_object();
} else {
return false;
}
} else {
return false;
}
}
// to get application fee by shivu -start
public function get_query_result($sqlQry)
{
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function get_query_row($sqlQry)
{
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->row_array();
}
//Driver Login
public function driverlogin($uname, $pwd)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$pwd = md5($pwd);
$sql = $bus_db->query("SELECT * FROM bt_drivers WHERE driver_id='$uname' AND password='$pwd'");
// echo $this->db->last_query($sql);
if ($sql->num_rows() > 0) {
if ($sql->row()) {
return $sql->row_object();
} else {
return false;
}
} else {
return false;
}
}
public function getDriverPickPoint($id)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$sql = $bus_db->query("SELECT pickup_start as start_time, place_name as stat_point, working_id, br.id as route_id FROM bt_drivers bd,bt_routes br, bt_routes_details brd WHERE br.id='$id' and bd.id = br.driver_id and br.id = brd.route_id order by route_order asc limit 1")->row_array();
return $sql;
}
public function getDriverDropPoint($id)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$sql = $bus_db->query("SELECT drop_start as start_time, place_name as stat_point, working_id, br.id as route_id FROM bt_drivers bd,bt_routes br, bt_routes_details brd WHERE br.id='$id' and bd.id = br.driver_id and br.id = brd.route_id order by route_order desc limit 1")->row_array();
return $sql;
}
public function get_query_result_bus_tracking($sqlQry)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
if ($sqlQry != '')
$query = $bus_db->query($sqlQry);
return $query->result_array();
}
public function get_query_row_bus_tracking($sqlQry)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
if ($sqlQry != '')
$query = $bus_db->query($sqlQry);
return $query->row_array();
}
public function get_Count_Student_routes_details($pick_id)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$query = $bus_db->query('select count(id) as student_count from bt_students_bus_route_details where pick_up_id ='.$pick_id);
return $query->row_array();
}
public function get_Count_Student_trip_details($id)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$query = $bus_db->query("select count(bst.id) as student_count from bt_students_trip bst, bt_trips bt where bst.trip_id =$id and bst.trip_id = bt.id");
return $query->row_array();
}
public function getDriverId($id)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$result = $bus_db->query('select id from bt_drivers where driver_id = "'. $id . '"')->row_array();
return $result;
}
public function checkTripCompletion($route_id, $trip_type)
{
$bus_db = $this->load->database('erisnClassroom_bts', TRUE);
$result = $bus_db->query('SELECT bt.*,br.stops FROM bt_trips bt , bt_routes br WHERE bt.route_id = '.$route_id.' AND trip_type="'.$trip_type.'" AND DATE(bt.created) = "'.date('Y-m-d', strtotime($this->nepali_current_date)) .'" AND bt.route_id = br.id group by bt.id order by bt.id DESC');
if ($result->num_rows() > 0) {
$data = $result->row_array();
$count = $bus_db->query('SELECT count(bt.id) as count FROM bt_trips bt , bt_routes br WHERE br.id = '.$route_id.' AND DATE(bt.created) = "'.date('Y-m-d', strtotime($this->nepali_current_date)) .'"')->row_array();
if ($data['stops'] == $count['count']) {
if (strtolower($data['status']) == 'completed')
return 2;
else
return 1;
}
else{
return 1;
}
} else {
return 0;
}
return $result;
}
}

View File

@ -0,0 +1,841 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
use Nilambar\NepaliDate\NepaliDate;
require_once 'vendor/autoload.php';
class Student_model extends CI_Model
{
private $nepaliDateObject;
private $nepali_current_date;
public function __construct()
{
$this->load->database();
$this->load->library('Ciqrcode');
$this->load->helper('common_helper');
date_default_timezone_set("Asia/Kolkata");
$this->nepaliDateObject = new NepaliDate();
$this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject);
}
public function login($uname, $pwd)
{
$pwd = md5($pwd);
$sql = $this->db->query("SELECT * FROM students WHERE studentId='$uname' AND password='$pwd'");
// echo $this->db->last_query($sql);
if ($sql->num_rows() > 0) {
if ($sql->row()->is_active == 'yes') {
return $sql->row_object();
} else {
return false;
}
} else {
return false;
}
}
public function get_studentMenus()
{
$this->db->select('*');
$this->db->from('student_menu');
$this->db->where('is_active', 'yes');
$this->db->order_by('id', 'ASC');
$query = $this->db->get();
return $query->result_array();
}
public function get_courses()
{
$this->db->select('*');
$this->db->from('course');
$this->db->where('is_active', 'yes');
$this->db->order_by('course_name', 'ASC');
$query = $this->db->get();
return $query->result_array();
}
//shankar code
public function get_batch()
{
$this->db->select('*');
$this->db->from('batch');
$this->db->order_by('id', 'DESC');
$query = $this->db->get();
return $query->result_array();
}
//end shankar code
public function add_applicationinfo($data)
{
$inf = $data['sinfo'];
$photo = $data['photo'];
$medical = $data['medical'];
$school = $data['school'];
$exam = $data['exam'];
$this->db->select_max('id');
$query = $this->db->get('applications');
$res = $query->row_array();
$pid = $res['id'] + 1;
// if (strlen($pid) == 1)
// $pid = "000" . $pid;
// else if (strlen($pid) == 2)
// $pid = "00" . $pid;
// else if (strlen($pid) == 3)
// $pid = "0" . $pid;
$school_info = $this->get_logo_from_setting();
$school_prefix = (!empty($school_info['school_prefix_id'])) ? $school_info['school_prefix_id'] : 'BB';
$applicationid = $school_prefix . STUDENT_APPLICATION_PREFIX . date('Y', strtotime($this->nepali_current_date)) . '0' . $pid;
$indata = array(
'name' => $inf['sfname'] . ' ' . $inf['ssname'],
'applicationid' => $applicationid,
'email' => $inf['semail'],
'mobile' => $inf['scontact'],
'password' => md5($inf['spaswd']),
'gender' => $inf['sgender'],
'dob' => $inf['sdob'],
'course' => $inf['scourse'],
'batch_id' => $inf['sbatch'],
'emergency_contact_name' => $inf['lgfullname'],
'emergency_contact_number' => $inf['lgcontact'],
'emergency_contact_address' => $inf['lgaddress'],
'birth_certificate' => $inf['sbirth-certificate'],
'caste' => $inf['scaste'],
'religion' => $inf['sreligion'],
'previous_school' => $inf['sprevious-school'],
'father_name' => $inf['sfathername'],
'father_citizenship' => $inf['fcitizenship-number'],
'father_mobile' => $inf['fcontact'],
'mother_name' => $inf['mfathername'],
'mother_citizenship' => $inf['mcitizenship-number'],
'mother_mobile' => $inf['mcontact'],
'country' => $inf['scountry'],
'state' => $inf['sprovince'],
'address1' => $inf['saddress'],
'address2' => '',
'zipcode' => '',
'school_certificate' => $school,
'exam_result' => $exam,
'photo' => $photo,
'medical_cerificate' => $medical,
'payment_method' => 'cash',
'description' => '',
'registered_on' => $this->nepali_current_date
);
$insert = $this->db->insert('applications', $indata);
$newId = $this->db->insert_id();
$result = (!empty($newId)) ? $newId : 0;
return $result;
}
public function storeTransaction($data)
{
$result = $this->db->insert('student_online_transactions', $data);
return $result;
}
public function storefeeTransaction($data)
{
$result = $this->db->insert('student_fee_online_transactions', $data);
return $result;
}
public function applications_get($data, $feestyId)
{
$courseId = (isset($data['course']) && !empty($data['course'])) ? $data['course'] : 0;
$batchId = (isset($data['batch_id']) && !empty($data['batch_id'])) ? $data['batch_id'] : 0;
$this->db->select('*');
$this->db->from('course_fees');
$this->db->where('course_id', $courseId);
$this->db->where('batch_id', $batchId);
$this->db->where('fees_type', $feestyId);
$query = $this->db->get();
return $query->row_array();
}
public function installment_get($course)
{
$this->db->select('*');
$this->db->from('installment');
$this->db->where('course_id', $course);
$query = $this->db->get();
//echo $this->db->last_query();
return $query->result_array();
}
public function install_get($install_type_id)
{
$this->db->select('*');
$this->db->from('installment');
$this->db->where('id', $install_type_id);
$query = $this->db->get();
//echo $this->db->last_query();
return $query->row_array();
}
public function updateapplication($data)
{
$update = array(
'payment_status' => $data['payment_status'],
);
$this->db->where('id', $data['product_id']);
$update = $this->db->update('applications', $update);
// echo $this->db->last_query();
}
// Moving application info to students -start - by shivakumar
public function applicationinfo_movingto_students($applicationId)
{
$this->db->select('*');
$this->db->from('applications');
$this->db->where('id', $applicationId);
$query = $this->db->get();
$res = $query->row_array();
$appdata = (!empty($res)) ? $res : 0;
if ($appdata != 0) {
if ($appdata['status'] == 'moved') {
return -1;
} else {
$this->db->select_max('id');
$query = $this->db->get('students');
$resid = $query->row_array();
$resid = (isset($resid['id']) && !empty($resid['id'])) ? $resid['id'] : 0;
$studentMaxId = $resid + 1;
// if (strlen($studentMaxId) == 1)
// $pid = "00000" . $studentMaxId;
// else if (strlen($studentMaxId) == 2)
// $pid = "0000" . $studentMaxId;
// else if (strlen($studentMaxId) == 3)
// $pid = "000" . $studentMaxId;
// else if (strlen($studentMaxId) == 4)
// $pid = "00" . $studentMaxId;
// else if (strlen($studentMaxId) == 5)
// $pid = "00" . $studentMaxId;
$pid = date('Y', strtotime($this->nepali_current_date)) . '0' . $studentMaxId;
$school_info = $this->get_logo_from_setting();
$school_prefix = (!empty($school_info['school_prefix_id'])) ? $school_info['school_prefix_id'] : 'BB';
$studentid = $school_prefix . STUDENT_PREFIX . $pid;
$parent_id = $school_prefix . STUDENT_PARENT_PREFIX . $pid;
$qr_path = $this->generate_qrcode($studentid);
$insertdata = array(
'id' => $studentMaxId,
'name' => $appdata['name'],
'studentId' => $studentid,
'course' => $appdata['course'],
'batch_id' => $appdata['batch_id'],
'email' => $appdata['email'],
'password' => $appdata['password'],
'mobile' => $appdata['mobile'],
'gender' => $appdata['gender'],
'dob' => $appdata['dob'],
'emergency_contact_name' => $appdata['emergency_contact_name'],
'emergency_contact_number' => $appdata['emergency_contact_number'],
'country' => $appdata['country'],
'state' => $appdata['state'],
'address1' => $appdata['address1'],
'address2' => $appdata['address2'],
'zipcode' => $appdata['zipcode'],
'photo' => $appdata['photo'],
'school_certificate' => $appdata['school_certificate'],
'exam_result' => $appdata['exam_result'],
'medical_cerificate' => $appdata['medical_cerificate'],
'payment_status' => $appdata['payment_status'],
'registered_on' => date('Y-m-d H:i:s', strtotime($this->nepali_current_date)),
'assign_status' => 'no',
'qr_code' => $qr_path,
'parent_username' => $parent_id,
'parent_password' => md5($parent_id),
'is_active' => 'yes'
);
$insert = $this->db->insert('students', $insertdata);
if ($insert) {
$update = array(
'status' => 'moved',
);
$this->db->where('id', $applicationId);
$this->db->update('applications', $update);
return $studentMaxId;
} else {
return "failed";
}
}
}
}
public function generate_qrcode($studentID)
{
$hex_data = date('YmdHis', strtotime($this->nepali_current_date)) . '-' . $studentID;
$save_name = $hex_data . '.png';
$dir = 'assets_student/studentqrcode/';
if (!file_exists($dir)) {
mkdir($dir, 0775, true);
}
/* QR Configuration */
$config['cacheable'] = true;
$config['imagedir'] = $dir;
$config['quality'] = true;
$config['size'] = '1024';
$config['black'] = array(255, 255, 255);
$config['white'] = array(255, 255, 255);
$this->ciqrcode->initialize($config);
/* QR Data */
$params['data'] = $studentID;
$params['level'] = 'L';
$params['size'] = 10;
$params['savename'] = $config['imagedir'] . $save_name;
$result = $this->ciqrcode->generate($params);
return $result;
}
// Moving application info to students -end - by shivakuamr
public function move_applicationinfo($appid)
{
$this->db->select('*');
$this->db->from('applications');
$this->db->where('id', $appid);
$query = $this->db->get();
$res = $query->result_array();
// echo $this->db->last_query();
foreach ($res as $r) {
$appStatus = $r['status'];
}
if ($r['status'] == "moved") {
return -1;
} else {
$this->db->select_max('id');
$query = $this->db->get('students');
$resid = $query->row_array();
$pid = $resid['id'] + 1;
if (strlen($pid) == 1)
$pid = "00000" . $pid;
else if (strlen($pid) == 2)
$pid = "0000" . $pid;
else if (strlen($pid) == 3)
$pid = "000" . $pid;
else if (strlen($pid) == 4)
$pid = "00" . $pid;
else if (strlen($pid) == 5)
$pid = "00" . $pid;
$studentid = "ECS" . date('Y', strtotime($this->nepali_current_date)) . $pid;
// print_r($res);
foreach ($res as $r) {
$name = $r['name'];
$applicationid = $r['applicationid'];
$email = $r['email'];
$mobile = $r['mobile'];
$password = $r['password'];
$gender = $r['gender'];
$dob = $r['dob'];
$course = $r['course'];
$emergency_contact_name = $r['emergency_contact_name'];
$emergency_contact_number = $r['emergency_contact_number'];
$country = $r['country'];
$state = $r['state'];
$address1 = $r['address1'];
$address2 = $r['address2'];
$zipcode = $r['zipcode'];
$school_certificate = $r['school_certificate'];
$exam_result = $r['exam_result'];
$photo = $r['photo'];
$medical_cerificate = $r['medical_cerificate'];
$registered_on = $r['registered_on'];
$payment_status = "Success";
}
$s = array(
'name' => $name,
'studentId' => $studentid,
'email' => $email,
'mobile' => $mobile,
'password' => $password,
'gender' => $gender,
'dob' => $dob,
'course' => $course,
'emergency_contact_name' => $emergency_contact_name,
'emergency_contact_number' => $emergency_contact_number,
'country' => $country,
'state' => $state,
'address1' => $address1,
'address2' => $address2,
'zipcode' => $zipcode,
'school_certificate' => $school_certificate,
'exam_result' => $exam_result,
'photo' => $photo,
'medical_cerificate' => $medical_cerificate,
'registered_on' => $registered_on,
'payment_status' => $payment_status
);
// print_r($s);
$insert = $this->db->insert('students', $s);
$newId = $this->db->insert_id();
$update = array(
'status' => 'moved',
);
$this->db->where('id', $appid);
$update = $this->db->update('applications', $update);
// echo $this->db->last_query();
return $studentid;
}
}
public function get_myClasses($id)
{
$nowMonth = date('m', strtotime($this->nepali_current_date));
$nowYear = date('Y', strtotime($this->nepali_current_date));
$nowDay = date('d', strtotime($this->nepali_current_date));
$obj = new NepaliDate();
// Convert BS to AD.
$nowArr = $obj->convertBsToAd($nowYear, $nowMonth, $nowDay);
$currConvDate = $nowArr['year'] . '-' . $nowArr['month'] . '-' . $nowArr['day'];
$pday = strtolower(date('l', strtotime($currConvDate)));
$query = "select classroom.id,classroom_name,classroom_session.id,session_details.subject_id,subject_name,start,join_link, classroom.classroom_name,day,duration
from
students
left join classroom on students.classroom = classroom.id
left join classroom_session on classroom_session.classroom_id = classroom.id
left join session_details on session_details.session_id = classroom_session.id
left join subject on subject.id = session_details.subject_id
where
students.id = " . $id . " and day = '" . $pday . "'";
$q = $this->db->query($query);
// echo $this->db->last_query();
return $q->result_array();
}
public function get_mydayClasses($id, $pday)
{
$query = "select classroom.id,classroom_name,classroom_session.id,session_details.subject_id,subject_name,subject_icon,start,join_link, classroom.classroom_name,day,duration
from
students
left join classroom on students.classroom = classroom.id
left join classroom_session on classroom_session.classroom_id = classroom.id
left join session_details on session_details.session_id = classroom_session.id
left join subject on subject.id = session_details.subject_id
where
students.id= " . $id . " and day = '" . $pday . "' order by day,start asc";
$q = $this->db->query($query);
//echo $this->db->last_query();
return $q->result_array();
}
public function get_teacher($sid, $cname)
{
$query = "select teacher_name,photo from classroom,teacher where classroom.subject_id = " . $sid . " and classroom_name = '" . $cname . "' and classroom.teacher_id =teacher.id";
$q = $this->db->query($query);
// echo $this->db->last_query();
return $q->result_array();
}
/*********************************/
//-----shankar code of assignment starts from here---//
/******************************* */
public function get_assignment_list($student_id, $asgn_id = '', $month = '', $year = '')
{
if ($asgn_id == 0 || empty($asgn_id)) {
$this->db->select('a.id as assignment_id, a.classroom_id, a.teacher_id, a.subject_id, a.title, a.remark, a.due_date, t.teacher_name, s.subject_name,s.subject_icon');
$this->db->from('assignment a, subject s, teacher t, students stu, student_batch sb');
$this->db->where('stu.id', $student_id);
$this->db->where('stu.id = sb.student_id');
$this->db->where('stu.batch_id = sb.batch_id');
$this->db->where('sb.classroom_id = a.classroom_id');
// $this->db->where('a.subject_id', $val);
$this->db->where('a.subject_id = s.id');
$this->db->where('a.teacher_id = t.id');
if ($month != 00 || $year != 0) {
$this->db->where("DATE_FORMAT(due_date,'%m')", $month);
$this->db->where("DATE_FORMAT(due_date,'%Y')", $year);
}
$this->db->order_by('a.id desc');
$query = $this->db->get();
return $query->result_array();
} else {
$this->db->select('a.id as assignment_id, a.classroom_id, a.teacher_id, a.subject_id, a.title, a.remark, a.due_date, t.teacher_name, s.subject_name, s.subject_icon');
$this->db->from('assignment a, subject s, teacher t');
$this->db->where('a.id', $asgn_id);
$this->db->where('a.subject_id = s.id');
$this->db->where('a.teacher_id = t.id');
if ($month != 00 || $year != 0) {
$this->db->where("DATE_FORMAT(due_date,'%m')", $month);
$this->db->where("DATE_FORMAT(due_date,'%Y')", $year);
}
$query = $this->db->get();
return $query->result_array();
}
}
public function upload_assignment($data)
{
$check = $this->db->query('select id from assignments_uploaded where Path= "' . $data['Path'] . '"');
$res = $check->result_array();
if ($res) {
$data['modified'] = $this->nepali_current_date;
$this->db->where('id', $res[0]['id']);
$this->db->update('assignments_uploaded', $data);
return true;
} else {
$data['created'] = $this->nepali_current_date;
$this->db->insert('assignments_uploaded', $data);
return true;
}
}
public function uploaded_assignent($student_id, $asgn_id)
{
$this->db->select('*');
$this->db->from('assignments_uploaded');
$this->db->where('student_id', $student_id);
$this->db->where('assignment_id', $asgn_id);
$query = $this->db->get();
return $query->result_array();
}
public function upload_assignment_submit($data)
{
$this->db->where('assignment_id', $data['assignment_id']);
$this->db->where('student_id', $data['student_id']);
$this->db->update('assignments_uploaded', $data);
return true;
}
public function upload_assignment_cancel($asgn_id, $student_id)
{
$this->db->where('assignment_id', $asgn_id);
$this->db->where('student_id', $student_id);
$this->db->delete('assignments_uploaded');
return true;
}
/**********************************************/
//-----shankar code of assignment end ---//
/**********************************************/
// Notification models - 13-10-2021
public function getStudentNotification($id, $date)
{
$query = "SELECT students.name, students.email,classroom.id as classroom_id, classroom.classroom_name, classroom.course_id
FROM students
INNER JOIN student_batch sb ON students.id = sb.student_id
AND sb.batch_id = students.batch_id
INNER JOIN classroom ON sb.classroom_id = classroom.id
WHERE students.id = $id";
$res = $this->db->query($query);
if ($res->num_rows() > 0) {
$month = $date['month'];
$year = $date['year'];
$classRoomId = $res->row()->classroom_id;
$notRes = $this->db->query("Select * from notifications where (notification_to = 'student' OR notification_to = 'both') AND ((month(created_at)= '$month') AND (year(created_at) = '$year')) AND student_classroom = '$classRoomId' ORDER BY notification_id DESC");
if ($notRes->num_rows() > 0) {
return $notRes->result_array();
} else {
return false;
}
} else {
return false;
}
}
public function getAllStudentNotification($id, $notif_id = '')
{
$query = "SELECT students.name, students.email,classroom.id as classroom_id, classroom.classroom_name, classroom.course_id FROM students INNER JOIN student_batch sb ON students.id = sb.student_id AND students.batch_id = sb.batch_id INNER JOIN classroom ON sb.classroom_id = classroom.id WHERE students.id = $id";
$res = $this->db->query($query);
if ($res->num_rows() > 0) {
$classRoomName = $res->row()->classroom_id;
if ($notif_id != '') {
$where = "n.notification_id = $notif_id";
} else {
$where = "n.student_classroom = '$classRoomName'";
}
$notRes = $this->db->query("Select n.*, t.teacher_name from notifications n left join teacher t on n.teacher_id = t.id where $where ORDER BY n.notification_id DESC");
if ($notRes->num_rows() > 0) {
$notRes = $notRes->result_array();
foreach ($notRes as $key => $value) {
$notRes[$key]['teacher_id'] = $value['teacher_id'] ? $value['teacher_id'] : '';
}
return $notRes;
} else {
return false;
}
} else {
return false;
}
}
public function getSingleNotification($id)
{
$query = $this->db->query('SELECT * FROM notifications WHERE notification_id = ' . $id);
if ($query->num_rows() > 0) {
$result = $query->row();
return $result;
} else {
return 'failed';
}
}
// Notification Models End - 13-10-2021
//shankar code of Student Syllybus Models start - 29-10-2021
public function get_student_syllabus($student_id)
{
$this->db->select('student_id, subject_id, subject_name, classroom.course_id, syllabus,subject_icon, subject_syllabus.id as subject_syllabus_id');
$this->db->from('students , classroom, subject_syllabus, student_batch, subject');
$this->db->where('students.id', $student_id);
$this->db->where('student_batch.batch_id = students.batch_id');
$this->db->where('students.id = student_batch.student_id');
$this->db->where('student_batch.classroom_id = classroom.id');
$this->db->where('subject_syllabus.course_id = classroom.course_id');
$this->db->where('subject.id = subject_syllabus.subject_id');
$this->db->group_by('subject_syllabus.subject_id');
$query = $this->db->get();
return $query->result_array();
}
//shankar code of Student Syllybus Models end - 29-10-2021
// Student Attendance - 03-11-21 Afras Khan
public function get_table_info($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function get_student_attendance($where)
{
$this->db->select('student_id, classroom_id, subject_id, DATE_FORMAT(attendence_date, "%d/%m/%Y") as date, status, attendence_date, DATE_FORMAT(attendence_date,"%r") as time');
$this->db->where($where);
$this->db->order_by('DAY(attendence_date)', 'ASC');
$query = $this->db->get('student_attendence');
return $query->result_array();
}
// Student Attendance End - 03-11-21 Afras Khan
//Start code of Up- Coming Test/Exams 08-11-21 - Shankar
public function upcoming_Test_or_Exams($student_id, $exam_que_id = '')
{
$this->db->select('questions.id as question_id, exam_id, e_name, classroom_id, classroom_name, subject_id, subject_name, exam_date, exam_starttime, exam_endtime, total_marks ');
$this->db->from('classroom, student_batch,students, subject, questions,exam');
if ($exam_que_id == '' || empty($exam_que_id)) {
$this->db->where('students.id', $student_id);
$this->db->where('students.id = student_batch.student_id');
$this->db->where('students.batch_id = student_batch.batch_id');
$this->db->where('student_batch.classroom_id = classroom.id');
$this->db->where('exam_date >=', date('Y-m-d', strtotime($this->nepali_current_date)));
} else {
$this->db->where('questions.id', $exam_que_id);
}
$this->db->where('classroom.course_id = questions.course_id');
$this->db->where('questions.exam_id = exam.id');
$this->db->where('subject.id = questions.subject_id');
$this->db->group_by('questions.id');
$query = $this->db->get();
// echo $this->db->last_query();
return $query->result_array();
}
public function get_allQuestions($que_exam_id)
{
$query = 'SELECT option_a , option_b , option_c , option_d , question_type_id , question_name, exam_questions.id as id , questions.course_id, questions.exam_date, questions.exam_starttime,question_name, questions.exam_endtime,exam_questions.image,subject_name, e_name, questions.id as test_id, exam_questions.question_mark as marks from exam_questions
LEFT JOIN questions ON questions.id = exam_questions.exam_id
LEFT JOIN subject ON exam_questions.subject_id = subject.id
LEFT JOIN exam ON exam.id = questions.exam_id
where exam_questions.exam_id = ' . $que_exam_id . ' order by exam_questions.id asc';
$q = $this->db->query($query);
// echo $this->db->last_query();
return $q->result_array();
}
public function storeAnswer($ans_array_json, $student_id)
{
$ans_array = json_decode($ans_array_json, true);
$length = count($ans_array);
$i = 0;
$response = 0;
for ($i = 0; $i < $length; $i++) {
$ans_array[$i]['created'] = $this->nepali_current_date;
$this->db->insert('exam_answers', $ans_array[$i]);
$res = $this->db->insert_id();
$query = $this->db->query('select ea.answer, eq.correct_answer, eq.question_mark from exam_questions eq, exam_answers ea where ea.id=' . $res . ' and ea.exam_questions_id = eq.id');
$data = $query->row_array();
if ($data['answer'] == $data['correct_answer']) {
$this->db->set('review', $data['question_mark']);
} else if ($data['correct_answer'] == '') {
$this->db->set('review', '');
} else {
$this->db->set('review', 0);
}
$this->db->set('modified', $this->nepali_current_date);
$this->db->where('id', $res);
$this->db->update('exam_answers');
$updated_status = $this->db->affected_rows();
if ($updated_status) {
$response = 1;
}
}
return $response;
}
//End code of Up- Coming Test/Exams 10-11-21 - Shankar
// to get application fee by shivu -start
public function get_query_result($sqlQry)
{
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function get_query_row($sqlQry)
{
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->row_array();
}
public function get_general_row_details($table_name, $where = '', $sqlQry = '', $order_by = 'ASC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order_by);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->row_array();
}
// to get application fee by shivu -end
// Hostel Afras Khan
function add_edit_table($table, $id, $data, $update_where = '')
{
if ($id == 0) {
$this->db->insert($table, $data);
if ($this->db->affected_rows() > 0)
return $insert_id = $this->db->insert_id();
else
return 0;
} else {
if ($update_where != '')
$this->db->where($update_where);
else
$this->db->where('id', $id);
$this->db->update($table, $data);
if ($this->db->trans_status() === FALSE)
return 0;
return true;
}
}
// Hostel End
//getStudent_id from user_api
public function getStudentId($id)
{
$result = $this->db->query('select id,studentId from students where studentId = "' . $id . '"')->row_array();
return $result;
}
public function get_logo_from_setting()
{
$this->db->select('*');
$this->db->from('school_settings');
$query = $this->db->get();
return $query->row_array();
}
}

View File

@ -0,0 +1,455 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
use Nilambar\NepaliDate\NepaliDate;
require_once 'vendor/autoload.php';
class Teacher_model extends CI_Model
{
private $nepaliDateObject;
private $nepali_current_date;
public function __construct()
{
$this->load->database();
date_default_timezone_set("Asia/Kolkata");
$this->load->helper('common_helper');
$this->nepaliDateObject = new NepaliDate();
$this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject);
}
public function login($uname, $pwd)
{
$pwd = base64_encode($pwd);
$sql = $this->db->query("SELECT * FROM teacher WHERE teacherId='$uname' AND password='$pwd'");
if ($sql->num_rows() > 0) {
return $sql->row_object();
} else {
return false;
}
}
public function get_myClasses($id, $pday)
{
//$this->db->select('session_details.id,classroom.subject_id,classroom.teacher_id,classroom.classroom_name,subject_name,subject_icon,start_link,day,start,duration');
// $this->db->from('session_details');
// $this->db->join('subject', 'session_details.subject_id = subject.id');
// $this->db->join('classroom','classroom.subject_id = subject.id' );
// $this->db->where('classroom.flag', 'Y');
// $this->db->where('teacher_id', $id);
// if($pday != '')
// $this->db->where('day', $pday);
// $query = $this->db->get();
//// echo $this->db->last_query();
// return $query->result_array();
//shankar code start
$this->db->select('session_details.id,session_details.subject_id,classroom_teacher_subject.teacher_id,classroom.classroom_name,subject_name,subject_icon,start_link,day,start,duration');
$this->db->from('session_details');
$this->db->join('subject', 'session_details.subject_id = subject.id');
$this->db->join('classroom_teacher_subject', 'subject.id = classroom_teacher_subject.subject_id');
$this->db->join('classroom', 'classroom.id = classroom_teacher_subject.classroom_id');
$this->db->where('classroom.is_active', 'yes');
$this->db->where('teacher_id', $id);
if ($pday != '')
$this->db->where('day', $pday);
$query = $this->db->get();
// echo $this->db->last_query();
return $query->result_array();
//shankar code end
}
//shankar code start from here
public function get_course($id)
{
$this->db->select('sc.id as section_id, co.id as course_id,c.id as classroom_id, co.course_name, sc.section_name');
$this->db->from('classroom_teacher_subject ts, section sc, classroom c, course co');
$this->db->where('ts.teacher_id', $id);
$this->db->where('c.id = ts.classroom_id');
$this->db->where('c.course_id = co.id');
$this->db->where('sc.id = c.section_id');
$this->db->group_by('course_name, section_name');
$query = $this->db->get();
return $query->result_array();
}
public function get_subjects($t_id, $cls_id)
{
$this->db->select('s.id as subject_id,s.subject_icon, c.id as classroom_id, s.subject_name, t.teacher_name, sc.section_name');
$this->db->from('classroom c, subject s, teacher t, classroom_teacher_subject ts, course co, section sc');
$this->db->where('t.id', $t_id);
$this->db->where('c.id', $cls_id);
$this->db->where('ts.classroom_id', $cls_id);
$this->db->where('ts.teacher_id', $t_id);
// $this->db->where('ss.course_id = c.course_id');
$this->db->where('s.id = ts.subject_id');
$this->db->group_by('subject_name, teacher_name');
$query = $this->db->get();
// echo $this->db->last_query();
return $query->result_array();
}
public function create_assignment($data)
{
$this->db->insert('assignment', $data);
$res = $this->db->insert_id();
if ($res) {
return $res;
}
}
public function get_assignments($tid, $cls_id, $agn_id = '', $month = '', $year = '')
{
$this->db->select('a.id as asgn_id, title, subject_name, a.remark, name as student_name, s.id as student_id, due_date, teacher_name');
$this->db->from('assignment a');
$this->db->join('teacher t', 'a.teacher_id = t.id');
$this->db->join('subject sub', 'a.subject_id = sub.id');
$this->db->join('teacher_subjects ts', 't.id = ts.teacher_id');
$this->db->join('student_batch sb', 'a.classroom_id = sb.classroom_id');
$this->db->join('students s', 's.id = sb.student_id AND s.batch_id = sb.batch_id');
if (empty($agn_id) || $agn_id == 0) {
$this->db->where('a.teacher_id', $tid);
$this->db->where('a.classroom_id', $cls_id);
$this->db->where('a.classroom_id = sb.classroom_id');
} else {
$this->db->where('a.id', $agn_id);
$this->db->where('t.id', $tid);
$this->db->where('a.classroom_id', $cls_id);
}
if ((!empty($month) || $month != '') && (!empty($year) || $year != '')) {
$this->db->where("DATE_FORMAT(due_date,'%m')", $month);
$this->db->where("DATE_FORMAT(due_date,'%Y')", $year);
}
$this->db->group_by('student_name, student_id');
$this->db->order_by('a.id', 'desc');
// $this->db->limit(1);
$query = $this->db->get();
return $query->result_array();
}
public function list_of_assignments($tid, $cls_id, $month = '', $year = '')
{
$this->db->select('a.id as assignment_id, a.classroom_id, a.teacher_id, a.subject_id, a.title, a.remark, a.due_date, s.subject_name, t.teacher_name, sc.section_name as classroom_name, s.subject_name, s.subject_icon');
$this->db->from('assignment a, subject s, teacher t, classroom c, section sc');
$this->db->where('a.teacher_id', $tid);
$this->db->where('t.id = a.teacher_id');
$this->db->where('a.subject_id = s.id');
$this->db->where('a.classroom_id', $cls_id);
$this->db->where('c.id = a.classroom_id');
$this->db->where('sc.id = c.section_id');
if ((!empty($month) || $month != '') && (!empty($year) || $year != '')) {
$this->db->where("DATE_FORMAT(due_date,'%m')", $month);
$this->db->where("DATE_FORMAT(due_date,'%Y')", $year);
}
$this->db->group_by('a.id');
$this->db->order_by('a.due_date', 'desc');
$query = $this->db->get();
return $query->result_array();
}
public function uploaded_assignment($s_id, $a_id)
{
if ($s_id == 0 || $s_id == '') {
$da = $this->db->query('select * from assignments_uploaded where assignment_id =' . $a_id . ' order by id desc');
return $da->result_array();
}
$da = $this->db->query('select * from assignments_uploaded where student_id = ' . $s_id . ' and assignment_id =' . $a_id . '');
return $da->result_array();
}
public function show_student_assignment($asgn_id, $student_id)
{
$this->db->select('subject_name,au.assignment_id, teacher_name,due_date,title, section_name as classroom_name, classroom_id, a.subject_id, au.uploaded_date ,au.id as uploaded_id, au.remark as uploaded_remark');
$this->db->from('assignment a, subject s, teacher t, students st, assignments_uploaded au, classroom c, section');
$this->db->where('au.assignment_id', $asgn_id);
$this->db->where('au.student_id', $student_id);
$this->db->where('a.id', $asgn_id);
$this->db->where('st.id', $student_id);
$this->db->where('a.teacher_id = t.id ');
$this->db->where('a.subject_id = s.id ');
$this->db->where('a.classroom_id = c.id');
$this->db->where('c.section_id = section.id');
$query = $this->db->get();
return $query->result_array();
}
public function upload_assignment($data, $id)
{
$this->db->where('id', $id);
$this->db->update('assignments_uploaded', $data);
return true;
}
//end of shankar code
//Notification Models - 14-10-2021
public function getTeachersNotification($id, $date, $tid = '')
{
$month = $date['month'];
$year = $date['year'];
if($tid != '') {
$id = $tid;
} else {
$id = $_SESSION['teacher_id'];
}
$query = $this->db->query("Select * from notifications where (notification_to = 'teacher' OR notification_to = 'both') AND ((month(created_at) = '$month') AND (year(created_at) = '$year')) AND teacher_id = '$id' ORDER BY notification_id DESC");
if ($query->num_rows() > 0) {
return $query->result_array();
} else {
return false;
}
}
public function get_notification_info($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.notification_id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
//Notification Models End - 14-10-2021
public function get_table_info($table_name, $where = '', $sqlQry = '', $order = 'DESC', $limit = FALSE, $offset = FALSE)
{
if ($limit)
$this->db->limit($limit, $offset);
if ($where != '')
$this->db->where($where);
$this->db->order_by($table_name . '.id', $order);
$query = $this->db->get($table_name);
if ($sqlQry != '')
$query = $this->db->query($sqlQry);
return $query->result_array();
}
public function add_edit_student_attendance($data, $status, $where = '')
{
$this->db->trans_start();
if ($status == 'Update') {
$this->db->update('student_attendence', $data, $where);
} else {
$this->db->insert_batch('student_attendence', $data);
}
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
return 0;
} else {
return 1;
}
}
//shankar code teacher syllabus view 01-11-21
public function get_syllabus($tid)
{
$query = $this->db->query("SELECT cts.*,cl.* FROM classroom_teacher_subject cts LEFT JOIN classroom cl ON cl.id=cts.classroom_id WHERE cts.teacher_id=$tid");
$syllabus = array();
if ($query->num_rows() > 0) {
$data = $query->result_array();
foreach ($data as $key => $value) {
$sq = 'SELECT ss.*, s.subject_name, s.subject_icon FROM subject_syllabus ss, subject s WHERE ss.course_id = ' . $value['course_id'] . ' and ss.subject_id = ' . $value['subject_id'] . ' and s.id = ss.subject_id';
$query1 = $this->db->query($sq);
if ($query1->num_rows() > 0) {
$data2 = $query1->result_array();
if ($query1->num_rows() > 0) {
foreach ($data2 as $k => $v) {
array_push($syllabus, array(
'subject_syllabus_id' => $v['id'],
'subject_id' => $v['subject_id'],
'subject_name' => $v['subject_name'],
'subject_icon' => $v['subject_icon'],
'syllabus' => $v['syllabus'],
'course_id' => $v['course_id'],
'classroom_name' => $value['classroom_name']
));
}
}
}
}
}
return $syllabus;
}
public function view_all_exam_details($tid, $cls_id)
{
$query = $this->db->query("SELECT questions.*,subject_name,e_name, subject_icon, classroom_name, classroom.id as classroom_id FROM questions, subject, exam, classroom WHERE teacher_id = $tid and subject.id = questions.subject_id and exam.id = questions.exam_id and questions.course_id = classroom.course_id and classroom.id = $cls_id order by questions.id desc");
if ($query->num_rows() > 0) {
return $query->result_array();
}
return false;
}
public function get_all_questions($e_id)
{
//get the classroom id
$query = $this->db->query("SELECT questions.*,subject_name,e_name, subject_icon, classroom_name, classroom.id as classroom_id FROM questions, subject, exam, classroom WHERE questions.id = $e_id and subject.id = questions.subject_id and exam.id = questions.exam_id and questions.course_id = classroom.course_id ");
if ($query->num_rows() > 0) {
return $query->row_array();
} else {
return false;
}
}
public function get_all_questions_details($exam_que_id, $e_id = '')
{
$this->db->select('*');
$this->db->from('exam_questions');
if ($exam_que_id != '' || !empty($exam_que_id)) {
$this->db->where('exam_questions.id', $exam_que_id);
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->row_array();
}
} else if ($e_id) {
$this->db->where('exam_id', $e_id);
$this->db->order_by('question_mark');
$query = $this->db->get();
if ($query->num_rows() > 0) {
return $query->result_array();
}
}
return false;
}
public function get_count_questions_details($e_id, $marks = '', $count = '')
{
if ($marks != '' && $count == 0) {
$q = 'select count(question_mark) from exam_questions where exam_id = ' . $e_id . ' and question_mark =' . $marks;
} else if ($count == 1) {
$q = 'select count(question_mark),exam_id,question_mark from exam_questions where exam_id = ' . $e_id . ' group by (question_mark)';
$query = $this->db->query($q);
if ($query->num_rows() > 0) {
return $query->result_array();
}
} else {
$q = 'select sum(question_mark),exam_id from exam_questions where exam_id = ' . $e_id;
}
$query = $this->db->query($q);
if ($query->num_rows() > 0) {
// echo $this->db->last_query();
return $query->row_array();
} else {
return false;
}
}
public function add_questions_details($data, $exam_questions_id)
{
if ($exam_questions_id != '') {
$data['modified'] = $this->nepali_current_date;
//cheking image if there then delete old one from folder
if (isset($data['image']) && !empty($data['image'])) {
$query = 'select image from exam_questions where id =' . $exam_questions_id;
$img_q = $this->db->query($query);
$img = $img_q->row_array();
$source = $img['image'];
if (file_exists($source)) {
unlink($source);
}
}
$this->db->where('id', $exam_questions_id);
$this->db->update('exam_questions', $data);
$updated_status = $this->db->affected_rows();
if ($updated_status) {
return $exam_questions_id;
} else {
return 0;
}
}
$data['created'] = $this->nepali_current_date;
$data['modified'] = $this->nepali_current_date;
$this->db->insert('exam_questions', $data);
$res = $this->db->insert_id();
if ($res) {
return $res;
} else {
return 0;
}
}
//Add Test/Exam Creation end code shankar - 08-11-21
//getStudent_id from user_api
public function getTeacherId($id)
{
$result = $this->db->query('select id from teacher where teacherId = "'. $id . '"')->row_array();
return $result;
}
public function update_table($id, $data, $table) {
$this->db->trans_start();
$this->db->where('id', $id);
$this->db->update($table, $data);
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE)
return 0;
return true;
}
}
?>

View File

@ -0,0 +1,60 @@
<?php
class Transport_model extends CI_Model{
public function __construct()
{
$this->load->database();
}
public function login($uname, $pwd)
{
$pwd = md5($pwd);
$sql = $this->db->query("SELECT * FROM admin WHERE email='$uname' AND password='$pwd' AND admin_role_ids=5");
if ($sql->num_rows() > 0) {
return $sql->row_object();
} else {
return false;
}
}
public function getSingleData($table, $where)
{
$this->db->where($where);
return $this->db->get($table)->row_array();
}
public function insertData($checkInOutData){
$this->db->insert('checkin_checkout', $checkInOutData);
if($this->db->affected_rows() > 0){
return $this->db->insert_id();
}
else{
return false;
}
}
public function getData($table, $where)
{
if($table == 'course'){
$this->db->order_by('id', 'ASC');
}
if($where!='')
{
$this->db->where($where);
}
return $this->db->get($table)->result_array();
}
public function getDataGroupBy($today, $sid)
{
$condition = "";
if($sid!=""){
$condition = " AND student_id IN ('$sid')";
}
$select = $this->db->query("SELECT count(id) as ttl FROM checkin_checkout WHERE DATE(date)='$today' $condition GROUP BY student_id");
$query = count($select->result_array());
return $query;
}
}
?>

View File

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

View File

@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>__construct</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>__construct</h1>
<code>__construct([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])</code>
<h2>Description</h2>
This is the class constructor. It allows to set up the page size, the orientation and the
unit of measure used in all methods (except for font sizes).
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Default page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
Default value is <code>P</code>.
</dd>
<dt><code>unit</code></dt>
<dd>
User unit. Possible values are:
<ul>
<li><code>pt</code>: point</li>
<li><code>mm</code>: millimeter</li>
<li><code>cm</code>: centimeter</li>
<li><code>in</code>: inch</li>
</ul>
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
is a very common unit in typography; font sizes are expressed in that unit.
<br>
<br>
Default value is <code>mm</code>.
</dd>
<dt><code>size</code></dt>
<dd>
The size used for pages. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
<br>
Default value is <code>A4</code>.
</dd>
</dl>
<h2>Example</h2>
Document with a custom 100x150 mm page size:
<div class="doc-source">
<pre><code>$pdf = new FPDF('P', 'mm', array(100,150));</code></pre>
</div>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@ -0,0 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AcceptPageBreak</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AcceptPageBreak</h1>
<code><b>boolean</b> AcceptPageBreak()</code>
<h2>Description</h2>
Whenever a page break condition is met, the method is called, and the break is issued or not
depending on the returned value. The default implementation returns a value according to the
mode selected by SetAutoPageBreak().
<br>
This method is called automatically and should not be called directly by the application.
<h2>Example</h2>
The method is overriden in an inherited class in order to obtain a 3 column layout:
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
protected $col = 0;
function SetCol($col)
{
// Move position to a column
$this-&gt;col = $col;
$x = 10 + $col*65;
$this-&gt;SetLeftMargin($x);
$this-&gt;SetX($x);
}
function AcceptPageBreak()
{
if($this-&gt;col&lt;2)
{
// Go to next column
$this-&gt;SetCol($this-&gt;col+1);
$this-&gt;SetY(10);
return false;
}
else
{
// Go back to first column and issue page break
$this-&gt;SetCol(0);
return true;
}
}
}
$pdf = new PDF();
$pdf-&gt;AddPage();
$pdf-&gt;SetFont('Arial', '', 12);
for($i=1;$i&lt;=300;$i++)
$pdf-&gt;Cell(0, 5, "Line $i", 0, 1);
$pdf-&gt;Output();</code></pre>
</div>
<h2>See also</h2>
<a href="setautopagebreak.htm">SetAutoPageBreak</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddFont</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddFont</h1>
<code>AddFont(<b>string</b> family [, <b>string</b> style [, <b>string</b> file]])</code>
<h2>Description</h2>
Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font
definition file first with the MakeFont utility.
<br>
The definition file (and the font file itself when embedding) must be present in the font directory.
If it is not found, the error "Could not include font definition file" is raised.
<h2>Parameters</h2>
<dl class="param">
<dt><code>family</code></dt>
<dd>
Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
override the corresponding font.
</dd>
<dt><code>style</code></dt>
<dd>
Font style. Possible values are (case insensitive):
<ul>
<li>empty string: regular</li>
<li><code>B</code>: bold</li>
<li><code>I</code>: italic</li>
<li><code>BI</code> or <code>IB</code>: bold italic</li>
</ul>
The default value is regular.
</dd>
<dt><code>file</code></dt>
<dd>
The font definition file.
<br>
By default, the name is built from the family and style, in lower case with no space.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic', 'I');</code></pre>
</div>
is equivalent to:
<div class="doc-source">
<pre><code>$pdf-&gt;AddFont('Comic', 'I', 'comici.php');</code></pre>
</div>
<h2>See also</h2>
<a href="setfont.htm">SetFont</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddLink</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddLink</h1>
<code><b>int</b> AddLink()</code>
<h2>Description</h2>
Creates a new internal link and returns its identifier. An internal link is a clickable area
which directs to another place within the document.
<br>
The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is
defined with SetLink().
<h2>See also</h2>
<a href="cell.htm">Cell</a>,
<a href="write.htm">Write</a>,
<a href="image.htm">Image</a>,
<a href="link.htm">Link</a>,
<a href="setlink.htm">SetLink</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@ -0,0 +1,61 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AddPage</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AddPage</h1>
<code>AddPage([<b>string</b> orientation [, <b>mixed</b> size [, <b>int</b> rotation]]])</code>
<h2>Description</h2>
Adds a new page to the document. If a page is already present, the Footer() method is called
first to output the footer. Then the page is added, the current position set to the top-left
corner according to the left and top margins, and Header() is called to display the header.
<br>
The font which was set before calling is automatically restored. There is no need to call
SetFont() again if you want to continue with the same font. The same is true for colors and
line width.
<br>
The origin of the coordinate system is at the top-left corner and increasing ordinates go
downwards.
<h2>Parameters</h2>
<dl class="param">
<dt><code>orientation</code></dt>
<dd>
Page orientation. Possible values are (case insensitive):
<ul>
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
</ul>
The default value is the one passed to the constructor.
</dd>
<dt><code>size</code></dt>
<dd>
Page size. It can be either one of the following values (case insensitive):
<ul>
<li><code>A3</code></li>
<li><code>A4</code></li>
<li><code>A5</code></li>
<li><code>Letter</code></li>
<li><code>Legal</code></li>
</ul>
or an array containing the width and the height (expressed in user unit).<br>
<br>
The default value is the one passed to the constructor.
</dd>
<dt><code>rotation</code></dt>
<dd>
Angle by which to rotate the page. It must be a multiple of 90; positive values
mean clockwise rotation. The default value is <code>0</code>.
</dd>
</dl>
<h2>See also</h2>
<a href="__construct.htm">__construct</a>,
<a href="header.htm">Header</a>,
<a href="footer.htm">Footer</a>,
<a href="setmargins.htm">SetMargins</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>AliasNbPages</title>
<link type="text/css" rel="stylesheet" href="../fpdf.css">
</head>
<body>
<h1>AliasNbPages</h1>
<code>AliasNbPages([<b>string</b> alias])</code>
<h2>Description</h2>
Defines an alias for the total number of pages. It will be substituted as the document is
closed.
<h2>Parameters</h2>
<dl class="param">
<dt><code>alias</code></dt>
<dd>
The alias. Default value: <code>{nb}</code>.
</dd>
</dl>
<h2>Example</h2>
<div class="doc-source">
<pre><code>class PDF extends FPDF
{
function Footer()
{
// Go to 1.5 cm from bottom
$this-&gt;SetY(-15);
// Select Arial italic 8
$this-&gt;SetFont('Arial', 'I', 8);
// Print current and total page numbers
$this-&gt;Cell(0, 10, 'Page '.$this-&gt;PageNo().'/{nb}', 0, 0, 'C');
}
}
$pdf = new PDF();
$pdf-&gt;AliasNbPages();</code></pre>
</div>
<h2>See also</h2>
<a href="pageno.htm">PageNo</a>,
<a href="footer.htm">Footer</a>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>
</body>
</html>

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