CodeIgniter 3.1.11 -> 3.4.5 (pocketarc fork) en PHP 8.3-fixes
- system/ vervangen door CodeIgniter 3.4.5 (pocketarc/codeigniter, PHP 8.2-8.5 compatibel) - config.php, mimes.php, user_agents.php en error-views bijgewerkt naar 3.4.5 - composer.json: php-constraint "^7.4 || ^8.0" zodat composer install op 8.3 werkt - PHP 8-fatals opgelost: count()/array-functies op FALSE/null, rekenen met lege strings, delen door nul, property zetten op FALSE, curly-brace string offsets, ongedefinieerde constanten, foute curl_setopt in Phantom_model::create_img - dynamic properties gedeclareerd in libraries, optionele parameters voor verplichte opgelost - vergelijkingen waar '' == 0 in PHP 8 anders uitvalt gecast naar (int) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
|
|
|
|
||||||
| WARNING: You MUST set this value!
|
| WARNING: You MUST set this value!
|
||||||
|
|
|
|
||||||
| If it is not set, then CodeIgniter will try guess the protocol and path
|
| If it is not set, then CodeIgniter will try to guess the protocol and
|
||||||
| your installation, but due to security concerns the hostname will be set
|
| path to your installation, but due to security concerns the hostname will
|
||||||
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
|
| be set to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
|
||||||
| The auto-detection mechanism exists only for convenience during
|
| The auto-detection mechanism exists only for convenience during
|
||||||
| development and MUST NOT be used in production!
|
| development and MUST NOT be used in production!
|
||||||
|
|
|
|
||||||
@@ -66,7 +66,9 @@ $config['uri_protocol'] = 'REQUEST_URI';
|
|||||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||||
| For more information please see the user guide:
|
| For more information please see the user guide:
|
||||||
|
|
|
|
||||||
| https://codeigniter.com/user_guide/general/urls.html
|
| https://codeigniter.com/userguide3/general/urls.html
|
||||||
|
|
|
||||||
|
| Note: This option is ignored for CLI requests.
|
||||||
*/
|
*/
|
||||||
$config['url_suffix'] = '';
|
$config['url_suffix'] = '';
|
||||||
|
|
||||||
@@ -90,7 +92,7 @@ $config['language'] = 'english';
|
|||||||
| This determines which character set is used by default in various methods
|
| This determines which character set is used by default in various methods
|
||||||
| that require a character set to be provided.
|
| that require a character set to be provided.
|
||||||
|
|
|
|
||||||
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
| See https://secure.php.net/htmlspecialchars for a list of supported charsets.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['charset'] = 'UTF-8';
|
$config['charset'] = 'UTF-8';
|
||||||
@@ -114,8 +116,8 @@ $config['enable_hooks'] = FALSE;
|
|||||||
| This item allows you to set the filename/classname prefix when extending
|
| This item allows you to set the filename/classname prefix when extending
|
||||||
| native libraries. For more information please see the user guide:
|
| native libraries. For more information please see the user guide:
|
||||||
|
|
|
|
||||||
| https://codeigniter.com/user_guide/general/core_classes.html
|
| https://codeigniter.com/userguide3/general/core_classes.html
|
||||||
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
| https://codeigniter.com/userguide3/general/creating_libraries.html
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['subclass_prefix'] = 'MY_';
|
$config['subclass_prefix'] = 'MY_';
|
||||||
@@ -135,7 +137,7 @@ $config['subclass_prefix'] = 'MY_';
|
|||||||
|
|
|
|
||||||
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
||||||
|
|
|
|
||||||
| For more information about Composer, please visit http://getcomposer.org/
|
| For more information about Composer, please visit https://getcomposer.org/
|
||||||
|
|
|
|
||||||
| Note: This will NOT disable or override the CodeIgniter-specific
|
| Note: This will NOT disable or override the CodeIgniter-specific
|
||||||
| autoloading (application/config/autoload.php)
|
| autoloading (application/config/autoload.php)
|
||||||
@@ -161,6 +163,8 @@ $config['composer_autoload'] = FALSE;
|
|||||||
|
|
|
|
||||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||||
|
|
|
|
||||||
|
| Note: This option is ignored for CLI requests.
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||||
|
|
||||||
@@ -191,20 +195,6 @@ $config['controller_trigger'] = 'c';
|
|||||||
$config['function_trigger'] = 'm';
|
$config['function_trigger'] = 'm';
|
||||||
$config['directory_trigger'] = 'd';
|
$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
|
| Error Logging Threshold
|
||||||
@@ -235,21 +225,32 @@ $config['log_threshold'] = 1;
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Leave this BLANK unless you would like to set something other than the default
|
| 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.
|
| application/logs/ directory. Use a full server path.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['log_path'] = '';
|
$config['log_path'] = '';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Log File Extension
|
| Error Logging FILENAME
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The default filename extension for log files. The default 'php' allows for
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
| protecting the log files via basic scripting, when they are to be stored
|
| 'log-'.date('Y-m-d').'.php'. No DIRECTORY_SEPARATOR(s), just the filename.
|
||||||
| under a publicly accessible directory.
|
|
||||||
|
|
|
|
||||||
| Note: Leaving it blank will default to 'php'.
|
*/
|
||||||
|
$config['log_filename'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log File Extension (DEPRECATED)
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option is deprecated. Use 'log_filename' instead.
|
||||||
|
| Kept for backward compatibility with CI 3.1.x configurations.
|
||||||
|
|
|
||||||
|
| If 'log_filename' is set, this option is ignored.
|
||||||
|
| Example: 'txt' or 'log' (without leading dot)
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['log_file_extension'] = '';
|
$config['log_file_extension'] = '';
|
||||||
@@ -283,7 +284,7 @@ $config['log_date_format'] = 'Y-m-d H:i:s';
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Leave this BLANK unless you would like to set something other than the default
|
| 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.
|
| application/views/errors/ directory. Use a full server path.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['error_views_path'] = '';
|
$config['error_views_path'] = '';
|
||||||
@@ -294,7 +295,7 @@ $config['error_views_path'] = '';
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Leave this BLANK unless you would like to set something other than the default
|
| 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.
|
| application/cache/ directory. Use a full server path.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['cache_path'] = '';
|
$config['cache_path'] = '';
|
||||||
@@ -325,7 +326,7 @@ $config['cache_query_string'] = FALSE;
|
|||||||
| If you use the Encryption class, you must set an encryption key.
|
| If you use the Encryption class, you must set an encryption key.
|
||||||
| See the user guide for more info.
|
| See the user guide for more info.
|
||||||
|
|
|
|
||||||
| https://codeigniter.com/user_guide/libraries/encryption.html
|
| https://codeigniter.com/userguide3/libraries/encryption.html
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['encryption_key'] = '';
|
$config['encryption_key'] = '';
|
||||||
@@ -343,6 +344,10 @@ $config['encryption_key'] = '';
|
|||||||
|
|
|
|
||||||
| The session cookie name, must contain only [0-9a-z_-] characters
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
||||||
|
|
|
|
||||||
|
| 'sess_samesite'
|
||||||
|
|
|
||||||
|
| Session cookie SameSite attribute: Lax (default), Strict or None
|
||||||
|
|
|
||||||
| 'sess_expiration'
|
| 'sess_expiration'
|
||||||
|
|
|
|
||||||
| The number of SECONDS you want the session to last.
|
| The number of SECONDS you want the session to last.
|
||||||
@@ -383,6 +388,7 @@ $config['encryption_key'] = '';
|
|||||||
*/
|
*/
|
||||||
$config['sess_driver'] = 'files';
|
$config['sess_driver'] = 'files';
|
||||||
$config['sess_cookie_name'] = 'ci_session';
|
$config['sess_cookie_name'] = 'ci_session';
|
||||||
|
$config['sess_samesite'] = 'Lax';
|
||||||
$config['sess_expiration'] = 7200;
|
$config['sess_expiration'] = 7200;
|
||||||
$config['sess_save_path'] = NULL;
|
$config['sess_save_path'] = NULL;
|
||||||
$config['sess_match_ip'] = FALSE;
|
$config['sess_match_ip'] = FALSE;
|
||||||
@@ -399,6 +405,7 @@ $config['sess_regenerate_destroy'] = FALSE;
|
|||||||
| 'cookie_path' = Typically will be a forward slash
|
| 'cookie_path' = Typically will be a forward slash
|
||||||
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
|
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
|
||||||
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
||||||
|
| 'cookie_samesite' = Cookie's samesite attribute (Lax, Strict or None)
|
||||||
|
|
|
|
||||||
| Note: These settings (with the exception of 'cookie_prefix' and
|
| Note: These settings (with the exception of 'cookie_prefix' and
|
||||||
| 'cookie_httponly') will also affect sessions.
|
| 'cookie_httponly') will also affect sessions.
|
||||||
@@ -409,34 +416,7 @@ $config['cookie_domain'] = '';
|
|||||||
$config['cookie_path'] = '/';
|
$config['cookie_path'] = '/';
|
||||||
$config['cookie_secure'] = FALSE;
|
$config['cookie_secure'] = FALSE;
|
||||||
$config['cookie_httponly'] = FALSE;
|
$config['cookie_httponly'] = FALSE;
|
||||||
|
$config['cookie_samesite'] = 'Lax';
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Standardize newlines
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Determines whether to standardize newline characters in input data,
|
|
||||||
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
|
||||||
|
|
|
||||||
| WARNING: This feature is DEPRECATED and currently available only
|
|
||||||
| for backwards compatibility purposes!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['standardize_newlines'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Global XSS Filtering
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Determines whether the XSS filter is always active when GET, POST or
|
|
||||||
| COOKIE data is encountered
|
|
||||||
|
|
|
||||||
| WARNING: This feature is DEPRECATED and currently available only
|
|
||||||
| for backwards compatibility purposes!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['global_xss_filtering'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -494,20 +474,6 @@ $config['compress_output'] = FALSE;
|
|||||||
*/
|
*/
|
||||||
$config['time_reference'] = 'local';
|
$config['time_reference'] = 'local';
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Rewrite PHP Short Tags
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If your PHP installation does not have short tag support enabled CI
|
|
||||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
|
||||||
| in your view files. Options are TRUE or FALSE (boolean)
|
|
||||||
|
|
|
||||||
| Note: You need to have eval() enabled for this to work.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
$config['rewrite_short_tags'] = FALSE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Reverse Proxy IPs
|
| Reverse Proxy IPs
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
| MIME TYPES
|
| MIME TYPES
|
||||||
| -------------------------------------------------------------------
|
| -------------------------------------------------------------------
|
||||||
| This file contains an array of mime types. It is used by the
|
| This file contains an array of mime types. It is used by the
|
||||||
| Upload class to help identify allowed file types.
|
| Upload class to help identify allowed file types.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
@@ -85,9 +85,11 @@ return array(
|
|||||||
'jpm' => 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'),
|
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
'mjp2' => 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'),
|
'png' => array('image/png', 'image/x-png'),
|
||||||
'tiff' => 'image/tiff',
|
'tiff' => 'image/tiff',
|
||||||
'tif' => 'image/tiff',
|
'tif' => 'image/tiff',
|
||||||
|
'heic' => 'image/heic',
|
||||||
|
'heif' => 'image/heif',
|
||||||
'css' => array('text/css', 'text/plain'),
|
'css' => array('text/css', 'text/plain'),
|
||||||
'html' => array('text/html', 'text/plain'),
|
'html' => array('text/html', 'text/plain'),
|
||||||
'htm' => array('text/html', 'text/plain'),
|
'htm' => array('text/html', 'text/plain'),
|
||||||
@@ -114,7 +116,7 @@ return array(
|
|||||||
'word' => array('application/msword', 'application/octet-stream'),
|
'word' => array('application/msword', 'application/octet-stream'),
|
||||||
'xl' => 'application/excel',
|
'xl' => 'application/excel',
|
||||||
'eml' => 'message/rfc822',
|
'eml' => 'message/rfc822',
|
||||||
'json' => array('application/json', 'text/json'),
|
'json' => array('application/json', 'text/json', 'text/plain'),
|
||||||
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
|
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
|
||||||
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
|
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
|
||||||
'p12' => 'application/x-pkcs12',
|
'p12' => 'application/x-pkcs12',
|
||||||
@@ -160,7 +162,7 @@ return array(
|
|||||||
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
|
'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'),
|
'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'),
|
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
|
||||||
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
|
'svg' => array('image/svg+xml', 'image/svg', 'application/xml', 'text/xml'),
|
||||||
'vcf' => 'text/x-vcard',
|
'vcf' => 'text/x-vcard',
|
||||||
'srt' => array('text/srt', 'text/plain'),
|
'srt' => array('text/srt', 'text/plain'),
|
||||||
'vtt' => array('text/vtt', 'text/plain'),
|
'vtt' => array('text/vtt', 'text/plain'),
|
||||||
@@ -180,5 +182,6 @@ return array(
|
|||||||
'odt' => 'application/vnd.oasis.opendocument.text',
|
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||||
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||||
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||||
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
'oth' => 'application/vnd.oasis.opendocument.text-web',
|
||||||
|
'webp' => 'image/webp'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ $platforms = array(
|
|||||||
$browsers = array(
|
$browsers = array(
|
||||||
'OPR' => 'Opera',
|
'OPR' => 'Opera',
|
||||||
'Flock' => 'Flock',
|
'Flock' => 'Flock',
|
||||||
'Edge' => 'Edge',
|
'Edge' => 'Edge Legacy',
|
||||||
|
'Edg' => 'Edge',
|
||||||
'Chrome' => 'Chrome',
|
'Chrome' => 'Chrome',
|
||||||
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
||||||
'Opera.*?Version' => 'Opera',
|
'Opera.*?Version' => 'Opera',
|
||||||
@@ -87,7 +88,8 @@ $browsers = array(
|
|||||||
'amaya' => 'Amaya',
|
'amaya' => 'Amaya',
|
||||||
'IBrowse' => 'IBrowse',
|
'IBrowse' => 'IBrowse',
|
||||||
'Maxthon' => 'Maxthon',
|
'Maxthon' => 'Maxthon',
|
||||||
'Ubuntu' => 'Ubuntu Web Browser'
|
'Ubuntu' => 'Ubuntu Web Browser',
|
||||||
|
'Vivaldi' => 'Vivaldi'
|
||||||
);
|
);
|
||||||
|
|
||||||
$mobiles = array(
|
$mobiles = array(
|
||||||
@@ -152,6 +154,11 @@ $mobiles = array(
|
|||||||
'open web' => 'Open Web',
|
'open web' => 'Open Web',
|
||||||
'openweb' => 'OpenWeb',
|
'openweb' => 'OpenWeb',
|
||||||
'meizu' => 'Meizu',
|
'meizu' => 'Meizu',
|
||||||
|
'huawei' => 'Huawei',
|
||||||
|
'xiaomi' => 'Xiaomi',
|
||||||
|
'oppo' => 'Oppo',
|
||||||
|
'vivo' => 'Vivo',
|
||||||
|
'infinix' => 'Infinix',
|
||||||
|
|
||||||
// Operating Systems
|
// Operating Systems
|
||||||
'android' => 'Android',
|
'android' => 'Android',
|
||||||
@@ -212,5 +219,6 @@ $robots = array(
|
|||||||
'curious george' => 'Curious George',
|
'curious george' => 'Curious George',
|
||||||
'ia_archiver' => 'Alexa Crawler',
|
'ia_archiver' => 'Alexa Crawler',
|
||||||
'MJ12bot' => 'Majestic-12',
|
'MJ12bot' => 'Majestic-12',
|
||||||
'Uptimebot' => 'Uptimebot'
|
'Uptimebot' => 'Uptimebot',
|
||||||
|
'UptimeRobot' => 'UptimeRobot'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class Nivoprofielen extends MY_controller {
|
|||||||
"naam" => "Gebruikersactiviteiten/inhouden",
|
"naam" => "Gebruikersactiviteiten/inhouden",
|
||||||
"omschrijving" => 'activiteiten aangemaakt door niet-framework gebruikers');
|
"omschrijving" => 'activiteiten aangemaakt door niet-framework gebruikers');
|
||||||
$pijlers=$this->Pijlers_model->get_pijlers($versieID);
|
$pijlers=$this->Pijlers_model->get_pijlers($versieID);
|
||||||
array_push($pijlers, $pijlernul);
|
if (is_array($pijlers)) array_push($pijlers, $pijlernul);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$pijlers= array(array("id" => 0,
|
$pijlers= array(array("id" => 0,
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ class Partituur extends MY_Controller {
|
|||||||
$wenssituaties = $this->Wenssituaties_model->getgewenstvoorpartituur($ovid,$this->globorgid);
|
$wenssituaties = $this->Wenssituaties_model->getgewenstvoorpartituur($ovid,$this->globorgid);
|
||||||
foreach($scores as $score) {
|
foreach($scores as $score) {
|
||||||
$waarde = 1;
|
$waarde = 1;
|
||||||
$res= round($score->somscore / $score->num);
|
$res= round($score->num != 0 ? $score->somscore / $score->num : 0);
|
||||||
$waarde= $this->kleurcodes->getnummer($res);
|
$waarde= $this->kleurcodes->getnummer($res);
|
||||||
|
|
||||||
switch ($score->nummer){
|
switch ($score->nummer){
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ class Planning extends MY_controller {
|
|||||||
$partpijler = $this->ModPartPijlers->get_record_by_id($ppijlerID, FALSE,TRUE);
|
$partpijler = $this->ModPartPijlers->get_record_by_id($ppijlerID, FALSE,TRUE);
|
||||||
$seq = $this->input->post('selSeq');
|
$seq = $this->input->post('selSeq');
|
||||||
|
|
||||||
if ($this->clean_input('positie') == 'na') {$seq = $seq + 1; }
|
if ($this->clean_input('positie') == 'na') {$seq = (int)$seq + 1; }
|
||||||
else {$seq = $seq - 1;};
|
else {$seq = (int)$seq - 1;};
|
||||||
$data = array('sequence' => $seq,
|
$data = array('sequence' => $seq,
|
||||||
'partituurID' => $partID,
|
'partituurID' => $partID,
|
||||||
'pijlerID' => $ppijlerID,
|
'pijlerID' => $ppijlerID,
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ class Reports extends MY_Controller {
|
|||||||
$post = $this->input->get('data');
|
$post = $this->input->get('data');
|
||||||
$post = json_decode($this->input->get('data'));
|
$post = json_decode($this->input->get('data'));
|
||||||
if ($init==1) {
|
if ($init==1) {
|
||||||
|
if ($post === null) $post = new stdClass;
|
||||||
$post->orgid = $this->globorgid;
|
$post->orgid = $this->globorgid;
|
||||||
$post = json_encode($post);
|
$post = json_encode($post);
|
||||||
$titel =array("titeltekst" => "Mensen/activiteiten");
|
$titel =array("titeltekst" => "Mensen/activiteiten");
|
||||||
@@ -224,6 +225,7 @@ class Reports extends MY_Controller {
|
|||||||
else {
|
else {
|
||||||
$criteria=json_decode($this->input->get("data")) ;
|
$criteria=json_decode($this->input->get("data")) ;
|
||||||
if (!$pdf){
|
if (!$pdf){
|
||||||
|
if ($criteria === null) $criteria = new stdClass;
|
||||||
$criteria->orgid = $this->globorgid;
|
$criteria->orgid = $this->globorgid;
|
||||||
};
|
};
|
||||||
// hier dan de database activiteiten die nodig zijn voor het report
|
// hier dan de database activiteiten die nodig zijn voor het report
|
||||||
@@ -398,6 +400,7 @@ class Reports extends MY_Controller {
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($criteria->BGs as $BGid) {
|
foreach($criteria->BGs as $BGid) {
|
||||||
$orgs[$i]= $this->Organisaties_model->get_BG_by_id($BGid);
|
$orgs[$i]= $this->Organisaties_model->get_BG_by_id($BGid);
|
||||||
|
if (! $orgs[$i]) $orgs[$i] = new stdClass();
|
||||||
$orgs[$i]->organisaties = $this->Organisaties_model->get_orgs_per_bg($BGid);
|
$orgs[$i]->organisaties = $this->Organisaties_model->get_orgs_per_bg($BGid);
|
||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
};
|
};
|
||||||
@@ -671,7 +674,7 @@ class Reports extends MY_Controller {
|
|||||||
$beelden=$this->Niveaus_model->get_niveaus();
|
$beelden=$this->Niveaus_model->get_niveaus();
|
||||||
$beelden2=array();
|
$beelden2=array();
|
||||||
foreach($beelden as $beeld){
|
foreach($beelden as $beeld){
|
||||||
if (in_array($beeld->id, $criteria->beelden) ) {
|
if (is_array($criteria->beelden) && in_array($beeld->id, $criteria->beelden) ) {
|
||||||
array_push($beelden2 , $beeld);
|
array_push($beelden2 , $beeld);
|
||||||
$profielen[] = $this->Nivoprofielen_model->get_profielen_profiel($beeld->id);
|
$profielen[] = $this->Nivoprofielen_model->get_profielen_profiel($beeld->id);
|
||||||
};
|
};
|
||||||
@@ -682,7 +685,7 @@ class Reports extends MY_Controller {
|
|||||||
$pijlers[$i]= new stdClass;
|
$pijlers[$i]= new stdClass;
|
||||||
$pijlers[$i]->naam = $voorbeeld->naam;
|
$pijlers[$i]->naam = $voorbeeld->naam;
|
||||||
$pijlers[$i]->score=array();
|
$pijlers[$i]->score=array();
|
||||||
for ($j=0; $j < count($criteria->beelden );$j++ ){
|
for ($j=0; $j < count((array)$criteria->beelden );$j++ ){
|
||||||
$pijlers[$i]->score[$j]=$profielen[$j][$i]->waarde;
|
$pijlers[$i]->score[$j]=$profielen[$j][$i]->waarde;
|
||||||
};
|
};
|
||||||
$i= $i+1;
|
$i= $i+1;
|
||||||
@@ -691,7 +694,7 @@ class Reports extends MY_Controller {
|
|||||||
foreach($criteria->beelden as $beeld){
|
foreach($criteria->beelden as $beeld){
|
||||||
array_push($descriptions , $this->Niveaus_model->get_niveau($beeld));
|
array_push($descriptions , $this->Niveaus_model->get_niveau($beeld));
|
||||||
};
|
};
|
||||||
$data = array( 'aantal' =>count($criteria->beelden) ,
|
$data = array( 'aantal' =>count((array)$criteria->beelden) ,
|
||||||
'beelden' =>$beelden2,
|
'beelden' =>$beelden2,
|
||||||
'pijlers' =>$pijlers,
|
'pijlers' =>$pijlers,
|
||||||
'descriptions' =>$descriptions,
|
'descriptions' =>$descriptions,
|
||||||
@@ -714,6 +717,7 @@ class Reports extends MY_Controller {
|
|||||||
$post = json_decode($this->input->get('data'));
|
$post = json_decode($this->input->get('data'));
|
||||||
|
|
||||||
if ($init==1) {
|
if ($init==1) {
|
||||||
|
if ($post === null) $post = new stdClass;
|
||||||
$post->orgid = $this->globorgid;
|
$post->orgid = $this->globorgid;
|
||||||
$post = json_encode($post);
|
$post = json_encode($post);
|
||||||
$titel =array("titeltekst" => "Eigen schoolbeeld");
|
$titel =array("titeltekst" => "Eigen schoolbeeld");
|
||||||
@@ -722,6 +726,7 @@ class Reports extends MY_Controller {
|
|||||||
else {
|
else {
|
||||||
$criteria=json_decode($this->input->get("data")) ;
|
$criteria=json_decode($this->input->get("data")) ;
|
||||||
if (!$pdf){
|
if (!$pdf){
|
||||||
|
if ($criteria === null) $criteria = new stdClass;
|
||||||
$criteria->orgid = $this->globorgid;
|
$criteria->orgid = $this->globorgid;
|
||||||
};
|
};
|
||||||
$orgnaam=$this->Organisaties_model->get_record_by_id($criteria->orgid,"naam");
|
$orgnaam=$this->Organisaties_model->get_record_by_id($criteria->orgid,"naam");
|
||||||
@@ -948,7 +953,7 @@ private function GetMax($code){
|
|||||||
$i = $i + 1;
|
$i = $i + 1;
|
||||||
$j = 0;
|
$j = 0;
|
||||||
};
|
};
|
||||||
$aantal = count( $scholen);
|
$aantal = isset($scholen) ? count( $scholen) : 0;
|
||||||
|
|
||||||
if ($aantal >= 1) {
|
if ($aantal >= 1) {
|
||||||
$k=0;
|
$k=0;
|
||||||
@@ -964,10 +969,10 @@ private function GetMax($code){
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
$grandGem = round($grandGem / ($k * $aantal),0);
|
$grandGem = round(($k * $aantal) != 0 ? $grandGem / ($k * $aantal) : 0,0);
|
||||||
$grandSchoolbeeld = $this->GetBeeldGem($grandGem );
|
$grandSchoolbeeld = $this->GetBeeldGem($grandGem );
|
||||||
|
|
||||||
$grandProf = round($grandProf / (7 * $aantal), 0);
|
$grandProf = round($aantal != 0 ? $grandProf / (7 * $aantal) : 0, 0);
|
||||||
$SBcolor = $this->GetColorBijBeeld($grandSchoolbeeld);
|
$SBcolor = $this->GetColorBijBeeld($grandSchoolbeeld);
|
||||||
|
|
||||||
$data = array( 'pijlers' =>$pijlers,
|
$data = array( 'pijlers' =>$pijlers,
|
||||||
@@ -995,6 +1000,7 @@ private function GetMax($code){
|
|||||||
$init = $this->uri->segment(5);
|
$init = $this->uri->segment(5);
|
||||||
$post = json_decode($this->input->get('data'));
|
$post = json_decode($this->input->get('data'));
|
||||||
if ($init==1) {
|
if ($init==1) {
|
||||||
|
if ($post === null) $post = new stdClass;
|
||||||
$post->role = $this->userrole;
|
$post->role = $this->userrole;
|
||||||
$post->userid = $this->userid;
|
$post->userid = $this->userid;
|
||||||
$post->orgid = $this->globorgid;
|
$post->orgid = $this->globorgid;
|
||||||
@@ -1006,6 +1012,7 @@ private function GetMax($code){
|
|||||||
else {
|
else {
|
||||||
$criteria=json_decode($this->input->get("data")) ;
|
$criteria=json_decode($this->input->get("data")) ;
|
||||||
if (!$pdf){
|
if (!$pdf){
|
||||||
|
if ($criteria === null) $criteria = new stdClass;
|
||||||
$criteria->userlevel = $this->userrole;
|
$criteria->userlevel = $this->userrole;
|
||||||
$criteria->userid = $this->userid;
|
$criteria->userid = $this->userid;
|
||||||
$criteria->orgid = $this->globorgid;
|
$criteria->orgid = $this->globorgid;
|
||||||
|
|||||||
@@ -274,6 +274,7 @@ class Monfin2overzicht extends MY_Controller{
|
|||||||
}
|
}
|
||||||
$index += 1;
|
$index += 1;
|
||||||
};
|
};
|
||||||
|
if (! isset($somasarray[0])) $somasarray[0] = new stdClass();
|
||||||
$somasarray[0]->som = $regelsom;
|
$somasarray[0]->som = $regelsom;
|
||||||
$somasarray[0]->budgetsom = $regelsom2;
|
$somasarray[0]->budgetsom = $regelsom2;
|
||||||
$somasarray[0]->budgetrestant = $regelsom2 - $regelsom;
|
$somasarray[0]->budgetrestant = $regelsom2 - $regelsom;
|
||||||
@@ -304,6 +305,7 @@ class Monfin2overzicht extends MY_Controller{
|
|||||||
$grandtot->verschilGeb =0;
|
$grandtot->verschilGeb =0;
|
||||||
|
|
||||||
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
if (! $targetorg) $targetorg = new stdClass();
|
||||||
$targetorg->bestemmingen = $this->get_bestuur_bestemmingen($targetorgid, $kalenderjaarnr);
|
$targetorg->bestemmingen = $this->get_bestuur_bestemmingen($targetorgid, $kalenderjaarnr);
|
||||||
$targetorg->budgetten = $this->get_bestuur_gebudget($targetorgid, $kalenderjaarnr);
|
$targetorg->budgetten = $this->get_bestuur_gebudget($targetorgid, $kalenderjaarnr);
|
||||||
$verschil = $targetorg->budgetten['som']-$targetorg->bestemmingen['som'];
|
$verschil = $targetorg->budgetten['som']-$targetorg->bestemmingen['som'];
|
||||||
@@ -539,6 +541,7 @@ class Monfin2overzicht extends MY_Controller{
|
|||||||
$targetorgid = $this->clean_input('orgid');
|
$targetorgid = $this->clean_input('orgid');
|
||||||
$kalenderjaarnr = $this->clean_input("jaarnr");
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
if (! $targetorg) $targetorg = new stdClass();
|
||||||
list($targetorg->pms, $targetorg->bud, $targetorg->kleur, $otherorgs) = $this->get_bestuur_pms($targetorgid, $kalenderjaarnr);
|
list($targetorg->pms, $targetorg->bud, $targetorg->kleur, $otherorgs) = $this->get_bestuur_pms($targetorgid, $kalenderjaarnr);
|
||||||
$sumother = $this->getsumotherpms($otherorgs);
|
$sumother = $this->getsumotherpms($otherorgs);
|
||||||
$sumtot = $this->getsumtotpms($targetorg, $sumother);
|
$sumtot = $this->getsumtotpms($targetorg, $sumother);
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ class Berichten extends MY_Controller {
|
|||||||
// $clusters[$y]->vinkje = 'T';
|
// $clusters[$y]->vinkje = 'T';
|
||||||
$s = 0;
|
$s = 0;
|
||||||
$v = $s;
|
$v = $s;
|
||||||
$aantal = count( $clusters[ $y ]->modules );//ga per module na of er een bericht bij hoort, dan true
|
$aantal = is_array( $clusters[ $y ]->modules ) ? count( $clusters[ $y ]->modules ) : 0;//ga per module na of er een bericht bij hoort, dan true
|
||||||
$clusters[ $y ]->aantal = $aantal;
|
$clusters[ $y ]->aantal = $aantal;
|
||||||
for ( $s = 0; $s < $aantal; $s ++ )
|
for ( $s = 0; $s < $aantal; $s ++ )
|
||||||
{
|
{
|
||||||
@@ -311,7 +311,7 @@ class Berichten extends MY_Controller {
|
|||||||
$berichtid = $this->clean_input( "berichtid" );
|
$berichtid = $this->clean_input( "berichtid" );
|
||||||
$clusterid = $this->clean_input( "clusterid" );
|
$clusterid = $this->clean_input( "clusterid" );
|
||||||
$mededeling = "er is iets mis gegaan";
|
$mededeling = "er is iets mis gegaan";
|
||||||
if ( $vinkje && $berichtid && $clusterid >= 0 )
|
if ( $vinkje && $berichtid && (int)$clusterid >= 0 )
|
||||||
{
|
{
|
||||||
$modules = $this->Modules_model->get_records_where( array("cluster_id" => $clusterid) );
|
$modules = $this->Modules_model->get_records_where( array("cluster_id" => $clusterid) );
|
||||||
if ( $vinkje == 'T' )
|
if ( $vinkje == 'T' )
|
||||||
|
|||||||
@@ -124,9 +124,9 @@ class Diversiteit extends MY_Controller{
|
|||||||
$schoolgewogentot = $schoolgewogentot + 24; }
|
$schoolgewogentot = $schoolgewogentot + 24; }
|
||||||
}; // foreach
|
}; // foreach
|
||||||
}// if
|
}// if
|
||||||
$schooldq = round($schooldiversiteit / $schoolgewogentot , 2);
|
if ($schoolgewogentot != 0) $schooldq = round($schooldiversiteit / $schoolgewogentot , 2);
|
||||||
$today = date("d-m-Y");
|
$today = date("d-m-Y");
|
||||||
$aantalgroepen = sizeof($groepen);
|
$aantalgroepen = is_array($groepen) ? sizeof($groepen) : 0;
|
||||||
$richtlijn=array('85%', '10%','3%','25');
|
$richtlijn=array('85%', '10%','3%','25');
|
||||||
$data=array('organisatie' => $organisatie,
|
$data=array('organisatie' => $organisatie,
|
||||||
"schooljaarnaam" => $schooljaarnaam,
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
@@ -183,11 +183,11 @@ class Diversiteit extends MY_Controller{
|
|||||||
|
|
||||||
}; // foreach
|
}; // foreach
|
||||||
}// if
|
}// if
|
||||||
$sbodq = $sbodiversiteit/$sbogewogentot;
|
$sbodq = $sbogewogentot != 0 ? $sbodiversiteit/$sbogewogentot : 0;
|
||||||
$sodq = $sodiversiteit/$sodiversiteit;
|
$sodq = $sodiversiteit != 0 ? $sodiversiteit/$sodiversiteit : 0;
|
||||||
$schooldq = round( $sbodq + $sodq, 2);
|
$schooldq = round( $sbodq + $sodq, 2);
|
||||||
$today = date("d-m-Y");
|
$today = date("d-m-Y");
|
||||||
$aantalgroepen = sizeof($groepen);
|
$aantalgroepen = is_array($groepen) ? sizeof($groepen) : 0;
|
||||||
$richtlijn=array('85%', '10%','3%','25');
|
$richtlijn=array('85%', '10%','3%','25');
|
||||||
$data=array('organisatie' => $organisatie,
|
$data=array('organisatie' => $organisatie,
|
||||||
"schooljaarnaam" => $schooljaarnaam,
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class Groepen extends MY_Controller{
|
|||||||
if (!$this->userid ) die;
|
if (!$this->userid ) die;
|
||||||
$groepid = $this->clean_input('id');
|
$groepid = $this->clean_input('id');
|
||||||
$nivos = $this->clean_input("niveauarray");
|
$nivos = $this->clean_input("niveauarray");
|
||||||
$nstring = implode(';', $nivos);
|
$nstring = is_array($nivos) ? implode(';', $nivos) : null;
|
||||||
|
|
||||||
$data=array('naam' => $this->clean_input('naam'),
|
$data=array('naam' => $this->clean_input('naam'),
|
||||||
'niveau' => $nstring,
|
'niveau' => $nstring,
|
||||||
@@ -388,7 +388,7 @@ class Groepen extends MY_Controller{
|
|||||||
$schooljaarnr = $this->clean_input('schooljaar');
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
$orgid = $this->clean_input('orgid');
|
$orgid = $this->clean_input('orgid');
|
||||||
$module = $this->clean_input('module');
|
$module = $this->clean_input('module');
|
||||||
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> $schooljaarnr - 1,
|
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> (int)$schooljaarnr - 1,
|
||||||
'organisatie_id' =>$orgid,
|
'organisatie_id' =>$orgid,
|
||||||
'schooltype' => 'R',
|
'schooltype' => 'R',
|
||||||
'module' => $module], false, false);
|
'module' => $module], false, false);
|
||||||
@@ -425,7 +425,7 @@ class Groepen extends MY_Controller{
|
|||||||
$schooljaarnr = $this->clean_input('schooljaar');
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
$orgid = $this->clean_input('orgid');
|
$orgid = $this->clean_input('orgid');
|
||||||
|
|
||||||
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> $schooljaarnr - 1,
|
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> (int)$schooljaarnr - 1,
|
||||||
'organisatie_id' =>$orgid,
|
'organisatie_id' =>$orgid,
|
||||||
'schooltype' => 'R',
|
'schooltype' => 'R',
|
||||||
'module' => 270], false, false);
|
'module' => 270], false, false);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class Overzichtsop extends MY_Controller{
|
|||||||
{
|
{
|
||||||
if (!$this->userid) die;
|
if (!$this->userid) die;
|
||||||
$schooljaarnr = $this->clean_input("schooljaarnr");
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
$criteriumID = $this->clean_input("criteriumID");
|
$criteriumID = (int)$this->clean_input("criteriumID");
|
||||||
|
|
||||||
$organisatie = $this->Organisaties_model->getorg($this->globorgid);
|
$organisatie = $this->Organisaties_model->getorg($this->globorgid);
|
||||||
$organisatie->sop = 'F';
|
$organisatie->sop = 'F';
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class Rapijkpunten extends MY_Controller{
|
|||||||
$soort = $this->Organisaties_model->get_fieldvalue(array("id"=>$this->globorgid), 'soort' );
|
$soort = $this->Organisaties_model->get_fieldvalue(array("id"=>$this->globorgid), 'soort' );
|
||||||
$level123 = false;
|
$level123 = false;
|
||||||
|
|
||||||
if ($soort > 0 && soort < 4) {
|
if ($soort > 0 && $soort < 4) {
|
||||||
$level123 == true;
|
$level123 == true;
|
||||||
}
|
}
|
||||||
echo json_encode($level123);
|
echo json_encode($level123);
|
||||||
|
|||||||
@@ -76,12 +76,12 @@ class Rapmatrix extends MY_Controller
|
|||||||
{
|
{
|
||||||
$orgID = $this->clean_input('orgid');
|
$orgID = $this->clean_input('orgid');
|
||||||
$orgsoort = $this->clean_input('orgsoort');
|
$orgsoort = $this->clean_input('orgsoort');
|
||||||
$criteriumID = $this->clean_input('criteriumid');
|
$criteriumID = (int)$this->clean_input('criteriumid');
|
||||||
$orgversieID = $this->clean_input('orgversieid');
|
$orgversieID = $this->clean_input('orgversieid');
|
||||||
$toporg = $this->clean_input('toporg');
|
$toporg = $this->clean_input('toporg');
|
||||||
$ijkpunten = $this->Ijkpunten_model->getijkpuntenMetIndicatoren($orgversieID);
|
$ijkpunten = $this->Ijkpunten_model->getijkpuntenMetIndicatoren($orgversieID);
|
||||||
|
|
||||||
$aantalY = count($ijkpunten);
|
$aantalY = is_array($ijkpunten) ? count($ijkpunten) : 0;
|
||||||
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
||||||
|
|
||||||
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieID);
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieID);
|
||||||
@@ -129,7 +129,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
function haalInspectieScoresOp(){
|
function haalInspectieScoresOp(){
|
||||||
$orgID = $this->clean_input('orgid');
|
$orgID = $this->clean_input('orgid');
|
||||||
$orgsoort = $this->clean_input('orgsoort');
|
$orgsoort = $this->clean_input('orgsoort');
|
||||||
$criteriumID = $this->clean_input('criteriumid');
|
$criteriumID = (int)$this->clean_input('criteriumid');
|
||||||
$orgversieID = $this->clean_input('orgversieid');
|
$orgversieID = $this->clean_input('orgversieid');
|
||||||
|
|
||||||
$ijkpunten = $this->Orgversies_model->getijkpunten($orgversieID);
|
$ijkpunten = $this->Orgversies_model->getijkpunten($orgversieID);
|
||||||
@@ -153,7 +153,7 @@ class Rapmatrix extends MY_Controller
|
|||||||
echo json_encode(
|
echo json_encode(
|
||||||
array("labels" => $labels,
|
array("labels" => $labels,
|
||||||
"ijkpunten" => $ijkpunten,
|
"ijkpunten" => $ijkpunten,
|
||||||
"aantalY" => count($ijkpunten),
|
"aantalY" => is_array($ijkpunten) ? count($ijkpunten) : 0,
|
||||||
"uitslagen" => $uitslagen,
|
"uitslagen" => $uitslagen,
|
||||||
"kleurtabel" => $kleurtabel));
|
"kleurtabel" => $kleurtabel));
|
||||||
}
|
}
|
||||||
@@ -628,7 +628,7 @@ return $labels;
|
|||||||
|
|
||||||
private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
private function getGemiddeldeScores($labels, $ijkpunten, $kleuren, $scoretype){
|
||||||
|
|
||||||
$aantalY = count($ijkpunten);
|
$aantalY = is_array($ijkpunten) ? count($ijkpunten) : 0;
|
||||||
$waarden = 0;
|
$waarden = 0;
|
||||||
$nvt = [];
|
$nvt = [];
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
$orgversieid = $this->clean_input( "orgversionid" );
|
$orgversieid = $this->clean_input( "orgversionid" );
|
||||||
$orguserid = $this->clean_input( "orguserid" );
|
$orguserid = $this->clean_input( "orguserid" );
|
||||||
|
|
||||||
if ( $orguserid == 0 )
|
if ( (int)$orguserid == 0 )
|
||||||
{
|
{
|
||||||
$orguserid = NULL;
|
$orguserid = NULL;
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ class Rapontwikkel extends MY_Controller {
|
|||||||
|
|
||||||
if ($werktEr)
|
if ($werktEr)
|
||||||
{
|
{
|
||||||
if ( pow( 4, $orgsoort ) == $this->userrole)
|
if ( pow( 4, (int)$orgsoort ) == $this->userrole)
|
||||||
{
|
{
|
||||||
$rechten = TRUE;
|
$rechten = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class Schoolgegevens extends MY_Controller{
|
|||||||
|
|
||||||
// als nivo < 10 alleen verwijderen via accounts
|
// als nivo < 10 alleen verwijderen via accounts
|
||||||
$autorisatienivo = $this->Autorisaties_model->get(['orguser_id' =>$orguser->id], 'nivo_id', true);
|
$autorisatienivo = $this->Autorisaties_model->get(['orguser_id' =>$orguser->id], 'nivo_id', true);
|
||||||
if ($autorisatienivo != 10) $errorstring += " Deze gebruiker mag alleen verwijderd worden via accounts.";
|
if ($autorisatienivo != 10) $errorstring .= " Deze gebruiker mag alleen verwijderd worden via accounts.";
|
||||||
|
|
||||||
if ($errorstring <= ''){
|
if ($errorstring <= ''){
|
||||||
$this->Autorisaties_model->update_record_where(['nivo_id'=>100], ['orguser_id' =>$orguser->id]);
|
$this->Autorisaties_model->update_record_where(['nivo_id'=>100], ['orguser_id' =>$orguser->id]);
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ class Sop extends MY_Controller{
|
|||||||
$sopkeuze = (new Sopkeuze($sopid));
|
$sopkeuze = (new Sopkeuze($sopid));
|
||||||
$labels = $sopkeuze->getLabels();
|
$labels = $sopkeuze->getLabels();
|
||||||
$soplabels = $sopkeuze->getHoofdstukLabels();
|
$soplabels = $sopkeuze->getHoofdstukLabels();
|
||||||
$aantal = count($soplabels);
|
$aantal = is_array($soplabels) ? count($soplabels) : 0;
|
||||||
$tweedeid='';
|
$tweedeid='';
|
||||||
if($aantal > 1) {
|
if($aantal > 1) {
|
||||||
$tweede = $soplabels[1];
|
$tweede = $soplabels[1];
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class Sortering extends MY_Controller {
|
|||||||
$label->sortering_id = $criterium->id;
|
$label->sortering_id = $criterium->id;
|
||||||
$label->naam ='niet ingedeeld';
|
$label->naam ='niet ingedeeld';
|
||||||
$label->volgorde = 'LAATST';
|
$label->volgorde = 'LAATST';
|
||||||
array_push($labels, $label);
|
if (is_array($labels)) array_push($labels, $label);
|
||||||
$criterium->labels = $labels;
|
$criterium->labels = $labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class Sortering extends MY_Controller {
|
|||||||
$label->sortering_id = $criteriumid;
|
$label->sortering_id = $criteriumid;
|
||||||
$label->naam ='niet ingedeeld';
|
$label->naam ='niet ingedeeld';
|
||||||
$label->volgorde = 'LAATST';
|
$label->volgorde = 'LAATST';
|
||||||
array_push($labels, $label);
|
if (is_array($labels)) array_push($labels, $label);
|
||||||
$swv = $this->Organisaties_model->get_record_by_id($swvid);
|
$swv = $this->Organisaties_model->get_record_by_id($swvid);
|
||||||
$swv->kamers = $this->Organisaties_model->getorgsvanaf($swvid);
|
$swv->kamers = $this->Organisaties_model->getorgsvanaf($swvid);
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class Streefcijfers extends MY_Controller{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ambitie = $this->Ambities_model->mh_get_ambities($module, $this->globorgid, $this->globorgid);
|
$ambitie = $this->Ambities_model->mh_get_ambities($module, $this->globorgid, $this->globorgid);
|
||||||
if($ambitie) $ambities = array_merge($ambities,$ambitie);
|
if($ambitie) $ambities = is_array($ambities) ? array_merge($ambities,$ambitie) : null; // PHP 7 gaf null bij $ambities === false
|
||||||
else{
|
else{
|
||||||
$standaardSWVNodig = true;
|
$standaardSWVNodig = true;
|
||||||
$orgversie = $this->Orgversies_model->getOrgVersie($this->globorgid, $module);
|
$orgversie = $this->Orgversies_model->getOrgVersie($this->globorgid, $module);
|
||||||
@@ -345,6 +345,7 @@ class Streefcijfers extends MY_Controller{
|
|||||||
// $ambitie->aantalY = $this->Ijkpunten_model->telijkpunten($ambitie->orgversieID);
|
// $ambitie->aantalY = $this->Ijkpunten_model->telijkpunten($ambitie->orgversieID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (empty($orgversie)) $orgversie = new stdClass(); // PHP 7 maakte hier impliciet een object aan
|
||||||
$orgversie->aantalY = $this->Ijkpunten_model->telijkpunten($orgversie->orgversieID);
|
$orgversie->aantalY = $this->Ijkpunten_model->telijkpunten($orgversie->orgversieID);
|
||||||
$orgversie->ambitievan = $org->naamkort;
|
$orgversie->ambitievan = $org->naamkort;
|
||||||
|
|
||||||
@@ -478,7 +479,7 @@ class Streefcijfers extends MY_Controller{
|
|||||||
// zoek of de ambitie voor een nieuwe organisatie is
|
// zoek of de ambitie voor een nieuwe organisatie is
|
||||||
$alaanwezig = $this->Ambities_model->check_for_record(array("organisatie_id"=>$this->globorgid,
|
$alaanwezig = $this->Ambities_model->check_for_record(array("organisatie_id"=>$this->globorgid,
|
||||||
"orgversie_id" => $this->clean_input("orgversie_id")) );
|
"orgversie_id" => $this->clean_input("orgversie_id")) );
|
||||||
if ($id ==0 || !$alaanwezig ){
|
if ((int)$id ==0 || !$alaanwezig ){
|
||||||
$data=array("organisatie_id" => $this->globorgid,
|
$data=array("organisatie_id" => $this->globorgid,
|
||||||
"orgversie_id" => $this->clean_input("orgversie_id"),
|
"orgversie_id" => $this->clean_input("orgversie_id"),
|
||||||
"gem_score" => $this->clean_input("gemscore"),
|
"gem_score" => $this->clean_input("gemscore"),
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Filefolders extends MY_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function magDelete($fileid){
|
private function magDelete($fileid){
|
||||||
$owner = $this->Files_model->get(['id'=>$fileid],owner,true);
|
$owner = $this->Files_model->get(['id'=>$fileid],'owner',true);
|
||||||
if ($owner == $this->userid) return true;
|
if ($owner == $this->userid) return true;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class Functies extends MY_Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($functies && sizeof($functies > 1)) {
|
if ($functies) {
|
||||||
$test = (array)$functies;
|
$test = (array)$functies;
|
||||||
usort($test, array($this, 'opDoelgroep'));
|
usort($test, array($this, 'opDoelgroep'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class Organisaties extends MY_Controller{
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$orgs = $this->Organisaties_model->getuserorgs($this->userid);
|
$orgs = $this->Organisaties_model->getuserorgs($this->userid);
|
||||||
if (count($orgs) == 1) $orgs = null; // als er maar 1 organisatie is , kan de gebruiker niet switchen
|
if (!$orgs || count($orgs) == 1) $orgs = null; // als er maar 1 organisatie is , kan de gebruiker niet switchen
|
||||||
}
|
}
|
||||||
echo json_encode($orgs);
|
echo json_encode($orgs);
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@ class Organisaties extends MY_Controller{
|
|||||||
$zoekstr = $this->input->post("zoekstring");
|
$zoekstr = $this->input->post("zoekstring");
|
||||||
$results = $this->Organisaties_model->zoekorgs($zoekstr);
|
$results = $this->Organisaties_model->zoekorgs($zoekstr);
|
||||||
if (!$results){$errortekst = "Geen resultaten gevonden";};
|
if (!$results){$errortekst = "Geen resultaten gevonden";};
|
||||||
if (count($results) > 150) {
|
if ($results && count($results) > 150) {
|
||||||
$errortekst ="Teveel overeenkomende gegevens gevonden. Maak uw zoekcriteria specifieker.";
|
$errortekst ="Teveel overeenkomende gegevens gevonden. Maak uw zoekcriteria specifieker.";
|
||||||
$results = '';}
|
$results = '';}
|
||||||
echo json_encode(array("results"=>$results, "errortekst" =>$errortekst));
|
echo json_encode(array("results"=>$results, "errortekst" =>$errortekst));
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ class Portal extends MY_Controller {
|
|||||||
|
|
||||||
$licenties = array_merge( $ongeclusterd, $clusters);
|
$licenties = array_merge( $ongeclusterd, $clusters);
|
||||||
usort($licenties, array($this, 'opAlfabet'));
|
usort($licenties, array($this, 'opAlfabet'));
|
||||||
usort($keuze, array($this, 'opAlfabet'));
|
if (is_array($keuze)) usort($keuze, array($this, 'opAlfabet'));
|
||||||
$clusternaam = $this->Licenties_model->get_clusterNaam($clusterId);
|
$clusternaam = $this->Licenties_model->get_clusterNaam($clusterId);
|
||||||
|
|
||||||
$geselecteerd = $this->arrayinArray($licenties, $keuzesarray, $clusterId, $clusternaam);
|
$geselecteerd = $this->arrayinArray($licenties, $keuzesarray, $clusterId, $clusternaam);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class Upload extends MY_Controller {
|
|||||||
}
|
}
|
||||||
private function sharedUpload($fn, $folder, $module,$docID = false){
|
private function sharedUpload($fn, $folder, $module,$docID = false){
|
||||||
$newName = $this->random_str(12);
|
$newName = $this->random_str(12);
|
||||||
$fileExists = $this->CheckFileExists($fn['name'], $module);
|
$fileExists = $this->CheckFileExists(is_array($fn) ? $fn['name'] : '', $module);
|
||||||
// nog afvangen : file exists maar een doc id meegegeven: dan moet de file overschreven worden
|
// nog afvangen : file exists maar een doc id meegegeven: dan moet de file overschreven worden
|
||||||
$error ='';
|
$error ='';
|
||||||
if ($fn) {
|
if ($fn) {
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ class MY_Controller extends CI_Controller{
|
|||||||
|
|
||||||
|
|
||||||
function clean_input($post){
|
function clean_input($post){
|
||||||
return str_replace('null', '', $this->db->escape_str($this->input->post($post), TRUE));
|
return str_replace('null', '', $this->db->escape_str($this->input->post($post) ?? '', TRUE));
|
||||||
}
|
}
|
||||||
function check_online_status() {
|
function check_online_status() {
|
||||||
if ( ! $this->uri->segment( 2 ) || $this->uri->segment( 1 ) == 'login' ) return TRUE;
|
if ( ! $this->uri->segment( 2 ) || $this->uri->segment( 1 ) == 'login' ) return TRUE;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
return date('d-m-Y', strtotime($date));
|
return date('d-m-Y', strtotime($date));
|
||||||
}
|
}
|
||||||
function mysql2bedrag($bedrag){
|
function mysql2bedrag($bedrag){
|
||||||
$bedrag2=number_format($bedrag,2,",",".");
|
$bedrag2=number_format((float)$bedrag,2,",",".");
|
||||||
return $bedrag2;
|
return $bedrag2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1323,7 +1323,7 @@ class FirePHP {
|
|||||||
|
|
||||||
$name = $raw_name;
|
$name = $raw_name;
|
||||||
|
|
||||||
if ($name{0} == "\0") {
|
if ($name[0] == "\0") {
|
||||||
$parts = explode("\0", $name);
|
$parts = explode("\0", $name);
|
||||||
$name = $parts[2];
|
$name = $parts[2];
|
||||||
}
|
}
|
||||||
@@ -1370,7 +1370,7 @@ class FirePHP {
|
|||||||
if (self::is_utf8($Object)) {
|
if (self::is_utf8($Object)) {
|
||||||
return $Object;
|
return $Object;
|
||||||
} else {
|
} else {
|
||||||
return utf8_encode($Object);
|
return mb_convert_encoding((string)$Object, 'UTF-8', 'ISO-8859-1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
@@ -1502,17 +1502,17 @@ class FirePHP {
|
|||||||
case 2:
|
case 2:
|
||||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
return chr(0x07 & (ord($utf8[0]) >> 2))
|
||||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
. chr((0xC0 & (ord($utf8[0]) << 6))
|
||||||
| (0x3F & ord($utf8{1})));
|
| (0x3F & ord($utf8[1])));
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
return chr((0xF0 & (ord($utf8[0]) << 4))
|
||||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
| (0x0F & (ord($utf8[1]) >> 2)))
|
||||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
. chr((0xC0 & (ord($utf8[1]) << 6))
|
||||||
| (0x7F & ord($utf8{2})));
|
| (0x7F & ord($utf8[2])));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ignoring UTF-32 for now, sorry
|
// ignoring UTF-32 for now, sorry
|
||||||
@@ -1564,7 +1564,7 @@ class FirePHP {
|
|||||||
*/
|
*/
|
||||||
for ($c = 0; $c < $strlen_var; ++$c) {
|
for ($c = 0; $c < $strlen_var; ++$c) {
|
||||||
|
|
||||||
$ord_var_c = ord($var{$c});
|
$ord_var_c = ord($var[$c]);
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $ord_var_c == 0x08:
|
case $ord_var_c == 0x08:
|
||||||
@@ -1587,18 +1587,18 @@ class FirePHP {
|
|||||||
case $ord_var_c == 0x2F:
|
case $ord_var_c == 0x2F:
|
||||||
case $ord_var_c == 0x5C:
|
case $ord_var_c == 0x5C:
|
||||||
// double quote, slash, slosh
|
// double quote, slash, slosh
|
||||||
$ascii .= '\\'.$var{$c};
|
$ascii .= '\\'.$var[$c];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
||||||
// characters U-00000000 - U-0000007F (same as ASCII)
|
// characters U-00000000 - U-0000007F (same as ASCII)
|
||||||
$ascii .= $var{$c};
|
$ascii .= $var[$c];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (($ord_var_c & 0xE0) == 0xC0):
|
case (($ord_var_c & 0xE0) == 0xC0):
|
||||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
|
$char = pack('C*', $ord_var_c, ord($var[$c + 1]));
|
||||||
$c += 1;
|
$c += 1;
|
||||||
$utf16 = $this->json_utf82utf16($char);
|
$utf16 = $this->json_utf82utf16($char);
|
||||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||||
@@ -1608,8 +1608,8 @@ class FirePHP {
|
|||||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
$char = pack('C*', $ord_var_c,
|
$char = pack('C*', $ord_var_c,
|
||||||
ord($var{$c + 1}),
|
ord($var[$c + 1]),
|
||||||
ord($var{$c + 2}));
|
ord($var[$c + 2]));
|
||||||
$c += 2;
|
$c += 2;
|
||||||
$utf16 = $this->json_utf82utf16($char);
|
$utf16 = $this->json_utf82utf16($char);
|
||||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||||
@@ -1619,9 +1619,9 @@ class FirePHP {
|
|||||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
$char = pack('C*', $ord_var_c,
|
$char = pack('C*', $ord_var_c,
|
||||||
ord($var{$c + 1}),
|
ord($var[$c + 1]),
|
||||||
ord($var{$c + 2}),
|
ord($var[$c + 2]),
|
||||||
ord($var{$c + 3}));
|
ord($var[$c + 3]));
|
||||||
$c += 3;
|
$c += 3;
|
||||||
$utf16 = $this->json_utf82utf16($char);
|
$utf16 = $this->json_utf82utf16($char);
|
||||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||||
@@ -1631,10 +1631,10 @@ class FirePHP {
|
|||||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
$char = pack('C*', $ord_var_c,
|
$char = pack('C*', $ord_var_c,
|
||||||
ord($var{$c + 1}),
|
ord($var[$c + 1]),
|
||||||
ord($var{$c + 2}),
|
ord($var[$c + 2]),
|
||||||
ord($var{$c + 3}),
|
ord($var[$c + 3]),
|
||||||
ord($var{$c + 4}));
|
ord($var[$c + 4]));
|
||||||
$c += 4;
|
$c += 4;
|
||||||
$utf16 = $this->json_utf82utf16($char);
|
$utf16 = $this->json_utf82utf16($char);
|
||||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||||
@@ -1644,11 +1644,11 @@ class FirePHP {
|
|||||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||||
$char = pack('C*', $ord_var_c,
|
$char = pack('C*', $ord_var_c,
|
||||||
ord($var{$c + 1}),
|
ord($var[$c + 1]),
|
||||||
ord($var{$c + 2}),
|
ord($var[$c + 2]),
|
||||||
ord($var{$c + 3}),
|
ord($var[$c + 3]),
|
||||||
ord($var{$c + 4}),
|
ord($var[$c + 4]),
|
||||||
ord($var{$c + 5}));
|
ord($var[$c + 5]));
|
||||||
$c += 5;
|
$c += 5;
|
||||||
$utf16 = $this->json_utf82utf16($char);
|
$utf16 = $this->json_utf82utf16($char);
|
||||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ class Diversiteit
|
|||||||
private $vormen;
|
private $vormen;
|
||||||
private $factoren ='';
|
private $factoren ='';
|
||||||
private $diversiteit = [];
|
private $diversiteit = [];
|
||||||
|
private $schooljaarnr;
|
||||||
|
private $orgid;
|
||||||
|
private $modulenr;
|
||||||
|
|
||||||
public function getDiversiteit(){
|
public function getDiversiteit(){
|
||||||
return $this->diversiteit;
|
return $this->diversiteit;
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ class Diversiteitafbeeldingen {
|
|||||||
private $somdq;
|
private $somdq;
|
||||||
private $totdq;
|
private $totdq;
|
||||||
private $diversiteitafbeeldingen =[];
|
private $diversiteitafbeeldingen =[];
|
||||||
|
private $modulenr;
|
||||||
|
private $orgversieid;
|
||||||
|
private $diversiteit;
|
||||||
|
|
||||||
public function __construct($diversiteit, $modulenr, $orgversieid){
|
public function __construct($diversiteit, $modulenr, $orgversieid){
|
||||||
$this->CI = & get_instance();
|
$this->CI = & get_instance();
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ class Gemiddeldenafbeeldingen {
|
|||||||
private $disablenvt = 0;
|
private $disablenvt = 0;
|
||||||
|
|
||||||
private $gemiddeldenafbeeldingen;
|
private $gemiddeldenafbeeldingen;
|
||||||
|
private $gemiddeldescores;
|
||||||
|
private $modulenr;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $clusterid;
|
||||||
|
|
||||||
public function __construct(Gemiddeldescores $gemiddeldescores, $modulenr, $orgversieid, $clusterid, $orgid){
|
public function __construct(Gemiddeldescores $gemiddeldescores, $modulenr, $orgversieid, $clusterid, $orgid){
|
||||||
$this->CI = & get_instance();
|
$this->CI = & get_instance();
|
||||||
|
|||||||
@@ -24,6 +24,18 @@ class Gemiddeldescores
|
|||||||
private $welkehoogste;
|
private $welkehoogste;
|
||||||
private $laagstescore = 110;
|
private $laagstescore = 110;
|
||||||
private $hoogstescore = 0;
|
private $hoogstescore = 0;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $scoretype;
|
||||||
|
private $results;
|
||||||
|
private $org;
|
||||||
|
private $orgnaam;
|
||||||
|
private $kleuren;
|
||||||
|
private $onderorgs;
|
||||||
|
private $orgstring;
|
||||||
|
private $leerkrachtscores;
|
||||||
|
private $ijkpuntscore;
|
||||||
|
private $gemiddelde;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -446,7 +458,7 @@ class Gemiddeldescores
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function addGemiddeldeScore(){
|
private function addGemiddeldeScore(){
|
||||||
if(! $this->gemiddelde) return;
|
if(! $this->gemiddelde || ! is_array($this->ijkpunten)) return;
|
||||||
array_push($this->ijkpunten, $this->gemiddelde);
|
array_push($this->ijkpunten, $this->gemiddelde);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -491,7 +503,7 @@ class Gemiddeldescores
|
|||||||
|
|
||||||
private function setGevuldeVersies12(){
|
private function setGevuldeVersies12(){
|
||||||
$orgids = [];
|
$orgids = [];
|
||||||
if (count($this->onderorgs) > 0) {
|
if (!empty($this->onderorgs)) {
|
||||||
foreach ($this->onderorgs as $index => $this->org) {
|
foreach ($this->onderorgs as $index => $this->org) {
|
||||||
$orgids[] = $this->org->id;
|
$orgids[] = $this->org->id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ class Hoofdstuk
|
|||||||
private $vervangingscode;
|
private $vervangingscode;
|
||||||
private $contentid;
|
private $contentid;
|
||||||
private $hoofdstuk;
|
private $hoofdstuk;
|
||||||
|
private $chapterid;
|
||||||
|
private $orgversieid;
|
||||||
|
private $profielid;
|
||||||
|
|
||||||
|
|
||||||
private $CI;
|
private $CI;
|
||||||
|
|||||||
@@ -16,8 +16,11 @@ class Hoofdstukkeuze
|
|||||||
private $selectie;
|
private $selectie;
|
||||||
private $selecties = [];
|
private $selecties = [];
|
||||||
private $CI;
|
private $CI;
|
||||||
|
private $orgversieid;
|
||||||
|
private $chapterid;
|
||||||
|
private $vergelijkingen;
|
||||||
|
|
||||||
public function __construct($chapterid, $orgversieid= false, $vergelijkingen)
|
public function __construct($chapterid, $orgversieid, $vergelijkingen)
|
||||||
{
|
{
|
||||||
$this->CI =& get_instance();
|
$this->CI =& get_instance();
|
||||||
$this->orgversieid = $orgversieid;
|
$this->orgversieid = $orgversieid;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Inleiding
|
|||||||
private $valtonder_id;
|
private $valtonder_id;
|
||||||
private $bgid;
|
private $bgid;
|
||||||
private $inleiding;
|
private $inleiding;
|
||||||
|
private $orgid;
|
||||||
|
|
||||||
|
|
||||||
public function __construct($orgid)
|
public function __construct($orgid)
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ class Inspectieafbeeldingen {
|
|||||||
private $orgbreedte;
|
private $orgbreedte;
|
||||||
private $vantm;
|
private $vantm;
|
||||||
private $inspectieafbeeldingen;
|
private $inspectieafbeeldingen;
|
||||||
|
private $modulenr;
|
||||||
|
private $orgversieid;
|
||||||
|
private $inspectieoordelen;
|
||||||
|
private $orgid;
|
||||||
|
private $clusterid;
|
||||||
|
|
||||||
public function __construct($inspectieOordelen, $modulenr, $orgversieid, $orgid){
|
public function __construct($inspectieOordelen, $modulenr, $orgversieid, $orgid){
|
||||||
$this->CI = & get_instance();
|
$this->CI = & get_instance();
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ class Inspectieoordelen
|
|||||||
private $ijkpunten;
|
private $ijkpunten;
|
||||||
private $melding;
|
private $melding;
|
||||||
private $inspectieoordelen;
|
private $inspectieoordelen;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $clusterid;
|
||||||
|
|
||||||
public function __construct($orgversieid, $orgid, $clusterid){
|
public function __construct($orgversieid, $orgid, $clusterid){
|
||||||
$this->CI =& get_instance();
|
$this->CI =& get_instance();
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class Kleurcodes {
|
|||||||
return $codes;
|
return $codes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getKleurcodesOrg($clusterid = FALSE, $swvid){
|
public function getKleurcodesOrg($clusterid, $swvid){
|
||||||
if (! $clusterid) $clusterid = 0;
|
if (! $clusterid) $clusterid = 0;
|
||||||
$sql = " SELECT *
|
$sql = " SELECT *
|
||||||
FROM tb_kleurcodes KC
|
FROM tb_kleurcodes KC
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ class Schoolafbeeldingen {
|
|||||||
private $schoolafbeeldingen;
|
private $schoolafbeeldingen;
|
||||||
private $resultaten;
|
private $resultaten;
|
||||||
private $disablenvt;
|
private $disablenvt;
|
||||||
|
private $schoolscores;
|
||||||
|
private $modulenr;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $clusterid;
|
||||||
|
|
||||||
public function __construct(Schoolscores $schoolscores, $modulenr, $orgversieid, $clusterid, $orgid){
|
public function __construct(Schoolscores $schoolscores, $modulenr, $orgversieid, $clusterid, $orgid){
|
||||||
$this->CI = & get_instance();
|
$this->CI = & get_instance();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Schooljaarversies
|
|||||||
private $schooljaarversies = [];
|
private $schooljaarversies = [];
|
||||||
private $sopaanwezig = 'F';
|
private $sopaanwezig = 'F';
|
||||||
private $versies;
|
private $versies;
|
||||||
|
private $modulenr;
|
||||||
|
|
||||||
public function __construct($chapterid, $profielid, $modulenr)
|
public function __construct($chapterid, $profielid, $modulenr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,15 @@ class Schoolscores
|
|||||||
private $laagstescore = 110;
|
private $laagstescore = 110;
|
||||||
private $hoogstescore = 0;
|
private $hoogstescore = 0;
|
||||||
private $gemiddelde;
|
private $gemiddelde;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $scoretype;
|
||||||
|
private $isVergelijking;
|
||||||
|
private $orgstring;
|
||||||
|
private $orgnaam;
|
||||||
|
private $metingen;
|
||||||
|
private $kleuren;
|
||||||
|
private $results;
|
||||||
|
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orgid, $scoretype, $isVergelijking)
|
public function __construct( $orgversieid, $orgid, $scoretype, $isVergelijking)
|
||||||
@@ -106,7 +115,7 @@ class Schoolscores
|
|||||||
|
|
||||||
private function setMetingen(){
|
private function setMetingen(){
|
||||||
$this->metingen = new stdClass();
|
$this->metingen = new stdClass();
|
||||||
if(count($this->scores)==0)
|
if(empty($this->scores))
|
||||||
$this->metingen->aantal= 0;
|
$this->metingen->aantal= 0;
|
||||||
$this->metingen->aantalorgs = 0;
|
$this->metingen->aantalorgs = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,15 @@ class Scores
|
|||||||
private $laagstescore = 110;
|
private $laagstescore = 110;
|
||||||
private $hoogstescore = 0;
|
private $hoogstescore = 0;
|
||||||
private $gemiddelde;
|
private $gemiddelde;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $scoretype;
|
||||||
|
private $isVergelijking;
|
||||||
|
private $orgstring;
|
||||||
|
private $orgnaam;
|
||||||
|
private $metingen;
|
||||||
|
private $kleuren;
|
||||||
|
private $results;
|
||||||
|
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orgid, $scoretype, $isVergelijking)
|
public function __construct( $orgversieid, $orgid, $scoretype, $isVergelijking)
|
||||||
@@ -103,7 +112,7 @@ class Scores
|
|||||||
|
|
||||||
private function setMetingen(){
|
private function setMetingen(){
|
||||||
$this->metingen = new stdClass();
|
$this->metingen = new stdClass();
|
||||||
if(count($this->scores)==0)
|
if(empty($this->scores))
|
||||||
$this->metingen->aantal= 0;
|
$this->metingen->aantal= 0;
|
||||||
$this->metingen->aantalorgs = 0;
|
$this->metingen->aantalorgs = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class Sopkeuze
|
|||||||
private $keuzelabels = [];
|
private $keuzelabels = [];
|
||||||
private $labels;
|
private $labels;
|
||||||
private $sopkeuze;
|
private $sopkeuze;
|
||||||
|
private $labelsids;
|
||||||
|
|
||||||
|
|
||||||
private $CI;
|
private $CI;
|
||||||
@@ -154,7 +155,7 @@ class Sopkeuze
|
|||||||
$this->labels = $this->hfstlabels;
|
$this->labels = $this->hfstlabels;
|
||||||
}
|
}
|
||||||
if($this->keuzelabels){
|
if($this->keuzelabels){
|
||||||
$this->labels = array_merge($this->hfstlabels, $this->keuzelabels);
|
$this->labels = array_merge($this->hfstlabels ?: [], $this->keuzelabels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ class Tabellen
|
|||||||
private $view;
|
private $view;
|
||||||
private $tab;
|
private $tab;
|
||||||
//ls okt 2020 private $imagecode;
|
//ls okt 2020 private $imagecode;
|
||||||
private tabelid;
|
private $tabelid;
|
||||||
private $imagedata;
|
private $imagedata;
|
||||||
private $sopinhoud;
|
private $sopinhoud;
|
||||||
private $updateid;
|
private $updateid;
|
||||||
|
private $sopinhoudid;
|
||||||
|
|
||||||
private $CI;
|
private $CI;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class Versions
|
|||||||
private $geopendeversies = [];
|
private $geopendeversies = [];
|
||||||
private $sopaanwezig = 'F';
|
private $sopaanwezig = 'F';
|
||||||
private $versies;
|
private $versies;
|
||||||
|
private $modulenr;
|
||||||
|
|
||||||
public function __construct($chapterid, $profielid, $modulenr)
|
public function __construct($chapterid, $profielid, $modulenr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ class Compacteonderdelen
|
|||||||
private $data;
|
private $data;
|
||||||
private $onderdelenNew;
|
private $onderdelenNew;
|
||||||
private $compacteonderdelen;
|
private $compacteonderdelen;
|
||||||
|
private $schooljaarnr;
|
||||||
|
private $onderdelen;
|
||||||
|
private $orgid;
|
||||||
|
|
||||||
public function __construct($schooljaarnr, $onderdelen, $omvangjaren, $orgid){
|
public function __construct($schooljaarnr, $onderdelen, $omvangjaren, $orgid){
|
||||||
$this->CI = &get_instance();
|
$this->CI = &get_instance();
|
||||||
@@ -203,7 +206,7 @@ class Compacteonderdelen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function setSetOmvang(){
|
private function setSetOmvang(){
|
||||||
if(! isset($this->omvangjaren) || count($this->omvangjaren) < 1 || !$this->omvangjaren) return;
|
if(! isset($this->omvangjaren) || ! is_array($this->omvangjaren) || count($this->omvangjaren) < 1 || !$this->omvangjaren) return;
|
||||||
$jaren = implode("','", $this->omvangjaren);
|
$jaren = implode("','", $this->omvangjaren);
|
||||||
$jaren = "'" . $jaren . "'";
|
$jaren = "'" . $jaren . "'";
|
||||||
|
|
||||||
@@ -343,13 +346,13 @@ class Compacteonderdelen
|
|||||||
$this->CI->globorgid, $this->jaarnummer, 'BASIS');
|
$this->CI->globorgid, $this->jaarnummer, 'BASIS');
|
||||||
|
|
||||||
$this->somB = str_replace(',','', $this->somB);
|
$this->somB = str_replace(',','', $this->somB);
|
||||||
$this->somB = number_format(($this->somB ), 0,',','.');
|
$this->somB = is_numeric($this->somB) ? number_format(($this->somB ), 0,',','.') : null; // PHP 8: number_format('') is a TypeError
|
||||||
|
|
||||||
|
|
||||||
$this->somE = $this->CI->Finbestemmingen_model->setSomSubsoort(
|
$this->somE = $this->CI->Finbestemmingen_model->setSomSubsoort(
|
||||||
$this->CI->globorgid, $this->jaarnummer, 'EXTRA');
|
$this->CI->globorgid, $this->jaarnummer, 'EXTRA');
|
||||||
$this->somE = str_replace(',','', $this->somE);
|
$this->somE = str_replace(',','', $this->somE);
|
||||||
$this->somE = number_format(($this->somE ), 0,',','.');
|
$this->somE = is_numeric($this->somE) ? number_format(($this->somE ), 0,',','.') : null; // PHP 8: number_format('') is a TypeError
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ class Compactepaginas
|
|||||||
|
|
||||||
private $gegevens;
|
private $gegevens;
|
||||||
private $gegevensarray = [];
|
private $gegevensarray = [];
|
||||||
|
private $compacteonderdelen;
|
||||||
|
private $sopid;
|
||||||
|
|
||||||
public function __construct($onderdelen, $paginas){
|
public function __construct($onderdelen, $paginas){
|
||||||
$this->CI = &get_instance();
|
$this->CI = &get_instance();
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ class Compacteversies
|
|||||||
private $gevuldschooljaar;
|
private $gevuldschooljaar;
|
||||||
private $vormtekst;
|
private $vormtekst;
|
||||||
private $filledversie;
|
private $filledversie;
|
||||||
|
private $schooljaarnr;
|
||||||
|
private $orgid;
|
||||||
|
private $orgsoortnr;
|
||||||
|
|
||||||
public function getOnderdelen(){
|
public function getOnderdelen(){
|
||||||
return $this->onderdelen;
|
return $this->onderdelen;
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ class Bestuurscores
|
|||||||
private $orgstring;
|
private $orgstring;
|
||||||
private $metingen;
|
private $metingen;
|
||||||
private $ambities;
|
private $ambities;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $vorm;
|
||||||
|
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orgid, $vorm)
|
public function __construct( $orgversieid, $orgid, $vorm)
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ class Individuelescores
|
|||||||
private $welkehoogste;
|
private $welkehoogste;
|
||||||
private $laagstescore = 110;
|
private $laagstescore = 110;
|
||||||
private $hoogstescore = 0;
|
private $hoogstescore = 0;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $orguserid;
|
||||||
|
private $scoretype;
|
||||||
|
private $org;
|
||||||
|
private $orgnaam;
|
||||||
|
private $ijkpunten;
|
||||||
|
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orguserid, $orgid, $scoretype)
|
public function __construct( $orgversieid, $orguserid, $orgid, $scoretype)
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ class Kamerscores
|
|||||||
private $scores;
|
private $scores;
|
||||||
private $metingen;
|
private $metingen;
|
||||||
private $ambities;
|
private $ambities;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $vorm;
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orgid, $vorm)
|
public function __construct( $orgversieid, $orgid, $vorm)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ class Lijsten
|
|||||||
private $nieuwsteversie;
|
private $nieuwsteversie;
|
||||||
private $sopinfo;
|
private $sopinfo;
|
||||||
private $eigenambitie = 'F';
|
private $eigenambitie = 'F';
|
||||||
|
private $orgid;
|
||||||
|
private $selecties;
|
||||||
|
private $organisatie;
|
||||||
|
private $gemiddelden;
|
||||||
|
private $scoresobject;
|
||||||
|
|
||||||
public function getLijsten(){
|
public function getLijsten(){
|
||||||
return $this->lijsten;
|
return $this->lijsten;
|
||||||
@@ -164,6 +169,8 @@ class Lijsten
|
|||||||
if(!isset($this->vergelijkingen) || !$this->vergelijkingen) return;
|
if(!isset($this->vergelijkingen) || !$this->vergelijkingen) return;
|
||||||
|
|
||||||
foreach($this->vergelijkingen['scores'] AS $i => $vergelijking){
|
foreach($this->vergelijkingen['scores'] AS $i => $vergelijking){
|
||||||
|
if (!$this->scores) $this->scores = []; // PHP 8.1: no implicit false-to-array conversion
|
||||||
|
if (!isset($this->scores[$i])) $this->scores[$i] = new stdClass(); // PHP 8: no auto-vivification of objects
|
||||||
$this->scores[$i]->gemV = $vergelijking->gem;
|
$this->scores[$i]->gemV = $vergelijking->gem;
|
||||||
$this->scores[$i]->kleurV = $vergelijking->kleur;
|
$this->scores[$i]->kleurV = $vergelijking->kleur;
|
||||||
$this->scores[$i]->disabledV = $vergelijking->disabled;
|
$this->scores[$i]->disabledV = $vergelijking->disabled;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ class Swvscores
|
|||||||
private $scores;
|
private $scores;
|
||||||
private $metingen;
|
private $metingen;
|
||||||
private $ambities;
|
private $ambities;
|
||||||
|
private $orgversieid;
|
||||||
|
private $orgid;
|
||||||
|
private $vorm;
|
||||||
|
|
||||||
|
|
||||||
public function __construct( $orgversieid, $orgid, $vorm)
|
public function __construct( $orgversieid, $orgid, $vorm)
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ class Userlijsten
|
|||||||
private $lijsten = [];
|
private $lijsten = [];
|
||||||
private $nieuwste = 0;
|
private $nieuwste = 0;
|
||||||
private $nieuwsteversie;
|
private $nieuwsteversie;
|
||||||
|
private $orguserid;
|
||||||
|
private $orgid;
|
||||||
|
private $orgversies;
|
||||||
|
private $versienaam;
|
||||||
|
private $organisatie;
|
||||||
|
private $individueel;
|
||||||
|
private $results;
|
||||||
|
private $scores;
|
||||||
|
private $vergelijkingen;
|
||||||
|
|
||||||
public function getLijsten(){
|
public function getLijsten(){
|
||||||
return $this->lijsten;
|
return $this->lijsten;
|
||||||
@@ -94,6 +103,7 @@ class Userlijsten
|
|||||||
if( (!isset($this->vergelijkingen) ||! $this->vergelijkingen )) return;
|
if( (!isset($this->vergelijkingen) ||! $this->vergelijkingen )) return;
|
||||||
|
|
||||||
foreach($this->vergelijkingen['scores'] AS $i =>$vergelijking){
|
foreach($this->vergelijkingen['scores'] AS $i =>$vergelijking){
|
||||||
|
if (!isset($this->scores[$i])) $this->scores[$i] = new stdClass(); // PHP 8: no auto-vivification of objects
|
||||||
$this->scores[$i]->gemV = $vergelijking->gem;
|
$this->scores[$i]->gemV = $vergelijking->gem;
|
||||||
$this->scores[$i]->kleurV = $vergelijking->kleur;
|
$this->scores[$i]->kleurV = $vergelijking->kleur;
|
||||||
$this->scores[$i]->disabledV = $vergelijking->disabled;
|
$this->scores[$i]->disabledV = $vergelijking->disabled;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ class Vergelijkbareversies
|
|||||||
private $periode;
|
private $periode;
|
||||||
private $specificaties = [];
|
private $specificaties = [];
|
||||||
private $filledids;
|
private $filledids;
|
||||||
|
private $orgid;
|
||||||
|
private $modulenr;
|
||||||
|
|
||||||
|
|
||||||
public function getSeries(){
|
public function getSeries(){
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ class DivMonitor
|
|||||||
private $criteriumdq;
|
private $criteriumdq;
|
||||||
private $beschikbaar = 'F';
|
private $beschikbaar = 'F';
|
||||||
private $monitor;
|
private $monitor;
|
||||||
|
private $schooljaarnr;
|
||||||
|
private $criteriumid;
|
||||||
|
private $module;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -88,6 +91,7 @@ class DivMonitor
|
|||||||
$this->normaantallen = $normaantallen;
|
$this->normaantallen = $normaantallen;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
$this->normaantallen = new stdClass();
|
||||||
$this->normaantallen->groep12 = $this->groep12;
|
$this->normaantallen->groep12 = $this->groep12;
|
||||||
$this->normaantallen->groep38 = $this->groep38;
|
$this->normaantallen->groep38 = $this->groep38;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,12 @@ class IngedeeldeScholen
|
|||||||
private $schoollabel;
|
private $schoollabel;
|
||||||
private $schoollabels =[];
|
private $schoollabels =[];
|
||||||
private $verschil;
|
private $verschil;
|
||||||
|
private $criteriumid;
|
||||||
|
private $module;
|
||||||
|
|
||||||
public function __construct($criteriumid, $module){
|
public function __construct($criteriumid, $module){
|
||||||
$this->CI =& get_instance();
|
$this->CI =& get_instance();
|
||||||
$this->criteriumid = $criteriumid;
|
$this->criteriumid = ($criteriumid === '') ? 0 : $criteriumid; // PHP 8: '' == 0 is false, keep PHP 7 behaviour
|
||||||
$this->module = $module;
|
$this->module = $module;
|
||||||
$this->handle();
|
$this->handle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class Partituur_home {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var $tokensecret;
|
var $tokensecret;
|
||||||
|
var $ci;
|
||||||
|
|
||||||
function __construct(){
|
function __construct(){
|
||||||
|
|
||||||
|
|||||||
@@ -133,14 +133,14 @@ class Phantom2_model extends CI_Model{
|
|||||||
if(!$margins){
|
if(!$margins){
|
||||||
return $this->margins;
|
return $this->margins;
|
||||||
}elseif(!is_array($margins)){
|
}elseif(!is_array($margins)){
|
||||||
$margins = str_replace('cm', $margins);
|
$margins = str_replace('cm', '', $margins);
|
||||||
|
|
||||||
if(!is_numeric($margins)) return $this->margins;
|
if(!is_numeric($margins)) return $this->margins;
|
||||||
|
|
||||||
return array($margins.'cm',$margins.'cm',$margins.'cm',$margins.'cm');
|
return array($margins.'cm',$margins.'cm',$margins.'cm',$margins.'cm');
|
||||||
}elseif(count($margins)==2){
|
}elseif(count($margins)==2){
|
||||||
$margin1 = str_replace('cm', $margins[0]);
|
$margin1 = str_replace('cm', '', $margins[0]);
|
||||||
$margin2 = str_replace('cm', $margins[1]);
|
$margin2 = str_replace('cm', '', $margins[1]);
|
||||||
|
|
||||||
if(!is_numeric($margin1) && !is_numeric($margins2)) return $this->margins;
|
if(!is_numeric($margin1) && !is_numeric($margins2)) return $this->margins;
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ class Phantom_model extends CI_Model{
|
|||||||
if( $footer ) $data['footer'] = $footer;
|
if( $footer ) $data['footer'] = $footer;
|
||||||
if( $margins ) $data['margins'] = serialize($margins);
|
if( $margins ) $data['margins'] = serialize($margins);
|
||||||
|
|
||||||
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
curl_setopt_array($curl, array(
|
curl_setopt_array($curl, array(
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0),
|
|
||||||
CURLOPT_RETURNTRANSFER => 1,
|
CURLOPT_RETURNTRANSFER => 1,
|
||||||
CURLOPT_URL => $_ENV['printserver']. 'test/1',
|
CURLOPT_URL => $_ENV['printserver']. 'test/1',
|
||||||
CURLOPT_POST => 1,
|
CURLOPT_POST => 1,
|
||||||
@@ -100,7 +100,7 @@ class Phantom_model extends CI_Model{
|
|||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_and_get_pdf($html, $file, $header = FALSE, $footer = FALSE, $margins = array(), $orientation, $footerFirstpage=TRUE, $headerFirstpage=TRUE)
|
function create_and_get_pdf($html, $file, $header, $footer, $margins, $orientation, $footerFirstpage=TRUE, $headerFirstpage=TRUE)
|
||||||
{
|
{
|
||||||
//margins [left, right, top, bottom, height header]
|
//margins [left, right, top, bottom, height header]
|
||||||
if ( ! is_array( $margins ) ) $margins = array();
|
if ( ! is_array( $margins ) ) $margins = array();
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Modfases extends MY_Model{
|
|||||||
ORDER BY volgorde";
|
ORDER BY volgorde";
|
||||||
$res = $this->get_query_result();
|
$res = $this->get_query_result();
|
||||||
$onb = (object) array("naam"=>"onbekend", "kleur"=>"#989898");
|
$onb = (object) array("naam"=>"onbekend", "kleur"=>"#989898");
|
||||||
array_unshift($res,$onb );
|
if (is_array($res)) array_unshift($res,$onb );
|
||||||
return $res;
|
return $res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class ModPartActKosten extends MY_Model{
|
|||||||
FROM tbPartActKosten
|
FROM tbPartActKosten
|
||||||
WHERE id = $kostID" ;
|
WHERE id = $kostID" ;
|
||||||
$results = $this->get_query_row();
|
$results = $this->get_query_row();
|
||||||
|
if (! $results) $results = new stdClass();
|
||||||
$results->kosten = mysql2bedrag($results->kosten);
|
$results->kosten = mysql2bedrag($results->kosten);
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ class Mutatielog_model extends MY_Model{
|
|||||||
function store_mutatie($mutatie){
|
function store_mutatie($mutatie){
|
||||||
$sql = "
|
$sql = "
|
||||||
INSERT INTO replicatie.replicatielog (replicatie_data, creation_date, created_by, last_update_date, last_updated_by)
|
INSERT INTO replicatie.replicatielog (replicatie_data, creation_date, created_by, last_update_date, last_updated_by)
|
||||||
VALUES('".mysql_real_escape_string(serialize($mutatie))."', NOW(), 'cron', NOW(), 'cron')";
|
VALUES('".$this->db->escape_str(serialize($mutatie))."', NOW(), 'cron', NOW(), 'cron')";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,14 +132,14 @@ class Phantom_model extends CI_Model{
|
|||||||
if(!$margins){
|
if(!$margins){
|
||||||
return $this->margins;
|
return $this->margins;
|
||||||
}elseif(!is_array($margins)){
|
}elseif(!is_array($margins)){
|
||||||
$margins = str_replace('cm', $margins);
|
$margins = str_replace('cm', '', $margins);
|
||||||
|
|
||||||
if(!is_numeric($margins)) return $this->margins;
|
if(!is_numeric($margins)) return $this->margins;
|
||||||
|
|
||||||
return array($margins.'cm',$margins.'cm',$margins.'cm',$margins.'cm');
|
return array($margins.'cm',$margins.'cm',$margins.'cm',$margins.'cm');
|
||||||
}elseif(count($margins)==2){
|
}elseif(count($margins)==2){
|
||||||
$margin1 = str_replace('cm', $margins[0]);
|
$margin1 = str_replace('cm', '', $margins[0]);
|
||||||
$margin2 = str_replace('cm', $margins[1]);
|
$margin2 = str_replace('cm', '', $margins[1]);
|
||||||
|
|
||||||
if(!is_numeric($margin1) && !is_numeric($margins2)) return $this->margins;
|
if(!is_numeric($margin1) && !is_numeric($margins2)) return $this->margins;
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ class Diversiteits_model extends MY_Model{
|
|||||||
$school->oov = round(($aantalmetvraag / $school->aantallln) * 100);
|
$school->oov = round(($aantalmetvraag / $school->aantallln) * 100);
|
||||||
$school->cat1 =$school->aantallln - $aantalmetvraag;
|
$school->cat1 =$school->aantallln - $aantalmetvraag;
|
||||||
$school->tgd = round($schooltgd + $school->cat1);
|
$school->tgd = round($schooltgd + $school->cat1);
|
||||||
$school->dq = round(($school->tgd / $normtot) * 100) / 100;
|
$school->dq = ($normtot != 0) ? round(($school->tgd / $normtot) * 100) / 100 : 0;
|
||||||
$bggem->cat1 = $bggem->cat1 + $school->cat1;
|
$bggem->cat1 = $bggem->cat1 + $school->cat1;
|
||||||
$bggem->oov = $bggem->oov + $school->oov;
|
$bggem->oov = $bggem->oov + $school->oov;
|
||||||
$bggem->tgd = $bggem->tgd + $school->tgd ;
|
$bggem->tgd = $bggem->tgd + $school->tgd ;
|
||||||
@@ -308,7 +308,7 @@ class Diversiteits_model extends MY_Model{
|
|||||||
|
|
||||||
};
|
};
|
||||||
$groep->diversiteit = ($groep->som5 * 2) + ($groep->som6 * 3) + ($groep->som7 * 4) +($groep ->som8 * 5);
|
$groep->diversiteit = ($groep->som5 * 2) + ($groep->som6 * 3) + ($groep->som7 * 4) +($groep ->som8 * 5);
|
||||||
$groep->groepdq = round($groep->diversiteit/$groep->normaantal);
|
$groep->groepdq = ($groep->normaantal != 0) ? round($groep->diversiteit/$groep->normaantal) : 0;
|
||||||
$normtot = $normtot + $groep->normaantal;
|
$normtot = $normtot + $groep->normaantal;
|
||||||
$somschooldq = $somschooldq + $groep->groepdq;
|
$somschooldq = $somschooldq + $groep->groepdq;
|
||||||
}
|
}
|
||||||
@@ -351,7 +351,7 @@ class Diversiteits_model extends MY_Model{
|
|||||||
|
|
||||||
if ($school->aantallln > 0) {
|
if ($school->aantallln > 0) {
|
||||||
$school->tgd = round($schooltgd);
|
$school->tgd = round($schooltgd);
|
||||||
$school->dq = round(($school->tgd / $school->normaantal) * 100) / 100;
|
$school->dq = ($school->normaantal != 0) ? round(($school->tgd / $school->normaantal) * 100) / 100 : 0;
|
||||||
$bggem->tgd = $bggem->tgd + $school->tgd ;
|
$bggem->tgd = $bggem->tgd + $school->tgd ;
|
||||||
$bggem->dq= $bggem->dq + $school->dq;
|
$bggem->dq= $bggem->dq + $school->dq;
|
||||||
$usedaantalscholen ++;
|
$usedaantalscholen ++;
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ class Maakinhoudnieuw_model extends MY_Model{
|
|||||||
function setVersie($orgversieid){
|
function setVersie($orgversieid){
|
||||||
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
||||||
$versie = $this->Versies_model ->get_record_by_id($orgversie->versie_id);
|
$versie = $this->Versies_model ->get_record_by_id($orgversie->versie_id);
|
||||||
|
if (! $versie) $versie = new stdClass();
|
||||||
$versie->naam = $versie->naam . ', periode: ' . $orgversie->periodenummer . ': ' . $orgversie->geldigvanaf . ' - ' . $orgversie->geldigtm;
|
$versie->naam = $versie->naam . ', periode: ' . $orgversie->periodenummer . ': ' . $orgversie->geldigvanaf . ' - ' . $orgversie->geldigtm;
|
||||||
return $versie;
|
return $versie;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ class Sopinhouden_model extends MY_Model{
|
|||||||
|
|
||||||
$factor =$normaantallen->groep38;
|
$factor =$normaantallen->groep38;
|
||||||
if (strpos($groep->niveau,'1') !== false || strpos($groep->niveau,'2') !== false) {$factor = $normaantallen->groep12;};
|
if (strpos($groep->niveau,'1') !== false || strpos($groep->niveau,'2') !== false) {$factor = $normaantallen->groep12;};
|
||||||
$groep->dq= round(($groep->diversiteit / $factor),2);
|
$groep->dq= ($factor != 0) ? round(($groep->diversiteit / $factor),2) : 0;
|
||||||
$totaal = $totaal + $groep->totaantal;
|
$totaal = $totaal + $groep->totaantal;
|
||||||
$hoeveelgroepen = $hoeveelgroepen + 1;
|
$hoeveelgroepen = $hoeveelgroepen + 1;
|
||||||
if (strpos($groep->niveau, ';') > 0){$combi = $combi + 1;}
|
if (strpos($groep->niveau, ';') > 0){$combi = $combi + 1;}
|
||||||
@@ -432,7 +432,7 @@ class Sopinhouden_model extends MY_Model{
|
|||||||
if (strpos($groep->niveau,';') >0) {$groep->diversiteit = $groep->diversiteit + 1.5;};
|
if (strpos($groep->niveau,';') >0) {$groep->diversiteit = $groep->diversiteit + 1.5;};
|
||||||
$factor =$normaantallen->groep38;
|
$factor =$normaantallen->groep38;
|
||||||
if (strpos($groep->niveau,'1') > 0 || strpos($groep->niveau,'2') > 0) {$factor = $normaantallen->groep12;};
|
if (strpos($groep->niveau,'1') > 0 || strpos($groep->niveau,'2') > 0) {$factor = $normaantallen->groep12;};
|
||||||
$groep->dq= round(($groep->diversiteit / $factor),2);
|
$groep->dq= ($factor != 0) ? round(($groep->diversiteit / $factor),2) : 0;
|
||||||
$som1= $som1 + $groep->som1;
|
$som1= $som1 + $groep->som1;
|
||||||
$som2= $som2 + $groep->som2;
|
$som2= $som2 + $groep->som2;
|
||||||
$som3= $som3 + $groep->som3;
|
$som3= $som3 + $groep->som3;
|
||||||
@@ -734,7 +734,7 @@ class Sopinhouden_model extends MY_Model{
|
|||||||
$score->disablenvt = 'F';
|
$score->disablenvt = 'F';
|
||||||
if($score->aantalvier > 0 && $score->aantalvier == $score->aantalnvt) $score->disablenvt = 'T';
|
if($score->aantalvier > 0 && $score->aantalvier == $score->aantalnvt) $score->disablenvt = 'T';
|
||||||
if($score->disabled == 'F' && $score->disablenvt == 'F') {
|
if($score->disabled == 'F' && $score->disablenvt == 'F') {
|
||||||
$score->gem = $score->somscore / $score->num;
|
$score->gem = ($score->num != 0) ? $score->somscore / $score->num : 0;
|
||||||
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
|
$score->colorcode = $this->kleurcodes->getkleur($score->gem);
|
||||||
$som = $som + $score->gem;
|
$som = $som + $score->gem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class Organisaties_model extends MY_Model{
|
|||||||
AND actief = 1";
|
AND actief = 1";
|
||||||
return $this->get_query_row();
|
return $this->get_query_row();
|
||||||
}
|
}
|
||||||
function checkbrin($orgid=false, $brin){
|
function checkbrin($orgid, $brin){
|
||||||
$this->sql =" SELECT COUNT(id) as aantal
|
$this->sql =" SELECT COUNT(id) as aantal
|
||||||
FROM tb_organisaties
|
FROM tb_organisaties
|
||||||
WHERE lower(brin) = lower('{$brin}')";
|
WHERE lower(brin) = lower('{$brin}')";
|
||||||
@@ -559,7 +559,7 @@ class Organisaties_model extends MY_Model{
|
|||||||
return $lijst;
|
return $lijst;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKleurcodesOrg($clusterid = FALSE, $swvid){
|
function getKleurcodesOrg($clusterid, $swvid){
|
||||||
if (! $clusterid) $clusterid = 0;
|
if (! $clusterid) $clusterid = 0;
|
||||||
$sql = " SELECT *
|
$sql = " SELECT *
|
||||||
FROM tb_kleurcodes KC
|
FROM tb_kleurcodes KC
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>403 Forbidden</title>
|
<title>403 Forbidden</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -3,62 +3,85 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>404 Page Not Found</title>
|
<title>404 Page Not Found</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
::selection { background-color: #E13300; color: white; }
|
::selection { background-color: #f07746; color: #fff; }
|
||||||
::-moz-selection { background-color: #E13300; color: white; }
|
::-moz-selection { background-color: #f07746; color: #fff; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 40px;
|
margin: 40px auto;
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
max-width: 1024px;
|
||||||
color: #4F5155;
|
font: 16px/24px normal "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
color: #808080;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #003399;
|
color: #dd4814;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
a:hover {
|
||||||
color: #444;
|
color: #97310e;
|
||||||
background-color: transparent;
|
}
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
h1 {
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
color: #fff;
|
||||||
font-size: 12px;
|
background-color: #dd4814;
|
||||||
background-color: #f9f9f9;
|
border-bottom: 1px solid #d0d0d0;
|
||||||
border: 1px solid #D0D0D0;
|
font-size: 22px;
|
||||||
color: #002166;
|
font-weight: bold;
|
||||||
display: block;
|
margin: 0 0 14px 0;
|
||||||
margin: 14px 0 14px 0;
|
padding: 5px 15px;
|
||||||
padding: 12px 10px 12px 10px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
h2 {
|
||||||
margin: 10px;
|
color:#404040;
|
||||||
border: 1px solid #D0D0D0;
|
margin:0;
|
||||||
box-shadow: 0 0 8px #D0D0D0;
|
padding:0 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
code {
|
||||||
margin: 12px 15px 12px 15px;
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
}
|
font-size: 13px;
|
||||||
</style>
|
background-color: #f5f5f5;
|
||||||
|
border: 1px solid #e3e3e3;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #d0d0d0;
|
||||||
|
box-shadow: 0 0 8px #d0d0d0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#body {
|
||||||
|
margin: 0 15px 0 15px;
|
||||||
|
min-height: 96px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<h1><?php echo $heading; ?></h1>
|
<h1><?php echo $heading; ?></h1>
|
||||||
<?php echo $message; ?>
|
<div id="body">
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,62 +3,85 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Database Error</title>
|
<title>Database Error</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
::selection { background-color: #E13300; color: white; }
|
::selection { background-color: #f07746; color: #fff; }
|
||||||
::-moz-selection { background-color: #E13300; color: white; }
|
::-moz-selection { background-color: #f07746; color: #fff; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 40px;
|
margin: 40px auto;
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
max-width: 1024px;
|
||||||
color: #4F5155;
|
font: 16px/24px normal "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
color: #808080;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #003399;
|
color: #dd4814;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
a:hover {
|
||||||
color: #444;
|
color: #97310e;
|
||||||
background-color: transparent;
|
}
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
h1 {
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
color: #fff;
|
||||||
font-size: 12px;
|
background-color: #dd4814;
|
||||||
background-color: #f9f9f9;
|
border-bottom: 1px solid #d0d0d0;
|
||||||
border: 1px solid #D0D0D0;
|
font-size: 22px;
|
||||||
color: #002166;
|
font-weight: bold;
|
||||||
display: block;
|
margin: 0 0 14px 0;
|
||||||
margin: 14px 0 14px 0;
|
padding: 5px 15px;
|
||||||
padding: 12px 10px 12px 10px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
h2 {
|
||||||
margin: 10px;
|
color:#404040;
|
||||||
border: 1px solid #D0D0D0;
|
margin:0;
|
||||||
box-shadow: 0 0 8px #D0D0D0;
|
padding:0 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
code {
|
||||||
margin: 12px 15px 12px 15px;
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
}
|
font-size: 13px;
|
||||||
</style>
|
background-color: #f5f5f5;
|
||||||
|
border: 1px solid #e3e3e3;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #d0d0d0;
|
||||||
|
box-shadow: 0 0 8px #d0d0d0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#body {
|
||||||
|
margin: 0 15px 0 15px;
|
||||||
|
min-height: 96px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<h1><?php echo $heading; ?></h1>
|
<h1><?php echo $heading; ?></h1>
|
||||||
<?php echo $message; ?>
|
<div id="body">
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,31 +2,31 @@
|
|||||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
<div style="border:1px solid #dd4814;padding-left:20px;margin:10px 0;">
|
||||||
|
|
||||||
<h4>An uncaught Exception was encountered</h4>
|
<h4>An uncaught Exception was encountered</h4>
|
||||||
|
|
||||||
<p>Type: <?php echo get_class($exception); ?></p>
|
<p>Type: <?php echo get_class($exception); ?></p>
|
||||||
<p>Message: <?php echo $message; ?></p>
|
<p>Message: <?php echo $message; ?></p>
|
||||||
<p>Filename: <?php echo $exception->getFile(); ?></p>
|
<p>Filename: <?php echo $exception->getFile(); ?></p>
|
||||||
<p>Line Number: <?php echo $exception->getLine(); ?></p>
|
<p>Line Number: <?php echo $exception->getLine(); ?></p>
|
||||||
|
|
||||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
<p>Backtrace:</p>
|
<p>Backtrace:</p>
|
||||||
<?php foreach ($exception->getTrace() as $error): ?>
|
<?php foreach ($exception->getTrace() as $error): ?>
|
||||||
|
|
||||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
|
||||||
<p style="margin-left:10px">
|
<p style="margin-left:10px">
|
||||||
File: <?php echo $error['file']; ?><br />
|
File: <?php echo $error['file']; ?><br />
|
||||||
Line: <?php echo $error['line']; ?><br />
|
Line: <?php echo $error['line']; ?><br />
|
||||||
Function: <?php echo $error['function']; ?>
|
Function: <?php echo $error['function']; ?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,62 +3,85 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Error</title>
|
<title>Error</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
::selection { background-color: #E13300; color: white; }
|
::selection { background-color: #f07746; color: #fff; }
|
||||||
::-moz-selection { background-color: #E13300; color: white; }
|
::-moz-selection { background-color: #f07746; color: #fff; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 40px;
|
margin: 40px auto;
|
||||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
max-width: 1024px;
|
||||||
color: #4F5155;
|
font: 16px/24px normal "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
color: #808080;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #003399;
|
color: #dd4814;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
a:hover {
|
||||||
color: #444;
|
color: #97310e;
|
||||||
background-color: transparent;
|
}
|
||||||
border-bottom: 1px solid #D0D0D0;
|
|
||||||
font-size: 19px;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0 0 14px 0;
|
|
||||||
padding: 14px 15px 10px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
h1 {
|
||||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
color: #fff;
|
||||||
font-size: 12px;
|
background-color: #dd4814;
|
||||||
background-color: #f9f9f9;
|
border-bottom: 1px solid #d0d0d0;
|
||||||
border: 1px solid #D0D0D0;
|
font-size: 22px;
|
||||||
color: #002166;
|
font-weight: bold;
|
||||||
display: block;
|
margin: 0 0 14px 0;
|
||||||
margin: 14px 0 14px 0;
|
padding: 5px 15px;
|
||||||
padding: 12px 10px 12px 10px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
h2 {
|
||||||
margin: 10px;
|
color:#404040;
|
||||||
border: 1px solid #D0D0D0;
|
margin:0;
|
||||||
box-shadow: 0 0 8px #D0D0D0;
|
padding:0 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
code {
|
||||||
margin: 12px 15px 12px 15px;
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
}
|
font-size: 13px;
|
||||||
</style>
|
background-color: #f5f5f5;
|
||||||
|
border: 1px solid #e3e3e3;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #d0d0d0;
|
||||||
|
box-shadow: 0 0 8px #d0d0d0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#body {
|
||||||
|
margin: 0 15px 0 15px;
|
||||||
|
min-height: 96px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<h1><?php echo $heading; ?></h1>
|
<h1><?php echo $heading; ?></h1>
|
||||||
<?php echo $message; ?>
|
<div id="body">
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,32 +2,32 @@
|
|||||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
<div style="border:1px solid #dd4814;padding-left:20px;margin:10px 0;">
|
||||||
|
|
||||||
<h4>A PHP Error was encountered</h4>
|
<h4>A PHP Error was encountered</h4>
|
||||||
|
|
||||||
<p>Severity: <?php echo $severity; ?></p>
|
<p>Severity: <?php echo $severity; ?></p>
|
||||||
<p>Message: <?php echo $message; ?></p>
|
<p>Message: <?php echo $message; ?></p>
|
||||||
<p>Filename: <?php echo $filepath; ?></p>
|
<p>Filename: <?php echo $filepath; ?></p>
|
||||||
<p>Line Number: <?php echo $line; ?></p>
|
<p>Line Number: <?php echo $line; ?></p>
|
||||||
|
|
||||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
<p>Backtrace:</p>
|
<p>Backtrace:</p>
|
||||||
<?php foreach (debug_backtrace() as $error): ?>
|
<?php foreach (debug_backtrace() as $error): ?>
|
||||||
|
|
||||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
|
||||||
<p style="margin-left:10px">
|
<p style="margin-left:10px">
|
||||||
File: <?php echo $error['file'] ?><br />
|
File: <?php echo $error['file'] ?><br />
|
||||||
Line: <?php echo $error['line'] ?><br />
|
Line: <?php echo $error['line'] ?><br />
|
||||||
Function: <?php echo $error['function'] ?>
|
Function: <?php echo $error['function'] ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>403 Forbidden</title>
|
<title>403 Forbidden</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>403 Forbidden</title>
|
<title>403 Forbidden</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for($i = 0; $i < count($data['subsoorten']); $i++ ){
|
for($i = 0; $i < ($data['subsoorten'] ? count($data['subsoorten']) : 0); $i++ ){
|
||||||
if($data['subsoorten'][$i]->categorie == "BASIS"):
|
if($data['subsoorten'][$i]->categorie == "BASIS"):
|
||||||
if(($i == 0) || ($i != 0 && $data['subsoorten'][$i]->soort != $data['subsoorten'][$i-1]->soort)): ?>
|
if(($i == 0) || ($i != 0 && $data['subsoorten'][$i]->soort != $data['subsoorten'][$i-1]->soort)): ?>
|
||||||
<tr style=" background-color: #AF62A3 !important;">
|
<tr style=" background-color: #AF62A3 !important;">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for($i = 0; $i < count($data['subsoorten']); $i++ ){
|
for($i = 0; $i < ($data['subsoorten'] ? count($data['subsoorten']) : 0); $i++ ){
|
||||||
if($data['subsoorten'][$i]->categorie == "EXTRA"):?>
|
if($data['subsoorten'][$i]->categorie == "EXTRA"):?>
|
||||||
<tr style="font-weight:normal; background-color:#d7d8d7 !important">
|
<tr style="font-weight:normal; background-color:#d7d8d7 !important">
|
||||||
<td style="padding-right: 3px; padding-left: 3px; border-right:1px solid #ffffff"><?php echo $data['subsoorten'][$i]->subsoort?></td>
|
<td style="padding-right: 3px; padding-left: 3px; border-right:1px solid #ffffff"><?php echo $data['subsoorten'][$i]->subsoort?></td>
|
||||||
|
|||||||
@@ -45,25 +45,25 @@
|
|||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen categorie 1</td>
|
<td> Aantal leerlingen categorie 1</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom1?></td>
|
<td style="text-align: right" ><?=$schoolsom1?></td>
|
||||||
<td style="text-align: right"><?=round(($schoolsom1/$schooltotaal) * 100).'%'?></td>
|
<td style="text-align: right"><?=($schooltotaal ? round(($schoolsom1/$schooltotaal) * 100) : 0).'%'?></td>
|
||||||
<td style="text-align: right"><?=$richtlijn[0]?></td>
|
<td style="text-align: right"><?=$richtlijn[0]?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen categorie 2</td>
|
<td> Aantal leerlingen categorie 2</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom2?></td>
|
<td style="text-align: right" ><?=$schoolsom2?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom2/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom2/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
<td style="text-align: right"><?=$richtlijn[1]?></td>
|
<td style="text-align: right"><?=$richtlijn[1]?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen categorie 3</td>
|
<td> Aantal leerlingen categorie 3</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom3?></td>
|
<td style="text-align: right" ><?=$schoolsom3?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom3/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom3/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
<td style="text-align: right"><?=$richtlijn[2]?></td>
|
<td style="text-align: right"><?=$richtlijn[2]?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen categorie 4</td>
|
<td> Aantal leerlingen categorie 4</td>
|
||||||
<td style="text-align: right"><?=$schoolsom4?></td>
|
<td style="text-align: right"><?=$schoolsom4?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom4/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom4/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
<td style="text-align: right"><?=$richtlijn[3]?></td>
|
<td style="text-align: right"><?=$richtlijn[3]?></td>
|
||||||
</tr>s
|
</tr>s
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
|
|||||||
@@ -42,22 +42,22 @@
|
|||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen SBO</td>
|
<td> Aantal leerlingen SBO</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom5?></td>
|
<td style="text-align: right" ><?=$schoolsom5?></td>
|
||||||
<td style="text-align: right"><?=round(($schoolsom5/$schooltotaal) * 100).'%'?></td>
|
<td style="text-align: right"><?=($schooltotaal ? round(($schoolsom5/$schooltotaal) * 100) : 0).'%'?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen TLV SO-1</td>
|
<td> Aantal leerlingen TLV SO-1</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom6?></td>
|
<td style="text-align: right" ><?=$schoolsom6?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom6/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom6/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen TLV SO-2</td>
|
<td> Aantal leerlingen TLV SO-2</td>
|
||||||
<td style="text-align: right" ><?=$schoolsom7?></td>
|
<td style="text-align: right" ><?=$schoolsom7?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom7/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom7/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Aantal leerlingen TLV SO-3</td>
|
<td> Aantal leerlingen TLV SO-3</td>
|
||||||
<td style="text-align: right"><?=$schoolsom8?></td>
|
<td style="text-align: right"><?=$schoolsom8?></td>
|
||||||
<td style="text-align: right" ><?=round(($schoolsom8/$schooltotaal) * 100).'%' ?></td>
|
<td style="text-align: right" ><?=($schooltotaal ? round(($schoolsom8/$schooltotaal) * 100) : 0).'%' ?></td>
|
||||||
</tr>s
|
</tr>s
|
||||||
<tr style="border-bottom: 1px solid #f2f2f2">
|
<tr style="border-bottom: 1px solid #f2f2f2">
|
||||||
<td> Totaal gewogen diversiteit</td>
|
<td> Totaal gewogen diversiteit</td>
|
||||||
|
|||||||
@@ -38,13 +38,13 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="background-color: #f2f2f2">
|
<tr style="background-color: #f2f2f2">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >
|
||||||
<i>Uitsplitsing onderwijsvraag per groep</i>
|
<i>Uitsplitsing onderwijsvraag per groep</i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >Basisondersteuning</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >Basisondersteuning</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?>>Basisondersteuning-plus</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?>>Basisondersteuning-plus</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if($data['osvormen']){
|
<?php if($data['osvormen']){
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >Extra ondersteuning</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >Extra ondersteuning</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach($data['osvormen'] as $osvorm){
|
<?php foreach($data['osvormen'] as $osvorm){
|
||||||
if ($osvorm->nivo ==3){?>
|
if ($osvorm->nivo ==3){?>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >Extra ondersteuning-plus</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >Extra ondersteuning-plus</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach($data['osvormen'] as $osvorm){
|
<?php foreach($data['osvormen'] as $osvorm){
|
||||||
if ($osvorm->nivo ==4){?>
|
if ($osvorm->nivo ==4){?>
|
||||||
|
|||||||
@@ -39,13 +39,13 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="background-color: #f2f2f2">
|
<tr style="background-color: #f2f2f2">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >
|
||||||
<i>Uitsplitsing onderwijsvraag per groep</i>
|
<i>Uitsplitsing onderwijsvraag per groep</i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?>>TLV-SBO</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?>>TLV-SBO</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >TLV-SO1</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >TLV-SO1</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >TLV-SO2</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >TLV-SO2</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if($data['osvormen']){
|
<?php if($data['osvormen']){
|
||||||
foreach($data['osvormen'] as $osvorm){
|
foreach($data['osvormen'] as $osvorm){
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
<tr style="background-color:#6F0B3D ; color:#ffffff;">
|
||||||
<td colspan=<?php echo count($data['groepen']) + 2; ?> >TLV-SO3</td>
|
<td colspan=<?php echo ($data['groepen'] ? count($data['groepen']) : 0) + 2; ?> >TLV-SO3</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if($data['osvormen']){
|
<?php if($data['osvormen']){
|
||||||
foreach($data['osvormen'] as $osvorm){
|
foreach($data['osvormen'] as $osvorm){
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"source": "https://github.com/bcit-ci/CodeIgniter"
|
"source": "https://github.com/bcit-ci/CodeIgniter"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "7.4.33",
|
"php": "^7.4 || ^8.0",
|
||||||
"sonata-project/google-authenticator": "^2.0",
|
"sonata-project/google-authenticator": "^2.0",
|
||||||
"mailgun/mailgun-php": "^3.5",
|
"mailgun/mailgun-php": "^3.5",
|
||||||
"kriswallsmith/buzz": "^1.2",
|
"kriswallsmith/buzz": "^1.2",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -47,7 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/benchmark.html
|
* @link https://codeigniter.com/userguide3/libraries/benchmark.html
|
||||||
*/
|
*/
|
||||||
class CI_Benchmark {
|
class CI_Benchmark {
|
||||||
|
|
||||||
|
|||||||
+23
-73
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage CodeIgniter
|
* @subpackage CodeIgniter
|
||||||
* @category Front-controller
|
* @category Front-controller
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/
|
* @link https://codeigniter.com/userguide3/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,7 +56,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const CI_VERSION = '3.1.11';
|
const CI_VERSION = '3.4.5';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
@@ -79,57 +80,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
*/
|
*/
|
||||||
require_once(BASEPATH.'core/Common.php');
|
require_once(BASEPATH.'core/Common.php');
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Security procedures
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! is_php('5.4'))
|
|
||||||
{
|
|
||||||
ini_set('magic_quotes_runtime', 0);
|
|
||||||
|
|
||||||
if ((bool) ini_get('register_globals'))
|
|
||||||
{
|
|
||||||
$_protected = array(
|
|
||||||
'_SERVER',
|
|
||||||
'_GET',
|
|
||||||
'_POST',
|
|
||||||
'_FILES',
|
|
||||||
'_REQUEST',
|
|
||||||
'_SESSION',
|
|
||||||
'_ENV',
|
|
||||||
'_COOKIE',
|
|
||||||
'GLOBALS',
|
|
||||||
'HTTP_RAW_POST_DATA',
|
|
||||||
'system_path',
|
|
||||||
'application_folder',
|
|
||||||
'view_folder',
|
|
||||||
'_protected',
|
|
||||||
'_registered'
|
|
||||||
);
|
|
||||||
|
|
||||||
$_registered = ini_get('variables_order');
|
|
||||||
foreach (array('E' => '_ENV', 'G' => '_GET', 'P' => '_POST', 'C' => '_COOKIE', 'S' => '_SERVER') as $key => $superglobal)
|
|
||||||
{
|
|
||||||
if (strpos($_registered, $key) === FALSE)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (array_keys($$superglobal) as $var)
|
|
||||||
{
|
|
||||||
if (isset($GLOBALS[$var]) && ! in_array($var, $_protected, TRUE))
|
|
||||||
{
|
|
||||||
$GLOBALS[$var] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
* Define a custom error handler so we can log PHP errors
|
* Define a custom error handler so we can log PHP errors
|
||||||
@@ -192,20 +142,6 @@ if ( ! is_php('5.4'))
|
|||||||
$BM->mark('total_execution_time_start');
|
$BM->mark('total_execution_time_start');
|
||||||
$BM->mark('loading_time:_base_classes_start');
|
$BM->mark('loading_time:_base_classes_start');
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Instantiate the hooks class
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT =& load_class('Hooks', 'core');
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ------------------------------------------------------
|
|
||||||
* Is there a "pre_system" hook?
|
|
||||||
* ------------------------------------------------------
|
|
||||||
*/
|
|
||||||
$EXT->call_hook('pre_system');
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
* Instantiate the config class
|
* Instantiate the config class
|
||||||
@@ -227,6 +163,20 @@ if ( ! is_php('5.4'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ------------------------------------------------------
|
||||||
|
* Instantiate the hooks class
|
||||||
|
* ------------------------------------------------------
|
||||||
|
*/
|
||||||
|
$EXT =& load_class('Hooks', 'core', $CFG);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ------------------------------------------------------
|
||||||
|
* Is there a "pre_system" hook?
|
||||||
|
* ------------------------------------------------------
|
||||||
|
*/
|
||||||
|
$EXT->call_hook('pre_system');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
* Important charset-related stuff
|
* Important charset-related stuff
|
||||||
@@ -294,14 +244,14 @@ if ( ! is_php('5.4'))
|
|||||||
* Instantiate the UTF-8 class
|
* Instantiate the UTF-8 class
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
$UNI =& load_class('Utf8', 'core');
|
$UNI =& load_class('Utf8', 'core', $charset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
* Instantiate the URI class
|
* Instantiate the URI class
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
$URI =& load_class('URI', 'core');
|
$URI =& load_class('URI', 'core', $CFG);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
@@ -332,14 +282,14 @@ if ( ! is_php('5.4'))
|
|||||||
* Load the security class for xss and csrf support
|
* Load the security class for xss and csrf support
|
||||||
* -----------------------------------------------------
|
* -----------------------------------------------------
|
||||||
*/
|
*/
|
||||||
$SEC =& load_class('Security', 'core');
|
$SEC =& load_class('Security', 'core', $charset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
* Load the Input class and sanitize globals
|
* Load the Input class and sanitize globals
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
$IN =& load_class('Input', 'core');
|
$IN =& load_class('Input', 'core', $SEC);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ------------------------------------------------------
|
* ------------------------------------------------------
|
||||||
@@ -434,7 +384,7 @@ if ( ! is_php('5.4'))
|
|||||||
* ReflectionMethod::isConstructor() is the ONLY reliable check,
|
* ReflectionMethod::isConstructor() is the ONLY reliable check,
|
||||||
* knowing which method will be executed as a constructor.
|
* knowing which method will be executed as a constructor.
|
||||||
*/
|
*/
|
||||||
elseif ( ! is_callable(array($class, $method)))
|
else
|
||||||
{
|
{
|
||||||
$reflection = new ReflectionMethod($class, $method);
|
$reflection = new ReflectionMethod($class, $method);
|
||||||
if ( ! $reflection->isPublic() OR $reflection->isConstructor())
|
if ( ! $reflection->isPublic() OR $reflection->isConstructor())
|
||||||
|
|||||||
+16
-12
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage CodeIgniter
|
* @subpackage CodeIgniter
|
||||||
* @category Common Functions
|
* @category Common Functions
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/
|
* @link https://codeigniter.com/userguide3/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
@@ -81,8 +82,7 @@ if ( ! function_exists('is_really_writable'))
|
|||||||
* Tests for file writability
|
* Tests for file writability
|
||||||
*
|
*
|
||||||
* is_writable() returns TRUE on Windows servers when you really can't write to
|
* is_writable() returns TRUE on Windows servers when you really can't write to
|
||||||
* the file, based on the read-only attribute. is_writable() is also unreliable
|
* the file, based on the read-only attribute.
|
||||||
* on Unix servers if safe_mode is on.
|
|
||||||
*
|
*
|
||||||
* @link https://bugs.php.net/bug.php?id=54709
|
* @link https://bugs.php.net/bug.php?id=54709
|
||||||
* @param string
|
* @param string
|
||||||
@@ -90,8 +90,8 @@ if ( ! function_exists('is_really_writable'))
|
|||||||
*/
|
*/
|
||||||
function is_really_writable($file)
|
function is_really_writable($file)
|
||||||
{
|
{
|
||||||
// If we're on a Unix server with safe_mode off we call is_writable
|
// If we're on a UNIX-like server, just is_writable()
|
||||||
if (DIRECTORY_SEPARATOR === '/' && (is_php('5.4') OR ! ini_get('safe_mode')))
|
if (DIRECTORY_SEPARATOR === '/')
|
||||||
{
|
{
|
||||||
return is_writable($file);
|
return is_writable($file);
|
||||||
}
|
}
|
||||||
@@ -499,6 +499,7 @@ if ( ! function_exists('set_status_header'))
|
|||||||
$stati = array(
|
$stati = array(
|
||||||
100 => 'Continue',
|
100 => 'Continue',
|
||||||
101 => 'Switching Protocols',
|
101 => 'Switching Protocols',
|
||||||
|
103 => 'Early Hints',
|
||||||
|
|
||||||
200 => 'OK',
|
200 => 'OK',
|
||||||
201 => 'Created',
|
201 => 'Created',
|
||||||
@@ -507,6 +508,7 @@ if ( ! function_exists('set_status_header'))
|
|||||||
204 => 'No Content',
|
204 => 'No Content',
|
||||||
205 => 'Reset Content',
|
205 => 'Reset Content',
|
||||||
206 => 'Partial Content',
|
206 => 'Partial Content',
|
||||||
|
207 => 'Multi-Status',
|
||||||
|
|
||||||
300 => 'Multiple Choices',
|
300 => 'Multiple Choices',
|
||||||
301 => 'Moved Permanently',
|
301 => 'Moved Permanently',
|
||||||
@@ -515,6 +517,7 @@ if ( ! function_exists('set_status_header'))
|
|||||||
304 => 'Not Modified',
|
304 => 'Not Modified',
|
||||||
305 => 'Use Proxy',
|
305 => 'Use Proxy',
|
||||||
307 => 'Temporary Redirect',
|
307 => 'Temporary Redirect',
|
||||||
|
308 => 'Permanent Redirect',
|
||||||
|
|
||||||
400 => 'Bad Request',
|
400 => 'Bad Request',
|
||||||
401 => 'Unauthorized',
|
401 => 'Unauthorized',
|
||||||
@@ -534,11 +537,13 @@ if ( ! function_exists('set_status_header'))
|
|||||||
415 => 'Unsupported Media Type',
|
415 => 'Unsupported Media Type',
|
||||||
416 => 'Requested Range Not Satisfiable',
|
416 => 'Requested Range Not Satisfiable',
|
||||||
417 => 'Expectation Failed',
|
417 => 'Expectation Failed',
|
||||||
|
421 => 'Misdirected Request',
|
||||||
422 => 'Unprocessable Entity',
|
422 => 'Unprocessable Entity',
|
||||||
426 => 'Upgrade Required',
|
426 => 'Upgrade Required',
|
||||||
428 => 'Precondition Required',
|
428 => 'Precondition Required',
|
||||||
429 => 'Too Many Requests',
|
429 => 'Too Many Requests',
|
||||||
431 => 'Request Header Fields Too Large',
|
431 => 'Request Header Fields Too Large',
|
||||||
|
451 => 'Unavailable For Legal Reasons',
|
||||||
|
|
||||||
500 => 'Internal Server Error',
|
500 => 'Internal Server Error',
|
||||||
501 => 'Not Implemented',
|
501 => 'Not Implemented',
|
||||||
@@ -565,7 +570,7 @@ if ( ! function_exists('set_status_header'))
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.0', 'HTTP/1.1', 'HTTP/2'), TRUE))
|
$server_protocol = (isset($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.0', 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0'), TRUE))
|
||||||
? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
|
? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
|
||||||
header($server_protocol.' '.$code.' '.$text, TRUE, $code);
|
header($server_protocol.' '.$code.' '.$text, TRUE, $code);
|
||||||
}
|
}
|
||||||
@@ -625,7 +630,7 @@ if ( ! function_exists('_error_handler'))
|
|||||||
|
|
||||||
// If the error is fatal, the execution of the script should be stopped because
|
// If the error is fatal, the execution of the script should be stopped because
|
||||||
// errors can't be recovered from. Halting the script conforms with PHP's
|
// errors can't be recovered from. Halting the script conforms with PHP's
|
||||||
// default error handling. See http://www.php.net/manual/en/errorfunc.constants.php
|
// default error handling. See https://secure.php.net/manual/en/errorfunc.constants.php
|
||||||
if ($is_error)
|
if ($is_error)
|
||||||
{
|
{
|
||||||
exit(1); // EXIT_ERROR
|
exit(1); // EXIT_ERROR
|
||||||
@@ -722,7 +727,7 @@ if ( ! function_exists('remove_invisible_characters'))
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$str = preg_replace($non_displayables, '', $str, -1, $count);
|
$str = preg_replace($non_displayables, '', (string)$str, -1, $count);
|
||||||
}
|
}
|
||||||
while ($count);
|
while ($count);
|
||||||
|
|
||||||
@@ -778,11 +783,9 @@ if ( ! function_exists('_stringify_attributes'))
|
|||||||
*/
|
*/
|
||||||
function _stringify_attributes($attributes, $js = FALSE)
|
function _stringify_attributes($attributes, $js = FALSE)
|
||||||
{
|
{
|
||||||
$atts = NULL;
|
|
||||||
|
|
||||||
if (empty($attributes))
|
if (empty($attributes))
|
||||||
{
|
{
|
||||||
return $atts;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($attributes))
|
if (is_string($attributes))
|
||||||
@@ -792,6 +795,7 @@ if ( ! function_exists('_stringify_attributes'))
|
|||||||
|
|
||||||
$attributes = (array) $attributes;
|
$attributes = (array) $attributes;
|
||||||
|
|
||||||
|
$atts = '';
|
||||||
foreach ($attributes as $key => $val)
|
foreach ($attributes as $key => $val)
|
||||||
{
|
{
|
||||||
$atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'="'.$val.'"';
|
$atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'="'.$val.'"';
|
||||||
|
|||||||
+18
-17
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/config.html
|
* @link https://codeigniter.com/userguide3/libraries/config.html
|
||||||
*/
|
*/
|
||||||
class CI_Config {
|
class CI_Config {
|
||||||
|
|
||||||
@@ -169,7 +170,7 @@ class CI_Config {
|
|||||||
$this->is_loaded[] = $file_path;
|
$this->is_loaded[] = $file_path;
|
||||||
$config = NULL;
|
$config = NULL;
|
||||||
$loaded = TRUE;
|
$loaded = TRUE;
|
||||||
log_message('debug', 'Config file loaded: '.$file_path);
|
log_message('info', 'Config file loaded: '.$file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,6 +325,20 @@ class CI_Config {
|
|||||||
|
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* System URL
|
||||||
|
*
|
||||||
|
* @deprecated 3.0.0
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function system_url()
|
||||||
|
{
|
||||||
|
$x = explode('/', preg_replace('|/*(.+?)/*$|', '\\1', BASEPATH));
|
||||||
|
return $this->slash_item('base_url').end($x).'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build URI string
|
* Build URI string
|
||||||
*
|
*
|
||||||
@@ -350,20 +365,6 @@ class CI_Config {
|
|||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
|
||||||
* System URL
|
|
||||||
*
|
|
||||||
* @deprecated 3.0.0 Encourages insecure practices
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function system_url()
|
|
||||||
{
|
|
||||||
$x = explode('/', preg_replace('|/*(.+?)/*$|', '\\1', BASEPATH));
|
|
||||||
return $this->slash_item('base_url').end($x).'/';
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a config file item
|
* Set a config file item
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -47,8 +48,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/general/controllers.html
|
* @link https://codeigniter.com/userguide3/general/controllers.html
|
||||||
*/
|
*/
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class CI_Controller {
|
class CI_Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+34
-14
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -44,7 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Exceptions
|
* @category Exceptions
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/exceptions.html
|
* @link https://codeigniter.com/userguide3/libraries/exceptions.html
|
||||||
*/
|
*/
|
||||||
class CI_Exceptions {
|
class CI_Exceptions {
|
||||||
|
|
||||||
@@ -61,18 +62,25 @@ class CI_Exceptions {
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $levels = array(
|
public $levels = array(
|
||||||
E_ERROR => 'Error',
|
E_ERROR => 'Error',
|
||||||
E_WARNING => 'Warning',
|
E_RECOVERABLE_ERROR => 'Recoverable Error',
|
||||||
E_PARSE => 'Parsing Error',
|
E_WARNING => 'Warning',
|
||||||
E_NOTICE => 'Notice',
|
E_PARSE => 'Parsing Error',
|
||||||
E_CORE_ERROR => 'Core Error',
|
E_NOTICE => 'Notice',
|
||||||
E_CORE_WARNING => 'Core Warning',
|
E_DEPRECATED => 'Deprecated Notice',
|
||||||
E_COMPILE_ERROR => 'Compile Error',
|
E_CORE_ERROR => 'Core Error',
|
||||||
E_COMPILE_WARNING => 'Compile Warning',
|
E_CORE_WARNING => 'Core Warning',
|
||||||
E_USER_ERROR => 'User Error',
|
E_COMPILE_ERROR => 'Compile Error',
|
||||||
E_USER_WARNING => 'User Warning',
|
E_COMPILE_WARNING => 'Compile Warning',
|
||||||
E_USER_NOTICE => 'User Notice',
|
E_USER_ERROR => 'User Error',
|
||||||
E_STRICT => 'Runtime Notice'
|
E_USER_WARNING => 'User Warning',
|
||||||
|
E_USER_NOTICE => 'User Notice',
|
||||||
|
E_USER_DEPRECATED => 'User Deprecated Notice',
|
||||||
|
|
||||||
|
# 2048 is E_STRICT, but it's deprecated in PHP 8.4.
|
||||||
|
# We're keeping this here for backwards compatibility.
|
||||||
|
# If we're on older PHP, E_STRICT errors will be labelled correctly, and if we're on PHP 8.4+, this will be ignored.
|
||||||
|
2048 => 'Strict Notice',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,6 +169,10 @@ class CI_Exceptions {
|
|||||||
{
|
{
|
||||||
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$templates_path = rtrim($templates_path, '/\\').DIRECTORY_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_cli())
|
if (is_cli())
|
||||||
{
|
{
|
||||||
@@ -194,6 +206,10 @@ class CI_Exceptions {
|
|||||||
{
|
{
|
||||||
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$templates_path = rtrim($templates_path, '/\\').DIRECTORY_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
$message = $exception->getMessage();
|
$message = $exception->getMessage();
|
||||||
if (empty($message))
|
if (empty($message))
|
||||||
@@ -240,6 +256,10 @@ class CI_Exceptions {
|
|||||||
{
|
{
|
||||||
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
$templates_path = VIEWPATH.'errors'.DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$templates_path = rtrim($templates_path, '/\\').DIRECTORY_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
$severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity;
|
$severity = isset($this->levels[$severity]) ? $this->levels[$severity] : $severity;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/general/hooks.html
|
* @link https://codeigniter.com/userguide3/general/hooks.html
|
||||||
*/
|
*/
|
||||||
class CI_Hooks {
|
class CI_Hooks {
|
||||||
|
|
||||||
@@ -83,16 +84,16 @@ class CI_Hooks {
|
|||||||
/**
|
/**
|
||||||
* Class constructor
|
* Class constructor
|
||||||
*
|
*
|
||||||
|
* @param CI_Config $config
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(CI_Config $config)
|
||||||
{
|
{
|
||||||
$CFG =& load_class('Config', 'core');
|
|
||||||
log_message('info', 'Hooks Class Initialized');
|
log_message('info', 'Hooks Class Initialized');
|
||||||
|
|
||||||
// If hooks are not enabled in the config file
|
// If hooks are not enabled in the config file
|
||||||
// there is nothing else to do
|
// there is nothing else to do
|
||||||
if ($CFG->item('enable_hooks') === FALSE)
|
if ($config->item('enable_hooks') === FALSE)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+74
-249
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Input
|
* @category Input
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/input.html
|
* @link https://codeigniter.com/userguide3/libraries/input.html
|
||||||
*/
|
*/
|
||||||
class CI_Input {
|
class CI_Input {
|
||||||
|
|
||||||
@@ -57,45 +58,6 @@ class CI_Input {
|
|||||||
*/
|
*/
|
||||||
protected $ip_address = FALSE;
|
protected $ip_address = FALSE;
|
||||||
|
|
||||||
/**
|
|
||||||
* Allow GET array flag
|
|
||||||
*
|
|
||||||
* If set to FALSE, then $_GET will be set to an empty array.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $_allow_get_array = TRUE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Standardize new lines flag
|
|
||||||
*
|
|
||||||
* If set to TRUE, then newlines are standardized.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $_standardize_newlines;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable XSS flag
|
|
||||||
*
|
|
||||||
* Determines whether the XSS filter is always active when
|
|
||||||
* GET, POST or COOKIE data is encountered.
|
|
||||||
* Set automatically based on config setting.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $_enable_xss = FALSE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable CSRF flag
|
|
||||||
*
|
|
||||||
* Enables a CSRF cookie token to be set.
|
|
||||||
* Set automatically based on config setting.
|
|
||||||
*
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $_enable_csrf = FALSE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of all HTTP request headers
|
* List of all HTTP request headers
|
||||||
*
|
*
|
||||||
@@ -122,8 +84,15 @@ class CI_Input {
|
|||||||
*/
|
*/
|
||||||
protected $_input_stream;
|
protected $_input_stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CI_Security instance
|
||||||
|
*
|
||||||
|
* Used for the optional $xss_filter parameter that most
|
||||||
|
* getter methods have here.
|
||||||
|
*
|
||||||
|
* @var CI_Security
|
||||||
|
*/
|
||||||
protected $security;
|
protected $security;
|
||||||
protected $uni;
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -135,30 +104,9 @@ class CI_Input {
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(CI_Security &$security)
|
||||||
{
|
{
|
||||||
$this->_allow_get_array = (config_item('allow_get_array') !== FALSE);
|
$this->security = $security;
|
||||||
$this->_enable_xss = (config_item('global_xss_filtering') === TRUE);
|
|
||||||
$this->_enable_csrf = (config_item('csrf_protection') === TRUE);
|
|
||||||
$this->_standardize_newlines = (bool) config_item('standardize_newlines');
|
|
||||||
|
|
||||||
$this->security =& load_class('Security', 'core');
|
|
||||||
|
|
||||||
// Do we need the UTF-8 class?
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
$this->uni =& load_class('Utf8', 'core');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sanitize global arrays
|
|
||||||
$this->_sanitize_globals();
|
|
||||||
|
|
||||||
// CSRF Protection check
|
|
||||||
if ($this->_enable_csrf === TRUE && ! is_cli())
|
|
||||||
{
|
|
||||||
$this->security->csrf_verify();
|
|
||||||
}
|
|
||||||
|
|
||||||
log_message('info', 'Input Class Initialized');
|
log_message('info', 'Input Class Initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,10 +122,8 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = NULL)
|
protected function _fetch_from_array(&$array, $index = NULL, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
is_bool($xss_clean) OR $xss_clean = $this->_enable_xss;
|
|
||||||
|
|
||||||
// If $index is NULL, it means that the whole $array is requested
|
// If $index is NULL, it means that the whole $array is requested
|
||||||
isset($index) OR $index = array_keys($array);
|
isset($index) OR $index = array_keys($array);
|
||||||
|
|
||||||
@@ -237,7 +183,7 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get($index = NULL, $xss_clean = NULL)
|
public function get($index = NULL, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_fetch_from_array($_GET, $index, $xss_clean);
|
return $this->_fetch_from_array($_GET, $index, $xss_clean);
|
||||||
}
|
}
|
||||||
@@ -251,7 +197,7 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function post($index = NULL, $xss_clean = NULL)
|
public function post($index = NULL, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_fetch_from_array($_POST, $index, $xss_clean);
|
return $this->_fetch_from_array($_POST, $index, $xss_clean);
|
||||||
}
|
}
|
||||||
@@ -265,11 +211,10 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function post_get($index, $xss_clean = NULL)
|
public function post_get($index, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return isset($_POST[$index])
|
$output = $this->post($index, $xss_clean);
|
||||||
? $this->post($index, $xss_clean)
|
return isset($output) ? $output : $this->get($index, $xss_clean);
|
||||||
: $this->get($index, $xss_clean);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -281,11 +226,10 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get_post($index, $xss_clean = NULL)
|
public function get_post($index, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return isset($_GET[$index])
|
$output = $this->get($index, $xss_clean);
|
||||||
? $this->get($index, $xss_clean)
|
return isset($output) ? $output : $this->post($index, $xss_clean);
|
||||||
: $this->post($index, $xss_clean);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -297,7 +241,7 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function cookie($index = NULL, $xss_clean = NULL)
|
public function cookie($index = NULL, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
|
return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
|
||||||
}
|
}
|
||||||
@@ -311,7 +255,7 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function server($index, $xss_clean = NULL)
|
public function server($index, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
|
return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
|
||||||
}
|
}
|
||||||
@@ -327,7 +271,7 @@ class CI_Input {
|
|||||||
* @param bool $xss_clean Whether to apply XSS filtering
|
* @param bool $xss_clean Whether to apply XSS filtering
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function input_stream($index = NULL, $xss_clean = NULL)
|
public function input_stream($index = NULL, $xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
// Prior to PHP 5.6, the input stream can only be read once,
|
// Prior to PHP 5.6, the input stream can only be read once,
|
||||||
// so we'll need to check if we have already done that first.
|
// so we'll need to check if we have already done that first.
|
||||||
@@ -357,14 +301,15 @@ class CI_Input {
|
|||||||
* @param string $prefix Cookie name prefix
|
* @param string $prefix Cookie name prefix
|
||||||
* @param bool $secure Whether to only transfer cookies via SSL
|
* @param bool $secure Whether to only transfer cookies via SSL
|
||||||
* @param bool $httponly Whether to only makes the cookie accessible via HTTP (no javascript)
|
* @param bool $httponly Whether to only makes the cookie accessible via HTTP (no javascript)
|
||||||
|
* @param string $samesite SameSite attribute
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL)
|
public function set_cookie($name, $value = '', $expire = 0, $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL, $samesite = NULL)
|
||||||
{
|
{
|
||||||
if (is_array($name))
|
if (is_array($name))
|
||||||
{
|
{
|
||||||
// always leave 'name' in last place, as the loop will break otherwise, due to $$item
|
// always leave 'name' in last place, as the loop will break otherwise, due to $$item
|
||||||
foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'httponly', 'name') as $item)
|
foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'httponly', 'samesite', 'name') as $item)
|
||||||
{
|
{
|
||||||
if (isset($name[$item]))
|
if (isset($name[$item]))
|
||||||
{
|
{
|
||||||
@@ -396,16 +341,56 @@ class CI_Input {
|
|||||||
? (bool) config_item('cookie_httponly')
|
? (bool) config_item('cookie_httponly')
|
||||||
: (bool) $httponly;
|
: (bool) $httponly;
|
||||||
|
|
||||||
if ( ! is_numeric($expire))
|
if ( ! is_numeric($expire) OR $expire < 0)
|
||||||
{
|
{
|
||||||
$expire = time() - 86500;
|
$expire = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$expire = ($expire > 0) ? time() + $expire : 0;
|
$expire = ($expire > 0) ? time() + $expire : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcookie($prefix.$name, $value, $expire, $path, $domain, $secure, $httponly);
|
isset($samesite) OR $samesite = config_item('cookie_samesite');
|
||||||
|
if (isset($samesite))
|
||||||
|
{
|
||||||
|
$samesite = ucfirst(strtolower($samesite));
|
||||||
|
in_array($samesite, array('Lax', 'Strict', 'None'), TRUE) OR $samesite = 'Lax';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$samesite = 'Lax';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($samesite === 'None' && ! $secure)
|
||||||
|
{
|
||||||
|
log_message('error', $name.' cookie sent with SameSite=None, but without Secure attribute.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! is_php('7.3'))
|
||||||
|
{
|
||||||
|
$maxage = $expire - time();
|
||||||
|
if ($maxage < 1)
|
||||||
|
{
|
||||||
|
$maxage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cookie_header = 'Set-Cookie: '.$prefix.$name.'='.rawurlencode($value);
|
||||||
|
$cookie_header .= ($expire === 0 ? '' : '; Expires='.gmdate('D, d-M-Y H:i:s T', $expire)).'; Max-Age='.$maxage;
|
||||||
|
$cookie_header .= '; Path='.$path.($domain !== '' ? '; Domain='.$domain : '');
|
||||||
|
$cookie_header .= ($secure ? '; Secure' : '').($httponly ? '; HttpOnly' : '').'; SameSite='.$samesite;
|
||||||
|
header($cookie_header);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$setcookie_options = array(
|
||||||
|
'expires' => $expire,
|
||||||
|
'path' => $path,
|
||||||
|
'domain' => $domain,
|
||||||
|
'secure' => $secure,
|
||||||
|
'httponly' => $httponly,
|
||||||
|
'samesite' => $samesite,
|
||||||
|
);
|
||||||
|
setcookie($prefix.$name, $value, $setcookie_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -565,7 +550,7 @@ class CI_Input {
|
|||||||
$which = FILTER_FLAG_IPV6;
|
$which = FILTER_FLAG_IPV6;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$which = NULL;
|
$which = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,174 +564,13 @@ class CI_Input {
|
|||||||
*
|
*
|
||||||
* @return string|null User Agent string or NULL if it doesn't exist
|
* @return string|null User Agent string or NULL if it doesn't exist
|
||||||
*/
|
*/
|
||||||
public function user_agent($xss_clean = NULL)
|
public function user_agent($xss_clean = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_fetch_from_array($_SERVER, 'HTTP_USER_AGENT', $xss_clean);
|
return $this->_fetch_from_array($_SERVER, 'HTTP_USER_AGENT', $xss_clean);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
|
||||||
* Sanitize Globals
|
|
||||||
*
|
|
||||||
* Internal method serving for the following purposes:
|
|
||||||
*
|
|
||||||
* - Unsets $_GET data, if query strings are not enabled
|
|
||||||
* - Cleans POST, COOKIE and SERVER data
|
|
||||||
* - Standardizes newline characters to PHP_EOL
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function _sanitize_globals()
|
|
||||||
{
|
|
||||||
// Is $_GET data allowed? If not we'll set the $_GET to an empty array
|
|
||||||
if ($this->_allow_get_array === FALSE)
|
|
||||||
{
|
|
||||||
$_GET = array();
|
|
||||||
}
|
|
||||||
elseif (is_array($_GET))
|
|
||||||
{
|
|
||||||
foreach ($_GET as $key => $val)
|
|
||||||
{
|
|
||||||
$_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean $_POST Data
|
|
||||||
if (is_array($_POST))
|
|
||||||
{
|
|
||||||
foreach ($_POST as $key => $val)
|
|
||||||
{
|
|
||||||
$_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean $_COOKIE Data
|
|
||||||
if (is_array($_COOKIE))
|
|
||||||
{
|
|
||||||
// Also get rid of specially treated cookies that might be set by a server
|
|
||||||
// or silly application, that are of no use to a CI application anyway
|
|
||||||
// but that when present will trip our 'Disallowed Key Characters' alarm
|
|
||||||
// http://www.ietf.org/rfc/rfc2109.txt
|
|
||||||
// note that the key names below are single quoted strings, and are not PHP variables
|
|
||||||
unset(
|
|
||||||
$_COOKIE['$Version'],
|
|
||||||
$_COOKIE['$Path'],
|
|
||||||
$_COOKIE['$Domain']
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($_COOKIE as $key => $val)
|
|
||||||
{
|
|
||||||
if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE)
|
|
||||||
{
|
|
||||||
$_COOKIE[$cookie_key] = $this->_clean_input_data($val);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
unset($_COOKIE[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sanitize PHP_SELF
|
|
||||||
$_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);
|
|
||||||
|
|
||||||
log_message('debug', 'Global POST, GET and COOKIE data sanitized');
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean Input Data
|
|
||||||
*
|
|
||||||
* Internal method that aids in escaping data and
|
|
||||||
* standardizing newline characters to PHP_EOL.
|
|
||||||
*
|
|
||||||
* @param string|string[] $str Input string(s)
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function _clean_input_data($str)
|
|
||||||
{
|
|
||||||
if (is_array($str))
|
|
||||||
{
|
|
||||||
$new_array = array();
|
|
||||||
foreach (array_keys($str) as $key)
|
|
||||||
{
|
|
||||||
$new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($str[$key]);
|
|
||||||
}
|
|
||||||
return $new_array;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We strip slashes if magic quotes is on to keep things consistent
|
|
||||||
|
|
||||||
NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and
|
|
||||||
it will probably not exist in future versions at all.
|
|
||||||
*/
|
|
||||||
if ( ! is_php('5.4') && get_magic_quotes_gpc())
|
|
||||||
{
|
|
||||||
$str = stripslashes($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean UTF-8 if supported
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
$str = $this->uni->clean_string($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove control characters
|
|
||||||
$str = remove_invisible_characters($str, FALSE);
|
|
||||||
|
|
||||||
// Standardize newlines if needed
|
|
||||||
if ($this->_standardize_newlines === TRUE)
|
|
||||||
{
|
|
||||||
return preg_replace('/(?:\r\n|[\r\n])/', PHP_EOL, $str);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean Keys
|
|
||||||
*
|
|
||||||
* Internal method that helps to prevent malicious users
|
|
||||||
* from trying to exploit keys we make sure that keys are
|
|
||||||
* only named with alpha-numeric text and a few other items.
|
|
||||||
*
|
|
||||||
* @param string $str Input string
|
|
||||||
* @param bool $fatal Whether to terminate script exection
|
|
||||||
* or to return FALSE if an invalid
|
|
||||||
* key is encountered
|
|
||||||
* @return string|bool
|
|
||||||
*/
|
|
||||||
protected function _clean_input_keys($str, $fatal = TRUE)
|
|
||||||
{
|
|
||||||
if ( ! preg_match('/^[a-z0-9:_\/|-]+$/i', $str))
|
|
||||||
{
|
|
||||||
if ($fatal === TRUE)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
set_status_header(503);
|
|
||||||
echo 'Disallowed Key Characters.';
|
|
||||||
exit(7); // EXIT_USER_INPUT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean UTF-8 if supported
|
|
||||||
if (UTF8_ENABLED === TRUE)
|
|
||||||
{
|
|
||||||
return $this->uni->clean_string($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $str;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request Headers
|
* Request Headers
|
||||||
*
|
*
|
||||||
@@ -844,6 +668,7 @@ class CI_Input {
|
|||||||
* Test to see if a request was made from the command line.
|
* Test to see if a request was made from the command line.
|
||||||
*
|
*
|
||||||
* @deprecated 3.0.0 Use is_cli() instead
|
* @deprecated 3.0.0 Use is_cli() instead
|
||||||
|
* @see is_cli()
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function is_cli_request()
|
public function is_cli_request()
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -44,7 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Language
|
* @category Language
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/language.html
|
* @link https://codeigniter.com/userguide3/libraries/language.html
|
||||||
*/
|
*/
|
||||||
class CI_Lang {
|
class CI_Lang {
|
||||||
|
|
||||||
@@ -189,7 +190,7 @@ class CI_Lang {
|
|||||||
*/
|
*/
|
||||||
public function line($line, $log_errors = TRUE)
|
public function line($line, $log_errors = TRUE)
|
||||||
{
|
{
|
||||||
$value = isset($this->language[$line]) ? $this->language[$line] : FALSE;
|
$value = ($line !== NULL && isset($this->language[$line])) ? $this->language[$line] : FALSE;
|
||||||
|
|
||||||
// Because killer robots like unicorns!
|
// Because killer robots like unicorns!
|
||||||
if ($value === FALSE && $log_errors === TRUE)
|
if ($value === FALSE && $log_errors === TRUE)
|
||||||
|
|||||||
+63
-30
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,8 +47,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Loader
|
* @category Loader
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/loader.html
|
* @link https://codeigniter.com/userguide3/libraries/loader.html
|
||||||
*/
|
*/
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class CI_Loader {
|
class CI_Loader {
|
||||||
|
|
||||||
// All these are set automatically. Don't mess with them.
|
// All these are set automatically. Don't mess with them.
|
||||||
@@ -93,6 +95,13 @@ class CI_Loader {
|
|||||||
*/
|
*/
|
||||||
protected $_ci_cached_vars = array();
|
protected $_ci_cached_vars = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stack of variable arrays to provide nested _ci_load calls with all variables from parent calls
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $_ci_load_vars_stack = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of loaded classes
|
* List of loaded classes
|
||||||
*
|
*
|
||||||
@@ -348,9 +357,10 @@ class CI_Loader {
|
|||||||
throw new RuntimeException('Unable to locate the model you have specified: '.$model);
|
throw new RuntimeException('Unable to locate the model you have specified: '.$model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ( ! is_subclass_of($model, 'CI_Model'))
|
|
||||||
|
if ( ! is_subclass_of($model, 'CI_Model'))
|
||||||
{
|
{
|
||||||
throw new RuntimeException("Class ".$model." already exists and doesn't extend CI_Model");
|
throw new RuntimeException("Class ".$model." doesn't extend CI_Model");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_ci_models[] = $name;
|
$this->_ci_models[] = $name;
|
||||||
@@ -367,19 +377,16 @@ class CI_Loader {
|
|||||||
*
|
*
|
||||||
* @param mixed $params Database configuration options
|
* @param mixed $params Database configuration options
|
||||||
* @param bool $return Whether to return the database object
|
* @param bool $return Whether to return the database object
|
||||||
* @param bool $query_builder Whether to enable Query Builder
|
|
||||||
* (overrides the configuration setting)
|
|
||||||
*
|
|
||||||
* @return object|bool Database object if $return is set to TRUE,
|
* @return object|bool Database object if $return is set to TRUE,
|
||||||
* FALSE on failure, CI_Loader instance in any other case
|
* FALSE on failure, CI_Loader instance in any other case
|
||||||
*/
|
*/
|
||||||
public function database($params = '', $return = FALSE, $query_builder = NULL)
|
public function database($params = '', $return = FALSE)
|
||||||
{
|
{
|
||||||
// Grab the super object
|
// Grab the super object
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
|
|
||||||
// Do we even need to load the database class?
|
// Do we even need to load the database class?
|
||||||
if ($return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id))
|
if ($return === FALSE && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -388,7 +395,7 @@ class CI_Loader {
|
|||||||
|
|
||||||
if ($return === TRUE)
|
if ($return === TRUE)
|
||||||
{
|
{
|
||||||
return DB($params, $query_builder);
|
return DB($params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the db variable. Needed to prevent
|
// Initialize the db variable. Needed to prevent
|
||||||
@@ -396,7 +403,7 @@ class CI_Loader {
|
|||||||
$CI->db = '';
|
$CI->db = '';
|
||||||
|
|
||||||
// Load the DB class
|
// Load the DB class
|
||||||
$CI->db =& DB($params, $query_builder);
|
$CI->db =& DB($params);
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +499,20 @@ class CI_Loader {
|
|||||||
*/
|
*/
|
||||||
public function view($view, $vars = array(), $return = FALSE)
|
public function view($view, $vars = array(), $return = FALSE)
|
||||||
{
|
{
|
||||||
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
|
$measure = "View - $view";
|
||||||
|
$CI =& get_instance();
|
||||||
|
|
||||||
|
if (property_exists($CI, "debugbar") && $CI->debugbar) {
|
||||||
|
$CI->debugbar["time"]->startMeasure($measure);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
|
||||||
|
|
||||||
|
if (property_exists($CI, "debugbar") && $CI->debugbar && $CI->debugbar["time"]->hasStartedMeasure($measure)) {
|
||||||
|
$CI->debugbar["time"]->stopMeasure($measure);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -933,17 +953,38 @@ class CI_Loader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extract and cache variables
|
* Extract and stack variables
|
||||||
*
|
*
|
||||||
* You can either set variables using the dedicated $this->load->vars()
|
* You can either set variables using the dedicated $this->load->vars()
|
||||||
* function or via the second parameter of this function. We'll merge
|
* function or via the second parameter of this function. We'll merge
|
||||||
* the two types and cache them so that views that are embedded within
|
* the two types so that loaded views and files have access to these
|
||||||
* other views can have access to these variables.
|
* variables.
|
||||||
|
* Additionally we want all subsequent nested _ci_load() calls embedded
|
||||||
|
* within the current file to 'inherit' all variables that are
|
||||||
|
* accessible to the current file. For this purpose we push the current
|
||||||
|
* variable configuration (_ci_vars) to the stack and remove it again
|
||||||
|
* after the file or view is completely loaded. Nested _ci_load() calls
|
||||||
|
* within the current file extend the stack with their variable
|
||||||
|
* configuration.
|
||||||
*/
|
*/
|
||||||
empty($_ci_vars) OR $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
|
|
||||||
extract($this->_ci_cached_vars);
|
|
||||||
|
|
||||||
/*
|
is_array($_ci_vars) OR $_ci_vars = array();
|
||||||
|
|
||||||
|
// Include the global cached vars into the current _ci_vars if needed
|
||||||
|
empty($this->_ci_cached_vars) OR $_ci_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
|
||||||
|
|
||||||
|
// Merge the last variable configuration from a parent _ci_load()
|
||||||
|
// call into the current _ci_vars
|
||||||
|
if ( ! empty($this->_ci_load_vars_stack))
|
||||||
|
{
|
||||||
|
$previous_variable_configuration = end($this->_ci_load_vars_stack);
|
||||||
|
$_ci_vars = array_merge($previous_variable_configuration, $_ci_vars);
|
||||||
|
}
|
||||||
|
|
||||||
|
array_push($this->_ci_load_vars_stack, $_ci_vars);
|
||||||
|
extract($_ci_vars);
|
||||||
|
|
||||||
|
/**
|
||||||
* Buffer the output
|
* Buffer the output
|
||||||
*
|
*
|
||||||
* We buffer the output for two reasons:
|
* We buffer the output for two reasons:
|
||||||
@@ -956,20 +997,12 @@ class CI_Loader {
|
|||||||
*/
|
*/
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
// If the PHP installation does not support short tags we'll
|
include($_ci_path); // include() vs include_once() allows for multiple views with the same name
|
||||||
// do a little string replacement, changing the short tags
|
|
||||||
// to standard PHP echo statements.
|
|
||||||
if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
|
|
||||||
{
|
|
||||||
echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
include($_ci_path); // include() vs include_once() allows for multiple views with the same name
|
|
||||||
}
|
|
||||||
|
|
||||||
log_message('info', 'File loaded: '.$_ci_path);
|
log_message('info', 'File loaded: '.$_ci_path);
|
||||||
|
|
||||||
|
// Remove current _ci_vars from stack
|
||||||
|
array_pop($this->_ci_load_vars_stack);
|
||||||
|
|
||||||
// Return the file data if requested
|
// Return the file data if requested
|
||||||
if ($_ci_return === TRUE)
|
if ($_ci_return === TRUE)
|
||||||
{
|
{
|
||||||
|
|||||||
+30
-19
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -44,7 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Logging
|
* @category Logging
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/general/errors.html
|
* @link https://codeigniter.com/userguide3/general/errors.html
|
||||||
*/
|
*/
|
||||||
class CI_Log {
|
class CI_Log {
|
||||||
|
|
||||||
@@ -55,6 +56,13 @@ class CI_Log {
|
|||||||
*/
|
*/
|
||||||
protected $_log_path;
|
protected $_log_path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log filename
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_log_filename;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File permissions
|
* File permissions
|
||||||
*
|
*
|
||||||
@@ -83,13 +91,6 @@ class CI_Log {
|
|||||||
*/
|
*/
|
||||||
protected $_date_fmt = 'Y-m-d H:i:s';
|
protected $_date_fmt = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
/**
|
|
||||||
* Filename extension
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $_file_ext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the logger can write to the log files
|
* Whether or not the logger can write to the log files
|
||||||
*
|
*
|
||||||
@@ -122,11 +123,24 @@ class CI_Log {
|
|||||||
{
|
{
|
||||||
$config =& get_config();
|
$config =& get_config();
|
||||||
|
|
||||||
isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
|
isset(self::$func_overload) OR self::$func_overload = ( ! is_php('8.0') && extension_loaded('mbstring') && @ini_get('mbstring.func_overload'));
|
||||||
|
|
||||||
$this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/';
|
$this->_log_path = ($config['log_path'] !== '')
|
||||||
$this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
|
? rtrim($config['log_path'], '/\\').DIRECTORY_SEPARATOR : APPPATH.'logs'.DIRECTORY_SEPARATOR;
|
||||||
? ltrim($config['log_file_extension'], '.') : 'php';
|
|
||||||
|
if (isset($config['log_filename']) && $config['log_filename'] !== '')
|
||||||
|
{
|
||||||
|
$this->_log_filename = $config['log_filename'];
|
||||||
|
}
|
||||||
|
elseif (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
|
||||||
|
{
|
||||||
|
$ext = ltrim($config['log_file_extension'], '.');
|
||||||
|
$this->_log_filename = 'log-'.date('Y-m-d').'.'.$ext;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->_log_filename = 'log-'.date('Y-m-d').'.php';
|
||||||
|
}
|
||||||
|
|
||||||
file_exists($this->_log_path) OR mkdir($this->_log_path, 0755, TRUE);
|
file_exists($this->_log_path) OR mkdir($this->_log_path, 0755, TRUE);
|
||||||
|
|
||||||
@@ -182,14 +196,14 @@ class CI_Log {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filepath = $this->_log_path.'log-'.date('Y-m-d').'.'.$this->_file_ext;
|
$filepath = $this->_log_path.$this->_log_filename;
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
if ( ! file_exists($filepath))
|
if ( ! file_exists($filepath))
|
||||||
{
|
{
|
||||||
$newfile = TRUE;
|
$newfile = TRUE;
|
||||||
// Only add protection to php files
|
// Only add protection to php files
|
||||||
if ($this->_file_ext === 'php')
|
if (substr($this->_log_filename, -3, 3) === 'php')
|
||||||
{
|
{
|
||||||
$message .= "<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>\n\n";
|
$message .= "<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>\n\n";
|
||||||
}
|
}
|
||||||
@@ -217,7 +231,7 @@ class CI_Log {
|
|||||||
|
|
||||||
$message .= $this->_format_line($level, $date, $msg);
|
$message .= $this->_format_line($level, $date, $msg);
|
||||||
|
|
||||||
for ($written = 0, $length = self::strlen($message); $written < $length; $written += $result)
|
for ($result = $written = 0, $length = self::strlen($message); $written < $length; $written += $result)
|
||||||
{
|
{
|
||||||
if (($result = fwrite($fp, self::substr($message, $written))) === FALSE)
|
if (($result = fwrite($fp, self::substr($message, $written))) === FALSE)
|
||||||
{
|
{
|
||||||
@@ -283,9 +297,6 @@ class CI_Log {
|
|||||||
{
|
{
|
||||||
if (self::$func_overload)
|
if (self::$func_overload)
|
||||||
{
|
{
|
||||||
// mb_substr($str, $start, null, '8bit') returns an empty
|
|
||||||
// string on PHP 5.3
|
|
||||||
isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start);
|
|
||||||
return mb_substr($str, $start, $length, '8bit');
|
return mb_substr($str, $start, $length, '8bit');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -44,8 +45,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/config.html
|
* @link https://codeigniter.com/userguide3/libraries/config.html
|
||||||
*/
|
*/
|
||||||
|
#[AllowDynamicProperties]
|
||||||
class CI_Model {
|
class CI_Model {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+21
-19
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Output
|
* @category Output
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/output.html
|
* @link https://codeigniter.com/userguide3/libraries/output.html
|
||||||
*/
|
*/
|
||||||
class CI_Output {
|
class CI_Output {
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ class CI_Output {
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $final_output;
|
public $final_output = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache expiration time
|
* Cache expiration time
|
||||||
@@ -145,7 +146,7 @@ class CI_Output {
|
|||||||
&& extension_loaded('zlib')
|
&& extension_loaded('zlib')
|
||||||
);
|
);
|
||||||
|
|
||||||
isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
|
isset(self::$func_overload) OR self::$func_overload = ( ! is_php('8.0') && extension_loaded('mbstring') && @ini_get('mbstring.func_overload'));
|
||||||
|
|
||||||
// Get mime types for later
|
// Get mime types for later
|
||||||
$this->mimes =& get_mimes();
|
$this->mimes =& get_mimes();
|
||||||
@@ -299,10 +300,14 @@ class CI_Output {
|
|||||||
*/
|
*/
|
||||||
public function get_header($header)
|
public function get_header($header)
|
||||||
{
|
{
|
||||||
// Combine headers already sent with our batched headers
|
// We only need [x][0] from our multi-dimensional array
|
||||||
|
$header_lines = array_map(function ($headers)
|
||||||
|
{
|
||||||
|
return array_shift($headers);
|
||||||
|
}, $this->headers);
|
||||||
|
|
||||||
$headers = array_merge(
|
$headers = array_merge(
|
||||||
// We only need [x][0] from our multi-dimensional array
|
$header_lines,
|
||||||
array_map('array_shift', $this->headers),
|
|
||||||
headers_list()
|
headers_list()
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -412,7 +417,7 @@ class CI_Output {
|
|||||||
* @param string $output Output data override
|
* @param string $output Output data override
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function _display($output = '')
|
public function _display($output = NULL)
|
||||||
{
|
{
|
||||||
// Note: We use load_class() because we can't use $CI =& get_instance()
|
// Note: We use load_class() because we can't use $CI =& get_instance()
|
||||||
// since this function is sometimes called by the caching mechanism,
|
// since this function is sometimes called by the caching mechanism,
|
||||||
@@ -429,7 +434,7 @@ class CI_Output {
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
// Set the output data
|
// Set the output data
|
||||||
if ($output === '')
|
if ($output === NULL)
|
||||||
{
|
{
|
||||||
$output =& $this->final_output;
|
$output =& $this->final_output;
|
||||||
}
|
}
|
||||||
@@ -451,7 +456,7 @@ class CI_Output {
|
|||||||
|
|
||||||
$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
|
$elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
|
||||||
|
|
||||||
if ($this->parse_exec_vars === TRUE)
|
if ($this->parse_exec_vars === TRUE && !empty($output))
|
||||||
{
|
{
|
||||||
$memory = round(memory_get_usage() / 1024 / 1024, 2).'MB';
|
$memory = round(memory_get_usage() / 1024 / 1024, 2).'MB';
|
||||||
$output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);
|
$output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);
|
||||||
@@ -502,7 +507,7 @@ class CI_Output {
|
|||||||
|
|
||||||
echo $output;
|
echo $output;
|
||||||
log_message('info', 'Final output sent to browser');
|
log_message('info', 'Final output sent to browser');
|
||||||
log_message('debug', 'Total execution time: '.$elapsed);
|
log_message('info', 'Total execution time: '.$elapsed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,7 +544,7 @@ class CI_Output {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_message('info', 'Final output sent to browser');
|
log_message('info', 'Final output sent to browser');
|
||||||
log_message('debug', 'Total execution time: '.$elapsed);
|
log_message('info', 'Total execution time: '.$elapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -554,7 +559,7 @@ class CI_Output {
|
|||||||
{
|
{
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
$path = $CI->config->item('cache_path');
|
$path = $CI->config->item('cache_path');
|
||||||
$cache_path = ($path === '') ? APPPATH.'cache/' : $path;
|
$cache_path = ($path === '') ? APPPATH.'cache'.DIRECTORY_SEPARATOR : rtrim($path, '/\\').DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
|
if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path))
|
||||||
{
|
{
|
||||||
@@ -563,7 +568,7 @@ class CI_Output {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$uri = $CI->config->item('base_url')
|
$uri = $CI->config->item('base_url')
|
||||||
.$CI->config->item('index_page')
|
.$CI->config->slash_item('index_page')
|
||||||
.$CI->uri->uri_string();
|
.$CI->uri->uri_string();
|
||||||
|
|
||||||
if (($cache_query_string = $CI->config->item('cache_query_string')) && ! empty($_SERVER['QUERY_STRING']))
|
if (($cache_query_string = $CI->config->item('cache_query_string')) && ! empty($_SERVER['QUERY_STRING']))
|
||||||
@@ -658,7 +663,7 @@ class CI_Output {
|
|||||||
$cache_path = ($CFG->item('cache_path') === '') ? APPPATH.'cache/' : $CFG->item('cache_path');
|
$cache_path = ($CFG->item('cache_path') === '') ? APPPATH.'cache/' : $CFG->item('cache_path');
|
||||||
|
|
||||||
// Build the file path. The file name is an MD5 hash of the full URI
|
// Build the file path. The file name is an MD5 hash of the full URI
|
||||||
$uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string;
|
$uri = $CFG->item('base_url').$CFG->slash_item('index_page').$URI->uri_string;
|
||||||
|
|
||||||
if (($cache_query_string = $CFG->item('cache_query_string')) && ! empty($_SERVER['QUERY_STRING']))
|
if (($cache_query_string = $CFG->item('cache_query_string')) && ! empty($_SERVER['QUERY_STRING']))
|
||||||
{
|
{
|
||||||
@@ -761,7 +766,7 @@ class CI_Output {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').ltrim($uri, '/'));
|
$cache_path .= md5($CI->config->item('base_url').$CI->config->slash_item('index_page').ltrim($uri, '/'));
|
||||||
|
|
||||||
if ( ! @unlink($cache_path))
|
if ( ! @unlink($cache_path))
|
||||||
{
|
{
|
||||||
@@ -829,9 +834,6 @@ class CI_Output {
|
|||||||
{
|
{
|
||||||
if (self::$func_overload)
|
if (self::$func_overload)
|
||||||
{
|
{
|
||||||
// mb_substr($str, $start, null, '8bit') returns an empty
|
|
||||||
// string on PHP 5.3
|
|
||||||
isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start);
|
|
||||||
return mb_substr($str, $start, $length, '8bit');
|
return mb_substr($str, $start, $length, '8bit');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-4
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Libraries
|
* @category Libraries
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/general/routing.html
|
* @link https://codeigniter.com/userguide3/general/routing.html
|
||||||
*/
|
*/
|
||||||
class CI_Router {
|
class CI_Router {
|
||||||
|
|
||||||
@@ -57,6 +58,13 @@ class CI_Router {
|
|||||||
*/
|
*/
|
||||||
public $config;
|
public $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CI_URI class object
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
|
public $uri;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of routes
|
* List of routes
|
||||||
*
|
*
|
||||||
@@ -83,7 +91,7 @@ class CI_Router {
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $directory;
|
public $directory = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default controller (and method if specific)
|
* Default controller (and method if specific)
|
||||||
@@ -332,7 +340,7 @@ class CI_Router {
|
|||||||
protected function _validate_request($segments)
|
protected function _validate_request($segments)
|
||||||
{
|
{
|
||||||
$c = count($segments);
|
$c = count($segments);
|
||||||
$directory_override = isset($this->directory);
|
$directory_override = $this->directory !== '';
|
||||||
|
|
||||||
// Loop through our segments and return as soon as a controller
|
// Loop through our segments and return as soon as a controller
|
||||||
// is found or when such a directory doesn't exist
|
// is found or when such a directory doesn't exist
|
||||||
|
|||||||
+42
-45
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -44,7 +45,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category Security
|
* @category Security
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/security.html
|
* @link https://codeigniter.com/userguide3/libraries/security.html
|
||||||
*/
|
*/
|
||||||
class CI_Security {
|
class CI_Security {
|
||||||
|
|
||||||
@@ -169,10 +170,12 @@ class CI_Security {
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct($charset)
|
||||||
{
|
{
|
||||||
|
$this->charset = $charset;
|
||||||
|
|
||||||
// Is CSRF protection enabled?
|
// Is CSRF protection enabled?
|
||||||
if (config_item('csrf_protection'))
|
if (config_item('csrf_protection') && ! is_cli())
|
||||||
{
|
{
|
||||||
// CSRF config
|
// CSRF config
|
||||||
foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key)
|
foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key)
|
||||||
@@ -191,10 +194,9 @@ class CI_Security {
|
|||||||
|
|
||||||
// Set the CSRF hash
|
// Set the CSRF hash
|
||||||
$this->_csrf_set_hash();
|
$this->_csrf_set_hash();
|
||||||
|
$this->csrf_verify();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->charset = strtoupper(config_item('charset'));
|
|
||||||
|
|
||||||
log_message('info', 'Security Class Initialized');
|
log_message('info', 'Security Class Initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,15 +274,35 @@ class CI_Security {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
setcookie(
|
if (is_php('7.3'))
|
||||||
$this->_csrf_cookie_name,
|
{
|
||||||
$this->_csrf_hash,
|
setcookie(
|
||||||
$expire,
|
$this->_csrf_cookie_name,
|
||||||
config_item('cookie_path'),
|
$this->_csrf_hash,
|
||||||
config_item('cookie_domain'),
|
array(
|
||||||
$secure_cookie,
|
'expires' => $expire,
|
||||||
config_item('cookie_httponly')
|
'path' => config_item('cookie_path'),
|
||||||
);
|
'domain' => config_item('cookie_domain'),
|
||||||
|
'secure' => $secure_cookie,
|
||||||
|
'httponly' => config_item('cookie_httponly'),
|
||||||
|
'samesite' => 'Strict'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$domain = trim(config_item('cookie_domain'));
|
||||||
|
header('Set-Cookie: '.$this->_csrf_cookie_name.'='.$this->_csrf_hash
|
||||||
|
.'; Expires='.gmdate('D, d-M-Y H:i:s T', $expire)
|
||||||
|
.'; Max-Age='.$this->_csrf_expire
|
||||||
|
.'; Path='.implode('/', array_map('rawurlencode', explode('/', config_item('cookie_path'))))
|
||||||
|
.($domain === '' ? '' : '; Domain='.$domain)
|
||||||
|
.($secure_cookie ? '; Secure' : '')
|
||||||
|
.(config_item('cookie_httponly') ? '; HttpOnly' : '')
|
||||||
|
.'; SameSite=Strict'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
log_message('info', 'CSRF cookie sent');
|
log_message('info', 'CSRF cookie sent');
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -635,11 +657,10 @@ class CI_Security {
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE)
|
if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE)
|
||||||
{
|
{
|
||||||
// Try not to waste entropy ...
|
// Try not to waste entropy ...
|
||||||
is_php('5.4') && stream_set_chunk_size($fp, $length);
|
stream_set_chunk_size($fp, $length);
|
||||||
$output = fread($fp, $length);
|
$output = fread($fp, $length);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
if ($output !== FALSE)
|
if ($output !== FALSE)
|
||||||
@@ -669,7 +690,7 @@ class CI_Security {
|
|||||||
* correctly. html_entity_decode() does not convert entities without
|
* correctly. html_entity_decode() does not convert entities without
|
||||||
* semicolons, so we are left with our own little solution here. Bummer.
|
* semicolons, so we are left with our own little solution here. Bummer.
|
||||||
*
|
*
|
||||||
* @link http://php.net/html-entity-decode
|
* @link https://secure.php.net/html-entity-decode
|
||||||
*
|
*
|
||||||
* @param string $str Input
|
* @param string $str Input
|
||||||
* @param string $charset Character set
|
* @param string $charset Character set
|
||||||
@@ -684,26 +705,8 @@ class CI_Security {
|
|||||||
|
|
||||||
static $_entities;
|
static $_entities;
|
||||||
|
|
||||||
isset($charset) OR $charset = $this->charset;
|
isset($charset) OR $charset = $this->charset;
|
||||||
$flag = is_php('5.4')
|
isset($_entities) OR $_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, ENT_COMPAT | ENT_HTML5, $charset));
|
||||||
? ENT_COMPAT | ENT_HTML5
|
|
||||||
: ENT_COMPAT;
|
|
||||||
|
|
||||||
if ( ! isset($_entities))
|
|
||||||
{
|
|
||||||
$_entities = array_map('strtolower', get_html_translation_table(HTML_ENTITIES, $flag, $charset));
|
|
||||||
|
|
||||||
// If we're not on PHP 5.4+, add the possibly dangerous HTML 5
|
|
||||||
// entities to the array manually
|
|
||||||
if ($flag === ENT_COMPAT)
|
|
||||||
{
|
|
||||||
$_entities[':'] = ':';
|
|
||||||
$_entities['('] = '(';
|
|
||||||
$_entities[')'] = ')';
|
|
||||||
$_entities["\n"] = '
';
|
|
||||||
$_entities["\t"] = '	';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -728,14 +731,9 @@ class CI_Security {
|
|||||||
// Decode numeric & UTF16 two byte entities
|
// Decode numeric & UTF16 two byte entities
|
||||||
$str = html_entity_decode(
|
$str = html_entity_decode(
|
||||||
preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str),
|
preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str),
|
||||||
$flag,
|
ENT_COMPAT | ENT_HTML5,
|
||||||
$charset
|
$charset
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($flag === ENT_COMPAT)
|
|
||||||
{
|
|
||||||
$str = str_replace(array_values($_entities), array_keys($_entities), $str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
while ($str_compare !== $str);
|
while ($str_compare !== $str);
|
||||||
return $str;
|
return $str;
|
||||||
@@ -1087,5 +1085,4 @@ class CI_Security {
|
|||||||
|
|
||||||
return $this->_csrf_hash;
|
return $this->_csrf_hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+80
-54
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 1.0.0
|
* @since Version 1.0.0
|
||||||
@@ -46,10 +47,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category URI
|
* @category URI
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/uri.html
|
* @link https://codeigniter.com/userguide3/libraries/uri.html
|
||||||
*/
|
*/
|
||||||
class CI_URI {
|
class CI_URI {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CI_Config instance
|
||||||
|
*
|
||||||
|
* @var CI_Config
|
||||||
|
*/
|
||||||
|
public $config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of cached URI segments
|
* List of cached URI segments
|
||||||
*
|
*
|
||||||
@@ -96,45 +104,40 @@ class CI_URI {
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct(CI_Config $config)
|
||||||
{
|
{
|
||||||
$this->config =& load_class('Config', 'core');
|
$this->config = $config;
|
||||||
|
|
||||||
|
// If it's a CLI request, ignore the configuration
|
||||||
|
if (is_cli())
|
||||||
|
{
|
||||||
|
$this->_set_uri_string($this->_parse_argv(), TRUE);
|
||||||
|
}
|
||||||
// If query strings are enabled, we don't need to parse any segments.
|
// If query strings are enabled, we don't need to parse any segments.
|
||||||
// However, they don't make sense under CLI.
|
elseif ($this->config->item('enable_query_strings') !== TRUE)
|
||||||
if (is_cli() OR $this->config->item('enable_query_strings') !== TRUE)
|
|
||||||
{
|
{
|
||||||
$this->_permitted_uri_chars = $this->config->item('permitted_uri_chars');
|
$this->_permitted_uri_chars = $this->config->item('permitted_uri_chars');
|
||||||
|
$protocol = $this->config->item('uri_protocol');
|
||||||
|
empty($protocol) && $protocol = 'REQUEST_URI';
|
||||||
|
|
||||||
// If it's a CLI request, ignore the configuration
|
switch ($protocol)
|
||||||
if (is_cli())
|
|
||||||
{
|
{
|
||||||
$uri = $this->_parse_argv();
|
case 'AUTO': // For BC purposes only
|
||||||
}
|
case 'REQUEST_URI':
|
||||||
else
|
$uri = $this->_parse_request_uri();
|
||||||
{
|
break;
|
||||||
$protocol = $this->config->item('uri_protocol');
|
case 'QUERY_STRING':
|
||||||
empty($protocol) && $protocol = 'REQUEST_URI';
|
$uri = $this->_parse_query_string();
|
||||||
|
break;
|
||||||
switch ($protocol)
|
case 'PATH_INFO':
|
||||||
{
|
default:
|
||||||
case 'AUTO': // For BC purposes only
|
$uri = isset($_SERVER[$protocol])
|
||||||
case 'REQUEST_URI':
|
? $_SERVER[$protocol]
|
||||||
$uri = $this->_parse_request_uri();
|
: $this->_parse_request_uri();
|
||||||
break;
|
break;
|
||||||
case 'QUERY_STRING':
|
|
||||||
$uri = $this->_parse_query_string();
|
|
||||||
break;
|
|
||||||
case 'PATH_INFO':
|
|
||||||
default:
|
|
||||||
$uri = isset($_SERVER[$protocol])
|
|
||||||
? $_SERVER[$protocol]
|
|
||||||
: $this->_parse_request_uri();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_set_uri_string($uri);
|
$this->_set_uri_string($uri, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message('info', 'URI Class Initialized');
|
log_message('info', 'URI Class Initialized');
|
||||||
@@ -145,43 +148,66 @@ class CI_URI {
|
|||||||
/**
|
/**
|
||||||
* Set URI String
|
* Set URI String
|
||||||
*
|
*
|
||||||
* @param string $str
|
* @param string $str Input URI string
|
||||||
|
* @param bool $is_cli Whether the input comes from CLI
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _set_uri_string($str)
|
protected function _set_uri_string($str, $is_cli = FALSE)
|
||||||
{
|
{
|
||||||
// Filter out control characters and trim slashes
|
// CLI requests have a bit simpler logic
|
||||||
$this->uri_string = trim(remove_invisible_characters($str, FALSE), '/');
|
if ($is_cli)
|
||||||
|
|
||||||
if ($this->uri_string !== '')
|
|
||||||
{
|
{
|
||||||
// Remove the URL suffix, if present
|
if (($this->uri_string = trim($str, '/')) === '')
|
||||||
if (($suffix = (string) $this->config->item('url_suffix')) !== '')
|
|
||||||
{
|
{
|
||||||
$slen = strlen($suffix);
|
return;
|
||||||
|
|
||||||
if (substr($this->uri_string, -$slen) === $suffix)
|
|
||||||
{
|
|
||||||
$this->uri_string = substr($this->uri_string, 0, -$slen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->segments[0] = NULL;
|
$this->segments[0] = NULL;
|
||||||
// Populate the segments array
|
foreach (explode('/', $this->uri_string) as $segment)
|
||||||
foreach (explode('/', trim($this->uri_string, '/')) as $val)
|
|
||||||
{
|
{
|
||||||
$val = trim($val);
|
if (($segment = trim($segment)) !== '')
|
||||||
// Filter segments for security
|
|
||||||
$this->filter_uri($val);
|
|
||||||
|
|
||||||
if ($val !== '')
|
|
||||||
{
|
{
|
||||||
$this->segments[] = $val;
|
$this->segments[] = $segment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($this->segments[0]);
|
unset($this->segments[0]);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter out control characters and trim slashes
|
||||||
|
$this->uri_string = trim(remove_invisible_characters($str, FALSE), '/');
|
||||||
|
|
||||||
|
if ($this->uri_string === '')
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the URL suffix, if present
|
||||||
|
if (($suffix = (string) $this->config->item('url_suffix')) !== '')
|
||||||
|
{
|
||||||
|
$slen = strlen($suffix);
|
||||||
|
|
||||||
|
if (substr($this->uri_string, -$slen) === $suffix)
|
||||||
|
{
|
||||||
|
$this->uri_string = substr($this->uri_string, 0, -$slen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->segments[0] = NULL;
|
||||||
|
foreach (explode('/', trim($this->uri_string, '/')) as $segment)
|
||||||
|
{
|
||||||
|
$segment = trim($segment);
|
||||||
|
// Filter segments for security
|
||||||
|
$this->filter_uri($segment);
|
||||||
|
|
||||||
|
if ($segment !== '')
|
||||||
|
{
|
||||||
|
$this->segments[] = $segment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($this->segments[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|||||||
+10
-9
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 2.0.0
|
* @since Version 2.0.0
|
||||||
@@ -46,7 +47,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage Libraries
|
* @subpackage Libraries
|
||||||
* @category UTF-8
|
* @category UTF-8
|
||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @link https://codeigniter.com/user_guide/libraries/utf8.html
|
* @link https://codeigniter.com/userguide3/libraries/utf8.html
|
||||||
*/
|
*/
|
||||||
class CI_Utf8 {
|
class CI_Utf8 {
|
||||||
|
|
||||||
@@ -57,21 +58,21 @@ class CI_Utf8 {
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct($charset)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
defined('PREG_BAD_UTF8_ERROR') // PCRE must support UTF-8
|
defined('PREG_BAD_UTF8_ERROR') // PCRE must support UTF-8
|
||||||
&& (ICONV_ENABLED === TRUE OR MB_ENABLED === TRUE) // iconv or mbstring must be installed
|
&& (ICONV_ENABLED === TRUE OR MB_ENABLED === TRUE) // iconv or mbstring must be installed
|
||||||
&& strtoupper(config_item('charset')) === 'UTF-8' // Application charset must be UTF-8
|
&& $charset === 'UTF-8' // Application charset must be UTF-8
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
define('UTF8_ENABLED', TRUE);
|
define('UTF8_ENABLED', TRUE);
|
||||||
log_message('debug', 'UTF-8 Support Enabled');
|
log_message('info', 'UTF-8 Support Enabled');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
define('UTF8_ENABLED', FALSE);
|
define('UTF8_ENABLED', FALSE);
|
||||||
log_message('debug', 'UTF-8 Support Disabled');
|
log_message('info', 'UTF-8 Support Disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message('info', 'Utf8 Class Initialized');
|
log_message('info', 'Utf8 Class Initialized');
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This content is released under the MIT License (MIT)
|
* This content is released under the MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
|
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
* @author EllisLab Dev Team
|
* @author EllisLab Dev Team
|
||||||
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
|
||||||
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
|
||||||
|
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
|
||||||
* @license https://opensource.org/licenses/MIT MIT License
|
* @license https://opensource.org/licenses/MIT MIT License
|
||||||
* @link https://codeigniter.com
|
* @link https://codeigniter.com
|
||||||
* @since Version 3.0.0
|
* @since Version 3.0.0
|
||||||
@@ -44,8 +45,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
* @subpackage CodeIgniter
|
* @subpackage CodeIgniter
|
||||||
* @category Compatibility
|
* @category Compatibility
|
||||||
* @author Andrey Andreev
|
* @author Andrey Andreev
|
||||||
* @link https://codeigniter.com/user_guide/
|
* @link https://codeigniter.com/userguide3/
|
||||||
* @link http://php.net/hash
|
* @link https://secure.php.net/hash
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
@@ -62,7 +63,7 @@ if ( ! function_exists('hash_equals'))
|
|||||||
/**
|
/**
|
||||||
* hash_equals()
|
* hash_equals()
|
||||||
*
|
*
|
||||||
* @link http://php.net/hash_equals
|
* @link https://secure.php.net/hash_equals
|
||||||
* @param string $known_string
|
* @param string $known_string
|
||||||
* @param string $user_string
|
* @param string $user_string
|
||||||
* @return bool
|
* @return bool
|
||||||
@@ -108,7 +109,7 @@ if ( ! function_exists('hash_pbkdf2'))
|
|||||||
/**
|
/**
|
||||||
* hash_pbkdf2()
|
* hash_pbkdf2()
|
||||||
*
|
*
|
||||||
* @link http://php.net/hash_pbkdf2
|
* @link https://secure.php.net/hash_pbkdf2
|
||||||
* @param string $algo
|
* @param string $algo
|
||||||
* @param string $password
|
* @param string $password
|
||||||
* @param string $salt
|
* @param string $salt
|
||||||
@@ -205,8 +206,6 @@ if ( ! function_exists('hash_pbkdf2'))
|
|||||||
'ripemd160' => 64,
|
'ripemd160' => 64,
|
||||||
'ripemd256' => 64,
|
'ripemd256' => 64,
|
||||||
'ripemd320' => 64,
|
'ripemd320' => 64,
|
||||||
'salsa10' => 64,
|
|
||||||
'salsa20' => 64,
|
|
||||||
'sha1' => 64,
|
'sha1' => 64,
|
||||||
'sha224' => 64,
|
'sha224' => 64,
|
||||||
'sha256' => 64,
|
'sha256' => 64,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>403 Forbidden</title>
|
<title>403 Forbidden</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user