initial commit
This commit is contained in:
+33
@@ -1,3 +1,36 @@
|
|||||||
|
.DS_Store
|
||||||
|
|
||||||
|
application/cache/*
|
||||||
|
!application/cache/index.html
|
||||||
|
|
||||||
|
application/logs/*
|
||||||
|
!application/logs/index.html
|
||||||
|
|
||||||
|
!application/*/.htaccess
|
||||||
|
|
||||||
|
composer.lock
|
||||||
|
|
||||||
|
user_guide_src/build/*
|
||||||
|
user_guide_src/cilexer/build/*
|
||||||
|
user_guide_src/cilexer/dist/*
|
||||||
|
user_guide_src/cilexer/pycilexer.egg-info/*
|
||||||
|
/vendor/
|
||||||
|
|
||||||
|
# IDE Files
|
||||||
|
#-------------------------
|
||||||
|
/nbproject/
|
||||||
|
.idea/*
|
||||||
|
|
||||||
|
## Sublime Text cache files
|
||||||
|
*.tmlanguage.cache
|
||||||
|
*.tmPreferences.cache
|
||||||
|
*.stTheme.cache
|
||||||
|
*.sublime-workspace
|
||||||
|
*.sublime-project
|
||||||
|
/tests/tests/
|
||||||
|
/tests/results/
|
||||||
|
/.env.php
|
||||||
|
application/logs/
|
||||||
# These are some examples of commonly ignored file patterns.
|
# These are some examples of commonly ignored file patterns.
|
||||||
# You should customize this list as applicable to your project.
|
# You should customize this list as applicable to your project.
|
||||||
# Learn more about .gitignore:
|
# Learn more about .gitignore:
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<IfModule authz_core_module>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !authz_core_module>
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| AUTO-LOADER
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file specifies which systems should be loaded by default.
|
||||||
|
|
|
||||||
|
| In order to keep the framework as light-weight as possible only the
|
||||||
|
| absolute minimal resources are loaded by default. For example,
|
||||||
|
| the database is not connected to automatically since no assumption
|
||||||
|
| is made regarding whether you intend to use it. This file lets
|
||||||
|
| you globally define which systems you would like loaded with every
|
||||||
|
| request.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Instructions
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These are the things you can load automatically:
|
||||||
|
|
|
||||||
|
| 1. Packages
|
||||||
|
| 2. Libraries
|
||||||
|
| 3. Drivers
|
||||||
|
| 4. Helper files
|
||||||
|
| 5. Custom config files
|
||||||
|
| 6. Language files
|
||||||
|
| 7. Models
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Packages
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['packages'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Libraries
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| These are the classes located in system/libraries/ or your
|
||||||
|
| application/libraries/ directory, with the addition of the
|
||||||
|
| 'database' library, which is somewhat of a special case.
|
||||||
|
|
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative library name to be assigned
|
||||||
|
| in the controller:
|
||||||
|
|
|
||||||
|
| $autoload['libraries'] = array('user_agent' => 'ua');
|
||||||
|
*/
|
||||||
|
$autoload['libraries'] = array('session','database');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Drivers
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| These classes are located in system/libraries/ or in your
|
||||||
|
| application/libraries/ directory, but are also placed inside their
|
||||||
|
| own subdirectory and they extend the CI_Driver_Library class. They
|
||||||
|
| offer multiple interchangeable driver options.
|
||||||
|
|
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['drivers'] = array('cache');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative property name to be assigned in
|
||||||
|
| the controller:
|
||||||
|
|
|
||||||
|
| $autoload['drivers'] = array('cache' => 'cch');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['drivers'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Helper Files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['helper'] = array('url', 'file');
|
||||||
|
*/
|
||||||
|
$autoload['helper'] = array('url','file','text_helper');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Config files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['config'] = array('config1', 'config2');
|
||||||
|
|
|
||||||
|
| NOTE: This item is intended for use ONLY if you have created custom
|
||||||
|
| config files. Otherwise, leave it blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['config'] = array('conversionentities', 'remote_urls');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Language files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['language'] = array('lang1', 'lang2');
|
||||||
|
|
|
||||||
|
| NOTE: Do not include the "_lang" part of your file. For example
|
||||||
|
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['language'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Models
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['model'] = array('first_model', 'second_model');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative model name to be assigned
|
||||||
|
| in the controller:
|
||||||
|
|
|
||||||
|
| $autoload['model'] = array('first_model' => 'first');
|
||||||
|
*/
|
||||||
|
$autoload['model'] = array('shared/Autorisaties_model',
|
||||||
|
'shared/Session_model',
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
'shared/Autorisatienivos_model',
|
||||||
|
'shared/Files_model',
|
||||||
|
'monpas/Orgversies_model',
|
||||||
|
'monpas/Labels_model',
|
||||||
|
'monpas/Filledversions_model');;
|
||||||
@@ -0,0 +1,527 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Site URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||||
|
| WITH a trailing slash:
|
||||||
|
|
|
||||||
|
| http://example.com/
|
||||||
|
|
|
||||||
|
| WARNING: You MUST set this value!
|
||||||
|
|
|
||||||
|
| If it is not set, then CodeIgniter will try guess the protocol and path
|
||||||
|
| your installation, but due to security concerns the hostname will be set
|
||||||
|
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
|
||||||
|
| The auto-detection mechanism exists only for convenience during
|
||||||
|
| development and MUST NOT be used in production!
|
||||||
|
|
|
||||||
|
| If you need to allow multiple domains, remember that this file is still
|
||||||
|
| a PHP script and you can easily do that on your own.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
//$config['base_url'] = '';
|
||||||
|
$config['base_url'] = $_ENV['BASE_URL'];
|
||||||
|
$config['image_url'] = $_ENV['IMAGE_URL'];
|
||||||
|
$config['vendor_url'] = $_ENV['VENDOR_URL'];
|
||||||
|
$config['vendor_url_secure'] = $_ENV['VENDOR_URL_SECURE'];
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Index File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Typically this will be your index.php file, unless you've renamed it to
|
||||||
|
| something else. If you are using mod_rewrite to remove the page set this
|
||||||
|
| variable so that it is blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['index_page'] = 'index.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URI PROTOCOL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item determines which server global should be used to retrieve the
|
||||||
|
| URI string. The default setting of 'REQUEST_URI' works for most servers.
|
||||||
|
| If your links do not seem to work, try one of the other delicious flavors:
|
||||||
|
|
|
||||||
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
|
||||||
|
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
|
||||||
|
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
||||||
|
|
|
||||||
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||||
|
*/
|
||||||
|
$config['uri_protocol'] = 'REQUEST_URI';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URL suffix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||||
|
| For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/urls.html
|
||||||
|
*/
|
||||||
|
$config['url_suffix'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Language
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which set of language files should be used. Make sure
|
||||||
|
| there is an available translation if you intend to use something other
|
||||||
|
| than english.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['language'] = 'english';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Character Set
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which character set is used by default in various methods
|
||||||
|
| that require a character set to be provided.
|
||||||
|
|
|
||||||
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['charset'] = 'UTF-8';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable System Hooks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you would like to use the 'hooks' feature you must enable it by
|
||||||
|
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['enable_hooks'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Extension Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item allows you to set the filename/classname prefix when extending
|
||||||
|
| native libraries. For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/core_classes.html
|
||||||
|
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['subclass_prefix'] = 'MY_';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Composer auto-loading
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enabling this setting will tell CodeIgniter to look for a Composer
|
||||||
|
| package auto-loader script in application/vendor/autoload.php.
|
||||||
|
|
|
||||||
|
| $config['composer_autoload'] = TRUE;
|
||||||
|
|
|
||||||
|
| Or if you have your vendor/ directory located somewhere else, you
|
||||||
|
| can opt to set a specific path as well:
|
||||||
|
|
|
||||||
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
||||||
|
|
|
||||||
|
| For more information about Composer, please visit http://getcomposer.org/
|
||||||
|
|
|
||||||
|
| Note: This will NOT disable or override the CodeIgniter-specific
|
||||||
|
| autoloading (application/config/autoload.php)
|
||||||
|
*/
|
||||||
|
$config['composer_autoload'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allowed URL Characters
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This lets you specify which characters are permitted within your URLs.
|
||||||
|
| When someone tries to submit a URL with disallowed characters they will
|
||||||
|
| get a warning message.
|
||||||
|
|
|
||||||
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||||
|
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||||
|
|
|
||||||
|
| Leave blank to allow all characters -- but only if you are insane.
|
||||||
|
|
|
||||||
|
| The configured value is actually a regular expression character group
|
||||||
|
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
||||||
|
|
|
||||||
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable Query Strings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||||
|
| example.com/who/what/where/
|
||||||
|
|
|
||||||
|
| You can optionally enable standard query string based URLs:
|
||||||
|
| example.com?who=me&what=something&where=here
|
||||||
|
|
|
||||||
|
| Options are: TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
| The other items let you set the query string 'words' that will
|
||||||
|
| invoke your controllers and its functions:
|
||||||
|
| example.com/index.php?c=controller&m=function
|
||||||
|
|
|
||||||
|
| Please note that some of the helpers won't work as expected when
|
||||||
|
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||||
|
| use segment based URLs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['enable_query_strings'] = FALSE;
|
||||||
|
$config['controller_trigger'] = 'c';
|
||||||
|
$config['function_trigger'] = 'm';
|
||||||
|
$config['directory_trigger'] = 'd';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allow $_GET array
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||||
|
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['allow_get_array'] = TRUE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Threshold
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You can enable error logging by setting a threshold over zero. The
|
||||||
|
| threshold determines what gets logged. Threshold options are:
|
||||||
|
|
|
||||||
|
| 0 = Disables logging, Error logging TURNED OFF
|
||||||
|
| 1 = Error Messages (including PHP errors)
|
||||||
|
| 2 = Debug Messages
|
||||||
|
| 3 = Informational Messages
|
||||||
|
| 4 = All Messages
|
||||||
|
|
|
||||||
|
| You can also pass an array with threshold levels to show individual error types
|
||||||
|
|
|
||||||
|
| array(2) = Debug Messages, without Error Messages
|
||||||
|
|
|
||||||
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||||
|
| your log files will fill up very fast.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_threshold'] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/logs/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log File Extension
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The default filename extension for log files. The default 'php' allows for
|
||||||
|
| protecting the log files via basic scripting, when they are to be stored
|
||||||
|
| under a publicly accessible directory.
|
||||||
|
|
|
||||||
|
| Note: Leaving it blank will default to 'php'.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_file_extension'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log File Permissions
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The file system permissions to be applied on newly created log files.
|
||||||
|
|
|
||||||
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|
||||||
|
| integer notation (i.e. 0700, 0644, etc.)
|
||||||
|
*/
|
||||||
|
$config['log_file_permissions'] = 0644;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Date Format for Logs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Each item that is logged has an associated date. You can use PHP date
|
||||||
|
| codes to set your own date formatting
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Views Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/views/errors/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['error_views_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/cache/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cache_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Include Query String
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Whether to take the URL query string into consideration when generating
|
||||||
|
| output cache files. Valid options are:
|
||||||
|
|
|
||||||
|
| FALSE = Disabled
|
||||||
|
| TRUE = Enabled, take all query parameters into account.
|
||||||
|
| Please be aware that this may result in numerous cache
|
||||||
|
| files generated for the same page over and over again.
|
||||||
|
| array('q') = Enabled, but only take into account the specified list
|
||||||
|
| of query parameters.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cache_query_string'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you use the Encryption class, you must set an encryption key.
|
||||||
|
| See the user guide for more info.
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['encryption_key'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'sess_driver'
|
||||||
|
|
|
||||||
|
| The storage driver to use: files, database, redis, memcached
|
||||||
|
|
|
||||||
|
| 'sess_cookie_name'
|
||||||
|
|
|
||||||
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
||||||
|
|
|
||||||
|
| 'sess_expiration'
|
||||||
|
|
|
||||||
|
| The number of SECONDS you want the session to last.
|
||||||
|
| Setting to 0 (zero) means expire when the browser is closed.
|
||||||
|
|
|
||||||
|
| 'sess_save_path'
|
||||||
|
|
|
||||||
|
| The location to save sessions to, driver dependent.
|
||||||
|
|
|
||||||
|
| For the 'files' driver, it's a path to a writable directory.
|
||||||
|
| WARNING: Only absolute paths are supported!
|
||||||
|
|
|
||||||
|
| For the 'database' driver, it's a table name.
|
||||||
|
| Please read up the manual for the format with other session drivers.
|
||||||
|
|
|
||||||
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
||||||
|
|
|
||||||
|
| 'sess_match_ip'
|
||||||
|
|
|
||||||
|
| Whether to match the user's IP address when reading the session data.
|
||||||
|
|
|
||||||
|
| WARNING: If you're using the database driver, don't forget to update
|
||||||
|
| your session table's PRIMARY KEY when changing this setting.
|
||||||
|
|
|
||||||
|
| 'sess_time_to_update'
|
||||||
|
|
|
||||||
|
| How many seconds between CI regenerating the session ID.
|
||||||
|
|
|
||||||
|
| 'sess_regenerate_destroy'
|
||||||
|
|
|
||||||
|
| Whether to destroy session data associated with the old session ID
|
||||||
|
| when auto-regenerating the session ID. When set to FALSE, the data
|
||||||
|
| will be later deleted by the garbage collector.
|
||||||
|
|
|
||||||
|
| Other session cookie settings are shared with the rest of the application,
|
||||||
|
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['sess_driver'] = 'files';
|
||||||
|
$config['sess_cookie_name'] = 'ci_session';
|
||||||
|
$config['sess_expiration'] = 7200;
|
||||||
|
$config['sess_save_path'] = NULL;
|
||||||
|
$config['sess_match_ip'] = FALSE;
|
||||||
|
$config['sess_time_to_update'] = 300;
|
||||||
|
$config['sess_regenerate_destroy'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cookie Related Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
|
||||||
|
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||||
|
| 'cookie_path' = Typically will be a forward slash
|
||||||
|
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
|
||||||
|
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
||||||
|
|
|
||||||
|
| Note: These settings (with the exception of 'cookie_prefix' and
|
||||||
|
| 'cookie_httponly') will also affect sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cookie_prefix'] = '';
|
||||||
|
$config['cookie_domain'] = '';
|
||||||
|
$config['cookie_path'] = '/';
|
||||||
|
$config['cookie_secure'] = FALSE;
|
||||||
|
$config['cookie_httponly'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Standardize newlines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines whether to standardize newline characters in input data,
|
||||||
|
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['standardize_newlines'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global XSS Filtering
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines whether the XSS filter is always active when GET, POST or
|
||||||
|
| COOKIE data is encountered
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['global_xss_filtering'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross Site Request Forgery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||||
|
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||||
|
| recommended CSRF protection be enabled.
|
||||||
|
|
|
||||||
|
| 'csrf_token_name' = The token name
|
||||||
|
| 'csrf_cookie_name' = The cookie name
|
||||||
|
| 'csrf_expire' = The number in seconds the token should expire.
|
||||||
|
| 'csrf_regenerate' = Regenerate token on every submission
|
||||||
|
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||||
|
*/
|
||||||
|
$config['csrf_protection'] = FALSE;
|
||||||
|
$config['csrf_token_name'] = 'csrf_test_name';
|
||||||
|
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||||
|
$config['csrf_expire'] = 7200;
|
||||||
|
$config['csrf_regenerate'] = TRUE;
|
||||||
|
$config['csrf_exclude_uris'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Output Compression
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enables Gzip output compression for faster page loads. When enabled,
|
||||||
|
| the output class will test whether your server supports Gzip.
|
||||||
|
| Even if it does, however, not all browsers support compression
|
||||||
|
| so enable only if you are reasonably sure your visitors can handle it.
|
||||||
|
|
|
||||||
|
| Only used if zlib.output_compression is turned off in your php.ini.
|
||||||
|
| Please do not use it together with httpd-level output compression.
|
||||||
|
|
|
||||||
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||||
|
| means you are prematurely outputting something to your browser. It could
|
||||||
|
| even be a line of whitespace at the end of one of your scripts. For
|
||||||
|
| compression to work, nothing can be sent before the output buffer is called
|
||||||
|
| by the output class. Do not 'echo' any values with compression enabled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['compress_output'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Master Time Reference
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Options are 'local' or any PHP supported timezone. This preference tells
|
||||||
|
| the system whether to use your server's local time as the master 'now'
|
||||||
|
| reference, or convert it to the configured one timezone. See the 'date
|
||||||
|
| helper' page of the user guide for information regarding date handling.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['time_reference'] = 'local';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Rewrite PHP Short Tags
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your PHP installation does not have short tag support enabled CI
|
||||||
|
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||||
|
| in your view files. Options are TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
| Note: You need to have eval() enabled for this to work.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['rewrite_short_tags'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Reverse Proxy IPs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your server is behind a reverse proxy, you must whitelist the proxy
|
||||||
|
| IP addresses from which CodeIgniter should trust headers such as
|
||||||
|
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
|
||||||
|
| the visitor's IP address.
|
||||||
|
|
|
||||||
|
| You can use both an array or a comma-separated list of proxy addresses,
|
||||||
|
| as well as specifying whole subnets. Here are a few examples:
|
||||||
|
|
|
||||||
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
|
||||||
|
| Array: array('10.0.1.200', '192.168.5.0/24')
|
||||||
|
*/
|
||||||
|
$config['proxy_ips'] = '';
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
defined( 'BASEPATH' ) or exit( 'No direct script access allowed' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Display Debug backtrace
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
|
||||||
|
| error_reporting is disabled, the backtrace will not display, regardless
|
||||||
|
| of this setting
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined( 'SHOW_DEBUG_BACKTRACE' ) or define( 'SHOW_DEBUG_BACKTRACE', TRUE );
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File and Directory Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These prefs are used when checking and setting modes when working
|
||||||
|
| with the file system. The defaults are fine on servers with proper
|
||||||
|
| security, but you may wish (or even need) to change the values in
|
||||||
|
| certain environments (Apache running a separate process for each
|
||||||
|
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||||
|
| always be used to set the mode correctly.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined( 'FILE_READ_MODE' ) or define( 'FILE_READ_MODE', 0644 );
|
||||||
|
defined( 'FILE_WRITE_MODE' ) or define( 'FILE_WRITE_MODE', 0666 );
|
||||||
|
defined( 'DIR_READ_MODE' ) or define( 'DIR_READ_MODE', 0755 );
|
||||||
|
defined( 'DIR_WRITE_MODE' ) or define( 'DIR_WRITE_MODE', 0755 );
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File Stream Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These modes are used when working with fopen()/popen()
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined( 'FOPEN_READ' ) or define( 'FOPEN_READ', 'rb' );
|
||||||
|
defined( 'FOPEN_READ_WRITE' ) or define( 'FOPEN_READ_WRITE', 'r+b' );
|
||||||
|
defined( 'FOPEN_WRITE_CREATE_DESTRUCTIVE' ) or define( 'FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb' ); // truncates existing file data, use with care
|
||||||
|
defined( 'FOPEN_READ_WRITE_CREATE_DESTRUCTIVE' ) or define( 'FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b' ); // truncates existing file data, use with care
|
||||||
|
defined( 'FOPEN_WRITE_CREATE' ) or define( 'FOPEN_WRITE_CREATE', 'ab' );
|
||||||
|
defined( 'FOPEN_READ_WRITE_CREATE' ) or define( 'FOPEN_READ_WRITE_CREATE', 'a+b' );
|
||||||
|
defined( 'FOPEN_WRITE_CREATE_STRICT' ) or define( 'FOPEN_WRITE_CREATE_STRICT', 'xb' );
|
||||||
|
defined( 'FOPEN_READ_WRITE_CREATE_STRICT' ) or define( 'FOPEN_READ_WRITE_CREATE_STRICT', 'x+b' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Exit Status Codes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Used to indicate the conditions under which the script is exit()ing.
|
||||||
|
| While there is no universal standard for error codes, there are some
|
||||||
|
| broad conventions. Three such conventions are mentioned below, for
|
||||||
|
| those who wish to make use of them. The CodeIgniter defaults were
|
||||||
|
| chosen for the least overlap with these conventions, while still
|
||||||
|
| leaving room for others to be defined in future versions and user
|
||||||
|
| applications.
|
||||||
|
|
|
||||||
|
| The three main conventions used for determining exit status codes
|
||||||
|
| are as follows:
|
||||||
|
|
|
||||||
|
| Standard C/C++ Library (stdlibc):
|
||||||
|
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
|
||||||
|
| (This link also contains other GNU-specific conventions)
|
||||||
|
| BSD sysexits.h:
|
||||||
|
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
|
||||||
|
| Bash scripting:
|
||||||
|
| http://tldp.org/LDP/abs/html/exitcodes.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined( 'EXIT_SUCCESS' ) or define( 'EXIT_SUCCESS', 0 ); // no errors
|
||||||
|
defined( 'EXIT_ERROR' ) or define( 'EXIT_ERROR', 1 ); // generic error
|
||||||
|
defined( 'EXIT_CONFIG' ) or define( 'EXIT_CONFIG', 3 ); // configuration error
|
||||||
|
defined( 'EXIT_UNKNOWN_FILE' ) or define( 'EXIT_UNKNOWN_FILE', 4 ); // file not found
|
||||||
|
defined( 'EXIT_UNKNOWN_CLASS' ) or define( 'EXIT_UNKNOWN_CLASS', 5 ); // unknown class
|
||||||
|
defined( 'EXIT_UNKNOWN_METHOD' ) or define( 'EXIT_UNKNOWN_METHOD', 6 ); // unknown class member
|
||||||
|
defined( 'EXIT_USER_INPUT' ) or define( 'EXIT_USER_INPUT', 7 ); // invalid user input
|
||||||
|
defined( 'EXIT_DATABASE' ) or define( 'EXIT_DATABASE', 8 ); // database error
|
||||||
|
defined( 'EXIT__AUTO_MIN' ) or define( 'EXIT__AUTO_MIN', 9 ); // lowest automatically-assigned error code
|
||||||
|
defined( 'EXIT__AUTO_MAX' ) or define( 'EXIT__AUTO_MAX', 125 ); // highest automatically-assigned error code
|
||||||
|
|
||||||
|
define( 'SUPERUSER', 3 );
|
||||||
|
define( 'SYSTEM', 3 ); // system wordt gebruikt in de partituur
|
||||||
|
define( 'WRITER', 343 );
|
||||||
|
define( 'READER', 1023 );
|
||||||
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by Pensare Software.
|
||||||
|
* User: Theo Weijmer
|
||||||
|
* Date: 12/02/2017
|
||||||
|
* Time: 10:58
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$config['initialstatus'] = 'TRY-CONVERSION';
|
||||||
|
$config['busyconversion'] = 'CONVERSION-BUSY';
|
||||||
|
$config['failedconversion'] = 'CONVERSION-FAILED';
|
||||||
|
$config['nonconversion'] = 'NON-CONVERSION-METHOD';
|
||||||
|
$config['ispdfdocument'] = 'IS-PDF-DOCUMENT';
|
||||||
|
$config['wordhtmlconversionsuccess'] = 'WORD-HTML-CONVERSION-SUCCEEDED';
|
||||||
|
$config['wordpdfconversionsuccess'] = 'WORD-PDF-CONVERSION-SUCCEEDED';
|
||||||
|
$config['pdfhtmlconversionsuccess'] = 'PDF-HTML-CONVERSION-SUCCEEDED';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| DATABASE CONNECTIVITY SETTINGS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file will contain the settings needed to access your database.
|
||||||
|
|
|
||||||
|
| For complete instructions please consult the 'Database Connection'
|
||||||
|
| page of the User Guide.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| EXPLANATION OF VARIABLES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| ['dsn'] The full DSN string describe a connection to the database.
|
||||||
|
| ['hostname'] The hostname of your database server.
|
||||||
|
| ['username'] The username used to connect to the database
|
||||||
|
| ['password'] The password used to connect to the database
|
||||||
|
| ['database'] The name of the database you want to connect to
|
||||||
|
| ['dbdriver'] The database driver. e.g.: mysqli.
|
||||||
|
| Currently supported:
|
||||||
|
| cubrid, ibase, mssql, mysql, mysqli, oci8,
|
||||||
|
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
|
||||||
|
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||||
|
| to the table name when using the Query Builder class
|
||||||
|
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||||
|
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||||
|
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||||
|
| ['cachedir'] The path to the folder where cache files should be stored
|
||||||
|
| ['char_set'] The character set used in communicating with the database
|
||||||
|
| ['dbcollat'] The character collation used in communicating with the database
|
||||||
|
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
||||||
|
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
||||||
|
| (and in table creation queries made with DB Forge).
|
||||||
|
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
||||||
|
| can make your site vulnerable to SQL injection if you are using a
|
||||||
|
| multi-byte character set and are running versions lower than these.
|
||||||
|
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
||||||
|
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
||||||
|
| ['encrypt'] Whether or not to use an encrypted connection.
|
||||||
|
|
|
||||||
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
|
||||||
|
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
||||||
|
|
|
||||||
|
| 'ssl_key' - Path to the private key file
|
||||||
|
| 'ssl_cert' - Path to the public key certificate file
|
||||||
|
| 'ssl_ca' - Path to the certificate authority file
|
||||||
|
| 'ssl_capath' - Path to a directory containing trusted CA certificates in PEM format
|
||||||
|
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|
||||||
|
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
|
||||||
|
|
|
||||||
|
| ['compress'] Whether or not to use client compression (MySQL only)
|
||||||
|
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
||||||
|
| - good for ensuring strict SQL while developing
|
||||||
|
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
|
||||||
|
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
|
||||||
|
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
|
||||||
|
| NOTE: Disabling this will also effectively disable both
|
||||||
|
| $this->db->last_query() and profiling of DB queries.
|
||||||
|
| When you run a query, with this setting set to TRUE (default),
|
||||||
|
| CodeIgniter will store the SQL statement for debugging purposes.
|
||||||
|
| However, this may cause high memory usage, especially if you run
|
||||||
|
| a lot of SQL queries ... disable this to avoid that problem.
|
||||||
|
|
|
||||||
|
| The $active_group variable lets you choose which connection group to
|
||||||
|
| make active. By default there is only one group (the 'default' group).
|
||||||
|
|
|
||||||
|
| The $query_builder variables lets you determine whether or not to load
|
||||||
|
| the query builder class.
|
||||||
|
*/
|
||||||
|
$active_group = 'default';
|
||||||
|
$query_builder = TRUE;
|
||||||
|
|
||||||
|
$db['default'] = array(
|
||||||
|
'dsn' => '',
|
||||||
|
'hostname' => $_ENV['DATABASE']['HOST'],
|
||||||
|
'username' => $_ENV['DATABASE']['USER'],
|
||||||
|
'password' => $_ENV['DATABASE']['PASS'],
|
||||||
|
'database' => $_ENV['DATABASE']['NAME'],
|
||||||
|
'dbdriver' => 'mysqli',
|
||||||
|
'dbprefix' => '',
|
||||||
|
'pconnect' => FALSE,
|
||||||
|
'db_debug' => (ENVIRONMENT !== 'production'),
|
||||||
|
'cache_on' => FALSE,
|
||||||
|
'cachedir' => '',
|
||||||
|
'char_set' => 'utf8',
|
||||||
|
'dbcollat' => 'utf8_general_ci',
|
||||||
|
'swap_pre' => '',
|
||||||
|
'encrypt' => FALSE,
|
||||||
|
'compress' => FALSE,
|
||||||
|
'stricton' => FALSE,
|
||||||
|
'failover' => array(),
|
||||||
|
'save_queries' => TRUE
|
||||||
|
);
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
$_doctypes = array(
|
||||||
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||||
|
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||||
|
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||||
|
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||||
|
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
|
||||||
|
'html5' => '<!DOCTYPE html>',
|
||||||
|
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||||
|
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||||
|
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||||
|
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
|
||||||
|
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
|
||||||
|
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
|
||||||
|
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
|
||||||
|
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
|
||||||
|
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
|
||||||
|
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
|
||||||
|
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
|
||||||
|
);
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by Pensare Software.
|
||||||
|
* User: Theo Weijmer
|
||||||
|
* Date: 10/07/2021
|
||||||
|
* Time: 10:46
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$config['smtp_host']=$_ENV['MAIL']['HOST'];
|
||||||
|
$config['smtp_port']=$_ENV['MAIL']['SMTP_PORT'];
|
||||||
|
$config['smtp_timeout']='30';
|
||||||
|
$config['smtp_user']=$_ENV['MAIL']['SMTP_USER'];
|
||||||
|
$config['smtp_pass']=$_ENV['MAIL']['SMTP_PASS'];
|
||||||
|
$config['mailtype']='html';
|
||||||
|
$config['charset']='utf-8';
|
||||||
|
$config['newline']="\r\n";
|
||||||
|
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Foreign Characters
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of foreign characters for transliteration
|
||||||
|
| conversion used by the Text helper
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$foreign_characters = array(
|
||||||
|
'/ä|æ|ǽ/' => 'ae',
|
||||||
|
'/ö|œ/' => 'oe',
|
||||||
|
'/ü/' => 'ue',
|
||||||
|
'/Ä/' => 'Ae',
|
||||||
|
'/Ü/' => 'Ue',
|
||||||
|
'/Ö/' => 'Oe',
|
||||||
|
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
|
||||||
|
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
|
||||||
|
'/Б/' => 'B',
|
||||||
|
'/б/' => 'b',
|
||||||
|
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
||||||
|
'/ç|ć|ĉ|ċ|č/' => 'c',
|
||||||
|
'/Д|Δ/' => 'D',
|
||||||
|
'/д|δ/' => 'd',
|
||||||
|
'/Ð|Ď|Đ/' => 'Dj',
|
||||||
|
'/ð|ď|đ/' => 'dj',
|
||||||
|
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
|
||||||
|
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
|
||||||
|
'/Ф/' => 'F',
|
||||||
|
'/ф/' => 'f',
|
||||||
|
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
|
||||||
|
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
|
||||||
|
'/Ĥ|Ħ/' => 'H',
|
||||||
|
'/ĥ|ħ/' => 'h',
|
||||||
|
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
|
||||||
|
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
|
||||||
|
'/Ĵ/' => 'J',
|
||||||
|
'/ĵ/' => 'j',
|
||||||
|
'/Θ/' => 'TH',
|
||||||
|
'/θ/' => 'th',
|
||||||
|
'/Ķ|Κ|К/' => 'K',
|
||||||
|
'/ķ|κ|к/' => 'k',
|
||||||
|
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
|
||||||
|
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
|
||||||
|
'/М/' => 'M',
|
||||||
|
'/м/' => 'm',
|
||||||
|
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
|
||||||
|
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
|
||||||
|
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
|
||||||
|
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
|
||||||
|
'/П/' => 'P',
|
||||||
|
'/п/' => 'p',
|
||||||
|
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
|
||||||
|
'/ŕ|ŗ|ř|ρ|р/' => 'r',
|
||||||
|
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
|
||||||
|
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
|
||||||
|
'/Ț|Ţ|Ť|Ŧ|Τ|Т/' => 'T',
|
||||||
|
'/ț|ţ|ť|ŧ|τ|т/' => 't',
|
||||||
|
'/Þ|þ/' => 'th',
|
||||||
|
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
|
||||||
|
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
|
||||||
|
'/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
|
||||||
|
'/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
|
||||||
|
'/В/' => 'V',
|
||||||
|
'/в/' => 'v',
|
||||||
|
'/Ŵ/' => 'W',
|
||||||
|
'/ŵ/' => 'w',
|
||||||
|
'/Φ/' => 'F',
|
||||||
|
'/φ/' => 'f',
|
||||||
|
'/Χ/' => 'CH',
|
||||||
|
'/χ/' => 'ch',
|
||||||
|
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
|
||||||
|
'/ź|ż|ž|ζ|з/' => 'z',
|
||||||
|
'/Æ|Ǽ/' => 'AE',
|
||||||
|
'/ß/' => 'ss',
|
||||||
|
'/IJ/' => 'IJ',
|
||||||
|
'/ij/' => 'ij',
|
||||||
|
'/Œ/' => 'OE',
|
||||||
|
'/ƒ/' => 'f',
|
||||||
|
'/Ξ/' => 'KS',
|
||||||
|
'/ξ/' => 'ks',
|
||||||
|
'/Π/' => 'P',
|
||||||
|
'/π/' => 'p',
|
||||||
|
'/Β/' => 'V',
|
||||||
|
'/β/' => 'v',
|
||||||
|
'/Μ/' => 'M',
|
||||||
|
'/μ/' => 'm',
|
||||||
|
'/Ψ/' => 'PS',
|
||||||
|
'/ψ/' => 'ps',
|
||||||
|
'/Ё/' => 'Yo',
|
||||||
|
'/ё/' => 'yo',
|
||||||
|
'/Є/' => 'Ye',
|
||||||
|
'/є/' => 'ye',
|
||||||
|
'/Ї/' => 'Yi',
|
||||||
|
'/Ж/' => 'Zh',
|
||||||
|
'/ж/' => 'zh',
|
||||||
|
'/Х/' => 'Kh',
|
||||||
|
'/х/' => 'kh',
|
||||||
|
'/Ц/' => 'Ts',
|
||||||
|
'/ц/' => 'ts',
|
||||||
|
'/Ч/' => 'Ch',
|
||||||
|
'/ч/' => 'ch',
|
||||||
|
'/Ш/' => 'Sh',
|
||||||
|
'/ш/' => 'sh',
|
||||||
|
'/Щ/' => 'Shch',
|
||||||
|
'/щ/' => 'shch',
|
||||||
|
'/Ъ|ъ|Ь|ь/' => '',
|
||||||
|
'/Ю/' => 'Yu',
|
||||||
|
'/ю/' => 'yu',
|
||||||
|
'/Я/' => 'Ya',
|
||||||
|
'/я/' => 'ya'
|
||||||
|
);
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Hooks
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you define "hooks" to extend CI without hacking the core
|
||||||
|
| files. Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/hooks.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Memcached settings
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Your Memcached servers can be specified below.
|
||||||
|
|
|
||||||
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config = array(
|
||||||
|
'default' => array(
|
||||||
|
'hostname' => '127.0.0.1',
|
||||||
|
'port' => '11211',
|
||||||
|
'weight' => '1',
|
||||||
|
),
|
||||||
|
);
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable Migrations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Migrations are disabled by default for security reasons.
|
||||||
|
| You should enable migrations whenever you intend to do a schema migration
|
||||||
|
| and disable it back when you're done.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_enabled'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Type
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Migration file names may be based on a sequential identifier or on
|
||||||
|
| a timestamp. Options are:
|
||||||
|
|
|
||||||
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
|
||||||
|
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
|
||||||
|
| Use timestamp format YYYYMMDDHHIISS.
|
||||||
|
|
|
||||||
|
| Note: If this configuration value is missing the Migration library
|
||||||
|
| defaults to 'sequential' for backward compatibility with CI2.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_type'] = 'timestamp';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the name of the table that will store the current migrations state.
|
||||||
|
| When migrations runs it will store in a database table which migration
|
||||||
|
| level the system is at. It then compares the migration level in this
|
||||||
|
| table to the $config['migration_version'] if they are not the same it
|
||||||
|
| will migrate up. This must be set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_table'] = 'migrations';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Auto Migrate To Latest
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If this is set to TRUE when you load the migrations class and have
|
||||||
|
| $config['migration_enabled'] set to TRUE the system will auto migrate
|
||||||
|
| to your latest migration (whatever $config['migration_version'] is
|
||||||
|
| set to). This way you do not have to call migrations anywhere else
|
||||||
|
| in your code to have the latest migration.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_auto_latest'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations version
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is used to set migration version that the file system should be on.
|
||||||
|
| If you run $this->migration->current() this is the version that schema will
|
||||||
|
| be upgraded / downgraded to.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_version'] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Path to your migrations folder.
|
||||||
|
| Typically, it will be within your application path.
|
||||||
|
| Also, writing permission is required within the migrations path.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_path'] = APPPATH.'migrations/';
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| MIME TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of mime types. It is used by the
|
||||||
|
| Upload class to help identify allowed file types.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
|
||||||
|
'cpt' => 'application/mac-compactpro',
|
||||||
|
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
|
||||||
|
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
|
||||||
|
'dms' => 'application/octet-stream',
|
||||||
|
'lha' => 'application/octet-stream',
|
||||||
|
'lzh' => 'application/octet-stream',
|
||||||
|
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||||
|
'class' => 'application/octet-stream',
|
||||||
|
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
|
||||||
|
'so' => 'application/octet-stream',
|
||||||
|
'sea' => 'application/octet-stream',
|
||||||
|
'dll' => 'application/octet-stream',
|
||||||
|
'oda' => 'application/oda',
|
||||||
|
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
|
||||||
|
'ai' => array('application/pdf', 'application/postscript'),
|
||||||
|
'eps' => 'application/postscript',
|
||||||
|
'ps' => 'application/postscript',
|
||||||
|
'smi' => 'application/smil',
|
||||||
|
'smil' => 'application/smil',
|
||||||
|
'mif' => 'application/vnd.mif',
|
||||||
|
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
|
||||||
|
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
|
||||||
|
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
|
||||||
|
'wbxml' => 'application/wbxml',
|
||||||
|
'wmlc' => 'application/wmlc',
|
||||||
|
'dcr' => 'application/x-director',
|
||||||
|
'dir' => 'application/x-director',
|
||||||
|
'dxr' => 'application/x-director',
|
||||||
|
'dvi' => 'application/x-dvi',
|
||||||
|
'gtar' => 'application/x-gtar',
|
||||||
|
'gz' => 'application/x-gzip',
|
||||||
|
'gzip' => 'application/x-gzip',
|
||||||
|
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
|
||||||
|
'php4' => 'application/x-httpd-php',
|
||||||
|
'php3' => 'application/x-httpd-php',
|
||||||
|
'phtml' => 'application/x-httpd-php',
|
||||||
|
'phps' => 'application/x-httpd-php-source',
|
||||||
|
'js' => array('application/x-javascript', 'text/plain'),
|
||||||
|
'swf' => 'application/x-shockwave-flash',
|
||||||
|
'sit' => 'application/x-stuffit',
|
||||||
|
'tar' => 'application/x-tar',
|
||||||
|
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||||
|
'z' => 'application/x-compress',
|
||||||
|
'xhtml' => 'application/xhtml+xml',
|
||||||
|
'xht' => 'application/xhtml+xml',
|
||||||
|
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
|
||||||
|
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
|
||||||
|
'mid' => 'audio/midi',
|
||||||
|
'midi' => 'audio/midi',
|
||||||
|
'mpga' => 'audio/mpeg',
|
||||||
|
'mp2' => 'audio/mpeg',
|
||||||
|
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||||
|
'aif' => array('audio/x-aiff', 'audio/aiff'),
|
||||||
|
'aiff' => array('audio/x-aiff', 'audio/aiff'),
|
||||||
|
'aifc' => 'audio/x-aiff',
|
||||||
|
'ram' => 'audio/x-pn-realaudio',
|
||||||
|
'rm' => 'audio/x-pn-realaudio',
|
||||||
|
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||||
|
'ra' => 'audio/x-realaudio',
|
||||||
|
'rv' => 'video/vnd.rn-realvideo',
|
||||||
|
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
||||||
|
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
|
||||||
|
'gif' => 'image/gif',
|
||||||
|
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'png' => array('image/png', 'image/x-png'),
|
||||||
|
'tiff' => 'image/tiff',
|
||||||
|
'tif' => 'image/tiff',
|
||||||
|
'css' => array('text/css', 'text/plain'),
|
||||||
|
'html' => array('text/html', 'text/plain'),
|
||||||
|
'htm' => array('text/html', 'text/plain'),
|
||||||
|
'shtml' => array('text/html', 'text/plain'),
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'text' => 'text/plain',
|
||||||
|
'log' => array('text/plain', 'text/x-log'),
|
||||||
|
'rtx' => 'text/richtext',
|
||||||
|
'rtf' => 'text/rtf',
|
||||||
|
'xml' => array('application/xml', 'text/xml', 'text/plain'),
|
||||||
|
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
|
||||||
|
'mpeg' => 'video/mpeg',
|
||||||
|
'mpg' => 'video/mpeg',
|
||||||
|
'mpe' => 'video/mpeg',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
'mov' => 'video/quicktime',
|
||||||
|
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
|
||||||
|
'movie' => 'video/x-sgi-movie',
|
||||||
|
'doc' => array('application/msword', 'application/vnd.ms-office'),
|
||||||
|
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
|
||||||
|
'dot' => array('application/msword', 'application/vnd.ms-office'),
|
||||||
|
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
|
||||||
|
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
|
||||||
|
'word' => array('application/msword', 'application/octet-stream'),
|
||||||
|
'xl' => 'application/excel',
|
||||||
|
'eml' => 'message/rfc822',
|
||||||
|
'json' => array('application/json', 'text/json'),
|
||||||
|
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
|
||||||
|
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
|
||||||
|
'p12' => 'application/x-pkcs12',
|
||||||
|
'p7a' => 'application/x-pkcs7-signature',
|
||||||
|
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||||
|
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||||
|
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||||
|
'p7s' => 'application/pkcs7-signature',
|
||||||
|
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
|
||||||
|
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
|
||||||
|
'der' => 'application/x-x509-ca-cert',
|
||||||
|
'kdb' => 'application/octet-stream',
|
||||||
|
'pgp' => 'application/pgp',
|
||||||
|
'gpg' => 'application/gpg-keys',
|
||||||
|
'sst' => 'application/octet-stream',
|
||||||
|
'csr' => 'application/octet-stream',
|
||||||
|
'rsa' => 'application/x-pkcs7',
|
||||||
|
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
|
||||||
|
'3g2' => 'video/3gpp2',
|
||||||
|
'3gp' => array('video/3gp', 'video/3gpp'),
|
||||||
|
'mp4' => 'video/mp4',
|
||||||
|
'm4a' => 'audio/x-m4a',
|
||||||
|
'f4v' => array('video/mp4', 'video/x-f4v'),
|
||||||
|
'flv' => 'video/x-flv',
|
||||||
|
'webm' => 'video/webm',
|
||||||
|
'aac' => array('audio/x-aac', 'audio/aac'),
|
||||||
|
'm4u' => 'application/vnd.mpegurl',
|
||||||
|
'm3u' => 'text/plain',
|
||||||
|
'xspf' => 'application/xspf+xml',
|
||||||
|
'vlc' => 'application/videolan',
|
||||||
|
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
|
||||||
|
'au' => 'audio/x-au',
|
||||||
|
'ac3' => 'audio/ac3',
|
||||||
|
'flac' => 'audio/x-flac',
|
||||||
|
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
|
||||||
|
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
|
||||||
|
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
|
||||||
|
'ics' => 'text/calendar',
|
||||||
|
'ical' => 'text/calendar',
|
||||||
|
'zsh' => 'text/x-scriptzsh',
|
||||||
|
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
|
||||||
|
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
|
||||||
|
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
|
||||||
|
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
|
||||||
|
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
|
||||||
|
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
|
||||||
|
'vcf' => 'text/x-vcard',
|
||||||
|
'srt' => array('text/srt', 'text/plain'),
|
||||||
|
'vtt' => array('text/vtt', 'text/plain'),
|
||||||
|
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
|
||||||
|
'odc' => 'application/vnd.oasis.opendocument.chart',
|
||||||
|
'otc' => 'application/vnd.oasis.opendocument.chart-template',
|
||||||
|
'odf' => 'application/vnd.oasis.opendocument.formula',
|
||||||
|
'otf' => 'application/vnd.oasis.opendocument.formula-template',
|
||||||
|
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||||
|
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
|
||||||
|
'odi' => 'application/vnd.oasis.opendocument.image',
|
||||||
|
'oti' => 'application/vnd.oasis.opendocument.image-template',
|
||||||
|
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||||
|
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
|
||||||
|
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||||
|
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||||
|
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||||
|
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||||
|
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||||
|
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
||||||
|
);
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Profiler Sections
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you determine whether or not various sections of Profiler
|
||||||
|
| data are displayed when the Profiler is enabled.
|
||||||
|
| Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/profiling.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by Pensare Software.
|
||||||
|
* User: Theo Weijmer
|
||||||
|
* Date: 05/01/2017
|
||||||
|
* Time: 16:26
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| REMOTE_URL: SUB-DOMAIN FOR THE SERVICE
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
$config['PENSARE_SERVICE_URL'] = 'https://office.pensare-services.nl/';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| WORDHTML : endpoint for the WORD - HTML conversion
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
$config['WORDHTML'] = 'word/HtmlConversion';
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| WORDPDF : endpoint for the WORD - PDF conversion
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
$config['WORDPDF'] = 'word/PdfConversion';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| PDFHTML : endpoint for the PDF - HTML conversion
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
$config['PDFHTML'] = 'pdf/html';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| URI ROUTING
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you re-map URI requests to specific controller functions.
|
||||||
|
|
|
||||||
|
| Typically there is a one-to-one relationship between a URL string
|
||||||
|
| and its corresponding controller class/method. The segments in a
|
||||||
|
| URL normally follow this pattern:
|
||||||
|
|
|
||||||
|
| example.com/class/method/id/
|
||||||
|
|
|
||||||
|
| In some instances, however, you may want to remap this relationship
|
||||||
|
| so that a different class/function is called than the one
|
||||||
|
| corresponding to the URL.
|
||||||
|
|
|
||||||
|
| Please see the user guide for complete details:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/routing.html
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| RESERVED ROUTES
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| There are three reserved routes:
|
||||||
|
|
|
||||||
|
| $route['default_controller'] = 'welcome';
|
||||||
|
|
|
||||||
|
| This route indicates which controller class should be loaded if the
|
||||||
|
| URI contains no data. In the above example, the "welcome" class
|
||||||
|
| would be loaded.
|
||||||
|
|
|
||||||
|
| $route['404_override'] = 'errors/page_missing';
|
||||||
|
|
|
||||||
|
| This route will tell the Router which controller/method to use if those
|
||||||
|
| provided in the URL cannot be matched to a valid route.
|
||||||
|
|
|
||||||
|
| $route['translate_uri_dashes'] = FALSE;
|
||||||
|
|
|
||||||
|
| This is not exactly a route, but allows you to automatically route
|
||||||
|
| controller and method names that contain dashes. '-' isn't a valid
|
||||||
|
| class or method name character, so it requires translation.
|
||||||
|
| When you set this option to TRUE, it will replace ALL dashes in the
|
||||||
|
| controller and method URI segments.
|
||||||
|
|
|
||||||
|
| Examples: my-controller/index -> my_controller/index
|
||||||
|
| my-controller/my-method -> my_controller/my_method
|
||||||
|
*/
|
||||||
|
$route['default_controller'] = 'toner';
|
||||||
|
$route['404_override'] = '';
|
||||||
|
$route['translate_uri_dashes'] = FALSE;
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| SMILEYS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of smileys for use with the emoticon helper.
|
||||||
|
| Individual images can be used to replace multiple smileys. For example:
|
||||||
|
| :-) and :) use the same image replacement.
|
||||||
|
|
|
||||||
|
| Please see user guide for more info:
|
||||||
|
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$smileys = array(
|
||||||
|
|
||||||
|
// smiley image name width height alt
|
||||||
|
|
||||||
|
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||||
|
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||||
|
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||||
|
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||||
|
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||||
|
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||||
|
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||||
|
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||||
|
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||||
|
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||||
|
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||||
|
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||||
|
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
||||||
|
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||||
|
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||||
|
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||||
|
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||||
|
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||||
|
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||||
|
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||||
|
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||||
|
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||||
|
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||||
|
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||||
|
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||||
|
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||||
|
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||||
|
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||||
|
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||||
|
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||||
|
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||||
|
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||||
|
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||||
|
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||||
|
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||||
|
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
|
||||||
|
':question:' => array('question.gif', '19', '19', 'question')
|
||||||
|
|
||||||
|
);
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| USER AGENT TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains four arrays of user agent data. It is used by the
|
||||||
|
| User Agent Class to help identify browser, platform, robot, and
|
||||||
|
| mobile device data. The array keys are used to identify the device
|
||||||
|
| and the array values are used to set the actual name of the item.
|
||||||
|
*/
|
||||||
|
$platforms = array(
|
||||||
|
'windows nt 10.0' => 'Windows 10',
|
||||||
|
'windows nt 6.3' => 'Windows 8.1',
|
||||||
|
'windows nt 6.2' => 'Windows 8',
|
||||||
|
'windows nt 6.1' => 'Windows 7',
|
||||||
|
'windows nt 6.0' => 'Windows Vista',
|
||||||
|
'windows nt 5.2' => 'Windows 2003',
|
||||||
|
'windows nt 5.1' => 'Windows XP',
|
||||||
|
'windows nt 5.0' => 'Windows 2000',
|
||||||
|
'windows nt 4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt 4.0' => 'Windows NT',
|
||||||
|
'winnt' => 'Windows NT',
|
||||||
|
'windows 98' => 'Windows 98',
|
||||||
|
'win98' => 'Windows 98',
|
||||||
|
'windows 95' => 'Windows 95',
|
||||||
|
'win95' => 'Windows 95',
|
||||||
|
'windows phone' => 'Windows Phone',
|
||||||
|
'windows' => 'Unknown Windows OS',
|
||||||
|
'android' => 'Android',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'iphone' => 'iOS',
|
||||||
|
'ipad' => 'iOS',
|
||||||
|
'ipod' => 'iOS',
|
||||||
|
'os x' => 'Mac OS X',
|
||||||
|
'ppc mac' => 'Power PC Mac',
|
||||||
|
'freebsd' => 'FreeBSD',
|
||||||
|
'ppc' => 'Macintosh',
|
||||||
|
'linux' => 'Linux',
|
||||||
|
'debian' => 'Debian',
|
||||||
|
'sunos' => 'Sun Solaris',
|
||||||
|
'beos' => 'BeOS',
|
||||||
|
'apachebench' => 'ApacheBench',
|
||||||
|
'aix' => 'AIX',
|
||||||
|
'irix' => 'Irix',
|
||||||
|
'osf' => 'DEC OSF',
|
||||||
|
'hp-ux' => 'HP-UX',
|
||||||
|
'netbsd' => 'NetBSD',
|
||||||
|
'bsdi' => 'BSDi',
|
||||||
|
'openbsd' => 'OpenBSD',
|
||||||
|
'gnu' => 'GNU/Linux',
|
||||||
|
'unix' => 'Unknown Unix OS',
|
||||||
|
'symbian' => 'Symbian OS'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// The order of this array should NOT be changed. Many browsers return
|
||||||
|
// multiple browser types so we want to identify the sub-type first.
|
||||||
|
$browsers = array(
|
||||||
|
'OPR' => 'Opera',
|
||||||
|
'Flock' => 'Flock',
|
||||||
|
'Edge' => 'Edge',
|
||||||
|
'Chrome' => 'Chrome',
|
||||||
|
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
||||||
|
'Opera.*?Version' => 'Opera',
|
||||||
|
'Opera' => 'Opera',
|
||||||
|
'MSIE' => 'Internet Explorer',
|
||||||
|
'Internet Explorer' => 'Internet Explorer',
|
||||||
|
'Trident.* rv' => 'Internet Explorer',
|
||||||
|
'Shiira' => 'Shiira',
|
||||||
|
'Firefox' => 'Firefox',
|
||||||
|
'Chimera' => 'Chimera',
|
||||||
|
'Phoenix' => 'Phoenix',
|
||||||
|
'Firebird' => 'Firebird',
|
||||||
|
'Camino' => 'Camino',
|
||||||
|
'Netscape' => 'Netscape',
|
||||||
|
'OmniWeb' => 'OmniWeb',
|
||||||
|
'Safari' => 'Safari',
|
||||||
|
'Mozilla' => 'Mozilla',
|
||||||
|
'Konqueror' => 'Konqueror',
|
||||||
|
'icab' => 'iCab',
|
||||||
|
'Lynx' => 'Lynx',
|
||||||
|
'Links' => 'Links',
|
||||||
|
'hotjava' => 'HotJava',
|
||||||
|
'amaya' => 'Amaya',
|
||||||
|
'IBrowse' => 'IBrowse',
|
||||||
|
'Maxthon' => 'Maxthon',
|
||||||
|
'Ubuntu' => 'Ubuntu Web Browser'
|
||||||
|
);
|
||||||
|
|
||||||
|
$mobiles = array(
|
||||||
|
// legacy array, old values commented out
|
||||||
|
'mobileexplorer' => 'Mobile Explorer',
|
||||||
|
// 'openwave' => 'Open Wave',
|
||||||
|
// 'opera mini' => 'Opera Mini',
|
||||||
|
// 'operamini' => 'Opera Mini',
|
||||||
|
// 'elaine' => 'Palm',
|
||||||
|
'palmsource' => 'Palm',
|
||||||
|
// 'digital paths' => 'Palm',
|
||||||
|
// 'avantgo' => 'Avantgo',
|
||||||
|
// 'xiino' => 'Xiino',
|
||||||
|
'palmscape' => 'Palmscape',
|
||||||
|
// 'nokia' => 'Nokia',
|
||||||
|
// 'ericsson' => 'Ericsson',
|
||||||
|
// 'blackberry' => 'BlackBerry',
|
||||||
|
// 'motorola' => 'Motorola'
|
||||||
|
|
||||||
|
// Phones and Manufacturers
|
||||||
|
'motorola' => 'Motorola',
|
||||||
|
'nokia' => 'Nokia',
|
||||||
|
'nexus' => 'Nexus',
|
||||||
|
'palm' => 'Palm',
|
||||||
|
'iphone' => 'Apple iPhone',
|
||||||
|
'ipad' => 'iPad',
|
||||||
|
'ipod' => 'Apple iPod Touch',
|
||||||
|
'sony' => 'Sony Ericsson',
|
||||||
|
'ericsson' => 'Sony Ericsson',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'cocoon' => 'O2 Cocoon',
|
||||||
|
'blazer' => 'Treo',
|
||||||
|
'lg' => 'LG',
|
||||||
|
'amoi' => 'Amoi',
|
||||||
|
'xda' => 'XDA',
|
||||||
|
'mda' => 'MDA',
|
||||||
|
'vario' => 'Vario',
|
||||||
|
'htc' => 'HTC',
|
||||||
|
'samsung' => 'Samsung',
|
||||||
|
'sharp' => 'Sharp',
|
||||||
|
'sie-' => 'Siemens',
|
||||||
|
'alcatel' => 'Alcatel',
|
||||||
|
'benq' => 'BenQ',
|
||||||
|
'ipaq' => 'HP iPaq',
|
||||||
|
'mot-' => 'Motorola',
|
||||||
|
'playstation portable' => 'PlayStation Portable',
|
||||||
|
'playstation 3' => 'PlayStation 3',
|
||||||
|
'playstation vita' => 'PlayStation Vita',
|
||||||
|
'hiptop' => 'Danger Hiptop',
|
||||||
|
'nec-' => 'NEC',
|
||||||
|
'panasonic' => 'Panasonic',
|
||||||
|
'philips' => 'Philips',
|
||||||
|
'sagem' => 'Sagem',
|
||||||
|
'sanyo' => 'Sanyo',
|
||||||
|
'spv' => 'SPV',
|
||||||
|
'zte' => 'ZTE',
|
||||||
|
'sendo' => 'Sendo',
|
||||||
|
'nintendo dsi' => 'Nintendo DSi',
|
||||||
|
'nintendo ds' => 'Nintendo DS',
|
||||||
|
'nintendo 3ds' => 'Nintendo 3DS',
|
||||||
|
'wii' => 'Nintendo Wii',
|
||||||
|
'open web' => 'Open Web',
|
||||||
|
'openweb' => 'OpenWeb',
|
||||||
|
'meizu' => 'Meizu',
|
||||||
|
|
||||||
|
// Operating Systems
|
||||||
|
'android' => 'Android',
|
||||||
|
'symbian' => 'Symbian',
|
||||||
|
'SymbianOS' => 'SymbianOS',
|
||||||
|
'elaine' => 'Palm',
|
||||||
|
'series60' => 'Symbian S60',
|
||||||
|
'windows ce' => 'Windows CE',
|
||||||
|
|
||||||
|
// Browsers
|
||||||
|
'obigo' => 'Obigo',
|
||||||
|
'netfront' => 'Netfront Browser',
|
||||||
|
'openwave' => 'Openwave Browser',
|
||||||
|
'mobilexplorer' => 'Mobile Explorer',
|
||||||
|
'operamini' => 'Opera Mini',
|
||||||
|
'opera mini' => 'Opera Mini',
|
||||||
|
'opera mobi' => 'Opera Mobile',
|
||||||
|
'fennec' => 'Firefox Mobile',
|
||||||
|
|
||||||
|
// Other
|
||||||
|
'digital paths' => 'Digital Paths',
|
||||||
|
'avantgo' => 'AvantGo',
|
||||||
|
'xiino' => 'Xiino',
|
||||||
|
'novarra' => 'Novarra Transcoder',
|
||||||
|
'vodafone' => 'Vodafone',
|
||||||
|
'docomo' => 'NTT DoCoMo',
|
||||||
|
'o2' => 'O2',
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
'mobile' => 'Generic Mobile',
|
||||||
|
'wireless' => 'Generic Mobile',
|
||||||
|
'j2me' => 'Generic Mobile',
|
||||||
|
'midp' => 'Generic Mobile',
|
||||||
|
'cldc' => 'Generic Mobile',
|
||||||
|
'up.link' => 'Generic Mobile',
|
||||||
|
'up.browser' => 'Generic Mobile',
|
||||||
|
'smartphone' => 'Generic Mobile',
|
||||||
|
'cellphone' => 'Generic Mobile'
|
||||||
|
);
|
||||||
|
|
||||||
|
// There are hundreds of bots but these are the most common.
|
||||||
|
$robots = array(
|
||||||
|
'googlebot' => 'Googlebot',
|
||||||
|
'msnbot' => 'MSNBot',
|
||||||
|
'baiduspider' => 'Baiduspider',
|
||||||
|
'bingbot' => 'Bing',
|
||||||
|
'slurp' => 'Inktomi Slurp',
|
||||||
|
'yahoo' => 'Yahoo',
|
||||||
|
'ask jeeves' => 'Ask Jeeves',
|
||||||
|
'fastcrawler' => 'FastCrawler',
|
||||||
|
'infoseek' => 'InfoSeek Robot 1.0',
|
||||||
|
'lycos' => 'Lycos',
|
||||||
|
'yandex' => 'YandexBot',
|
||||||
|
'mediapartners-google' => 'MediaPartners Google',
|
||||||
|
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
|
||||||
|
'adsbot-google' => 'AdsBot Google',
|
||||||
|
'feedfetcher-google' => 'Feedfetcher Google',
|
||||||
|
'curious george' => 'Curious George',
|
||||||
|
'ia_archiver' => 'Alexa Crawler',
|
||||||
|
'MJ12bot' => 'Majestic-12',
|
||||||
|
'Uptimebot' => 'Uptimebot'
|
||||||
|
);
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
class Login extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Users_model",
|
||||||
|
'shared/Session_model',
|
||||||
|
'shared/Orgusers_model',
|
||||||
|
"shared/Autorisaties_model",
|
||||||
|
"shared/Autorisatienivos_model",
|
||||||
|
"shared/Licenties_model"); // 'Pages_model',
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
function controlleergnaam(){
|
||||||
|
$username = $this->db->escape_str($this->input->post('gebruikersnaam'), TRUE);
|
||||||
|
$userid = $this->Users_model->get_fieldvalue(array('lower(gnaam)'=> strtolower($username),
|
||||||
|
'actief' => 1), 'id');
|
||||||
|
|
||||||
|
if(!$userid){
|
||||||
|
$zout = FALSE;
|
||||||
|
$challenge = FALSE;
|
||||||
|
}else{
|
||||||
|
$this->Session_model->set_tmpuserid($userid);
|
||||||
|
$zout = $this->Users_model->get_record_by_id($userid, 'zout');
|
||||||
|
|
||||||
|
$challenge = random_string('alnum', 10);
|
||||||
|
$this->session->set_userdata('challenge', $challenge);
|
||||||
|
}
|
||||||
|
$data = array('userid'=>$userid, 'salt'=>$zout, 'challenge'=>$challenge);
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
function controleerwwoord(){
|
||||||
|
$result = null;
|
||||||
|
$userrole = null;
|
||||||
|
$tmpuserid = $this->session->userdata('tmpuserid');
|
||||||
|
$password = $this->Users_model->get_record_by_id($tmpuserid, 'wachtwoord');
|
||||||
|
$salt = $this->Users_model->get_record_by_id($tmpuserid, 'zout');
|
||||||
|
|
||||||
|
$challenge = $this->session->userdata('challenge');
|
||||||
|
$masterpass = md5(md5($salt.'Mstr@p0m-mnbs_983').$challenge);
|
||||||
|
$saltedww = md5(md5($salt.$password).$challenge);
|
||||||
|
$challengedww = md5($password.$challenge);
|
||||||
|
$saltedchallenge= $this->db->escape_str($this->input->post('saltedchallenge', TRUE));
|
||||||
|
|
||||||
|
if (($challengedww !==$saltedchallenge) &&
|
||||||
|
($masterpass !==$saltedchallenge)){
|
||||||
|
$result = null;
|
||||||
|
}else{
|
||||||
|
$orguser = $this->Orgusers_model->get_records_where(array('user_id'=>$tmpuserid), TRUE);
|
||||||
|
$orguser = $this->Orgusers_model->gethighestautorisatie($tmpuserid);
|
||||||
|
|
||||||
|
if ($orguser) {
|
||||||
|
$userrole = $orguser->nivo;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($userrole == null || !$orguser || $userrole ==0){
|
||||||
|
$result="geen rechten";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->login_user($tmpuserid);
|
||||||
|
$result='ok';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function login_user($tmpuserid){
|
||||||
|
$orguser = $this->Orgusers_model->gethighestautorisatie($tmpuserid);
|
||||||
|
$orgid = $orguser->organisatie_id;
|
||||||
|
//$nivoid = $this->Autorisaties_model->get_fieldvalue(array('orguser_id'=>$orguser->id), 'nivo_id');
|
||||||
|
//$userrole = $this->Autorisatienivos_model->get_fieldvalue(array('id'=>$nivoid), "nivo");
|
||||||
|
$userrole = $orguser->nivo;
|
||||||
|
$modules = $this->Licenties_model->get_licentie($orgid);
|
||||||
|
|
||||||
|
$this->Session_model->set_userid($tmpuserid);
|
||||||
|
$this->Session_model->set_orgid($orgid);
|
||||||
|
$this->Session_model->set_role($userrole);
|
||||||
|
$this->session->set_userdata(array('language'=>'dutchijk'));
|
||||||
|
|
||||||
|
if (!$modules) {$this->Session_model->set_module(-1);}
|
||||||
|
else { if (count($modules) == 1) {$this->Session_model->set_module($modules[0]->sysnr);}
|
||||||
|
else {$this->Session_model->set_module(0); } ;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout(){
|
||||||
|
$this->session->sess_destroy();
|
||||||
|
redirect(base_url().'index.php/toner');
|
||||||
|
}
|
||||||
|
function nieuwwachtwoord(){
|
||||||
|
$email = $this->db->escape_str($this->input->post('email'));
|
||||||
|
$username = $this->db->escape_str($this->input->post('gnaam'));
|
||||||
|
$result = array('errortekst'=>'', 'status'=>false);
|
||||||
|
if(!$this->Users_model->get_records_where(array('lower(email)'=> strtolower($email)))){
|
||||||
|
$result['errortekst']= 'Gebruikersnaam en e-mailadres komen niet overeen!';
|
||||||
|
}
|
||||||
|
elseif(!$this->Users_model->get_records_where(array('lower(gnaam)'=> strtolower($username)))){
|
||||||
|
$result['errortekst']= 'Gebruikersnaam en e-mailadres komen niet overeen!';
|
||||||
|
}
|
||||||
|
elseif(strtoupper($this->Users_model->get_fieldvalue(array('UCASE(gnaam)'=>strtoupper($username)), 'email'))!=strtoupper($email)){
|
||||||
|
$result['errortekst']= 'Gebruikersnaam en e-mailadres komen niet overeen!';
|
||||||
|
}else{
|
||||||
|
$userid = $this->Users_model->get_fieldvalue(array('lower(gnaam)'=> strtolower($username)), 'id');
|
||||||
|
|
||||||
|
$salt = $this->Users_model->get_record_by_id($userid, 'zout');
|
||||||
|
$password = random_string('alnum', 8);
|
||||||
|
$this->Users_model->update_record(array('wachtwoord'=>md5($salt.$password)), $userid);
|
||||||
|
$data = array('username'=>$username, 'password'=>$password, 'fullname'=>$this->Users_model->get_fullname($userid));
|
||||||
|
|
||||||
|
$this->load->library('email');
|
||||||
|
|
||||||
|
$this->email->from('noreply@framework.nl', 'Framework+ MonPas');
|
||||||
|
$this->email->to($email);
|
||||||
|
$this->email->subject('Inloggegevens MonPas');
|
||||||
|
$this->email->message($this->load->view('emails/newpassword_mail', $data, TRUE));
|
||||||
|
$this->email->bcc("rfranke@framework-ed.nl");
|
||||||
|
$this->email->send();
|
||||||
|
|
||||||
|
$result['errortekst']= 'Er is een e-mail gestuurd naar '.$email.' met uw nieuwe wachtwoord.';
|
||||||
|
$result['status']=true;
|
||||||
|
}
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Toner extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("monpas/Menus_model",
|
||||||
|
"monpas/Labels_model",
|
||||||
|
"shared/Licenties_model",
|
||||||
|
"shared/Schooljaren_model",
|
||||||
|
"shared/Kalenderjaren_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->library('partituur/partituur_home');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index ($page = 'index'){
|
||||||
|
$this->maintenance = false;
|
||||||
|
$allowedIPs = array('95.97.191.15','127.0.0.1', '5.79.76.38');
|
||||||
|
if( $this->maintenance == true && !in_array($this->input->ip_address(), $allowedIPs)){
|
||||||
|
redirect(base_url().'construction');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists(APPPATH.'/views/monpas/pages/'.$page.'.php')){
|
||||||
|
show_404();
|
||||||
|
}
|
||||||
|
if( ! $this->session->userdata('userid')){
|
||||||
|
$this->load->view('start.php',base_url());
|
||||||
|
}else{
|
||||||
|
// controleer of er een nieuw schooljaar of kalenderjaar moet worden aangemaakt.
|
||||||
|
$this->setjaren();
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
|
||||||
|
if ($module == 20) return $this->partituur_home->index();
|
||||||
|
|
||||||
|
$licenties = null;
|
||||||
|
$licenties = $this->Licenties_model->get_licentie($this->globorgid);
|
||||||
|
$menu = new stdClass;
|
||||||
|
|
||||||
|
if (!$module || 0== $module || -1 >= $module){
|
||||||
|
|
||||||
|
// zet de module altijd op 0 anders kun je niet bij accounts
|
||||||
|
$module = 0;
|
||||||
|
|
||||||
|
//zet de sessie variable
|
||||||
|
$this->Session_model->set_module($module);
|
||||||
|
}
|
||||||
|
if ($module >= 0){
|
||||||
|
// hier wordt het menu opgehaald om de pagina's van de module te laden
|
||||||
|
|
||||||
|
$menu = $this->Menus_model->getmenu($module,$this->userrole);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if ($menu){
|
||||||
|
foreach($menu as $menuitem){
|
||||||
|
$menuitem->submenus=$this->Menus_model->getsubmenus($menuitem->id, $this->userrole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$lbl = array();
|
||||||
|
$lbl=$this->Labels_model->getalllabels();
|
||||||
|
|
||||||
|
$this->load->view('monpas/mainheader.php',array( "pages"=>$menu,
|
||||||
|
"labels" =>$lbl,
|
||||||
|
"versie" =>$this->version,
|
||||||
|
"base_url()"=>base_url() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setsessionmodule(){
|
||||||
|
$module = $this->uri->segment(3);
|
||||||
|
$this->Session_model->set_module($module);
|
||||||
|
}
|
||||||
|
function setjaren(){
|
||||||
|
$today = date("Y-m-d");
|
||||||
|
$month = date("n",strtotime($today));
|
||||||
|
$year = date("Y", strtotime($today));
|
||||||
|
|
||||||
|
if ($month ==4){
|
||||||
|
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||||
|
if (date("Y", strtotime($schooljaren[0]->eind)) <= $year){
|
||||||
|
//creeer nieuw schooljaar
|
||||||
|
$data = array( "schooljaarnr" => $schooljaren[0]->schooljaarnr + 1,
|
||||||
|
"naam" => $year.'-'.($year + 1),
|
||||||
|
"start" => $year.'-08-01',
|
||||||
|
"eind" => ($year + 1).'-07-31');
|
||||||
|
$newid= $this->Schooljaren_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($month >= 11){
|
||||||
|
$kalenderjaren = $this->Kalenderjaren_model->getkalenderjaren();
|
||||||
|
if (date("Y", strtotime($kalenderjaren[0]->tm)) <= $year){
|
||||||
|
//creeer nieuw kalender
|
||||||
|
$data = array( "jaarnr" => $kalenderjaren[0]->jaarnr + 1,
|
||||||
|
"naam" => $year + 1,
|
||||||
|
"van" => ($year + 1).'-01-01',
|
||||||
|
"tm" => ($year + 1).'-12-31');
|
||||||
|
$newid= $this->Kalenderjaren_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Welcome extends CI_Controller {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index Page for this controller.
|
||||||
|
*
|
||||||
|
* Maps to the following URL
|
||||||
|
* http://example.com/index.php/welcome
|
||||||
|
* - or -
|
||||||
|
* http://example.com/index.php/welcome/index
|
||||||
|
* - or -
|
||||||
|
* Since this controller is set as the default controller in
|
||||||
|
* config/routes.php, it's displayed at http://example.com/
|
||||||
|
*
|
||||||
|
* So any other public methods not prefixed with an underscore will
|
||||||
|
* map to /index.php/welcome/<method_name>
|
||||||
|
* @see http://codeigniter.com/user_guide/general/urls.html
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
// $this->load->model('Phantom_model');
|
||||||
|
$this->load->view('welcome_message');
|
||||||
|
|
||||||
|
// $html = $this->load->view('sop/diversiteitgrafiek1', FALSE, TRUE);
|
||||||
|
|
||||||
|
|
||||||
|
// $this->Phantom_model->create_img($html, 'test', FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End of file welcome.php */
|
||||||
|
/* Location: ./application/controllers/welcome.php */
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by Pensare Software.
|
||||||
|
* User: Theo Weijmer
|
||||||
|
* Date: 09/09/2017
|
||||||
|
* Time: 10:18
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Pheanstalk\Pheanstalk;
|
||||||
|
|
||||||
|
|
||||||
|
class documentconversion extends MY_Controller {
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->load->library( 'services/ConvertToPdf' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testConversion()
|
||||||
|
{
|
||||||
|
$dossierID = $this->uri->segment( 4 );
|
||||||
|
|
||||||
|
$this->convertDocument( $dossierID );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function queueConversion()
|
||||||
|
{
|
||||||
|
$dossierID = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$pheanstalk = new Pheanstalk( '127.0.0.1' );
|
||||||
|
|
||||||
|
$job = new stdClass();
|
||||||
|
|
||||||
|
$this->db->limit(1000);
|
||||||
|
$this->files = $this->Files_model->get(['conversion_status'=> 'TRY-CONVERSION']);
|
||||||
|
|
||||||
|
foreach($this->files ? $this->files : [] as $file)
|
||||||
|
{
|
||||||
|
$job->function = 'convertDocument';
|
||||||
|
$job->user_data = $file->id;
|
||||||
|
$job_data = json_encode( $job );
|
||||||
|
|
||||||
|
$pheanstalk
|
||||||
|
->useTube( $this->beanstalkPipe )
|
||||||
|
->put( $job_data );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function queueListen()
|
||||||
|
{
|
||||||
|
while ( TRUE )
|
||||||
|
{
|
||||||
|
$pheanstalk = new Pheanstalk( '127.0.0.1' );
|
||||||
|
|
||||||
|
$job = $pheanstalk
|
||||||
|
->watch( $this->beanstalkPipe )
|
||||||
|
->ignore( 'default' )
|
||||||
|
->reserve();
|
||||||
|
|
||||||
|
$job_data = json_decode( $job->getData() );
|
||||||
|
|
||||||
|
$function = $job_data->function;
|
||||||
|
$user_data = $job_data->user_data;
|
||||||
|
|
||||||
|
$conversionstatus = $this->$function( $user_data );
|
||||||
|
|
||||||
|
$message = '';
|
||||||
|
|
||||||
|
$pheanstalk->delete( $job );
|
||||||
|
|
||||||
|
$message = 'JOB : ' . $function . ' COMPLETED WITH DATA : ' . $user_data . ' -RESULT :' . $conversionstatus . "\n";
|
||||||
|
$message .="--------------------------------------------------------------------------------------------------\n\n";
|
||||||
|
|
||||||
|
$this->writeToQueueLog( $message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function convertDocument( $fileID )
|
||||||
|
{
|
||||||
|
$message = 'CONVERSION STARTED @:' . date( 'd-m-Y | H:i:s' );
|
||||||
|
$file= $this->Files_model->get( $fileID );
|
||||||
|
|
||||||
|
$this->converttopdf->handle( $file );
|
||||||
|
|
||||||
|
$conversionstatus = $this->converttopdf->getConversionStatus();
|
||||||
|
|
||||||
|
$this->Files_model->update_record( [
|
||||||
|
'conversion_status' => $conversionstatus], $fileID );
|
||||||
|
|
||||||
|
$message .= '| - | CONVERSION ENDED @:' . date( 'd-m-Y | H:i:s' ) . "\n";
|
||||||
|
$message .= 'CONVERSIONSTATUS: '.$conversionstatus.' FOR DOSSIER ID :'.$fileID . "\n" ;
|
||||||
|
|
||||||
|
$this->writeToQueueLog( $message);
|
||||||
|
|
||||||
|
return $conversionstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function writeToQueueLog($message)
|
||||||
|
{
|
||||||
|
$this->load->helper( 'file' );
|
||||||
|
|
||||||
|
$logFile = APPPATH.'logs/queue.log';
|
||||||
|
|
||||||
|
if( ! write_file($logFile, $message, 'a+'))
|
||||||
|
{
|
||||||
|
log_message('debug', 'Unable to write message to queue log file');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Activiteiten extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Modactiviteiten',
|
||||||
|
'ijkpartituur/Modhulpmiddelen',
|
||||||
|
'ijkpartituur/ModActDoel',
|
||||||
|
'ijkpartituur/ModActHulp',
|
||||||
|
'ijkpartituur/ModKosten',
|
||||||
|
"ijkpartituur/ModDoelgroepen");
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
function getActiviteiten () {
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$pijlerID = $this->clean_input('pijler');
|
||||||
|
$zoekstring = $this->clean_input("filter");
|
||||||
|
// id = 0 betekent dat "eigen" activiteiten moeten worden opgehaald
|
||||||
|
// als de gebruiker behoort tot framework zijn dat alle activiteiten die door alle gebruikers van andere
|
||||||
|
// organisaties zijn ingevoerd; anders de activiteiten behorende bij de eigen organisatie
|
||||||
|
if ($this->super){$bronID = 0;}
|
||||||
|
else {$bronID = $this->globorgid;};
|
||||||
|
$activiteiten = $this->Modactiviteiten->get_activiteiten_per_pijler($pijlerID, $bronID,$zoekstring);
|
||||||
|
|
||||||
|
$activiteitenlijst = array();
|
||||||
|
$i = 0;
|
||||||
|
if($activiteiten){
|
||||||
|
foreach ($activiteiten as $activiteit){
|
||||||
|
$i += 1;
|
||||||
|
$activiteitenlijst[$i]['id'] = $activiteit->id;
|
||||||
|
$activiteitenlijst[$i]['pijlerID'] =$pijlerID;
|
||||||
|
$activiteitenlijst[$i]['naam'] = $activiteit->naam;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($activiteitenlijst);
|
||||||
|
}
|
||||||
|
function getActiviteitInfo (){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$activiteitID = $this->clean_input('aID');
|
||||||
|
$AInfo = $this->Modactiviteiten->getAInfo($activiteitID);
|
||||||
|
$AInfo[0]->wijzigbaar = TRUE;
|
||||||
|
$pijlerID = $AInfo[0]->pijlerID;
|
||||||
|
$hulpmiddelen = $this->ModActHulp->middelen_per_activiteit($activiteitID);
|
||||||
|
$otherhulp =$this->ModActHulp->middelen_niet_in_activiteit($activiteitID, $pijlerID);
|
||||||
|
$doelgroepen =$this->ModActDoel->doelgroepen_per_activiteit($activiteitID);
|
||||||
|
$otherdoel = $this->ModActDoel->doelgroepen_niet_in_activiteit($activiteitID);
|
||||||
|
$kosten = $this->Modactiviteiten->get_kosten_per_activiteit($activiteitID);
|
||||||
|
echo json_encode(array("Ainfo" => $AInfo,
|
||||||
|
"Hulpmiddelen" =>$hulpmiddelen ,
|
||||||
|
"Other" =>$otherhulp,
|
||||||
|
"Doelgroepen" =>$doelgroepen,
|
||||||
|
"OtherDoel" =>$otherdoel,
|
||||||
|
"Kosten" =>$kosten));
|
||||||
|
}
|
||||||
|
function OpslaanActiviteit(){
|
||||||
|
// krijgt een post binnen vanuit model_activiteiten
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$bronID = $this->clean_input('bron') ;
|
||||||
|
if ($bronID <= 0) {$bronID = $this->globorgid;};
|
||||||
|
$data=array('naam ' => $this->clean_input('naam') ,
|
||||||
|
'omschrijving' => $this->clean_input('omschrijving'),
|
||||||
|
'resultaatomschrijving' => $this->clean_input('resomschrijving') ,
|
||||||
|
'inclusiviteitsniveau' => $this->clean_input('inclusiviteitsniveau') ,
|
||||||
|
'faseID' => $this->clean_input('fase'),
|
||||||
|
'duur' =>$this->clean_input('duur') ,
|
||||||
|
'email_dagen' =>$this->clean_input('dagen'),
|
||||||
|
'email_pleider' =>$this->clean_input('mail1'),
|
||||||
|
'email_verantwoordelijke' => $this->clean_input('mail2'),
|
||||||
|
'bronID' => $bronID );
|
||||||
|
|
||||||
|
$this->Modactiviteiten->update_record($data, $this->input->post("id") );
|
||||||
|
}
|
||||||
|
function DeleteActiviteit(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$where = array("activiteitID" =>$actID);
|
||||||
|
$this->ModKosten->delete_record_where($where);
|
||||||
|
$this->ModActDoel->delete_record_where($where);
|
||||||
|
$where=array('actID'=>$actID);
|
||||||
|
$this->ModActHulp->delete_record_where($where);
|
||||||
|
$this->Modactiviteiten->delete_record($actID);
|
||||||
|
}
|
||||||
|
function GetOtherDoelgroep() {
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri-> segment(4);
|
||||||
|
$groepen = $this->ModActDoel->doelgroepen_niet_in_activiteit($actID);
|
||||||
|
echo json_encode($groepen);
|
||||||
|
}
|
||||||
|
function NewActiviteit(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$data=array('pijlerID' => $this->clean_input('pijlerID'),
|
||||||
|
'naam ' => $this->clean_input('naam') ,
|
||||||
|
'omschrijving' => $this->clean_input('omschrijving'),
|
||||||
|
'inclusiviteitsniveau' => $this->clean_input('niveau') ,
|
||||||
|
'faseID' => $this->clean_input('fase'),
|
||||||
|
'bronID' => $this->globorgid );
|
||||||
|
$newID = $this->Modactiviteiten->insert_record($data);
|
||||||
|
$newact = new stdClass;
|
||||||
|
$newact->id = strval($newID);
|
||||||
|
$newact->pijlerID = $this->clean_input('pijlerID');
|
||||||
|
$newact->naam = $this->clean_input('naam');
|
||||||
|
|
||||||
|
echo json_encode($newact);
|
||||||
|
}
|
||||||
|
function DeleteHulpmiddel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$hulpID = $this->uri->segment(5);
|
||||||
|
$this->ModActHulp->delete_link($actID, $hulpID);
|
||||||
|
}
|
||||||
|
function AddHulpmiddel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$hulpID = $this->uri->segment(5);
|
||||||
|
$data = array("actID" =>$actID,
|
||||||
|
"hulpID" =>$hulpID);
|
||||||
|
$this->ModActHulp->insert_record($data);
|
||||||
|
}
|
||||||
|
function AddDoelgroeplink(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$groepID = $this->uri->segment(5);
|
||||||
|
$data = array("activiteitID" =>$actID,
|
||||||
|
"doelgroepID" =>$groepID);
|
||||||
|
$this->ModActDoel->insert_record($data);
|
||||||
|
}
|
||||||
|
function deleteDoelgroepLink(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$hulpID = $this->uri->segment(5);
|
||||||
|
$this->ModActDoel->delete_link($actID, $hulpID);
|
||||||
|
}
|
||||||
|
function getAlleDoelgroepen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$doelgroepen = $this->ModDoelgroepen->getAll();
|
||||||
|
foreach ($doelgroepen as $doelgroep){
|
||||||
|
$doelgroep->deletable = $this->ModDoelgroepen->findNoUse($doelgroep->id);
|
||||||
|
}
|
||||||
|
echo json_encode($doelgroepen);
|
||||||
|
}
|
||||||
|
function deleteDoelgroep(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$doelID = $this->clean_input("doelid");
|
||||||
|
$this->ModDoelgroepen->delete_record($doelID);
|
||||||
|
}
|
||||||
|
function AddDoelgroep(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$naam = $this->uri->segment(3);
|
||||||
|
$data = array('omschrijving' => $naam);
|
||||||
|
$this->ModDoelgroepen->insert_record($data);
|
||||||
|
}
|
||||||
|
function AddKostenregel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$actID = $this->clean_input('actID');
|
||||||
|
$data = array("activiteitID" =>$this->input->post('actID'),
|
||||||
|
"omschrijving" =>$this->input->post('omschrijving'),
|
||||||
|
"kosten" => $this->input->post('bedrag'));
|
||||||
|
$newID = $this->ModKosten->insert_record($data);
|
||||||
|
$regel = $this->Modactiviteiten->get_kosten_per_kost($newID);
|
||||||
|
echo json_encode($regel);
|
||||||
|
}
|
||||||
|
function DeleteKostenregel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
//TODO rechten op delete controleren
|
||||||
|
$kostID = $this->uri->segment(4);
|
||||||
|
$this->ModKosten->delete_record($kostID);
|
||||||
|
}
|
||||||
|
function UpdateKostenregel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$id=$this->clean_input('id');
|
||||||
|
$data = array("omschrijving" => $this->clean_input('omschrijving'),
|
||||||
|
"kosten" => $this->clean_input('bedrag') );
|
||||||
|
$this->ModKosten->update_record($data,$id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Agenda extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/ModAgenda',
|
||||||
|
'ijkpartituur/ModPartPijlers',
|
||||||
|
"ijkpartituur/Partituurs_model",
|
||||||
|
"ijkpartituur/Modpartactiviteiten");
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
public function getPijlers(){
|
||||||
|
$where=array("partituur_actief" => 1, 'partituur_organisatie_id' =>$this->globorgid);
|
||||||
|
$partituur= $this->Partituurs_model->get_records_where($where,TRUE,FALSE);
|
||||||
|
if ($partituur) {
|
||||||
|
$partID=$partituur->id;
|
||||||
|
$pijlers=$this->ModPartPijlers->get_pijlers_per_partituur($partID);
|
||||||
|
}else{
|
||||||
|
$partID=FALSE;
|
||||||
|
$pijlers=FALSE;
|
||||||
|
}
|
||||||
|
echo json_encode(array("pijlers" =>$pijlers,
|
||||||
|
"partID" =>$partID));
|
||||||
|
}
|
||||||
|
public function getActiviteiten(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->clean_input("pijlerid");
|
||||||
|
$activiteiten = $this->Modpartactiviteiten->get_taaklijst($pijlerID);
|
||||||
|
echo json_encode(array("activiteiten" => $activiteiten));
|
||||||
|
}
|
||||||
|
public function getActiviteitenPerDag(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->clean_input("pijlerID");
|
||||||
|
$dag = $this->clean_input('dag');
|
||||||
|
$maand = $this->clean_input('maand');
|
||||||
|
$jaar = $this->clean_input('jaar');
|
||||||
|
$activiteiten = $this->Modpartactiviteiten->get_taaklijst($pijlerID, $dag, $maand, $jaar);
|
||||||
|
echo json_encode(array('activiteiten' => $activiteiten));
|
||||||
|
}
|
||||||
|
public function getItems(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->clean_input("PijlerID");
|
||||||
|
$activiteitID = $this->clean_input("ActiviteitID");
|
||||||
|
$maand = $this->clean_input("Maand");
|
||||||
|
$jaar = $this->clean_input("Jaar");
|
||||||
|
$items = $this->ModAgenda->get_items($pijlerID, $activiteitID, $maand, $jaar);
|
||||||
|
echo json_encode(array('items' => $items));
|
||||||
|
}
|
||||||
|
public function saveEvent(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$eventID = $this->clean_input("id");
|
||||||
|
$data = array("toegang" => $this->clean_input('toegang') ,
|
||||||
|
'wijzig' => $this->clean_input('wijzig') ,
|
||||||
|
'pijlerID' => $this->clean_input('pijlerID') ,
|
||||||
|
'activiteitID' => $this->clean_input('activiteitID') ,
|
||||||
|
'colorcode' => $this->clean_input('color') ,
|
||||||
|
'startUur' => $this->clean_input('startUur') ,
|
||||||
|
'startMinuut' => $this->clean_input('startMinuut') ,
|
||||||
|
'eindUur' => $this->clean_input('eindUur') ,
|
||||||
|
'eindMinuut' => $this->clean_input('eindMinuut') ,
|
||||||
|
'titel' => $this->clean_input('titel') ,
|
||||||
|
'opmerking' => $this->clean_input('opmerking') ,
|
||||||
|
);
|
||||||
|
$this->ModAgenda->update_record($data, $eventID);
|
||||||
|
}
|
||||||
|
function newAfspraak(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$data = array( "orgid" => $this->globorgid,
|
||||||
|
"owner" => $this->userid,
|
||||||
|
'dag' => $this->clean_input('dag'),
|
||||||
|
'maand' => $this->clean_input('maand'),
|
||||||
|
'jaar' => $this->clean_input('jaar'),
|
||||||
|
"toegang" => $this->clean_input('toegang') ,
|
||||||
|
'wijzig' => $this->clean_input('wijzig') ,
|
||||||
|
'pijlerID' => $this->clean_input('pijlerID') ,
|
||||||
|
'activiteitID' => $this->clean_input('activiteitID') ,
|
||||||
|
'colorcode' => $this->clean_input('colorcode') ,
|
||||||
|
'startUur' => $this->clean_input('startUur') ,
|
||||||
|
'startMinuut' => $this->clean_input('startMinuut') ,
|
||||||
|
'eindUur' => $this->clean_input('eindUur') ,
|
||||||
|
'eindMinuut' => $this->clean_input('eindMinuut') ,
|
||||||
|
'titel' => $this->clean_input('titel') ,
|
||||||
|
'opmerking' => $this->clean_input('opmerking') ,
|
||||||
|
);
|
||||||
|
$newID = $this->ModAgenda->insert_record($data);
|
||||||
|
$newItem = $this->ModAgenda->get_record_by_id($newID);
|
||||||
|
$newItem->schrijf = 1;
|
||||||
|
echo json_encode(array("items" =>$newItem));
|
||||||
|
}
|
||||||
|
function deleteAfspraak(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$id = $this->clean_input("itemid");
|
||||||
|
$this->ModAgenda->delete_record($id);
|
||||||
|
}
|
||||||
|
function getMinDag(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->uri->segment(4);
|
||||||
|
$mindag = $this->ModAgenda->find_min_dag($pijlerID);
|
||||||
|
echo json_encode($mindag);
|
||||||
|
}
|
||||||
|
function getMaxDag(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->uri->segment(4);
|
||||||
|
$maxdag = $this->ModAgenda->find_max_dag($pijlerID);
|
||||||
|
echo json_encode($maxdag);
|
||||||
|
}
|
||||||
|
function getMinMaxDagActiviteit(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$pijlerID = $this->uri->segment(4);
|
||||||
|
$actID = $this->uri->segment(5);
|
||||||
|
$minmaxdag = $this->ModAgenda->find_minmax_dag($pijlerID,$actID);
|
||||||
|
echo json_encode($minmaxdag);
|
||||||
|
}
|
||||||
|
function findEntries(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$where=array("activiteitID" => $actID);
|
||||||
|
$items = $this->ModAgenda->check_for_record($where);
|
||||||
|
echo json_encode($items);
|
||||||
|
}
|
||||||
|
} // einde class Agenda
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of Communicatie
|
||||||
|
*
|
||||||
|
* @author Theo Weijmer
|
||||||
|
* @date juli 22, 2013
|
||||||
|
*
|
||||||
|
* @purpose
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class Communicatie extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( 'ijkpartituur/Mails_model',
|
||||||
|
'ijkpartituur/Mailadresses_model');
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function index(){
|
||||||
|
$this->get_addresses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_email(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$mailid = $this->uri->segment(4);
|
||||||
|
$adressid = $this->uri->segment(5);
|
||||||
|
$adress = $this->clean_input('adress');
|
||||||
|
|
||||||
|
$data = array( 'mailadress_adress' => $adress ,
|
||||||
|
'mailadress_organisatie_id' => $this->globorgid ,
|
||||||
|
'mailadress_mail_id' => $mailid );
|
||||||
|
|
||||||
|
$this->Mailadresses_model->save_record($data, $adressid);
|
||||||
|
|
||||||
|
$this->get_addresses();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete_adress(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$adressid = $this->uri->segment(4);
|
||||||
|
$this->Mailadresses_model->delete_record($adressid);
|
||||||
|
$this->get_addresses();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_addresses(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$mails = $this->Mails_model->get_details(array("(SELECT {$this->userrole} & mail_level) !=" => 0));
|
||||||
|
|
||||||
|
$data = array('mails'=>$mails);
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,359 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of Documents
|
||||||
|
*
|
||||||
|
* @author Theo Weijmer
|
||||||
|
* @date juni 11, 2013
|
||||||
|
*
|
||||||
|
* @purpose
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class Documents extends MY_Controller {
|
||||||
|
|
||||||
|
public $rootpath;
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
if(!$this->userid) return;
|
||||||
|
|
||||||
|
$models = array('ijkpartituur/Documents_model',
|
||||||
|
'ijkpartituur/Modhulpmiddelen',
|
||||||
|
'ijkpartituur/Modhelpdesk',
|
||||||
|
'ijkpartituur/Doctypes_model',
|
||||||
|
'ijkpartituur/Doctags_model',
|
||||||
|
'ijkpartituur/Tags_model',
|
||||||
|
'ijkpartituur/ModReferenties');
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->rootpath = str_replace('/public','',$_SERVER['DOCUMENT_ROOT']);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function index(){
|
||||||
|
$doctypes = $this->Doctypes_model->get_details();
|
||||||
|
|
||||||
|
echo json_encode(array('doctypes'=>$doctypes));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_documents(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$hulpid = $this->uri->segment(4);
|
||||||
|
$upload = $this->check_upload($hulpid);
|
||||||
|
$documents = $this->Documents_model->get_details(array('document_hulpmiddel_id'=>$hulpid));
|
||||||
|
$documentid = $nontags = $selectedtags = FALSE;
|
||||||
|
if($documents && count($documents)==1){
|
||||||
|
$documentid = $documents[0]->id;
|
||||||
|
$selectedtags = $this->Doctags_model->get_selected_tags($documentid);
|
||||||
|
$nontags = $this->Doctags_model->get_non_selected_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array( 'documents' => $documents ,
|
||||||
|
'upload' => $upload ,
|
||||||
|
'selectedtags' => $selectedtags,
|
||||||
|
'nontags' => $nontags ,
|
||||||
|
'documentid' => $documentid );
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function upload_document(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$hulpid = $this->uri->segment(4);
|
||||||
|
$doctypeid = $this->uri->segment(5);
|
||||||
|
$docid = $this->uri->segment(6);
|
||||||
|
if(!$this->check_upload($docid) && $docid){
|
||||||
|
$result = array('errors'=>json_encode('<p>u heeft geen rechten om documenten/dit document te uploaden</p>'));
|
||||||
|
}else{
|
||||||
|
$documentname = $this->input->post('name-upload-document');
|
||||||
|
// $config['upload_path'] = $this->rootpath.'/tmp_uploads/';
|
||||||
|
$config['upload_path'] = $this->partituurUpload;
|
||||||
|
$config['allowed_types'] = 'doc|docx|jpg|gif|png|pdf|txt|ppt|pptx';
|
||||||
|
$config['max_size'] = '10000';
|
||||||
|
$this->load->library('upload', $config);
|
||||||
|
|
||||||
|
$uploadresult = $this->upload->do_upload();
|
||||||
|
|
||||||
|
if (!$uploadresult && !$docid){
|
||||||
|
$result = array('errors'=>json_encode($config['upload_path']));
|
||||||
|
//$result = array('errors'=>json_encode($this->upload->display_errors()));
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'document_name' => $documentname ,
|
||||||
|
'document_doctype_id' => $doctypeid ,
|
||||||
|
'document_hulpmiddel_id' => $hulpid );
|
||||||
|
|
||||||
|
if(!$uploadresult){
|
||||||
|
$result = array('errors'=>json_encode('<p>de gegevens zijn opgeslagen</p>'));
|
||||||
|
}else{
|
||||||
|
//check if there is already a file (docid!=0) unlink the old file
|
||||||
|
if($docid){
|
||||||
|
$file = $this->Documents_model->get_record_by_id($docid);
|
||||||
|
|
||||||
|
unlink($this->partituurSchatkist.$file->document_filename.$file->document_extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array('errors'=>json_encode('<p>uw bestand is succesvol geupload</p>'));
|
||||||
|
|
||||||
|
$document = $this->upload->data();
|
||||||
|
|
||||||
|
$this->load->helper('string');
|
||||||
|
$newname = sha1(random_string('alnum', 16));
|
||||||
|
|
||||||
|
$data['document_original'] = $document['file_name'];
|
||||||
|
$data['document_extension'] = $document['file_ext'] ;
|
||||||
|
$data['document_size'] = $document['file_size'];
|
||||||
|
$data['document_filename'] = $newname ;
|
||||||
|
|
||||||
|
$oldname = $this->partituurUpload.$document['file_name'];
|
||||||
|
$newname = $this->partituurSchatkist.$newname.$document['file_ext'];
|
||||||
|
|
||||||
|
rename($oldname, $newname);
|
||||||
|
}
|
||||||
|
$this->Documents_model->save_record($data, $docid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->load->view('ijkpartituur/popups/uploadresult_view', $result);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function download_document(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$this->load->helper('download');
|
||||||
|
$docid = $this->uri->segment(4);
|
||||||
|
$original='test';
|
||||||
|
|
||||||
|
if ($docid) {
|
||||||
|
$file = $this->Documents_model->get_record_by_id($docid);
|
||||||
|
$original = $file->document_original;
|
||||||
|
$data = file_get_contents($this->partituurSchatkist.$file->document_filename.$file->document_extension);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$info = $this->Modhelpdesk->get_helpdesk();
|
||||||
|
$filenaam = $this->rootpath.'/documents/'.$info->handleiding;
|
||||||
|
$original = "handleiding.pdf";
|
||||||
|
$data= file_get_contents($filenaam);
|
||||||
|
};
|
||||||
|
force_download($original, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function downloadHandleiding(){
|
||||||
|
$this->load->helper('download');
|
||||||
|
$info = $this->Modhelpdesk->get_helpdesk();
|
||||||
|
$filenaam = $this->rootpath.'/'.$info->handleiding;
|
||||||
|
$data = file_get_contents($filenaam);
|
||||||
|
force_download("handleidingPartituur", $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete_document(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0 ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$docid = $this->uri->segment(4);
|
||||||
|
$document = $this->Documents_model->get_record_by_id($docid);
|
||||||
|
|
||||||
|
if($this->check_upload($document->document_hulpmiddel_id)){
|
||||||
|
$this->Doctags_model->delete_record_where(array('doctag_document_id'=>$docid));
|
||||||
|
$this->Documents_model->delete_record($docid);
|
||||||
|
|
||||||
|
$filename = $document->document_filename.$document->document_extension;
|
||||||
|
unlink($this->rootpath.'/schatkist/'.$filename);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_tags(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$documentid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$this->send_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save_tag(){
|
||||||
|
$documentid = $this->uri->segment(4);
|
||||||
|
$tagname = $this->clean_input('tagname');
|
||||||
|
|
||||||
|
$tag = $this->Tags_model->get_records_where(array('UCASE(tag_name)'=>strtoupper($tagname)), TRUE);
|
||||||
|
|
||||||
|
if(!$tag){
|
||||||
|
$newtag = $this->Tags_model->insert_record(array('tag_name'=>$tagname));
|
||||||
|
$tag = $this->Tags_model->get_record_by_id($newtag);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array('doctag_tag_id'=>$tag->id, 'doctag_document_id'=>$documentid);
|
||||||
|
if(!$this->Doctags_model->check_for_record($data)) $this->Doctags_model->insert_record($data);
|
||||||
|
|
||||||
|
$this->send_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add_tags(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) return;
|
||||||
|
$documentid = $this->uri->segment(4);
|
||||||
|
$newtags = $this->clean_input('newtags');
|
||||||
|
|
||||||
|
if($newtags){
|
||||||
|
foreach($newtags as $newtag){
|
||||||
|
$data = array('doctag_document_id'=>$documentid, 'doctag_tag_id'=>$newtag);
|
||||||
|
if(!$this->Doctags_model->check_for_record($data)){
|
||||||
|
$this->Doctags_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->send_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function remove_tag(){
|
||||||
|
$documentid = $this->uri->segment(4);
|
||||||
|
$tags = $this->clean_input('newtags');
|
||||||
|
|
||||||
|
if($tags){
|
||||||
|
foreach($tags as $tag){
|
||||||
|
$this->Doctags_model->delete_record_where(array('doctag_tag_id'=>$tag));
|
||||||
|
$this->Tags_model->delete_record($tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->send_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function remove_tags(){
|
||||||
|
$documentid = $this->uri->segment(3);
|
||||||
|
$removetags = $this->clean_input('removetags');
|
||||||
|
|
||||||
|
if($removetags){
|
||||||
|
foreach($removetags as $removetag){
|
||||||
|
$data = array('doctag_document_id'=>$documentid, 'doctag_tag_id'=>$removetag);
|
||||||
|
$this->Doctags_model->delete_record_where($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->send_tags($documentid);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function send_tags($documentid){
|
||||||
|
$nontags = $this->Doctags_model->get_non_selected_tags($documentid);
|
||||||
|
|
||||||
|
$selectedtags = $this->Doctags_model->get_selected_tags($documentid);
|
||||||
|
|
||||||
|
echo json_encode(array('nontags'=>$nontags, 'selectedtags'=>$selectedtags));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function check_upload($hulpid){
|
||||||
|
if($this->super){
|
||||||
|
return TRUE;
|
||||||
|
}else{
|
||||||
|
$orgid = $this->Modhulpmiddelen->get_record_by_id($hulpid, 'bronID'); // was organisatie-ID
|
||||||
|
if($this->globorgid==$orgid){
|
||||||
|
return 1;
|
||||||
|
}else{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function check_download($docid){
|
||||||
|
if($this->super){
|
||||||
|
return TRUE;
|
||||||
|
}else{
|
||||||
|
$hulpid = $this->Documents_model->get_record_by_id($docid, 'document_hulpmiddel_id');
|
||||||
|
$orgid = $this->Modhulpmiddelen->get_record_by_id($hulpid, 'organisatie_id');
|
||||||
|
if($orgid==1){
|
||||||
|
return TRUE;
|
||||||
|
}elseif($orid==$this->globorgid){
|
||||||
|
return TRUE;
|
||||||
|
}else{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function LSUpload(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$refID = $this->uri->segment(4);
|
||||||
|
$soort = $this->uri->segment(5);
|
||||||
|
|
||||||
|
if(!$this->super){
|
||||||
|
$result = array('errors'=>json_encode('<p>u heeft geen rechten om documenten te uploaden</p>'));
|
||||||
|
}else{
|
||||||
|
$toonnaam = $this->input->post('toonnaam');
|
||||||
|
|
||||||
|
$config['upload_path'] = $this->partituurUpload;
|
||||||
|
$config['allowed_types'] = 'doc|docx|jpg|gif|png|pdf|txt';
|
||||||
|
$config['max_size'] = '10000';
|
||||||
|
$this->load->library('upload', $config);
|
||||||
|
|
||||||
|
$uploadresult = $this->upload->do_upload();
|
||||||
|
|
||||||
|
if (!$uploadresult && !$refID){
|
||||||
|
$result = array('errors'=>json_encode($this->upload->display_errors()));
|
||||||
|
}else{
|
||||||
|
|
||||||
|
if(!$uploadresult){
|
||||||
|
$result = array('errors'=>json_encode('<p>de gegevens zijn opgeslagen</p>'));
|
||||||
|
}else{
|
||||||
|
//check if there is already a file (refID!=0) unlink the old file
|
||||||
|
if($refID){
|
||||||
|
$file = $this->ModReferenties->get_record_by_id($refID);
|
||||||
|
if ($file) {
|
||||||
|
if ($file->hashnaam) {
|
||||||
|
echo "file extension ".$file->doc_extension;
|
||||||
|
if (file_exists($this->rootpath.'/docs/'.$file->hashnaam.$file->doc_extension)) {
|
||||||
|
unlink($this->rootpath.'/docs/'.$file->hashnaam.$file->doc_extension);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array('errors'=>json_encode('<p>Uw bestand is succesvol geupload</p>'));
|
||||||
|
|
||||||
|
$document = $this->upload->data();
|
||||||
|
|
||||||
|
$this->load->helper('string');
|
||||||
|
$newname = sha1(random_string('alnum', 16));
|
||||||
|
|
||||||
|
$data = array( 'naam' => $toonnaam,
|
||||||
|
'id' => $refID,
|
||||||
|
'docnaam' => $document['file_name'],
|
||||||
|
'soort' => $soort,
|
||||||
|
'srtlink' => 'file');
|
||||||
|
|
||||||
|
$data['doc_extension'] = $document['file_ext'];
|
||||||
|
$data['filesize'] = $document['file_size'];
|
||||||
|
$data['hashnaam'] = $newname;
|
||||||
|
|
||||||
|
$oldname = $this->rootpath.'/tmp_uploads/'.$document['file_name'];
|
||||||
|
$newname = $this->rootpath.'/docs/'.$newname.$document['file_ext'];
|
||||||
|
|
||||||
|
rename($oldname, $newname);
|
||||||
|
|
||||||
|
$refID = $this->ModReferenties->save_record($data, $refID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data = array('result' =>$result, 'id'=>$refID );
|
||||||
|
$this->load->view('ijkpartituur/popups/Toonuploadresult', $data) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function LSDownloadDoc(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$this->load->helper('download');
|
||||||
|
$refID= $this->uri->segment(4);
|
||||||
|
$original='test';
|
||||||
|
|
||||||
|
if ($refID) {
|
||||||
|
$file = $this->ModReferenties->get_record_by_id($refID);
|
||||||
|
$original = $file->docnaam;
|
||||||
|
$data = file_get_contents($this->rootpath."/docs/".$file->hashnaam.$file->doc_extension);
|
||||||
|
force_download($original, $data);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Extrainfo extends MY_controller {
|
||||||
|
public $rootpath;
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/ModReferenties','');
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->rootpath = $_SERVER['DOCUMENT_ROOT'];
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
public function getRefs(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
$type = $this->clean_input('soort');
|
||||||
|
$zoek =$this->clean_input("zoek");
|
||||||
|
if ($zoek === 'undefined' ) {$zoek=false ;} ;
|
||||||
|
$refs = $this->ModReferenties->get_refs($type,$zoek);
|
||||||
|
echo json_encode(array('refs' =>$refs,
|
||||||
|
'admin' =>$this->super));
|
||||||
|
}
|
||||||
|
public function newLitRef(){
|
||||||
|
$data["soort"]=$this->uri->segment(4);
|
||||||
|
if ($data["soort"] <= 0 ){ $data["soort"] = 1; }
|
||||||
|
$data["srtlink"]='ext.ref';
|
||||||
|
$newID = $this->ModReferenties->insert_record($data);
|
||||||
|
$ref = $this->ModReferenties->get_record_by_id($newID);
|
||||||
|
echo json_encode($ref);
|
||||||
|
}
|
||||||
|
public function saveRef(){
|
||||||
|
if (!$this->userid) return;
|
||||||
|
|
||||||
|
$id = $this->clean_input("id");
|
||||||
|
$link = $this->clean_input("link");
|
||||||
|
$srtlink = $this->clean_input("srtlink");
|
||||||
|
if ($srtlink == "url") {
|
||||||
|
if ( strpos($link, "http://")=== 0 or strpos($link, "https://") === 0) { }
|
||||||
|
else {$link="http://".$link ;};
|
||||||
|
};
|
||||||
|
$data= array('naam' => $this->input->post("naam"),
|
||||||
|
'link' => $link,
|
||||||
|
'opmerking' => $this->input->post("opmerking"),
|
||||||
|
'srtlink' => $this->input->post("srtlink"));
|
||||||
|
$this->ModReferenties->update_record($data, $id);
|
||||||
|
}
|
||||||
|
public function delRef() {
|
||||||
|
if ($this->Autorisaties_model->check_autorisaties($this->userrole, WRITER) <=0 ) return;
|
||||||
|
$id = $this->uri->segment(4);
|
||||||
|
//als de referentie verwijst naar een document, delete het document
|
||||||
|
$file = $this->ModReferenties->get_record_by_id($id);
|
||||||
|
|
||||||
|
if ($file) {
|
||||||
|
if ($file->hashnaam) {
|
||||||
|
$this->load->helper("file");
|
||||||
|
unlink($this->rootpath.'/docs/'.$file->hashnaam.$file->doc_extension);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
$this->ModReferenties->delete_record($id);
|
||||||
|
}
|
||||||
|
} // einde class Extrainfo
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Fases extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Modfases');
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
function getFases(){
|
||||||
|
$fases = $this->Modfases->get_fases();
|
||||||
|
echo json_encode($fases);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Hulpmiddelen extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Modhulpmiddelen',
|
||||||
|
'ijkpartituur/ModActHulp',
|
||||||
|
'ijkpartituur/ModPartActxHulpmiddel',
|
||||||
|
'ijkpartituur/Documents_model',
|
||||||
|
"ijkpartituur/ModPartpijlers");
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
function getLijst () {
|
||||||
|
$pijlerID = $this->clean_input("pijlerID");
|
||||||
|
$filterType = $this->clean_input("filterType");
|
||||||
|
$filterNaam=$this->clean_input("filterNaam");
|
||||||
|
$lijst = $this->Modhulpmiddelen->get_lijst($pijlerID,$filterType,$filterNaam);
|
||||||
|
if ($lijst) {
|
||||||
|
foreach ($lijst as $item ) {
|
||||||
|
$where=array("hulpID" => $item->id);
|
||||||
|
$item->deletable =!( $this->ModPartActxHulpmiddel->check_for_record($where) );
|
||||||
|
};
|
||||||
|
};
|
||||||
|
echo json_encode($lijst);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMiddelInfo (){
|
||||||
|
$middelID = $this->clean_input("middelID");
|
||||||
|
|
||||||
|
$middelen = $this->Modhulpmiddelen->get_middel($middelID);
|
||||||
|
$activiteiten = $this->ModActHulp->get_act_per_middel($middelID);
|
||||||
|
$documenten = $this->Documents_model->get_details(array('document_hulpmiddel_id'=>$middelID));
|
||||||
|
echo json_encode(array('middelen' => $middelen ,
|
||||||
|
'activiteiten' => $activiteiten ,
|
||||||
|
'documenten' => $documenten ) );
|
||||||
|
}
|
||||||
|
function updateMiddel(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,WRITER) <= 0) return;
|
||||||
|
$middelID = $this->clean_input('id');
|
||||||
|
$data = array("omschrijving" => $this->clean_input('omschrijving'),
|
||||||
|
"opmerkingen" => $this->clean_input("opmerkingen"),
|
||||||
|
"filenaam" => $this->clean_input("filenaam"),
|
||||||
|
"organisatieniveau" => $this->clean_input('type') );
|
||||||
|
|
||||||
|
$this->Modhulpmiddelen->update_record($data,$middelID);
|
||||||
|
}
|
||||||
|
function addHulpmiddel(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,WRITER) <= 0) return;
|
||||||
|
$data=array("omschrijving" => $this->clean_input('omschrijving'),
|
||||||
|
"pijlerID" => $this->clean_input("pijlerID"),
|
||||||
|
"bronID" => $this->globorgid,
|
||||||
|
"organisatieniveau" => $this->clean_input('type') );
|
||||||
|
$newID = $this->Modhulpmiddelen->insert_record($data);
|
||||||
|
$newMiddel = $this->Modhulpmiddelen->get_nieuwe_middel($newID);
|
||||||
|
$newMiddel[0]->deletable=true;
|
||||||
|
echo json_encode($newMiddel);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteHulpmiddel(){
|
||||||
|
//TODO controle op recht op verwijderen en
|
||||||
|
// controle op hulpmiddel = foreign key
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,WRITER) <= 0) return;
|
||||||
|
$hulpID = $this->clean_input("hulpid");
|
||||||
|
$this->Modhulpmiddelen->delete_record($hulpID);
|
||||||
|
}
|
||||||
|
function getAlleHulpmiddelen(){
|
||||||
|
$data=$this->Modhulpmiddelen->get_alle_hulpmiddelen();
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
function getSelectedHulpmiddelen(){
|
||||||
|
$partpijlerID = $this->clean_input("pijlerID");
|
||||||
|
$where = array('id' => $partpijlerID);
|
||||||
|
$pijlerID = $this->ModPartpijlers->get_fieldvalue($where, 'pijlerID');
|
||||||
|
$partActID = $this->clean_input("taakID");
|
||||||
|
$includedhulp = $this->ModPartActxHulpmiddel->get_id_string($partActID);
|
||||||
|
$data = $this->Modhulpmiddelen->get_selected_hulpmiddelen($pijlerID, $includedhulp);
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of Mensactief
|
||||||
|
*
|
||||||
|
* @author Theo Weijmer
|
||||||
|
* @date juli 23, 2013
|
||||||
|
*
|
||||||
|
* @purpose
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class Mensactief extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/ModPartPijlers',
|
||||||
|
'ijkpartituur/Modpartactiviteiten');
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function index(){
|
||||||
|
$pijlers = $this->ModPartPijlers->get_details(array('partituurID'=>$this->partituurid));
|
||||||
|
|
||||||
|
$users = $this->Modpartactiviteiten->set_matrixusers();
|
||||||
|
|
||||||
|
$data = array('users'=>$users, 'pijlers'=>$pijlers);
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Mensen extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Modpartactiviteiten',
|
||||||
|
'shared/Orgusers_model',
|
||||||
|
'ijkpartituur/Modpartactxorgusers');
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMensen(){
|
||||||
|
if(!$this->userid) return;
|
||||||
|
$mensen =$this->Orgusers_model->get_org_users($this->globorgid);
|
||||||
|
if ($mensen) {
|
||||||
|
foreach ($mensen as $mens){
|
||||||
|
$mens->takenC = $this->Modpartactiviteiten->get_activiteiten_per_user($mens->id);
|
||||||
|
$mens->takenU = $this->Modpartactxorgusers->get_activiteiten_per_user($mens->id);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
echo json_encode($mensen);
|
||||||
|
}
|
||||||
|
public function deleteVer(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <= 0) return;
|
||||||
|
$aID = $this->uri->segment(4);
|
||||||
|
$wieID = $this->uri->segment(5);
|
||||||
|
$wat = array('verantwoordelijke' => null);
|
||||||
|
$this->Modpartactiviteiten->update_record($wat, $aID);
|
||||||
|
$mens =$this->Orgusers_model->get_org_user($wieID);
|
||||||
|
$mens->takenC = $this->Modpartactiviteiten->get_activiteiten_per_user($wieID);
|
||||||
|
$mens->takenU = $this->Modpartactxorgusers->get_activiteiten_per_user($wieID);
|
||||||
|
echo json_encode($mens);
|
||||||
|
}
|
||||||
|
public function deleteUit(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <= 0) return;
|
||||||
|
$aID = $this->uri->segment(4);
|
||||||
|
$wieID = $this->uri->segment(5);
|
||||||
|
$where =array('activiteitID' => $aID,
|
||||||
|
'orguserID' =>$wieID);
|
||||||
|
$this->Modpartactxorgusers->delete_record_where($where);
|
||||||
|
$mens = $this->Orgusers_model->get_org_user($wieID);
|
||||||
|
$mens->takenC = $this->Modpartactiviteiten->get_activiteiten_per_user($wieID);
|
||||||
|
$mens->takenU = $this->Modpartactxorgusers->get_activiteiten_per_user($wieID);
|
||||||
|
echo json_encode($mens);
|
||||||
|
}
|
||||||
|
} //einde class Mensen
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Niveaus extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Niveaus_model');
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
function getNiveaus(){
|
||||||
|
$niveaus = $this->Niveaus_model->get_niveaus();
|
||||||
|
echo json_encode($niveaus);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Nivoprofielen extends MY_controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Nivoprofielen_model',
|
||||||
|
'ijkpartituur/Pijlers_model',
|
||||||
|
"ijkpartituur/ModActiviteiten",
|
||||||
|
"ijkpartituur/Versies_model",
|
||||||
|
'ijkpartituur/Niveaus_model');
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->library('monpas/kleurcodes');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNiveaus($versieID=false){
|
||||||
|
if (!$versieID ) { $versieID = $this->globProfielVersieID; };
|
||||||
|
$niveaus = $this->Nivoprofielen_model->get_profielen_niveaus($versieID);
|
||||||
|
return $niveaus;
|
||||||
|
}
|
||||||
|
function getPijlerprofiel(){
|
||||||
|
$nivo = $this->uri->segment(4);
|
||||||
|
$pijlerprofiel=$this->Nivoprofielen_model->get_profielen_profiel($nivo);
|
||||||
|
echo json_encode(array('pijlerprofiel' =>$pijlerprofiel));
|
||||||
|
}
|
||||||
|
function savePijlerProfiel(){
|
||||||
|
$niveauID=$this->input->post('niveauID');
|
||||||
|
$profielArray = $this->input->post("pijlerwaarden");
|
||||||
|
foreach ($profielArray as $profiel){
|
||||||
|
$data =array('niveauID' =>$niveauID,
|
||||||
|
'pijlerID' => $profiel['pijlerID'],
|
||||||
|
'waarde' => $profiel['waarde']);
|
||||||
|
$id = $profiel['profielID'];
|
||||||
|
if ($id == 0){ $this->Nivoprofielen_model->save_record($data,false); }
|
||||||
|
else { $this->Nivoprofielen_model->save_record($data, $id); };
|
||||||
|
}; // for each
|
||||||
|
}
|
||||||
|
function getVersies(){
|
||||||
|
$versies=$this->Versies_model->get_versies();
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
function getPijlers($versieID=false){
|
||||||
|
if (!$versieID) {$versieID = $this->globProfielVersieID;} ;
|
||||||
|
$versieID = 1;
|
||||||
|
|
||||||
|
if ($this->super ) {
|
||||||
|
$naam="gebruikersactiviteiten" ;
|
||||||
|
$pijlernul= array("id" => 0,
|
||||||
|
"volgorde" => 0,
|
||||||
|
"naam" => "Gebruikersactiviteiten/inhouden",
|
||||||
|
"omschrijving" => 'activiteiten aangemaakt door niet-framework gebruikers');
|
||||||
|
$pijlers=$this->Pijlers_model->get_pijlers($versieID);
|
||||||
|
array_push($pijlers, $pijlernul);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$pijlers= array(array("id" => 0,
|
||||||
|
"volgorde" => 0,
|
||||||
|
"naam" => "Eigen activiteiten/inhouden",
|
||||||
|
'omschrijving' => "activiteiten aangemaakt door de gebruikers van de eigen organisatie"));
|
||||||
|
};
|
||||||
|
echo json_encode($pijlers);
|
||||||
|
}
|
||||||
|
function getPijlers2($versieID=false){
|
||||||
|
if (!$versieID) { $versieID = $this->globProfielVersieID;} ;
|
||||||
|
$pijlers=$this->Pijlers_model->get_pijlers($versieID);
|
||||||
|
return $pijlers;
|
||||||
|
}
|
||||||
|
function getActiviteiten(){
|
||||||
|
$pijlerid=$this->uri->segment(4);
|
||||||
|
$activiteiten = $this->Activiteiten_model->get_activiteiten_per_pijler(0,$pijlerid);
|
||||||
|
echo json_encode($activiteiten);
|
||||||
|
}
|
||||||
|
function saveVersion(){
|
||||||
|
$data = $this->clean_input();
|
||||||
|
$vID = $this->clean_input('id');
|
||||||
|
$this->Versies_model->update_record($data, $vID);
|
||||||
|
}
|
||||||
|
function saveNewVersion(){
|
||||||
|
$fromID= -1;
|
||||||
|
$copyJN=true;
|
||||||
|
if($this->uri->segment(3) == 'false') {$copyJN= false; };
|
||||||
|
$data=$this->clean_input();
|
||||||
|
$laatsteVersieID=-1;
|
||||||
|
|
||||||
|
if ($copyJN==true){
|
||||||
|
$laatsteVersieID = $this->Versies_model->get_laatste_record();
|
||||||
|
$where = array("fw_versie" =>$laatsteVersieID);
|
||||||
|
$laatsteOTypen = $this->Niveaus_model->get_last_niveaus($laatsteVersieID);
|
||||||
|
$laatstePijlers = $this->Pijlers_model->get_last_pijlers($laatsteVersieID);
|
||||||
|
}; // if copyjn
|
||||||
|
$newVersieID = $this->Versies_model->insert_record($data);
|
||||||
|
$newVersie = $this->Versies_model->get_record_by_id($newVersieID,false,true);
|
||||||
|
//NU INSERT kopieen
|
||||||
|
if ($copyJN==true){
|
||||||
|
foreach($laatstePijlers as $Pijler){
|
||||||
|
$data = array("volgorde" => $Pijler->volgorde,
|
||||||
|
"naam" => $Pijler->naam,
|
||||||
|
"omschrijving" =>$Pijler->omschrijving,
|
||||||
|
"fw_versie" => $newVersieID,
|
||||||
|
"actief" => 1 );
|
||||||
|
$newID = $this->Pijlers_model->insert_record($data);
|
||||||
|
if ($fromID <=-1) {$fromID=$newID;};
|
||||||
|
$laatsteProfielen = $this->Nivoprofielen_model->get_last_profielen($Pijler->id);
|
||||||
|
foreach($laatsteProfielen as $Profiel){
|
||||||
|
$data = array("niveauID " => $Profiel->niveauID,
|
||||||
|
"pijlerID" => $newID,
|
||||||
|
"waarde" => $Profiel->waarde);
|
||||||
|
$this->Nivoprofielen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}; // for each laatste Pijlers
|
||||||
|
foreach ($laatsteOTypen as $OType){
|
||||||
|
$data=array("nummer" => $OType->nummer,
|
||||||
|
"omschrijving" => $OType->omschrijving,
|
||||||
|
"fw_versie" => $newVersieID,
|
||||||
|
"actief" =>1);
|
||||||
|
$newID = $this->Niveaus_model->insert_record($data);
|
||||||
|
$this->Nivoprofielen_model->update_niveau($OType->id, $newID,$fromID);
|
||||||
|
}; // for each OTypen
|
||||||
|
};
|
||||||
|
echo json_encode(array('newVersie'=>$newVersie));
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteVersion(){
|
||||||
|
if(!$this->Autorisaties_model->check_autorisatie($this->user_role, SUPERUSER) <=0) return;
|
||||||
|
$ID = $this->uri->segment(4);
|
||||||
|
// delete Niveaus
|
||||||
|
$where = array("fw_versie" =>$ID);
|
||||||
|
$this->Niveaus_model->delete_record_where($where);
|
||||||
|
//delete profielen, zoek eerst de pijlers, verwijder dan de profielen
|
||||||
|
$Pijlers =$this->Pijlers_model->get_records_where($where);
|
||||||
|
foreach($Pijlers as $Pijler) {
|
||||||
|
$where= array("pijlerID" =>$Pijler->id);
|
||||||
|
$this->Nivoprofielen_model->delete_record_where($where);
|
||||||
|
}; // foreach
|
||||||
|
$where= array("fw_versie" =>$ID);
|
||||||
|
$this->Pijlers_model->delete_record_where($where);
|
||||||
|
$this->Versies_model->delete_record($ID);
|
||||||
|
}
|
||||||
|
function GetAll(){
|
||||||
|
if(!$this->Autorisaties_model->check_autorisatie($this->user_role, SUPERUSER) <=0) return;
|
||||||
|
|
||||||
|
$versieID = $this->uri->segment(4);
|
||||||
|
$versies='';
|
||||||
|
if ($versieID == 0) {
|
||||||
|
$versies = $this->getVersies();
|
||||||
|
$versieID = $versies[0]->id;
|
||||||
|
};
|
||||||
|
|
||||||
|
$niveaus = $this->getNiveaus($versieID);
|
||||||
|
$pijlers = $this->getPijlers2($versieID);
|
||||||
|
$kleurcodes = $this->kleurcodes->getkleurcodesfromdatabase();
|
||||||
|
echo json_encode(array( 'versies' =>$versies,
|
||||||
|
'niveaus' =>$niveaus,
|
||||||
|
'pijlers' =>$pijlers,
|
||||||
|
"kleurcodes"=> $kleurcodes));
|
||||||
|
}
|
||||||
|
function DeleteNiveaus(){
|
||||||
|
$NiveauID = $this->uri->segment(4);
|
||||||
|
//1. delete pijlerprofielen
|
||||||
|
$where= array("niveauID" =>$NiveauID);
|
||||||
|
$this->Nivoprofielen_model->delete_record_where($where);
|
||||||
|
//2. delete niveau
|
||||||
|
$this->Niveaus_model->delete_record($NiveauID);
|
||||||
|
}
|
||||||
|
function AddNiveau(){
|
||||||
|
$where=array( 'nummer' => $this->clean_input("nummer"),
|
||||||
|
"omschrijving" => $this->clean_input("omschrijving"),
|
||||||
|
"fw_versie" => $this->clean_input("versie"),
|
||||||
|
'actief' => 1);
|
||||||
|
$newID = $this->Niveaus_model->insert_record($where);
|
||||||
|
$newRecord = $this->Niveaus_model->get_record_by_id($newID);
|
||||||
|
echo json_encode($newRecord);
|
||||||
|
}
|
||||||
|
function SaveNiveau(){
|
||||||
|
$id = $this->clean_input("id");
|
||||||
|
$data = array("nummer" => $this->clean_input('nummer'),
|
||||||
|
"omschrijving" => $this->clean_input('omschrijving') );
|
||||||
|
$this->Niveaus_model->update_record($data,$id);
|
||||||
|
}
|
||||||
|
function DeletePijler(){
|
||||||
|
// verwijder eerst het bijbehorende pijlerprofiel
|
||||||
|
// verwijder dan de pijler
|
||||||
|
$niveauID = $this->uri->segment(5);
|
||||||
|
$pijlerID = $this->uri->segment(4);
|
||||||
|
$where =array("niveauID" => $niveauID,
|
||||||
|
"pijlerID" => $pijlerID);
|
||||||
|
$this->Niovprofielen_model->delete_record_where($where);
|
||||||
|
$this->Pijlers_model->delete_record($pijlerID);
|
||||||
|
}
|
||||||
|
function SavePIJler(){
|
||||||
|
$id = $this->input->post("id");
|
||||||
|
$data=array('volgorde' =>$this->clean_input("volgorde"),
|
||||||
|
'naam' => $this->clean_input("naam"));
|
||||||
|
$this->Pijlers_model->update_record($data, $id);
|
||||||
|
}
|
||||||
|
function SaveProfiel(){
|
||||||
|
$id = $this->input->post("id");
|
||||||
|
$data=array('waarde' =>$this->input->post("waarde") );
|
||||||
|
$this->Nivoprofielen_model->update_record($data, $id);
|
||||||
|
}
|
||||||
|
function AddPijler(){
|
||||||
|
// add de pijler en add dan, indien nodig het rocrd voor profiel
|
||||||
|
$where=array( 'volgorde' => $this->clean_input("volgorde"),
|
||||||
|
"naam" => $this->clean_input("pijlernaam"),
|
||||||
|
"fw_versie" => $this->clean_input("versie"));
|
||||||
|
$newID = $this->Pijlers_model->insert_record($where);
|
||||||
|
$newRecord = $this->Pijlers_model->get_record_by_id($newID);
|
||||||
|
if ($this->input->post("niveauID") > 0){
|
||||||
|
$where=array("niveauID" => $this->input->post("niveauID" ),
|
||||||
|
"pijlerID" => $newID,
|
||||||
|
'waarde ' => 1);
|
||||||
|
$newProfID = $this->Nivoprofielen_model->insert_record($where);
|
||||||
|
$newRecord->profielID = $newProfID;
|
||||||
|
};
|
||||||
|
echo json_encode($newRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,491 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Partituur extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/Autorisaties_model',
|
||||||
|
'ijkpartituur/Partituurs_model',
|
||||||
|
'shared/Users_model',
|
||||||
|
'ijkpartituur/Eigenpijlers_model',
|
||||||
|
'ijkpartituur/ModPartPijlers',
|
||||||
|
'ijkpartituur/Niveaus_model',
|
||||||
|
'ijkpartituur/Pages_model',
|
||||||
|
'ijkpartituur/Eigenpijlers_model',
|
||||||
|
'ijkpartituur/Part_eigenpijlers_model',
|
||||||
|
'ijkpartituur/Nivoprofielen_model',
|
||||||
|
'ijkpartituur/ModPijlers',
|
||||||
|
"ijkpartituur/Modpartactiviteiten",
|
||||||
|
'ijkpartituur/ModPartEigenActiviteiten',
|
||||||
|
'ijkpartituur/ModRuweScores',
|
||||||
|
'ijkpartituur/Modhelpdesk',
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Wenssituaties_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->library('monpas/kleurcodes');
|
||||||
|
if(!$this->userid) return;
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Index Page for this controller.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
|
||||||
|
$partituur = $this->get_active_partituur($this->globorgid);
|
||||||
|
$profielen = $this->get_profielen();
|
||||||
|
$medewerkers = $this->Users_model->get_users_by_organisatie($this->globorgid);
|
||||||
|
$schoolmeterpijlers = $this->ModPijlers->get_pijlers($this->globProfielVersieID);
|
||||||
|
$ExistsAct = false;
|
||||||
|
$magNieuw = $this->writer;
|
||||||
|
$isactievepart = false;
|
||||||
|
if(!$partituur){
|
||||||
|
//TODO: procedure om een nieuwe partituur aan te maken middels koppeling of schakelprogramma
|
||||||
|
//echo json_encode(array('status'=>FALSE));
|
||||||
|
//return;
|
||||||
|
|
||||||
|
if ($this->globorgid == SYSTEM){$status= TRUE;}
|
||||||
|
else { $status=FALSE;}
|
||||||
|
$partituurID='';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$status = TRUE;
|
||||||
|
$partituurID=$partituur->id;
|
||||||
|
$where=array('partituurID' => $partituur->id);
|
||||||
|
$ExistsAct = $this->Modpartactiviteiten->check_for_record($where);
|
||||||
|
$isactievepart = $partituur->actief;
|
||||||
|
|
||||||
|
}
|
||||||
|
$mes1=$this->lang->line("mes-geenactievepartituur");
|
||||||
|
$mes2=$this->lang->line("mes-geenrechten");
|
||||||
|
$mes3=$this->lang->line('mes-ukuntnietverder');
|
||||||
|
$mes4=$this->lang->line('mes-gegevensinvullen');
|
||||||
|
$mes5=$this->lang->line('mes-startdatumvooreinddatum');
|
||||||
|
$kleuren = $this->kleurcodes->getkleurcodesfromdatabase();
|
||||||
|
|
||||||
|
echo json_encode(array('status' => $status ,
|
||||||
|
'partituurID' => $partituurID,
|
||||||
|
'profielen' => $profielen,
|
||||||
|
"schoolmeterpijlers" => $schoolmeterpijlers,
|
||||||
|
'medewerkers' => $medewerkers,
|
||||||
|
'write' => $this->writer,
|
||||||
|
'allowDelete' => !$ExistsAct,
|
||||||
|
'magNieuw' =>$magNieuw,
|
||||||
|
'isactievepart' =>$isactievepart,
|
||||||
|
'mes1' =>$mes1,
|
||||||
|
'mes2' =>$mes2,
|
||||||
|
'mes3' =>$mes3,
|
||||||
|
'mes4' =>$mes4,
|
||||||
|
'mes5' =>$mes5,
|
||||||
|
'mes6' =>$this->lang->line('mes-startdatumaanpassen'),
|
||||||
|
'mes7' =>$this->lang->line('mes-einddatumaanpassen') ,
|
||||||
|
'mes8' =>$this->lang->line('mes-startdatuminvullen' ),
|
||||||
|
'mes9' =>$this->lang->line('mes-einddatuminvullen'),
|
||||||
|
'mes10' =>$this->lang->line('mes-geentoegang'),
|
||||||
|
'mes11' =>$this->lang->line('mes-heelgetalinvullen'),
|
||||||
|
'mes12' =>$this->lang->line('mes-nieuwenaam'),
|
||||||
|
'mes13' =>$this->lang->line('mes-weetuzekerpartituur'),
|
||||||
|
'mes14' =>$this->lang->line('mes-geengegevenswijzigen'),
|
||||||
|
'mes15' =>$this->lang->line('mes-emailvervangen'),
|
||||||
|
'mes16' =>$this->lang->line('mes-weetuzekerpartituurverwijderen'),
|
||||||
|
'lbl1' =>$this->lang->line('lbl-partituurnaam'),
|
||||||
|
'lbl2' =>$this->lang->line('lbl-startdatum'),
|
||||||
|
'lbl3' =>$this->lang->line('lbl-einddatum'),
|
||||||
|
'lbl4' =>$this->lang->line('lbl-scorevoor'),
|
||||||
|
'lblja' =>$this->lang->line('lbl-ja'),
|
||||||
|
'lblnee' =>$this->lang->line('lbl-nee'),
|
||||||
|
'kleuren' =>$kleuren
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function WhichPagina(){
|
||||||
|
if ($this->partituurid){
|
||||||
|
$where=array("id" => $this->partituurid);
|
||||||
|
$partituur = $this->Partituurs_model->get_fieldvalue($where, 'partituur_actief');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$where = array('partituur_organisatie_id'=>$this->globorgid, 'partituur_actief'=>1);
|
||||||
|
$partituur = $this->Partituurs_model->get_single_details($where);
|
||||||
|
}
|
||||||
|
if ($partituur) {
|
||||||
|
$ans = 3;
|
||||||
|
}else{
|
||||||
|
$ans = 2;
|
||||||
|
// set het menu
|
||||||
|
};
|
||||||
|
$systemyesno = 0;
|
||||||
|
if ($this->globorgid == SYSTEM) {$systemyesno = 1;};
|
||||||
|
echo json_encode(array("pagina" =>$ans,
|
||||||
|
"partID" =>$this->partituurid,
|
||||||
|
"systemyesno" => $systemyesno)) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_submenu(){
|
||||||
|
$menu = $this->Pages_model->get_usermenu_ls($this->userrole,0);
|
||||||
|
echo json_encode(array('menu'=>$menu));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function check_session(){
|
||||||
|
echo json_encode(array('session'=>$this->userid));
|
||||||
|
}
|
||||||
|
public function helpdeskinfo(){
|
||||||
|
$info = $this->Modhelpdesk->get_helpdesk();
|
||||||
|
echo json_encode($info);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function resetVars (){
|
||||||
|
$partituurID = $this->uri->segment(4);
|
||||||
|
$where = array('partituurID' => $partituurID);
|
||||||
|
$ExistsAct = $this->Modpartactiviteiten->check_for_record($where);
|
||||||
|
$kosten = $this->Modpartactiviteiten->get_sum_kosten($partituurID);
|
||||||
|
$gereed = $this->Modpartactiviteiten->get_gem_gereed($partituurID);
|
||||||
|
$where =array("partituurID" =>$partituurID);
|
||||||
|
$num =$this->Modpartactiviteiten->check_for_record($where);
|
||||||
|
$allowchange = !$num;
|
||||||
|
$num = $this->ModPartEigenActiviteiten->check_for_record($where);
|
||||||
|
if ($num) {$allowchange = false;};
|
||||||
|
echo json_encode(array( "allowDelete" => !$ExistsAct,
|
||||||
|
'allowChange' =>$allowchange,
|
||||||
|
"kosten" => $kosten,
|
||||||
|
"gereed" => $gereed
|
||||||
|
));
|
||||||
|
}
|
||||||
|
public function getPartituurActief(){
|
||||||
|
$partituurid = $this->uri->segment(4);
|
||||||
|
$actiefJN = 0;
|
||||||
|
if ($partituurid > 0) {
|
||||||
|
$where=array("id" =>$partituurid);
|
||||||
|
$actiefJN = $this->Partituurs_model->get_fieldvalue ($where, 'partituur_actief');
|
||||||
|
};
|
||||||
|
if ($this->globorgid == SYSTEM){$actiefJN = 2;}
|
||||||
|
echo json_encode($actiefJN);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_partituur(){
|
||||||
|
$partituurid= $this->uri->segment(4);
|
||||||
|
$data['status'] = FALSE;
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
$data['status'] = TRUE;
|
||||||
|
$data['write'] = $this->Autorisaties_model->check_partituur_access($partituurid, 2);
|
||||||
|
|
||||||
|
$data['partituur'] = $this->Partituurs_model->get_single_details(array('id'=>$partituurid));
|
||||||
|
$data['magnieuw'] =$data['write'];
|
||||||
|
if (! $data['partituur']->actief) {$data['write'] = false;};
|
||||||
|
$data['isactievepart'] =$data['partituur']->actief;
|
||||||
|
$where =array("partituurID" =>$partituurid);
|
||||||
|
$num =$this->Modpartactiviteiten->check_for_record($where);
|
||||||
|
$data['allowchange'] = !$num;
|
||||||
|
$num = $this->ModPartEigenActiviteiten->check_for_record($where);
|
||||||
|
if ($num) {$data['allowchange'] = false;};
|
||||||
|
$data['partituur']->kosten = $this->Modpartactiviteiten->get_sum_kosten($partituurid);
|
||||||
|
$data['partituur']->gereed = $this->Modpartactiviteiten->get_gem_gereed($partituurid);
|
||||||
|
$data['pijlers'] = $this->ModPartPijlers->get_joined_details($partituurid);
|
||||||
|
$data['partituren'] = $this->Partituurs_model->get_details(array('partituur_organisatie_id'=>$this->globorgid));
|
||||||
|
$data['ruwescores'] =$this->ModRuweScores->get_scores($partituurid);
|
||||||
|
}
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// public function get_ruwe_sopscore(){
|
||||||
|
// $url = 'http://www.framework-ed.nl/schakel/profiel_search.asp?School_ID=2908';
|
||||||
|
// $curl = curl_init();
|
||||||
|
|
||||||
|
// curl_setopt_array($curl, array(
|
||||||
|
// CURLOPT_RETURNTRANSFER => 1,
|
||||||
|
// CURLOPT_URL => $url
|
||||||
|
// ));
|
||||||
|
|
||||||
|
// $ruwescore = curl_exec($curl);
|
||||||
|
|
||||||
|
// $scores = explode('[', $ruwescore);
|
||||||
|
// $score = '['.$scores[1];
|
||||||
|
|
||||||
|
// curl_close($curl);
|
||||||
|
|
||||||
|
// echo $score;
|
||||||
|
// }
|
||||||
|
|
||||||
|
function get_partituren(){
|
||||||
|
$data['partituren'] = $this->Partituurs_model->get_details(array('partituur_organisatie_id'=>$this->globorgid));
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
public function get_unused_pijlers(){
|
||||||
|
$partID = $this->uri->segment(3);
|
||||||
|
$pijlers = $this->Eigenpijlers_model->get_pijlers_not_in_partituur($this->globorgid, $partID);
|
||||||
|
echo json_encode(array("unusedpijlers"=>$pijlers));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function save_profiel(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,WRITER) <=0) return;
|
||||||
|
$status = FALSE;
|
||||||
|
$partituurID= $this->clean_input("partituurID");
|
||||||
|
$profielen = $this->clean_input('profiel');
|
||||||
|
if($profielen){
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurID, 1)){
|
||||||
|
$status = TRUE;
|
||||||
|
foreach($profielen as $profiel){
|
||||||
|
$pijler = $this->ModPartPijlers->get_record_by_id($profiel['id']);
|
||||||
|
if($profiel['huidig']!=$pijler->huidigniveau || $profiel['gewenst']!=$pijler->gewenstniveau){
|
||||||
|
$data = array( 'huidigniveau' => $profiel['huidig'] ,
|
||||||
|
'gewenstniveau' => $profiel['gewenst'] );
|
||||||
|
$this->ModPartPijlers->update_record($data, $profiel['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array('status'=>$status));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_standaard() {
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$partituurid= $this->uri->segment(5);
|
||||||
|
|
||||||
|
$status = FALSE;
|
||||||
|
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
$status = TRUE;
|
||||||
|
$standaards = $this->Nivoprofielen_model->get_records_where(array('niveauID'=>$profielid));
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode(array('status'=>$status, 'standaards'=>$standaards));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function opslaan_pleider(){
|
||||||
|
$partituurid= $this->clean_input('partituurID');
|
||||||
|
$pleiderid = $this->clean_input('pleiderID');
|
||||||
|
|
||||||
|
$status = FALSE;
|
||||||
|
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
$status = TRUE;
|
||||||
|
$email = $this->Users_model->get_record_by_id($pleiderid, 'email',true);
|
||||||
|
|
||||||
|
$data = array('partituur_projectleider_id'=>$pleiderid);
|
||||||
|
$this->Partituurs_model->update_record($data, $partituurid);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(array("email"=>$email, "status"=>$status));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function opslaan_email(){
|
||||||
|
$status = FALSE;
|
||||||
|
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
$status = TRUE;
|
||||||
|
$partituurid= $this->clean_input('partituurID');
|
||||||
|
$email = $this->clean_input('email');
|
||||||
|
|
||||||
|
$data = array('partituur_email'=>$email);
|
||||||
|
$this->Partituurs_model->update_record($data, $partituurid);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(array('status'=>$status));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function opslaan_dates(){
|
||||||
|
$status = FALSE;
|
||||||
|
$errorstr ='';
|
||||||
|
$partituurid= $this->clean_input('partituurID');
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
|
||||||
|
$start = date2mysql($this->clean_input('vandatum'));
|
||||||
|
$eind = date2mysql($this->clean_input('tmdatum'));
|
||||||
|
// check of de nieuwe data kunnen, geven pijlerdata
|
||||||
|
$MinMax = $this->ModPartPijlers->get_minmax_dag($partituurid);
|
||||||
|
if ($MinMax[0]->mindag < $start) {
|
||||||
|
$errorstr = 'startdatum moet kleiner of gelijk aan '.mysql2date($MinMax[0]->mindag).' zijn;';
|
||||||
|
$start = $MinMax[0]->mindag; };
|
||||||
|
|
||||||
|
if ($MinMax[0]->maxdag > $eind){
|
||||||
|
$errorstr .= ' einddatum moet groter of gelijk aan '.mysql2date($MinMax[0]->maxdag).' zijn.';
|
||||||
|
$eind = $MinMax[0]->maxdag; };
|
||||||
|
|
||||||
|
$data = array('partituur_start'=>$start, 'partituur_eind'=>$eind);
|
||||||
|
$this->Partituurs_model->update_record($data, $partituurid);
|
||||||
|
echo json_encode(array('start' => mysql2date($start),
|
||||||
|
'eind' => mysql2date($eind),
|
||||||
|
'errorstr' => $errorstr));
|
||||||
|
}
|
||||||
|
else { echo json_encode(false); };
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_new_eigenpijler(){
|
||||||
|
$status = $eigenpijlers = FALSE;
|
||||||
|
$partituurid= $this->clean_input('partituurid');
|
||||||
|
if($this->Autorisaties_model->check_partituur_access($partituurid, 1)){
|
||||||
|
$status = TRUE;
|
||||||
|
$pijlernaam = $this->clean_input('pijlernaam');
|
||||||
|
$data = array('eigenpijler_naam'=>$pijlernaam, 'orgID'=>$this->globorgid);
|
||||||
|
$newID = $this->Eigenpijlers_model->insert_record($data);
|
||||||
|
$eigenpijlers = $this->Eigenpijlers_model->get_pijlers_not_in_partituur($this->globorgid, $partituurid);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(array('status'=>$status, 'eigenpijlers'=>$eigenpijlers));
|
||||||
|
}
|
||||||
|
public function insert_eigen_pijlers(){
|
||||||
|
$IDlijst = $this->clean_input('insertpijlerIDs');
|
||||||
|
$partID = $this->clean_input('partituurID');
|
||||||
|
foreach ($IDlijst as $newID) {
|
||||||
|
$data= array("partituurID" => $partID,
|
||||||
|
"eigenpijlerID" => $newID);
|
||||||
|
$this->Part_eigenpijlers_model->insert_record($data);
|
||||||
|
}
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
private function get_active_partituur($orgid ){
|
||||||
|
$where = array('partituur_organisatie_id'=>$orgid, 'partituur_actief'=>1);
|
||||||
|
$partituur = $this->Partituurs_model->get_single_details($where);
|
||||||
|
return $partituur;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_profielen(){
|
||||||
|
$profielen = $this->Niveaus_model->get_details(array('actief'=>1, 'fw_versie' =>$this->globProfielVersieID));
|
||||||
|
return $profielen;
|
||||||
|
}
|
||||||
|
public function getActievePartituur(){
|
||||||
|
$where=array("partituur_organisatie_id" =>$this->globorgid,
|
||||||
|
"partituur_actief" => 1);
|
||||||
|
$partituur = $this->Partituurs_model->get_records_where($where,TRUE);
|
||||||
|
echo json_encode($partituur);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// del_pijlers zorgt dat geselecteerde eigen pijler binnen de partituur worden verwijderd. De eigen pijlers worden dus niet uit tb_eigenpijlers verwijderd.
|
||||||
|
|
||||||
|
function del_pijlers(){
|
||||||
|
//del pijlers krijgt een array van IDs van (eigen) pijlers die deleted
|
||||||
|
//moeten worden. als aan een pijler geen activiteiten oid hangen, mag de pijler uit de db verwijderd worden.
|
||||||
|
// anders hoeft er, wat betreft de db niets met de pijler te gebeuren
|
||||||
|
//mag succes of failure teruggeven
|
||||||
|
$delIDs = $this->input->post("eigenPijlerIds");
|
||||||
|
foreach ($delIDs as $delID){
|
||||||
|
$this->Part_eigenpijlers_model->delete_record($delID);
|
||||||
|
}
|
||||||
|
echo json_encode("true");
|
||||||
|
}
|
||||||
|
function del_eigen_pijlers(){
|
||||||
|
// del eigen pijlers moet de eigen pijlers daadwerkelijk verwijderen.
|
||||||
|
//in de function del_pijlers worden de pijlers uit de partituur verwijderd
|
||||||
|
// deze functie verwijderd de eigenpijlers dus uit de db
|
||||||
|
// dit mag alleen als de pijler niet gebruikt wordt in een partituur
|
||||||
|
$delIDs = $this->input->post('eigenPijlerIds');
|
||||||
|
$partID = $this->input->post('partituurID');
|
||||||
|
foreach($delIDs as $delID){
|
||||||
|
$where=array('eigenpijlerID' =>$delID);
|
||||||
|
if($this->Part_eigenpijlers_model->get_result_count($where) <= 0){$this->Eigenpijlers_model->delete_record($delID) ;} ;
|
||||||
|
};
|
||||||
|
// haal de resterende eigenpijlers op en return deze
|
||||||
|
$eigenpijlers= $this->Eigenpijlers_model->get_pijlers_not_in_partituur($this->globorgid, $partID);
|
||||||
|
echo json_encode($eigenpijlers);
|
||||||
|
}
|
||||||
|
function del_partituur(){
|
||||||
|
// moet de na delete meest recente partituur id teruggeven of -1
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) return;
|
||||||
|
$partituurID=$this->uri->segment(4);
|
||||||
|
// delete pijlers in partituur
|
||||||
|
// als er activiteiten zijn mag de partiuur niet verwijderd worden.
|
||||||
|
$where = array("partituurID" => $partituurID);
|
||||||
|
$ExistsAct = $this->Modpartactiviteiten->check_for_record($where);
|
||||||
|
if ($ExistsAct) {
|
||||||
|
echo json_encode(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->ModPartPijlers->delete_record_where(array("partituurID" =>$partituurID));
|
||||||
|
$this->Partituurs_model->delete_record($partituurID);
|
||||||
|
$activeID=$this->get_active_partituur($this->globorgid);
|
||||||
|
echo json_encode($activeID);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function getscores(){
|
||||||
|
$ovid = $this->clean_input("ovid");
|
||||||
|
$scores = $this->Ijkpunten_model->getscores($ovid, $this->globorgid);
|
||||||
|
echo json_encode($scores);
|
||||||
|
}
|
||||||
|
function nieuwe_partituur(){
|
||||||
|
// functie krijgt via post een submitData arrray binnen met naam, vandatum, tmdatum en een json array met scores (id, naam, en waarde)
|
||||||
|
// naam moet zijn ingevuld. vandatum en tmdatum mogen NIET undefined zijn
|
||||||
|
// vanuit de opgegeven scores moet bepaald worden wat de pijlerwaarden (1 tm 5) zijn
|
||||||
|
// functie moet als antwoord het ID van de nieuwe partituur geven.
|
||||||
|
//daarnaast moet gekeken worden of bij de versie een wenssituatie is gemaakt. Deze wenssituatie moet
|
||||||
|
// ook overgenomen worden naar de partituur.
|
||||||
|
$oldpartituur = $this->clean_input("oldpartituur");
|
||||||
|
$newnaam = $this->clean_input('naam');
|
||||||
|
$vandatum = date2mysql($this->clean_input("vandatum") );
|
||||||
|
$tmdatum = date2mysql($this->clean_input('tmdatum'));
|
||||||
|
$versieid = $this->clean_input("versieid");
|
||||||
|
$ovid = $this->clean_input("ovid");
|
||||||
|
$scores = $this->Ijkpunten_model->getscores($ovid, $this->globorgid);
|
||||||
|
|
||||||
|
$data= array( 'partituur_organisatie_id'=> $this->globorgid ,
|
||||||
|
'partituur_naam' => $newnaam,
|
||||||
|
'partituur_actief' => 1,
|
||||||
|
'partituur_start' => $vandatum,
|
||||||
|
'partituur_eind' => $tmdatum);
|
||||||
|
$newPID=$this->Partituurs_model->insert_record($data);
|
||||||
|
$wenssituaties = $this->Wenssituaties_model->getgewenstvoorpartituur($ovid,$this->globorgid);
|
||||||
|
foreach($scores as $score) {
|
||||||
|
$waarde = 1;
|
||||||
|
$res= round($score->somscore / $score->num);
|
||||||
|
$waarde= $this->kleurcodes->getnummer($res);
|
||||||
|
|
||||||
|
switch ($score->nummer){
|
||||||
|
case 1: $pijlerid = 1; break;
|
||||||
|
case 2: $pijlerid = 2; break;
|
||||||
|
case 3: $pijlerid = 3; break;
|
||||||
|
case 4: $pijlerid = 4; break;
|
||||||
|
case 5: $pijlerid = 5; break;
|
||||||
|
case 6: $pijlerid = 6; break;
|
||||||
|
case 7: $pijlerid = 7; break;
|
||||||
|
case 8: $pijlerid = 8; break;
|
||||||
|
case 9: $pijlerid = 9; break;
|
||||||
|
case 10 : $pijlerid = 10; break;
|
||||||
|
case 11 : $pijlerid = 11; break;
|
||||||
|
case 12: $pijlerid = 12; break;
|
||||||
|
case 13: $pijlerid = 13; break;
|
||||||
|
}
|
||||||
|
$gewenstniveau = 5;
|
||||||
|
if ($wenssituaties){
|
||||||
|
foreach($wenssituaties as $wens){
|
||||||
|
if ($wens->nummer == $pijlerid) {
|
||||||
|
$gewenstniveau =$wens->wens;
|
||||||
|
break;
|
||||||
|
} ; //if
|
||||||
|
};
|
||||||
|
};
|
||||||
|
$data= array('partituurID' => $newPID,
|
||||||
|
'pijlerID' => $pijlerid,
|
||||||
|
'huidigniveau' => $waarde,
|
||||||
|
'gewenstniveau' => $gewenstniveau,
|
||||||
|
'start' =>$vandatum,
|
||||||
|
'eind' =>$tmdatum);
|
||||||
|
$this->ModPartPijlers->insert_record($data) ;
|
||||||
|
$data2= array( "orgID" =>$this->globorgid,
|
||||||
|
"partituurID" =>$newPID,
|
||||||
|
"pijlerID" =>$pijlerid,
|
||||||
|
"score" =>$res );
|
||||||
|
$this->ModRuweScores->insert_record($data2);
|
||||||
|
};
|
||||||
|
$data=array('partituur_actief' => 0);
|
||||||
|
if ($oldpartituur) {
|
||||||
|
$this->Partituurs_model->update_record($data, $oldpartituur);
|
||||||
|
};
|
||||||
|
echo json_encode(array('id'=>$newPID));
|
||||||
|
}
|
||||||
|
public function setNaam (){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) return;
|
||||||
|
$partID = $this->clean_input('id');
|
||||||
|
$naam = $this->clean_input('naam');
|
||||||
|
$data=array("partituur_naam" =>$naam);
|
||||||
|
$this->Partituurs_model->update_record($data,$partID);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,526 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Planning extends MY_controller {
|
||||||
|
public $rootpath;
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array('ijkpartituur/ModActiviteiten',
|
||||||
|
'ijkpartituur/ModAgenda',
|
||||||
|
'ijkpartituur/Modhulpmiddelen',
|
||||||
|
'ijkpartituur/Modfases',
|
||||||
|
'ijkpartituur/ModKosten',
|
||||||
|
'ijkpartituur/ModActDoel',
|
||||||
|
'ijkpartituur/ModActHulp',
|
||||||
|
'ijkpartituur/Modpartactiviteiten',
|
||||||
|
'ijkpartituur/ModPartPijlers',
|
||||||
|
'shared/Orgusers_model',
|
||||||
|
'shared/Users_model',
|
||||||
|
'ijkpartituur/ModPartActxHulpmiddel',
|
||||||
|
'ijkpartituur/ModPartActxDoelgroep',
|
||||||
|
'ijkpartituur/Modpartactxorgusers',
|
||||||
|
'ijkpartituur/ModPartActKosten',
|
||||||
|
'ijkpartituur/ModPartActResultaten' ,
|
||||||
|
'ijkpartituur/Partituurs_model',
|
||||||
|
'ijkpartituur/ModAgenda',
|
||||||
|
'ijkpartituur/ModPortfolio');
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->rootpath = str_replace('/public', '', $_SERVER['DOCUMENT_ROOT']);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){
|
||||||
|
}
|
||||||
|
function getActiviteitenPerPijler(){
|
||||||
|
//TODO haal alleen de activiteiten op die nog niet zijn opgenomen in de partituur
|
||||||
|
// inclusief eigen activiteiten
|
||||||
|
$partID= $this->uri->segment(4);
|
||||||
|
$pijler = $this->uri->segment(5);
|
||||||
|
|
||||||
|
$actSet= $this->ModActiviteiten->get_partituur_activiteiten_per_pijler($partID, $pijler);
|
||||||
|
if ($actSet) {
|
||||||
|
// dus hieronder moeten alle partact worden vervangen door activiteit zelf!!
|
||||||
|
foreach ($actSet as $activiteit) {
|
||||||
|
$activiteit->actKosten = $this->ModKosten->get_kosten_per_activiteit($activiteit->id);
|
||||||
|
$activiteit->actDoelgroepen = $this->ModActDoel->get_doelgroepen_per_act($activiteit->id);
|
||||||
|
$activiteit->actHulpmiddelen = $this->Modhulpmiddelen->get_hulpmiddelenlijst_per_activiteit($activiteit->id);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
echo json_encode($actSet);
|
||||||
|
}
|
||||||
|
function getPlanning (){
|
||||||
|
// $partituurID kan null zijn! id wordt meegegeven in de url . als de id 0 is moet de meest recente partituur opgehaald worden
|
||||||
|
$partID= $this->partituurid;
|
||||||
|
$where=array("partituur_actief" => 1, 'partituur_organisatie_id' =>$this->globorgid);
|
||||||
|
$partituur= $this->Partituurs_model->get_records_where($where,TRUE,FALSE);
|
||||||
|
$partID=$partituur->id;
|
||||||
|
|
||||||
|
$Npijlers=$this->ModPartPijlers->get_pijlers_per_partituur($partID);
|
||||||
|
|
||||||
|
foreach($Npijlers as $pijler){
|
||||||
|
$pijler->start=date('d-m-Y', strtotime($pijler->start));
|
||||||
|
$pijler->eind=date('d-m-Y', strtotime($pijler->eind));
|
||||||
|
$pijler->taakLijst = $this->Modpartactiviteiten->get_taaklijst($pijler->id);
|
||||||
|
if ($pijler->taakLijst ) {
|
||||||
|
foreach($pijler->taakLijst as $taak){
|
||||||
|
$taak->start=date('d-m-Y', strtotime($taak->start));
|
||||||
|
$taak->eind=date('d-m-Y', strtotime($taak->eind));
|
||||||
|
};
|
||||||
|
}; // if not empty
|
||||||
|
}
|
||||||
|
|
||||||
|
// lijst van medewerkers
|
||||||
|
if ($this->globisbg) { $medewerkers = $this->Users_model->get_users_by_bg($this->globorgid);}
|
||||||
|
else {$medewerkers = $this->Users_model->get_users_by_organisatie($this->globorgid); };
|
||||||
|
// als sprake is van BG moeten per school de medewerkers worden opgehaald
|
||||||
|
$fasen = $this->Modfases->get_fases();
|
||||||
|
|
||||||
|
echo json_encode(array('partituur' =>$partituur,
|
||||||
|
'taken' => $Npijlers,
|
||||||
|
'fasen' =>$fasen,
|
||||||
|
'medewerkers' => $medewerkers,
|
||||||
|
'canWrite' =>$this->writer,
|
||||||
|
'canWriteOnParent'=> true,
|
||||||
|
'selectedRow' =>1));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getGantt($partID) {
|
||||||
|
// de datum wordt in miliseconden sinds 1970 verwacht
|
||||||
|
$pijlers = $this->ModPartPijlers->get_pijlers_per_partituur($partID);
|
||||||
|
$info=array();
|
||||||
|
foreach ($pijlers as $pijler){
|
||||||
|
array_push($info, $pijler);
|
||||||
|
$pijleracts =$this->Modpartactiviteiten->get_activiteiten_per_partituur($partID, $pijler->id);
|
||||||
|
if (! empty($pijleracts)) {
|
||||||
|
foreach ($pijleracts as $act){
|
||||||
|
array_push($info,$act);
|
||||||
|
};
|
||||||
|
}; // if
|
||||||
|
};
|
||||||
|
// zet alle data om in format dd-mm-yyyy
|
||||||
|
foreach($info as $entry){
|
||||||
|
$entry->start=date('d-m-Y', strtotime($entry->start));
|
||||||
|
$entry->end=date('d-m-Y', strtotime($entry->end));
|
||||||
|
}
|
||||||
|
return $info;
|
||||||
|
}// einde function getGanttInfo
|
||||||
|
|
||||||
|
|
||||||
|
function getTaakInfo(){
|
||||||
|
$taakid=$this->uri->segment(4);
|
||||||
|
$taak =$this->Modpartactiviteiten->get_taak_info($taakid);
|
||||||
|
$where=array('id' =>$taak->afhankelijkvanID);
|
||||||
|
$taak->afhankelijkvanNaam =$this->Modpartactiviteiten->get_fieldvalue($where,'naam');
|
||||||
|
|
||||||
|
//get de hulpmiddelen bij deze taak
|
||||||
|
$taak->hulpmiddelen=$this->ModPartActxHulpmiddel->get_hulpmiddelenlijst_per_activiteit($taakid, false);
|
||||||
|
// get een lijst van orgusers (inclusief fullname) waaruit de verantwoordelijke gekozen mag worden
|
||||||
|
|
||||||
|
$taak->orgusers = $this->Orgusers_model->get_org_users($this->globorgid);
|
||||||
|
|
||||||
|
$taak->uitvoerenden = $this->Modpartactiviteiten->get_uitvoerenden_per_activiteit($taakid);
|
||||||
|
$taak->overigeusers = $this->Modpartactiviteiten->get_overige_users_per_activiteit($taakid, $this->globorgid);
|
||||||
|
$taak->doelgroepen = $this->ModPartActxDoelgroep->get_doelgroepen_per_act($taakid);
|
||||||
|
$taak->kosten = $this->ModPartActKosten->get_kosten_per_activiteit($taakid);
|
||||||
|
//get de documenten/notes bij deze activiteit
|
||||||
|
$notes = $this->ModPortfolio->get_notes($taakid);
|
||||||
|
|
||||||
|
echo json_encode(array('taak'=>$taak, 'notes'=>$notes));
|
||||||
|
}
|
||||||
|
function DownloadNote (){
|
||||||
|
$this->load->helper('download');
|
||||||
|
$docid = $this->uri->segment(4);
|
||||||
|
$original='test';
|
||||||
|
|
||||||
|
$file = $this->ModPortfolio->get_record_by_id($docid);
|
||||||
|
$original = $file->docnaam;
|
||||||
|
$data = file_get_contents("../docs/".$file->hashnaam.$file->doc_extension);
|
||||||
|
|
||||||
|
force_download($original, $data);
|
||||||
|
}
|
||||||
|
function DeleteNote(){
|
||||||
|
$nID = $this->uri->segment(4);
|
||||||
|
$file = $this->ModPortfolio->get_record_by_id($nID);
|
||||||
|
|
||||||
|
if ($file) {
|
||||||
|
if ($file->hashnaam) {
|
||||||
|
$this->load->helper("file");
|
||||||
|
unlink('../docs/'.$file->hashnaam.$file->doc_extension);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
$this->ModPortfolio->delete_record($nID);
|
||||||
|
}
|
||||||
|
function addTaak (){
|
||||||
|
//krijgt via submitData 4 vars binnen: partituurID, part-pijlerID, newTaakID, positie ('voor of na") en volgorde (dwz voor of na dit sequentienummer)
|
||||||
|
// moet volgorde van alle activiteiten (onder een pijler) zo aanpassen dat die weer klopt
|
||||||
|
// gegeven de nieuwe pijler.
|
||||||
|
// moet de hele partituur (zie get_gantt ) weer teruggeven
|
||||||
|
$actID = $this->clean_input('newTaakID');
|
||||||
|
$partID = $this->clean_input('partituurID');
|
||||||
|
$ppijlerID = $this->clean_input('pijlerID');
|
||||||
|
$activiteit = $this->ModActiviteiten->get_record_by_id($actID, FALSE, TRUE);
|
||||||
|
$partpijler = $this->ModPartPijlers->get_record_by_id($ppijlerID, FALSE,TRUE);
|
||||||
|
$seq = $this->input->post('selSeq');
|
||||||
|
|
||||||
|
if ($this->clean_input('positie') == 'na') {$seq = $seq + 1; }
|
||||||
|
else {$seq = $seq - 1;};
|
||||||
|
$data = array('sequence' => $seq,
|
||||||
|
'partituurID' => $partID,
|
||||||
|
'pijlerID' => $ppijlerID,
|
||||||
|
'activiteitID' => $actID,
|
||||||
|
'naam' => $activiteit->naam,
|
||||||
|
'omschrijving' => $activiteit->omschrijving,
|
||||||
|
'start' =>$partpijler->start,
|
||||||
|
'eind' =>$partpijler->eind,
|
||||||
|
'duur' => $activiteit->duur,
|
||||||
|
'niveau' =>$activiteit->inclusiviteitsniveau,
|
||||||
|
'fase' =>$activiteit->faseID,
|
||||||
|
'bronID' => $activiteit->bronID,
|
||||||
|
'email_dagen' =>$activiteit->email_dagen,
|
||||||
|
'email_naar_pl' => $activiteit->email_pleider,
|
||||||
|
'email_naar_vw' => $activiteit->email_verantwoordelijke);
|
||||||
|
$newID = $this->Modpartactiviteiten->insert_record($data);
|
||||||
|
|
||||||
|
// roep alle taken binnen de partpijler op en pas de sequentiewaarde aan
|
||||||
|
$partactiviteiten =$this->Modpartactiviteiten->get_id_lijst($partID,$ppijlerID);
|
||||||
|
|
||||||
|
if ($partactiviteiten){
|
||||||
|
$counter = 10;
|
||||||
|
foreach($partactiviteiten as $acti) {
|
||||||
|
$data=array("sequence" => $counter);
|
||||||
|
$counter = $counter + 10;
|
||||||
|
$this->Modpartactiviteiten->update_record($data, $acti->id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// maak partactxkosten aan
|
||||||
|
$actKosten = $this->ModKosten->get_records_where(array('activiteitID' =>$activiteit->id) );
|
||||||
|
if ($actKosten){
|
||||||
|
foreach ($actKosten as $actKost){
|
||||||
|
$data=array('activiteitID' =>$newID,
|
||||||
|
'omschrijving' =>$actKost->omschrijving,
|
||||||
|
'kosten' => $actKost->kosten);
|
||||||
|
$this->ModPartActKosten->insert_record($data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// maak partactxresultaten aan
|
||||||
|
$data =array('activiteitID' =>$newID,
|
||||||
|
'omschrijving' =>$activiteit->resultaatomschrijving);
|
||||||
|
$this->ModPartActResultaten->insert_record($data);
|
||||||
|
|
||||||
|
// maak partactxdoelgroep aan
|
||||||
|
$temDoelgroepen = $this->ModActDoel->get_records_where(array("activiteitID" => $activiteit->id));
|
||||||
|
if ($temDoelgroepen){
|
||||||
|
foreach($temDoelgroepen as $doelgroep){
|
||||||
|
$data= array('activiteitID' => $newID,
|
||||||
|
'doelgroepID' => $doelgroep->doelgroepID);
|
||||||
|
$this->ModPartActxDoelgroep->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//maak partactxhulpmiddelen aan
|
||||||
|
$temHulpmiddelen = $this->ModActHulp->get_records_where(array("actID" => $activiteit->id));
|
||||||
|
if ($temHulpmiddelen){
|
||||||
|
foreach ($temHulpmiddelen as $temHulpmiddel){
|
||||||
|
$data=array('actID' =>$newID,
|
||||||
|
'hulpID' => $temHulpmiddel->hulpID);
|
||||||
|
$this->ModPartActxHulpmiddel->insert_record($data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// get de nieuwe takenlijst en return deze
|
||||||
|
$Npijlers=$this->ModPartPijlers->get_pijlers_per_partituur($partID);
|
||||||
|
|
||||||
|
foreach($Npijlers as $pijler){
|
||||||
|
$pijler->start=date('d-m-Y', strtotime($pijler->start));
|
||||||
|
$pijler->eind=date('d-m-Y', strtotime($pijler->eind));
|
||||||
|
$pijler->taakLijst = $this->Modpartactiviteiten->get_taaklijst($pijler->id);
|
||||||
|
if ($pijler->taakLijst ) {
|
||||||
|
foreach($pijler->taakLijst as $taak){
|
||||||
|
$taak->start=date('d-m-Y', strtotime($taak->start));
|
||||||
|
$taak->eind=date('d-m-Y', strtotime($taak->eind));
|
||||||
|
};
|
||||||
|
}; // if not empty
|
||||||
|
}
|
||||||
|
echo json_encode( array('taken' =>$Npijlers));
|
||||||
|
}
|
||||||
|
|
||||||
|
function RemoveTaak(){
|
||||||
|
$partActID = $this->clean_input('partActID');
|
||||||
|
// delete partActKosten partActResultaten partActdoelgroep
|
||||||
|
// partactHulpmiddel partActOrgusers
|
||||||
|
$where = array('ActiviteitID' =>$partActID);
|
||||||
|
$this->ModPartActKosten -> delete_record_where($where) ;
|
||||||
|
$this->ModPartActResultaten ->delete_record_where($where) ;
|
||||||
|
$this->ModPartActxDoelgroep->delete_record_where($where);
|
||||||
|
$this->Modpartactxorgusers->delete_record_where($where);
|
||||||
|
|
||||||
|
$where = array('activiteitID' =>$partActID);
|
||||||
|
$this->ModAgenda->delete_record_where($where);
|
||||||
|
$where = array('actID ' =>$partActID);
|
||||||
|
$this->ModPartActxHulpmiddel->delete_record_where($where);
|
||||||
|
$this->Modpartactiviteiten->delete_record($partActID);
|
||||||
|
|
||||||
|
echo(true);
|
||||||
|
}
|
||||||
|
function AddHulpmiddel(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$hulpID= $this->uri->segment(5);
|
||||||
|
$data = array('actID' => $actID,
|
||||||
|
'hulpID' =>$hulpID);
|
||||||
|
$newID = $this->ModPartActxHulpmiddel->insert_record($data);
|
||||||
|
$data = $this->ModPartActxHulpmiddel->get_hulpmiddelenlijst_per_activiteit($actID,$hulpID);
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
function RemoveHulpmiddel(){
|
||||||
|
$hID = $this->uri->segment(4);
|
||||||
|
$this->ModPartActxHulpmiddel->delete_record($hID);
|
||||||
|
}
|
||||||
|
function SaveTaak(){
|
||||||
|
$taakID = $this->clean_input("taakID");
|
||||||
|
$data=array(
|
||||||
|
"start" => date2mysql($this->clean_input("startdatum")),
|
||||||
|
"eind" => date2mysql($this->clean_input("einddatum")),
|
||||||
|
"duur" => $this->clean_input("duur"),
|
||||||
|
"afhankelijkvanID" => $this->clean_input("afhankelijkvan"),
|
||||||
|
"gereed " => $this->clean_input("gereed")
|
||||||
|
);
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$taakID);
|
||||||
|
}
|
||||||
|
function SaveTaakData (){
|
||||||
|
$taakID = $this->input->post("id");
|
||||||
|
$data = array( "start" => date2mysql($this->clean_input("start")),
|
||||||
|
"eind" => date2mysql($this->clean_input("eind")),
|
||||||
|
"duur" => $this->clean_input("duur") );
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$taakID);
|
||||||
|
|
||||||
|
}
|
||||||
|
function SavePerc(){
|
||||||
|
$data = array("gereed" =>$this->clean_input("gereed"));
|
||||||
|
$taakID = $this->clean_input("taakID");
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$taakID);
|
||||||
|
}
|
||||||
|
function SavePijlerData() {
|
||||||
|
$pijlerID = $this->clean_input('id');
|
||||||
|
$data = array( "start" => date2mysql($this->clean_input("start")),
|
||||||
|
"eind" => date2mysql($this->clean_input("eind"))
|
||||||
|
);
|
||||||
|
$this->ModPartPijlers-> update_record($data,$pijlerID);
|
||||||
|
}
|
||||||
|
function SaveTaakDetails(){
|
||||||
|
$taakID = $this->clean_input("taakID");
|
||||||
|
$data=array("omschrijving" => textarea2html($this->clean_input("omschrijving")),
|
||||||
|
"opmerkingen" => textarea2html($this->clean_input("opmerkingen")),
|
||||||
|
"gereed" => $this->clean_input("gereed"),
|
||||||
|
"verantwoordelijke" => $this->clean_input("verantwoordelijke"),
|
||||||
|
"email_dagen" => $this->clean_input("email_dagen"),
|
||||||
|
"email_naar_pl" => $this->clean_input("email_naar_pl"),
|
||||||
|
"email_naar_vw" => $this->clean_input("email_naar_vw"),
|
||||||
|
"email_adres" => $this->clean_input("email_adres")
|
||||||
|
);
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$taakID);
|
||||||
|
}
|
||||||
|
function RemoveDoelgroep(){
|
||||||
|
$dID = $this->uri->segment(4);
|
||||||
|
$this->ModPartActxDoelgroep->delete_record($dID);
|
||||||
|
}
|
||||||
|
function getDoelgroepen(){
|
||||||
|
//haal de doelgroepen op die nog niet in de activiteit zijn opgenomen
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$result= $this->ModPartActxDoelgroep->get_other_doelgroepen($actID);
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
function AddDoelgroep(){
|
||||||
|
$dID = $this->uri->segment(4);
|
||||||
|
$actID = $this->uri->segment(5);
|
||||||
|
$data =array("activiteitID" => $actID,
|
||||||
|
"doelgroepID" =>$dID );
|
||||||
|
$newID = $this->ModPartActxDoelgroep->insert_record($data);
|
||||||
|
$newRecord = $this->ModPartActxDoelgroep->get_doelgroep($newID);
|
||||||
|
echo json_encode($newRecord);
|
||||||
|
}
|
||||||
|
function newKostenregel(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$data = array("activiteitID" => $actID);
|
||||||
|
$newID = $this->ModPartActKosten->insert_record($data);
|
||||||
|
$newRecord = $this->ModPartActKosten->get_kosten_per_regel($newID);
|
||||||
|
echo json_encode($newRecord);
|
||||||
|
}
|
||||||
|
function SaveKosten(){
|
||||||
|
$kID = $this->clean_input("id");
|
||||||
|
$where=array("omschrijving" =>$this->clean_input("omschrijving"),
|
||||||
|
"kosten" =>bedrag2mysql($this->clean_input("kosten")) );
|
||||||
|
$this->ModPartActKosten->update_record($where,$kID);
|
||||||
|
}
|
||||||
|
function DeleteKost(){
|
||||||
|
$kID = $this->uri->segment(4);
|
||||||
|
$this->ModPartActKosten->delete_record($kID);
|
||||||
|
}
|
||||||
|
function SaveResultaten(){
|
||||||
|
$actID=$this->clean_input('id');
|
||||||
|
$where = array('activiteitID' =>$actID);
|
||||||
|
$data = array("resultaat"=>$this->clean_input('resultaat'));
|
||||||
|
|
||||||
|
$resID = $this->ModPartActResultaten->get_fieldvalue($where, 'id');
|
||||||
|
if ($resID) {
|
||||||
|
$this->ModPartActResultaten->update_record_where($data, $where);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data= array('activiteitID' =>$actID,
|
||||||
|
"resultaat"=>$this->clean_input('resultaat'));
|
||||||
|
$this->ModPartActResultaten->insert_record($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function saveSequentie(){
|
||||||
|
$seqlijst= $this->clean_input("seqlijst");
|
||||||
|
foreach ($seqlijst as $seq2){
|
||||||
|
$data=array("sequence" =>$seq2['seq']);
|
||||||
|
$this->Modpartactiviteiten->update_record($data, $seq2['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function addUitvoerende(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$orguserID = $this->uri->segment(5);
|
||||||
|
$data=array("activiteitID" => $actID,
|
||||||
|
"orguserID" => $orguserID);
|
||||||
|
$this->Modpartactxorgusers->insert_record($data);
|
||||||
|
}
|
||||||
|
function addVerantwoordelijke(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$orguserID = $this->uri->segment(5);
|
||||||
|
$data = array("verantwoordelijke" => $orguserID);
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$actID);
|
||||||
|
}
|
||||||
|
function removeUitvoerende(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$orguserID = $this->uri->segment(5);
|
||||||
|
$data=array("activiteitID" => $actID,
|
||||||
|
"orguserID" => $orguserID);
|
||||||
|
$this->Modpartactxorgusers->delete_record_where($data);
|
||||||
|
}
|
||||||
|
function removeVerantwoordelijke(){
|
||||||
|
$actID = $this->uri->segment(4);
|
||||||
|
$data = array("verantwoordelijke"=>null);
|
||||||
|
$this->Modpartactiviteiten->update_record($data,$actID);
|
||||||
|
}
|
||||||
|
|
||||||
|
function MinMaxDag(){
|
||||||
|
$partactID = $this->uri->segment(4);
|
||||||
|
$partact = $this->Modpartactiviteiten->get_record_by_id($partactID);
|
||||||
|
$partpijler = $this->ModPartPijlers->get_record_by_id($partact->pijlerID) ;
|
||||||
|
$minStart = $partpijler->start;
|
||||||
|
$maxEind = $partpijler->eind;
|
||||||
|
if ($partact->duur) {$dagen = $partact->duur;}
|
||||||
|
else {$dagen = 1;};
|
||||||
|
$maxStart =DATE("Y-m-d", strtotime($maxEind.' - '.$dagen.' days ') );
|
||||||
|
$minEind = DATE("Y-m-d", strtotime($partpijler->start.' + '.$dagen.' days ') );
|
||||||
|
$agendaMinMax=$this->ModAgenda->find_minmax_dag($partpijler->id, $partact->id);
|
||||||
|
if (!empty($agendaMinMax )) {
|
||||||
|
if (isset($agendaMinMax[0]->mindag)){
|
||||||
|
if (DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) < $maxStart &&
|
||||||
|
DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) >= $minStart)
|
||||||
|
{$maxStart= DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) ;};
|
||||||
|
};
|
||||||
|
if (isset($agendaMinMax[0]->maxdag)) {
|
||||||
|
if ( DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag)) > $minEind &&
|
||||||
|
DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag)) <= $maxEind)
|
||||||
|
{$minEind =DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag));};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
echo json_encode(array("minStart" =>$minStart,
|
||||||
|
"maxStart" =>$maxStart,
|
||||||
|
"minEind" => $minEind,
|
||||||
|
"maxEind" =>$maxEind));
|
||||||
|
}
|
||||||
|
function MinMaxDagVoorPijler(){
|
||||||
|
$pijlerID = $this->uri->segment(4);
|
||||||
|
$uitAct = $this->Modpartactiviteiten->get_minmax_activiteiten($pijlerID);
|
||||||
|
$partituur = $this->Partituurs_model->get_record_by_id($this->partituurid);
|
||||||
|
$minStart = $partituur->partituur_start;
|
||||||
|
$maxEind =$partituur->partituur_eind;
|
||||||
|
$maxStart = new DateTime($maxEind);
|
||||||
|
$maxStart->modify("-1 day");
|
||||||
|
$maxStart= $maxStart->format("Y-m-d");
|
||||||
|
|
||||||
|
$minEind = new DateTime($minStart) ; // was maxStart moet worden minStart + 1
|
||||||
|
$minEind->modify('+1 day');
|
||||||
|
$minEind = $minEind->format("Y-m-d");
|
||||||
|
|
||||||
|
if ($uitAct) {
|
||||||
|
if($uitAct->minStart) {$maxStart = $uitAct->minStart;};
|
||||||
|
if($uitAct->maxEind) {$minEind = $uitAct->maxEind;};
|
||||||
|
};
|
||||||
|
$agendaMinMax=$this->ModAgenda->find_minmax_dag($pijlerID);
|
||||||
|
if (!empty($agendaMinMax )) {
|
||||||
|
if (isset($agendaMinMax[0]->mindag)){
|
||||||
|
if (DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) < $maxStart &&
|
||||||
|
DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) >= $minStart)
|
||||||
|
{$maxStart= DATE("Y-m-d", strtotime($agendaMinMax[0]->mindag)) ;};
|
||||||
|
};
|
||||||
|
if (isset($agendaMinMax[0]->maxdag)) {
|
||||||
|
if ( DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag)) > $minEind &&
|
||||||
|
DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag)) <= $maxEind)
|
||||||
|
{$minEind =DATE("Y-m-d",Strtotime($agendaMinMax[0]->maxdag));};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
echo json_encode(array("minStart" =>$minStart,
|
||||||
|
"maxStart" =>$maxStart,
|
||||||
|
"minEind" => $minEind,
|
||||||
|
"maxEind" =>$maxEind));
|
||||||
|
}
|
||||||
|
function LSUploadNote(){
|
||||||
|
$nID = $this->uri->segment(4);
|
||||||
|
$actID = $this->uri->segment(5);
|
||||||
|
$toonnaam = $this->clean_input('toonnaam');
|
||||||
|
|
||||||
|
$config['upload_path'] = '../tmp_uploads/';
|
||||||
|
$config['allowed_types'] = 'doc|docx|jpg|gif|png|pdf|txt';
|
||||||
|
$config['max_size'] = '10000';
|
||||||
|
|
||||||
|
$this->load->library('upload', $config);
|
||||||
|
|
||||||
|
$uploadresult = $this->upload->do_upload();
|
||||||
|
|
||||||
|
if (!$uploadresult && !$docid){
|
||||||
|
$result = array('errors'=>json_encode($this->upload->display_errors()));
|
||||||
|
}else{
|
||||||
|
if(!$uploadresult){
|
||||||
|
$result = array('errors'=>json_encode('<p>de gegevens zijn opgeslagen</p>'));
|
||||||
|
}else{
|
||||||
|
//check if there is already a file (docid!=0) unlink the old file
|
||||||
|
if($nID){
|
||||||
|
$file = $this->ModPortfolio->get_record_by_id($nID);
|
||||||
|
if ($file) {
|
||||||
|
if ($file->hashnaam) {
|
||||||
|
unlink('../docs/'.$file->hashnaam.$file->doc_extension);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = array('errors'=>json_encode('<p>uw bestand is succesvol geupload</p>'));
|
||||||
|
$document = $this->upload->data();
|
||||||
|
|
||||||
|
$this->load->helper('string');
|
||||||
|
$newname = sha1(random_string('alnum', 16));
|
||||||
|
|
||||||
|
$data = array( 'toonnaam' => $toonnaam,
|
||||||
|
'id' => $nID,
|
||||||
|
'partactID' => $actID,
|
||||||
|
'orgID' => $this->globorgid,
|
||||||
|
'docnaam' => $document['file_name']);
|
||||||
|
|
||||||
|
$data['doc_extension'] = $document['file_ext'];
|
||||||
|
$data['hashnaam'] = $newname;
|
||||||
|
|
||||||
|
$oldname = '../tmp_uploads/'.$document['file_name'];
|
||||||
|
$newname = '../docs/'.$newname.$document['file_ext'];
|
||||||
|
rename($oldname, $newname);
|
||||||
|
}
|
||||||
|
$nID =$this->ModPortfolio->save_record($data, $nID);
|
||||||
|
}
|
||||||
|
$data = array('result' =>$result, 'id'=>$nID );
|
||||||
|
$this->load->view('ijkpartituur/popups/ToonuploadNote', $data) ;
|
||||||
|
}
|
||||||
|
} // einde class Planning
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Bestemmingen extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Kalenderjaren_model",
|
||||||
|
"monpas/Bestedingopmerkingen_model",
|
||||||
|
"monpas/Toewijzingen_model",
|
||||||
|
"monfin2/Finuitgavetypes_model",
|
||||||
|
"monfin2/Finbestemmingen_model",
|
||||||
|
|
||||||
|
"monfin2/Finsoorten_model",
|
||||||
|
"monfin2/Finsubsoorten_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
if (! $this->userid) exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getconstants(){
|
||||||
|
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$targetjaar = $this->Toewijzingen_model->getNextJaar($this->globorgid);
|
||||||
|
$kalenderjaren = $this->Kalenderjaren_model->getkalenderjarenMetMax($targetjaar);
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0 ) {$writer = true;}
|
||||||
|
else {$writer = false;} ;
|
||||||
|
echo json_encode(array('writer' =>$writer,
|
||||||
|
'kalenderjaren' =>$kalenderjaren,
|
||||||
|
'targetjaar' =>$targetjaar));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getUitgavetypes(){
|
||||||
|
$uitgavetypes = $this->Finuitgavetypes_model->get_uitgavetypes();
|
||||||
|
echo json_encode($uitgavetypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getallsoorten(){
|
||||||
|
$jaarnr = $this->clean_input('jaarnr');
|
||||||
|
$soorten = $this->Finsoorten_model->get_all_soorten( $jaarnr, $this->globorgid);
|
||||||
|
if ($soorten){
|
||||||
|
foreach($soorten as $soort){
|
||||||
|
$soort->subsoorten = $this->Finsubsoorten_model->get_all_subsoorten($soort->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($soorten);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBestemmingen(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, READER) <=0) {
|
||||||
|
$jaartoewijzing =array();
|
||||||
|
$bestedingen = array();
|
||||||
|
$jaarclosed = TRUE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$jaarnr = $this->input->post('jaarnr');
|
||||||
|
$jaarclosed = FALSE;
|
||||||
|
$jaartoewijzing = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $jaarnr);
|
||||||
|
if ($jaartoewijzing){
|
||||||
|
|
||||||
|
$jaartoewijzing->basis=number_format($jaartoewijzing->basis/100,2,',','.');
|
||||||
|
$jaartoewijzing->extra=number_format($jaartoewijzing->extra/100,2,',','.');
|
||||||
|
$jaartoewijzing->som=number_format($jaartoewijzing->som/100,2,',','.');
|
||||||
|
$jaartoewijzing->overig=number_format($jaartoewijzing->overig/100,2,',','.');
|
||||||
|
if ($jaartoewijzing->jaarclosed == "F") {$jaarclosed = FALSE;}
|
||||||
|
else { $jaarclosed = TRUE;};
|
||||||
|
|
||||||
|
}
|
||||||
|
$basisbestemmingen = $this->Finbestemmingen_model->get_bestemmingen($orgid,$jaarnr,"BASIS");
|
||||||
|
$extrabestemmingen = $this->Finbestemmingen_model->get_bestemmingen($orgid,$jaarnr,"EXTRA");
|
||||||
|
|
||||||
|
$opmerking = $this->Bestedingopmerkingen_model->getopmerking($orgid, $jaarnr);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
echo json_encode(array('jaartoewijzing' => $jaartoewijzing,
|
||||||
|
'basisbestemmingen' => $basisbestemmingen,
|
||||||
|
'extrabestemmingen' => $extrabestemmingen,
|
||||||
|
|
||||||
|
'opmerking' => $opmerking,
|
||||||
|
'jaarclosed' => $jaarclosed));
|
||||||
|
}
|
||||||
|
function updatebedrag(){
|
||||||
|
// TODO check autorisatie
|
||||||
|
$bestemmingID = $this->clean_input("id");
|
||||||
|
$targetjaar = $this->Toewijzingen_model->getNextJaar($this->globorgid);
|
||||||
|
$bestemmingjaar = $this->Finbestemmingen_model->get(['id'=>$bestemmingID], 'kalenderjaar', true);
|
||||||
|
if ($targetjaar == $bestemmingjaar){
|
||||||
|
$this->Finbestemmingen_model->update_record(['bedrag'=>$this->input->post('bedrag')], $bestemmingID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveopmerking(){
|
||||||
|
// TODO check autorisatie
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$jaarnr = $this->clean_input("jaarnr");
|
||||||
|
$opmerking = $this->clean_input("opmerking");
|
||||||
|
$where = array("organisatie_id"=>$orgid, "kalenderjaarnr"=>$jaarnr);
|
||||||
|
$opmerkingrecord = $this->Bestedingopmerkingen_model->get_records_where($where,true);
|
||||||
|
if (!$opmerkingrecord){
|
||||||
|
$this->Bestedingopmerkingen_model->insert_record(array("organisatie_id" =>$orgid, "kalenderjaarnr"=>$jaarnr, 'opmerking'=>$opmerking));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->Bestedingopmerkingen_model->update_record(array('opmerking'=>$opmerking),$opmerkingrecord->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,599 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Monfin2overzicht extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("monfin2/Finbestemmingen_model",
|
||||||
|
"monfin2/Finuitgavetypes_model",
|
||||||
|
"monpas/Bestedingopmerkingen_model",
|
||||||
|
"monpas/Toewijzingen_model",
|
||||||
|
"shared/Kalenderjaren_model",
|
||||||
|
|
||||||
|
"Phantom_model" );
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getschoolbedragen(){
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$uitgavetypes = $this->Finuitgavetypes_model->get_uitgavetypes();
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
$totbudget = 0;
|
||||||
|
$totbesteed = 0;
|
||||||
|
$basis = array();
|
||||||
|
$extra = array();
|
||||||
|
$sompersoort = array();
|
||||||
|
$schooltot = 0;
|
||||||
|
$opmerking = '';
|
||||||
|
|
||||||
|
if ($budgetten){
|
||||||
|
// $totbudget = $budgetten->basis + $budgetten->extra ;
|
||||||
|
$budgetten->totaal = ROUND(($budgetten->basis + $budgetten->extra)/100);
|
||||||
|
$budgetten->basis = ROUND($budgetten->basis / 100);
|
||||||
|
$budgetten->extra = Round($budgetten->extra/ 100);
|
||||||
|
|
||||||
|
$basis = $this->Finbestemmingen_model->get_bestemmingen($orgid, $kalenderjaarnr,"BASIS");
|
||||||
|
$extra = $this->Finbestemmingen_model->get_bestemmingen($orgid, $kalenderjaarnr,"EXTRA");
|
||||||
|
|
||||||
|
$sombasisperuitgavetype = $this->get_som_per_uitgavetype($basis, $uitgavetypes);
|
||||||
|
$somextraperuitgavetype = $this->get_som_per_uitgavetype($extra, $uitgavetypes);
|
||||||
|
$totsomperuitgavetype = $this->sommeer_per_uitgavetype($sombasisperuitgavetype,$somextraperuitgavetype, $uitgavetypes);
|
||||||
|
$totbesteed = $this->sommeeralles($totsomperuitgavetype);
|
||||||
|
$basis = $this->get_som_regel($basis);
|
||||||
|
$extra = $this->get_som_regel($extra);
|
||||||
|
// todo
|
||||||
|
// bereken budget - besteding verschil per basis/extra/overig
|
||||||
|
$budgetten->basisverschil = number_format($budgetten->basis - $sombasisperuitgavetype[3]->som, 0, ',' , '.' );
|
||||||
|
$budgetten->extraverschil = number_format($budgetten->extra - $somextraperuitgavetype[3]->som, 0, ',' , '.' );
|
||||||
|
$budgetten->totaalverschil = $budgetten->totaal - ($sombasisperuitgavetype[3]->som +$somextraperuitgavetype[3]->som);
|
||||||
|
// todo
|
||||||
|
// zorg dat alle getallen geformateerd zijn met een duizendtalscheidingsteken
|
||||||
|
$budgetten->totaal = number_format($budgetten->totaal, 0 , ',' , '.');
|
||||||
|
$budgetten->basis = number_format($budgetten->basis , 0 , ',' , '.');
|
||||||
|
$budgetten->extra = number_format($budgetten->extra, 0 , ',' , '.');
|
||||||
|
|
||||||
|
foreach($sombasisperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
foreach($somextraperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
foreach($totsomperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$schooltot = array( 'budget' => $budgetten->totaal ,
|
||||||
|
"bestemd" => number_format($totbesteed, 0, ',' , '.' ),
|
||||||
|
"verschil" => number_format($budgetten->totaalverschil, 0, ',' , '.' ));
|
||||||
|
|
||||||
|
$opmerking = $this->Bestedingopmerkingen_model->getopmerking($orgid, $kalenderjaarnr);
|
||||||
|
}; // if budgetten
|
||||||
|
if (! isset($sombasisperuitgavetype)) $sombasisperuitgavetype = 0;
|
||||||
|
if (! isset($somextraperuitgavetype)) $somextraperuitgavetype = 0;
|
||||||
|
if (! isset($totsomperuitgavetype)) $totsomperuitgavetype = 0;
|
||||||
|
if (! isset($schooltot)) $schooltot = 0;
|
||||||
|
|
||||||
|
echo json_encode(array('uitgavetypes' =>$uitgavetypes,
|
||||||
|
'basis' =>$basis,
|
||||||
|
'extra' =>$extra,
|
||||||
|
'sombasisperuitgavetype' =>$sombasisperuitgavetype,
|
||||||
|
'somextraperuitgavetype' =>$somextraperuitgavetype,
|
||||||
|
'totsomperuitgavetype' =>$totsomperuitgavetype,
|
||||||
|
'schooltotaal' => $schooltot,
|
||||||
|
'budgetten' => $budgetten,
|
||||||
|
'opmerking' => $opmerking));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getschoolbedragenNieuw(){
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$soortoverzicht = $this->clean_input('zelfjanee');
|
||||||
|
|
||||||
|
$suborgs = $this->Organisaties_model->getlistrecursief( $orgid, []);
|
||||||
|
array_splice($suborgs, 0,1);
|
||||||
|
$suborgslist= implode(',', $suborgs);
|
||||||
|
|
||||||
|
$uitgavetypes = $this->Finuitgavetypes_model->get_uitgavetypes();
|
||||||
|
if ($soortoverzicht == 3){
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingenperjaaroverorgs($suborgslist, $kalenderjaarnr);
|
||||||
|
} else {
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
}
|
||||||
|
$totbudget = 0;
|
||||||
|
$totbesteed = 0;
|
||||||
|
$basis = array();
|
||||||
|
$extra = array();
|
||||||
|
$sompersoort = array();
|
||||||
|
$schooltot = 0;
|
||||||
|
$opmerking = '';
|
||||||
|
|
||||||
|
if ($budgetten){
|
||||||
|
if ($soortoverzicht == 3){
|
||||||
|
$budgetten->totaal = ROUND(($budgetten->basis + $budgetten->extra));
|
||||||
|
$budgetten->basis = ROUND($budgetten->basis );
|
||||||
|
$budgetten->extra = ROUND($budgetten->extra);
|
||||||
|
} else {
|
||||||
|
$budgetten->totaal = ROUND(($budgetten->basis + $budgetten->extra)/100);
|
||||||
|
$budgetten->basis = ROUND($budgetten->basis / 100);
|
||||||
|
$budgetten->extra = ROUND($budgetten->extra/ 100);
|
||||||
|
}
|
||||||
|
if ($soortoverzicht == 3){
|
||||||
|
$basis = $this->Finbestemmingen_model->get_bestemmingen_over_orgs($orgid, $suborgslist, $kalenderjaarnr,"BASIS");
|
||||||
|
$extra = $this->Finbestemmingen_model->get_bestemmingen_over_orgs($orgid, $suborgslist, $kalenderjaarnr,"EXTRA");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$basis = $this->Finbestemmingen_model->get_bestemmingen($orgid, $kalenderjaarnr,"BASIS");
|
||||||
|
$extra = $this->Finbestemmingen_model->get_bestemmingen($orgid, $kalenderjaarnr,"EXTRA");
|
||||||
|
}
|
||||||
|
$sombasisperuitgavetype = $this->get_som_per_uitgavetype($basis, $uitgavetypes);
|
||||||
|
$somextraperuitgavetype = $this->get_som_per_uitgavetype($extra, $uitgavetypes);
|
||||||
|
$totsomperuitgavetype = $this->sommeer_per_uitgavetype($sombasisperuitgavetype,$somextraperuitgavetype, $uitgavetypes);
|
||||||
|
$totbesteed = $this->sommeeralles($totsomperuitgavetype);
|
||||||
|
$basis = $this->get_som_regel($basis);
|
||||||
|
$extra = $this->get_som_regel($extra);
|
||||||
|
// todo
|
||||||
|
// bereken budget - besteding verschil per basis/extra/overig
|
||||||
|
$budgetten->basisverschil = number_format($budgetten->basis - $sombasisperuitgavetype[3]->som, 0, ',' , '.' );
|
||||||
|
$budgetten->extraverschil = number_format($budgetten->extra - $somextraperuitgavetype[3]->som, 0, ',' , '.' );
|
||||||
|
$budgetten->totaalverschil = $budgetten->totaal - ($sombasisperuitgavetype[3]->som +$somextraperuitgavetype[3]->som);
|
||||||
|
// todo
|
||||||
|
// zorg dat alle getallen geformateerd zijn met een duizendtalscheidingsteken
|
||||||
|
$budgetten->totaal = number_format($budgetten->totaal, 0 , ',' , '.');
|
||||||
|
$budgetten->basis = number_format($budgetten->basis , 0 , ',' , '.');
|
||||||
|
$budgetten->extra = number_format($budgetten->extra, 0 , ',' , '.');
|
||||||
|
|
||||||
|
foreach($sombasisperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
foreach($somextraperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
foreach($totsomperuitgavetype as $sompertype){
|
||||||
|
$sompertype->som = number_format($sompertype->som,0, ',' , '.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$schooltot = array( 'budget' => $budgetten->totaal ,
|
||||||
|
"bestemd" => number_format($totbesteed, 0, ',' , '.' ),
|
||||||
|
"verschil" => number_format($budgetten->totaalverschil, 0, ',' , '.' ));
|
||||||
|
|
||||||
|
if ($soortoverzicht == 3){
|
||||||
|
$opmerking = '';
|
||||||
|
} else {
|
||||||
|
$opmerking = $this->Bestedingopmerkingen_model->getopmerking($orgid, $kalenderjaarnr);
|
||||||
|
}
|
||||||
|
}; // if budgetten
|
||||||
|
if (! isset($sombasisperuitgavetype)) $sombasisperuitgavetype = 0;
|
||||||
|
if (! isset($somextraperuitgavetype)) $somextraperuitgavetype = 0;
|
||||||
|
if (! isset($totsomperuitgavetype)) $totsomperuitgavetype = 0;
|
||||||
|
if (! isset($schooltot)) $schooltot = 0;
|
||||||
|
|
||||||
|
echo json_encode(array('uitgavetypes' =>$uitgavetypes,
|
||||||
|
'basis' =>$basis,
|
||||||
|
'extra' =>$extra,
|
||||||
|
'sombasisperuitgavetype' =>$sombasisperuitgavetype,
|
||||||
|
'somextraperuitgavetype' =>$somextraperuitgavetype,
|
||||||
|
'totsomperuitgavetype' =>$totsomperuitgavetype,
|
||||||
|
'schooltotaal' => $schooltot,
|
||||||
|
'budgetten' => $budgetten,
|
||||||
|
'opmerking' => $opmerking));
|
||||||
|
}
|
||||||
|
function sommeeralles($totsomperuitgavetype){
|
||||||
|
$totsom =0;
|
||||||
|
if ($totsomperuitgavetype){
|
||||||
|
foreach($totsomperuitgavetype as $som){
|
||||||
|
if ($som->code != "REGELSOM"){
|
||||||
|
$totsom += $som->som;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $totsom;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_som_regel($soorten){
|
||||||
|
if ($soorten){
|
||||||
|
foreach($soorten as $soort){
|
||||||
|
if ($soort->subsoorten){
|
||||||
|
foreach ($soort->subsoorten as $subsoort){
|
||||||
|
$som = 0;
|
||||||
|
if ($subsoort->uitgavetypes){
|
||||||
|
foreach($subsoort->uitgavetypes as $uitgavetype){
|
||||||
|
if ($uitgavetype && $uitgavetype->bedrag){
|
||||||
|
$som += $uitgavetype->bedrag;
|
||||||
|
$uitgavetype->bedrag = number_format($uitgavetype->bedrag,0,',','.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$subsoort->uitgavetypes[3]= new stdClass;
|
||||||
|
$subsoort->uitgavetypes[3]->bedrag =number_format($som,0, ',' , '.');
|
||||||
|
$subsoort->uitgavetypes[3]->code ='REGELSOM';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $soorten;
|
||||||
|
}
|
||||||
|
|
||||||
|
function sommeer_per_uitgavetype($sombasis,$somextra,$uitgavetypes){
|
||||||
|
$somtot = [];
|
||||||
|
$regelsom =0;
|
||||||
|
if ($uitgavetypes){
|
||||||
|
$index =0;
|
||||||
|
foreach($uitgavetypes as $uitgavetype){
|
||||||
|
$somtot[$index] = new stdClass;
|
||||||
|
$somtot[$index]->code = $uitgavetype->code;
|
||||||
|
$somtot[$index]->naam = $uitgavetype->naam;
|
||||||
|
$somtot[$index]->som =0;
|
||||||
|
foreach($sombasis as $basis){
|
||||||
|
if ($basis->code == $somtot[$index]->code) $somtot[$index]->som += $basis->som;
|
||||||
|
}
|
||||||
|
foreach($somextra as $basis){
|
||||||
|
if ($basis->code == $somtot[$index]->code) $somtot[$index]->som += $basis->som;
|
||||||
|
}
|
||||||
|
|
||||||
|
$regelsom += $somtot[$index]->som;
|
||||||
|
$index += 1;
|
||||||
|
}
|
||||||
|
$somtot[$index] = new stdClass;
|
||||||
|
$somtot[$index]->code = "REGELSOM";
|
||||||
|
$somtot[$index]->naam = "Som";
|
||||||
|
$somtot[$index]->som = $regelsom;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $somtot;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_som_per_uitgavetype($basis,$uitgavetypes){
|
||||||
|
$sombasis = [];
|
||||||
|
if ($uitgavetypes){
|
||||||
|
foreach($uitgavetypes as $uitgavetype){
|
||||||
|
$sombasis[$uitgavetype->code]= new stdClass;
|
||||||
|
$sombasis[$uitgavetype->code]->naam= $uitgavetype->naam;
|
||||||
|
$sombasis[$uitgavetype->code]->som=0;
|
||||||
|
}
|
||||||
|
if ($basis){
|
||||||
|
foreach($basis as $soort){
|
||||||
|
if ($soort->subsoorten){
|
||||||
|
foreach ($soort->subsoorten as $subsoort){
|
||||||
|
if ($subsoort->uitgavetypes){
|
||||||
|
foreach($subsoort->uitgavetypes as $uitgavetype) {
|
||||||
|
$sombasis[$uitgavetype->code]->som += $uitgavetype->bedrag;
|
||||||
|
} //foreach
|
||||||
|
}// if uitgavetypes
|
||||||
|
}//foreach subsoort
|
||||||
|
}//if subsoort
|
||||||
|
}//foreach basis
|
||||||
|
} // if basis
|
||||||
|
} // if uitgavetypes
|
||||||
|
$somasarray=[];
|
||||||
|
$index = 0;
|
||||||
|
$regelsom=0;
|
||||||
|
foreach($uitgavetypes as $uitgavetype){
|
||||||
|
$somasarray[$index ] = new stdClass;
|
||||||
|
$somasarray[$index]->code = $uitgavetype->code;
|
||||||
|
$somasarray[$index]->naam = $sombasis[$uitgavetype->code]->naam;
|
||||||
|
$somasarray[$index ]->som = round($sombasis[$uitgavetype->code]->som,0);
|
||||||
|
$regelsom += $somasarray[$index ]->som;
|
||||||
|
$index += 1;
|
||||||
|
};
|
||||||
|
$somasarray[$index] = new stdClass;
|
||||||
|
$somasarray[$index]->code ="REGELSOM";
|
||||||
|
$somasarray[$index]->naam = "Som";
|
||||||
|
$somasarray[$index]->som = $regelsom;
|
||||||
|
|
||||||
|
return $somasarray;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getbestuursbedragen(){
|
||||||
|
$targetorgid = $this->clean_input('orgid');
|
||||||
|
$kalenderjaarnr= $this->clean_input("jaarnr");
|
||||||
|
|
||||||
|
$subtot = new stdClass;
|
||||||
|
$subtot->basis =0;
|
||||||
|
$subtot->extra =0;
|
||||||
|
$subtot->som =0;
|
||||||
|
$subtot->budget =0;
|
||||||
|
$subtot->verschil =0;
|
||||||
|
|
||||||
|
$grandtot = new stdClass;
|
||||||
|
$grandtot->basis =0;
|
||||||
|
$grandtot->extra =0;
|
||||||
|
$grandtot->som =0;
|
||||||
|
$grandtot->budget =0;
|
||||||
|
$grandtot->verschil =0;
|
||||||
|
|
||||||
|
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
$targetorg->bestemmingen = $this->get_bestuur_bestemmingen($targetorgid, $kalenderjaarnr);
|
||||||
|
$targetorg->budgetten = $this->getbudgetten($targetorgid, $kalenderjaarnr,$targetorg->bestemmingen['som']);
|
||||||
|
|
||||||
|
$grandtot->basis = $targetorg->bestemmingen['basis'];
|
||||||
|
$grandtot->extra = $targetorg->bestemmingen['extra'];
|
||||||
|
$grandtot->som = $targetorg->bestemmingen['som'];
|
||||||
|
$grandtot->budget = $targetorg->budgetten->totaal;
|
||||||
|
$grandtot->verschil = $targetorg->budgetten->verschil;
|
||||||
|
|
||||||
|
//get de som van de uitgaven van de onderliggende organisaties
|
||||||
|
$soort = $targetorg->soort +1;
|
||||||
|
$organisaties = $this->Organisaties_model->getorgs($soort, $targetorgid, true);
|
||||||
|
$others =[];
|
||||||
|
if ($organisaties){
|
||||||
|
$index = 0;
|
||||||
|
foreach ($organisaties as $organisatie){
|
||||||
|
$orgids = $this->getorgids( $organisatie->id);
|
||||||
|
$others[$index] = new stdClass;
|
||||||
|
$others[$index]->naam = $organisatie->brin.'-'.$organisatie->naamkort;
|
||||||
|
$others[$index]->id = $organisatie->id;
|
||||||
|
$others[$index]->budget = $this->get_budgetten_inclusief($orgids, $kalenderjaarnr);
|
||||||
|
$others[$index]->bestemmingen = $this->get_bestemmingen_inclusief($orgids, $kalenderjaarnr);
|
||||||
|
$others[$index]->verschil = $others[$index]->budget->totaal - $others[$index]->bestemmingen->som;
|
||||||
|
$others[$index]->formVerschil = number_format($others[$index]->verschil, 0 ,',' , '.' );
|
||||||
|
$subtot->basis += $others[$index]->bestemmingen->basis;
|
||||||
|
$subtot->extra += $others[$index]->bestemmingen->extra;
|
||||||
|
$subtot->som += $others[$index]->bestemmingen->som;
|
||||||
|
$subtot->budget += $others[$index]->budget->totaal;
|
||||||
|
$subtot->verschil += $others[$index]->verschil;
|
||||||
|
$grandtot->basis += $others[$index]->bestemmingen->basis;
|
||||||
|
$grandtot->extra += $others[$index]->bestemmingen->extra;
|
||||||
|
$grandtot->som += $others[$index]->bestemmingen->som;
|
||||||
|
$grandtot->budget += $others[$index]->budget->totaal;
|
||||||
|
$grandtot->verschil += $others[$index]->verschil;
|
||||||
|
$index += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$targetorg->budgetten->basis = number_format($targetorg->budgetten->basis, 0, ',' , '.');
|
||||||
|
$targetorg->budgetten->extra = number_format($targetorg->budgetten->extra, 0, ',' , '.');
|
||||||
|
$targetorg->budgetten->totaal = number_format($targetorg->budgetten->totaal, 0, ',' , '.');
|
||||||
|
$targetorg->budgetten->verschil = number_format($targetorg->budgetten->verschil,0, ',' , '.');
|
||||||
|
|
||||||
|
$subtot->basis = number_format($subtot->basis,0 , ',' , '.');
|
||||||
|
$subtot->extra = number_format($subtot->extra,0 , ',' , '.');
|
||||||
|
$subtot->som = number_format($subtot->som,0 , ',' , '.');
|
||||||
|
$subtot->budget = number_format($subtot->budget,0 , ',' , '.');
|
||||||
|
$subtot->verschil = number_format($subtot->verschil,0 , ',' , '.');
|
||||||
|
|
||||||
|
$grandtot->basis = number_format($grandtot->basis,0 , ',' , '.');
|
||||||
|
$grandtot->extra = number_format($grandtot->extra,0 , ',' , '.');
|
||||||
|
$grandtot->som = number_format($grandtot->som,0 , ',' , '.');
|
||||||
|
$grandtot->budget = number_format($grandtot->budget,0 , ',' , '.');
|
||||||
|
$grandtot->verschil = number_format($grandtot->verschil,0 , ',' , '.');
|
||||||
|
// $result = $this->get_orgs_bestemmingen($orgids, $kalenderjaarnr);
|
||||||
|
|
||||||
|
echo json_encode(['targetorg' =>$targetorg,
|
||||||
|
'others' =>$others,
|
||||||
|
'subtot' =>$subtot,
|
||||||
|
'grandtot' =>$grandtot
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function get_bestemmingen_inclusief($orgids, $jaarnr){
|
||||||
|
$bestemmingen = new stdClass;
|
||||||
|
$bestemmingen->basis = $this->Finbestemmingen_model->getsompersoortoverorgsSummed($orgids, $jaarnr, 'BASIS');
|
||||||
|
$bestemmingen->formBasis = number_format($bestemmingen->basis,0, ',' , '.' );
|
||||||
|
$bestemmingen->extra = $this->Finbestemmingen_model->getsompersoortoverorgsSummed($orgids, $jaarnr, 'EXTRA');
|
||||||
|
$bestemmingen->formExtra = number_format($bestemmingen->extra,0, ',' , '.' );
|
||||||
|
$bestemmingen->som = $bestemmingen->basis + $bestemmingen->extra;
|
||||||
|
$bestemmingen->formSom = number_format($bestemmingen->som,0, ',' , '.' );
|
||||||
|
return $bestemmingen;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_budgetten_inclusief($orgids,$jaarnr){
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingenperjaaroverorgs($orgids, $jaarnr);
|
||||||
|
if ( ! $budgetten){
|
||||||
|
$budgetten = new stdClass;
|
||||||
|
$budgetten->basis = 0;
|
||||||
|
$budgetten->extra = 0;
|
||||||
|
$budgetten->totaal = 0;
|
||||||
|
}
|
||||||
|
$budgetten->formTotaal = number_format($budgetten->totaal, 0 , ',' , '.' );
|
||||||
|
return $budgetten;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getorgids($orgid){
|
||||||
|
$organisaties = array();
|
||||||
|
$level2 = array();
|
||||||
|
$level3 = array();
|
||||||
|
$idarray = array();
|
||||||
|
$idarray[] =$orgid;
|
||||||
|
$organisaties = $this->Organisaties_model->getorgsonder($orgid);
|
||||||
|
if ($organisaties){
|
||||||
|
foreach($organisaties as $organisatie){
|
||||||
|
$level2= $this->Organisaties_model->getorgsonder($organisatie->id);
|
||||||
|
if ($level2){
|
||||||
|
foreach($level2 as $l2){
|
||||||
|
$level3 = $this->Organisaties_model->getorgsonder($l2->id);
|
||||||
|
if($level3){
|
||||||
|
foreach($level3 as $l3){
|
||||||
|
$idarray[]=$l3->id;
|
||||||
|
};
|
||||||
|
}; // if level3
|
||||||
|
$idarray[]=$l2->id;
|
||||||
|
}
|
||||||
|
}; // if level2
|
||||||
|
$idarray[] = $organisatie->id;
|
||||||
|
}
|
||||||
|
}; // if organisaties
|
||||||
|
return implode(',', $idarray);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_bestuur_bestemmingen($orgid, $kalenderjaarnr){
|
||||||
|
|
||||||
|
$orgbestedingen = array();
|
||||||
|
$orgbestedingen['basis'] =0;
|
||||||
|
$orgbestedingen['formBasis'] ='' ;
|
||||||
|
$orgbestedingen['extra'] =0;
|
||||||
|
$orgbestedingen['formExtra'] = '';
|
||||||
|
$orgbestedingen['som'] =0;
|
||||||
|
$orgbestedingen['formSom'] = '';
|
||||||
|
|
||||||
|
$bestemmingenOrgZelf = $this->Finbestemmingen_model->getsompersoortoverorgs($orgid, $kalenderjaarnr);
|
||||||
|
|
||||||
|
if ($bestemmingenOrgZelf){
|
||||||
|
foreach($bestemmingenOrgZelf as $besteding){
|
||||||
|
switch ($besteding->categorie){
|
||||||
|
case "BASIS": $orgbestedingen['basis'] = $besteding->bedrag;
|
||||||
|
$orgbestedingen['formBasis'] = number_format($besteding->bedrag,0, ',' , '.' );
|
||||||
|
break;
|
||||||
|
case "EXTRA": $orgbestedingen['extra'] = $besteding->bedrag;
|
||||||
|
$orgbestedingen['formExtra'] = number_format($besteding->bedrag,0, ',' , '.' );
|
||||||
|
break;
|
||||||
|
};// switch
|
||||||
|
$orgbestedingen['som'] += $besteding->bedrag;
|
||||||
|
}; // foreach bestedingen
|
||||||
|
} ; // if bestedingen
|
||||||
|
$orgbestedingen['formSom']=number_format($orgbestedingen['som'] ,0, ',' , '.' );
|
||||||
|
return $orgbestedingen;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getbudgetten($orgid, $kalenderjaarnr, $som){
|
||||||
|
$budgetten =$this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
if (!$budgetten){
|
||||||
|
$budgetten=new stdClass;
|
||||||
|
$budgetten->basis = 0;
|
||||||
|
$budgetten->extra = 0;
|
||||||
|
}
|
||||||
|
$budgetten->basis = $budgetten->basis / 100;
|
||||||
|
$budgetten->extra = $budgetten->extra / 100;
|
||||||
|
$budgetten->totaal =$budgetten->basis + $budgetten->extra;
|
||||||
|
$budgetten->verschil = $budgetten->basis + $budgetten->extra - $som;
|
||||||
|
return $budgetten;
|
||||||
|
}
|
||||||
|
function getbestuurperuitgavetype(){
|
||||||
|
$targetorgid = $this->clean_input('orgid');
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
list($targetorg->pms,$otherorgs) = $this->get_bestuur_pms($targetorgid, $kalenderjaarnr);
|
||||||
|
$sumother = $this->getsumotherpms($otherorgs);
|
||||||
|
$sumtot = $this->getsumtotpms($targetorg, $sumother);
|
||||||
|
|
||||||
|
$targetorg->pms = $this->format_all_bedragen($targetorg->pms);
|
||||||
|
$sumother = $this->format_all_bedragen($sumother);
|
||||||
|
$sumtot = $this->format_all_bedragen($sumtot);
|
||||||
|
if ($otherorgs){
|
||||||
|
foreach($otherorgs as $otherorg){
|
||||||
|
$otherorg->pms = $this->format_all_bedragen($otherorg->pms);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(['targetorg' => $targetorg,
|
||||||
|
'otherorgs' => $otherorgs,
|
||||||
|
'sumother' => $sumother,
|
||||||
|
'sumtot' => $sumtot]);
|
||||||
|
}
|
||||||
|
function format_all_bedragen($pms){
|
||||||
|
|
||||||
|
for ($i = 0 ; $i <=5; $i++){
|
||||||
|
if ($pms[$i] >0 ) $pms[$i]=number_format($pms[$i], 0, ',' , '.');
|
||||||
|
else $pms[$i]='';
|
||||||
|
}
|
||||||
|
return $pms;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_bestuur_pms($targetorgid, $kalenderjaarnr){
|
||||||
|
$pms = $this->Finbestemmingen_model->get_pms($targetorgid, $kalenderjaarnr);
|
||||||
|
$targetorg->pms[0] = 0;
|
||||||
|
$targetorg->pms[1] = 0;
|
||||||
|
$targetorg->pms[2] = 0;
|
||||||
|
$targetorg->pms[3] = 0;
|
||||||
|
$targetorg->pms[4] = 0;
|
||||||
|
$targetorg->pms[5] = 0;
|
||||||
|
if ($pms){
|
||||||
|
foreach($pms as $uitgave){
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="PERSONEEL") $targetorg->pms[0] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="MATERIEEL") $targetorg->pms[1] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="SCHOLING") $targetorg->pms[2] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="PERSONEEL") $targetorg->pms[3] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="MATERIEEL") $targetorg->pms[4] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="SCHOLING") $targetorg->pms[5] += $uitgave->bedrag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$organisaties = $this->Organisaties_model->getorgs2($targetorgid);
|
||||||
|
|
||||||
|
if ($organisaties){
|
||||||
|
foreach($organisaties as $organisatie){
|
||||||
|
$org_plus_subs = $this->getorgids($organisatie->orgid);
|
||||||
|
if (! $org_plus_subs) {$org_plus_subs = $organisatie->orgid;};
|
||||||
|
$pms = $this->Finbestemmingen_model->get_pms($org_plus_subs, $kalenderjaarnr);
|
||||||
|
$organisatie->pms[0] = 0;
|
||||||
|
$organisatie->pms[1] = 0;
|
||||||
|
$organisatie->pms[2] = 0;
|
||||||
|
$organisatie->pms[3] = 0;
|
||||||
|
$organisatie->pms[4] = 0;
|
||||||
|
$organisatie->pms[5] = 0;
|
||||||
|
if ($pms){
|
||||||
|
foreach($pms as $uitgave){
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="PERSONEEL") $organisatie->pms[0] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="MATERIEEL") $organisatie->pms[1] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "BASIS" && $uitgave->uitgavetype=="SCHOLING") $organisatie->pms[2] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="PERSONEEL") $organisatie->pms[3] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="MATERIEEL") $organisatie->pms[4] += $uitgave->bedrag;
|
||||||
|
if ($uitgave->categorie == "EXTRA" && $uitgave->uitgavetype=="SCHOLING") $organisatie->pms[5] += $uitgave->bedrag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if organisaties
|
||||||
|
return [$targetorg->pms , $organisaties];
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsumtotpms($targetorg, $sumother){
|
||||||
|
$sumtot = [];
|
||||||
|
if (! $sumother || ! $targetorg) return $sumtot;
|
||||||
|
$sumtot[0] = $targetorg->pms[0] + $sumother[0];
|
||||||
|
$sumtot[1] = $targetorg->pms[1] + $sumother[1];
|
||||||
|
$sumtot[2] = $targetorg->pms[2] + $sumother[2];
|
||||||
|
$sumtot[3] = $targetorg->pms[3] + $sumother[3];
|
||||||
|
$sumtot[4] = $targetorg->pms[4] + $sumother[4];
|
||||||
|
$sumtot[5] = $targetorg->pms[5] + $sumother[5];
|
||||||
|
return $sumtot;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsumotherpms($otherorgs){
|
||||||
|
$sumother =[];
|
||||||
|
if (! $otherorgs) return $sumother;
|
||||||
|
$sumother[0] = 0;
|
||||||
|
$sumother[1] = 0;
|
||||||
|
$sumother[2] = 0;
|
||||||
|
$sumother[3] = 0;
|
||||||
|
$sumother[4] = 0;
|
||||||
|
$sumother[5] = 0;
|
||||||
|
foreach($otherorgs as $org){
|
||||||
|
if ($org->pms){
|
||||||
|
$sumother[0] += $org->pms[0];
|
||||||
|
$sumother[1] += $org->pms[1];
|
||||||
|
$sumother[2] += $org->pms[2];
|
||||||
|
$sumother[3] += $org->pms[3];
|
||||||
|
$sumother[4] += $org->pms[4];
|
||||||
|
$sumother[5] += $org->pms[5];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sumother;
|
||||||
|
}
|
||||||
|
|
||||||
|
function PdfFinancien(){
|
||||||
|
$input = json_decode($this->input->post('data'));
|
||||||
|
|
||||||
|
$soort = $input->soort;
|
||||||
|
switch ($soort){
|
||||||
|
case 0 : $titel = "Gesommeerde bestedingen onderliggende organisaties"; break;
|
||||||
|
case 1 : $titel = "Details eigen organisatie"; break;
|
||||||
|
case 2 : $titel = "Gesommeerde uitgaven personeel, materieel en scholing"; break;
|
||||||
|
case 3 : $titel = "Details onderliggende organisaties" ; break;
|
||||||
|
default: $titel = "Rapport";
|
||||||
|
}
|
||||||
|
$data = ['inhoud' =>$input->html,
|
||||||
|
'jaar' => $input->jaar,
|
||||||
|
'org' => $input->org,
|
||||||
|
'titel' => $titel];
|
||||||
|
$html = $this->load->view("monpas/reports/financien", $data, true);
|
||||||
|
$filenaam ="financien";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, TRUE, [50,50,100, 70], 'LANDSCAPE');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Beheer extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
"monpas/Menus_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Indicatoren_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getmodules(){
|
||||||
|
$modules = $this->Modules_model->getmodulesmetlijst();
|
||||||
|
echo json_encode($modules);
|
||||||
|
}
|
||||||
|
function getversies(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$module=$this->uri->segment(4);
|
||||||
|
$versies=$this->Versies_model->getallversies($module);
|
||||||
|
if ($versies){
|
||||||
|
foreach($versies as $versie){
|
||||||
|
$versie->ingangsdatum = mysql2date($versie->ingangsdatum);
|
||||||
|
$versie->systemnorm = str_replace('.', ',', $versie->systemnorm);
|
||||||
|
$versie->deleteok = true;
|
||||||
|
//TODO deleteok bepalen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($versies);
|
||||||
|
}
|
||||||
|
function insertversie(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid || !$this->super) die;
|
||||||
|
$naam = $this->clean_input("nieuwnaam");
|
||||||
|
$module = $this->clean_input("module");
|
||||||
|
$id = $this->Versies_model->insert_record(array( 'naam' =>$naam ,
|
||||||
|
'modulenr' =>$module,
|
||||||
|
'ingangsdatum' =>date('Y-m-d')));
|
||||||
|
$versie = $this->Versies_model->getversie($id);
|
||||||
|
|
||||||
|
$versie->ingangsdatum =mysql2date($versie->ingangsdatum);
|
||||||
|
$versie->systemnorm = str_replace('.', ',', $versie->systemnorm);
|
||||||
|
$versie->deleteok = true;
|
||||||
|
echo json_encode($versie);
|
||||||
|
}
|
||||||
|
function updateversie(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid || !$this->super) die;
|
||||||
|
$data = array('naam' => $this->clean_input('naam') ,
|
||||||
|
'ingangsdatum' =>date2mysql($this->clean_input('ingangsdatum')),
|
||||||
|
'systemnorm' => str_replace(',', '.', $this->clean_input('systemnorm') ));
|
||||||
|
$this->Versies_model->update_record($data, $this->clean_input('id'));
|
||||||
|
}
|
||||||
|
function deleteversie(){
|
||||||
|
// TODO clean input en controleer foreign key afhankelijkheden
|
||||||
|
if (!$this->userid || !$this->super) die;
|
||||||
|
$errortekst='';
|
||||||
|
if (! $this->writer) {$errortekst ="U bent niet geautoriseerd om versies te verwijderen.";}
|
||||||
|
else {
|
||||||
|
$versieid = $this->uri->segment(4);
|
||||||
|
$this->Versies_model->delete_record($versieid);
|
||||||
|
}
|
||||||
|
echo json_encode($errortekst);
|
||||||
|
}
|
||||||
|
function getijkpunten(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid ) die;
|
||||||
|
$versieid = $this->uri->segment(4);
|
||||||
|
$ijkpunten = $this->Ijkpunten_model->getijkpunten1($versieid);
|
||||||
|
if ($ijkpunten){
|
||||||
|
foreach($ijkpunten as $ijkpunt){
|
||||||
|
$ijkpunt->indicatoren= $this->Indicatoren_model->getindicatoren($ijkpunt->id);
|
||||||
|
}; // foreach
|
||||||
|
}; // if ijkpunten
|
||||||
|
echo json_encode($ijkpunten);
|
||||||
|
}
|
||||||
|
function insertijkpunt(){
|
||||||
|
if (!$this->userid ) die;
|
||||||
|
$data=array('nummer' => $this->clean_input("nummer"),
|
||||||
|
"versie_id" => $this->clean_input("versie_id"),
|
||||||
|
'omschrijving' => $this->clean_input('omschrijving'),
|
||||||
|
'toelichting' => $this->clean_input('toelichting') );
|
||||||
|
$id = $this->Ijkpunten_model->insert_record( $data);
|
||||||
|
$ijkpunt = $this->Ijkpunten_model->getijkpunt($id);
|
||||||
|
echo json_encode($ijkpunt);
|
||||||
|
}
|
||||||
|
function updateijkpunt(){
|
||||||
|
if (!$this->userid ) die;
|
||||||
|
//TODO clean input
|
||||||
|
$data= array('nummer' => $this->clean_input("nummer"),
|
||||||
|
"versie_id" => $this->clean_input("versie_id"),
|
||||||
|
"omschrijving" => $this->clean_input("omschrijving"),
|
||||||
|
"toelichting" =>$this->clean_input("toelichting") );
|
||||||
|
$this->Ijkpunten_model->update_record($data, $this->clean_input('id'));
|
||||||
|
}
|
||||||
|
function deleteijkpunt(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid || ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <= 0)) {die;};
|
||||||
|
$ijkid =$this->uri->segment(4);
|
||||||
|
$this->Ijkpunten_model->delete_record($ijkid);
|
||||||
|
}
|
||||||
|
function insertindicator(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid || ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <= 0)) {die;};
|
||||||
|
|
||||||
|
$data=array("ijkpunt_id" => $this->clean_input('ijkpunt_id'),
|
||||||
|
"nummer" => $this->clean_input('nummer' ),
|
||||||
|
"gewicht" => str_replace(',','.', $this->clean_input('gewicht')),
|
||||||
|
"inspectie" =>$this->clean_input('inspectie'),
|
||||||
|
"omschrijving1" => $this->clean_input('omschrijving1'),
|
||||||
|
"omschrijving2" => $this->clean_input('omschrijving2')
|
||||||
|
);
|
||||||
|
$id = $this->Indicatoren_model->insert_record($data);
|
||||||
|
$indicator = $this->Indicatoren_model->getindicator($id);
|
||||||
|
$indicator->deleteok = true;
|
||||||
|
echo json_encode($indicator);
|
||||||
|
}
|
||||||
|
function deleteindicator(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->writer || !$this->userid) return;
|
||||||
|
$this->Indicatoren_model->delete_record($this->uri->segment(4));
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
function updateindicator(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->writer || !$this->userid) return;
|
||||||
|
$indicatorid = $this->clean_input("id");
|
||||||
|
$data = array('nummer' => $this->clean_input("nummer"),
|
||||||
|
"omschrijving1" => $this->clean_input("omschrijving1"),
|
||||||
|
"omschrijving2" => $this->clean_input("omschrijving2"),
|
||||||
|
"inspectie" => $this->clean_input("inspectie"),
|
||||||
|
"gewicht" => $this->clean_input("gewicht"));
|
||||||
|
$this->Indicatoren_model->update_record($data, $indicatorid);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,367 @@
|
|||||||
|
<?php if ( ! defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
|
||||||
|
|
||||||
|
class Berichten extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"shared/Users_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"shared/Autorisaties_model",
|
||||||
|
"monpas/Berichten_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Modulebericht_model",
|
||||||
|
"monpas/Getoondeberichten_model",
|
||||||
|
"shared/Session_model",
|
||||||
|
);
|
||||||
|
$this->load->model( $models );
|
||||||
|
$this->load->helper( 'string' );
|
||||||
|
if ( ! $this->check_online_status() )
|
||||||
|
{
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkrechten()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
$niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
|
||||||
|
if ( $niveau == 1 || $niveau == 2 )
|
||||||
|
{
|
||||||
|
echo json_encode( TRUE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo json_encode( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkadmin(){
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
$niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
|
||||||
|
return $niveau;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getberichten()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
|
||||||
|
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
$niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
if ( $niveau == 1 || $niveau == 2 )
|
||||||
|
{
|
||||||
|
$berichten = $this->Berichten_model->getalleberichten();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$inlog = $this->Users_model->get_fieldvalue( array("id" => $this->userid), "inlogdatum" );
|
||||||
|
|
||||||
|
$berichten = $this->Berichten_model->getberichten( $this->userid);
|
||||||
|
}
|
||||||
|
|
||||||
|
$berichten = $this->displayMessages( $berichten );
|
||||||
|
|
||||||
|
echo json_encode( $berichten );
|
||||||
|
}
|
||||||
|
|
||||||
|
function getberichtenVoorpagina()
|
||||||
|
{
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
$niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
if ( $niveau == 1 || $niveau == 2 )
|
||||||
|
{
|
||||||
|
$berichten = $this->Berichten_model->getalleberichten();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$frontpage = true;
|
||||||
|
$berichten = $this->Berichten_model->getberichten( $this->userid, $frontpage);
|
||||||
|
|
||||||
|
foreach($berichten ? $berichten :[] as $bericht){
|
||||||
|
$getoond = $this->Getoondeberichten_model->insert_record(array("bericht_id" => $bericht->id, "user_id" => $this->userid));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$berichten = $this->displayMessages( $berichten );
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode( $berichten );
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAdminBerichten()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$berichten = $this->Berichten_model->getalleberichten();
|
||||||
|
if ( ! $berichten )
|
||||||
|
{
|
||||||
|
$berichten = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$berichten = $this->displayMessages( $berichten );
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode( $berichten );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function displayMessages( $berichten )
|
||||||
|
{
|
||||||
|
foreach ( $berichten ? $berichten : [] as $bericht )
|
||||||
|
{
|
||||||
|
$bericht->datum = mysql2date( $bericht->startdatum );
|
||||||
|
$bericht->inhoud = nl2br( base64_decode( $bericht->inhoud ) );
|
||||||
|
}
|
||||||
|
return $berichten;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getmodules()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$berichtid = $this->uri->segment( 4 );
|
||||||
|
$clusters = $this->Modules_model->getclusters();//haal alle cluster op
|
||||||
|
|
||||||
|
if ( ! $clusters )
|
||||||
|
{
|
||||||
|
echo json_encode( FALSE );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for ( $i = 0; $i < count( $clusters ); $i ++ )
|
||||||
|
{//haal bijbehorende modules op
|
||||||
|
$clusterid = $clusters[ $i ]->clusterid;
|
||||||
|
$clusters[ $i ]->modules = $this->Modules_model->getmodulesbijcluster( $clusterid );
|
||||||
|
}
|
||||||
|
|
||||||
|
$bclusters = $this->Berichten_model->getberichtclusters( $berichtid );// haal de clusters op waaraan het bericht is gelinkt
|
||||||
|
|
||||||
|
|
||||||
|
if ( $bclusters )
|
||||||
|
{
|
||||||
|
for ( $i = 0; $i < count( $bclusters ); $i ++ )
|
||||||
|
{//haal bijbehorende modules op waaraan het bericht is gelinkt
|
||||||
|
$bclusterid = $bclusters[ $i ]->clusterid;
|
||||||
|
$bclusters[ $i ]->bmodules = $this->Berichten_model->getberichtmodules( $bclusterid, $berichtid );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$clusterZ = new stdClass();//cluster object voor ongeclusterde modules
|
||||||
|
$clusterZ->clusterid = 0;
|
||||||
|
$clusterZ->naam = "Ongeclusterd";
|
||||||
|
$clusterZ->modules = $this->Modules_model->getmodulesbijcluster( 0 );
|
||||||
|
|
||||||
|
if ( isset( $clusterZ->modules ) )
|
||||||
|
{
|
||||||
|
foreach ( $clusterZ->modules as $moduleZ )
|
||||||
|
{
|
||||||
|
|
||||||
|
$gelinkt = $this->Berichten_model->getberichtenbijmodule( $berichtid, $moduleZ->modulenr );//haal berichten op die bij de ongeclusterde modules horen
|
||||||
|
if ( $gelinkt )
|
||||||
|
{
|
||||||
|
$moduleZ->vinkje = 'T';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$moduleZ->vinkje = 'F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $bclusters )
|
||||||
|
{
|
||||||
|
|
||||||
|
$y = 0;
|
||||||
|
$n = $y;
|
||||||
|
for ( $y = 0; $y < count( $clusters ); $y ++ )
|
||||||
|
{ ////ga per cluster een bericht bij hoort, dan true
|
||||||
|
if ( isset( $bclusters[ $n ] ) )
|
||||||
|
if ( $clusters[ $y ]->clusterid == $bclusters[ $n ]->clusterid )
|
||||||
|
{
|
||||||
|
// $clusters[$y]->vinkje = 'T';
|
||||||
|
$s = 0;
|
||||||
|
$v = $s;
|
||||||
|
$aantal = count( $clusters[ $y ]->modules );//ga per module na of er een bericht bij hoort, dan true
|
||||||
|
$clusters[ $y ]->aantal = $aantal;
|
||||||
|
for ( $s = 0; $s < $aantal; $s ++ )
|
||||||
|
{
|
||||||
|
if ( isset( $bclusters[ $n ]->bmodules[ $v ] ) )
|
||||||
|
{
|
||||||
|
if ( $clusters[ $y ]->modules[ $s ]->modulenr == $bclusters[ $n ]->bmodules[ $v ]->modulenr )
|
||||||
|
{
|
||||||
|
$clusters[ $y ]->modules[ $s ]->vinkje = 'T';
|
||||||
|
$v ++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$clusters[ $y ]->modules[ $s ]->vinkje = 'F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$clusters[ $y ]->modules[ $s ]->vinkje = 'F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$n ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $clusterZ->modules )
|
||||||
|
{//voeg de ongeclusterde modules met berichtinfo toe aan de clusterarray
|
||||||
|
array_unshift( $clusters, $clusterZ );
|
||||||
|
}
|
||||||
|
echo json_encode( $clusters );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function saveBericht()
|
||||||
|
{
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$berichtID = $this->uri->segment( 4 );
|
||||||
|
$datum = str_replace( '/', '-', $this->input->post( 'datum' ));
|
||||||
|
$samenvatting = $this->input->post( 'samenvatting' );
|
||||||
|
$inhoud = $this->input->post( 'inhoud' );
|
||||||
|
$samenvatting = stripslashes( implode( "", explode( "\\", $samenvatting )));
|
||||||
|
if (! $samenvatting || ! strlen( $samenvatting )> 3){
|
||||||
|
$this->deletebericht($berichtID);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $inhoud || ! strlen( $inhoud )> 9){
|
||||||
|
$this->deletebericht($berichtID);
|
||||||
|
}
|
||||||
|
$inhoud = base64_encode( $inhoud );
|
||||||
|
|
||||||
|
if (!$datum)
|
||||||
|
{ $datum = date( 'Y-m-d G:i:s' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$berichtID = $this->Berichten_model->save_record( [
|
||||||
|
'startdatum' => date2mysql( $datum ),
|
||||||
|
'samenvatting' => $samenvatting,
|
||||||
|
'inhoud' => $inhoud
|
||||||
|
], $berichtID );
|
||||||
|
|
||||||
|
echo json_encode( $berichtID );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create_empty_bericht()
|
||||||
|
{
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->Berichten_model->insert_record( ['startdatum' => date( 'Y-m-d H:i:s' )] );
|
||||||
|
}
|
||||||
|
|
||||||
|
function koppelmodule()
|
||||||
|
{
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$vinkje = $this->clean_input( "modulevinkje" );
|
||||||
|
$berichtid = $this->clean_input( "berichtid" );
|
||||||
|
$modulenr = $this->clean_input( "moduleid" );
|
||||||
|
|
||||||
|
$mededeling = "er is iets mis gegaan";
|
||||||
|
if ( $vinkje && $berichtid && $modulenr )
|
||||||
|
{
|
||||||
|
if ( $vinkje == 'T' )
|
||||||
|
{
|
||||||
|
$this->Modulebericht_model->insert_record( array("modulenr" => $modulenr, "bericht_id" => $berichtid) );
|
||||||
|
$mededeling = "het bericht is gekoppeld";
|
||||||
|
}
|
||||||
|
if ( $vinkje == 'F' )
|
||||||
|
{
|
||||||
|
$this->Modulebericht_model->delete_record_where( array("modulenr" => $modulenr, "bericht_id" => $berichtid) );
|
||||||
|
$mededeling = "de koppeling is verwijderd";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode( $mededeling );
|
||||||
|
}
|
||||||
|
|
||||||
|
function koppelcluster()
|
||||||
|
{
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$vinkje = $this->clean_input( "clustervinkje" );
|
||||||
|
$berichtid = $this->clean_input( "berichtid" );
|
||||||
|
$clusterid = $this->clean_input( "clusterid" );
|
||||||
|
$mededeling = "er is iets mis gegaan";
|
||||||
|
if ( $vinkje && $berichtid && $clusterid >= 0 )
|
||||||
|
{
|
||||||
|
$modules = $this->Modules_model->get_records_where( array("cluster_id" => $clusterid) );
|
||||||
|
if ( $vinkje == 'T' )
|
||||||
|
{
|
||||||
|
foreach ( $modules as $module )
|
||||||
|
{
|
||||||
|
|
||||||
|
$newid = $this->Modulebericht_model->insert_record( array("modulenr" => $module->sysnr, "bericht_id" => $berichtid) );
|
||||||
|
}
|
||||||
|
$mededeling = "het bericht is gekoppeld";
|
||||||
|
}
|
||||||
|
if ( $vinkje == 'F' )
|
||||||
|
{
|
||||||
|
foreach ( $modules as $module )
|
||||||
|
{
|
||||||
|
$this->Modulebericht_model->delete_record_where( array("modulenr" => $module->sysnr, "bericht_id" => $berichtid) );
|
||||||
|
}
|
||||||
|
$mededeling = "de koppelingen zijn verwijderd";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode( $mededeling );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function berichtomwegtegooien($berichtid){
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$admin = $this->checkadmin();
|
||||||
|
if(!$admin = 1 || !$admin = 2){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$berichtid = $this->uri->segment( 4 );
|
||||||
|
if ( $berichtid )
|
||||||
|
{
|
||||||
|
$this->deletebericht($berichtid);
|
||||||
|
echo json_encode( 'bericht verwijderd' );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo json_encode( 'er is iets misgegaan' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deletebericht($berichtid)
|
||||||
|
{if ( ! $this->userid ) die;
|
||||||
|
$this->Berichten_model->delete_record( $berichtid );
|
||||||
|
$this->Modulebericht_model->delete_record_where( array('bericht_id' => $berichtid) );
|
||||||
|
$this->Getoondeberichten_model->delete_record_where( array('bericht_id' => $berichtid) );
|
||||||
|
return(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Compactsop extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"Docx_model",
|
||||||
|
"monpas/Arrangementen_model",
|
||||||
|
"monpas/Arrangementen_piv_aantal_model",
|
||||||
|
"monpas/Compactsop_model",
|
||||||
|
"monpas/Compactsoponderdelen_model",
|
||||||
|
"monpas/Diversiteits_model",
|
||||||
|
"monpas/Filledversions_model",
|
||||||
|
"monpas/Groepen_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Indicatoren_model",
|
||||||
|
"shared/Kalenderjaren_model",
|
||||||
|
"shared/Aantalleerlingen_model",
|
||||||
|
"shared/Licenties_model",
|
||||||
|
"monpas/Menus_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Ondersteuningtijden_model",
|
||||||
|
"monpas/Oordelen_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"shared/Schooljaren_model",
|
||||||
|
"monfin2/Finbestemmingen_model",
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"Phantom_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Sop_model",
|
||||||
|
"monpas/Sopinhouden_model",
|
||||||
|
"monpas/Sopviews_model",
|
||||||
|
"monpas/Tlvs_model"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getrechten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$editok = false;
|
||||||
|
$autorisatie = $this->Autorisaties_model->check_autorisatie($this->userrole,259 );
|
||||||
|
|
||||||
|
if ( $autorisatie> 0) $editok = true;
|
||||||
|
echo json_encode($editok);
|
||||||
|
}
|
||||||
|
|
||||||
|
function controleerschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$school = false;
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie && $organisatie->soort == 4) $school = true;
|
||||||
|
echo json_encode($school);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSchooljaren(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||||
|
echo json_encode($schooljaren);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCompactSop(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$schooljaar = $this->uri->segment(4);
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(['organisatie_id'=>$orgid, 'schooljaarnummer'=>$schooljaar], 'id');
|
||||||
|
echo json_encode($compactsopID);
|
||||||
|
}
|
||||||
|
|
||||||
|
function download_pdf(){
|
||||||
|
$fileID = $this->uri->segment( 4 );
|
||||||
|
$this->Compactsop_model->downloadCompactSop ( $fileID );
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOnderdelenEnVersies(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaar = $this->uri->segment(4);
|
||||||
|
$compacteVersies = new CompacteVersies($schooljaar);
|
||||||
|
$onderdelen = $compacteVersies->getOnderdelen();
|
||||||
|
|
||||||
|
echo json_encode($onderdelen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSchoolgegevens(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$school = $this->Schooldetails_model->getschool($this->globorgid);
|
||||||
|
if(!$school){
|
||||||
|
$school = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
}
|
||||||
|
echo json_encode($school);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveSchool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$id = $this->clean_input('id');
|
||||||
|
if($id != $this->globorgid) return;
|
||||||
|
$straat = strip_slashes($this->clean_input('straat'));
|
||||||
|
$plaats = strip_slashes($this->clean_input('plaats'));
|
||||||
|
$foon = strip_slashes($this->clean_input('telefoon'));
|
||||||
|
$mail = strip_slashes($this->clean_input('email1'));
|
||||||
|
$web = strip_slashes($this->clean_input('web'));
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'straat' => $straat,
|
||||||
|
'plaats' => $plaats,
|
||||||
|
'telefoon' => $foon,
|
||||||
|
'email1' => $mail,
|
||||||
|
'web' => $web,
|
||||||
|
'organisatie_id' => $id
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$this->Organisaties_model->update_record(['plaats' =>$plaats], $id);
|
||||||
|
|
||||||
|
$detailid = $this->Schooldetails_model->get_fieldvalue(['organisatie_id'=>$id], 'id');
|
||||||
|
if($detailid){
|
||||||
|
$this->Schooldetails_model->update_record($data,$detailid);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$detailid = $this->Schooldetails_model->insert_record($data);
|
||||||
|
}
|
||||||
|
echo json_encode($detailid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakPDF(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$onderdelen = $this->input->post('onderdelen');
|
||||||
|
$omvangjaren = $this->clean_input('jaren');
|
||||||
|
|
||||||
|
$compact = new CompacteOnderdelen($schooljaarnr, $onderdelen, $omvangjaren);
|
||||||
|
$compacteonderdelen = $compact->getCompacteOnderdelen();
|
||||||
|
$schoolID = $this->globorgid;
|
||||||
|
$html = (new CompactePaginas($compacteonderdelen))->getHtml();
|
||||||
|
|
||||||
|
file_put_contents(MYROOTPATH.'public/tmp/temp'.$schoolID.'.html', $html);
|
||||||
|
|
||||||
|
echo json_encode($this->globorgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function uploadLogo($schoolID)
|
||||||
|
{
|
||||||
|
$savePath = MYROOTPATH.'public/images/logos/';
|
||||||
|
$this->load->helper('string');
|
||||||
|
$pathParts = pathinfo($_FILES['image_file']['name']);
|
||||||
|
$extension = $pathParts['extension'];
|
||||||
|
|
||||||
|
$filename = random_string('alnum', 15).'.'.$extension;
|
||||||
|
$source = $_FILES['image_file']['tmp_name'];
|
||||||
|
$target = $savePath.$filename;
|
||||||
|
rename($source, $target );
|
||||||
|
//TODO: unlink eventueel oud logo
|
||||||
|
$logo = $this->Schooldetails_model->getLogo($schoolID);
|
||||||
|
$padNaam = $savePath.$logo;
|
||||||
|
unlink($padNaam);
|
||||||
|
$this->Schooldetails_model->update_record_where(['logo'=>$filename], ['organisatie_id' =>$schoolID]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLogo(){
|
||||||
|
$schoolID = $this->clean_input('schoolID');
|
||||||
|
$logo =$this->Schooldetails_model->getLogo($schoolID);
|
||||||
|
$this->json($logo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Diversiteit extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
"monpas/Ondersteuningsvormen_model",
|
||||||
|
"monpas/Aantalxondersteuningsvorm_model",
|
||||||
|
"monpas/Leerkrachten_model",
|
||||||
|
"monpas/Groepen_model",
|
||||||
|
"shared/Schooljaren_model","Phantom_model",
|
||||||
|
"monpas/Ondersteuningtijden_model",
|
||||||
|
"monpas/Dq_model",
|
||||||
|
"monpas/Diversiteits_model",
|
||||||
|
"monpas/Combifactoren_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getgroepen(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input('orgID');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$module = $this->clean_input('module');
|
||||||
|
$groepen = $this->Groepen_model->getgroepen($orgid, $schooljaarnr, $module);
|
||||||
|
|
||||||
|
if ($groepen) {
|
||||||
|
foreach ($groepen as $groep) {
|
||||||
|
$groepasarray = explode(';', $groep->niveau);
|
||||||
|
$groep->combi = count($groepasarray);
|
||||||
|
|
||||||
|
$groep->tijden = new stdClass;
|
||||||
|
$groep->tijden = $this->Ondersteuningtijden_model->getgroeptijden($groep->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($groepen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getgroepenso(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$ondersteuning = 'T';
|
||||||
|
$groepen = $this->Groepen_model->getgroepenSboSo($orgid, $schooljaarnr);
|
||||||
|
if($groepen) {
|
||||||
|
foreach ($groepen as $groep) {
|
||||||
|
if($groep->ondersteuning == 'F'){
|
||||||
|
$ondersteuning = 'F';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$groepasarray = explode(';', $groep->niveau);
|
||||||
|
$groep->combi = count($groepasarray);
|
||||||
|
|
||||||
|
$groep->tijden = new stdClass;
|
||||||
|
$groep->tijden = $this->Ondersteuningtijden_model->getgroeptijden($groep->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(['groepen' =>$groepen, 'ondersteuning' =>$ondersteuning]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getondersteuningsvormen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$module = $this->clean_input("module");
|
||||||
|
$minnivo = $this->clean_input("minnivo");
|
||||||
|
$maxnivo = $this->clean_input("maxnivo");
|
||||||
|
|
||||||
|
$os =$this->Diversiteits_model->getosvormen($orgid, $schooljaarnr, $minnivo, $maxnivo, $module);
|
||||||
|
echo json_encode($os);
|
||||||
|
}
|
||||||
|
|
||||||
|
function pdfdiversiteitbar(){
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$inputimage = $input->image;
|
||||||
|
$orgid = $input->orgid;
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($orgid);
|
||||||
|
|
||||||
|
$schooljaarnr = $input->schooljaarnr;
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$schooljaarnr),"naam");
|
||||||
|
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$data= array("organisatie" => $organisatie,
|
||||||
|
"inputimage" => $inputimage,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today);
|
||||||
|
$html = $this->load->view("monpas/reports/diversiteitbar", $data, true);
|
||||||
|
$filenaam="diversiteit";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printaantallen(){
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$schooljaarnr),"naam");
|
||||||
|
|
||||||
|
$schooltotaal = 0;
|
||||||
|
$schoolgewogentot = 0;
|
||||||
|
$schoolsom1 = 0;
|
||||||
|
$schoolsom2 = 0;
|
||||||
|
$schoolsom3 = 0;
|
||||||
|
$schoolsom4 = 0;
|
||||||
|
$schooldiversiteit = 0;
|
||||||
|
$schooldq = 0;
|
||||||
|
|
||||||
|
$groepen = $this->Groepen_model->getgroepen($orgid, $schooljaarnr);
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep){
|
||||||
|
$schooltotaal = $schooltotaal + $groep->totaantal;
|
||||||
|
$schoolsom1 = $schoolsom1 + $groep->som1;
|
||||||
|
$schoolsom2 = $schoolsom2 + $groep->som2;
|
||||||
|
$schoolsom3 = $schoolsom3 + $groep->som3;
|
||||||
|
$schoolsom4 = $schoolsom4 + $groep->som4;
|
||||||
|
$schooldiversiteit = $schooldiversiteit + $groep->som1 + (1.5 * $groep->som2) + (2 * $groep->som3) + (4 * $groep->som4) ;
|
||||||
|
if ((strpos($groep->niveau, '1') !== false) || (strpos($groep->niveau, '2') !== false) ){
|
||||||
|
$schoolgewogentot = $schoolgewogentot + 22; }
|
||||||
|
else {
|
||||||
|
$schoolgewogentot = $schoolgewogentot + 24; }
|
||||||
|
}; // foreach
|
||||||
|
}// if
|
||||||
|
$schooldq = round($schooldiversiteit / $schoolgewogentot , 2);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$aantalgroepen = sizeof($groepen);
|
||||||
|
$richtlijn=array('85%', '10%','3%','25');
|
||||||
|
$data=array('organisatie' => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"schooltotaal" => $schooltotaal,
|
||||||
|
"schooldiversiteit" => $schooldiversiteit,
|
||||||
|
"schooldq" => $schooldq,
|
||||||
|
"schoolgewogentot"=>$schoolgewogentot,
|
||||||
|
"schoolsom1" => $schoolsom1,
|
||||||
|
"schoolsom2" => $schoolsom2,
|
||||||
|
"schoolsom3" => $schoolsom3,
|
||||||
|
"schoolsom4" => $schoolsom4,
|
||||||
|
"aantalgroepen" =>$aantalgroepen,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"richtlijn" =>$richtlijn);
|
||||||
|
$html = $this->load->view("monpas/reports/diversiteitaantallen", $data, true);
|
||||||
|
$filenaam="diversiteitaantallen";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printaantallensboso(){
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$schooljaarnr),"naam");
|
||||||
|
|
||||||
|
$schooltotaal = 0;
|
||||||
|
$sbogewogentot = 0;
|
||||||
|
$sogewogentot = 0;
|
||||||
|
$schoolgewogentot = 0;
|
||||||
|
$schoolsom5 = 0;
|
||||||
|
$schoolsom6 = 0;
|
||||||
|
$schoolsom7 = 0;
|
||||||
|
$schoolsom8 = 0;
|
||||||
|
$sbodiversiteit = 0;
|
||||||
|
$sodiversiteit = 0;
|
||||||
|
$schooldiversiteit = 0;
|
||||||
|
$schooldq = 0;
|
||||||
|
|
||||||
|
$groepen = $this->Groepen_model->getgroepenSboSo($orgid, $schooljaarnr);
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep){
|
||||||
|
$schooltotaal = $schooltotaal + $groep->totaantal;
|
||||||
|
$schoolsom5 = $schoolsom5 + $groep->som5;
|
||||||
|
$schoolsom6 = $schoolsom6 + $groep->som6;
|
||||||
|
$schoolsom7 = $schoolsom7 + $groep->som7;
|
||||||
|
$schoolsom8 = $schoolsom8 + $groep->som8;
|
||||||
|
$sbodiversiteit = $sbodiversiteit + (2 * $groep->som5);
|
||||||
|
$sodiversiteit = $sodiversiteit + (3 * $groep->som6) + (4 * $groep->som7) + (5 * $groep->som8);
|
||||||
|
$sogewogentot = $sogewogentot + 12;
|
||||||
|
if ((strpos($groep->niveau, '1') !== false) || (strpos($groep->niveau, '2') !== false) ){
|
||||||
|
$sbogewogentot = $sbogewogentot + 15; }
|
||||||
|
else {
|
||||||
|
$sbogewogentot = $sbogewogentot + 12; }
|
||||||
|
|
||||||
|
}; // foreach
|
||||||
|
}// if
|
||||||
|
$sbodq = $sbodiversiteit/$sbogewogentot;
|
||||||
|
$sodq = $sodiversiteit/$sodiversiteit;
|
||||||
|
$schooldq = round( $sbodq + $sodq, 2);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$aantalgroepen = sizeof($groepen);
|
||||||
|
$richtlijn=array('85%', '10%','3%','25');
|
||||||
|
$data=array('organisatie' => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"schooltotaal" => $schooltotaal,
|
||||||
|
"schooldiversiteit" => $schooldiversiteit,
|
||||||
|
"schooldq" => $schooldq,
|
||||||
|
"schoolgewogentot" =>$schoolgewogentot,
|
||||||
|
"schoolsom5" => $schoolsom5,
|
||||||
|
"schoolsom6" => $schoolsom6,
|
||||||
|
"schoolsom7" => $schoolsom7,
|
||||||
|
"schoolsom8" => $schoolsom8,
|
||||||
|
"aantalgroepen" =>$aantalgroepen,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"richtlijn" =>$richtlijn);
|
||||||
|
$html = $this->load->view("monpas/reports/diversiteitaantallenso", $data, true);
|
||||||
|
$filenaam="diversiteitaantallenso";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printquotienten(){
|
||||||
|
//TODO clean input
|
||||||
|
$inputstring = $this->input->get('json');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($input->orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$input->schooljaarnr),"naam");
|
||||||
|
$groepen = $input->groepen;
|
||||||
|
$data=array( "organisatie" => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"groepen" => $groepen);
|
||||||
|
$html=$this->load->view("monpas/reports/diversiteitquotienten", $data, true);
|
||||||
|
$filenaam="diversiteitquotienten";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printtotaaltijden(){
|
||||||
|
$inputstring = $this->input->get('json');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($input->orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$input->schooljaarnr),"naam");
|
||||||
|
$data=array( "organisatie" => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"totalen" => $input->totalen);
|
||||||
|
$html=$this->load->view("monpas/reports/tijdtotalen", $data, true);
|
||||||
|
$filenaam="tijdtotalen";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printondersteuningsmatrix(){
|
||||||
|
$inputstring = $this->input->get('json');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($input->orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$input->schooljaarnr),"naam");
|
||||||
|
$data=array( "organisatie" => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"groepen" => $input->groepen,
|
||||||
|
"schoolDQ" => $input->schoolDQ,
|
||||||
|
"schooltot" => $input->schooltot);
|
||||||
|
$html=$this->load->view("monpas/reports/ondersteuningsmatrix", $data, true);
|
||||||
|
$filenaam="ondersteuningsmatrix";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
function printdiversiteitmatrix(){
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($input->orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array("schooljaarnr"=>$input->schooljaarnr),"naam");
|
||||||
|
|
||||||
|
|
||||||
|
$data=array( "organisatie" => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"basis" => $input->regels1,
|
||||||
|
"basisplus" => $input->regels2,
|
||||||
|
'extra' => $input->regels3,
|
||||||
|
'extraplus' =>$input->regels4,
|
||||||
|
'dq' =>$input->regels5);
|
||||||
|
$html=$this->load->view("monpas/reports/diversiteitmatrix", $data, true);
|
||||||
|
$filenaam="diversiteitmatrix";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,[1,1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printdiversiteitmatrixsboso(){
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($input->orgid);
|
||||||
|
$schooljaarnaam = $this->Schooljaren_model->get_fieldvalue(array
|
||||||
|
("schooljaarnr"=>$input->schooljaarnr),"naam");
|
||||||
|
$min = 5;
|
||||||
|
$max = 8;
|
||||||
|
$vormen =$this->Diversiteits_model->getosvormen($input->orgid, $input->schooljaarnr, $min, $max);
|
||||||
|
|
||||||
|
$data=array("organisatie" => $organisatie,
|
||||||
|
"schooljaarnaam" => $schooljaarnaam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"groepen" => $input->groepen,
|
||||||
|
"schooltotaal" => $input->leerlingaantal,
|
||||||
|
'ondersteuningsvormen' => $vormen,
|
||||||
|
'schoolsom5' => $input->schoolsom5,
|
||||||
|
'schoolsom6' => $input->schoolsom6,
|
||||||
|
'schoolsom7' => $input->schoolsom7,
|
||||||
|
'schoolsom8' => $input->schoolsom8,
|
||||||
|
'schooldq' => $input->schooldq,
|
||||||
|
'schooldiversiteit' => $input->schooldiversiteit);
|
||||||
|
|
||||||
|
$html=$this->load->view("monpas/reports/diversiteitmatrixso", $data, true);
|
||||||
|
$filenaam="diversiteitmatrixso";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,[1,1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getnormaantallen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooltype = $this->uri->segment(5);
|
||||||
|
$combifactoren = '';
|
||||||
|
$normaantallen =[];
|
||||||
|
if($schooltype === 'REGULIER'){
|
||||||
|
$normaantallen = $this->Diversiteits_model->getnormaantallen($orgid, 'REGULIER');
|
||||||
|
$combifactoren = $this->Combifactoren_model->getfactoren($orgid);
|
||||||
|
}
|
||||||
|
if($schooltype === 'SPECIAAL'){
|
||||||
|
$sbo = $this->Diversiteits_model->getnormaantallen($orgid, 'SBO');
|
||||||
|
$so = $this->Diversiteits_model->getnormaantallen($orgid, 'SO');
|
||||||
|
$normaantallen =['sbo'=>$sbo, 'so' => $so];
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode(['normaantallen' =>$normaantallen,
|
||||||
|
'combifactoren'=>$combifactoren]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Diversiteitmonitor extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
"monpas/Ondersteuningsvormen_model",
|
||||||
|
"monpas/Aantalxondersteuningsvorm_model",
|
||||||
|
"monpas/Leerkrachten_model",
|
||||||
|
"monpas/Groepen_model",
|
||||||
|
"shared/Schooljaren_model",
|
||||||
|
"Phantom_model",
|
||||||
|
"monpas/Ondersteuningtijden_model",
|
||||||
|
"monpas/Dq_model",
|
||||||
|
"monpas/Diversiteits_model",
|
||||||
|
"monpas/Sorteringen_model",
|
||||||
|
"monpas/Sorteerlabels_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getall(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$result = $this->Diversiteits_model->getallediversiteitsgegevens($schooljaarnr);
|
||||||
|
if ($result){ $result = $result[0];};
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getallsboso(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$licentie = 270;
|
||||||
|
$result = $this->Diversiteits_model->getallediversiteitsgegevenssboso($schooljaarnr, $licentie);
|
||||||
|
if ($result){ $result = $result[0];};
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCriteriaSWV(){
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$orgsoort = $this->Organisaties_model->get_fieldvalue(["id"=>$orgid], "soort");
|
||||||
|
|
||||||
|
switch($orgsoort){
|
||||||
|
case 1: $swvid = $orgid;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3: $swvid = $this->Organisaties_model->get_swvid($orgid);
|
||||||
|
break;
|
||||||
|
default: $swvID = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$criteria = $this->Sorteringen_model->get_criteriabijSWV($swvid);
|
||||||
|
if(!$criteria){
|
||||||
|
$criteria = [];
|
||||||
|
}
|
||||||
|
$criterium = new stdClass();
|
||||||
|
$criterium->id = 0;
|
||||||
|
$criterium->swv_id = $swvid;
|
||||||
|
$criterium->naam = "bestuur";
|
||||||
|
array_unshift($criteria, $criterium);
|
||||||
|
|
||||||
|
echo json_encode($criteria);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function haalDiversiteitOverzichtOp(){
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$module = $this->clean_input("module");
|
||||||
|
$criteriumid = $this->clean_input("criteriumid");
|
||||||
|
$indeling = (new IngedeeldeScholen($criteriumid, $module))->getIndeling();
|
||||||
|
|
||||||
|
|
||||||
|
$divmonitor = (new DivMonitor($schooljaarnr, $criteriumid, $module, $indeling))->getMonitor();
|
||||||
|
|
||||||
|
echo json_encode($divmonitor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function maakpdf(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$bgs = $input->bgs;
|
||||||
|
$obgs =[];
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
array_push($obgs, json_decode($bg));
|
||||||
|
}
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$today = date('d-m-Y');
|
||||||
|
$schooljaar = $this->Schooljaren_model->get_records_where(array('schooljaarnr' => $input->schooljaarnr), true);
|
||||||
|
$data = array("organisatie" =>$organisatie,
|
||||||
|
"schooljaar" =>$schooljaar,
|
||||||
|
"vandaag" =>$today,
|
||||||
|
"bgs" =>$obgs,
|
||||||
|
"maxdq" =>json_decode($input->maxdq),
|
||||||
|
"mindq" =>json_decode($input->mindq),
|
||||||
|
"maxoov" => json_decode($input->maxoov),
|
||||||
|
"grandtotals" =>json_decode($input->grandtotals),
|
||||||
|
'gr0164' =>$input->gr0164);
|
||||||
|
$html = $this->load->view("monpas/reports/divmonitorpdf", $data, true);
|
||||||
|
$filenaam="Monitordiversiteit".$organisatie->id;
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE,FALSE,FALSE, 'portrait');
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakpdfsboso(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$bgs = $input->bgs;
|
||||||
|
$obgs =[];
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
array_push($obgs, json_decode($bg));
|
||||||
|
}
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$today = date('d-m-Y');
|
||||||
|
$schooljaar = $this->Schooljaren_model->get_records_where(array('schooljaarnr' => $input->schooljaarnr), true);
|
||||||
|
$data = array("organisatie" =>$organisatie,
|
||||||
|
"schooljaar" =>$schooljaar,
|
||||||
|
"vandaag" =>$today,
|
||||||
|
"bgs" =>$obgs,
|
||||||
|
"maxdq" =>json_decode($input->maxdq),
|
||||||
|
"mindq" =>json_decode($input->mindq),
|
||||||
|
"grandtotals" =>json_decode($input->grandtotals),
|
||||||
|
"gr0164" =>$input->gr0164);
|
||||||
|
$html = $this->load->view("monpas/reports/divmonitorsopdf", $data, true);
|
||||||
|
$filenaam="MonitordiversiteitSbo&So".$organisatie->id;
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE,FALSE,FALSE, 'portrait');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,341 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Groepen extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Session_model",
|
||||||
|
"shared/Users_model",
|
||||||
|
"monpas/Ondersteuningsvormen_model",
|
||||||
|
"monpas/Aantalxondersteuningsvorm_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"monpas/Labels_model",
|
||||||
|
"monpas/Groepen_model",
|
||||||
|
"monpas/Groepenxusers_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getnewgroep(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input("schoolid");
|
||||||
|
$schooljaar = $this->clean_input("schooljaar");
|
||||||
|
$minnivo = $this->clean_input("minnivo");
|
||||||
|
$maxnivo = $this->clean_input("maxnivo");
|
||||||
|
|
||||||
|
$groepinfo = new stdClass;
|
||||||
|
$groepinfo->id = null;
|
||||||
|
$groepinfo->naam = '';
|
||||||
|
$groepinfo->orgid = $orgid;
|
||||||
|
$groepinfo->schooljaar = $schooljaar;
|
||||||
|
$groepinfo->niveau = null;
|
||||||
|
$groepinfo->lknaam = '';
|
||||||
|
$groepinfo->totaantal = 0;
|
||||||
|
|
||||||
|
|
||||||
|
$groepinfo->ondersteuningsvormen = $this->Ondersteuningsvormen_model->getvormen($orgid, $minnivo, $maxnivo);
|
||||||
|
|
||||||
|
if ($groepinfo->ondersteuningsvormen){
|
||||||
|
foreach($groepinfo->ondersteuningsvormen as $ondersteuningsvorm){
|
||||||
|
$ondersteuningsvorm->aantal =0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($groepinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getgroep(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$groepid = $this->clean_input("groepid");
|
||||||
|
$orgid = $this->clean_input("schoolid");
|
||||||
|
$minnivo = $this->clean_input("minnivo");
|
||||||
|
$maxnivo = $this->clean_input("maxnivo");
|
||||||
|
|
||||||
|
$groep = $this->Groepen_model->getgroepdetails($groepid);
|
||||||
|
$groep->niveau = explode(';', $groep->niveau);
|
||||||
|
$groep->leerkrachten = $this->Groepenxusers_model->getleerkrachten($groepid);
|
||||||
|
$groep->ondersteuningsvormen = $this->Ondersteuningsvormen_model->getvormen($orgid, $minnivo, $maxnivo);
|
||||||
|
if ($groep->ondersteuningsvormen){
|
||||||
|
foreach($groep->ondersteuningsvormen as $ondersteuningsvorm){
|
||||||
|
// hier get aantal
|
||||||
|
$ax = $this->Aantalxondersteuningsvorm_model->getaantal($groepid, $ondersteuningsvorm->id);
|
||||||
|
if ($ax){ $ondersteuningsvorm->aantal = $ax->aantal; }
|
||||||
|
else{ $ondersteuningsvorm->aantal =0; };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($groep);
|
||||||
|
}
|
||||||
|
function getleerkrachten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schoolid = $this->uri->segment(4);
|
||||||
|
$leerkrachten = $this->Users_model->getleerkrachten($schoolid);
|
||||||
|
echo json_encode($leerkrachten);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getlabels(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$module = $this->uri->segment(4);
|
||||||
|
$label1 = "";
|
||||||
|
$label2 = "";
|
||||||
|
$label3 = "";
|
||||||
|
$label4 = "";
|
||||||
|
$labels = $this->Labels_model->getLabels($module);
|
||||||
|
foreach($labels as $label){
|
||||||
|
if($label->labelid == 5) $label1 = $label->waarde;
|
||||||
|
if($label->labelid == 6) $label2 = $label->waarde;
|
||||||
|
if($label->labelid == 7) $label3 = $label->waarde;
|
||||||
|
if($label->labelid == 8) $label4 = $label->waarde;
|
||||||
|
}
|
||||||
|
$data = [
|
||||||
|
'label1' => $label1,
|
||||||
|
'label2' => $label2,
|
||||||
|
'label3' => $label3,
|
||||||
|
'label4' => $label4
|
||||||
|
];
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertorupdategroep(){
|
||||||
|
if (!$this->userid ) die;
|
||||||
|
$groepid = $this->clean_input('id');
|
||||||
|
$nivos = $this->clean_input("niveauarray");
|
||||||
|
$nstring = implode(';', $nivos);
|
||||||
|
|
||||||
|
$data=array('naam' => $this->clean_input('naam'),
|
||||||
|
'niveau' => $nstring,
|
||||||
|
'totaantal' => $this->clean_input('totaantal'),
|
||||||
|
'notitie' => $this->clean_input("notitie", TRUE),
|
||||||
|
'schooltype' => $this->clean_input('schooltype'),
|
||||||
|
'module' => $this->clean_input('module'));
|
||||||
|
if ($groepid <= 0 || $groepid == null || !$groepid ){
|
||||||
|
$data['schooljaarnr' ] = $this->clean_input('schooljaar');
|
||||||
|
$data['organisatie_id'] = $this->clean_input('orgid');
|
||||||
|
$groepid =$this->Groepen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->Groepen_model->update_record($data, $groepid);
|
||||||
|
}
|
||||||
|
$groep = $this->Groepen_model->getgroep($groepid);
|
||||||
|
echo json_encode($groep);
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertorupdateOS(){
|
||||||
|
//TODO clean input
|
||||||
|
if(!$this->userid) die;
|
||||||
|
$osid = $this->clean_input('id');
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$aantal = $this->clean_input('aantal');
|
||||||
|
if (($osid == 0 || $osid == null) &&($aantal > 0)) {
|
||||||
|
$data=array("organisatie_id" => $orgid,
|
||||||
|
"naam" => $this->clean_input("naam"),
|
||||||
|
"nivo" => $this->clean_input('nivo')
|
||||||
|
);
|
||||||
|
$osid = $this->Ondersteuningsvormen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($orgid > 0){
|
||||||
|
$data=array("naam" => $this->clean_input('naam'));
|
||||||
|
$this->Ondersteuningsvormen_model->update_record($data, $osid);
|
||||||
|
}
|
||||||
|
// update name
|
||||||
|
}
|
||||||
|
$data2= array("organisatie_id" => $orgid,
|
||||||
|
"groep_id" => $this->clean_input('groepid'),
|
||||||
|
"ondersteuningsvorm_id" => $osid);
|
||||||
|
$aos =$this->Aantalxondersteuningsvorm_model->get_records_where($data2, TRUE);
|
||||||
|
if($aos){
|
||||||
|
if ($this->clean_input('aantal') == 0) {
|
||||||
|
//delete de regel
|
||||||
|
$this->Aantalxondersteuningsvorm_model->delete_record($aos->id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// update de regel
|
||||||
|
$data=array( "aantal" => $this->clean_input('aantal') );
|
||||||
|
$this->Aantalxondersteuningsvorm_model->update_record($data, $aos->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if ($this->clean_input('aantal') > 0){
|
||||||
|
$data = array( "organisatie_id" => $orgid,
|
||||||
|
"groep_id" => $this->clean_input('groepid'),
|
||||||
|
"ondersteuningsvorm_id" => $osid,
|
||||||
|
"aantal" => $this->clean_input('aantal'));
|
||||||
|
$aantalid = $this->Aantalxondersteuningsvorm_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($osid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getgroepen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input('schoolID');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$module = $this->clean_input('module');
|
||||||
|
$groepen = $this->Groepen_model->getgroepen($orgid, $schooljaarnr, $module);
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep){
|
||||||
|
$groep->leerkrachten = $this->Groepenxusers_model->getleerkrachten($groep->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($groepen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getgekopieerdegroepen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$module = $this->clean_input('module');
|
||||||
|
|
||||||
|
$groepen = $this->Groepen_model->getgekopieerdegroepen($orgid, $schooljaarnr, $module);
|
||||||
|
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep){
|
||||||
|
$groep->leerkrachten = $this->Groepenxusers_model->getleerkrachten($groep->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($groepen);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getgroepenso(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$ondersteuning = 'T';
|
||||||
|
|
||||||
|
$groepen = $this->Groepen_model->getgroepenSboSo($orgid, $schooljaarnr);
|
||||||
|
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep){
|
||||||
|
$groep->leerkrachten = $this->Groepenxusers_model->getleerkrachten($groep->id);
|
||||||
|
if (isset($groep->ondersteuning) && $groep->ondersteuning == 'F') {
|
||||||
|
$ondersteuning = 'F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(['groepen' =>$groepen, 'ondersteuning' =>$ondersteuning]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deletegroep(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
if (!$this->writer) return;
|
||||||
|
$groepid = $this->uri->segment(4);
|
||||||
|
$this->Aantalxondersteuningsvorm_model->delete_record_where(array('groep_id'=>$groepid) );
|
||||||
|
$this->Groepenxusers_model->delete_record_where(array("groep_id" =>$groepid));
|
||||||
|
$this->Groepen_model->delete_record($groepid);
|
||||||
|
}
|
||||||
|
function deleteOS(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
if (!$this->writer) return;
|
||||||
|
$osid = $this->uri->segment(4);
|
||||||
|
$this->Aantalxondersteuningsvorm_model->delete_record_where(array("ondersteuningsvorm_id" => $osid));
|
||||||
|
$this->Ondersteuningsvormen_model->delete_record($osid);
|
||||||
|
}
|
||||||
|
function getwriter(){
|
||||||
|
$writer = false;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 259) > 0){$writer = true;};
|
||||||
|
echo json_encode($writer);
|
||||||
|
}
|
||||||
|
function deletegroepxuser(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$groepid = $this->uri->segment(4);
|
||||||
|
$this->Groepenxusers_model->delete_record_where(array("groep_id" =>$groepid));
|
||||||
|
}
|
||||||
|
function addgroepxuser(){
|
||||||
|
if(!$this->userid) die;
|
||||||
|
$groepid = $this->uri->segment(4);
|
||||||
|
$orgid = $this->uri->segment(5);
|
||||||
|
$userid = $this->uri->segment(6);
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue(array("organisatie_id" =>$orgid, "user_id" => $userid),'id') ;
|
||||||
|
$newid= $this->Groepenxusers_model->insert_record(array("orguser_id"=> $orguserid, "groep_id"=>$groepid));
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatenotitie(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$groepid = $this->clean_input("groepid");
|
||||||
|
$notitie = $this->clean_input("notitie", TRUE);
|
||||||
|
$this->Groepen_model->update_record(array("notitie" =>$notitie), $groepid);
|
||||||
|
}
|
||||||
|
function copygroepregulier(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$error = true;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$module = $this->clean_input('module');
|
||||||
|
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> $schooljaarnr - 1,
|
||||||
|
'organisatie_id' =>$orgid,
|
||||||
|
'schooltype' => 'R',
|
||||||
|
'module' => $module], false, false);
|
||||||
|
|
||||||
|
if ($vorigegroepen){
|
||||||
|
$error = false;
|
||||||
|
foreach($vorigegroepen as $vorigegroep){
|
||||||
|
$data=['schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $vorigegroep->organisatie_id,
|
||||||
|
'naam' => $vorigegroep->naam,
|
||||||
|
'niveau' => $vorigegroep->niveau,
|
||||||
|
'module' =>$vorigegroep->module,
|
||||||
|
'totaantal' => 0 ];
|
||||||
|
$newid = $this->Groepen_model->insert_record($data);
|
||||||
|
|
||||||
|
$leerkrachten = $this->Groepenxusers_model->get(['groep_id'=>$vorigegroep->id],false,false);
|
||||||
|
|
||||||
|
if ($leerkrachten){
|
||||||
|
foreach($leerkrachten as $leerkracht){
|
||||||
|
$data=['orguser_id' => $leerkracht->orguser_id,
|
||||||
|
'groep_id' => $newid];
|
||||||
|
$id= $this->Groepenxusers_model->insert_record($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($error);
|
||||||
|
}
|
||||||
|
|
||||||
|
function copygroepSOSBO(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$error = true;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
|
||||||
|
$vorigegroepen = $this->Groepen_model->get(['schooljaarnr'=> $schooljaarnr - 1,
|
||||||
|
'organisatie_id' =>$orgid,
|
||||||
|
'schooltype' => 'R',
|
||||||
|
'module' => 270], false, false);
|
||||||
|
|
||||||
|
if ($vorigegroepen){
|
||||||
|
$error = false;
|
||||||
|
foreach($vorigegroepen as $vorigegroep){
|
||||||
|
$data=['schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $vorigegroep->organisatie_id,
|
||||||
|
'naam' => $vorigegroep->naam,
|
||||||
|
'niveau' => $vorigegroep->niveau,
|
||||||
|
'module' =>$vorigegroep->module,
|
||||||
|
'totaantal' => 0 ];
|
||||||
|
$newid = $this->Groepen_model->insert_record($data);
|
||||||
|
|
||||||
|
$leerkrachten = $this->Groepenxusers_model->get(['groep_id'=>$vorigegroep->id],false,false);
|
||||||
|
|
||||||
|
if ($leerkrachten){
|
||||||
|
foreach($leerkrachten as $leerkracht){
|
||||||
|
$data=['orguser_id' => $leerkracht->orguser_id,
|
||||||
|
'groep_id' => $newid];
|
||||||
|
$id= $this->Groepenxusers_model->insert_record($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($error);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Lijsten extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Autorisaties_model",
|
||||||
|
"Docx_model",
|
||||||
|
"monpas/Filledversions_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Sop_model",
|
||||||
|
"monpas/Sopinhouden_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getorganisaties(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid =$this->globorgid;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
$swv = $this->Organisaties_model->getorgstructuur($orgid);
|
||||||
|
echo json_encode(array("swv" =>$swv,
|
||||||
|
"targetorg" =>$organisatie));
|
||||||
|
}
|
||||||
|
function getlijsten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$module = $this->session->userdata['module'];
|
||||||
|
$lijsten = $this->Filledversions_model->getlijsten($orgid,$module);
|
||||||
|
echo json_encode($lijsten);
|
||||||
|
}
|
||||||
|
function deletelijst(){
|
||||||
|
if (!$this->userid || $this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) die;
|
||||||
|
$fvid = $this->uri->segment(4);
|
||||||
|
$where = array("filledversion_id" => $fvid);
|
||||||
|
$this->Scores_model->delete_record_where($where);
|
||||||
|
$this->Filledversions_model->delete_record($fvid);
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Modulebalk extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Session_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function setselectedschool(){
|
||||||
|
$schoolid = $this->uri->segment(4);
|
||||||
|
$this->Session_model->set_selectedschool($schoolid);
|
||||||
|
$this->selectedschool = $schoolid;
|
||||||
|
echo json_encode($schoolid);
|
||||||
|
|
||||||
|
}
|
||||||
|
function setselectedschooljaar(){
|
||||||
|
$schooljaarnr = $this->uri->segment(4);
|
||||||
|
$this->Session_model->set_schooljaar($schooljaarnr);
|
||||||
|
$this->schooljaar = $schooljaarnr;
|
||||||
|
echo json_encode($schooljaarnr);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Monfinbeheer extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("monpas/Toewijzingen_model" );
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getorgs(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgstructuur = $this->Organisaties_model->getorgstructuur($this->globorgid , true);
|
||||||
|
$org = $this->Organisaties_model->getorg($this->globorgid);
|
||||||
|
$magwijzig = false;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 23)) $magwijzig =true;
|
||||||
|
echo json_encode(array('structuur' =>$orgstructuur , 'org' =>$org, 'magwijzig'=>$magwijzig));
|
||||||
|
}
|
||||||
|
function getbedragen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$bedragen = $this->Toewijzingen_model->gettoewijzingen($orgid);
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0) {$bedragen = array('');};
|
||||||
|
echo json_encode($bedragen);
|
||||||
|
}
|
||||||
|
function legvast(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) >= 1) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$jaarnr = $this->input->post("jaarnr");
|
||||||
|
$basis = $this->input->post("basis");
|
||||||
|
$extra = $this->input->post("extra");
|
||||||
|
$som = $this->input->post("som");
|
||||||
|
$overig = $this->input->post("overig");
|
||||||
|
$vastgelegd = 1;
|
||||||
|
if ($id == null || $id <= 0){
|
||||||
|
$data = array( 'orgid' =>$orgid,
|
||||||
|
'kalenderjaarnr' => $jaarnr,
|
||||||
|
'basis' => $basis,
|
||||||
|
'extra' => $extra,
|
||||||
|
'som' => $som,
|
||||||
|
'overig' => $overig,
|
||||||
|
'vastgelegd' => $vastgelegd);
|
||||||
|
$newid = $this->Toewijzingen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data = array("vastgelegd" => $vastgelegd);
|
||||||
|
$this->Toewijzingen_model->update_record($data, $id);
|
||||||
|
$newid = $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$newid = false;}; // geen schrijfrechten
|
||||||
|
echo json_encode(intval($newid));
|
||||||
|
}
|
||||||
|
|
||||||
|
function legbasisextravast(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) >=1) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$jaarnr = $this->input->post("jaarnr");
|
||||||
|
$basis = $this->input->post("basis");
|
||||||
|
$extra = $this->input->post("extra");
|
||||||
|
$som = $this->input->post("som");
|
||||||
|
$overig = $this->input->post("overig");
|
||||||
|
$basisextra = $this->input->post("basisextra");
|
||||||
|
if ($id == null || $id <= 0){
|
||||||
|
$data = array('orgid' =>$orgid,
|
||||||
|
'kalenderjaarnr' => $jaarnr,
|
||||||
|
'basis' => $basis,
|
||||||
|
'extra' => $extra,
|
||||||
|
'som' => $som,
|
||||||
|
'overig' => $overig,
|
||||||
|
'basisextra' => $basisextra,
|
||||||
|
'basisextravast' => 1);
|
||||||
|
$newid = $this->Toewijzingen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$newid= $id;
|
||||||
|
$data = array("basisextravast" => 1);
|
||||||
|
$this->Toewijzingen_model->update_record($data, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$newid = false;}; // geen write rechten
|
||||||
|
echo json_encode(intval($newid));
|
||||||
|
}
|
||||||
|
function savebasisextra(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) >0 ) {
|
||||||
|
$id = $this->clean_input('id');
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$jaarnr = $this->clean_input("jaarnr");
|
||||||
|
$basis = $this->clean_input("basis");
|
||||||
|
$extra = $this->clean_input("extra");
|
||||||
|
$som = $this->clean_input("som");
|
||||||
|
$overig = $this->clean_input("overig");
|
||||||
|
$basisextra = $this->clean_input("basisextra");
|
||||||
|
if (!$id ||$id == null || $id <= 0){
|
||||||
|
$data = array('orgid' =>$orgid,
|
||||||
|
'kalenderjaarnr' => $jaarnr,
|
||||||
|
'basis' => $basis,
|
||||||
|
'extra' => $extra,
|
||||||
|
'som' => $som,
|
||||||
|
'overig' => $overig,
|
||||||
|
'basisextra' => $basisextra,
|
||||||
|
'basisextravast' => 0);
|
||||||
|
$newid = $this->Toewijzingen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$newid= $id;
|
||||||
|
$data = array("basisextra" => $basisextra);
|
||||||
|
$this->Toewijzingen_model->update_record($data, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$newid= false;}; // geen write rechten
|
||||||
|
echo json_encode(intval($newid));
|
||||||
|
}
|
||||||
|
function updateorinsert(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) >0) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$jaarnr = $this->input->post("jaarnr");
|
||||||
|
$basis = $this->input->post("basis");
|
||||||
|
$extra = $this->input->post("extra");
|
||||||
|
$som = $this->input->post("som");
|
||||||
|
$overig = $this->input->post("overig");
|
||||||
|
|
||||||
|
if ($id == null || $id <= 0){
|
||||||
|
$data = array( 'orgid' =>$orgid,
|
||||||
|
'kalenderjaarnr' => $jaarnr,
|
||||||
|
'basis' => $basis,
|
||||||
|
'extra' => $extra,
|
||||||
|
'som' => $som,
|
||||||
|
'overig' => $overig);
|
||||||
|
$newid = $this->Toewijzingen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$newid= $id;
|
||||||
|
$data = array( 'basis' => $basis,
|
||||||
|
'extra' => $extra,
|
||||||
|
'som' => $som,
|
||||||
|
'overig' => $overig);
|
||||||
|
$this->Toewijzingen_model->update_record($data, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$newid = false;};// geen write rechten
|
||||||
|
echo json_encode(intval($newid));
|
||||||
|
}
|
||||||
|
function sluitjaaraf(){
|
||||||
|
$swvid = $this->clean_input('swv');
|
||||||
|
$jaarnr = $this->clean_input("jaarnr");
|
||||||
|
$orgstructuur = $this->Organisaties_model->getorgstructuur($swvid);
|
||||||
|
if ($orgstructuur){
|
||||||
|
$this->Toewijzingen_model->UpdateToewijzingen($orgstructuur->id, $jaarnr);
|
||||||
|
if ($orgstructuur->kamers){
|
||||||
|
$this->sluitjaarafrecursief($orgstructuur->kamers, $jaarnr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
|
||||||
|
private function sluitjaarafrecursief($orgs, $jaarnr){
|
||||||
|
if ($orgs){
|
||||||
|
|
||||||
|
foreach($orgs as $org){
|
||||||
|
$this->Toewijzingen_model->UpdateToewijzingen($org->id, $jaarnr);
|
||||||
|
if (isset($org->kamers)) $this->sluitjaarafrecursief($org->kamers, $jaarnr);
|
||||||
|
if (isset($org->bgs)) $this->sluitjaarafrecursief($org->bgs, $jaarnr);
|
||||||
|
if (isset($org->scholen)) $this->sluitjaarafrecursief($org->scholen, $jaarnr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Monfinbestedingen extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "monpas/Bestedingen_model",
|
||||||
|
"monpas/Bestedingopmerkingen_model",
|
||||||
|
"monpas/Bestemmingslabels_model",
|
||||||
|
"monpas/Toewijzingen_model",
|
||||||
|
"shared/Kalenderjaren_model" );
|
||||||
|
$this->load->model($models);
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getconstants(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$kalenderjaren = $this->Kalenderjaren_model->getkalenderjaren();
|
||||||
|
$bestemmingslabels = $this->Bestemmingslabels_model->getsoorten();
|
||||||
|
// if ($org->soort == 4) $isschool = true;
|
||||||
|
// else $isschool = false;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0 ) {$writer = true;}
|
||||||
|
else {$writer = false;} ;
|
||||||
|
echo json_encode(array('writer' =>$writer,
|
||||||
|
'kalenderjaren' => $kalenderjaren,
|
||||||
|
'labels' => $bestemmingslabels));
|
||||||
|
}
|
||||||
|
function getbestedingen(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, READER) <=0) {
|
||||||
|
$jaartoewijzing =array();
|
||||||
|
$bestedingen = array();
|
||||||
|
$jaarclosed = TRUE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$jaarnr = $this->input->post('jaarnr');
|
||||||
|
$jaarclosed = FALSE;
|
||||||
|
$jaartoewijzing = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $jaarnr);
|
||||||
|
if ($jaartoewijzing){
|
||||||
|
$jaartoewijzing->basis=number_format($jaartoewijzing->basis/100,2,',','.');
|
||||||
|
$jaartoewijzing->extra=number_format($jaartoewijzing->extra/100,2,',','.');
|
||||||
|
$jaartoewijzing->som=number_format($jaartoewijzing->som/100,2,',','.');
|
||||||
|
$jaartoewijzing->overig=number_format($jaartoewijzing->overig/100,2,',','.');
|
||||||
|
if ($jaartoewijzing->jaarclosed == "F") {$jaarclosed = FALSE;}
|
||||||
|
else { $jaarclosed = TRUE;};
|
||||||
|
}
|
||||||
|
$bestedingen = $this->Bestedingen_model->getbestedingen($orgid,$jaarnr);
|
||||||
|
$opmerking = $this->Bestedingopmerkingen_model->getopmerking($orgid, $jaarnr);
|
||||||
|
|
||||||
|
};
|
||||||
|
echo json_encode(array('jaartoewijzing' => $jaartoewijzing,
|
||||||
|
'bestedingen' => $bestedingen,
|
||||||
|
'opmerking' => $opmerking,
|
||||||
|
'jaarclosed' => $jaarclosed));
|
||||||
|
}
|
||||||
|
function insertbesteding(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0) {
|
||||||
|
$data= array("orgid" =>$this->globorgid,
|
||||||
|
"kalenderjaarnr" =>$this->input->post("jaarnr"),
|
||||||
|
"bedrag" =>$this->input->post("bedrag"),
|
||||||
|
"soort" =>$this->input->post("soortondersteuning"),
|
||||||
|
"omschrijving" =>$this->input->post("omschrijving"),
|
||||||
|
"labelnr" =>$this->input->post('labelnr'));
|
||||||
|
$newid =$this->Bestedingen_model->insert_record($data);
|
||||||
|
$besteding = $this->Bestedingen_model->getbesteding($newid);
|
||||||
|
}
|
||||||
|
else {$besteding = '' ; } ; // geen writer
|
||||||
|
echo json_encode($besteding);
|
||||||
|
}
|
||||||
|
function updatebedrag(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$bedrag = $this->input->post('bedrag');
|
||||||
|
$this->Bestedingen_model->update_record(array('bedrag'=>$bedrag), $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function updateomschrijving(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$omschrijving = $this->input->post('omschrijving');
|
||||||
|
$this->Bestedingen_model->update_record(array('omschrijving'=>$omschrijving), $id);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function updatelabel(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$waarde = $this->input->post('labelnr');
|
||||||
|
$this->Bestedingen_model->update_record(array('labelnr'=>$waarde), $id);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function deletebedrag(){
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0) {
|
||||||
|
$id = $this->input->post('id');
|
||||||
|
$this->Bestedingen_model->delete_record($id);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function saveopmerking(){
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$jaarnr = $this->clean_input("jaarnr");
|
||||||
|
$opmerking = $this->clean_input("opmerking");
|
||||||
|
$where = array("organisatie_id"=>$orgid, "kalenderjaarnr"=>$jaarnr);
|
||||||
|
$opmerkingrecord = $this->Bestedingopmerkingen_model->get_records_where($where,true);
|
||||||
|
if (!$opmerkingrecord){
|
||||||
|
$this->Bestedingopmerkingen_model->insert_record(array("organisatie_id" =>$orgid, "kalenderjaarnr"=>$jaarnr, 'opmerking'=>$opmerking));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->Bestedingopmerkingen_model->update_record(array('opmerking'=>$opmerking),$opmerkingrecord->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,288 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Monfinoverzicht extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$models = array("monpas/Bestedingen_model",
|
||||||
|
"monpas/Bestedingopmerkingen_model",
|
||||||
|
"monpas/Bestemmingslabels_model",
|
||||||
|
"monpas/Toewijzingen_model",
|
||||||
|
"shared/Kalenderjaren_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index(){ }
|
||||||
|
|
||||||
|
|
||||||
|
public function getkalenderjaren(){
|
||||||
|
$kalenderjaren = $this->Kalenderjaren_model->getkalenderjaren();
|
||||||
|
echo json_encode($kalenderjaren);
|
||||||
|
}
|
||||||
|
public function getkalenderjarenMetMax(){
|
||||||
|
$targetjaar = $this->Toewijzingen_model->getNextJaar($this->globorgid);
|
||||||
|
$kalenderjaren = $this->Kalenderjaren_model->getkalenderjarenMetMax($targetjaar);
|
||||||
|
echo json_encode($kalenderjaren);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getbudgetten($orgid, $kalenderjaarnr){
|
||||||
|
$budgetten =$this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
if (!$budgetten){
|
||||||
|
$budgetten=new stdClass;
|
||||||
|
$budgetten->basis = 0;
|
||||||
|
$budgetten->extra = 0;
|
||||||
|
$budgetten->som = 0;
|
||||||
|
$budgetten->overig = 0;
|
||||||
|
$budgetten->basisextra = 1;
|
||||||
|
}
|
||||||
|
if ($budgetten->basisextra==1){
|
||||||
|
$budgetten->totaal = $budgetten->basis + $budgetten->extra + $budgetten->overig;
|
||||||
|
}
|
||||||
|
else {$budgetten->totaal = $budgetten->som + $budgetten->overig;};
|
||||||
|
return $budgetten;
|
||||||
|
}
|
||||||
|
private function getbestedingen($orgids, $kalenderjaarnr){
|
||||||
|
$basisextra = true;
|
||||||
|
|
||||||
|
$orgbestedingen = array();
|
||||||
|
$orgbestedingen['basis'] =0;
|
||||||
|
$orgbestedingen['extra'] =0;
|
||||||
|
$orgbestedingen['besom'] =0;
|
||||||
|
$orgbestedingen['overig'] =0;
|
||||||
|
$orgbestedingen['totaal'] =0;
|
||||||
|
|
||||||
|
$bestedingen=$this->Bestedingen_model->getsompersoortoverorgs($orgids, $kalenderjaarnr);
|
||||||
|
if ($bestedingen){
|
||||||
|
foreach($bestedingen as $besteding){
|
||||||
|
switch ($besteding->soort){
|
||||||
|
case 1: $orgbestedingen['basis']= $besteding->bedrag;
|
||||||
|
break;
|
||||||
|
case 2: $orgbestedingen['extra']= $besteding->bedrag;
|
||||||
|
break;
|
||||||
|
case 3: $orgbestedingen['besom'] += $besteding->bedrag;
|
||||||
|
break;
|
||||||
|
case 4: $orgbestedingen['overig']= $besteding->bedrag;
|
||||||
|
break;
|
||||||
|
};// switch
|
||||||
|
$orgbestedingen['totaal'] += $besteding->bedrag;
|
||||||
|
if ( ($besteding->soort == 1 || $besteding->soort==2)){
|
||||||
|
// dit mag je zonder controle op basisextra optellen omdat dit of nul is als basisextra = 0
|
||||||
|
// in dat geval is de werkelijke waarde (de som) hierboven in de switch al opgeteld
|
||||||
|
$orgbestedingen['besom'] += $besteding->bedrag;
|
||||||
|
}
|
||||||
|
if ($besteding->basisextra ==0){ $basisextra=false; }
|
||||||
|
}; // foreach bestedingen
|
||||||
|
} ; // if bestedingen
|
||||||
|
return array("orgbestedingen" =>$orgbestedingen,
|
||||||
|
"basisextra" => $basisextra);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getbestuursbedragen(){
|
||||||
|
$targetorgid = $this->clean_input("orgid");
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$sumarray = array('basisuit' => 0, 'basisbudget' =>0,
|
||||||
|
'extrauit' => 0, 'extrabudget' =>0,
|
||||||
|
'besomuit' => 0, 'besombudget' =>0,
|
||||||
|
'overiguit' => 0, 'overigbudget' =>0,
|
||||||
|
'totaaluit' => 0, 'totaalbudget' => 0);
|
||||||
|
$grandtot = array('basisuit'=>0, "extrauit" =>0, 'besomuit'=>0, 'overiguit' =>0,
|
||||||
|
'totaaluit'=>0, 'totaalbudget'=>0, 'verschil'=>0);
|
||||||
|
$basisextra = true;
|
||||||
|
$targetorg = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
$targetorg->budgetten = $this->getbudgetten($targetorgid, $kalenderjaarnr);
|
||||||
|
$result = $this->getbestedingen($targetorgid, $kalenderjaarnr);
|
||||||
|
|
||||||
|
$targetorg->bestedingen = $result['orgbestedingen'];
|
||||||
|
if ($basisextra) $basisextra = $result['basisextra'];
|
||||||
|
|
||||||
|
// haal de organisaties direct onder de target org op (inclusief de eerste onderliggende organisaties)
|
||||||
|
$soort = $targetorg->soort +1;
|
||||||
|
|
||||||
|
$organisaties = $this->Organisaties_model->getorgs($soort, $targetorgid);
|
||||||
|
// controleer ook of alle suborganisaties het onderscheid basis/extra maken of niet
|
||||||
|
|
||||||
|
if ($organisaties){
|
||||||
|
foreach($organisaties as $organisatie){
|
||||||
|
|
||||||
|
$organisatie->budgetten = $this->getbudgetten($organisatie->id, $kalenderjaarnr);
|
||||||
|
|
||||||
|
if ($organisatie->budgetten) {
|
||||||
|
$sumarray['basisbudget'] += $organisatie->budgetten->basis;
|
||||||
|
$sumarray['extrabudget'] += $organisatie->budgetten->extra;
|
||||||
|
$sumarray['overigbudget'] += $organisatie->budgetten->overig;
|
||||||
|
|
||||||
|
if ($organisatie->budgetten->basisextra ==0){
|
||||||
|
$sumarray['besombudget'] += $organisatie->budgetten->som;
|
||||||
|
$sumarray['totaalbudget'] += $organisatie->budgetten->som + $organisatie->budgetten->overig;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$sumarray['besombudget'] += $organisatie->budgetten->basis+ $organisatie->budgetten->extra;
|
||||||
|
$sumarray['totaalbudget'] += $organisatie->budgetten->basis+ $organisatie->budgetten->extra +$organisatie->budgetten->overig;
|
||||||
|
}
|
||||||
|
if ($organisatie->budgetten->basisextra ==0) $basisextra = false;
|
||||||
|
|
||||||
|
$orgids = $this->getorgids($organisatie->id);
|
||||||
|
|
||||||
|
$result= $this->getbestedingen($orgids, $kalenderjaarnr,$organisatie->budgetten->basisextra);
|
||||||
|
$organisatie->bestedingen = $result['orgbestedingen'];
|
||||||
|
if($basisextra) $basisextra = $result['basisextra'];
|
||||||
|
|
||||||
|
$sumarray['basisuit'] += $organisatie->bestedingen['basis'];
|
||||||
|
$sumarray['extrauit'] += $organisatie->bestedingen['extra'];
|
||||||
|
$sumarray['besomuit'] += $organisatie->bestedingen['besom'] ;
|
||||||
|
$sumarray['overiguit'] += $organisatie->bestedingen['overig'];
|
||||||
|
$sumarray['totaaluit'] += $organisatie->bestedingen['totaal'];
|
||||||
|
}; // if budgetten
|
||||||
|
}
|
||||||
|
}; // if organisaties
|
||||||
|
$grandtot['basisuit'] = $sumarray['basisuit'] + $targetorg->bestedingen['basis'];
|
||||||
|
$grandtot['extrauit'] = $sumarray['extrauit'] + $targetorg->bestedingen['extra'];
|
||||||
|
$grandtot['besomuit'] = $sumarray['besomuit'] + $targetorg->bestedingen['besom'];
|
||||||
|
$grandtot['overiguit'] = $sumarray['overiguit'] + $targetorg->bestedingen['overig'];
|
||||||
|
|
||||||
|
$grandtot['totaaluit'] = $sumarray['totaaluit'] + $targetorg->bestedingen['totaal'];
|
||||||
|
$grandtot['totaalbudget'] = $targetorg->budgetten->totaal;
|
||||||
|
$grandtot['verschil'] = $grandtot['totaalbudget'] - $grandtot['totaaluit'];
|
||||||
|
|
||||||
|
echo json_encode(array('targetorg' =>$targetorg,
|
||||||
|
'organisaties' =>$organisaties,
|
||||||
|
"sumarray" =>$sumarray,
|
||||||
|
"basisextra" =>$basisextra,
|
||||||
|
"grandtot" =>$grandtot));
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getorgids($orgid){
|
||||||
|
|
||||||
|
$organisaties = array();
|
||||||
|
$level2 = array();
|
||||||
|
$level3 = array();
|
||||||
|
$idarray = array();
|
||||||
|
$idarray[] =$orgid;
|
||||||
|
$organisaties = $this->Organisaties_model->getorgsonder($orgid);
|
||||||
|
if ($organisaties){
|
||||||
|
foreach($organisaties as $organisatie){
|
||||||
|
$level2= $this->Organisaties_model->getorgsonder($organisatie->id);
|
||||||
|
if ($level2){
|
||||||
|
foreach($level2 as $l2){
|
||||||
|
$level3 = $this->Organisaties_model->getorgsonder($l2->id);
|
||||||
|
if($level3){
|
||||||
|
foreach($level3 as $l3){
|
||||||
|
$idarray[]=$l3->id;
|
||||||
|
};
|
||||||
|
}; // if level3
|
||||||
|
$idarray[]=$l2->id;
|
||||||
|
}
|
||||||
|
}; // if level2
|
||||||
|
$idarray[] = $organisatie->id;
|
||||||
|
}
|
||||||
|
}; // if organisaties
|
||||||
|
return implode(',', $idarray);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getschoolbedragen(){
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$labels = $this->Bestemmingslabels_model->getsoorten();
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
$totbudget = 0;
|
||||||
|
$totbesteed = 0;
|
||||||
|
$basis = array();
|
||||||
|
$extra = array();
|
||||||
|
$ondersteuning = array();
|
||||||
|
$overige = array();
|
||||||
|
$sompersoort = array();
|
||||||
|
$schooltot = 0;
|
||||||
|
$opmerking = '';
|
||||||
|
|
||||||
|
if ($budgetten){
|
||||||
|
if ($budgetten->basisextra == 1){
|
||||||
|
$totbudget = $budgetten->basis + $budgetten->extra + $budgetten->overig;
|
||||||
|
$basis = $this->Bestedingen_model->getschoolbestedingenpersoort($orgid, $kalenderjaarnr,1);
|
||||||
|
$extra = $this->Bestedingen_model->getschoolbestedingenpersoort($orgid, $kalenderjaarnr,2);
|
||||||
|
$overig = $this->Bestedingen_model->getschoolbestedingenpersoort($orgid, $kalenderjaarnr,4);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$totbudget = $budgetten->som + $budgetten->overig;
|
||||||
|
$ondersteuning = $this->Bestedingen_model->getschoolbestedingenpersoort($orgid, $kalenderjaarnr,3);
|
||||||
|
$overig = $this->Bestedingen_model->getschoolbestedingenpersoort($orgid, $kalenderjaarnr,4);
|
||||||
|
}
|
||||||
|
|
||||||
|
$getsombasis = $this->Bestedingen_model->getsom($basis, $budgetten,$labels,1);
|
||||||
|
$totbesteed += $getsombasis['totsoort'];
|
||||||
|
$getsomextra = $this->Bestedingen_model->getsom($extra, $budgetten,$labels,2);
|
||||||
|
$totbesteed += $getsomextra['totsoort'];
|
||||||
|
$getsomondersteuning = $this->Bestedingen_model->getsom($ondersteuning, $budgetten,$labels,3);
|
||||||
|
$totbesteed += $getsomondersteuning['totsoort'];
|
||||||
|
$getsomoverig = $this->Bestedingen_model->getsom($overig, $budgetten,$labels,4);
|
||||||
|
$totbesteed += $getsomoverig['totsoort'];
|
||||||
|
|
||||||
|
$verschil = $totbudget - $totbesteed;
|
||||||
|
$schooltot = array( 'budget' => number_format($totbudget/100, 2, ',' , '.' ),
|
||||||
|
"bestemd" => number_format($totbesteed/100, 2, ',' , '.' ),
|
||||||
|
"verschil" => number_format($verschil/100, 2, ',' , '.' ));
|
||||||
|
if ($budgetten->basisextra == 1){
|
||||||
|
$sompersoort[0] =$getsombasis;
|
||||||
|
$sompersoort[1]= $getsomextra;
|
||||||
|
$sompersoort[2]= $getsomoverig;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$sompersoort[0]=$getsomondersteuning;
|
||||||
|
$sompersoort[1]=$getsomoverig;
|
||||||
|
};
|
||||||
|
$opmerking = $this->Bestedingopmerkingen_model->getopmerking($orgid, $kalenderjaarnr);
|
||||||
|
}; // if budgetten
|
||||||
|
echo json_encode(array('sompersoort' => $sompersoort,
|
||||||
|
'schooltotaal' => $schooltot,
|
||||||
|
'opmerking' => $opmerking));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getbedragen(){
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$kalenderjaarnr = $this->clean_input("jaarnr");
|
||||||
|
$budgetten = $this->Toewijzingen_model->gettoewijzingperjaar($orgid, $kalenderjaarnr);
|
||||||
|
$totbudget = 0;
|
||||||
|
if ($budgetten){
|
||||||
|
if ($budgetten->basisextra == 1){
|
||||||
|
$totbudget = $budgetten->basis + $budgetten->extra + $budgetten->overig;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$totbudget = $budget->som+ $budget->overig;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$schoolbedragen = array();
|
||||||
|
$schoolbedragen = $this->Bestedingen_model->getschoolbestedingen($orgid, $kalenderjaarnr);
|
||||||
|
|
||||||
|
if ($schoolbedragen){
|
||||||
|
$somarray =$this->Bestedingen_model->sumschoolbedragen($schoolbedragen,$budgetten);
|
||||||
|
$verschil = $totbudget - $somarray['totaal'];
|
||||||
|
$schooltot = array( 'budget' => number_format($totbudget/100, 2, ',' , '.' ),
|
||||||
|
"bestemd" => number_format($somarray['totaal']/100, 2, ',' , '.' ),
|
||||||
|
"verschil" => number_format($verschil/100, 2, ',' , '.' ));
|
||||||
|
|
||||||
|
echo json_encode(array("schooltotaal" => $schooltot,
|
||||||
|
'sompersoort' => $somarray['sompersoort']));
|
||||||
|
}
|
||||||
|
else {echo json_encode(false);};
|
||||||
|
}
|
||||||
|
function overzichtPDF(){
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$orgnaam = $input->orgnaam;
|
||||||
|
$kalenderjaar = $input->kalenderjaar;
|
||||||
|
$orgTable = $input->orgtable;
|
||||||
|
|
||||||
|
$data= array( "organisatie" => $orgnaam,
|
||||||
|
"kalenderjaar" => $kalenderjaar,
|
||||||
|
"table" => $orgTable);
|
||||||
|
$html = $this->load->view("monpas/reports/monfinoverzicht", $data, true);
|
||||||
|
|
||||||
|
$filenaam="monfin";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,239 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Monitor extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Users_model",
|
||||||
|
"monpas/Filledversions_model" ,
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Antwoordopties_model",
|
||||||
|
"monpas/Indicatoren_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Oordelen_model",
|
||||||
|
"shared/Session_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getperiodesperschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$versies = array();
|
||||||
|
$organisatie=$this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
$gaverder = true; // zoek verder omdat er nog geen actieve versie is
|
||||||
|
// zoek eerst de reeds ingevulde versies
|
||||||
|
// zoek dan de actieve versie
|
||||||
|
// als de actieve versie nog niet bij de ingevulde versies zit, voeg die dan toe.
|
||||||
|
$versies = $this->Filledversions_model->getfilledversionsperorg($organisatie->id, $module);
|
||||||
|
if ($versies){
|
||||||
|
foreach($versies as $versie){
|
||||||
|
if ($versie->actief){$gaverder = false;};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if ($gaverder){
|
||||||
|
// zoek de actieve versie
|
||||||
|
$BGid = $this->Organisaties_model->get_fieldvalue(array("id" => $this->globorgid), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($BGid,$module,true);
|
||||||
|
|
||||||
|
if (!$actieveversie){
|
||||||
|
$KamerID = $this->Organisaties_model->get_fieldvalue(array("id" =>$BGid), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($KamerID,$module,true);
|
||||||
|
|
||||||
|
if (!$actieveversie){
|
||||||
|
$SWVID = $this->Organisaties_model->get_fieldvalue(array("id" =>$KamerID), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($SWVID, $module,true);
|
||||||
|
}
|
||||||
|
// merge de actieveversie als die gevonden is
|
||||||
|
if (!$versies ) {$versies = array();};
|
||||||
|
if (!$actieveversie) {$actieveversie = array();};
|
||||||
|
$versies = array_merge($actieveversie, $versies);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
echo json_encode(array("versies"=>$versies, "soort"=>$organisatie->soort));
|
||||||
|
}
|
||||||
|
function getperiodesperschoolvanuitpartituur(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
|
||||||
|
$versies = array();
|
||||||
|
|
||||||
|
$organisatie=$this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$module = $this->uri->segment(4); // dit hier gezet worden omdat de partituur zelf een module is
|
||||||
|
$gaverder = true; // zoek verder omdat er nog geen actieve versie is
|
||||||
|
// zoek eerst de reeds ingevulde versies
|
||||||
|
// zoek dan de actieve versie
|
||||||
|
// als de actieve versie nog niet bij de ingevulde versies zit, voeg die dan toe.
|
||||||
|
$versies = $this->Filledversions_model->getfilledversionsperorg($organisatie->id, $module);
|
||||||
|
if ($versies){
|
||||||
|
foreach($versies as $versie){
|
||||||
|
if ($versie->actief){$gaverder = false;};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if ($gaverder){
|
||||||
|
// zoek de actieve versie
|
||||||
|
$BGid = $this->Organisaties_model->get_fieldvalue(array("id" => $this->globorgid), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($BGid,$module,true);
|
||||||
|
|
||||||
|
if (!$actieveversie){
|
||||||
|
$KamerID = $this->Organisaties_model->get_fieldvalue(array("id" =>$BGid), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($KamerID,$module,true);
|
||||||
|
|
||||||
|
if (!$actieveversie){
|
||||||
|
$SWVID = $this->Organisaties_model->get_fieldvalue(array("id" =>$KamerID), 'valtonder_id');
|
||||||
|
$actieveversie = $this->Orgversies_model->getallorgversies($SWVID, $module,true);
|
||||||
|
}
|
||||||
|
// merge de actieveversie als die gevonden is
|
||||||
|
if (!$versies ) {$versies = array();};
|
||||||
|
if (!$actieveversie) {$actieveversie = array();};
|
||||||
|
$versies = array_merge($actieveversie, $versies);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
echo json_encode(array("versies"=>$versies, "soort"=>$organisatie->soort));
|
||||||
|
}
|
||||||
|
function getperiodes(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$versies = false;
|
||||||
|
|
||||||
|
$organisatie=$this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
$soort = $organisatie->soort;
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
if ($soort == 4) {
|
||||||
|
$versies = $this->Filledversions_model->getfilledversionsperorg($organisatie->id, $module);
|
||||||
|
|
||||||
|
$BGid = $this->Organisaties_model->get_fieldvalue(array("id" => $this->globorgid), 'valtonder_id');
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($BGid,$module);
|
||||||
|
if (!$versies ){
|
||||||
|
$KamerID = $this->Organisaties_model->get_fieldvalue(array("id" =>$BGid), 'valtonder_id');
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($KamerID,$module);
|
||||||
|
}
|
||||||
|
$gaverder = $this->Orgversies_model->getallorgversies($BGid, $module, TRUE);
|
||||||
|
if (!$versies ){
|
||||||
|
$SWVID = $this->Organisaties_model->get_fieldvalue(array("id" =>$KamerID), 'valtonder_id');
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($SWVID, $module);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("versies"=>$versies, "soort"=>$soort));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getlistitems(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->uri->segment(4);
|
||||||
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
||||||
|
|
||||||
|
// haal de ijkpunten op waar de scores onder moeten komen
|
||||||
|
$listijkpunten = $this->Ijkpunten_model->getijkpunten1($orgversie->versie_id);
|
||||||
|
// zoek op of er al scores zijn ingevuld (via filledversion)
|
||||||
|
$fillerid =false;
|
||||||
|
$orgid = $this->globorgid; //er moet altijd gezocht worden op orgid omdat de gebruiker tot verschillende organisaties kan behoren
|
||||||
|
if ($orgversie->vorm == 2) $fillerid = $this->userid;
|
||||||
|
$filledversion = $this->Filledversions_model->getfilledversion($orgversieid, $orgid,$fillerid, $orgversie->vorm);
|
||||||
|
if (!$filledversion){
|
||||||
|
// start een nieuwe filledversion
|
||||||
|
$userid= null;
|
||||||
|
if ($orgversie->vorm == 2) {$userid = $this->userid;};
|
||||||
|
$data = array( "orgversie_id" => $orgversie->id,
|
||||||
|
"organisatie_id" => $this->globorgid,
|
||||||
|
"user_id" => $userid);
|
||||||
|
$newid = $this->Filledversions_model->insert_record($data);
|
||||||
|
$filledversion = $this->Filledversions_model->getfilledversionbyid($newid);
|
||||||
|
// start een nieuwe set van score-records
|
||||||
|
if ($listijkpunten){
|
||||||
|
foreach($listijkpunten as $ijkpunt){
|
||||||
|
$this->MaakScoreRecords($ijkpunt->id,$filledversion->id, $orgversie->scoretype);
|
||||||
|
}; //foreach
|
||||||
|
}; //if
|
||||||
|
}; // if not fillversion
|
||||||
|
// als er al wel een filledversion is, haal dan de scores op
|
||||||
|
if ($listijkpunten) {
|
||||||
|
foreach($listijkpunten as $ijkpunt){
|
||||||
|
$ijkpunt->indicatorscores = $this->Scores_model->getscores($ijkpunt->id, $filledversion->id,$orgversie->vorm);
|
||||||
|
if ($ijkpunt->indicatorscores){
|
||||||
|
foreach($ijkpunt->indicatorscores as $score){
|
||||||
|
if ($score->scoretype != 1){$score->score= substr($score->score, 0, strlen($score->score) -2 ); };
|
||||||
|
if ($score->scoretype ==1) {$score->score= str_replace('.',',',$score->score); };
|
||||||
|
}; //for each
|
||||||
|
}; // if scores
|
||||||
|
}; //foreach
|
||||||
|
};
|
||||||
|
if ($listijkpunten) {
|
||||||
|
$scoreopties = $this->Antwoordopties_model->getAntwoordopties($orgversie->scoretype);
|
||||||
|
}
|
||||||
|
$writer = $this->Autorisaties_model->check_write();
|
||||||
|
echo json_encode(array("ijkpunten" => $listijkpunten,
|
||||||
|
"notitie" => $filledversion->notitie,
|
||||||
|
"fvid" => $filledversion->id,
|
||||||
|
"meetellen" => $filledversion->meetellen,
|
||||||
|
"scoreopties" => $scoreopties,
|
||||||
|
"writer" => $writer) );
|
||||||
|
}
|
||||||
|
|
||||||
|
function MaakScoreRecords($ijkpuntid, $filledversionid, $scoretype){
|
||||||
|
$indicators = $this->Indicatoren_model->getindicatoren($ijkpuntid);
|
||||||
|
if ($indicators){
|
||||||
|
foreach($indicators as $indicator){
|
||||||
|
$data=array( "filledversion_id" =>$filledversionid,
|
||||||
|
"ijkpunt_id" => $ijkpuntid,
|
||||||
|
"indicator_id" => $indicator->id,
|
||||||
|
"score" => 0,
|
||||||
|
"scoretype" =>$scoretype);
|
||||||
|
$this->Scores_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatescore(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$scoreid = $this->clean_input("indicatorscoreid");
|
||||||
|
$score = str_replace(',','.',$this->clean_input("score"));
|
||||||
|
// $this->deleteOordeel($scoreid);
|
||||||
|
$scorerecord = $this->Scores_model->get_record_by_id($scoreid);
|
||||||
|
$this->Oordelen_model->delete_record_where(array("ijkpunt_id"=>$scorerecord->ijkpunt_id,
|
||||||
|
"filledversion_id"=>$scorerecord->filledversion_id))
|
||||||
|
;
|
||||||
|
$this->Scores_model->update_record(array("score" => $score), $scoreid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function savenotitie(){
|
||||||
|
// TODO Clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$notitie = $this->clean_input('notitie');
|
||||||
|
$fvid = $this->clean_input('fvID');
|
||||||
|
if ($fvid){
|
||||||
|
$this->Filledversions_model->update_record(array("notitie"=>$notitie), $fvid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function lijstmeetellen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$meetellen = $this->clean_input('meetellen');
|
||||||
|
$fvid = $this->clean_input('fvID');
|
||||||
|
if($fvid)
|
||||||
|
$this->Filledversions_model->update_record(array('meetellen' =>$meetellen), $fvid);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function printlijst(){
|
||||||
|
$input0 = $this->input->post('data');
|
||||||
|
$input = json_decode($input0);
|
||||||
|
//var_dump('input', $input);
|
||||||
|
$organisatie = $this->Organisaties_model->get_orgnaam($this->globorgid);
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ;
|
||||||
|
|
||||||
|
$data=array( "instrument" => $instrument,
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"versie" => $input->orgversie,
|
||||||
|
"today" => date('d-m-Y'),
|
||||||
|
"listitems" => json_decode($input->tabelinfo),
|
||||||
|
"notitie" => $input->notitie);
|
||||||
|
$html=$this->load->view("monpas/reports/printlijst", $data, true);
|
||||||
|
$filenaam="MonPasInvullijst";
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,599 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
use Curl\Curl;
|
||||||
|
use \Firebase\JWT\JWT;
|
||||||
|
|
||||||
|
class Omvang extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
|
||||||
|
"monpas/Arrangementen_model",
|
||||||
|
"monpas/Arrangementen_piv_aantal_model",
|
||||||
|
"shared/Kalenderjaren_model",
|
||||||
|
"shared/Aantalleerlingen_model",
|
||||||
|
"shared/Licenties_model",
|
||||||
|
"Phantom_model",
|
||||||
|
"monpas/Tlvs_model"
|
||||||
|
);
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getrechten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$editok = false;
|
||||||
|
$autorisatie = $this->Autorisaties_model->check_autorisatie($this->userrole,259 );
|
||||||
|
|
||||||
|
if ( $autorisatie> 0) $editok = true;
|
||||||
|
echo json_encode($editok);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getextraomvang(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$aantal = $this->Aantalleerlingen_model->getAantalleerlingenInvullen($this->globorgid, $schooljaarnr);
|
||||||
|
if(!$aantal) $aantal = false;
|
||||||
|
|
||||||
|
$tlvs = $this->Tlvs_model->getAantalTLVs($this->globorgid, $schooljaarnr);
|
||||||
|
if(!$tlvs) $tlvs = false;
|
||||||
|
|
||||||
|
$arrangementen = $this->Arrangementen_model->getArrangementen($this->globorgid, $schooljaarnr);
|
||||||
|
if($arrangementen){
|
||||||
|
foreach($arrangementen as $arrangement){
|
||||||
|
$arrangement->huidig = $this->Arrangementen_model->getAantallen($this->globorgid, $schooljaarnr, $arrangement->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$arrangementen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$extraomvang = [
|
||||||
|
'aantal' => $aantal,
|
||||||
|
'tlvs' => $tlvs,
|
||||||
|
'arrangementen' => $arrangementen,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode($extraomvang);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getArrangementen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$arrangementen = $this->Arrangementen_model->getArrangementen($this->globorgid, $schooljaarnr);
|
||||||
|
if($arrangementen){
|
||||||
|
foreach($arrangementen as $arrangement){
|
||||||
|
$arrangement->huidig = $this->Arrangementen_model->getAantallen($this->globorgid, $schooljaarnr, $arrangement->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$arrangementen = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($arrangementen);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function saveAantalLeerlingen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$aantalleerlingen = $this->clean_input('aantalleerlingen');
|
||||||
|
|
||||||
|
$id = $this->Aantalleerlingen_model->get_fieldvalue(['schooljaarnr' => $schooljaarnr, 'organisatie_id' => $this->globorgid], 'id');
|
||||||
|
if ($id) {
|
||||||
|
$this->Aantalleerlingen_model->update_record(['aantal' => $aantalleerlingen], $id);
|
||||||
|
} else {
|
||||||
|
$data =[
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'aantal' => $aantalleerlingen
|
||||||
|
];
|
||||||
|
$id = $this->Aantalleerlingen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!$id){
|
||||||
|
$id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveTlvsSO(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$laag = $this->clean_input('laag');
|
||||||
|
$midden = $this->clean_input('midden');
|
||||||
|
$hoog = $this->clean_input('hoog');
|
||||||
|
$laagID = $this->clean_input('laagID');
|
||||||
|
$middenID = $this->clean_input('middenID');
|
||||||
|
$hoogID = $this->clean_input('hoogID');
|
||||||
|
$laagIDNieuw = false;
|
||||||
|
$middenIDNieuw = false;
|
||||||
|
$hoogIDNieuw = false;
|
||||||
|
|
||||||
|
if(intval($laag) > 0 && intval($laagID) > 0) {
|
||||||
|
$laagIDNieuw = $this->Tlvs_model->update_record(['aantal' => $laag], $laagID);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($midden) > 0 && intval($middenID) > 0) {
|
||||||
|
$middenIDNieuw = $this->Tlvs_model->update_record(['aantal' => $midden], $middenID);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($hoog) > 0 && intval($hoogID) > 0) {
|
||||||
|
$hoogIDNieuw = $this->Tlvs_model->update_record(['aantal' => $hoog], $hoogID);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($laag) > 0 && intval($laagID) == 0) {
|
||||||
|
$nieuwedata = [
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'soort' => 'SO',
|
||||||
|
'zwaarte' => 'LAAG',
|
||||||
|
'aantal' => $laag
|
||||||
|
];
|
||||||
|
|
||||||
|
$laagIDNieuw = $this->Tlvs_model->insert_record($nieuwedata);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($midden) > 0 && intval($middenID)== 0) {
|
||||||
|
$nieuwedata = [
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'soort' => 'SO',
|
||||||
|
'zwaarte' => 'MIDDEN',
|
||||||
|
'aantal' => $midden
|
||||||
|
];
|
||||||
|
|
||||||
|
$middenIDNieuw = $this->Tlvs_model->insert_record($nieuwedata);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($hoog) > 0 && intval($hoogID) == 0) {
|
||||||
|
$nieuwedata = [
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'soort' => 'SO',
|
||||||
|
'zwaarte' => 'HOOG',
|
||||||
|
'aantal' => $hoog
|
||||||
|
];
|
||||||
|
|
||||||
|
$hoogIDNieuw = $this->Tlvs_model->insert_record($nieuwedata);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ids = [
|
||||||
|
'laag' => $laagIDNieuw,
|
||||||
|
'midden' => $middenIDNieuw,
|
||||||
|
'hoog' => $hoogIDNieuw
|
||||||
|
|
||||||
|
];
|
||||||
|
echo json_encode($ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveTlvsSBO(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$licht = $this->clean_input('licht');
|
||||||
|
$zwaar = $this->clean_input('zwaar');
|
||||||
|
$lichtID = $this->clean_input('lichtID');
|
||||||
|
$zwaarID = $this->clean_input('zwaarID');
|
||||||
|
$lichtIDNieuw = false;
|
||||||
|
$zwaarIDNieuw = false;
|
||||||
|
|
||||||
|
if(intval($licht) > 0 && intval($lichtID) > 0) {
|
||||||
|
$lichtIDNieuw = $this->Tlvs_model->update_record(['aantal' => $licht], $lichtID);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($zwaar) > 0 && intval($zwaarID) > 0) {
|
||||||
|
$zwaarIDNieuw = $this->Tlvs_model->update_record(['aantal' => $zwaar], $zwaarID);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(intval($licht) > 0 && intval($lichtID) == 0) {
|
||||||
|
$nieuwedata = [
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'soort' => 'SBO',
|
||||||
|
'zwaarte' => 'LICHT',
|
||||||
|
'aantal' => $licht
|
||||||
|
];
|
||||||
|
|
||||||
|
$lichtIDNieuw = $this->Tlvs_model->insert_record($nieuwedata);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(intval($zwaar) > 0 && intval($zwaarID)== 0) {
|
||||||
|
$nieuwedata = [
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'soort' => 'SBO',
|
||||||
|
'zwaarte' => 'ZWAAR',
|
||||||
|
'aantal' => $zwaar
|
||||||
|
];
|
||||||
|
|
||||||
|
$zwaarIDNieuw = $this->Tlvs_model->insert_record($nieuwedata);
|
||||||
|
|
||||||
|
}
|
||||||
|
$ids=[
|
||||||
|
'licht' =>$lichtIDNieuw,
|
||||||
|
'zwaar' =>$zwaarIDNieuw
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode($ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function saveLlnArrangement(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$aantal = $this->clean_input('aantal');
|
||||||
|
$arrid = $this->clean_input('id');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
|
||||||
|
$recordid = $this->Arrangementen_piv_aantal_model->get_fieldvalue(
|
||||||
|
['arrangement_id'=>$arrid, 'schooljaarnr'=>$schooljaarnr], 'id', true);
|
||||||
|
if($recordid){
|
||||||
|
$this->Arrangementen_piv_aantal_model->update_record(
|
||||||
|
['aantal' => $aantal], $recordid );
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$recordid = $this->Arrangementen_piv_aantal_model->insert_record(
|
||||||
|
['arrangement_id'=>$arrid, 'schooljaarnr'=> $schooljaarnr, 'aantal'=>$aantal]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteArrangement(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
|
||||||
|
$arrangementid = $this->uri->segment(4);
|
||||||
|
$message = "";
|
||||||
|
$totaal = $this->Arrangementen_piv_aantal_model->getAantallen($arrangementid);
|
||||||
|
|
||||||
|
if(!isset($totaal) || $totaal ==0) {
|
||||||
|
$this->Arrangementen_model->delete_record($arrangementid);
|
||||||
|
$this->Arrangementen_piv_aantal_model->delete_record_where(['arrangement_id' =>$arrangementid]);
|
||||||
|
$message = "gelukt";
|
||||||
|
$subtotalen = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$schooljaren = "";
|
||||||
|
$subtotalen = $this->Arrangementen_piv_aantal_model->getAantallenPerSchooljaar($arrangementid);
|
||||||
|
if($subtotalen){
|
||||||
|
$lengte = count($subtotalen);
|
||||||
|
foreach($subtotalen as $index => $subtotaal){
|
||||||
|
if( $index < ($lengte - 2)) $schooljaren = $schooljaren . $subtotaal->naam. ', ';
|
||||||
|
if( $index == ($lengte - 2)) $schooljaren = $schooljaren . $subtotaal->naam.' en ' ;
|
||||||
|
if( $index == ($lengte - 1)) $schooljaren = $schooljaren . $subtotaal->naam ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$message = "Er zijn leerlingen gekoppeld aan het arrangement in ". $schooljaren. " . Het kan niet worden verwijderd.";
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode($message);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function archiveerArrangement(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$arrid = $this->clean_input('arrangementid');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
|
||||||
|
$arrangement = $this->Arrangementen_model->get_record_by_id($arrid);
|
||||||
|
if ($arrangement->organisatie_id != $this->globorgid) return;
|
||||||
|
|
||||||
|
$aantalid = $this->Arrangementen_piv_aantal_model->get_fieldvalue(['arrangement_id' => $arrid, 'schooljaarnr' => $schooljaarnr], 'id');
|
||||||
|
if ($aantalid) {
|
||||||
|
$this->Arrangementen_piv_aantal_model->update_record(['archief' => 'T'], $aantalid);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$aantalid = $this->Arrangementen_piv_aantal_model->insert_record(['arrangement_id' => $arrid, 'aantal'=> 0, 'schooljaarnr' => $schooljaarnr, 'archief' => 'T']);
|
||||||
|
}
|
||||||
|
echo json_encode($aantalid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveNieuwArrangement(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$aantal = $this->clean_input('aantal');
|
||||||
|
$naam = stripslashes($this->clean_input('naam'));
|
||||||
|
$leeftijd = stripslashes($this->clean_input('leeftijd'));
|
||||||
|
$looptijd = $this->clean_input('looptijd');
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'organisatie_id' => $orgid,
|
||||||
|
'naam' => $naam,
|
||||||
|
'lengte' => $looptijd,
|
||||||
|
'leeftijd' => $leeftijd,
|
||||||
|
'schooljaarnr' => $schooljaarnr
|
||||||
|
];
|
||||||
|
|
||||||
|
$id = $this->Arrangementen_model->insert_record($data);
|
||||||
|
|
||||||
|
$data2 = [
|
||||||
|
'arrangement_id' => $id,
|
||||||
|
'schooljaarnr' => $schooljaarnr,
|
||||||
|
'aantal' => $aantal,
|
||||||
|
'archief' =>'F'
|
||||||
|
];
|
||||||
|
|
||||||
|
$aantalid = $this->Arrangementen_piv_aantal_model->insert_record($data2);
|
||||||
|
|
||||||
|
echo json_encode($id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function toonAlleArrangmenten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->uri->segment(4);
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$arrangementen = $this->Arrangementen_model->getArrangementen($orgid, $schooljaarnr);
|
||||||
|
foreach($arrangementen as $arrangement) {
|
||||||
|
$this->Arrangementen_piv_aantal_model->update_record_where(['archief' => 'F'], ['arrangement_id' =>$arrangement->id, 'schooljaarnr' =>$schooljaarnr]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
function gegevensmeetellen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$meetellen = $this->clean_input('meetellen');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$aantalid = $this->Aantalleerlingen_model->get_fieldvalue(['organisatie_id' => $this->globorgid, 'schooljaarnr' => $schooljaarnr], 'id');
|
||||||
|
if ($aantalid){
|
||||||
|
$this->Aantalleerlingen_model->update_record(['meetellen' =>$meetellen], $aantalid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function bewaarNotitie(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$notitie = $this->clean_input('notitie');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaarnr');
|
||||||
|
$aantalid = $this->Aantalleerlingen_model->get_fieldvalue(['organisatie_id' => $this->globorgid, 'schooljaarnr' => $schooljaarnr], 'id');
|
||||||
|
if ($aantalid){
|
||||||
|
$this->Aantalleerlingen_model->update_record(['notitie'=>$notitie], $aantalid);
|
||||||
|
}
|
||||||
|
echo json_encode($aantalid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getOrgsEnSchooljaren(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($this->globorgid);
|
||||||
|
$ids = [];
|
||||||
|
|
||||||
|
if($organisatie->soort == 4){
|
||||||
|
$schoolIDs = $organisatie->id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$scholen = $this->Organisaties_model->get_schoolIDs_onder($organisatie->id);
|
||||||
|
if($scholen){
|
||||||
|
foreach ($scholen as $school){
|
||||||
|
$ids [] = $school->id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$schoolIDs = implode(',', $ids);
|
||||||
|
$organisatie->suborgs = $this->Organisaties_model->getorgsvanaf($organisatie->id);
|
||||||
|
//bestuur kamer of swv
|
||||||
|
if (isset($organisatie->suborgs)){
|
||||||
|
foreach ($organisatie->suborgs as $suborg) {
|
||||||
|
if ($suborg->soort < 4) {
|
||||||
|
//kamer of swv
|
||||||
|
$suborg->suborgs = $this->Organisaties_model->getorgsvanaf($suborg->id);
|
||||||
|
}
|
||||||
|
if (isset($suborg->suborgs)) {
|
||||||
|
foreach ($suborg->suborgs as $subsub) {
|
||||||
|
if ($subsub->soort < 4) {
|
||||||
|
//kamer
|
||||||
|
$subsub->suborgs = $this->Organisaties_model->getorgsvanaf($subsub->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$schooljaren = false;
|
||||||
|
if($schoolIDs) {
|
||||||
|
|
||||||
|
$schooljaren = $this->Aantalleerlingen_model->get_gevulde_schooljaren($schoolIDs);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"soort" => $organisatie->soort,
|
||||||
|
"schooljaren" => $schooljaren
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOmvang(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnrs = $this->clean_input('schooljaren');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
if(! array($schooljaarnrs)) $schooljaarnrs = array($schooljaarnrs);
|
||||||
|
// $schooljaarnrs = array_reverse($schooljaarnrs);
|
||||||
|
$schooljaren = [];
|
||||||
|
$arrangementen = [];
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
;
|
||||||
|
$array = [];
|
||||||
|
$idsboven = [];
|
||||||
|
|
||||||
|
if($organisatie->soort == 4){
|
||||||
|
$schoolIDs = $organisatie->id;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$scholen = $this->Organisaties_model->get_schoolIDs_onder($organisatie->id);
|
||||||
|
if($scholen){
|
||||||
|
foreach($scholen as $school){
|
||||||
|
$array[] = $school->id;
|
||||||
|
}
|
||||||
|
$schoolIDs = implode(',', $array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($organisatie->soort != 1) {
|
||||||
|
$organisatieBoven = $this->Organisaties_model->getorg($organisatie->valtonder_id);
|
||||||
|
if($organisatie->soort == 3){
|
||||||
|
$organisatieBoven = $this->Organisaties_model->getorg($organisatieBoven->valtonder_id);
|
||||||
|
}
|
||||||
|
$scholenboven = $this->Organisaties_model->get_schoolIDs_onder($organisatie->valtonder_id);
|
||||||
|
if($scholenboven){
|
||||||
|
foreach($scholenboven as $school){
|
||||||
|
$array[] = $school->id;
|
||||||
|
}
|
||||||
|
$schoolIDsBoven = implode(',', $array);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach($schooljaarnrs as $nummer){
|
||||||
|
$schooljaar = new stdClass();
|
||||||
|
|
||||||
|
if(isset($schoolIDs)) {
|
||||||
|
$omvang = $this->Aantalleerlingen_model->get_omvang($nummer, $schoolIDs);
|
||||||
|
$schooljaar->schooljaarnr = $omvang->schooljaarnr;
|
||||||
|
$schooljaar->naam = $omvang->naam;
|
||||||
|
$schooljaar->aantal = $omvang->aantal;
|
||||||
|
$schooljaar->aantalllnarr = $this->Arrangementen_model->getAantalLeerlingenMetArrangement($nummer, $schoolIDs);
|
||||||
|
$schooljaar->tlvs = $this->Tlvs_model->getAantalLeerlingenMetTLV($nummer, $schoolIDs);
|
||||||
|
if($organisatie->soort == 4){
|
||||||
|
$schooljaar->arrangementen = $this->Arrangementen_model->getArrangementenMetAantallen($organisatie->id,$nummer );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isset($schoolIDsBoven)) {
|
||||||
|
$boven = $this->Aantalleerlingen_model->get_omvang($nummer, $schoolIDsBoven);
|
||||||
|
$schooljaar->naamboven = $organisatieBoven->naamkort;
|
||||||
|
$schooljaar->brinboven = $organisatieBoven->brin;
|
||||||
|
$schooljaar->aantalboven = $boven->aantal;
|
||||||
|
$schooljaar->aantalllnarrB = $this->Arrangementen_model->getAantalLeerlingenMetArrangement($nummer, $schoolIDsBoven);
|
||||||
|
$schooljaar->tlvsB = $this->Tlvs_model->getAantalLeerlingenMetTLV($nummer, $schoolIDsBoven);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(isset($schooljaar->aantal)){
|
||||||
|
$schooljaren [] = $schooljaar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = [
|
||||||
|
'schooljaren' => $schooljaren
|
||||||
|
];
|
||||||
|
|
||||||
|
echo json_encode($result);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getArrangementenBijSchool($schooljaarnrs, $organisatieid){
|
||||||
|
$arrangementen = [];
|
||||||
|
foreach ($schooljaarnrs as $nummer) {
|
||||||
|
$arrangement = $this->Arrangementen_model->getArrangementen($organisatieid, $nummer);
|
||||||
|
if ($arrangement) {
|
||||||
|
$arrangementen[] = $arrangement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $arrangementen;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function maakOmvangPDF(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
if (!$this->globorgid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$schooljaren = $input->schooljaren;
|
||||||
|
$filenaam = $input->filenaam;
|
||||||
|
$filenaam = trim($filenaam);
|
||||||
|
$filenaam = str_replace(' ', '_', $filenaam);
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($this->globorgid);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
|
||||||
|
$data['organisatie'] = $organisatie;
|
||||||
|
$data['vandaag'] = $today;
|
||||||
|
$data['schooljaren']= $input->schooljaren;
|
||||||
|
$data['hoofdtabel'] = $input->hoofdtabel;
|
||||||
|
$data['graph'] = $input->graph;
|
||||||
|
$data['tlvgraphs'] = $input->tlvgraphs;
|
||||||
|
$data['arrgraphs'] = $input->arrgraphs;
|
||||||
|
$data['arrtables'] = $input->arrtables;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$html = $this->load->view("monpas/reports/omvangreport", $data, true);
|
||||||
|
$pdf = $this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE, 'landscape');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// monpas.local/index.php/monpas/omvang/getGrippaTlvs/2019
|
||||||
|
public function getGrippaTlvs($schooljaar){
|
||||||
|
// if (!$this->userid) die;
|
||||||
|
$startdatum = '2019-08-01';
|
||||||
|
$einddatum = '2020-07-31';
|
||||||
|
$endpoint = 'https://api.grippa.nl/index.php/v1/api/tlvrequest';
|
||||||
|
$this->load->helper('string');
|
||||||
|
$key = 'mZ6QtNTno2bjvIoojD5eafSKjJf6Oc3KLLaz9Ixlo2bjvIoojD5eaf';
|
||||||
|
$requestToken = random_string('alnum', 40);
|
||||||
|
$organisationHash =
|
||||||
|
hash( 'sha256',
|
||||||
|
hash( 'sha256', 'esC4ESRmqgHaEoj7lXF8W1plrZRM0FqzujEz8xI6noWvuYKyE7' ) .
|
||||||
|
hash( 'sha256', $requestToken )
|
||||||
|
);
|
||||||
|
|
||||||
|
// $organisationHash = hash_hmac( hash_hmac('esC4ESRmqgHaEoj7lXF8 W1plrZRM0FqzujEz8xI6 noWvuYKyE7'). hash_hmac($requestToken));
|
||||||
|
|
||||||
|
$payload = [
|
||||||
|
'iat' => strtotime(gmdate('Y/m/d H:i:s')),
|
||||||
|
'iss' => 'MONPAS',
|
||||||
|
'organisation_brin' => 'PO2203',
|
||||||
|
'requesttoken' => $requestToken,
|
||||||
|
'organisation_hash' => $organisationHash,
|
||||||
|
'start' => $startdatum,
|
||||||
|
'starttype' => 'G',
|
||||||
|
'eind' => $einddatum,
|
||||||
|
'eindtype' => 'S'
|
||||||
|
];
|
||||||
|
|
||||||
|
$jwt = JWT::encode($payload, $key);
|
||||||
|
|
||||||
|
$curl = new Curl();
|
||||||
|
$curl->post($endpoint, ['jwt' => $jwt]);
|
||||||
|
|
||||||
|
$tlvs = $curl->response;
|
||||||
|
$tlvs = json_decode($tlvs);
|
||||||
|
|
||||||
|
|
||||||
|
var_dump($tlvs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Ondersteuning extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
"monpas/Ondersteuningtijden_model",
|
||||||
|
"monpas/Groepen_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getgroepen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input('orgID');
|
||||||
|
$schooljaarnr = $this->clean_input('schooljaar');
|
||||||
|
$module = $this->clean_input('module');
|
||||||
|
$groepen = $this->Groepen_model->getgroepenlist($orgid, $schooljaarnr, $module);
|
||||||
|
echo json_encode($groepen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getgroepenso(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$groepen = $this->Groepen_model->getgroepenSboSo($orgid, $schooljaarnr);
|
||||||
|
$ondersteuning = 'T';
|
||||||
|
if ($groepen){
|
||||||
|
foreach($groepen as $groep) {
|
||||||
|
if (isset($groep->ondersteuning)) {
|
||||||
|
if ($groep->ondersteuning === 'F') {
|
||||||
|
$ondersteuning = 'F';
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(['groepen'=>$groepen, 'ondersteuning'=>$ondersteuning]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function gettijden(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$groepid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$dagen=array( ['dagnr'=> 1,'dag' => 'maandag', 'minutenG'=>0, 'minutenS'=> 0,'minutenI'=> 0],
|
||||||
|
['dagnr'=> 2,'dag' => 'dinsdag', 'minutenG'=>0, 'minutenS'=> 0,'minutenI'=> 0],
|
||||||
|
['dagnr'=> 3,'dag' => 'woensdag', 'minutenG'=>0, 'minutenS'=> 0,'minutenI'=> 0],
|
||||||
|
['dagnr'=> 4,'dag' => 'donderdag', 'minutenG'=>0, 'minutenS'=> 0,'minutenI'=> 0],
|
||||||
|
['dagnr'=> 5,'dag' => 'vrijdag', 'minutenG'=>0, 'minutenS'=> 0,'minutenI'=> 0]);
|
||||||
|
for($i=0;$i<count($dagen);$i++){
|
||||||
|
$minuten = $this->Ondersteuningtijden_model->getminuten($groepid, $dagen[$i]['dagnr'],'G');
|
||||||
|
|
||||||
|
if ($minuten){
|
||||||
|
$dagen[$i]['minutenG']= $minuten;
|
||||||
|
};
|
||||||
|
|
||||||
|
$minuten = $this->Ondersteuningtijden_model->getminuten($groepid, $dagen[$i]['dagnr'],'S');
|
||||||
|
if ($minuten){
|
||||||
|
$dagen[$i]['minutenS']= $minuten;};
|
||||||
|
|
||||||
|
$minuten = $this->Ondersteuningtijden_model->getminuten($groepid, $dagen[$i]['dagnr'],'I');
|
||||||
|
if ($minuten){$dagen[$i]['minutenI']= $minuten;};
|
||||||
|
}
|
||||||
|
echo json_encode($dagen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveondersteuning(){
|
||||||
|
$ondersteuning = $this->clean_input('ondersteuning');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$schooljaar = $this->clean_input('schooljaar');
|
||||||
|
|
||||||
|
$groepen = $this->Groepen_model->getgroepenSboSo($orgid, $schooljaar);
|
||||||
|
if ($groepen) {
|
||||||
|
foreach ($groepen as $groep) {
|
||||||
|
$this->Groepen_model->update_record_where(['ondersteuning' => $ondersteuning], ['id' => $groep->id]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function insertorupdatetijd(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$where= array( "groep_id" =>$this->clean_input('groepid'),
|
||||||
|
"dagnr" =>$this->clean_input('dagnr'),
|
||||||
|
"soort" =>$this->clean_input('soort') );
|
||||||
|
|
||||||
|
$tijd = $this->Ondersteuningtijden_model->get_records_where($where, true);
|
||||||
|
if ($tijd){
|
||||||
|
$this->Ondersteuningtijden_model->update_record(array("minuten" =>$this->clean_input('minuten')), $tijd->id);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$where['organisatie_id'] = $this->clean_input('orgid');
|
||||||
|
$where['minuten'] = $this->clean_input('minuten');
|
||||||
|
|
||||||
|
$this->Ondersteuningtijden_model->insert_record($where);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Overzichtscores extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Users_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"monpas/Filledversions_model" ,
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Oordelen_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Indicatoren_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"shared/Session_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getscores(){
|
||||||
|
$orguserid = $this->input->post("orguserid");
|
||||||
|
|
||||||
|
$userid = false;
|
||||||
|
if ($orguserid && $orguserid !== 'false'){
|
||||||
|
$userid = $this->Orgusers_model->get(['id'=>$orguserid],'user_id', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$orgversie = $this->clean_input("orgversieid");
|
||||||
|
if (!$orguserid) {$orgstring = implode(',' , $this->Organisaties_model->getscholenondertarget($orgid));}
|
||||||
|
else {$orgstring = $orgid ;}
|
||||||
|
$data = $this->Scores_model->getstandaardfrequenties($userid, $orgstring,$orgversie);
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function getuserstatus(){
|
||||||
|
// echo json_encode($this->super);
|
||||||
|
// }//schoolmanagement mag eigen normen wijzigen nav omzettabel 23 nov 2017
|
||||||
|
|
||||||
|
function geteditrecht(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$bgid = $this->Organisaties_model->get_fieldvalue(array('id'=>$orgid), 'valtonder_id');
|
||||||
|
$kamerid = $this->Organisaties_model->get_fieldvalue(array('id'=>$bgid), 'valtonder_id');
|
||||||
|
$recht = false;
|
||||||
|
|
||||||
|
if($this->userrole<= 8){// werkt bij swv
|
||||||
|
$recht = true;
|
||||||
|
}
|
||||||
|
if($this->globorgid == $kamerid && $this->userrole <= 32){//werkt bij kamer
|
||||||
|
$recht == true;
|
||||||
|
}
|
||||||
|
if($this->globorgid == $bgid && $this->uderrole <=128){//werkt bij bg
|
||||||
|
$recht = true;
|
||||||
|
}
|
||||||
|
if($this->globorgid == $orgid && $this->userrole <= 256){//management op school
|
||||||
|
$recht = true;
|
||||||
|
}
|
||||||
|
echo json_encode($recht);
|
||||||
|
}
|
||||||
|
function saveOordeel(){
|
||||||
|
$newID= false;
|
||||||
|
|
||||||
|
$oordeelID = $this->input->post("oordeelID");
|
||||||
|
$norm = "";
|
||||||
|
$normid = $this->clean_input('normID');
|
||||||
|
switch($normid){
|
||||||
|
case 1: $norm = "zeer zwak"; break;
|
||||||
|
case 2: $norm = "onvoldoende"; break;
|
||||||
|
case 3: $norm = "voldoende"; break;
|
||||||
|
case 4: $norm = "goed"; break;
|
||||||
|
};
|
||||||
|
if (!$oordeelID){
|
||||||
|
$data=['filledversion_id' =>$this->clean_input('fvID'),
|
||||||
|
'ijkpunt_id' =>$this->clean_input('ijkID'),
|
||||||
|
'norm_id' =>$normid,
|
||||||
|
'norm' =>$norm
|
||||||
|
];
|
||||||
|
|
||||||
|
$newID = $this->Oordelen_model->insert_record($data);
|
||||||
|
}else {
|
||||||
|
$data=['norm_id' =>$normid,
|
||||||
|
'norm' =>$norm
|
||||||
|
];
|
||||||
|
$newID = $this->Oordelen_model->update_record($data, $oordeelID);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($newID);
|
||||||
|
}
|
||||||
|
|
||||||
|
function savegewenst(){
|
||||||
|
$wensarray = $this->input->post('wensarray');
|
||||||
|
foreach($wensarray as $wens){
|
||||||
|
|
||||||
|
if ($wens['oordeelid']){
|
||||||
|
$data = ['wens_id' =>$wens['gewenst'] ];
|
||||||
|
$this->Oordelen_model->update_record($data, $wens['oordeelid']);
|
||||||
|
} else{
|
||||||
|
$data =['wens_id' =>$wens['gewenst'],
|
||||||
|
'filledversion_id'=>$wens['fvID'],
|
||||||
|
'ijkpunt_id' =>$wens['ijkID'],
|
||||||
|
'norm_id' =>0];
|
||||||
|
$this->Oordelen_model->insert_record($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pdfstandaarden(){
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$school = $input->school;
|
||||||
|
$versie = $input->versie;
|
||||||
|
$standaarden = $input->standaarden;
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ;
|
||||||
|
|
||||||
|
$data = ['instrument' =>$instrument,
|
||||||
|
'school' =>$school,
|
||||||
|
'versie' =>$versie,
|
||||||
|
'today' =>Date('d-m-Y'),
|
||||||
|
'standaarden' =>json_decode($standaarden)];
|
||||||
|
|
||||||
|
$html = $this->load->view("monpas/reports/pdfstandaarden", $data, true);
|
||||||
|
$filenaam="standaarden";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function printontwikkelmatrix(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->get('json');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
|
||||||
|
$school = $input->school;
|
||||||
|
$versie = $input->versie;
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ;
|
||||||
|
$labels = $this->Labels_model->getalllabels();
|
||||||
|
$standaarden = $input->resultaten;
|
||||||
|
|
||||||
|
$data = ['instrument' =>$instrument,
|
||||||
|
'labels' =>$labels,
|
||||||
|
'school' =>$school,
|
||||||
|
'versie' =>$versie,
|
||||||
|
'today' =>Date('d-m-Y'),
|
||||||
|
'standaarden' =>$standaarden];
|
||||||
|
$html = $this->load->view("monpas/reports/ontwikkelmatrix2", $data, true);
|
||||||
|
$filenaam="ontwikkelmatrix";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Overzichtsop extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"shared/Schooljaren_model",
|
||||||
|
"shared/Organisaties_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"monpas/Compactsop_model"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSchooljaren(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||||
|
echo json_encode($schooljaren);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getoverzicht() {
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
if ($orgid == 0) $orgid = $this->globorgid;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
switch ($organisatie->soort) {
|
||||||
|
case 4:
|
||||||
|
$organisatie->sop = 'F';
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(['organisatie_id' => $orgid,
|
||||||
|
'schooljaarnummer' => $schooljaarnr], 'id');
|
||||||
|
if ($compactsopID) $organisatie->sop = 'T';
|
||||||
|
echo json_encode(array("organisatie" => $organisatie, "soort" => 4,));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$bgid = $organisatie->id;
|
||||||
|
$organisatie->scholen = $this->Organisaties_model->getorgsvanaf($bgid);
|
||||||
|
if ($organisatie->scholen) {
|
||||||
|
foreach ($organisatie->scholen as $index => $school) {
|
||||||
|
$school->sop = 'F';
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||||
|
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||||
|
if ($compactsopID) $school->sop = 'T';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("organisatie" => $organisatie, "soort" => 3));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$kamerid = $organisatie->id;
|
||||||
|
$organisatie->bgs = $this->Organisaties_model->getorgsvanaf($kamerid);
|
||||||
|
if ($organisatie->bgs) {
|
||||||
|
foreach ($organisatie->bgs as $bg) {
|
||||||
|
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
foreach ($bg->scholen as $index => $school) {
|
||||||
|
$school->sop = 'F';
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||||
|
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||||
|
if ($compactsopID) $school->sop = 'T';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("organisatie" => $organisatie, "soort" => 2));
|
||||||
|
break;
|
||||||
|
case 1;
|
||||||
|
$swvid = $organisatie->id;
|
||||||
|
$organisatie->kamers = $this->Organisaties_model->getorgsvanaf($swvid);
|
||||||
|
if ($organisatie->kamers) {
|
||||||
|
if (!is_array($organisatie->kamers)) {
|
||||||
|
$organisatie->kamers = objectToArray($organisatie->kamers);
|
||||||
|
}
|
||||||
|
foreach ($organisatie->kamers as $kamer) {
|
||||||
|
$kamer->bgs = $this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($kamer->bgs) {
|
||||||
|
foreach ($kamer->bgs as $bg) {
|
||||||
|
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
foreach ($bg->scholen as $index => $school) {
|
||||||
|
$school->sop = 'F';
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||||
|
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||||
|
if ($compactsopID) $school->sop = 'T';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("organisatie" => $organisatie, "soort" => 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAlfabetisch(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schooljaarnr = $this->clean_input("schooljaarnr");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
if ($orgid == 0) $orgid = $this->globorgid;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
if($organisatie->soort == 2) $organisatie->scholen = $this->Organisaties_model->getscholenonderkamer($organisatie->id);
|
||||||
|
if($organisatie->soort == 1) $organisatie->scholen = $this->Organisaties_model->getscholenonderswv($organisatie->id);
|
||||||
|
|
||||||
|
foreach ($organisatie->scholen as $index => $school) {
|
||||||
|
$school->sop = 'F';
|
||||||
|
$compactsopID = $this->Compactsop_model->get_fieldvalue(
|
||||||
|
['organisatie_id' => $school->id, 'schooljaarnummer' => $schooljaarnr], 'id');
|
||||||
|
if ($compactsopID) $school->sop = 'T';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(array("organisatie" => $organisatie, "soort" => $organisatie->soort));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function download_pdf(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$schooljaarnr = $this->uri->segment(5);
|
||||||
|
$sopid = $this->Compactsop_model->get_fieldvalue(['organisatie_id'=>$orgid,
|
||||||
|
'schooljaarnummer' =>$schooljaarnr], 'id');
|
||||||
|
if($sopid){
|
||||||
|
$this->Compactsop_model->downloadCompactSop ($sopid);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Pdfmaker extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"Phantom_model",
|
||||||
|
"monpas/Compactsop_model",
|
||||||
|
"monpas/Schooldetails_model"
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
// if ( ! $this->check_online_status() ) {
|
||||||
|
// echo json_encode( array('offline' => TRUE) );
|
||||||
|
// die;
|
||||||
|
// };// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function pdfSVG(){
|
||||||
|
// if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$inhoud = $input->pagina;
|
||||||
|
$titel = $input->titel;
|
||||||
|
$schoolid = $input->schoolid;
|
||||||
|
$schooljaarnummer = $input->schooljaarnr;
|
||||||
|
$organisatie = $this->Organisaties_model->get(['id' => $schoolid],false, true);
|
||||||
|
$data['inhoud' ]= $inhoud;
|
||||||
|
$html = $this->load->view('monpas/compactsop/sopcompact.php', $data, TRUE);
|
||||||
|
$date = date('dmY');
|
||||||
|
$zoek = [" ", "'", "/"];
|
||||||
|
$schoolid = str_replace($zoek, "",$schoolid);
|
||||||
|
$schoolnaam = str_replace($zoek, "",$organisatie->naamkort);
|
||||||
|
$titel = str_replace($zoek, "",$titel);
|
||||||
|
|
||||||
|
$frameworklogo= $this->config->item('vendor_url').'/images/logos/frameworklogo.png';
|
||||||
|
$logonaam = $this->Schooldetails_model->get(["organisatie_id" =>$schoolid],'logo', true);
|
||||||
|
if (! $logonaam) $logonaam="monpaslogo.png";
|
||||||
|
$schoollogo = $this->config->item('vendor_url').'/images/logos/'.$logonaam;
|
||||||
|
|
||||||
|
$headerdata = ['titel' =>$titel,
|
||||||
|
'schoolnaam' =>$schoolnaam ? $schoolnaam : '',
|
||||||
|
'logoframework' =>$frameworklogo,
|
||||||
|
'logoschool' =>$schoollogo];
|
||||||
|
$footerdata = "";
|
||||||
|
$header = $this->load->view( "monpas/compactsop/compactheader", $headerdata, TRUE ) ;
|
||||||
|
$footer = $this->load->view ("monpas/compactsop/compactfooter", $footerdata, TRUE);
|
||||||
|
$filenaam = $this->compactsoppath.'sop.pdf';
|
||||||
|
|
||||||
|
$bestandsnaam = "compactsop".$schoolnaam.$schoolid.$titel.'-'.$date.'.pdf';
|
||||||
|
$downloadnaam = $this->compactsoppath.$bestandsnaam;
|
||||||
|
|
||||||
|
// TODO check if exists
|
||||||
|
$data = [ 'organisatie_id' =>$schoolid,
|
||||||
|
'schooljaarnummer' => $schooljaarnummer];
|
||||||
|
$csop = $this->Compactsop_model->get($data,false, true);
|
||||||
|
|
||||||
|
if ($csop && $csop->id){
|
||||||
|
unlink($this->compactsoppath.$csop->pdfnaam);
|
||||||
|
$this->Compactsop_model->update_record(['pdfnaam'=>$bestandsnaam], $csop->id);
|
||||||
|
$sopid = $csop->id;
|
||||||
|
} else {
|
||||||
|
$data['pdfnaam'] = $bestandsnaam;
|
||||||
|
$sopid = $this->Compactsop_model->insert_record($data);
|
||||||
|
}
|
||||||
|
$margins = [15, 15,10, 5, 150]; //100 was 45 = headerheight
|
||||||
|
|
||||||
|
$pdf= $this->Phantom_model->create_and_get_pdf($html, $filenaam, $header, TRUE, $margins,'portrait',TRUE,TRUE);
|
||||||
|
file_put_contents($downloadnaam, $pdf);
|
||||||
|
chmod($downloadnaam, 0777);
|
||||||
|
|
||||||
|
header( 'Content-Description: File Transfer' );
|
||||||
|
header( 'Content-Type: application/pdf' );
|
||||||
|
header( 'Content-disposition:inline; filename="' .$bestandsnaam.'"');
|
||||||
|
header( 'Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0' );
|
||||||
|
header( 'Pragma: public' );
|
||||||
|
header( 'Content-Length: ' . filesize( $downloadnaam ) );
|
||||||
|
readfile($downloadnaam);
|
||||||
|
//
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,753 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Rapijkpunten extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "monpas/Filledversions_model",
|
||||||
|
"monpas/Labels_model",
|
||||||
|
"shared/Autorisatienivos_model",
|
||||||
|
"shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
'shared/Orgusers_model',
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Indicatoren_model",
|
||||||
|
"monpas/Antwoordtypes_model",
|
||||||
|
"monpas/Wenssituaties_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
'shared/Session_model',
|
||||||
|
"monpas/Ambities_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
$this->load->library('monpas/kleurcodes');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getorgs(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($this->globorgid);
|
||||||
|
switch ($organisatie->soort){
|
||||||
|
case 4: $schoolid = $organisatie->id;
|
||||||
|
echo json_encode(array("organisatie"=>$organisatie, "soort"=>4));
|
||||||
|
break;
|
||||||
|
case 3: $bgid = $organisatie->id;
|
||||||
|
$organisatie->scholen=$this->Organisaties_model->getorgsvanaf($bgid);
|
||||||
|
echo json_encode(array("organisatie"=>$organisatie, "soort"=>3));
|
||||||
|
break;
|
||||||
|
case 2: $kamerid = $organisatie->id;
|
||||||
|
$organisatie->bgs = $this->Organisaties_model->getorgsvanaf($kamerid);
|
||||||
|
if ($organisatie->bgs){
|
||||||
|
foreach($organisatie->bgs as $bg){
|
||||||
|
$bg->scholen = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("organisatie"=>$organisatie, "soort"=>2));
|
||||||
|
break;
|
||||||
|
case 1; $swvid = $organisatie->id;
|
||||||
|
$organisatie->kamers = $this->Organisaties_model->getorgsvanaf($swvid);
|
||||||
|
if ($organisatie->kamers){
|
||||||
|
if(!is_array($organisatie->kamers)){
|
||||||
|
$organisatie->kamers = objectToArray($organisatie->kamers);
|
||||||
|
}
|
||||||
|
foreach($organisatie->kamers as $kamer){
|
||||||
|
$kamer->bgs = $this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($kamer->bgs){
|
||||||
|
foreach($kamer->bgs as $bg){
|
||||||
|
$bg->scholen =$this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("organisatie"=>$organisatie, "soort"=>1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getusernivo(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$usernivo = 0;
|
||||||
|
|
||||||
|
$usernivo = $this->Autorisatienivos_model->check_level($this->userrole, SYSTEM);
|
||||||
|
|
||||||
|
if ($usernivo == 0){
|
||||||
|
$usernivo = $this->Autorisatienivos_model->check_level($this->userrole, 252);
|
||||||
|
}
|
||||||
|
else {$usernivo == 1;}
|
||||||
|
echo json_encode($usernivo);
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkLevel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$soort = $this->Organisaties_model->get_fieldvalue(array("id"=>$this->globorgid), 'soort' );
|
||||||
|
$werkter = $this->Orgusers_model->get_fieldvalue(array("user_id"=>$this->userid, "organisatie_id"=>$this->globorgid),"id");
|
||||||
|
$level = 0;
|
||||||
|
|
||||||
|
if ($soort < 4 && $werkter) {
|
||||||
|
$level = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($level);
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkLevelInspectie(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$soort = $this->Organisaties_model->get_fieldvalue(array("id"=>$this->globorgid), 'soort' );
|
||||||
|
$level123 = false;
|
||||||
|
|
||||||
|
if ($soort > 0 && soort < 4) {
|
||||||
|
$level123 == true;
|
||||||
|
}
|
||||||
|
echo json_encode($level123);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getperiodes2(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$targetid = $this->uri->segment(4);
|
||||||
|
$bgid = false;
|
||||||
|
$kamerid = false;
|
||||||
|
$swvid = false;
|
||||||
|
$versies = false;
|
||||||
|
$organisatie= $this->Organisaties_model->getOrganisatie($targetid);
|
||||||
|
$soort = $organisatie->soort;
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
if ($soort ==4){
|
||||||
|
// aan bg zijn nu nog geen versie gekoppeld, maar dat zou zo maar kunnen
|
||||||
|
//vandaar dat ie hier al wordt meegenomen
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($organisatie->valtonder_id, $module);
|
||||||
|
$bgid = $organisatie->valtonder_id;
|
||||||
|
}
|
||||||
|
if ($soort ==3 || ( !$versies && $soort > 3)){
|
||||||
|
if ($organisatie->soort == 3) {$bgid=$targetid;};
|
||||||
|
$organisatie=$this->Organisaties_model->get_record_by_id($bgid);
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($bgid,$module);
|
||||||
|
$kamerid = $organisatie->valtonder_id;
|
||||||
|
}
|
||||||
|
if ($soort ==2 || (!$versies && $soort > 2)){
|
||||||
|
if ($organisatie->soort == 2) {$kamerid=$targetid;};
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($kamerid,$module);
|
||||||
|
$organisatie =$this->Organisaties_model->get_record_by_id($kamerid);
|
||||||
|
$swvid = $organisatie->valtonder_id;
|
||||||
|
}
|
||||||
|
if ($soort == 1 || (!$versies && $soort>1)){
|
||||||
|
if ($organisatie->soort == 1) {$swvid=$targetid;};
|
||||||
|
$versies = $this->Orgversies_model->getallorgversies($swvid,$module);
|
||||||
|
}
|
||||||
|
echo json_encode($versies);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getperiodes3(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$targetid = $this->uri->segment(4);// orgid
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
// get de lijst van scholen onder de target
|
||||||
|
$idlijst = $this->Organisaties_model->getscholenondertarget2($targetid);
|
||||||
|
if($idlijst) {
|
||||||
|
$ids = implode(',', $idlijst);
|
||||||
|
|
||||||
|
$versies = $this->Filledversions_model->getversiesperalleorgs($ids, $module);
|
||||||
|
|
||||||
|
|
||||||
|
if($versies) {
|
||||||
|
foreach ($versies as $versie) {
|
||||||
|
$versie->scoreomschrijving = $this->Antwoordtypes_model->gettype($versie->scoretype);
|
||||||
|
}
|
||||||
|
echo json_encode($versies);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getVersies(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$targetid = $this->uri->segment(4);// orgid
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
// get de lijst van scholen onder de target
|
||||||
|
$idlijst = $this->Organisaties_model->getscholenondertarget2($targetid);
|
||||||
|
$ids = implode (',' , $idlijst);
|
||||||
|
if(!$ids){$versies = false;}
|
||||||
|
if(!$module){$versies = false;}
|
||||||
|
if($ids && $module) {
|
||||||
|
$versies = $this->Filledversions_model->getversiesperalleorgs($ids, $module);
|
||||||
|
|
||||||
|
foreach ($versies as $versie) {
|
||||||
|
$versie->scoreomschrijving = $this->Antwoordtypes_model->gettype($versie->scoretype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($versies);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getvergelijkbareversies(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
$series = (new VergelijkbareVersies($orgid, $module))->getSeries();
|
||||||
|
|
||||||
|
echo json_encode(['series' =>$series]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getingevuldelijsten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$selecties = $this->input->post('selectie');
|
||||||
|
|
||||||
|
if (!$orgid || !$selecties) return;
|
||||||
|
$aantal = count($selecties);
|
||||||
|
|
||||||
|
|
||||||
|
$users = $this->getUsersSelectie($orgid, $selecties);
|
||||||
|
$lijstenObject = new Lijsten($orgid, $selecties);
|
||||||
|
$lijsten = $lijstenObject->getLijsten();
|
||||||
|
$ijkpunten = $lijstenObject->getIJkpunten();
|
||||||
|
|
||||||
|
$nieuwsteversie = $lijstenObject->getNieuwsteVersie();
|
||||||
|
$kleuren = $lijstenObject->getKleuren();
|
||||||
|
|
||||||
|
$data =[
|
||||||
|
'lijsten' => $lijsten,
|
||||||
|
'aantal' => $aantal,
|
||||||
|
'nieuwsteversie' => $nieuwsteversie,
|
||||||
|
'users' => $users,
|
||||||
|
'ijkpunten' => $ijkpunten,
|
||||||
|
'kleuren' => $kleuren
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getUsersSelectie($orgid, $selecties){
|
||||||
|
$aantal = count($selecties);
|
||||||
|
$soort = $this->Organisaties_model->get_fieldvalue(['id'=> $orgid], 'soort');
|
||||||
|
$alleenjezelf = false;
|
||||||
|
$collegas = false;
|
||||||
|
$users = [];
|
||||||
|
|
||||||
|
if($soort == 4) {
|
||||||
|
for($i = 0; $i < $aantal; $i++ ) {
|
||||||
|
if ($selecties[$i]['vorm'] == 2) {
|
||||||
|
$werkter = $this->Orgusers_model->get_fieldvalue(["user_id" => $this->userid, "organisatie_id" => $orgid], "id");
|
||||||
|
if ($werkter) {
|
||||||
|
$nivo = $this->Autorisaties_model->get_fieldvalue(["orguser_id" => $werkter], "nivo_id");
|
||||||
|
if ((int)$nivo == 10) {
|
||||||
|
$alleenjezelf = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$collegas = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$collegas = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($alleenjezelf) {
|
||||||
|
$orguser = $this->Orgusers_model->get_org_user($werkter);
|
||||||
|
$user = new stdClass();
|
||||||
|
$user->fullname = $orguser->fullname;
|
||||||
|
$user->id = $orguser->id;
|
||||||
|
$users[] = $user;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($collegas == true ) {
|
||||||
|
$leerkrachten = $this->Orgusers_model->get_org_users($orgid);
|
||||||
|
if ($leerkrachten) {
|
||||||
|
foreach ($leerkrachten as $index => $leerkracht) {
|
||||||
|
$users[] = $leerkracht;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($users) > 0) {
|
||||||
|
$gemiddeldeuser = new stdClass();
|
||||||
|
$gemiddeldeuser->fullname = 'Schoolgemiddelde';
|
||||||
|
$gemiddeldeuser->id = '0';
|
||||||
|
array_unshift($users, $gemiddeldeuser);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $users;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getuserlijsten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orguserid = $this->clean_input('orguserid');
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$orgversies = $this->clean_input('selectie');
|
||||||
|
|
||||||
|
if (!$orgid || !$orgversies || !$orguserid) return;
|
||||||
|
|
||||||
|
$aantal = count($orgversies);
|
||||||
|
$userLijsten = new UserLijsten($orguserid, $orgid, $orgversies);
|
||||||
|
$lijsten = $userLijsten->getLijsten();
|
||||||
|
$nieuwsteversie = $userLijsten->getNieuwsteVersie();
|
||||||
|
|
||||||
|
$data =[
|
||||||
|
'lijsten' => $lijsten,
|
||||||
|
'aantal' => $aantal,
|
||||||
|
'nieuwsteversie' => $nieuwsteversie,
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getusers(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$beheerder = $this->Autorisaties_model->check_autorisatie($this->userrole, WRITER);
|
||||||
|
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
$orgversieid = $this->clean_input("orgversie");
|
||||||
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
||||||
|
$users = array();
|
||||||
|
if ($orgversie && $orgversie->vorm==2 && $organisatie->soort == 4){
|
||||||
|
if ($beheerder > 0) { $users= $this->Orgusers_model->get_org_users($orgid, TRUE);}
|
||||||
|
else {$users = $this->Orgusers_model->get_user($this->userid, $orgid); }
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($users);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getscoreSWV_Kamer($orgid,$orgversieid){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
// de scores moeten vergeleken worden met het gemiddelde voor de kamer
|
||||||
|
// of het swv als je op swv niveau zit
|
||||||
|
if ($organisatie->soort == 1) {$targetid = $orgid; }
|
||||||
|
|
||||||
|
else {$targetid = $this->Organisaties_model->getkamer($orgid);}
|
||||||
|
$targetnaam = $this->Organisaties_model->get_fieldvalue(array('id'=>$targetid),'naamkort');
|
||||||
|
// haal alle organisatie onder de target op als string
|
||||||
|
$orgstring = implode(',' , $this->Organisaties_model->getscholenondertarget($targetid));
|
||||||
|
$scoresToplevel = $this->Scores_model->calculateOverScholen($orgversieid, $orgstring);
|
||||||
|
return array("scoresToplevel"=>$scoresToplevel,
|
||||||
|
"targetid" => $targetid,
|
||||||
|
"targetnaam"=>$targetnaam);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getscores(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->clean_input("orgversieid");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
$scores = $this->Ijkpunten_model->getscores($orgversieid, $orgid);
|
||||||
|
$returnarray = $this->getscoreSWV_Kamer($orgid,$orgversieid);
|
||||||
|
|
||||||
|
$scoresToplevel = $returnarray['scoresToplevel'];
|
||||||
|
$targetnaam = $returnarray['targetnaam'];
|
||||||
|
|
||||||
|
if ($scores){
|
||||||
|
$i =0;
|
||||||
|
foreach($scores as $score){
|
||||||
|
if ($scoresToplevel[$i]->num > 0) {
|
||||||
|
$score->toplevelgem =round( ($scoresToplevel[$i]->somscore / $scoresToplevel[$i]->num) * 10) / 10;
|
||||||
|
}
|
||||||
|
else {$score->toplevelgem = null;};
|
||||||
|
$score->toplevelscholen = $scoresToplevel[$i]->aantalscholen;
|
||||||
|
$score->gem = 0;
|
||||||
|
if ($score->num > 0) $score->gem =round( $score->somscore / $score->num,1) ;
|
||||||
|
$score->kleur = $this->kleurcodes->getkleur($score->gem);
|
||||||
|
$score->kleurtop = $this->kleurcodes->getkleur($score->toplevelgem);
|
||||||
|
$score->gem = number_format($score->gem,1,',','.');
|
||||||
|
$score->toplevelgem = number_format($score->toplevelgem, 1,',','.');
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// haal ook nog de criteria van de organisatie op
|
||||||
|
$ambitie = $this->Ambities_model->getOrgAmbities($orgversieid, $orgid);
|
||||||
|
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
||||||
|
echo json_encode(array('kleurtabel' =>$kleurtabel,
|
||||||
|
'scores' =>$scores,
|
||||||
|
'ambitie' =>$ambitie,
|
||||||
|
'scoresToplevel' =>$scoresToplevel,
|
||||||
|
'toplevelnaam' =>$targetnaam));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function scoresindividueel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
|
||||||
|
$orgversieid = $this->clean_input("orgversie");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$orguserid = $this->clean_input("orguserid");
|
||||||
|
$userid = $this->Orgusers_model->get_fieldvalue(array('id'=>$orguserid), "user_id");
|
||||||
|
$this->VerzamelScores($userid, $orgversieid, $orgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function orgscores()
|
||||||
|
{
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->clean_input("orgversieid");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$userid = null;
|
||||||
|
$this->VerzamelScores($userid, $orgversieid, $orgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function pdfijkpuntenbar(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$image = $input->image;
|
||||||
|
$orgid = $input->orgid;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
$info = $input->orgversie;
|
||||||
|
$periode = $this->Orgversies_model->get_record_by_id($input->periode);
|
||||||
|
$geldigvanaf = mysql2date($periode->geldigvanaf);
|
||||||
|
$geldigSelect = mysql2date($periode->geldigtm);
|
||||||
|
$naam = "periode ".$periode->periodenummer;
|
||||||
|
$resultaat = $input->resultaat;
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
|
||||||
|
if($input->resultaatRef != null) {
|
||||||
|
$resultaatRef = $input->resultaatRef;
|
||||||
|
$periodeRef = $this->Orgversies_model->get_record_by_id($input->periodeRef);
|
||||||
|
$geldigvanafR = mysql2date($periodeRef->geldigvanaf);
|
||||||
|
$geldigRef = mysql2date($periodeRef->geldigtm);
|
||||||
|
$naamR = "periode" . $periodeRef->periodenummer;
|
||||||
|
}
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ;
|
||||||
|
$labels = $this->Labels_model->getalllabels();
|
||||||
|
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
||||||
|
|
||||||
|
if($input->resultaatRef != null) {
|
||||||
|
$data = array(
|
||||||
|
"instrument" => $instrument,
|
||||||
|
"referentie" => $input->referentie,
|
||||||
|
"toonVergelijking" => $input->toonVergelijking,
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"docentnaam" => $input->docentnaam,
|
||||||
|
"inputimage" => $image,
|
||||||
|
"periodenaam" => $geldigvanaf . ' t/m ' . $geldigSelect,
|
||||||
|
"periodenaamR" => $geldigvanafR . ' t/m ' . $geldigRef,
|
||||||
|
"geldigRef" => $geldigRef,
|
||||||
|
"geldigSelect" => $geldigSelect,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"resultaat" => $resultaat,
|
||||||
|
"resultaatRef" => $resultaatRef,
|
||||||
|
"welkehoogsteR" => $resultaatRef->welkehoogste,
|
||||||
|
"welkehoogste" => $resultaat->welkehoogste,
|
||||||
|
"geldigSelect" => $geldigSelect,
|
||||||
|
"geldigRef" => $geldigRef,
|
||||||
|
"ambitie" => $input->ambitie,
|
||||||
|
"ijkpunten" => $input->ijkpunten,
|
||||||
|
"toplevelnaam" => $input->toplevelnaam,
|
||||||
|
"labels" => $labels,
|
||||||
|
"info" =>$info,
|
||||||
|
"kleurtabel" => $kleurtabel);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$data = array(
|
||||||
|
"instrument" => $instrument,
|
||||||
|
"referentie" => $input->referentie,
|
||||||
|
"toonVergelijking" => $input->toonVergelijking,
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"docentnaam" => $input->docentnaam,
|
||||||
|
"inputimage" => $image,
|
||||||
|
"periodenaam" => $geldigvanaf . ' t/m ' . $geldigSelect,
|
||||||
|
"geldigSelect" => $geldigSelect,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"resultaat" => $resultaat,
|
||||||
|
"welkehoogste" => $resultaat->welkehoogste,
|
||||||
|
"geldigSelect" => $geldigSelect,
|
||||||
|
"ambitie" => $input->ambitie,
|
||||||
|
"ijkpunten" => $input->ijkpunten,
|
||||||
|
"toplevelnaam" => $input->toplevelnaam,
|
||||||
|
"labels" => $labels,
|
||||||
|
"info" =>$info,
|
||||||
|
"kleurtabel" => $kleurtabel);
|
||||||
|
}
|
||||||
|
$html = $this->load->view("monpas/reports/ijkpuntenbar", $data, true);
|
||||||
|
$filenaam="ijkpunten";
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function maakijkpuntenpdf(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$inputstring = $this->input->post('data');
|
||||||
|
$input = json_decode($inputstring);
|
||||||
|
$orgid = $input->orgid;
|
||||||
|
$image = $input->image;
|
||||||
|
$versie = $input->versie;
|
||||||
|
$scorekleuren = $input->scorekleuren;
|
||||||
|
$organisatie = $this->Organisaties_model->getorg($orgid);
|
||||||
|
$orgversie = $this->Orgversies_model->get_record_by_id($input->nieuwsteversie);
|
||||||
|
$geldigvanaf = mysql2date($orgversie->geldigvanaf);
|
||||||
|
$geldigSelect = mysql2date($orgversie->geldigtm);
|
||||||
|
$today = date("d-m-Y");
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue(array("sysnr" =>$this->module), "naam") ;
|
||||||
|
$aantal = count($input->lijsten);
|
||||||
|
$orientatie = 'landscape';
|
||||||
|
// if($aantal > 2){
|
||||||
|
// $orientatie = 'landscape';
|
||||||
|
// }
|
||||||
|
$htmlimage = '<img src="'. $image . '"/>';
|
||||||
|
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
"instrument" => $instrument,
|
||||||
|
"lijsten" => $input->lijsten,
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"orgversie" => $orgversie,
|
||||||
|
"docentnaam" => $input->docentnaam,
|
||||||
|
"inputimage" => $image,
|
||||||
|
"versie" => $versie,
|
||||||
|
"nieuwsteversie" => $input->nieuwsteversie,
|
||||||
|
"geldigSelect" => $geldigSelect,
|
||||||
|
"scorekleuren" => $scorekleuren,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"aantal" => $aantal,
|
||||||
|
);
|
||||||
|
|
||||||
|
$html = $this->load->view("monpas/reports/ijkpuntenbar", $data, true);
|
||||||
|
$filenaam="ijkpunten";
|
||||||
|
|
||||||
|
$this->Phantom_model->create_pdf($html, $filenaam, FALSE, FALSE, FALSE, $orientatie);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function verzamelScores($userid, $orgversieid, $orgid ){
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
$returnarray = $this->getscoreSWV_Kamer($orgid, $orgversieid);
|
||||||
|
$scoresToplevel = $returnarray['scoresToplevel'];//gemiddelde scores van SWV (als t een swv is)of kamer(alle andere gevallen)
|
||||||
|
$targetnaam = $returnarray['targetnaam'];
|
||||||
|
$targetid = $returnarray['targetid'];
|
||||||
|
$vergelijkbaar = $this->getReferentieVersie($userid, $orgversieid, $orgid, $organisatie); //versies die getoond kunnen worden: 1 of 2
|
||||||
|
|
||||||
|
if ($vergelijkbaar) {
|
||||||
|
$vergelijkbaar = $this->voegsScoresToe($userid, $orgid, $vergelijkbaar);// hoe is gescored op de ijkpunten
|
||||||
|
// $versieSelect = $this->checkBestaanSelectie($userid, $vergelijkbaar, $organisatie);// als de geselecteerde versie al wel betaat uitgesterd per 27 juni 2017 zie functie
|
||||||
|
// //maar nog herlemaal niet is ingevuld, wordt de refetentieversie ook niet getoond
|
||||||
|
// if ($versieSelect) {
|
||||||
|
$versieSelect = $this->getScoresMetVergelijking($vergelijkbaar[0], $scoresToplevel);// maak scores kamer (of swv) klaar voor grafiek
|
||||||
|
$versieSelect = $this->telMetingen($userid, $orgid, $targetid, $orgversieid, $organisatie, $versieSelect); // aantal ingevulde exemplaren: individueel en bij topllevel
|
||||||
|
$versies = array($versieSelect);
|
||||||
|
|
||||||
|
if (sizeof($vergelijkbaar) > 1) { // alles tzelfe voor de referentieversie
|
||||||
|
|
||||||
|
$vorigVersieId = $vergelijkbaar[1]->id;
|
||||||
|
$returnarrayR = $this->getscoreSWV_Kamer($orgid, $vorigVersieId);
|
||||||
|
$scoresToplevelR = $returnarrayR['scoresToplevel'];
|
||||||
|
$versieRef = $this->getScoresMetVergelijking($vergelijkbaar[1], $scoresToplevelR);
|
||||||
|
$versieRef = $this->telMetingen($userid, $orgid, $targetid, $vorigVersieId, $organisatie, $versieRef); // aantal ingevulde exemplaren: individueel en bij topllevel
|
||||||
|
array_push($versies, $versieRef);
|
||||||
|
} else {
|
||||||
|
$scoresToplevelR = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// haal ook nog de criteria van de organisatie op
|
||||||
|
$ambitie = $this->Ambities_model->getOrgAmbities($orgversieid, $orgid);
|
||||||
|
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode(array('kleurtabel' => $kleurtabel,
|
||||||
|
'versies' => $versies,
|
||||||
|
'ambitie' => $ambitie,
|
||||||
|
'scoresToplevel' => $scoresToplevel,
|
||||||
|
'scoresTopLevelR' => $scoresToplevelR,
|
||||||
|
'toplevelnaam' => $targetnaam));
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// echo json_encode(false);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getScoresMetVergelijking($versie, $scores){
|
||||||
|
if($versie && $versie->scores && $scores) {
|
||||||
|
$i = 0;
|
||||||
|
$scorearray = $versie->scores;
|
||||||
|
$lengte = sizeof($scorearray);
|
||||||
|
for ($x = 0; $x < $lengte; $x++) {
|
||||||
|
if ($scores[$i]->num > 0 && isset($scores[$i]) ) {
|
||||||
|
$scorearray[$x]->toplevelgem = round(($scores[$i]->somscore / $scores[$i]->num) * 10) / 10;
|
||||||
|
} else {
|
||||||
|
$scorearray[$x]->toplevelgem = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scorearray[$x]->toplevelscholen = $scores[$i]->aantalscholen;
|
||||||
|
$scorearray[$x]->gem = 0;
|
||||||
|
if ($scorearray[$x]->num > 0) $scorearray[$x]->gem = round($scorearray[$x]->somscore / $scorearray[$x]->num, 1);
|
||||||
|
$scorearray[$x]->kleur = $this->kleurcodes->getkleur($scorearray[$x]->gem);
|
||||||
|
$scorearray[$x]->kleurtop = $this->kleurcodes->getkleur($scorearray[$x]->toplevelgem);
|
||||||
|
$scorearray[$x]->gem = number_format($scorearray[$x]->gem, 1, ',', '.');
|
||||||
|
$scorearray[$x]->toplevelgem = number_format($scorearray[$x]->toplevelgem, 1, ',', '.');
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$versie->scores= $scorearray;
|
||||||
|
|
||||||
|
return $versie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getReferentieVersie($userid, $orgversieid, $orgid, $organisatie)
|
||||||
|
{
|
||||||
|
|
||||||
|
if($userid == null) {
|
||||||
|
|
||||||
|
if ($organisatie->soort == '4') {
|
||||||
|
|
||||||
|
$vorm = $this->Orgversies_model->getVorm($orgversieid);
|
||||||
|
// $vorm = $this->Orgversies_model->get([$orgversieid->id], 'vorm', TRUE);
|
||||||
|
|
||||||
|
if($vorm == '2'){
|
||||||
|
$versies = $this->Filledversions_model->getVergelijkbareVersiesSchoolGemiddelde($orgversieid, $orgid); //individueel ingevuld. ander orgversie id = andere versie
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($vorm == '1') {
|
||||||
|
$versies = $this->Filledversions_model->getVergelijkbareVersies4($orgversieid, $orgid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($organisatie->soort == '3') {
|
||||||
|
$versies = $this->Filledversions_model->getVergelijkbareVersies3($orgversieid, $orgid);
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == '2') {
|
||||||
|
$versies = $this->Filledversions_model->getVergelijkbareVersies2($orgversieid, $orgid);
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == '1') {
|
||||||
|
$versies = $this->Filledversions_model->getVergelijkbareVersies1($orgversieid, $orgid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$versies= $this->Filledversions_model->getVergelijkbareVersiesInd($orgversieid, $orgid, $userid);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function telMetingen($userid, $orgid, $kamerid, $orgversieid, $organisatie, $versie)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!$versie) return false;
|
||||||
|
if($userid ) {// individuele scores
|
||||||
|
$versie->metingen = "1";
|
||||||
|
$versie->metingenTop = $this->Filledversions_model->telVergelijkbareVersies2($orgversieid, $kamerid);
|
||||||
|
$versie->orgsoort = "4";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
|
||||||
|
if ($organisatie->soort == '4') {//teamlijst
|
||||||
|
if($versie->vorm == '1') {
|
||||||
|
$versie->metingen = "1";
|
||||||
|
}
|
||||||
|
if($versie->vorm == '2') {
|
||||||
|
$versie->metingen = $this->Filledversions_model->telVergelijkbareVersies4Ind($orgversieid, $orgid);//indiviudele lijst als schoolgemiddelde
|
||||||
|
}
|
||||||
|
$versie->metingenTop = $this->Filledversions_model->telVergelijkbareVersies2($orgversieid, $kamerid);
|
||||||
|
$versie->orgsoort = "4";
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == '3') {
|
||||||
|
$versie->metingen = $this->Filledversions_model->telVergelijkbareVersies3($orgversieid, $orgid);//bestuur
|
||||||
|
$versie->metingenTop = $this->Filledversions_model->telVergelijkbareVersies2($orgversieid, $kamerid);
|
||||||
|
$versie->orgsoort = "3";
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == '2') {//kamer
|
||||||
|
$versie->metingen = $this->Filledversions_model->telVergelijkbareVersies2($orgversieid, $orgid);
|
||||||
|
$versie->metingenTop = $versie->metingen;
|
||||||
|
$versie->orgsoort = "2";
|
||||||
|
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == '1') {//swv
|
||||||
|
$versie->metingen = $this->Filledversions_model->telVergelijkbareVersies1($orgversieid, $orgid);
|
||||||
|
$versie->metingenTop = $versie->metingen;
|
||||||
|
$versie->orgsoort = "1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $versie;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $userid
|
||||||
|
* @param $orgid
|
||||||
|
* @param $versies
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
private function voegsScoresToe($userid, $orgid, $versies){
|
||||||
|
|
||||||
|
if ($userid == null) {
|
||||||
|
foreach ($versies as $versie) {
|
||||||
|
$versie->scores = $this->Ijkpunten_model->getscores($versie->id, $orgid);//teamscores
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
foreach ($versies as $versie) {
|
||||||
|
$versie->scores = $this->Scores_model->calculateindividualscores($versie->id, $orgid, $userid);//individuele scores
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uitgesterd per 27 juni 2017 omdat niet ingevulde lijsten toch ook getoond moeten worden oa vanwege de juiste weergave van het gemiddelde
|
||||||
|
24 okt in plaats hiervan subquery gemaakt
|
||||||
|
*/
|
||||||
|
// private function checkBestaanSelectie($userid, $versies, $organisatie){
|
||||||
|
// // als geen enkele vraag van de gekozen lijst is ingevuld, wordt de referentie ook niet getoond.
|
||||||
|
// $ietsingevuld = false;
|
||||||
|
// if($versies && $versies[0]){
|
||||||
|
// if($organisatie->soort == '4' || $userid != null){//scores van leerkrachten of op teamniveau
|
||||||
|
// foreach($versies[0]->scores as $selectie){
|
||||||
|
//
|
||||||
|
// if($selectie->score != '0.0' || $selectie->somscore != '0.0'){
|
||||||
|
// $ietsingevuld = true;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// foreach($versies[0]->scores as $selectie){
|
||||||
|
//
|
||||||
|
// if($selectie->somscore != '0.0'){//gemiddelde scores van besturen, kamers of swvs
|
||||||
|
// $ietsingevuld = true;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if ($ietsingevuld == false){
|
||||||
|
// $versies = null;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return $versies;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,288 @@
|
|||||||
|
<?php if ( ! defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
|
||||||
|
|
||||||
|
class Rapontwikkel extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$models = [
|
||||||
|
"shared/Users_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"shared/Organisaties_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Wenssituaties_model",
|
||||||
|
"Phantom_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"monpas/Orgversies_model"];
|
||||||
|
$this->load->model( $models );
|
||||||
|
$this->load->helper( 'string' );
|
||||||
|
$this->load->library( 'monpas/kleurcodes' );
|
||||||
|
if ( ! $this->check_online_status() )
|
||||||
|
{
|
||||||
|
echo json_encode( ['offline' => TRUE] );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function savegewenst()
|
||||||
|
{
|
||||||
|
//TODO clean input
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$orgid = $this->clean_input( "orgid" );
|
||||||
|
$orgversieid = $this->clean_input( "orgversionid" );
|
||||||
|
$orguserid = $this->clean_input( "orguserid" );
|
||||||
|
|
||||||
|
if ( $orguserid == 0 )
|
||||||
|
{
|
||||||
|
$orguserid = NULL;
|
||||||
|
}
|
||||||
|
$wensarray = $this->clean_input( "wensarray" );
|
||||||
|
$wensids[] = ""; // array van ids om terug te geven
|
||||||
|
if ( $wensarray )
|
||||||
|
{
|
||||||
|
foreach ( $wensarray as $wens )
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( $wens['wensid'] > 0 )
|
||||||
|
{
|
||||||
|
$data = ["wens" => $wens['gewenst']];
|
||||||
|
$this->Wenssituaties_model->update_record( $data, $wens['wensid'] );
|
||||||
|
$wensids[] = $wens['wensid'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
"organisatie_id" => $orgid,
|
||||||
|
"orgversie_id" => $orgversieid,
|
||||||
|
"orguser_id" => $orguserid,
|
||||||
|
"ijkpunt_id" => $wens['ijkpuntid'],
|
||||||
|
"wens" => $wens['gewenst']];
|
||||||
|
$wensids[] = $this->Wenssituaties_model->insert_record( $data );
|
||||||
|
}
|
||||||
|
}; // foreach
|
||||||
|
echo json_encode( $wensids );
|
||||||
|
}
|
||||||
|
} // save gewenst
|
||||||
|
|
||||||
|
function getscores()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
// deze functie wijkt af van getscores in rapijkpunten omdat ook gewenst moet
|
||||||
|
// worden opgehaald, en geen ambities
|
||||||
|
|
||||||
|
$orgversieid = $this->clean_input( "orgversieid" );
|
||||||
|
$orgid = $this->clean_input( "orgid" );
|
||||||
|
$organisatie = $this->Organisaties_model->getorg( $orgid );
|
||||||
|
$scores = NULL;
|
||||||
|
$gewenst = NULL;
|
||||||
|
$orgversie = $this->Orgversies_model->get_record_by_id($orgversieid);
|
||||||
|
if($orgversie->scoretype == 7){
|
||||||
|
$grens1 = 33;
|
||||||
|
$grens2 = 66;
|
||||||
|
$grens3 = 100;
|
||||||
|
}
|
||||||
|
// als de organisatie een school is : haal de gemiddelde score op (als de 'ik-versie" wordt gebruikt
|
||||||
|
// let op als ik-versie dan moeten de gegevens van de users worden opgehaald maar
|
||||||
|
// dat gaat vanzelf omdat gezocht wordt naar organisatie (via filled versions);
|
||||||
|
// let op ja nee bezig wordt vertaald naar 10, 0 en 5
|
||||||
|
|
||||||
|
if ( ! $organisatie )
|
||||||
|
{
|
||||||
|
echo json_encode( ['scores' => FALSE] );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $organisatie->soort == 1 || $organisatie->soort == 2 || $organisatie->soort == 3 )
|
||||||
|
{
|
||||||
|
$schoolids = $this->Organisaties_model->getscholenondertarget( $organisatie->id );
|
||||||
|
|
||||||
|
if ( $schoolids )
|
||||||
|
{
|
||||||
|
$lijst = implode( ',', $schoolids );
|
||||||
|
$scores = $this->Scores_model->calculateOverScholenNieuw( $orgversieid, $lijst );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( $organisatie->soort == 4 )
|
||||||
|
{
|
||||||
|
// $scores = $this->Scores_model->calculateschool( $orgversieid, $orgid );
|
||||||
|
$scores = $this->Scores_model->getgemscores( $orgversieid, $orgid );
|
||||||
|
//
|
||||||
|
}
|
||||||
|
if ( $scores )
|
||||||
|
{
|
||||||
|
$gewenst = $this->Wenssituaties_model->getgewenst( $orgversieid, $orgid );
|
||||||
|
}
|
||||||
|
// haal ook nog de criteria van de organisatie op
|
||||||
|
if ( $scores )
|
||||||
|
{
|
||||||
|
foreach ( $scores as $score )
|
||||||
|
{
|
||||||
|
if(! isset($score->gem)) $score->gem = 0;
|
||||||
|
// if ( $score->num > 0 )
|
||||||
|
// {
|
||||||
|
// $score->gem = round( $score->somscore / $score->num, 1 );
|
||||||
|
// }
|
||||||
|
$score->huidig = $this->kleurcodes->getnummer( $score->gem );
|
||||||
|
if($orgversie->scoretype == 7){
|
||||||
|
if($score->gem == $grens3) $score->huidig = 4;
|
||||||
|
if($score->gem < $grens3) $score->huidig = 3;
|
||||||
|
if($score->gem <= $grens2) $score->huidig = 2;
|
||||||
|
if($score->gem <= $grens1) $score->huidig = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
if ( $gewenst )
|
||||||
|
{
|
||||||
|
$i = 0;
|
||||||
|
foreach ( $scores as $score )
|
||||||
|
{
|
||||||
|
$score->gewenstid = $gewenst[ $i ]->id;
|
||||||
|
$score->gewenst = $gewenst[ $i ]->wens;
|
||||||
|
$i = $i + 1;
|
||||||
|
}; //foreach
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode( ['scores' => $scores] );
|
||||||
|
} // getscores
|
||||||
|
|
||||||
|
function checkSchrijfrechtenOrg()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$orgid = $this->clean_input( 'orgid' );
|
||||||
|
$orgsoort = $this->clean_input( 'orgsoort' );
|
||||||
|
|
||||||
|
|
||||||
|
$werktEr = $this->Orgusers_model->check_for_record( ["user_id" => $this->userid, "organisatie_id" => $orgid] );
|
||||||
|
$rechten = FALSE;
|
||||||
|
if($this->super){
|
||||||
|
$rechten = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($werktEr)
|
||||||
|
{
|
||||||
|
if ( pow( 4, $orgsoort ) == $this->userrole)
|
||||||
|
{
|
||||||
|
$rechten = TRUE;
|
||||||
|
}
|
||||||
|
if($orgsoort == 1 || $orgsoort ==2 || $orgsoort == 3){
|
||||||
|
$rechten = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode( $rechten );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function scoresindividueel()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
// deze functie wijkt af van getscores in rapijkpunten omdat ook gewenst moet
|
||||||
|
// worden opgehaald, en geen ambities
|
||||||
|
|
||||||
|
$orgversieid = $this->clean_input( "orgversie" );
|
||||||
|
$orgid = $this->clean_input( "orgid" );
|
||||||
|
$orguserid = $this->clean_input( "orguserid" );
|
||||||
|
$userid = $this->Orgusers_model->get_fieldvalue( ["id" => $orguserid], "user_id" );
|
||||||
|
$organisatie = $this->Organisaties_model->getorg( $orgid );
|
||||||
|
$scores = NULL;
|
||||||
|
$gewenst = NULL;
|
||||||
|
// als de organisatie een school is : haal de gemiddelde score op (als de 'ik-versie" wordt gebruikt
|
||||||
|
// let op als ik-versie dan moeten de gegevens van de users worden opgehaald maar
|
||||||
|
// dat gaat vanzelf omdat gezocht wordt naar organisatie (via filled versions);
|
||||||
|
// let op ja nee bezig wordt vertaald naar 10, 0 en 5
|
||||||
|
|
||||||
|
$scores = $this->Scores_model->calculateindividualscores( $orgversieid, $orgid, $userid );
|
||||||
|
// haal ook nog de criteria op
|
||||||
|
if ( ! $scores ) $scores = FALSE;
|
||||||
|
|
||||||
|
// $genoeg = $this->telScoresSchool( $scores );
|
||||||
|
// if ( ! $genoeg ) return;
|
||||||
|
|
||||||
|
foreach ( $scores as $score )
|
||||||
|
{
|
||||||
|
|
||||||
|
$score->gem = 0;
|
||||||
|
if ( $score->num > 0 )
|
||||||
|
{
|
||||||
|
$score->gem = round( $score->somscore / $score->num, 1 );
|
||||||
|
}
|
||||||
|
$score->huidig = $this->kleurcodes->getnummer( $score->gem );
|
||||||
|
}; // foreach scores
|
||||||
|
$gewenst = $this->Scores_model->getgewenstindividueel( $orgid, $orgversieid, $orguserid );
|
||||||
|
|
||||||
|
if ( $gewenst )
|
||||||
|
{
|
||||||
|
$i = 0;
|
||||||
|
foreach ( $scores as $score )
|
||||||
|
{
|
||||||
|
$score->gewenstid = $gewenst[ $i ]->id;
|
||||||
|
$score->gewenst = $gewenst[ $i ]->wens;
|
||||||
|
$i = $i + 1;
|
||||||
|
}; //foreach
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode( ['scores' => $scores] );
|
||||||
|
} // getscores
|
||||||
|
|
||||||
|
function checkindividueelschrijfrecht()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$orguserid = $this->uri->segment( 4 );
|
||||||
|
$userid = $this->Orgusers_model->get_fieldvalue( ["id" => $orguserid], "user_id" );
|
||||||
|
|
||||||
|
if ( $userid == $this->userid )
|
||||||
|
{
|
||||||
|
echo json_encode( TRUE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo json_encode( FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function printontwikkelmatrix()
|
||||||
|
{
|
||||||
|
if ( ! $this->userid ) die;
|
||||||
|
$inputstring = $this->input->get( 'json' );
|
||||||
|
$input = json_decode( $inputstring );
|
||||||
|
$today = date( "d-m-Y" );
|
||||||
|
$organisatie = $this->Organisaties_model->getorg( $input->orgid );
|
||||||
|
|
||||||
|
$periode = $this->Orgversies_model->get_record_by_id( $input->orgversieid );
|
||||||
|
$geldigvanaf= mysql2date( $periode->geldigvanaf );
|
||||||
|
$geldigtm = mysql2date( $periode->geldigtm );
|
||||||
|
$naam = $geldigvanaf . ' t/m ' . $geldigtm;
|
||||||
|
|
||||||
|
$resultaten = $input->resultaten;
|
||||||
|
|
||||||
|
if ( $resultaten ){
|
||||||
|
foreach ( $resultaten as $resultaat )
|
||||||
|
{
|
||||||
|
$resultaat->ijkpunt = $this->Ijkpunten_model->get_fieldvalue( ["id" => $resultaat->ijkpuntid], "omschrijving" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$instrument = $this->Modules_model->get_fieldvalue( ["sysnr" => $this->module], "naam" );
|
||||||
|
$labels = $this->Labels_model->getalllabels();
|
||||||
|
$kleurtabel = $this->kleurcodes->getkleurlegenda();
|
||||||
|
$data = [
|
||||||
|
"instrument" => $instrument,
|
||||||
|
"organisatie" => $organisatie,
|
||||||
|
"periodenaam" => $naam,
|
||||||
|
"vandaag" => $today,
|
||||||
|
"resultaten" => $resultaten,
|
||||||
|
"labels" => $labels,
|
||||||
|
"info" => $input->orgversie,
|
||||||
|
"docentnaam" => $input->user,
|
||||||
|
"kleurtabel" => $kleurtabel];
|
||||||
|
// var_dump($data);
|
||||||
|
// exit;
|
||||||
|
$html = $this->load->view( "monpas/reports/ontwikkelmatrix", $data, TRUE );
|
||||||
|
$filenaam = "ontwikkelmatrix";
|
||||||
|
$this->Phantom_model->create_pdf( $html, $filenaam, FALSE, FALSE, FALSE );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Schoolgegevens extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
'monpas/Schooldetails_model',
|
||||||
|
'monpas/Groepen_model',
|
||||||
|
'monpas/Groepenxusers_model',
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"shared/Autorisaties_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schoolid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$org = $this->Organisaties_model->getorg($schoolid);
|
||||||
|
$bgbrin = $this->Organisaties_model->get_fieldvalue (array("id"=> $org->valtonder_id), 'brin');
|
||||||
|
$org->bgbrin=$bgbrin;
|
||||||
|
$details = $this->Schooldetails_model->get_details($schoolid);
|
||||||
|
|
||||||
|
echo json_encode(array('org'=>$org, 'details'=>$details));
|
||||||
|
}
|
||||||
|
function updatedetails(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$this->Organisaties_model->update_record(array('naam'=>$this->input->post("naam")), $orgid);
|
||||||
|
$detailsid = $this->input->post("detailsid");
|
||||||
|
$data=array("straat" => $this->input->post("straat"),
|
||||||
|
"plaats" => $this->input->post("plaats"),
|
||||||
|
'telefoon' => $this->input->post("telefoon"),
|
||||||
|
'email1' => $this->input->post("email1"),
|
||||||
|
"web" => $this->input->post("web"),
|
||||||
|
"directie" => $this->input->post("directie"),
|
||||||
|
"ib" => $this->input->post("ib"),
|
||||||
|
"email2" => $this->input->post("email2") );
|
||||||
|
//update or insert
|
||||||
|
|
||||||
|
|
||||||
|
if ($detailsid <= 0){
|
||||||
|
$data["organisatie_id"]=$orgid;
|
||||||
|
$detailsid = $this->Schooldetails_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->Schooldetails_model->update_record($data, $detailsid);
|
||||||
|
}
|
||||||
|
echo json_encode($detailsid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateinsertLK(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$userid = $this->clean_input("id");
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
|
||||||
|
$data = array("aanhef" => $this->clean_input("aanhef"),
|
||||||
|
"voornaam" => $this->clean_input("voornaam"),
|
||||||
|
"tussenvoegsel" => $this->clean_input("tussenvoegsel"),
|
||||||
|
"achternaam" => $this->clean_input("achternaam"),
|
||||||
|
"email" => $this->clean_input("email") );
|
||||||
|
if ($userid <=0){
|
||||||
|
|
||||||
|
$userid=$this->Users_model->insert_record($data);
|
||||||
|
$data=array("user_id" => $userid,
|
||||||
|
"organisatie_id" => $orgid);
|
||||||
|
$orguserid = $this->Orgusers_model->insert_record($data);
|
||||||
|
$data=array("nivo_id" =>10,
|
||||||
|
"orguser_id" => $orguserid);
|
||||||
|
$this->Autorisaties_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->Users_model->update_record($data, $userid);
|
||||||
|
}
|
||||||
|
$lk= $this->Users_model->getleerkracht($userid);
|
||||||
|
echo json_encode($lk);
|
||||||
|
}
|
||||||
|
function getleerkrachten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$schoolid = $this->uri->segment(4);
|
||||||
|
$lk = $this->Users_model->getleerkrachten($schoolid);
|
||||||
|
echo json_encode($lk);
|
||||||
|
}
|
||||||
|
function deleteleerkracht(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$userid = $this->input->post("userid");
|
||||||
|
$schoolid = $this->input->post("schoolid");
|
||||||
|
|
||||||
|
$errorstring = "";
|
||||||
|
|
||||||
|
if (!$this->writer) return;
|
||||||
|
|
||||||
|
// lk is gekoppeld aan groep?
|
||||||
|
$orguser = $this->Orgusers_model->get(['user_id'=>$userid, 'organisatie_id'=>$schoolid], false, true);
|
||||||
|
// if ($this->Groepenxusers_model->get(array("orguser_id"=> $orguser->id),false, false) ){
|
||||||
|
// $errorstring = " Leerkracht is gekoppeld aan een groep en mag niet verwijderd worden.";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// als nivo < 10 alleen verwijderen via accounts
|
||||||
|
$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 ($errorstring <= ''){
|
||||||
|
$this->Autorisaties_model->update_record_where(['nivo_id'=>100], ['orguser_id' =>$orguser->id]);
|
||||||
|
// $this->Orgusers_model->delete_record_where(array("user_id" => $userid));
|
||||||
|
// $this->Users_model->delete_record($userid);
|
||||||
|
}
|
||||||
|
$this->json($errorstring);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,631 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Sop extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"Docx_model",
|
||||||
|
"monpas/Ambities_model",
|
||||||
|
"monpas/Diversiteits_model",
|
||||||
|
"monpas/Filledversions_model",
|
||||||
|
"monpas/Ijkpunten_model",
|
||||||
|
"monpas/Indicatoren_model",
|
||||||
|
"monpas/Flexsop_gebruikteversies_model",
|
||||||
|
"monpas/Groepen_model",
|
||||||
|
"monpas/Hfstprofiel_model",
|
||||||
|
"monpas/Hoofdstukken_model",
|
||||||
|
"monpas/Menus_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Ondersteuningtijden_model",
|
||||||
|
"monpas/Oordelen_model",
|
||||||
|
"shared/Organisaties_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Schooldetails_model",
|
||||||
|
"shared/Schooljaren_model",
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"Phantom_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Standaardteksten_model",
|
||||||
|
"monpas/Sop_model",
|
||||||
|
"monpas/Sopinhouden_model",
|
||||||
|
"monpas/Sopviews_model",
|
||||||
|
"monpas/Wenssituaties_model",
|
||||||
|
"monpas/Maakinhoudnieuw_model",
|
||||||
|
|
||||||
|
);
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getrechten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$editok = false;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,259 ) > 0) $editok = true;
|
||||||
|
echo json_encode($editok);
|
||||||
|
}
|
||||||
|
|
||||||
|
function controleerschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$schoolX = false;
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie && $organisatie->soort == 4) $schoolX=true;
|
||||||
|
echo json_encode($schoolX);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_getProfielen(){
|
||||||
|
$profielen = $this->Sop_model->getnieuwesops($this->globorgid);
|
||||||
|
echo json_encode($profielen);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_getHoofdstukken(){
|
||||||
|
$profielID = $this->input->post('profielID');
|
||||||
|
// hier check op inleiding indien niet aanwezig, maak de inleiding?
|
||||||
|
if (! $this->Hoofdstukken_model->ls_checkInleiding($profielID) )
|
||||||
|
$this->Maakinhoudnieuw_model->maakEnSaveInleiding($profielID , 49,0);
|
||||||
|
$hoofdstukken = $this->Hoofdstukken_model->ls_getHoofdstukken($profielID);
|
||||||
|
echo json_encode($hoofdstukken);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_getHoofdstukContent(){
|
||||||
|
$inhoudID =$this->input->post('inhoudID');
|
||||||
|
$content = $this->Sopinhouden_model->get(['id' =>$inhoudID], 'content', true);
|
||||||
|
echo json_encode($content);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_renewChapter(){
|
||||||
|
$sopinhoudid = $this->clean_input("inhoudID");
|
||||||
|
$sopinhoud = $this->Sopinhouden_model->get(['id'=>$sopinhoudid], false,true);
|
||||||
|
|
||||||
|
if($sopinhoudid) {
|
||||||
|
$orgversieid = 0;
|
||||||
|
if($sopinhoud->orgversieid){
|
||||||
|
$orgversieid = $sopinhoud->orgversieid;
|
||||||
|
}
|
||||||
|
$vergelijkingen = $this->Flexsop_gebruikteversies_model->getVergelijkingen($sopinhoud->chapter_id);
|
||||||
|
|
||||||
|
$error = $this->Maakinhoudnieuw_model->fVervers($sopinhoud->chapter_id, $sopinhoudid,$orgversieid, "STANDAARD",$vergelijkingen);
|
||||||
|
$nieuweInhoud = $this->Sopinhouden_model->get(['id' => $sopinhoudid], 'content', true);
|
||||||
|
}
|
||||||
|
echo json_encode(['nieuweinhoud' =>$nieuweInhoud, 'error'=>$error]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_newChapter(){
|
||||||
|
|
||||||
|
$nieuweInhoud = null;
|
||||||
|
$chapterID = $this->clean_input("chapterid");
|
||||||
|
$profielID = $this->clean_input('profielid');
|
||||||
|
$versieID = $this->clean_input('versie');
|
||||||
|
$vergelijkingen = $this->clean_input('referenties');
|
||||||
|
$volgorde = $this->Maakinhoudnieuw_model->getVolgnummer($profielID);
|
||||||
|
$data = [ 'profiel_id' => $profielID,
|
||||||
|
'chapter_id' => $chapterID,
|
||||||
|
'orgversieid' => $versieID,
|
||||||
|
'volgorde' => $volgorde];
|
||||||
|
$newID = $this->Sopinhouden_model->insert_record($data);
|
||||||
|
|
||||||
|
$error = $this->Maakinhoudnieuw_model->fVervers($chapterID, $newID, $versieID,"STANDAARD", $vergelijkingen);
|
||||||
|
|
||||||
|
if ($error) $this->Sopinhouden_model->delete_record($newID);
|
||||||
|
|
||||||
|
else {
|
||||||
|
$nieuweInhoud = $this->Sopinhouden_model->get(['id' => $newID], false, true);
|
||||||
|
// om de vergelijkende versies bij te houden dient
|
||||||
|
// per versie een record in de tabel tb_flexsop_gebruikteversies
|
||||||
|
// te worden gemaakt.
|
||||||
|
// de originele versie staat in de tabel tb_sopinhouden
|
||||||
|
$index = 1;
|
||||||
|
foreach ($vergelijkingen ? $vergelijkingen : [] as $vergelijking){
|
||||||
|
$data2 = [ 'hoofdstuk_id' => $chapterID,
|
||||||
|
'orgversie_id' => $vergelijking,
|
||||||
|
'volgorde' => $index
|
||||||
|
];
|
||||||
|
$this->Flexsop_gebruikteversies_model->insert_record($data2);
|
||||||
|
++$index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(['nieuweinhoud' =>$nieuweInhoud, 'error'=>$error]);
|
||||||
|
}
|
||||||
|
function fVerversGebruikteVergelijkingen($chapterID, $vergelijkingen){
|
||||||
|
// eerst oude tb_flexsop_gebruikteversies weggooien. Dit mag natuurlijk
|
||||||
|
// alleen als er geen error is
|
||||||
|
$this->Flexsop_gebruikteversies_model->delete_record_where(['hoofdstuk_id' =>$chapterID]);
|
||||||
|
// dan de nieuwe versies opslaan
|
||||||
|
$index = 1;
|
||||||
|
foreach ($vergelijkingen ? $vergelijkingen : [] as $vergelijking){
|
||||||
|
$data2 = [ 'hoofdstuk_id' => $chapterID,
|
||||||
|
'orgversie_id' => $vergelijking,
|
||||||
|
'volgorde' => $index
|
||||||
|
];
|
||||||
|
$this->Flexsop_gebruikteversies_model->insert_record($data2);
|
||||||
|
++$index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_nieuweTabellen(){
|
||||||
|
//maak de tabellen opnieuw maar nu met nieuwe versie(s)
|
||||||
|
|
||||||
|
$sopinhoudid = $this->clean_input("sopinhoudid");
|
||||||
|
$orgversie = $this->clean_input('orgversieID');
|
||||||
|
$vergelijkingen = $this->clean_input('referenties');
|
||||||
|
if (! $vergelijkingen) $vergelijkingen = [];
|
||||||
|
$sopinhoudRecord = $this->Sopinhouden_model->get(['id'=>$sopinhoudid],false,true);
|
||||||
|
$chapterID = $sopinhoudRecord->chapter_id;
|
||||||
|
|
||||||
|
if (! $orgversie ) $orgversie = 0;
|
||||||
|
$nieuweInhoud =false;
|
||||||
|
|
||||||
|
if($sopinhoudid) {
|
||||||
|
$error = $this->Maakinhoudnieuw_model->fVervers($chapterID, $sopinhoudid,$orgversie, "TABELLEN", $vergelijkingen);
|
||||||
|
if (! $error) $this->fVerversGebruikteVergelijkingen($chapterID, $vergelijkingen);
|
||||||
|
$nieuweInhoud = $this->Sopinhouden_model->get(['id' => $sopinhoudid], false, true);
|
||||||
|
}
|
||||||
|
echo json_encode(['nieuweinhoud' =>$nieuweInhoud->content, 'orgversieid' => $nieuweInhoud->orgversieid, 'error'=>$error]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ls_renewTabellen(){
|
||||||
|
$sopinhoudid = $this->clean_input("sopinhoudid");
|
||||||
|
$sopinhoudRecord = $this->Sopinhouden_model->get(['id'=>$sopinhoudid],false,true);
|
||||||
|
$chapterID = $sopinhoudRecord->chapter_id;
|
||||||
|
$orgversie = $sopinhoudRecord->orgversieid;
|
||||||
|
$vergelijkingen = $this->Flexsop_gebruikteversies_model->getVergelijkingen($chapterID);
|
||||||
|
|
||||||
|
if (! $orgversie ) $orgversie = 0;
|
||||||
|
$nieuweInhoud =false;
|
||||||
|
|
||||||
|
if($sopinhoudid) {
|
||||||
|
$error = $this->Maakinhoudnieuw_model->fVervers($chapterID, $sopinhoudid,$orgversie, "TABELLEN", $vergelijkingen);
|
||||||
|
$nieuweInhoud = $this->Sopinhouden_model->get(['id' => $sopinhoudid], false, true);
|
||||||
|
}
|
||||||
|
echo json_encode(['nieuweinhoud' =>$nieuweInhoud->content, 'orgversieid' => $nieuweInhoud->orgversieid, 'error'=>$error]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// function getSopsEnLabels(){
|
||||||
|
// $sopid = 0;
|
||||||
|
// $sopkeuze = (new SopKeuze($sopid));
|
||||||
|
// $sops = $sopkeuze->getSops();
|
||||||
|
// $labels = $sopkeuze->getLabels();
|
||||||
|
// $soplabels = $sopkeuze->getHoofdstukLabels();
|
||||||
|
// $aantal = count($soplabels);
|
||||||
|
// $tweedeid = '';
|
||||||
|
// $laatste = $soplabels[$aantal - 1];// er is altijd een inleiding
|
||||||
|
// $laatsteid = $laatste->sopinhoudID;
|
||||||
|
|
||||||
|
// if($aantal>1) {
|
||||||
|
// $tweede = $soplabels[1];
|
||||||
|
// $tweedeid = $tweede->sopinhoudID;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// echo json_encode(["sops" =>$sops,
|
||||||
|
// "labels" => $labels,
|
||||||
|
// "tweede" => $tweedeid,
|
||||||
|
// "laatste" => $laatsteid]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
function checkhoofdstuk(){
|
||||||
|
$chapterid = $this->clean_input("chapterid");
|
||||||
|
$profielid = $this->clean_input("profielid");
|
||||||
|
$id = $this->Sopinhouden_model->get_fieldvalue(
|
||||||
|
['profiel_id'=>$profielid,
|
||||||
|
'chapter_id'=>$chapterid], "id");
|
||||||
|
echo json_encode($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function getchapterEnVersies(){
|
||||||
|
// if (!$this->userid) die;
|
||||||
|
// $inhoudid = $this->clean_input("sopinhoudID");
|
||||||
|
// $chapterid = $this->clean_input("chapterid");
|
||||||
|
// $modulenr = $this->clean_input("module");
|
||||||
|
// $profielid = $this->clean_input('profielid'); // wordt niet gebruikt
|
||||||
|
// $hoofdstuk = $this->Sopinhouden_model->get_record_by_id($inhoudid);
|
||||||
|
|
||||||
|
// if(!$modulenr || $chapterid == 49){ $filledversies = false; }
|
||||||
|
|
||||||
|
// if($modulenr && $chapterid != 50 && $chapterid != 53) {
|
||||||
|
// $versions = new Versions($chapterid, $profielid, $modulenr);
|
||||||
|
// $filledversies = $versions->getFilledversies();
|
||||||
|
// }
|
||||||
|
// if($modulenr) {
|
||||||
|
// if($chapterid == 50 || $chapterid == 53) {
|
||||||
|
// $schooljaarversies = new SchooljaarVersies($chapterid, $profielid, $modulenr);
|
||||||
|
// $filledversies = $schooljaarversies->getFilledversies();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// echo json_encode(["hoofdstuk" =>$hoofdstuk, "versies" =>$filledversies]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
function checkLijsten(){
|
||||||
|
$chapterid = $this->clean_input("chapterid");
|
||||||
|
$profielid = $this->clean_input("profielid");
|
||||||
|
$ingevuld = 'F';
|
||||||
|
$metijkpunten = 'F';
|
||||||
|
$sopaanwezig = 'F';
|
||||||
|
$orgversieid = 0;
|
||||||
|
$filledversies = null;
|
||||||
|
$standaarden = null;
|
||||||
|
|
||||||
|
|
||||||
|
$modulenr = $this->Hoofdstukken_model->getmodule($chapterid);
|
||||||
|
$orgversietype = 0;
|
||||||
|
|
||||||
|
|
||||||
|
if ($modulenr) {
|
||||||
|
$orgversietype = $this->Modules_model->get_fieldvalue(
|
||||||
|
array("sysnr" => $modulenr), "versietype");
|
||||||
|
|
||||||
|
if ($orgversietype === '1') {
|
||||||
|
$schooljaarVersies = new SchooljaarVersies($chapterid, $profielid, $modulenr);
|
||||||
|
$filledversies = $schooljaarVersies->getFilledversies();
|
||||||
|
$orgversieid = $schooljaarVersies->getSchooljaarid();
|
||||||
|
$sopaanwezig = $schooljaarVersies->getSopAanwezig();
|
||||||
|
$standaarden = "";
|
||||||
|
} else {
|
||||||
|
$versions = new Versions($chapterid, $profielid, $modulenr);
|
||||||
|
$filledversies = $versions->getFilledversies();
|
||||||
|
$orgversieid = $versions->getOrgversieid();
|
||||||
|
$standaarden = $versions->getStandaarden();
|
||||||
|
$metijkpunten = $versions->getMetIJkpunten();
|
||||||
|
$sopaanwezig = $versions->getSopAanwezig();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($filledversies) $ingevuld = 'T';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode(["ingevuld" => $ingevuld,
|
||||||
|
"orgversieid" => $orgversieid,
|
||||||
|
"filledversies" => $filledversies,
|
||||||
|
"standaarden" => $standaarden,
|
||||||
|
"metijkpunten" => $metijkpunten,
|
||||||
|
"sopaanwezig" => $sopaanwezig]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function saveNewSopChapter(){
|
||||||
|
// $chapterid = $this->clean_input("chapterid");
|
||||||
|
// $profielid = $this->clean_input("profielid");
|
||||||
|
// $modulenr = $this->clean_input("module");
|
||||||
|
// $orgversieid = $this->clean_input("versie");
|
||||||
|
// if ( !$orgversieid && $chapterid != 49) {
|
||||||
|
// $versions = new Versions($chapterid, $profielid, $modulenr);
|
||||||
|
// $orgversieid = $versions->getOrgversieid();
|
||||||
|
// }
|
||||||
|
// if($chapterid == 49) {
|
||||||
|
// $this->Maakinhoudnieuw_model->maakEnSaveInleiding($profielid , $chapterid,0);
|
||||||
|
// } else {
|
||||||
|
// $nieuwhoofdstuk = new Hoofdstuk($chapterid, $profielid, $orgversieid);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $hoofdstuk= $this->Sopinhouden_model->get(['profiel_id' => $profielid, 'chapter_id' => $chapterid],false, true);
|
||||||
|
|
||||||
|
// echo json_encode($hoofdstuk);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getLabels(){
|
||||||
|
$sopid = $this->uri->segment(4);
|
||||||
|
$sopkeuze = (new SopKeuze($sopid));
|
||||||
|
$labels = $sopkeuze->getLabels();
|
||||||
|
$soplabels = $sopkeuze->getHoofdstukLabels();
|
||||||
|
$aantal = count($soplabels);
|
||||||
|
$tweedeid='';
|
||||||
|
if($aantal > 1) {
|
||||||
|
$tweede = $soplabels[1];
|
||||||
|
$tweedeid = $tweede->sopinhoudID;
|
||||||
|
}
|
||||||
|
$laatste = $soplabels[$aantal - 1];
|
||||||
|
$laatsteid = $laatste->sopinhoudID;
|
||||||
|
|
||||||
|
echo json_encode(['labels' => $labels,
|
||||||
|
'tweede' => $tweedeid,
|
||||||
|
'laatste' => $laatsteid ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function verplaatsHoofdstuk(){
|
||||||
|
$sopid = $this->clean_input("sopid"); // selectedprofielid
|
||||||
|
$sopinhoudid = $this->clean_input("sopinhoudid");
|
||||||
|
$richting = $this->clean_input("richting");
|
||||||
|
$sopkeuze = (new SopKeuze($sopid));
|
||||||
|
$hfstlabels = $sopkeuze->getHoofdstukLabels();
|
||||||
|
|
||||||
|
if($richting === 'omhoog') $indexwaarde = -1;
|
||||||
|
if($richting === 'omlaag') $indexwaarde = 1;
|
||||||
|
|
||||||
|
if(! $hfstlabels) return;
|
||||||
|
$labels = (array)$hfstlabels;
|
||||||
|
for($i=0; $i< count($labels); $i++) {
|
||||||
|
if ($labels[$i]->sopinhoudID != $sopinhoudid) continue;
|
||||||
|
|
||||||
|
$oudevolgorde = $labels[$i]->volgorde;
|
||||||
|
$x = $i + $indexwaarde;
|
||||||
|
$labels[$i]->volgorde = $labels[$x]->volgorde;
|
||||||
|
$labels[$x]->volgorde = $oudevolgorde;
|
||||||
|
$nieuwevolgorde = $labels[$i]->volgorde;
|
||||||
|
$idErnaast = $labels[$x]->sopinhoudID;
|
||||||
|
|
||||||
|
|
||||||
|
$this->Sopinhouden_model->update_record(['volgorde'=>$nieuwevolgorde],$sopinhoudid);
|
||||||
|
$this->Sopinhouden_model->update_record(['volgorde'=>$oudevolgorde],$idErnaast);
|
||||||
|
|
||||||
|
}
|
||||||
|
$hoofdstukvolgorde = $this->Sopinhouden_model->getPagvolgorde( $sopid);
|
||||||
|
echo json_encode($hoofdstukvolgorde);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function maaknewprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid =$this->globorgid;
|
||||||
|
$data = array( 'organisatie_id' => $orgid,
|
||||||
|
'naam' =>$this->clean_input("naam"),
|
||||||
|
'van' => date2mysql($this->clean_input("van")),
|
||||||
|
'tm' => date2mysql($this->clean_input('tm')),
|
||||||
|
'versie' => 'NIEUW');
|
||||||
|
$newid = $this->Sop_model->insert_record($data);
|
||||||
|
$profiel =$this->Sop_model->getnieuwsop($newid);
|
||||||
|
echo json_encode($profiel);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
//delete het tb_profiel record en alle records in de hoofdstukken tabel
|
||||||
|
$targetid= $this->uri->segment(4);
|
||||||
|
$this->Sopinhouden_model->delete_record_where(['profiel_id'=> $targetid]);
|
||||||
|
$this->Sop_model->delete_record($targetid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$data = array('naam' =>$this->clean_input("naam"),
|
||||||
|
'van' => date2mysql($this->clean_input("van")),
|
||||||
|
'tm' => date2mysql($this->clean_input('tm')),
|
||||||
|
'versie' => 'NIEUW');
|
||||||
|
$this->Sop_model->update_record($data, $this->clean_input('id'));
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveinhoud(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$tekst = $this->input->post('tekst');
|
||||||
|
$inhoudid = $this->input->post('id');
|
||||||
|
$orgversie = $this->input->post('orgversie');
|
||||||
|
$this->Sopinhouden_model->update_record(array('content'=>$tekst, 'orgversieid' =>$orgversie), $inhoudid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletechapter(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
// //TODO meer veiligheidschecks
|
||||||
|
$sopinhoudid = $this->clean_input("tekstid");
|
||||||
|
$chapterID = $this->Sopinhouden_model->get(['id'=>$sopinhoudid],'chapter_id', true);
|
||||||
|
$this->Sopinhouden_model->delete_record($sopinhoudid);
|
||||||
|
$this->Flexsop_gebruikteversies_model->delete_record_where(['hoofdstuk_id' => $chapterID]);
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakHtml($profielid, $word){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$profiel = $this->Sop_model->get_record_by_id($profielid);
|
||||||
|
$jaar1 = substr($profiel->van,0, 4);
|
||||||
|
$jaar2 = substr($profiel->tm, 0, 4);
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
|
||||||
|
$bg = $this->Organisaties_model->get_record_by_id($organisatie->valtonder_id);
|
||||||
|
$data=array( "profielid" => $profielid,
|
||||||
|
"orgnaam" => $organisatie->naam,
|
||||||
|
"jaar1" => $jaar1,
|
||||||
|
"jaar2" => $jaar2,
|
||||||
|
"bgnaam" =>$bg->naam);
|
||||||
|
$html=$this->load->view("monpas/sop/sopvoorpagina", $data, true);
|
||||||
|
$hoofdstukken = $this->Hoofdstukken_model->getoldchapters($profielid);
|
||||||
|
foreach($hoofdstukken as $hoofdstuk){
|
||||||
|
$tekst=$this->Sopinhouden_model->get_fieldvalue(["profiel_id" => $profielid, "chapter_id" =>$hoofdstuk->nummer],'content');
|
||||||
|
if ($tekst){
|
||||||
|
if ($word){
|
||||||
|
$html=$html."<pagebreak />".$tekst;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$html=$html."<div style='page-break-after:always'></div>".$tekst;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$html=$html.'</div></body></html>';
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakHtmlSopNieuw($profielid, $word){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$profiel = $this->Sop_model->get_record_by_id($profielid);
|
||||||
|
$jaar1 = substr($profiel->van,0, 4);
|
||||||
|
$jaar2 = substr($profiel->tm, 0, 4);
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
|
||||||
|
$bg = $this->Organisaties_model->get_record_by_id($organisatie->valtonder_id);
|
||||||
|
$data=array( "profielid" => $profielid,
|
||||||
|
"orgnaam" => $organisatie->naam,
|
||||||
|
"jaar1" => $jaar1,
|
||||||
|
"jaar2" => $jaar2,
|
||||||
|
"bgnaam" =>$bg->naam);
|
||||||
|
$html=$this->load->view("monpas/sop/sopvoorpagina", $data, true);
|
||||||
|
$html="<div class='sopfonts'>".$html."</div>";
|
||||||
|
$hoofdstukken = $this->Sopinhouden_model->getPagvolgorde($profielid);
|
||||||
|
|
||||||
|
foreach($hoofdstukken as $hoofdstuk){
|
||||||
|
$tekst=$this->Sopinhouden_model->get_fieldvalue(["id" => $hoofdstuk->sopinhoudID],'content');
|
||||||
|
|
||||||
|
if ($tekst){
|
||||||
|
$tekst = "<div class='sopfonts'>".$tekst."</div>";
|
||||||
|
if ($word){
|
||||||
|
$html= $html."<pagebreak />".$tekst;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$html = $html . "<div style='page-break-after:always'></div>" . $tekst;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$html=$html.'</body></html>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakpdf(){
|
||||||
|
$input = json_decode($this->input->get('json'));
|
||||||
|
|
||||||
|
$profielid = $input->profielid;
|
||||||
|
|
||||||
|
$colorhtml = $this->maakHtml($profielid, false);
|
||||||
|
$html = str_replace('verversholder','pdfholder', $colorhtml);
|
||||||
|
$filenaam="sop".date('YmdHis');
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakpdfSopnieuw(){
|
||||||
|
$input = json_decode($this->input->get('json'));
|
||||||
|
$profielid = $input->profielid;
|
||||||
|
|
||||||
|
$colorhtml = $this->maakHtmlSopNieuw($profielid, false);
|
||||||
|
$html = str_replace('verversholder','pdfholder', $colorhtml);
|
||||||
|
$filenaam="sop".date('YmdHis');
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakword(){
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$colorhtml = $this->maakHtml($profielid,true);
|
||||||
|
$html = str_replace('verversholder','pdfholder', $colorhtml);
|
||||||
|
$html ="<!doctype html><html><body>".$html.'</body></html>';
|
||||||
|
|
||||||
|
$this->Docx_model->create_word_document($html, 'sop'.date('YmdHis'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function maakwordSopNieuw(){
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$colorhtml = $this->maakHtmlSopNieuw($profielid,true);
|
||||||
|
$html = str_replace('verversholder','pdfholder', $colorhtml);
|
||||||
|
$html ="<!doctype html><html><body>".$html.'</body></html>';
|
||||||
|
|
||||||
|
$this->Docx_model->create_word_document($html, 'sop'.date('YmdHis'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function saveversie(){
|
||||||
|
$inhoudid = $this->clean_input('inhoudid');
|
||||||
|
$orgversieid = $this->clean_input('versie');
|
||||||
|
$chapterid = $this->clean_input('chapterid');
|
||||||
|
$profielid = $this->clean_input("profielid");
|
||||||
|
$modulenr = $this->clean_input("modulenr");
|
||||||
|
$chapteridlist = $this->clean_input("chapids");
|
||||||
|
|
||||||
|
|
||||||
|
$this->Sopinhouden_model->update_record(array("orgversieid"=>$orgversieid), $inhoudid);
|
||||||
|
if($chapterid > 12){
|
||||||
|
$inhoud = $this->Sopinhouden_model->maakkeuzemodulecontent($chapterid, $profielid, $modulenr);
|
||||||
|
}
|
||||||
|
if($chapterid <=12) {
|
||||||
|
$inhoud = $this->Sopinhouden_model->maakcontent($chapterid, $profielid);
|
||||||
|
}
|
||||||
|
$this->Sopinhouden_model->update_record(array('content'=>$inhoud['content']), $inhoudid);
|
||||||
|
if ($chapteridlist){
|
||||||
|
foreach($chapteridlist as $chapterid){
|
||||||
|
$where=array("chapter_id"=>$chapterid, "profiel_id"=>$profielid);
|
||||||
|
$this->Sopinhouden_model->update_record_where(array("orgversieid"=>$orgversieid), $where);
|
||||||
|
$inhoud = $this->Sopinhouden_model->maakcontent($chapterid, $profielid);
|
||||||
|
$this->Sopinhouden_model->update_record_where(array('content'=>$inhoud['content']), $where);
|
||||||
|
}; // foreach
|
||||||
|
}; // if list
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getenquetemoduleandsave(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->input->post("profielid");
|
||||||
|
$chapterid = $this->input->post("hoofdstuk");
|
||||||
|
$versie = $this->input->post("versie");
|
||||||
|
$chapter = $this->Hoofdstukken_model->get_record_by_id($chapterid);
|
||||||
|
$module = $this->Modules_model->get_record_by_id($chapter->module);
|
||||||
|
// $module = 1;
|
||||||
|
// if ($chapterid == 7 || $chapterid ==12) $module = 4;
|
||||||
|
$where= array( "profiel_id" =>$profielid,
|
||||||
|
"chapter_id" =>$chapterid);
|
||||||
|
$content= $this->Sopinhouden_model->get_fieldvalue($where,'content');
|
||||||
|
if ($content) {
|
||||||
|
switch ($chapterid){
|
||||||
|
case 6: $result = $this->Sopinhouden_model->getenquetetabellen($profielid,$module->sysnr,$chapterid,$versie);
|
||||||
|
|
||||||
|
$imagemb =$this->Phantom_model->create_img( $result['grafiek1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imagemb = "<div class='grafiekholdermonbas'><img src='data:image/png;base64,".$imagemb."' id='mod1image1'/></div>";
|
||||||
|
$search = '~<div class="grafiekholdermonbas">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $imagemb,$content);
|
||||||
|
|
||||||
|
$monbas1 ="<div class='tableholdermonbasteam'>".$result['tabel1']."</div>";
|
||||||
|
$search = '~<div class="tableholdermonbasteam">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $monbas1,$content);
|
||||||
|
|
||||||
|
|
||||||
|
$monbas2 ="<div class='tableholdermonbasschool'>".$result['tabel2']."</div>";
|
||||||
|
$search = '~<div class="tableholdermonbasschool">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $monbas2,$content);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$result =$this->Sopinhouden_model->getenquetetabellen($profielid,$module->sysnr,$chapterid,$versie);
|
||||||
|
|
||||||
|
$imagesm =$this->Phantom_model->create_img($result['grafiek1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imagedata = "<div class='grafiekholdersm'><img src='data:image/png;base64,".$imagesm."' id='mod4image1'/><?]/div>";
|
||||||
|
$search = '~<div class="grafiekholdersm">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $imagedata,$content);
|
||||||
|
|
||||||
|
$sm1 = "<div class='tableholdersm1'>".$result['tabel1']."</div>";
|
||||||
|
$search = '~<div class="tableholdersm1">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $sm1,$content);
|
||||||
|
|
||||||
|
$sm2 = "<div class='tableholdersm2'>".$result['tabel2']."</div>";
|
||||||
|
$search = '~<div class="tableholdersm2">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $sm2,$content);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
// Ontwikkelagenda Monbas
|
||||||
|
$result = $this->Sopinhouden_model->getOntwikkelagenda($profielid,$module->sysnr,$versie);
|
||||||
|
$oa1 = "<div class='tableholderontwikkelagenda1'>".$result['tabel1']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda1'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa1,$content);
|
||||||
|
|
||||||
|
$oa2 = "<div class='tableholderontwikkelagenda2'>".$result['tabel2']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda2'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa2,$content);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
// Ontwikkelagenda Schoolmeter
|
||||||
|
$result = $this->Sopinhouden_model->getOntwikkelagenda($profielid,$module->sysnr,$versie);
|
||||||
|
$oa1 = "<div class='tableholderontwikkelagenda1'>".$result['tabel1']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda1'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa1,$content);
|
||||||
|
|
||||||
|
$oa2 = "<div class='tableholderontwikkelagenda2'>".$result['tabel2']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda2'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa2,$content);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}; // switch
|
||||||
|
$data=array("content" => $content) ;
|
||||||
|
$this->Sopinhouden_model->update_record_where($data,$where);
|
||||||
|
}; // if content
|
||||||
|
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,454 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Sopoud extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Autorisaties_model",
|
||||||
|
"Docx_model",
|
||||||
|
"monpas/Hoofdstukken_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Sop_model",
|
||||||
|
"monpas/Sopinhouden_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getrechten(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$editok = false;
|
||||||
|
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole,259 ) > 0) $editok = true;
|
||||||
|
echo json_encode($editok);
|
||||||
|
}
|
||||||
|
function getchapters(){
|
||||||
|
$chapters= $this->Hoofdstukken_model->getoldchapters();
|
||||||
|
foreach ($chapters as $chapter){
|
||||||
|
$chapter->aanwezig = false;
|
||||||
|
}
|
||||||
|
echo json_encode($chapters);
|
||||||
|
}
|
||||||
|
function getschooljaarversies($profielid, $chapterid){
|
||||||
|
$availversies = $this->Schooljaren_model->getschooljaren();
|
||||||
|
if ($availversies) {
|
||||||
|
foreach($availversies as $versie){
|
||||||
|
$versie->id = $versie->schooljaarnr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$currentorgversie = $this->Sopinhouden_model->get_fieldvalue(array("profiel_id"=>$profielid, "chapter_id"=>$chapterid), "orgversieid");
|
||||||
|
if ($currentorgversie == NULL || $currentorgversie == 'undefined' || ! $currentorgversie){
|
||||||
|
$currentorgversie= $this->Sopinhouden_model->getschooljaar($profielid);
|
||||||
|
if ($currentorgversie == NULL && $availversies){
|
||||||
|
$currentorgversie = $availversies[0]->schooljaarnr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$versies = array( "currentorgversie" =>$currentorgversie,"availversies" => $availversies);
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getlijstversies($profielid, $modulenr, $chapterid){
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profiel = $this->Sop_model->get_record_by_id($profielid);
|
||||||
|
$versies = $this->Filledversions_model->getfilledversionsperorg($orgid, $modulenr);
|
||||||
|
$fvid = 0;
|
||||||
|
$availversies = [];
|
||||||
|
if ($versies){
|
||||||
|
foreach($versies as $versie){
|
||||||
|
$versie->naam = $versie->periodenummer.': '.$versie->geldigvanaf.' - '.$versie->geldigtm;
|
||||||
|
$fvid = $this->Scores_model->fGetGevuldeVersies($versie->id, $orgid);
|
||||||
|
if($fvid && $fvid > 0){
|
||||||
|
$availversies []= $versie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$currentorgversie = $this->Sopinhouden_model->get_fieldvalue(array("profiel_id"=>$profielid, "chapter_id"=>$chapterid), "orgversieid");
|
||||||
|
|
||||||
|
if ($currentorgversie == NULL){
|
||||||
|
$currentorgversies =$this->Filledversions_model->getversiesperorgperperiode($orgid, $modulenr,$profiel->van, $profiel->tm);
|
||||||
|
if ($currentorgversies){
|
||||||
|
$currentorgversie = $currentorgversies[0]->id;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// zet currentorgversie op de eerste versie uit de lijst van versies, indien aanwezig
|
||||||
|
if ($availversies){
|
||||||
|
$currentorgversie = $availversies[0]->id;
|
||||||
|
}
|
||||||
|
};//ELSE
|
||||||
|
}; //IF ORGVERSIE == NULL
|
||||||
|
$versies= array('currentorgversie' => $currentorgversie, 'availversies'=>$availversies);
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Getversies($profielid,$chapterid){
|
||||||
|
$versies = [];
|
||||||
|
$hoofdstuk = $this->Hoofdstukken_model->get_record_by_id($chapterid);
|
||||||
|
if ($hoofdstuk->module == 0 ) return $versies;
|
||||||
|
|
||||||
|
$module = $this->Modules_model->get_record_by_id($hoofdstuk->module);
|
||||||
|
if ($module->versietype == 1) {
|
||||||
|
$versies = $this->getschooljaarversies($profielid, $chapterid);
|
||||||
|
}
|
||||||
|
if ($module->versietype == 2) {
|
||||||
|
$versies = $this->getlijstversies($profielid, $module->sysnr, $chapterid);
|
||||||
|
} ;
|
||||||
|
|
||||||
|
return $versies;
|
||||||
|
}
|
||||||
|
|
||||||
|
function controleerschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$school = false;
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie && $organisatie->soort == 4) $school = true;
|
||||||
|
echo json_encode($school);
|
||||||
|
}
|
||||||
|
function getprofielen(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielen = $this->Sop_model->getprofielen($orgid);
|
||||||
|
echo json_encode($profielen);
|
||||||
|
}
|
||||||
|
function maaknewprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid =$this->globorgid;
|
||||||
|
$data = array( 'organisatie_id'=> $orgid,
|
||||||
|
'naam' =>$this->clean_input("naam"),
|
||||||
|
'van' => date2mysql($this->clean_input("van")),
|
||||||
|
'tm' => date2mysql($this->clean_input('tm')),
|
||||||
|
'versie' => 'OUD');
|
||||||
|
$newid = $this->Sop_model->insert_record($data);
|
||||||
|
$profiel =$this->Sop_model->getprofiel($newid);
|
||||||
|
echo json_encode($profiel);
|
||||||
|
}
|
||||||
|
function updateprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$data = array('naam' =>$this->clean_input("naam"),
|
||||||
|
'van' => date2mysql($this->clean_input("van")),
|
||||||
|
'tm' => date2mysql($this->clean_input('tm')),
|
||||||
|
'versie' => 'OUD' );
|
||||||
|
$this->Sop_model->update_record($data, $this->clean_input('id'));
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
function deleteprofiel(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
//delete het tb_profiel record en alle records in de hoofdstukken tabel
|
||||||
|
$targetid= $this->uri->segment(4);
|
||||||
|
$this->Sop_model->delete_record($targetid);
|
||||||
|
}
|
||||||
|
function getchaptercontent(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
|
||||||
|
$chapterid = $this->clean_input("chapterid");
|
||||||
|
$profielid = $this->clean_input("profielid");
|
||||||
|
$targetversieid = $this->clean_input("versieid");
|
||||||
|
|
||||||
|
$versies = $this->Getversies($profielid, $chapterid);
|
||||||
|
if (!$targetversieid && (count($versies) > 0 ) && $versies['currentorgversie']) {
|
||||||
|
$targetversieid = $versies['currentorgversie'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = $this->Sopinhouden_model->get_records_where(array('profiel_id'=>$profielid, 'chapter_id'=>$chapterid),true);
|
||||||
|
|
||||||
|
if (!$content){
|
||||||
|
$returnarray = $this->Sopinhouden_model->maakcontent($chapterid,$profielid, $targetversieid);
|
||||||
|
$contenttekst = $returnarray['content'];
|
||||||
|
$inhoudid = $this->savecontent($chapterid,$profielid,$contenttekst, $returnarray['versie']);
|
||||||
|
$content = $this->Sopinhouden_model->get_records_where(array("id"=>$inhoudid),true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($content && is_null($content->orgversieid)){
|
||||||
|
// kan nog voorkomen bij "oude hoofdstukken"
|
||||||
|
$targetversie = $this->getversieandsave($profielid, $chapterid, $targetversieid);
|
||||||
|
$content->orgversieid = $targetversie;
|
||||||
|
}
|
||||||
|
echo json_encode(array('inhoud'=>$content, 'versies'=>$versies));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getversieandsave($profielid, $chapterid, $targetversieid){
|
||||||
|
$versie = $targetversieid;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$chapter = $this->Hoofdstukken_model->get_record_by_id($chapterid);
|
||||||
|
$module = $this->Modules_model->get_record_by_id($chapter->module);
|
||||||
|
|
||||||
|
if (!$module ) return $versie;
|
||||||
|
if ($versie == null || $versie==0){
|
||||||
|
if ($module->versietype == 1) {
|
||||||
|
// get schooljaar
|
||||||
|
$versie = $this->Sopinhouden_model->gettargetjaar($profielid, $orgid, $chapterid);
|
||||||
|
}
|
||||||
|
if ($module->versietype == 2) {
|
||||||
|
// orgversie
|
||||||
|
$versie = $this->Sopinhouden_model->gettargetversie($profielid, $orgid, $chapterid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data = array('orgversieid' => $versie);
|
||||||
|
$where = array("profiel_id" => $profielid,
|
||||||
|
"chapter_id" => $chapterid);
|
||||||
|
$this->Sopinhouden_model->update_record_where($data, $where);
|
||||||
|
return $versie;
|
||||||
|
}
|
||||||
|
|
||||||
|
function savecontent($chapterid, $profielid,$content,$versie =FALSE){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$data = array( 'profiel_id' => $profielid,
|
||||||
|
'chapter_id' => $chapterid,
|
||||||
|
'content' => $content,
|
||||||
|
'orgversieid' => $versie);
|
||||||
|
$newid=$this->Sopinhouden_model->insert_record($data);
|
||||||
|
return $newid;
|
||||||
|
}
|
||||||
|
function saveinhoud(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$tekst = $this->input->post('tekst');
|
||||||
|
$inhoudid = $this->input->post('id');
|
||||||
|
$orgversie = $this->input->post('orgversie');
|
||||||
|
if ($orgversie == '') $orgversie =null; // dit kan bij hoofdstuk inleiding
|
||||||
|
$this->Sopinhouden_model->update_record(array('content'=>$tekst, 'orgversieid' =>$orgversie), $inhoudid);
|
||||||
|
}
|
||||||
|
function maakHtml($profielid, $word){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$profiel = $this->Sop_model->get_record_by_id($profielid);
|
||||||
|
$jaar1 = substr($profiel->van,0, 4);
|
||||||
|
$jaar2 = substr($profiel->tm, 0, 4);
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
|
||||||
|
$bg = $this->Organisaties_model->get_record_by_id($organisatie->valtonder_id);
|
||||||
|
$data=array( "profielid" => $profielid,
|
||||||
|
"orgnaam" => $organisatie->naam,
|
||||||
|
"jaar1" => $jaar1,
|
||||||
|
"jaar2" => $jaar2,
|
||||||
|
"bgnaam" =>$bg->naam);
|
||||||
|
$html=$this->load->view("monpas/sop/sopvoorpagina", $data, true);
|
||||||
|
$html=$html;
|
||||||
|
|
||||||
|
for ($i=1; $i<=12;$i++){
|
||||||
|
$where=array("profiel_id" => $profielid,
|
||||||
|
"chapter_id" => $i);
|
||||||
|
$tekst=$this->Sopinhouden_model->get_fieldvalue($where,'content');
|
||||||
|
if ($tekst){
|
||||||
|
if ($word){
|
||||||
|
$html=$html."<pagebreak />".$tekst;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$html=$html."<div style='page-break-after:always'></div>".$tekst;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$html=$html.'</body></html>';
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
function maakpdf(){
|
||||||
|
$input = json_decode($this->input->get('json'));
|
||||||
|
$profielid = $input->profielid;
|
||||||
|
$html = $this->maakHtml($profielid, false);
|
||||||
|
$filenaam="sop".date('YmdHis');
|
||||||
|
$this->Phantom_model->create_pdf($html,$filenaam, FALSE,FALSE,FALSE);
|
||||||
|
}
|
||||||
|
function maakword(){
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$html = $this->maakHtml($profielid,true);
|
||||||
|
|
||||||
|
$html ="<!doctype html><html><body>".$html.'</body></html>';
|
||||||
|
|
||||||
|
$this->Docx_model->create_word_document($html, 'sop'.date('YmdHis'));
|
||||||
|
}
|
||||||
|
function getschooldetails(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$html = $this->Sopinhouden_model->getcolofon();
|
||||||
|
echo json_encode($html);
|
||||||
|
}
|
||||||
|
function getdiversiteit1(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$versie = $this->uri->segment(5);
|
||||||
|
$module = 2;
|
||||||
|
$dvt234 = $this->Sopinhouden_model->getdiversiteit234($profielid,$versie, $module);
|
||||||
|
|
||||||
|
$grafiekdiversiteit1 = $dvt234['divgrafiek1'];
|
||||||
|
$image=$this->Phantom_model->create_img($grafiekdiversiteit1, 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imagedata = "<img src='data:image/png;base64,".$image."' id='divimage1'/>";
|
||||||
|
|
||||||
|
echo json_encode(array(
|
||||||
|
// 'dvt1' =>$dvt1,
|
||||||
|
'dvt2' =>$dvt234['dvt2'],
|
||||||
|
'dvt3' =>$dvt234['dvt3'],
|
||||||
|
'dvt4' =>$dvt234['dvt4'],
|
||||||
|
'imagedata' =>$imagedata));
|
||||||
|
}
|
||||||
|
function getondersteuning1(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$versie =$this->uri->segment(5);
|
||||||
|
$result = $this->Sopinhouden_model->getondersteuning12($profielid,$versie);
|
||||||
|
|
||||||
|
echo json_encode(array('os1' =>$result['os1'] ,
|
||||||
|
"os2"=> $result['os2']) );
|
||||||
|
}
|
||||||
|
function getenquetemodule(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$module = $this->uri->segment(5);
|
||||||
|
$chapterid = $this->uri->segment(6);
|
||||||
|
$versieid = $this->uri->segment(7);
|
||||||
|
if ($versieid && $versieid !== 'undefined' && $versieid > 0){
|
||||||
|
$result = $this->Sopinhouden_model->getenquetetabellen($profielid,$module,$chapterid,$versieid);
|
||||||
|
|
||||||
|
$image = $this->Phantom_model->create_img($result['grafiek1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imageid = "mod".$module."image1";
|
||||||
|
|
||||||
|
$imagedata = "<img src='data:image/png;base64,".$image."' id='.$imageid.'/>";
|
||||||
|
echo json_encode(array('tabel1' =>$result['tabel1'] ,
|
||||||
|
'imagedata' => $imagedata,
|
||||||
|
"tabel2" => $result['tabel2']) );
|
||||||
|
} else {
|
||||||
|
// if not versieid
|
||||||
|
echo json_encode(array('tabel1' =>'' ,
|
||||||
|
'imagedata' => '',
|
||||||
|
"tabel2" => '') );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getontwikkelagenda(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$module = $this->uri->segment(5);
|
||||||
|
$versie = $this->uri->segment(6);
|
||||||
|
$result = $this->Sopinhouden_model->getOntwikkelagenda($profielid,$module,$versie);
|
||||||
|
$imageoa = $this->Phantom_model->create_img($result['tabel1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$id = "oa1image1";
|
||||||
|
|
||||||
|
if ( $module = 4) { $id = "oa2image1";};
|
||||||
|
$imagedata = "<img src='data:image/png;base64,".$imageoa."' id='".$id."'/>";
|
||||||
|
|
||||||
|
echo json_encode(array('image1' => $imagedata ,
|
||||||
|
"tabel2" => $result['tabel2']) );
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletehoofdstuk(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$chapterid = $this->uri->segment(5);
|
||||||
|
$where= array('profiel_id' =>$profielid,
|
||||||
|
'chapter_id'=>$chapterid);
|
||||||
|
$this->Sopinhouden_model->delete_record_where($where);
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
function getchapterids(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->uri->segment(4);
|
||||||
|
$ids = $this->Sop_model->getsopchapterids($profielid);
|
||||||
|
echo json_encode($ids);
|
||||||
|
}
|
||||||
|
function getenquetemoduleandsave(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$profielid = $this->input->post("profielid");
|
||||||
|
$chapterid = $this->input->post("hoofdstuk");
|
||||||
|
$versie = $this->input->post("versie");
|
||||||
|
$chapter = $this->Hoofdstukken_model->get_record_by_id($chapterid);
|
||||||
|
$module = $this->Modules_model->get_record_by_id($chapter->module);
|
||||||
|
// $module = 1;
|
||||||
|
// if ($chapterid == 7 || $chapterid ==12) $module = 4;
|
||||||
|
$where= array( "profiel_id" =>$profielid,
|
||||||
|
"chapter_id" =>$chapterid);
|
||||||
|
$content= $this->Sopinhouden_model->get_fieldvalue($where,'content');
|
||||||
|
if ($content) {
|
||||||
|
switch ($chapterid){
|
||||||
|
case 6: $result = $this->Sopinhouden_model->getenquetetabellen($profielid,$module->sysnr,$chapterid,$versie);
|
||||||
|
|
||||||
|
$imagemb =$this->Phantom_model->create_img( $result['grafiek1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imagemb = "<div class='grafiekholdermonbas'><img src='data:image/png;base64,".$imagemb."' id='mod1image1'/></div>";
|
||||||
|
$search = '~<div class="grafiekholdermonbas">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $imagemb,$content);
|
||||||
|
|
||||||
|
$monbas1 ="<div class='tableholdermonbasteam'>".$result['tabel1']."</div>";
|
||||||
|
$search = '~<div class="tableholdermonbasteam">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $monbas1,$content);
|
||||||
|
|
||||||
|
|
||||||
|
$monbas2 ="<div class='tableholdermonbasschool'>".$result['tabel2']."</div>";
|
||||||
|
$search = '~<div class="tableholdermonbasschool">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $monbas2,$content);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$result =$this->Sopinhouden_model->getenquetetabellen($profielid,$module->sysnr,$chapterid,$versie);
|
||||||
|
|
||||||
|
$imagesm =$this->Phantom_model->create_img($result['grafiek1'], 'test.png', FALSE, FALSE, array(650, 300));
|
||||||
|
$imagedata = "<div class='grafiekholdersm'><img src='data:image/png;base64,".$imagesm."' id='mod4image1'/><?]/div>";
|
||||||
|
$search = '~<div class="grafiekholdersm">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $imagedata,$content);
|
||||||
|
|
||||||
|
$sm1 = "<div class='tableholdersm1'>".$result['tabel1']."</div>";
|
||||||
|
$search = '~<div class="tableholdersm1">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $sm1,$content);
|
||||||
|
|
||||||
|
$sm2 = "<div class='tableholdersm2'>".$result['tabel2']."</div>";
|
||||||
|
$search = '~<div class="tableholdersm2">[\s\S]*?</div>~';
|
||||||
|
$content = preg_replace($search, $sm2,$content);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
// Ontwikkelagenda Monbas
|
||||||
|
$result = $this->Sopinhouden_model->getOntwikkelagenda($profielid,$module->sysnr,$versie);
|
||||||
|
$oa1 = "<div class='tableholderontwikkelagenda1'>".$result['tabel1']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda1'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa1,$content);
|
||||||
|
|
||||||
|
$oa2 = "<div class='tableholderontwikkelagenda2'>".$result['tabel2']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda2'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa2,$content);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
// Ontwikkelagenda Schoolmeter
|
||||||
|
$result = $this->Sopinhouden_model->getOntwikkelagenda($profielid,$module->sysnr,$versie);
|
||||||
|
$oa1 = "<div class='tableholderontwikkelagenda1'>".$result['tabel1']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda1'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa1,$content);
|
||||||
|
|
||||||
|
$oa2 = "<div class='tableholderontwikkelagenda2'>".$result['tabel2']."</div>";
|
||||||
|
$search = "~<div class='tableholderontwikkelagenda2'>[\s\S]*?</div>~";
|
||||||
|
$content = preg_replace($search, $oa2,$content);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}; // switch
|
||||||
|
$data=array("content" => $content) ;
|
||||||
|
$this->Sopinhouden_model->update_record_where($data,$where);
|
||||||
|
}; // if content
|
||||||
|
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
function saveversie(){
|
||||||
|
$inhoudid = $this->clean_input('inhoudid');
|
||||||
|
$orgversieid = $this->clean_input('versie');
|
||||||
|
$chapterid = $this->clean_input('chapterid');
|
||||||
|
$profielid = $this->clean_input("profielid");
|
||||||
|
$chapteridlist = $this->clean_input("chapids");
|
||||||
|
|
||||||
|
$this->Sopinhouden_model->update_record(array("orgversieid"=>$orgversieid), $inhoudid);
|
||||||
|
$inhoud = $this->Sopinhouden_model->maakcontent($chapterid, $profielid);
|
||||||
|
$this->Sopinhouden_model->update_record(array('content'=>$inhoud['content']), $inhoudid);
|
||||||
|
if ($chapteridlist){
|
||||||
|
foreach($chapteridlist as $chapterid){
|
||||||
|
$where=array("chapter_id"=>$chapterid, "profiel_id"=>$profielid);
|
||||||
|
$this->Sopinhouden_model->update_record_where(array("orgversieid"=>$orgversieid), $where);
|
||||||
|
$inhoud = $this->Sopinhouden_model->maakcontent($chapterid, $profielid);
|
||||||
|
$this->Sopinhouden_model->update_record_where(array('content'=>$inhoud['content']), $where);
|
||||||
|
}; // foreach
|
||||||
|
}; // if list
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
<?php if ( ! defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
|
||||||
|
|
||||||
|
class Sortering extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$models = array(
|
||||||
|
"shared/Users_model",
|
||||||
|
"shared/Organisaties_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"shared/Session_model",
|
||||||
|
"monpas/Sorteringen_model",
|
||||||
|
"monpas/Sorteerlabels_model",
|
||||||
|
"monpas/Sorteerlabelsorg_model",
|
||||||
|
);
|
||||||
|
$this->load->model( $models );
|
||||||
|
$this->load->helper( 'string' );
|
||||||
|
if ( ! $this->check_online_status() )
|
||||||
|
{
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkrechten()
|
||||||
|
{
|
||||||
|
// if ( ! $this->userid ) die;
|
||||||
|
// $orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
// $niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
//
|
||||||
|
// if ( $niveau == 1 || $niveau == 2 )
|
||||||
|
// {
|
||||||
|
// echo json_encode( TRUE );
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// echo json_encode( FALSE );
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// function checkadmin(){
|
||||||
|
// $orguserid = $this->Orgusers_model->get_fieldvalue( array("user_id" => $this->userid, "organisatie_id" => $this->globorgid), "id" );
|
||||||
|
// $niveau = $this->Autorisaties_model->get_fieldvalue( array("orguser_id" => $orguserid), "nivo_id" );
|
||||||
|
//
|
||||||
|
// return $niveau;
|
||||||
|
// }
|
||||||
|
|
||||||
|
function getSortering(){
|
||||||
|
$swvID = $this->uri->segment(4);
|
||||||
|
$criteria = $this->Sorteringen_model->get_criteriabijSWV($swvID);
|
||||||
|
foreach($criteria as $criterium){
|
||||||
|
$labels = $this->Sorteerlabels_model->get_labels($criterium->id);
|
||||||
|
$label = new stdClass();
|
||||||
|
$label->id = 0;
|
||||||
|
$label->sortering_id = $criterium->id;
|
||||||
|
$label->naam ='niet ingedeeld';
|
||||||
|
$label->volgorde = 'LAATST';
|
||||||
|
array_push($labels, $label);
|
||||||
|
$criterium->labels = $labels;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($criteria);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSchoolIndelingen(){
|
||||||
|
$swvid = $this->clean_input('swvid');
|
||||||
|
$criteriumid = $this->clean_input('criteriumid');
|
||||||
|
$labels = $this->Sorteerlabels_model->get_labels($criteriumid);
|
||||||
|
$label = new stdClass();
|
||||||
|
$label->waardeid = 0;
|
||||||
|
$label->sortering_id = $criteriumid;
|
||||||
|
$label->naam ='niet ingedeeld';
|
||||||
|
$label->volgorde = 'LAATST';
|
||||||
|
array_push($labels, $label);
|
||||||
|
$swv = $this->Organisaties_model->get_record_by_id($swvid);
|
||||||
|
$swv->kamers = $this->Organisaties_model->getorgsvanaf($swvid);
|
||||||
|
|
||||||
|
if(!$swv->kamers){
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_array($swv->kamers)){
|
||||||
|
$swv->kamers = objectToArray($swv->kamers);
|
||||||
|
}
|
||||||
|
foreach($swv->kamers as $kamer){
|
||||||
|
$kamer->bgs = $this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($kamer->bgs){
|
||||||
|
foreach($kamer->bgs as $bg){
|
||||||
|
$bg->scholen =$this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
if($bg->scholen) {
|
||||||
|
foreach ($bg->scholen as $school) {
|
||||||
|
|
||||||
|
$school->opties = $labels;
|
||||||
|
|
||||||
|
$school->indeling = $this->Sorteringen_model->getSchoolIndeling($school->id, $criteriumid);
|
||||||
|
if ( !$school->indeling) {
|
||||||
|
$school->indeling = new stdClass();
|
||||||
|
$school->indeling->waardeid = 0;
|
||||||
|
$school->indeling->waarde = 'niet ingedeeld';
|
||||||
|
$school->indeling->volgorde = 'LAATST';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode($swv);
|
||||||
|
}
|
||||||
|
function saveCriterium(){
|
||||||
|
$swvID = $this->clean_input('swvID');
|
||||||
|
$naam = $this->clean_input('criterium');
|
||||||
|
$label1 = $this->clean_input('label1');
|
||||||
|
$label2 = $this->clean_input('label2');
|
||||||
|
$nieuwelabels = $this->clean_input('labelArray');
|
||||||
|
$labels = [];
|
||||||
|
array_push($labels, $label1, $label2);
|
||||||
|
|
||||||
|
if($nieuwelabels){
|
||||||
|
foreach($nieuwelabels as $label){
|
||||||
|
if(!empty($label['nieuwLabel'])){
|
||||||
|
array_push($labels, $label['nieuwLabel']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$criteriumid = $this->Sorteringen_model->insert_record
|
||||||
|
(array('swv_id'=>$swvID,
|
||||||
|
'naam' =>$naam));
|
||||||
|
|
||||||
|
foreach($labels as $label){
|
||||||
|
$this->Sorteerlabels_model->insert_record
|
||||||
|
(array('sortering_id'=>$criteriumid,
|
||||||
|
'naam'=>$label));
|
||||||
|
}
|
||||||
|
echo json_encode($criteriumid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function editCriterium(){
|
||||||
|
$swvID = $this->clean_input('swvID');
|
||||||
|
$criteriumid = $this->clean_input('criteriumid');
|
||||||
|
$naam = $this->clean_input('criterium');
|
||||||
|
$editlabels = $this->clean_input('labels');
|
||||||
|
$nieuwelabels = $this->clean_input('labelArray');
|
||||||
|
$labels = [];
|
||||||
|
if($editlabels){
|
||||||
|
foreach($editlabels as $label){
|
||||||
|
if(!empty($label['label'] && $label['label'] != "niet ingedeeld")){
|
||||||
|
array_push($labels, $label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach($labels as $label){
|
||||||
|
$labelid = $label['waardeid'];
|
||||||
|
$waarde = $label['label'];
|
||||||
|
$this->Sorteerlabels_model->update_record_where(array('naam'=>$waarde),
|
||||||
|
array('id'=>$labelid));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$labelsNieuw = [];
|
||||||
|
if($nieuwelabels){
|
||||||
|
foreach($nieuwelabels as $label){
|
||||||
|
if(!empty($label['nieuwLabel'])){
|
||||||
|
array_push($labelsNieuw, $label['nieuwLabel']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach($labelsNieuw as $label){
|
||||||
|
$this->Sorteerlabels_model->insert_record
|
||||||
|
(array('sortering_id'=>$criteriumid,
|
||||||
|
'naam'=>$label));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->Sorteringen_model->update_record
|
||||||
|
(array('swv_id'=>$swvID,
|
||||||
|
'naam' =>$naam), $criteriumid);
|
||||||
|
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deleteCriterium(){
|
||||||
|
$criteriumid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$this->Sorteerlabels_model->delete_record_where(array('sortering_id' =>$criteriumid));
|
||||||
|
$this->Sorteringen_model->delete_record($criteriumid);
|
||||||
|
|
||||||
|
echo json_encode(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteLabel(){
|
||||||
|
$labelid = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$this->Sorteerlabels_model->delete_record($labelid);
|
||||||
|
|
||||||
|
echo json_encode(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSortering(){
|
||||||
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$keuzeid = $this->clean_input('keuzeid');
|
||||||
|
$criteriumid = $this->clean_input('criteriumid');
|
||||||
|
$voorheen = $this->Sorteringen_model->getSchoolIndeling($orgid, $criteriumid);
|
||||||
|
|
||||||
|
if($voorheen){
|
||||||
|
$this->Sorteerlabelsorg_model->delete_record_where(array(
|
||||||
|
'label_id'=>$voorheen->waardeid,
|
||||||
|
'organisatie_id'=>$orgid ));
|
||||||
|
}
|
||||||
|
$id = $this->Sorteerlabelsorg_model->insert_record(array(
|
||||||
|
'label_id'=>$keuzeid,
|
||||||
|
'organisatie_id'=>$orgid));
|
||||||
|
|
||||||
|
echo json_encode($id);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Streefcijfers extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Ambities_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function gethierarchie($selfid){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$organisatie= $this->Organisaties_model->get_record_by_id($selfid);
|
||||||
|
$swvid = null;
|
||||||
|
$kamerid = null;
|
||||||
|
$bgid = null;
|
||||||
|
switch ($organisatie->soort) {
|
||||||
|
case 1: $swvid = $organisatie->id;
|
||||||
|
break;
|
||||||
|
case 2: $kamerid = $organisatie->id;
|
||||||
|
$swvid =$organisatie->valtonder_id;
|
||||||
|
break;
|
||||||
|
case 3: $bgid = $organisatie->id;
|
||||||
|
$kamerid = $organisatie->valtonder_id;
|
||||||
|
$org2 = $this->Organisaties_model->get_record_by_id($kamerid);
|
||||||
|
$swvid = $org2->valtonder_id;
|
||||||
|
break;
|
||||||
|
case 4: $bgid = $organisatie->valtonder_id;
|
||||||
|
$org2 = $this->Organisaties_model->get_record_by_id($bgid);
|
||||||
|
$kamerid = $org2->valtonder_id;
|
||||||
|
$org3 = $this->Organisaties_model->get_record_by_id($kamerid);
|
||||||
|
$swvid = $org2->valtonder_id;
|
||||||
|
break;
|
||||||
|
} ; // einde switch
|
||||||
|
return array('swvid'=>$swvid,
|
||||||
|
"kamerid" =>$kamerid,
|
||||||
|
"bgid" =>$bgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getorgversies_ambities(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$targetorgid = $this->uri->segment(4);
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
// get de ambities van de targetorganisatie
|
||||||
|
$ambities = $this->Ambities_model->getambities($targetorgid);
|
||||||
|
|
||||||
|
// zoek de huidige, actieve orgversie
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
$hierarchie = $this->gethierarchie($targetorgid);
|
||||||
|
|
||||||
|
switch ($organisatie->soort){
|
||||||
|
case 1: $orgversies = $this->Orgversies_model->getallorgversies($hierarchie['swvid'],$module,true);
|
||||||
|
// let op dit is een array
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3: $orgversies = $this->Orgversies_model->getallorgversies($hierarchie['kamerid'],$module, true);
|
||||||
|
if (!$orgversies){
|
||||||
|
$orgversies = $this->Orgversies_model->getallorgversies($hierarchie['swvid'],$module, true);
|
||||||
|
}
|
||||||
|
// een bg is voorlopig nog niet gekoppeld aan een orgversie
|
||||||
|
break;
|
||||||
|
}; //einde switch
|
||||||
|
|
||||||
|
if ($orgversies) {
|
||||||
|
// Als er voor de huidige, actieve orgversies voor de gegeven organisatie nog geen
|
||||||
|
//ambities zijn, zoek dan de ambitie van de hogere organisatie en anders de default
|
||||||
|
$alaanwezig = false;
|
||||||
|
if ($ambities){
|
||||||
|
foreach($ambities as $ambitie){
|
||||||
|
if ($ambitie->orgversie_id == $orgversies[0]->id) {$alaanwezig = true; };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$alaanwezig){
|
||||||
|
switch($organisatie->soort){
|
||||||
|
case 1: $ambitie_new = $this->Ambities_model->getdefault2($orgversies[0]->id, $targetorgid);
|
||||||
|
break;
|
||||||
|
case 2: $ambitie_new = $this->Ambities_model->getambitie2($orgversies[0]->id, $hierarchie["swvid"]);
|
||||||
|
if (!$ambitie_new){
|
||||||
|
$ambitie_new = $this->Ambities_model->getdefault2($orgversies[0]->id, $targetorgid);
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case 3: $ambitie_new = $this->Ambities_model->getambitie2($orgversies[0]->id, $hierarchie["kamerid"]);
|
||||||
|
if (!$ambitie_new) {
|
||||||
|
$ambitie_new = $this->Ambities_model->getambitie2($orgversies[0]->id, $hierarchie["swvid"]);
|
||||||
|
if (!$ambitie_new){
|
||||||
|
$ambitie_new = $this->Ambities_model->getdefault2($orgversies[0]->id, $targetorgid);
|
||||||
|
}
|
||||||
|
}; // if
|
||||||
|
break;
|
||||||
|
};//switch
|
||||||
|
if ($ambities){
|
||||||
|
array_push($ambities,$ambitie_new); }
|
||||||
|
else {$ambities[0] = $ambitie_new;};
|
||||||
|
}; // if not al aanwezig
|
||||||
|
}; // if orgversies
|
||||||
|
if ($ambities){
|
||||||
|
foreach($ambities as $ambitie){
|
||||||
|
$ambitie->wijzigok = true;
|
||||||
|
// if (new DateTime( $ambitie->geldigtm) <= new DateTime() ) {$ambitie->wijzigok = false;};
|
||||||
|
$ambitie->geldigvanaf = mysql2date($ambitie->geldigvanaf);
|
||||||
|
$ambitie->geldigtm = mysql2date($ambitie->geldigtm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($ambities);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function getorgversies_ambities_oud(){
|
||||||
|
// $versies = false;
|
||||||
|
// $module = $this->session->userdata('module');
|
||||||
|
// $targetorgid = $this->uri->segment(3);
|
||||||
|
// $organisatie = $this->Organisaties_model->get_record_by_id($targetorgid);
|
||||||
|
|
||||||
|
// $hierarchie = $this->gethierarchie($targetorgid);
|
||||||
|
|
||||||
|
// // haal alle orgversies op
|
||||||
|
// $orgversies = null;
|
||||||
|
// switch ($organisatie->soort){
|
||||||
|
// case 1: $orgversiesSWV = $this->Orgversies_model->getallorgversies($targetorgid,$module);
|
||||||
|
// break;
|
||||||
|
// case 2: $orgversiesSWV =$this->Orgversies_model->getallorgversies($targetorgid,$module);
|
||||||
|
// $orgversiesKamer = $this->Orgversies_model->getallorgversies($hierarchie["swvid"],$module);
|
||||||
|
// break;
|
||||||
|
// case 3: $orgversiesBG = $this->Orgversies_model->getallorgversies($hierarchie["bgid"],$module);
|
||||||
|
// $orgversiesKamer = $this->Orgversies_model->getallorgversies($hierarchie["kamerid"],$module);
|
||||||
|
// $orgversiesBG = $this->Orgversies_model->getallorgversies($hierarchie["swvid"], $module);
|
||||||
|
// break;
|
||||||
|
// }; //einde switch
|
||||||
|
|
||||||
|
|
||||||
|
// if ($orgversiesSWV){
|
||||||
|
// foreach($orgversiesSWV as $orgversie){
|
||||||
|
// $orgversie->ambitie = $this->Ambities_model->getambitie($orgversie->id,$targetorgid);
|
||||||
|
// }// foreach
|
||||||
|
// }; // if
|
||||||
|
// if ($orgversiesKamer){
|
||||||
|
// foreach($orgversiesKamer as $orgversie){
|
||||||
|
// $orgversie->ambitie = $this->Ambities_model->getambitie($orgversie->id,$targetorgid);
|
||||||
|
// }// foreach
|
||||||
|
// }; // if
|
||||||
|
// echo json_encode($orgversies);
|
||||||
|
// }
|
||||||
|
|
||||||
|
function getorganisaties(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie->soort == 3){
|
||||||
|
// doe verder niks
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == 2){
|
||||||
|
$organisatie->bgs = $this->Organisaties_model->getorgsvanaf($organisatie->id);
|
||||||
|
}
|
||||||
|
if ($organisatie->soort == 1) {
|
||||||
|
$organisatie->kamers = $this->Organisaties_model->getorgsvanaf($organisatie->id);
|
||||||
|
if ($organisatie->kamers){
|
||||||
|
foreach ($organisatie->kamers as $kamer){
|
||||||
|
$kamer->bgs = $this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($organisatie);
|
||||||
|
}
|
||||||
|
function getzelfniveau(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$nivo = $this->Organisaties_model->get_fieldvalue(array("id"=>$this->globorgid), "soort");
|
||||||
|
echo json_encode($nivo);
|
||||||
|
}
|
||||||
|
function updateambitie(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$id=$this->clean_input("id");
|
||||||
|
// zoek of de ambitie voor een nieuwe organisatie is
|
||||||
|
$alaanwezig = $this->Ambities_model->check_for_record(array("organisatie_id"=>$this->clean_input("organisatie_id"),
|
||||||
|
"orgversie_id" => $this->clean_input("orgversie_id")) );
|
||||||
|
if ($id ==0 || !$alaanwezig ){
|
||||||
|
$data=array("organisatie_id" => $this->clean_input("organisatie_id"),
|
||||||
|
"orgversie_id" => $this->clean_input("orgversie_id"),
|
||||||
|
"gem_score" => $this->clean_input("gemscore"),
|
||||||
|
"x_ijkpunten" => $this->clean_input("xijkpunten"),
|
||||||
|
"z_procent" => $this->clean_input("zprocent"));
|
||||||
|
$newid= $this->Ambities_model->insert_record($data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data=array("gem_score" => $this->clean_input("gemscore"),
|
||||||
|
"x_ijkpunten" => $this->clean_input("xijkpunten"),
|
||||||
|
"z_procent" => $this->clean_input("zprocent"));
|
||||||
|
$this->Ambities_model->update_record($data, $id);
|
||||||
|
$newid =false;
|
||||||
|
} ;
|
||||||
|
echo json_encode($newid);
|
||||||
|
}
|
||||||
|
|
||||||
|
function verwijder(){
|
||||||
|
$ambitieID = $this->clean_input('id');
|
||||||
|
$error = true;
|
||||||
|
if ($this->userid){
|
||||||
|
$this->Ambities_model->delete_record($ambitieID);
|
||||||
|
$error = false;
|
||||||
|
}
|
||||||
|
echo json_encode($error);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Swvversies extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "monpas/Antwoordtypes_model",
|
||||||
|
"monpas/Antwoordopties_model",
|
||||||
|
"shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Modules_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getswvs(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgs=null;
|
||||||
|
if ($this->super){
|
||||||
|
$swvs = $this->Organisaties_model->getorgs(1);
|
||||||
|
if ($swvs ){
|
||||||
|
foreach($swvs as $swv){
|
||||||
|
$swv->kamers = $this->Organisaties_model->getorgs(2, $swv->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if super
|
||||||
|
echo json_encode($swvs);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getkoppelingen(){
|
||||||
|
//TODO clean input
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$module = $this->clean_input("module");
|
||||||
|
$koppelingen = $this->Orgversies_model->getallorgversies($orgid, $module);
|
||||||
|
if ($koppelingen){
|
||||||
|
if ($koppelingen[0]->id == null) {$koppelingen='';};
|
||||||
|
}
|
||||||
|
echo json_encode($koppelingen);
|
||||||
|
}
|
||||||
|
function insertkoppeling(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->clean_input("orgid");
|
||||||
|
$periodenummer = $this->Orgversies_model->getmaxperiode($orgid);
|
||||||
|
|
||||||
|
if ($periodenummer) {$nummer = $periodenummer->nummer + 1 ; }
|
||||||
|
else {$nummer = 1; };
|
||||||
|
// kijk of er al een actieve koppeling is, zo nee dan wordt dit de actieve koppeling
|
||||||
|
if ($this->Orgversies_model->get_records_where(array("organisatie_id" =>$orgid, "actief" =>1)) )
|
||||||
|
{$actief = 0 ;}
|
||||||
|
else {$actief = 1 ;};
|
||||||
|
$data = array("organisatie_id" => $orgid,
|
||||||
|
"periodenummer" => $nummer,
|
||||||
|
"actief" => $actief,
|
||||||
|
"versie_id" => $this->input->post("versieid"),
|
||||||
|
"geldigvanaf" => date2mysql($this->input->post("geldigvanaf")),
|
||||||
|
"geldigtm" => date2mysql($this->input->post("geldigtm")),
|
||||||
|
"invullentm" => date2mysql($this->input->post("invullentm")),
|
||||||
|
"vorm" => $this->input->post("vormid"),
|
||||||
|
"scoretype" => $this->input->post("scoretype"),
|
||||||
|
"score_omschrijving" => $this->clean_input('omschrijving')
|
||||||
|
);
|
||||||
|
$newid = $this->Orgversies_model->insert_record($data);
|
||||||
|
$koppeling = $this->Orgversies_model->getkoppeling($newid);
|
||||||
|
echo json_encode($koppeling);
|
||||||
|
}
|
||||||
|
function deletekoppeling(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->uri->segment(4);
|
||||||
|
$this->Orgversies_model->delete_record($orgversieid);
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
function updatekoppeling(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->clean_input("id");
|
||||||
|
$datumvanaf = date2mysql($this->clean_input("geldigvanaf"));
|
||||||
|
$datumtm = date2mysql($this->clean_input("geldigtm"));
|
||||||
|
$datuminvullen = date2mysql($this->clean_input("invullentm"));
|
||||||
|
$omschrijving = $this->clean_input('omschrijving')== false ? 'F' : 'T';
|
||||||
|
|
||||||
|
$this->Orgversies_model->update_record(array("geldigvanaf" =>$datumvanaf,
|
||||||
|
"geldigtm" =>$datumtm,
|
||||||
|
"invullentm" =>$datuminvullen,
|
||||||
|
"vorm" =>$this->input->post("vormid"),
|
||||||
|
"scoretype" =>$this->input->post("scoretype") ), $orgversieid);
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatetoonomschrijving(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->clean_input("id");
|
||||||
|
$omschrijving = $this->clean_input('omschrijving');
|
||||||
|
|
||||||
|
$this->Orgversies_model->update_record(array(
|
||||||
|
"score_omschrijving" =>$omschrijving), $orgversieid);
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getantwoordtypes(){
|
||||||
|
$types = $this->Antwoordtypes_model->getalltypes();
|
||||||
|
|
||||||
|
echo json_encode($types);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAntwoordtypesEnOmschrijving(){
|
||||||
|
$types = $this->Antwoordtypes_model->getalltypes();
|
||||||
|
foreach($types as $type){
|
||||||
|
$type->opties = $this->Antwoordopties_model->getopties($type->sysnr);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($types);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateAntwoordopties(){if (!$this->userid) die;
|
||||||
|
$optieID = $this->clean_input('id');
|
||||||
|
$omschrijving = $this->input->post('omschrijving');
|
||||||
|
$this->Antwoordopties_model->update_record(['omschrijving' =>$omschrijving], $optieID);
|
||||||
|
$this->json(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getversies(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$module = $this->clean_input("module");
|
||||||
|
$versies = $this->Versies_model->getversiesbymodule($module);
|
||||||
|
echo json_encode($versies);
|
||||||
|
}
|
||||||
|
function maakactief(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->uri->segment(4);
|
||||||
|
$modulesysnr = $this->uri->segment(5);
|
||||||
|
$orgid = $this->Orgversies_model->get_fieldvalue(array("id"=>$orgversieid), 'organisatie_id');
|
||||||
|
$this->Orgversies_model->updateactief($orgid, $modulesysnr);
|
||||||
|
$data=array("actief"=>1);
|
||||||
|
$this->Orgversies_model->update_record($data, $orgversieid);
|
||||||
|
}
|
||||||
|
function maakinactief(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgversieid = $this->uri->segment(4);
|
||||||
|
$data = array("actief " => 0);
|
||||||
|
$this->Orgversies_model->update_record($data, $orgversieid);
|
||||||
|
}
|
||||||
|
function getmodulesmetlijst(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$modules = $this->Modules_model->getmodulesmetlijst();
|
||||||
|
echo json_encode($modules);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,662 @@
|
|||||||
|
// Build the chart
|
||||||
|
|
||||||
|
//
|
||||||
|
// fFillGraph=function(){
|
||||||
|
|
||||||
|
<?php //if (isset($data[0]->tlvs ))?>//fMakeChart('tlvs');
|
||||||
|
// <?php //if(isset($data[1]->tlvs ))?>// fMakeChart('tlvsII');
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// fMakeChart = function() {
|
||||||
|
//
|
||||||
|
// var aantallen = [];
|
||||||
|
// <?php //foreach( $data[0]->tlvs as $tlv){
|
||||||
|
// if($tlv->zwaarte == 'LAAG'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so laag',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#d9ffb3'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'MIDDEN'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so midden',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#66cc00'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'HOOG'){?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so hoog',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#4d9900''
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'LICHT'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'sbo licht',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#99d6ff'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'ZWAAR'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'sbo zwaar',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#005c99'
|
||||||
|
// });
|
||||||
|
// <?php //} } ?>
|
||||||
|
|
||||||
|
Highcharts.chart('tlvs', {
|
||||||
|
chart: {
|
||||||
|
plotBackgroundColor: null,
|
||||||
|
plotBorderWidth: null,
|
||||||
|
plotShadow: false,
|
||||||
|
type: 'pie',
|
||||||
|
margin: [0, 0, 0, 0],
|
||||||
|
spacingTop: 0,
|
||||||
|
spacingBottom: 0,
|
||||||
|
spacingLeft: 0,
|
||||||
|
spacingRight: 0
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: ''
|
||||||
|
},
|
||||||
|
credits: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
allowPointSelect: true,
|
||||||
|
cursor: 'pointer',
|
||||||
|
size: '100%',
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
showInLegend: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
itemStyle: {
|
||||||
|
fontSize: '8px',
|
||||||
|
fontWeight: '200',
|
||||||
|
align: 'left',
|
||||||
|
itemDistance: '10',
|
||||||
|
borderWidth: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
series: [{
|
||||||
|
name: 'tlvs',
|
||||||
|
// colorByPoint: true,
|
||||||
|
data: aantallen
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Highcharts.chart('tlvsII', {
|
||||||
|
// chart: {
|
||||||
|
// plotBackgroundColor: null,
|
||||||
|
// plotBorderWidth: null,
|
||||||
|
// plotShadow: false,
|
||||||
|
// type: 'pie',
|
||||||
|
// margin: [0, 0, 0, 0],
|
||||||
|
// spacingTop: 0,
|
||||||
|
// spacingBottom: 0,
|
||||||
|
// spacingLeft: 0,
|
||||||
|
// spacingRight: 0
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// title: {
|
||||||
|
// text: ''
|
||||||
|
// },
|
||||||
|
// credits: {
|
||||||
|
// enabled: false
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// plotOptions: {
|
||||||
|
// pie: {
|
||||||
|
// allowPointSelect: true,
|
||||||
|
// cursor: 'pointer',
|
||||||
|
// size: '100%',
|
||||||
|
// dataLabels: {
|
||||||
|
// enabled: false
|
||||||
|
// },
|
||||||
|
// showInLegend: true,
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// legend: {
|
||||||
|
// itemStyle: {
|
||||||
|
// fontSize: '8px',
|
||||||
|
// fontWeight: '200',
|
||||||
|
// align: 'left',
|
||||||
|
// layout: 'horizontal',
|
||||||
|
// borderWidth: 0,
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// series: [{
|
||||||
|
// name: 'Brands',
|
||||||
|
// colorByPoint: true,
|
||||||
|
// data: [{
|
||||||
|
// name: 'Chrome',
|
||||||
|
// y: 61.41,
|
||||||
|
// sliced: true,
|
||||||
|
// selected: true
|
||||||
|
// }, {
|
||||||
|
// name: 'Internet Explorer',
|
||||||
|
// y: 11.84
|
||||||
|
// }, {
|
||||||
|
// name: 'Firefox',
|
||||||
|
// y: 10.85
|
||||||
|
// }, {
|
||||||
|
// name: 'Edge',
|
||||||
|
// y: 4.67
|
||||||
|
// }, {
|
||||||
|
// name: 'Safari',
|
||||||
|
// y: 4.18
|
||||||
|
// }, {
|
||||||
|
// name: 'Other',
|
||||||
|
// y: 7.05
|
||||||
|
// }]
|
||||||
|
// }]
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- --><?php //if ($data[0]->tlvs ){ ?>
|
||||||
|
// $(function(){
|
||||||
|
// fFillGraph10=function(){
|
||||||
|
// var schooljaar = '<?php //echo $data[0]->aantallen->naam ?>//';
|
||||||
|
//
|
||||||
|
// var aantallen = [];
|
||||||
|
// <?php //foreach( $data[0]->tlvs as $index => $tlv){
|
||||||
|
// if($tlv->zwaarte == 'LAAG'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so laag',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#d9ffb3'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'MIDDEN'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so midden',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#66cc00'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'HOOG'){?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'so hoog',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#4d9900''
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'LICHT'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'sbo licht',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#99d6ff'
|
||||||
|
// });
|
||||||
|
// <?php //}
|
||||||
|
//
|
||||||
|
// if($tlv->zwaarte == 'ZWAAR'){ ?>
|
||||||
|
//
|
||||||
|
// aantallen.push({
|
||||||
|
// name: 'sbo zwaar',
|
||||||
|
// y: <?php //echo intval($tlv->aantal) ?>//,
|
||||||
|
// color: '#005c99'
|
||||||
|
// })
|
||||||
|
// <?php //} } ?>
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Highcharts.chart('tlvs', {
|
||||||
|
// chart: {
|
||||||
|
// backgroundColor: '#d7d8d7',
|
||||||
|
// plotBackgroundColor: '#d7d8d7',
|
||||||
|
// plotBorderWidth: null,
|
||||||
|
// plotShadow: false,
|
||||||
|
// animation: false,
|
||||||
|
// type: 'pie'
|
||||||
|
// },
|
||||||
|
// title:{
|
||||||
|
// text:''
|
||||||
|
// },
|
||||||
|
// credits: {
|
||||||
|
// enabled: false
|
||||||
|
// },
|
||||||
|
// plotOptions: {
|
||||||
|
// pie: {
|
||||||
|
// allowPointSelect: false,
|
||||||
|
// dataLabels: {
|
||||||
|
// enabled: false
|
||||||
|
// },
|
||||||
|
// showInLegend: true
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// legend:{
|
||||||
|
// enable: true,
|
||||||
|
// margin: 0,
|
||||||
|
// layout: 'horizontal',
|
||||||
|
// itemStyle:{
|
||||||
|
// fontSize: '10px',
|
||||||
|
// fontWeight: 'normal'
|
||||||
|
// },
|
||||||
|
// labelFormatter: function () {
|
||||||
|
// return this.name + ': ' + this.y;
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// series: aantallen
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// }()
|
||||||
|
// });
|
||||||
|
// <?php //} ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($data[1]->tlvs){ ?>
|
||||||
|
$(function(){
|
||||||
|
fFillGraph15=function(){
|
||||||
|
var schooljaar = '<?php echo $data[1]->aantallen->naam ?>';
|
||||||
|
|
||||||
|
var aantallen = [];
|
||||||
|
<?php foreach( $data[1]->tlvs as $index => $tlv){
|
||||||
|
if($tlv->zwaarte == 'LAAG'){ ?>
|
||||||
|
|
||||||
|
aantallen.push({
|
||||||
|
name: 'so laag',
|
||||||
|
y: <?php echo intval($tlv->aantal) ?>,
|
||||||
|
color: '#d9ffb3'
|
||||||
|
});
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if($tlv->zwaarte == 'MIDDEN'){ ?>
|
||||||
|
|
||||||
|
aantallen.push({
|
||||||
|
name: 'so midden',
|
||||||
|
y: <?php echo intval($tlv->aantal) ?>,
|
||||||
|
color: '#66cc00'
|
||||||
|
});
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if($tlv->zwaarte == 'HOOG'){?>
|
||||||
|
|
||||||
|
aantallen.push({
|
||||||
|
name: 'so hoog',
|
||||||
|
y: <?php echo intval($tlv->aantal) ?>,
|
||||||
|
color: '#4d9900''
|
||||||
|
});
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if($tlv->zwaarte == 'LICHT'){ ?>
|
||||||
|
|
||||||
|
aantallen.push({
|
||||||
|
name: 'sbo licht',
|
||||||
|
y: <?php echo intval($tlv->aantal) ?>,
|
||||||
|
color: '#99d6ff'
|
||||||
|
});
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if($tlv->zwaarte == 'ZWAAR'){ ?>
|
||||||
|
|
||||||
|
aantallen.push({
|
||||||
|
name: 'sbo zwaar',
|
||||||
|
y: <?php echo intval($tlv->aantal) ?>,
|
||||||
|
color: '#005c99'
|
||||||
|
});
|
||||||
|
<?php } } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Highcharts.chart('tlvsII', {
|
||||||
|
chart: {
|
||||||
|
backgroundColor: '#d7d8d7',
|
||||||
|
plotBackgroundColor: '#d7d8d7',
|
||||||
|
plotBorderWidth: null,
|
||||||
|
plotShadow: false,
|
||||||
|
animation: false,
|
||||||
|
type: 'pie'
|
||||||
|
},
|
||||||
|
title:{
|
||||||
|
text:''
|
||||||
|
},
|
||||||
|
credits: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
allowPointSelect: false,
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
showInLegend: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
legend:{
|
||||||
|
enable: true,
|
||||||
|
margin: 0,
|
||||||
|
layout: 'horizontal',
|
||||||
|
itemStyle:{
|
||||||
|
fontSize: '10px',
|
||||||
|
fontWeight: 'normal'
|
||||||
|
},
|
||||||
|
labelFormatter: function () {
|
||||||
|
return this.name + ': ' + this.y;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: aantallen
|
||||||
|
});
|
||||||
|
|
||||||
|
}()
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(count($data) == 1 &&($data[0]->tlvs || $data[1]->tlvs) ){ ?>
|
||||||
|
|
||||||
|
<div class="sopKaderGrafiek" style="margin-top: 0; padding-top: 0;">
|
||||||
|
<div class="col-xs-12" style="margin-top: 0; padding-top: 0; text-align: center">
|
||||||
|
<span style=" font-size: 0.8em !important;">TLVs per zorgzwaarte</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<?php if($data[0]->tlvs){ ?>
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="tlvs"
|
||||||
|
style="width: 350px; height: 125px; ">
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
if($data[1]->tlvs){ ?>
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="tlvs"
|
||||||
|
style="width: 350px; height: 125px; ">
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if($data[0]->arrangementen && $data[1]->arrangementen){ ?>
|
||||||
|
|
||||||
|
<div class="sopkaderGrafiek" style="margin-top: 0; padding-top: 0;">
|
||||||
|
<div class=" col-xs-12" style="margin-top: 0; padding-top: 0;">
|
||||||
|
<p style=" font-size: 0.8em !important; text-align:center">TLvs Per Zorgzwaarte</p>
|
||||||
|
</div>
|
||||||
|
<div class=" col-xs-6" style="padding:0;">
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="tlvs"
|
||||||
|
style="width: 175px; ">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class=" col-xs-6" style="padding:0;">
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="tlvsII"
|
||||||
|
style="width: 175px; ">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(count($data) == 1 && ($data[0]->arrangementen || $data[1]->arrangementen)){ ?>
|
||||||
|
|
||||||
|
<div class="sopkaderGrafiek" style="margin-top: 0; padding-top: 0;">
|
||||||
|
<div class=" col-xs-12" style="margin-top: 0; padding-top: 0;">
|
||||||
|
<p style=" font-size: 0.8em !important; text-align:center">TLVs per zorgzwaarte</p>
|
||||||
|
</div>
|
||||||
|
<div class=" col-xs-12" style="padding:0;">
|
||||||
|
<?php if($data[0]->arrangementen){ ?>
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="arrangementen"
|
||||||
|
style="width: 350px; ">
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
if($data[1]->arrangementen){ ?>
|
||||||
|
<div class="highcharts-background"
|
||||||
|
id="arrangementenII"
|
||||||
|
style="width: 350px; ">
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($data[0]->arrangementen){ ?>
|
||||||
|
$(function(){
|
||||||
|
fFillGraph11=function(){
|
||||||
|
var schooljaar = '<?php echo $data[0]->aantallen->naam ?>';
|
||||||
|
var arrangementen = [];
|
||||||
|
var naam = "";
|
||||||
|
var lengte = "";
|
||||||
|
var duur = "";
|
||||||
|
|
||||||
|
|
||||||
|
<?php foreach($data[0]->arrangementen as $index => $arrangement){
|
||||||
|
if(isset($arrangement->aantal)){
|
||||||
|
if($arrangement->aantal > 0) { ?>
|
||||||
|
|
||||||
|
lengte = 10;
|
||||||
|
duur = '>= 6 wkn';
|
||||||
|
<?php if($arrangement->lengte == 'K'){ ?>
|
||||||
|
lengte = 5;
|
||||||
|
duur = '< 6 wkn';
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
naam = '<?= $arrangement->naam ?>'+'('+'<?= $arrangement->leeftijd ?>'+') '+ '<?= $arrangement->aantal ?>' + ' lln.' + duur;
|
||||||
|
|
||||||
|
arrangementen.push({
|
||||||
|
name : naam,
|
||||||
|
y : <?php echo intval( $arrangement->aantal) ?>,
|
||||||
|
z : lengte
|
||||||
|
color : <?php echo $arrangement->kleur ?>,
|
||||||
|
});
|
||||||
|
<?php }
|
||||||
|
}; }?>
|
||||||
|
if (arrangementen.length <=0) return;
|
||||||
|
|
||||||
|
Highcharts.chart('arrangementen', {
|
||||||
|
chart: {
|
||||||
|
type: 'variablepie',
|
||||||
|
backgroundColor: '#d7d8d7',
|
||||||
|
plotBackgroundColor: '#d7d8d7',
|
||||||
|
animation: false,
|
||||||
|
height: 185
|
||||||
|
},
|
||||||
|
title:{
|
||||||
|
text:'',
|
||||||
|
margin: 0
|
||||||
|
},
|
||||||
|
credits: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
legend:{
|
||||||
|
enable: true,
|
||||||
|
margin: 0,
|
||||||
|
width: 175,
|
||||||
|
itemStyle: {
|
||||||
|
fontWeight: 'normal',
|
||||||
|
fontSize: 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
allowPointSelect: false,
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: [{
|
||||||
|
minPointSize: 10,
|
||||||
|
colorByPoint: true,
|
||||||
|
innerSize: '20%',
|
||||||
|
zMin: 0,
|
||||||
|
name: 'arrangementen',
|
||||||
|
data: arrangementen,
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
showInLegend: true
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}()
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($data[1]->arrangementen){ ?>
|
||||||
|
$(function(){
|
||||||
|
fFillGraph12=function(){
|
||||||
|
var schooljaar = '<?php echo $data[1]->aantallen->naam ?>';
|
||||||
|
var arrangementen = [];
|
||||||
|
var naamV = "";
|
||||||
|
var lengte = "";
|
||||||
|
var duur = "";
|
||||||
|
|
||||||
|
<?php foreach($data[1]->arrangementen as $index => $arrangement){
|
||||||
|
if(isset($arrangement->aantal)){
|
||||||
|
if($arrangement->aantal > 0) { ?>
|
||||||
|
lengte = 10;
|
||||||
|
duur = '>= 6 wkn';
|
||||||
|
<?php if($arrangement->lengte == 'K'){ ?>
|
||||||
|
lengte = 5;
|
||||||
|
duur = '< 6 wkn';
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
naam = '<?=$arrangement->naam ?>'+ '('+'<?= $arrangement->leeftijd ?>'+') '+ '<?= $arrangement->aantal ?>' + ' lln.' + duur;
|
||||||
|
|
||||||
|
arrangementen.push({
|
||||||
|
name: naam,
|
||||||
|
y : <?php echo intval($arrangement->aantal) ?>,
|
||||||
|
z : lengte
|
||||||
|
color : <?php echo $arrangement->kleur ?>,
|
||||||
|
});
|
||||||
|
<?php }; }; }?>
|
||||||
|
|
||||||
|
if (arrangementen.length <= 0) return;
|
||||||
|
|
||||||
|
Highcharts.chart('arrangementenII', {
|
||||||
|
chart: {
|
||||||
|
type: 'variablepie',
|
||||||
|
backgroundColor: '#d7d8d7',
|
||||||
|
plotBackgroundColor: '#d7d8d7',
|
||||||
|
animation: false,
|
||||||
|
height: 185
|
||||||
|
},
|
||||||
|
legend:{
|
||||||
|
enable: true,
|
||||||
|
margin: 0,
|
||||||
|
width: 175,
|
||||||
|
itemStyle: {
|
||||||
|
fontWeight: 'normal',
|
||||||
|
fontSize: 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
title:{
|
||||||
|
text:'',
|
||||||
|
marginTop: 0
|
||||||
|
},
|
||||||
|
credits: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
plotOptions: {
|
||||||
|
pie: {
|
||||||
|
allowPointSelect: false,
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series: [{
|
||||||
|
minPointSize: 10,
|
||||||
|
colorByPoint: true,
|
||||||
|
innerSize: '20%',
|
||||||
|
animation: false,
|
||||||
|
zMin: 0,
|
||||||
|
name: 'arrangementen',
|
||||||
|
data: arrangementen,
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
showInLegend: true
|
||||||
|
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}()
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
class Autorisatienivos extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Orgusers_model",
|
||||||
|
"shared/Autorisaties_model",
|
||||||
|
"shared/Autorisatienivos_model",
|
||||||
|
"shared/Organisaties_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getautorisaties(){
|
||||||
|
$userid = $this->userid;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
if (! $this->super || $this->userrole == 2){
|
||||||
|
$where= array("user_id"=> $userid, "organisatie_id"=>$orgid);
|
||||||
|
$orguserid = $this->Orgusers_model->get_fieldvalue($where, 'id');
|
||||||
|
$where=array("orguser_id" => $orguserid);
|
||||||
|
$userautid = $this->Autorisaties_model->get_fieldvalue($where,'nivo_id');
|
||||||
|
$where=array("id"=>$userautid);
|
||||||
|
$userhierarchie = $this->Autorisatienivos_model->get_fieldvalue($where, "hierarchie");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$userhierarchie = 1000;
|
||||||
|
}
|
||||||
|
$autnivos = $this->Autorisatienivos_model->getnivos($userhierarchie);
|
||||||
|
echo json_encode($autnivos);
|
||||||
|
}
|
||||||
|
public function getautorisatie(){
|
||||||
|
$autonivo = $this->Autorisatienivos_model->getusernivo($this->userid);
|
||||||
|
echo json_encode($autonivo);
|
||||||
|
}
|
||||||
|
public function getwriteautorisatie(){
|
||||||
|
// write autorisatie wordt alleen gegeven als
|
||||||
|
// org is eigen organisatie en rechten = management
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
if (!$orgid) {$orgid = $this->globorgid;};
|
||||||
|
|
||||||
|
$writeOK = false;
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 343 ) >0){
|
||||||
|
$writeOK = true;};
|
||||||
|
// check of user lid is van orgid
|
||||||
|
$userorg = $this->Orgusers_model->get_records_where(array('user_id' => $this->userid, 'organisatie_id' => $orgid),true);
|
||||||
|
if (!$userorg) {$writeOK = false ;};
|
||||||
|
// $userorg = $this->Organisaties_model->getuserorg($this->userid);
|
||||||
|
// if ($userorg->id != $orgid) {$writeOK = false;}
|
||||||
|
// super en helpdesk altijd schrijfrecht
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 3) == 1){
|
||||||
|
$writeOK = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode($writeOK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Filefolders extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Filefolders_model",
|
||||||
|
"shared/Files_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Teksten_model",
|
||||||
|
"Phantom_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
|
||||||
|
$this->load->helper('string');
|
||||||
|
if (!$this->check_online_status() || ! $this->userid) {
|
||||||
|
echo json_encode(array('offline' => TRUE));
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getfolders(){
|
||||||
|
$modulenr = $this->uri->segment(4);
|
||||||
|
if (! $modulenr || $modulenr <=0) {
|
||||||
|
echo $this->json(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$orgID = $this->globorgid;
|
||||||
|
$folders = $this->Filefolders_model->get_folders($modulenr, $orgID);
|
||||||
|
if ($folders){
|
||||||
|
foreach($folders as $folder){
|
||||||
|
$folder->subfolders = $this->Filefolders_model->get_subfolders($folder);
|
||||||
|
$folder->files= $this->Files_model->get_files($folder->id);
|
||||||
|
}
|
||||||
|
}// if folders
|
||||||
|
$this->json($folders);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function maakStandaardFolders(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
|
||||||
|
$modulenr = $this->clean_input('modulenr');
|
||||||
|
$orgID = $this->globorgid;
|
||||||
|
$folders = false;
|
||||||
|
|
||||||
|
$org = $this->Organisaties_model->get(['id'=>$orgID], false,true);
|
||||||
|
if ($org->id != $org->valtonder_id) $targetOrgID = $this->Organisaties_model->getkamer($org->id);
|
||||||
|
else $targetOrgID = $org->id;
|
||||||
|
|
||||||
|
$cats = $this->Orgversies_model->getversiecats($targetOrgID,$modulenr);
|
||||||
|
if (! $cats) {
|
||||||
|
$org = $this->Organisaties_model->get(['id'=> $targetOrgID],false, true);
|
||||||
|
$cats = $this->Orgversies_model->getversiecats($org->valtonder_id, $modulenr);
|
||||||
|
}
|
||||||
|
if ($cats){
|
||||||
|
foreach($cats as $cat){
|
||||||
|
$folder =
|
||||||
|
$this->Filefolders_model->get_folder_by_cat($orgID, $cat->nummer, $cat->omschrijving, $modulenr);
|
||||||
|
if (! $folder){
|
||||||
|
$data=[ 'modulenr' =>$modulenr,
|
||||||
|
'organisatie_id' => $orgID,
|
||||||
|
'naam' => $cat->omschrijving,
|
||||||
|
'instrumentcat' =>$cat->nummer];
|
||||||
|
$newID = $this->Filefolders_model->insert_record($data);
|
||||||
|
$this->Filefolders_model->update_record( array('valtonder'=>$newID) , $newID);
|
||||||
|
$folders[] = $this->Filefolders_model->get_folder($newID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->json($folders);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function maakTopFolder(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
$nummer = $this->clean_input('nummer');
|
||||||
|
$naam = stripslashes($this->clean_input('naam'));
|
||||||
|
$modulenr = $this->clean_input('modulenr');
|
||||||
|
|
||||||
|
|
||||||
|
$data = ['modulenr' => $modulenr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'nummer' => $nummer,
|
||||||
|
'naam' => $naam];
|
||||||
|
|
||||||
|
$newID = $this->Filefolders_model->insert_record($data);
|
||||||
|
$this->Filefolders_model->update_record( array('valtonder'=>$newID), $newID);
|
||||||
|
$folder = $this->Filefolders_model->get_folder($newID);
|
||||||
|
$this->json($folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function maakSubFolder(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
|
||||||
|
$nummer = $this->clean_input('nummer');
|
||||||
|
$naam = stripslashes($this->clean_input('naam'));
|
||||||
|
$modulenr = $this->clean_input('modulenr');
|
||||||
|
$folderID = $this->clean_input('folderID');
|
||||||
|
|
||||||
|
$data=[ 'modulenr' =>$modulenr,
|
||||||
|
'organisatie_id' => $this->globorgid,
|
||||||
|
'nummer' => $nummer,
|
||||||
|
'naam' => $naam,
|
||||||
|
'valtonder' => $folderID];
|
||||||
|
$newID = $this->Filefolders_model->insert_record($data);
|
||||||
|
$folder = $this->Filefolders_model->get_folder($newID);
|
||||||
|
$this->json($folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function editFolder(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
|
||||||
|
$id = $this->clean_input("folderID");
|
||||||
|
$naam = $this->input->post("naam");
|
||||||
|
$nummer = $this->input->post("nummer");
|
||||||
|
$this->Filefolders_model->update_record(['nummer'=> $nummer,'naam'=>$naam], $id);
|
||||||
|
$folder = $this->Filefolders_model->get_folder($id);
|
||||||
|
$this->json($folder->id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getafwijkendetekst(){
|
||||||
|
$modulenr = $this->clean_input('modulenr');
|
||||||
|
$paginanaam = $this->clean_input('paginanaam');
|
||||||
|
$afwijkend = $this->Teksten_model->gettekst($modulenr, $paginanaam);
|
||||||
|
|
||||||
|
echo json_encode($afwijkend);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteFolder(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
|
||||||
|
$folderID = $this->uri->segment(4);
|
||||||
|
//TODO check of er geen files of subfolders zijn
|
||||||
|
if ($this->Files_model->get(['folder_id'=>$folderID],false,false) ) return;
|
||||||
|
|
||||||
|
|
||||||
|
$this->Filefolders_model->delete_record($folderID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteFile(){
|
||||||
|
//check op eigenar
|
||||||
|
$fileID = $this->uri->segment(4);
|
||||||
|
if (! $this->magDelete($fileID) ) return;
|
||||||
|
$bestand = $this->Files_model->get(['id'=>$fileID], false, true);
|
||||||
|
$this->load->helper('file');
|
||||||
|
unlink('../dossier/'.$bestand->new_name);
|
||||||
|
unlink('../pdfdossier/'.$bestand->new_name);
|
||||||
|
$this->Files_model->delete_record($fileID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function saveFileNaam(){
|
||||||
|
//CHECK MANAGER RIGHT
|
||||||
|
if (! $this->isManager() ) return;
|
||||||
|
|
||||||
|
$id = $this->clean_input("id");
|
||||||
|
$naam = $this->input->post("naam");
|
||||||
|
$this->Files_model->update_record(['original_name'=>$naam], $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFiles(){
|
||||||
|
//TODO check toegang
|
||||||
|
$folderID = $this->clean_input("folderID");
|
||||||
|
$files = $this->Files_model->get_files($folderID);
|
||||||
|
$this->json($files);
|
||||||
|
}
|
||||||
|
public function zoekFile(){
|
||||||
|
$modulenr = $this->clean_input("modulenr");
|
||||||
|
$zoekterm = strip_slashes($this->clean_input("zoekfile"));
|
||||||
|
$files= $this->Files_model->zoek_files($zoekterm, $this->globorgid);
|
||||||
|
$this->json($files);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAuth(){
|
||||||
|
$aut = $this->Autorisaties_model->check_autorisatie($this->userrole, 343);
|
||||||
|
$this->json($aut);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isManager(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, 343) == 0 ) return false;
|
||||||
|
else return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function magDelete($fileid){
|
||||||
|
$owner = $this->Files_model->get(['id'=>$fileid],owner,true);
|
||||||
|
if ($owner == $this->userid) return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
public function maakpdf(){
|
||||||
|
//TODO check toegang
|
||||||
|
$module = $this->uri->segment(4);
|
||||||
|
$modulenaam = $this->Modules_model->get(['sysnr'=>$module], 'naam',true);
|
||||||
|
$organisatie = $this->Organisaties_model->getOrganisatie($this->globorgid);
|
||||||
|
$folders = $this->Filefolders_model->get_folders($module, $this->globorgid);
|
||||||
|
if ($folders){
|
||||||
|
foreach($folders as $folder){
|
||||||
|
$folder->subfolders = $this->Filefolders_model->get_subfolders($folder);
|
||||||
|
$folder->files = $this->Files_model->get_files($folder->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$lijst = ['folders' => $folders,
|
||||||
|
'organisatie' => $organisatie,
|
||||||
|
'today' => date('d-m-Y'),
|
||||||
|
'modulenaam' => $modulenaam,
|
||||||
|
'baseURL' =>base_url()];
|
||||||
|
$html = $this->load->view( 'monpas/reports/filefolders', $lijst, true);
|
||||||
|
$this->Phantom_model->create_pdf( $html, 'filefolders', FALSE, FALSE, [] );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Functies extends MY_Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Functies_model",
|
||||||
|
"shared/Functies_modules_model",
|
||||||
|
"monpas/Modules_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if (!$this->check_online_status()) {
|
||||||
|
echo json_encode(array('offline' => TRUE));
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getModules()
|
||||||
|
{
|
||||||
|
$modules = $this->Modules_model->getallmodules();
|
||||||
|
if ($modules) {
|
||||||
|
echo json_encode($modules);
|
||||||
|
} else {
|
||||||
|
echo false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getFuncties()
|
||||||
|
{
|
||||||
|
$moduleid = $this->uri->segment(4);
|
||||||
|
$functies = $this->Functies_model->getFuncties();
|
||||||
|
$functiesmodule = $this->Functies_model->getFunctiesBijModule($moduleid);
|
||||||
|
|
||||||
|
if ($functies) {
|
||||||
|
foreach ($functies as $functie) {
|
||||||
|
$functie->doelgroep = 'F';
|
||||||
|
if ($functiesmodule) {
|
||||||
|
foreach ($functiesmodule as $gekoppeld) {
|
||||||
|
if ($functie->functie_id == $gekoppeld->functie_id) {//vergelijkt de functie_ids van de functies met de functies die bij de module hooren
|
||||||
|
$functie->doelgroep = 'T'; //indien hetzelfde: doelgroep = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($functies && sizeof($functies > 1)) {
|
||||||
|
$test = (array)$functies;
|
||||||
|
usort($test, array($this, 'opDoelgroep'));
|
||||||
|
}
|
||||||
|
echo json_encode($test);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function newModuleFunctieKoppeling(){
|
||||||
|
$moduleid = $this->clean_input("moduleid");
|
||||||
|
$functieid = $this->clean_input("functieid");
|
||||||
|
|
||||||
|
if($moduleid && $functieid) {
|
||||||
|
$data = array(
|
||||||
|
'module_id' => $moduleid,
|
||||||
|
'functie_id' => $functieid
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->Functies_modules_model->save_record($data, false);
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteModuleFunctieKoppeling(){
|
||||||
|
$moduleid = $this->clean_input("moduleid");
|
||||||
|
$functieid = $this->clean_input("functieid");
|
||||||
|
|
||||||
|
if($moduleid && $functieid) {
|
||||||
|
$where = array(
|
||||||
|
'module_id' => $moduleid,
|
||||||
|
'functie_id' => $functieid
|
||||||
|
);
|
||||||
|
$this->Functies_modules_model->delete_record_where($where);
|
||||||
|
echo json_encode('ok');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo json_encode(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function opDoelgroep($a, $b)
|
||||||
|
{
|
||||||
|
return strcmp($b->doelgroep, $a->doelgroep);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
class Menu extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
"monpas/Menus_model",
|
||||||
|
"monpas/Modules_model",
|
||||||
|
"monpas/Documenten_model",
|
||||||
|
"shared/Licenties_model",
|
||||||
|
"ijkpartituur/pages_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_menu(){
|
||||||
|
|
||||||
|
$menu = new stdClass;
|
||||||
|
$user = new stdClass;
|
||||||
|
$organisatie = new stdClass;
|
||||||
|
$module = $this->session->userdata['module'];
|
||||||
|
$modulenaam = '';
|
||||||
|
if ($module >=0){
|
||||||
|
|
||||||
|
if (0 == $module) {$modulenaam = "Instrumenten";}
|
||||||
|
else {$modulenaam= $this->Modules_model->get_fieldvalue(array("sysnr" => $module), 'naamkort'); }
|
||||||
|
|
||||||
|
|
||||||
|
$menu = $this->Menus_model->getmenu($module,$this->userrole);
|
||||||
|
foreach($menu as $menuitem){
|
||||||
|
if($menuitem->holdernaam == "sophoofd"){
|
||||||
|
$menuitem->subpaginas = $this->Menus_model->getsubmenus($menuitem->id, $this->userrole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$licenties = null;
|
||||||
|
$licenties = $this->Licenties_model->get_licentie($this->orgid);
|
||||||
|
// als licenties voor 1 module, disable de portal knop
|
||||||
|
if ($licenties && $menu && (count($licenties) <= 1)) {
|
||||||
|
$i = 0;
|
||||||
|
$target = -1;
|
||||||
|
foreach($menu as $item){
|
||||||
|
if ($item->naam == "stop") $target = $i;
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
|
if ($target > -1) unset($menu[$target]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = $this->Users_model->get_fullname($this->userid);
|
||||||
|
$organisatie = $this->Organisaties_model->get_orgnaam($this->globorgid);
|
||||||
|
}
|
||||||
|
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($this->globorgid);
|
||||||
|
if ($org){
|
||||||
|
foreach ($menu as $menuitem){
|
||||||
|
if (strtoupper($menuitem->naam) == "sophoofd"){
|
||||||
|
switch ($org->soort){
|
||||||
|
case 1: $menuitem->naam = "SWOP"; break;
|
||||||
|
case 2: $menuitem->naam = "KOP" ; break;
|
||||||
|
case 3: $menuitem->naam ="BOP"; break;
|
||||||
|
default: $menuitem->naam = "SOP";
|
||||||
|
};//switch
|
||||||
|
}; //if
|
||||||
|
}; // foreach
|
||||||
|
}; //if organisatie
|
||||||
|
|
||||||
|
echo json_encode(array( 'module' =>$module,
|
||||||
|
'modulenaam' => $modulenaam,
|
||||||
|
'menu' =>$menu,
|
||||||
|
'user' => $user,
|
||||||
|
'organisatie' => $organisatie));
|
||||||
|
}
|
||||||
|
function gethandleidingen(){
|
||||||
|
$handleidingen = $this->Documenten_model->gethandleidingen($this->globorgid, $this->userrole);
|
||||||
|
echo json_encode($handleidingen);
|
||||||
|
}
|
||||||
|
function downloadhandleiding(){
|
||||||
|
if( ! $this->userid ) return;
|
||||||
|
$handleidingid = $this->uri->segment(4);
|
||||||
|
$handleiding = $this->Documenten_model->get_record_by_id($handleidingid);
|
||||||
|
|
||||||
|
$this->load->helper('download');
|
||||||
|
// $data = file_get_contents($this->rootpath ."/documents/".$handleiding->documentnaam);
|
||||||
|
$data = file_get_contents("/home/mps/prod/documents/".$handleiding->documentnaam);//TW: rootpath is verkeerd door symlink
|
||||||
|
force_download($handleiding->documentnaam, $data);
|
||||||
|
}
|
||||||
|
function getsubmenu(){
|
||||||
|
//TODO clean input
|
||||||
|
$pageid = $this->uri->segment(4);
|
||||||
|
$submenus = $this->Menus_model->getsubmenus($pageid, $this->userrole);
|
||||||
|
echo json_encode($submenus);
|
||||||
|
}
|
||||||
|
function getmodule(){
|
||||||
|
echo json_encode($this->module);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function scriptSetModules(){
|
||||||
|
// $organisaties = $this->Organisaties_model->getall();
|
||||||
|
// foreach($organisaties as $organisatie){
|
||||||
|
// if ($organisatie->monbas == 1){
|
||||||
|
// $data=array('orgid' =>$organisatie->id, 'modulenr'=>1);
|
||||||
|
// $this->Licenties_model->insert_record($data);
|
||||||
|
// }
|
||||||
|
// if ($organisatie->mondiv == 1){
|
||||||
|
// $data=array('orgid' =>$organisatie->id, 'modulenr'=>2);
|
||||||
|
// $this->Licenties_model->insert_record($data);
|
||||||
|
// }
|
||||||
|
// }; // foreach
|
||||||
|
// echo 'klaar';
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,485 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Organisaties extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
if ($this->nologin) return;
|
||||||
|
$models = array("monpas/Modules_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
'shared/Orgusers_model',
|
||||||
|
"shared/Users_model",
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Filledversions_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Ambities_model",
|
||||||
|
"shared/Licenties_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function getorgsperlevel(){
|
||||||
|
$soort = $this->uri->segment(4);
|
||||||
|
$toporgid = $this->input->post("toporgid");
|
||||||
|
$orgs = $this->Organisaties_model->getorgsdetails($soort,$toporgid);
|
||||||
|
echo json_encode($orgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getallowedorgs(){
|
||||||
|
$orgs =null;
|
||||||
|
if ($this->super || $this->userrole == 2){
|
||||||
|
$orgs = $this->Organisaties_model->getallorgs();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$orgs = $this->Organisaties_model->getuserorgs($this->userid);
|
||||||
|
if (count($orgs) == 1) $orgs = null; // als er maar 1 organisatie is , kan de gebruiker niet switchen
|
||||||
|
}
|
||||||
|
echo json_encode($orgs);
|
||||||
|
}
|
||||||
|
function setgloborg(){
|
||||||
|
//TODO sanitize input
|
||||||
|
$newOrgid = $this->uri->segment(4);
|
||||||
|
$userrole = $this->Orgusers_model->getuserrole($this->userid, $newOrgid);
|
||||||
|
|
||||||
|
if ($this->super || $this->userrole ==2){
|
||||||
|
$this->Session_model->set_globorgid($newOrgid);
|
||||||
|
$module = $this->session->userdata('module');
|
||||||
|
$allowed = $this->Licenties_model->get_records_where(array("orgid"=> $newOrgid, "modulenr"=>$module));
|
||||||
|
if(!$allowed){
|
||||||
|
$this->Session_model->set_module(0);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// set nu ook de rol van de user in de geselecteerde organisatie;
|
||||||
|
else {
|
||||||
|
if ($userrole) {
|
||||||
|
$this->Session_model->set_orgid($newOrgid);
|
||||||
|
$this->Session_model->set_globorgid($newOrgid);
|
||||||
|
$this->Session_model->set_role($userrole->nivo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array("basepath"=>base_url()));
|
||||||
|
}
|
||||||
|
function insertorganisatie(){
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER) > 0) {
|
||||||
|
$errortekst = '';
|
||||||
|
$neworg = null;
|
||||||
|
$nummer = $this->input->post("nummer");
|
||||||
|
if ($this->Organisaties_model->check_for_record(array("brin"=>$nummer))) {
|
||||||
|
$errortekst= "Nummer bestaat al.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$data=array( "soort" =>$this->input->post("soort"),
|
||||||
|
"brin" =>$this->input->post("nummer"),
|
||||||
|
"naamkort" =>$this->input->post("naamkort"),
|
||||||
|
"naam" =>$this->input->post("naam"),
|
||||||
|
"plaats" =>$this->input->post("plaats"),
|
||||||
|
"valtonder_id" =>$this->input->post("valtonder"),
|
||||||
|
"actief" =>1,
|
||||||
|
);
|
||||||
|
$newid = $this->Organisaties_model->insert_record($data);
|
||||||
|
$licenties = $this->input->post('licenties');
|
||||||
|
if ($licenties){
|
||||||
|
foreach($licenties as $licentie){
|
||||||
|
$this->Licenties_model->insert_record(array("orgid"=>$newid, "modulenr"=>$licentie));
|
||||||
|
}
|
||||||
|
}; //if
|
||||||
|
if ($this->input->post("soort") == 1){
|
||||||
|
$this->Organisaties_model->update_record(array("valtonder_id"=>$newid), $newid);
|
||||||
|
}
|
||||||
|
$neworg = $this->Organisaties_model->getorgdetails($newid);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else { $errortekst = "u bent niet geautoriseerd tot deze handeling" ;
|
||||||
|
$neworg = false;}; // als geen superuser
|
||||||
|
echo json_encode(array("errortekst" => $errortekst, "org" =>$neworg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteorg(){
|
||||||
|
//TODO clean input
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER) > 0) {
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$errortekst = '';
|
||||||
|
|
||||||
|
if ($this->Orgusers_model->check_for_record(array("organisatie_id" =>$orgid)) ){
|
||||||
|
$errortekst = "Er zijn gebruikers gekoppeld aan deze organisatie.</br>";
|
||||||
|
}
|
||||||
|
if ($this->Organisaties_model->hasdependent($orgid) ) {
|
||||||
|
$errortekst .= " Er zijn afhankelijke organisaties. </br>" ;
|
||||||
|
}
|
||||||
|
//ambities, filled versions, orgversies,scores, licenties
|
||||||
|
if ($errortekst == ''){
|
||||||
|
$filledversions = $this->Filledversions_model->get_records_where(array("organisatie_id" =>$orgid));
|
||||||
|
if ($filledversions){
|
||||||
|
foreach($filledversions as $fv){
|
||||||
|
$this->Scores_model->delete_record_where(array("filledversion_id"=>$fv->id));
|
||||||
|
$this->Filledversions_model->delete_record($fv->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->Ambities_model->delete_record_where(array("organisatie_id"=>$orgid));
|
||||||
|
$this->Orgversies_model->delete_record_where(array("organisatie_id" =>$orgid));
|
||||||
|
$this->Licenties_model->delete_record_where(array("orgid" =>$orgid));
|
||||||
|
$this->Organisaties_model->delete_record($orgid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$errortekst = "U bent niet geautoriseerd voor deze handeling.";};
|
||||||
|
echo json_encode($errortekst);
|
||||||
|
}
|
||||||
|
function update(){
|
||||||
|
//TODO clean input
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER) > 0) {
|
||||||
|
$orgid =$this->input->post("id");
|
||||||
|
$errortekst = '';
|
||||||
|
$nummer = $this->input->post("nummer");
|
||||||
|
if ($this->Organisaties_model->check_for_record(array("brin"=>$nummer,
|
||||||
|
"id <> " =>$orgid))) {
|
||||||
|
$errortekst= "Nummer bestaat al.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$actief = 1;
|
||||||
|
if ($this->input->post("actief")=="false") $actief = 0;
|
||||||
|
// $monbas=1;
|
||||||
|
// if ($this->input->post("monbas")=="false") $monbas = 0;
|
||||||
|
// $mondiv = 1;
|
||||||
|
// if ($this->input->post("mondiv")=="false") $mondiv = 0;
|
||||||
|
|
||||||
|
$data=array( "brin" =>$this->input->post("nummer"),
|
||||||
|
"naamkort" =>$this->input->post("naamkort"),
|
||||||
|
"naam" =>$this->input->post("naam"),
|
||||||
|
"plaats" =>$this->input->post("plaats"),
|
||||||
|
"actief" =>$actief,
|
||||||
|
// "monbas" =>$monbas,
|
||||||
|
// "mondiv" =>$mondiv
|
||||||
|
);
|
||||||
|
$this->Organisaties_model->update_record($data,$orgid);
|
||||||
|
$this->Licenties_model->delete_record_where(array("orgid"=>$orgid));
|
||||||
|
$licenties = $this->input->post("licenties");
|
||||||
|
if ($licenties){
|
||||||
|
foreach ($licenties as $licentie){
|
||||||
|
$this->Licenties_model->insert_record(array("orgid"=>$orgid, "modulenr"=>$licentie));
|
||||||
|
}; // foreach
|
||||||
|
}; // if licenties
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {$errortekst = " U bent niet geautoriseerd voor deze handeling.";};
|
||||||
|
echo json_encode($errortekst);
|
||||||
|
}
|
||||||
|
function zoek(){
|
||||||
|
//TODO clean input
|
||||||
|
$errortekst="";
|
||||||
|
$zoekstr = $this->input->post("zoekstring");
|
||||||
|
$results = $this->Organisaties_model->zoekorgs($zoekstr);
|
||||||
|
if (!$results){$errortekst = "Geen resultaten gevonden";};
|
||||||
|
if (count($results) > 150) {
|
||||||
|
$errortekst ="Teveel overeenkomende gegevens gevonden. Maak uw zoekcriteria specifieker.";
|
||||||
|
$results = '';}
|
||||||
|
echo json_encode(array("results"=>$results, "errortekst" =>$errortekst));
|
||||||
|
}
|
||||||
|
function getselected(){
|
||||||
|
//TODO clean input
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$swvid = null;
|
||||||
|
$kamerid = null;
|
||||||
|
$bgid = null;
|
||||||
|
$schoolid = null;
|
||||||
|
$swvs = null;
|
||||||
|
$kamers = null;
|
||||||
|
$bgs = null;
|
||||||
|
$scholen = null;
|
||||||
|
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
|
||||||
|
if ($organisatie->soort == 1){
|
||||||
|
$swvid = $orgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($organisatie->soort == 2){
|
||||||
|
$swvid = $organisatie->valtonder_id;
|
||||||
|
$kamerid = $orgid;
|
||||||
|
}; // if soort =2
|
||||||
|
|
||||||
|
if ($organisatie->soort == 3){
|
||||||
|
$bgid = $organisatie->id;
|
||||||
|
$kamerid = $organisatie->valtonder_id;
|
||||||
|
$kamerorg = $this->Organisaties_model->get_record_by_id($kamerid);
|
||||||
|
$swvid = $kamerorg->valtonder_id;
|
||||||
|
}; // if soort = 3
|
||||||
|
|
||||||
|
if ($organisatie->soort == 4){
|
||||||
|
$schoolid = $orgid;
|
||||||
|
$bgid = $organisatie->valtonder_id;
|
||||||
|
$orgbg = $this->Organisaties_model->get_record_by_id($bgid);
|
||||||
|
$kamerid = $orgbg->valtonder_id;
|
||||||
|
$orgkamer = $this->Organisaties_model->get_record_by_id($kamerid);
|
||||||
|
$swvid = $orgkamer->valtonder_id;
|
||||||
|
}; // if soort = 4
|
||||||
|
|
||||||
|
$swvs=$this->Organisaties_model->getorgsdetails(1, false);
|
||||||
|
foreach ($swvs as $swv) {
|
||||||
|
if ($swv->id == $swvid){
|
||||||
|
$kamers = $this->Organisaties_model->getorgsdetails(2,$swvid);
|
||||||
|
if ($kamers){
|
||||||
|
if (!$kamerid) {$kamerid = $kamers[0]->id; };
|
||||||
|
foreach ($kamers as $kamer){
|
||||||
|
if ($kamer->id == $kamerid){
|
||||||
|
$bgs = $this->Organisaties_model->getorgsdetails(3, $kamerid);
|
||||||
|
if ($bgs){
|
||||||
|
if (!$bgid){$bgid = $bgs[0]->id;};
|
||||||
|
foreach ($bgs as $bg){
|
||||||
|
if ($bg->id == $bgid){
|
||||||
|
$scholen = $this->Organisaties_model->getorgsdetails(4,$bgid);
|
||||||
|
}
|
||||||
|
};// foreach bg
|
||||||
|
}; // if bgs
|
||||||
|
}; // if kamerid = kamerid
|
||||||
|
}; // foreach kamers
|
||||||
|
}; // if kamers
|
||||||
|
}; // if swvid
|
||||||
|
} ; // foreach swv
|
||||||
|
echo json_encode(array('swvid' =>$swvid,
|
||||||
|
'kamerid' =>$kamerid,
|
||||||
|
'bgid' =>$bgid,
|
||||||
|
'schoolid' =>$schoolid,
|
||||||
|
'swvs' =>$swvs,
|
||||||
|
'kamers' =>$kamers,
|
||||||
|
'bgs' =>$bgs,
|
||||||
|
'scholen' =>$scholen));
|
||||||
|
|
||||||
|
}
|
||||||
|
function getorgnivo(){
|
||||||
|
$nivo =$this->Organisaties_model->getsoortvanorginalorg($this->userid);
|
||||||
|
echo json_encode($nivo);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getscholenvoormenu(){
|
||||||
|
$modulenr = $this->uri->segment(4);
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$bgs=array();
|
||||||
|
$scholen=array();
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($org->soort == 1){
|
||||||
|
$kamers=$this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($kamers) {
|
||||||
|
foreach($kamers as $kamer){
|
||||||
|
$bg =$this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($bg){$bgs=array_merge($bgs,$bg); };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($bgs) {
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
if($modulenr == 270) {
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanafmetlicentie($bg->id, $modulenr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort ==1
|
||||||
|
if ($org->soort ==2){
|
||||||
|
$bgs = $this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($bgs){
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
if($modulenr == 270) {
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanafmetlicentie($bg->id, $modulenr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
}; // if schl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort =2
|
||||||
|
if ($org->soort ==3 ){
|
||||||
|
if($modulenr == 270) {
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanafmetlicentie($orgid, $modulenr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($org->soort == 4){
|
||||||
|
$scholen[]= $org;
|
||||||
|
}
|
||||||
|
$school = true;
|
||||||
|
if ($org->soort != 4) $school=false;
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode(array('scholen'=>$scholen, 'school'=>$school));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getscholen(){
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$bgs=array();
|
||||||
|
$scholen=array();
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($org->soort == 1){
|
||||||
|
$kamers=$this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($kamers) {
|
||||||
|
foreach($kamers as $kamer){
|
||||||
|
$bg =$this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($bg){$bgs=array_merge($bgs,$bg); };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($bgs) {
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort ==1
|
||||||
|
if ($org->soort ==2){
|
||||||
|
$bgs = $this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($bgs){
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
}; // if schl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort =2
|
||||||
|
if ($org->soort ==3 ){
|
||||||
|
$scholen = $this->Organisaties_model->getorgsvanaf($org->id);
|
||||||
|
}
|
||||||
|
if ($org->soort == 4){
|
||||||
|
$scholen[]= $org;
|
||||||
|
}
|
||||||
|
$school = true;
|
||||||
|
if ($org->soort != 4) $school=false;
|
||||||
|
echo json_encode(array('scholen'=>$scholen, 'school'=>$school));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsoscholen(){
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$bgs=array();
|
||||||
|
$scholen=array();
|
||||||
|
$instrument = 270;
|
||||||
|
$org = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($org->soort == 1){
|
||||||
|
$kamers=$this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($kamers) {
|
||||||
|
foreach($kamers as $kamer){
|
||||||
|
$bg =$this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($bg){$bgs=array_merge($bgs,$bg); };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($bgs) {
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanafmetlicentie($bg->id, $instrument);
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort ==1
|
||||||
|
if ($org->soort ==2){
|
||||||
|
$bgs = $this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($bgs){
|
||||||
|
foreach($bgs as $bg){
|
||||||
|
$schl = $this->Organisaties_model->getorgsvanafmetlicentie($bg->id, $instrument);
|
||||||
|
if ($schl){
|
||||||
|
$scholen=array_merge($scholen, $schl);
|
||||||
|
}; // if schl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}; // if orgsoort =2
|
||||||
|
if ($org->soort ==3 ){
|
||||||
|
$scholen = $this->Organisaties_model->getorgsvanafmetlicentie($org->id, $instrument);
|
||||||
|
}
|
||||||
|
if ($org->soort == 4){
|
||||||
|
$scholen[]= $org;
|
||||||
|
}
|
||||||
|
$school = true;
|
||||||
|
if ($org->soort != 4) $school=false;
|
||||||
|
|
||||||
|
|
||||||
|
echo json_encode(array('soscholen'=>$scholen, 'school'=>$school));
|
||||||
|
}
|
||||||
|
|
||||||
|
function controleerschool(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$orgid = $this->globorgid;
|
||||||
|
$school = false;
|
||||||
|
$organisatie = $this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie && $organisatie->soort == 4) $school = true;
|
||||||
|
echo json_encode($school);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getselectedschool(){
|
||||||
|
echo json_encode($this->selectedschool);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getmodules(){
|
||||||
|
$orgid = $this->uri->segment(4); // als 0 dan nieuwe organisatie
|
||||||
|
$modules = $this->Modules_model->getallmodules();
|
||||||
|
if ($modules){
|
||||||
|
foreach($modules as $module){
|
||||||
|
$module->janee =$this->Licenties_model->getmodulelicentie($orgid, $module->sysnr);
|
||||||
|
}
|
||||||
|
}; // if modules
|
||||||
|
echo json_encode($modules);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRandomName(){
|
||||||
|
$this->load->helper('string');
|
||||||
|
return random_string("alnum", 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteOldBijlage($orgID){
|
||||||
|
$oldBijlage = $this->Organisaties_model->get(['id'=>$orgID],'randomname', true);
|
||||||
|
if ($oldBijlage) unlink('./../docs/'.$oldBijlage);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setNieuweBijlage($orgID, $randomname, $filename){
|
||||||
|
$this->Organisaties_model->update_record(['randomname'=>$randomname, 'bijlagefile'=>$filename], $orgID);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveBijlageFile(){
|
||||||
|
$randomname = $this->getRandomName();
|
||||||
|
|
||||||
|
$config['upload_path'] = './../docs/';
|
||||||
|
$config['allowed_types'] = '*';
|
||||||
|
$config['max_size'] = 10000;
|
||||||
|
$config['file_name'] = $randomname;
|
||||||
|
|
||||||
|
$this->load->library('upload', $config);
|
||||||
|
|
||||||
|
$orgID = $_POST['orgID'];
|
||||||
|
$filename = $_FILES['file']['name'];
|
||||||
|
|
||||||
|
|
||||||
|
if ( ! $this->upload->do_upload('file')) $error = $this->upload->display_errors();
|
||||||
|
else {
|
||||||
|
$error = FALSE;
|
||||||
|
$randomname = $this->upload->data('file_name')['file_name'];
|
||||||
|
$this->deleteOldBijlage($orgID);
|
||||||
|
$this->setNieuweBijlage($orgID, $randomname, $filename);
|
||||||
|
}
|
||||||
|
$this->json($error);
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteBijlage(){
|
||||||
|
// nog een controle op autorisatie?
|
||||||
|
if ( $this->Autorisaties_model->check_autorisatie($this->userrole, 1) <= 0 ) return;
|
||||||
|
$orgID = $this->clean_input('orgID');
|
||||||
|
$this->deleteOldBijlage($orgID);
|
||||||
|
$this->Organisaties_model->update_record(['bijlagefile'=>NULL, 'randomname'=>NULL],$orgID);
|
||||||
|
}
|
||||||
|
} // controller
|
||||||
@@ -0,0 +1,287 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Portal extends MY_Controller {
|
||||||
|
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Session_model",
|
||||||
|
"shared/Licenties_model",
|
||||||
|
"shared/Organisaties_model",
|
||||||
|
"shared/Users_model",
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"shared/Functies_model",
|
||||||
|
"monpas/Home_model",
|
||||||
|
"monpas/Orgversies_model",
|
||||||
|
"monpas/Scores_model",
|
||||||
|
"monpas/Labels_model",
|
||||||
|
"monpas/Modules_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->library('monpas/kleurcodes');
|
||||||
|
$this->load->helper('string');
|
||||||
|
if (!$this->check_online_status()) {
|
||||||
|
echo json_encode(array('offline' => TRUE));
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
|
||||||
|
function naarmodule() {
|
||||||
|
if ($this->nologin) return;
|
||||||
|
$module = $this->uri->segment(4);
|
||||||
|
$this->Session_model->set_module($module);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getlicenties() {
|
||||||
|
$ongeclusterdId = 0;
|
||||||
|
$isCluster = 'F';
|
||||||
|
$ongeclusterd = $this->Licenties_model->get_ongeclusterd($this->globorgid, $ongeclusterdId);
|
||||||
|
if ($ongeclusterd){
|
||||||
|
foreach ($ongeclusterd as $bolletje) {
|
||||||
|
$bolletje->isCluster = $isCluster;//geen knop om het cluster te openen en te sluiten
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ongeclusterd = [];
|
||||||
|
};
|
||||||
|
$isCluster = 'T';
|
||||||
|
$clusters = $this->Licenties_model->get_clusters_org($this->globorgid);
|
||||||
|
if($clusters) {
|
||||||
|
$i = -1;
|
||||||
|
foreach ($clusters as $cluster) {
|
||||||
|
$i ++;
|
||||||
|
if ($cluster->aantalmodules == 1) {
|
||||||
|
$cluster->isCluster = "F";
|
||||||
|
$newitem = $this->Licenties_model->get_ongeclusterd($this->globorgid, $cluster->id);
|
||||||
|
$ongeclusterd = array_merge($ongeclusterd, $newitem);
|
||||||
|
unset($clusters[$i]);
|
||||||
|
} else {
|
||||||
|
$cluster->isCluster = $isCluster; //ivm knop om het cluster te openen en te sluiten
|
||||||
|
$cluster->sub = $this->Licenties_model->get_licentie_cluster($this->globorgid, $cluster->id);//instrumenten bij het cluster
|
||||||
|
$cluster->cluster_id = $cluster->id; //zodat cluster en instrument eenzelfde attribuut hebben
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}; // if $clusters
|
||||||
|
|
||||||
|
if (! $ongeclusterd){
|
||||||
|
$ongeclusterd = [];
|
||||||
|
};
|
||||||
|
if(!$clusters){
|
||||||
|
$clusters = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
$licenties = array_merge($ongeclusterd, $clusters);
|
||||||
|
usort($licenties, array($this, 'opAlfabet'));//bollen op alfbetische volgorde
|
||||||
|
|
||||||
|
echo json_encode($licenties);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haalt individuele instrumenten op voor orgusers met een bij het instrument horende functie.
|
||||||
|
* Voor export naar monPon
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getBollenMonPon()
|
||||||
|
{
|
||||||
|
$portalorg = 5;
|
||||||
|
$portaluser = 6;
|
||||||
|
$orgid = $this->Organisaties_model->get_fieldvalue(array('portal_id'=>$portalorg),"id");
|
||||||
|
$userid = $this->Users_model->get_fieldvalue(array('portal_id'=>$portaluser),"id");
|
||||||
|
|
||||||
|
$functiebollen = [];
|
||||||
|
$functiesuser = $this->Functies_model->getFunctiesOrguser($orgid, $userid);
|
||||||
|
|
||||||
|
if (!$functiesuser) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$bollen = $this->Modules_model->get_instrumenten_ind_org($orgid);
|
||||||
|
if (!$bollen) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($bollen as $bolletje) {
|
||||||
|
$functiesmod = $this->Functies_model->getFunctiesBijModule($bolletje->moduleid);
|
||||||
|
if ($functiesmod) {
|
||||||
|
|
||||||
|
foreach ($functiesmod as $mfunctie) {
|
||||||
|
foreach ($functiesuser as $userfunctie) {
|
||||||
|
if ($mfunctie->functie_id == $userfunctie->functieid) {
|
||||||
|
$bolletje->userid = $userfunctie->userid;
|
||||||
|
$bolletje->fullname = $userfunctie->fullname;
|
||||||
|
|
||||||
|
if (sizeof($functiebollen) < 1) {
|
||||||
|
array_push($functiebollen, $bolletje);
|
||||||
|
} else {
|
||||||
|
foreach ($functiebollen as $fbol) {
|
||||||
|
if ($fbol->moduleid != $bolletje->moduleid) {
|
||||||
|
array_push($functiebollen, $bolletje);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$functiebollen = array_map("unserialize", array_unique(array_map("serialize", $functiebollen)));//verwijdert dubbele instrumenten
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$bollendef = $this->getIngevuldeInstrumenten($userid, $orgid, $functiebollen);
|
||||||
|
echo json_encode($bollendef);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getAgendaMonPon(){
|
||||||
|
if (!$this->userid) die;
|
||||||
|
$filledversionid = $this->uri->segment(4);
|
||||||
|
$scores = null;
|
||||||
|
$gewenst = null;
|
||||||
|
// let op ja nee bezig wordt vertaald naar 10, 0 en 5
|
||||||
|
|
||||||
|
$scores = $this->Scores_model->calculateindividualMonPon($filledversionid);
|
||||||
|
|
||||||
|
// haal ook nog de criteria van de organisatie op
|
||||||
|
foreach($scores as $score){
|
||||||
|
$score->gem = 0;
|
||||||
|
if ($score->num > 0){
|
||||||
|
$score->gem = round($score->somscore / $score->num,1);
|
||||||
|
}
|
||||||
|
$score->huidig= $this->kleurcodes->getnummer($score->gem);
|
||||||
|
} ; // foreach scores
|
||||||
|
|
||||||
|
|
||||||
|
// $gewenst=$this->Scores_model->getgewenst($orgid, $orgversieid);
|
||||||
|
// if ($gewenst){
|
||||||
|
// $i =0;
|
||||||
|
// foreach($scores as $score){
|
||||||
|
// $score->gewenstid= $gewenst[$i]->id;
|
||||||
|
// $score->gewenst = $gewenst[$i]->wens;
|
||||||
|
// $i = $i + 1;
|
||||||
|
// }; //foreach
|
||||||
|
// }
|
||||||
|
echo json_encode(array('scores' =>$scores));
|
||||||
|
} // getscores
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function kiesCluster(){
|
||||||
|
$clusterId = $this->uri->segment(4);
|
||||||
|
|
||||||
|
$ongeclusterdId = 0;
|
||||||
|
$isCluster = 'F';
|
||||||
|
$wasniveau2 = 'F'; //hingen voor de keuze niet aan cluster
|
||||||
|
|
||||||
|
$ongeclusterd = $this->Licenties_model->get_ongeclusterd($this->globorgid, $ongeclusterdId);
|
||||||
|
//instrumenten die niet bij een cluster horen
|
||||||
|
if($ongeclusterd) {
|
||||||
|
foreach ($ongeclusterd as $bol) {
|
||||||
|
$bol->wasNiveau2 = $wasniveau2;
|
||||||
|
$bol->isCluster = $isCluster;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$isCluster = 'T';
|
||||||
|
$clusters = $this->Licenties_model->get_clusters_org($this->globorgid);
|
||||||
|
if($clusters) {
|
||||||
|
foreach ($clusters as $cluster) {
|
||||||
|
$cluster->wasNiveau2 = $wasniveau2;
|
||||||
|
$cluster->isCluster = $isCluster;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$isCluster = 'F';
|
||||||
|
$wasniveau2 = 'T';
|
||||||
|
$keuze = $this->Licenties_model->get_ongeclusterd($this->globorgid, $clusterId); //gekozen cluster van instrumenten
|
||||||
|
if($keuze) {
|
||||||
|
foreach ($keuze as $keus) {
|
||||||
|
$keus->wasNiveau2 = $wasniveau2;// waren bollen onde cluster nu niveau hoger
|
||||||
|
$keus->isCluster = $isCluster;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if($clusters) {
|
||||||
|
foreach ($clusters as $cluster) {
|
||||||
|
$cluster->cluster_id = $cluster->id;
|
||||||
|
if ($cluster->cluster_id != $clusterId) { //voeg instrumenten toe aan niet-gekozen clusters
|
||||||
|
$cluster->sub = $this->Licenties_model->get_licentie_cluster($this->globorgid, $cluster->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if(!$clusters){
|
||||||
|
$clusters =[];
|
||||||
|
};
|
||||||
|
if(!$ongeclusterd){
|
||||||
|
$ongeclusterd = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
$licenties = array_merge($ongeclusterd, $clusters);
|
||||||
|
usort($licenties, array($this, 'opAlfabet'));
|
||||||
|
usort($keuze, array($this, 'opAlfabet'));
|
||||||
|
$clusternaam = $this->Licenties_model->get_clusterNaam($clusterId);
|
||||||
|
|
||||||
|
$geselecteerd = $this->arrayinArray($licenties, $keuze, $clusterId, $clusternaam);
|
||||||
|
|
||||||
|
echo json_encode($geselecteerd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getmodule() {
|
||||||
|
$module = $this->session->userdata['module'];
|
||||||
|
$hometekst = $this->Home_model->get_fieldvalue(['modulenr' => $module], 'tekst');
|
||||||
|
echo json_encode(['module' => $module, 'hometekst' => $hometekst]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function arrayinArray($knipArray, $invoegArray, $var1, $var2) {
|
||||||
|
$lengte = count($knipArray);
|
||||||
|
$breekpunt = "";
|
||||||
|
$eindpunt = "";
|
||||||
|
|
||||||
|
for ($i = 0; $i < $lengte; $i++) {
|
||||||
|
if ($knipArray[$i]->id == $var1 && $knipArray[$i]->naam == $var2) {
|
||||||
|
$breekpunt = $i + 1; //array wordt geknipt na het cluster van de keuze
|
||||||
|
$eindpunt = $lengte - $breekpunt - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$licenties1 = array_slice($knipArray, 0, $breekpunt);
|
||||||
|
$licenties2 = array_slice($knipArray, $breekpunt + 1, $eindpunt);
|
||||||
|
$doelArray = array_merge($licenties1, $invoegArray, $licenties2); //array invoegen na breekpunt
|
||||||
|
|
||||||
|
}
|
||||||
|
return $doelArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function opAlfabet($a, $b)
|
||||||
|
{
|
||||||
|
return strcmp($a->naam, $b->naam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getIngevuldeInstrumenten($userid, $orgid, $bollen){
|
||||||
|
|
||||||
|
foreach ($bollen as $bolletje){
|
||||||
|
$versies = $this->Modules_model->get_instrumenten_ingevuld_ind($bolletje->moduleid, $userid, $orgid);
|
||||||
|
|
||||||
|
if($versies){
|
||||||
|
$bolletje->ingevuld = 'T';
|
||||||
|
$bolletje->versies = $versies;
|
||||||
|
$bolletje->label = $this->Labels_model->getLabel($bolletje->sysnr);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$bolletje->ingevuld = 'F';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $bollen;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Schooljaren extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
$models = array("shared/Users_model",'shared/Schooljaren_model');
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getschooljaren(){
|
||||||
|
$schooljaren = $this->Schooljaren_model->getschooljaren();
|
||||||
|
echo json_encode($schooljaren);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getselectedschooljaar(){
|
||||||
|
echo json_encode($this->schooljaar);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Pheanstalk\Pheanstalk;
|
||||||
|
|
||||||
|
class Upload extends MY_Controller {
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$models = array( "shared/Files_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
|
||||||
|
if (!$this->check_online_status()) {
|
||||||
|
echo json_encode(array('offline' => TRUE));
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
$this->load->helper("file");
|
||||||
|
}
|
||||||
|
|
||||||
|
function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
|
||||||
|
{
|
||||||
|
$str = '';
|
||||||
|
$max = mb_strlen($keyspace, '8bit') - 1;
|
||||||
|
|
||||||
|
for ($i = 0; $i < $length; ++$i) {
|
||||||
|
$str .= $keyspace[rand(0, $max)];
|
||||||
|
}
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function CheckFileExists($naam, $modulenr){
|
||||||
|
$exists = $this->Files_model->file_exists($naam, $modulenr, $this->globorgid);
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function doUpload()
|
||||||
|
{
|
||||||
|
$folder = $this->input->post('folderID');
|
||||||
|
$module = $this->input->post('module');
|
||||||
|
$oldDocID = $this->input->post('oldDocID');
|
||||||
|
|
||||||
|
|
||||||
|
$fn = '';
|
||||||
|
if (isset ($_FILES['upload_file'])){
|
||||||
|
$fn = $_FILES['upload_file'];
|
||||||
|
}
|
||||||
|
$this->sharedUpload($fn, $folder, $module,$oldDocID);
|
||||||
|
|
||||||
|
}
|
||||||
|
private function sharedUpload($fn, $folder, $module,$docID = false){
|
||||||
|
$newName = $this->random_str(12);
|
||||||
|
$fileExists = $this->CheckFileExists($fn['name'], $module);
|
||||||
|
// nog afvangen : file exists maar een doc id meegegeven: dan moet de file overschreven worden
|
||||||
|
$error ='';
|
||||||
|
if ($fn) {
|
||||||
|
$ext =end(explode('.', $fn['name']) );
|
||||||
|
if ($ext) $ext = '.'. $ext;
|
||||||
|
|
||||||
|
if ($fileExists) { $error=$fn['name'].": bestand is al geupload"; };
|
||||||
|
if ($error <=''){
|
||||||
|
if (move_uploaded_file( $fn['tmp_name'] , '../dossier/'.$newName ) ) {
|
||||||
|
|
||||||
|
$data = ['organisatie_id' =>$this->globorgid,
|
||||||
|
'folder_id' =>$folder,
|
||||||
|
'original_name' =>$fn['name'],
|
||||||
|
'new_name' =>$newName,
|
||||||
|
'modified' =>date('Y-m-d h:i:s'),
|
||||||
|
'owner' =>$this->userid ,
|
||||||
|
'extension' =>$ext ];
|
||||||
|
$newID = $this->Files_model->insert_record($data);
|
||||||
|
if ($newID){ $this->queueConversion($newID); }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else{
|
||||||
|
$error .= $fn.' fout bij uploaden';
|
||||||
|
}
|
||||||
|
echo $error;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function doDropUpload(){
|
||||||
|
|
||||||
|
$folder = $this->uri->segment(4);
|
||||||
|
$module = $this->uri->segment(5);
|
||||||
|
|
||||||
|
$fn = '';
|
||||||
|
|
||||||
|
$fn = $_FILES['file'];
|
||||||
|
$this->sharedUpload($fn, $folder, $module);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function queueConversion( $fileID ) {
|
||||||
|
$pheanstalk = new Pheanstalk( '127.0.0.1' );
|
||||||
|
|
||||||
|
$job = new stdClass();
|
||||||
|
|
||||||
|
$job->function = 'convertDocument';
|
||||||
|
$job->user_data = $fileID;
|
||||||
|
$job_data = json_encode( $job );
|
||||||
|
|
||||||
|
$pheanstalk
|
||||||
|
->useTube( $this->beanstalkPipe )
|
||||||
|
->put( $job_data );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show_pdf(){
|
||||||
|
$fileID= $this->uri->segment( 4 );
|
||||||
|
// TODO check file toegangsrecht
|
||||||
|
$file = $this->Files_model->get(['id'=>$fileID],false,true);
|
||||||
|
if (! $file) {
|
||||||
|
$this->json('file niet gevonden');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (! ($file->extension == ".pdf" || $file->conversion_status == 'WORD-PDF-CONVERSION-SUCCEEDED')){
|
||||||
|
$this->json('geen pdf beschikbaar');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($file->extension == ".pdf") $fullpath = $this->dossierpath;
|
||||||
|
else $fullpath = $this->pdfpath;
|
||||||
|
|
||||||
|
$fullpath = $fullpath . $file->new_name;
|
||||||
|
|
||||||
|
header( 'Content-Description: File Transfer' );
|
||||||
|
header( 'Content-Type: application/pdf' );
|
||||||
|
header( 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0' );
|
||||||
|
header( 'Pragma: public' );
|
||||||
|
header( 'Content-Length: ' . filesize( $fullpath) );
|
||||||
|
readfile( $fullpath );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function download_file(){
|
||||||
|
//TODO check toegangsrecht
|
||||||
|
$fileID = $this->uri->segment(4);
|
||||||
|
$document = $this->Files_model->get(['id'=>$fileID],false,true);
|
||||||
|
if (! $document) {
|
||||||
|
$this->json('Document niet gevonden');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->load->helper( 'download' );
|
||||||
|
$data = file_get_contents( $this->dossierpath . $document->new_name );
|
||||||
|
force_download( $document->original_name, $data );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function download_bijlage(){
|
||||||
|
$orgID = $this->uri->segment(4);
|
||||||
|
$randomname = $this->Organisaties_model->get(['id'=>$orgID],'randomname', true);
|
||||||
|
$originalname = $this->Organisaties_model->get(['id'=>$orgID],'bijlagefile', true);
|
||||||
|
$this->load->helper( 'download' );
|
||||||
|
$data = file_get_contents( './../docs/' . $randomname );
|
||||||
|
force_download( $originalname, $data );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,369 @@
|
|||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Users extends MY_Controller{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
if ( ! $this->userid) exit('geen toegang');
|
||||||
|
$models = array( "shared/Users_model",
|
||||||
|
'shared/Organisaties_model',
|
||||||
|
"shared/Orgusers_model",
|
||||||
|
"shared/functies_model",
|
||||||
|
"monpas/Filledversions_model",
|
||||||
|
"monpas/Groepenxusers_model",
|
||||||
|
"monpas/Versies_model",
|
||||||
|
"monpas/Orgversies_model");
|
||||||
|
$this->load->model($models);
|
||||||
|
$this->load->helper('string');
|
||||||
|
if ( ! $this->check_online_status() ) {
|
||||||
|
echo json_encode( array('offline' => TRUE) );
|
||||||
|
die;
|
||||||
|
};// if
|
||||||
|
}
|
||||||
|
function getuserdetail(){
|
||||||
|
if (!$this->userid || $this->nologin){die;};
|
||||||
|
|
||||||
|
$userid = $this->uri->segment(4);
|
||||||
|
if (!$userid) {$userid = $this->userid; };
|
||||||
|
$user = $this->Users_model->getdetails($userid);
|
||||||
|
echo json_encode($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateuser(){
|
||||||
|
//TODO sanitize input
|
||||||
|
if (!$this->userid || $this->nologin){die;};
|
||||||
|
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0 ) {
|
||||||
|
$data=array('voornaam' => $this->clean_input('voornaam'),
|
||||||
|
'tussenvoegsel' => $this->clean_input('tussenvoegsel'),
|
||||||
|
'achternaam' => $this->clean_input('achternaam'),
|
||||||
|
'email' => $this->clean_input('email') );
|
||||||
|
if (strlen($this->input->post('wachtwoord')) >=4){
|
||||||
|
$data['wachtwoord']=$this->input->post('wachtwoord');
|
||||||
|
} ;
|
||||||
|
$this->Users_model->update_record($data, $this->userid);
|
||||||
|
};
|
||||||
|
$fullname = $this->Users_model->get_fullname($this->userid);
|
||||||
|
echo json_encode($fullname);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getorgs(){
|
||||||
|
$userid = $this->userid;
|
||||||
|
$userorg = $this->Organisaties_model->getorg($this->globorgid) ;
|
||||||
|
$orgs = null;
|
||||||
|
if ($userorg->soort == 4){
|
||||||
|
// doe niks
|
||||||
|
}
|
||||||
|
if ($userorg->soort == 3){
|
||||||
|
//get scholen
|
||||||
|
$userorg->orgs1= $this->Organisaties_model->getorgsvanaf($userorg->id);
|
||||||
|
};
|
||||||
|
if($userorg->soort==2){
|
||||||
|
$userorg->orgs1= $this->Organisaties_model->getorgsvanaf($userorg->id);
|
||||||
|
if ($userorg->orgs1){
|
||||||
|
foreach($userorg->orgs1 as $bg){
|
||||||
|
$bg->orgs2 = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($userorg->soort=1){
|
||||||
|
$userorg->orgs= $this->Organisaties_model->getorgsvanaf($userorg->id);
|
||||||
|
if ($userorg->orgs){
|
||||||
|
foreach($userorg->orgs as $kamer){
|
||||||
|
$kamer->orgs = $this->Organisaties_model->getorgsvanaf($kamer->id);
|
||||||
|
if ($kamer->orgs){
|
||||||
|
foreach($kamer->orgs as $bg){
|
||||||
|
$bg->orgs = $this->Organisaties_model->getorgsvanaf($bg->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode($userorg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getorggebruikers(){
|
||||||
|
if (!$this->nologin){
|
||||||
|
$orgid = $this->uri->segment(4);
|
||||||
|
$users = $this->Users_model->getorggebruikers($orgid, false);
|
||||||
|
|
||||||
|
echo json_encode($users);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function adduser(){
|
||||||
|
//TODO clean input
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0 ) {
|
||||||
|
$ok = true;
|
||||||
|
$errortekst = '';
|
||||||
|
$user = null;
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$gnaam=$this->input->post('gnaam');
|
||||||
|
$gnaam = trim($gnaam);
|
||||||
|
if ($this->Users_model->check_username($gnaam) > 0){
|
||||||
|
$errortekst =" Gebruikersnaam is niet toegestaan. Gebruik een andere naam.";
|
||||||
|
$ok = false;
|
||||||
|
};
|
||||||
|
if ($ok) {
|
||||||
|
// maak een user
|
||||||
|
//maak wachtwoord en send email
|
||||||
|
$zout = random_string('alnum', 15);
|
||||||
|
$ww = random_string('alnum', 8);
|
||||||
|
$saltedww = md5($zout.$ww);
|
||||||
|
$data = array("voornaam" =>$this->input->post('voornaam'),
|
||||||
|
"tussenvoegsel" =>$this->input->post('tussenvoegsel'),
|
||||||
|
"achternaam" =>$this->input->post('achternaam'),
|
||||||
|
"email" =>$this->input->post('email'),
|
||||||
|
"gnaam" =>$gnaam,
|
||||||
|
"zout" =>$zout,
|
||||||
|
"wachtwoord" =>$saltedww);
|
||||||
|
$userid = $this->Users_model->insert_record($data);
|
||||||
|
$this->sendmail($userid,$ww,$orgid);
|
||||||
|
// maak een orguser
|
||||||
|
$data = array( "user_id" => $userid,
|
||||||
|
"organisatie_id" => $orgid);
|
||||||
|
$orguserid = $this->Orgusers_model->insert_record($data);
|
||||||
|
//maak autorisatie
|
||||||
|
$data = array( "nivo_id" =>$this->input->post('autorisatienivoid'),
|
||||||
|
"orguser_id" =>$orguserid);
|
||||||
|
$this->Autorisaties_model->insert_record($data);
|
||||||
|
//get user gegevens om op te nemen in de view
|
||||||
|
$user=$this->Users_model->getorggebruikers($orgid, $userid);
|
||||||
|
|
||||||
|
} // if ok
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$ok =false;
|
||||||
|
$errortekst ="U bent niet geautoriseerd voor deze handeling.";
|
||||||
|
$user ='';
|
||||||
|
}; // if geen writer
|
||||||
|
echo json_encode(array('ok' =>$ok,
|
||||||
|
'errortekst' => $errortekst,
|
||||||
|
'user' => $user));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBijlage($orgid){
|
||||||
|
|
||||||
|
$org = $this->Organisaties_model->get(['id'=>$orgid],false, true);
|
||||||
|
|
||||||
|
if (! $org->randomname && $org->id != $org->valtonder_id){
|
||||||
|
return $this->getBijlage($org->valtonder_id);
|
||||||
|
}
|
||||||
|
else return $org;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendmail($userid, $ww, $orgid){
|
||||||
|
$user = $this->Users_model->get_record_by_id($userid);
|
||||||
|
$data = array('username'=>$user->gnaam, 'password'=>$ww, 'fullname'=>$this->Users_model->get_fullname($userid));
|
||||||
|
$org = $this->getBijlage($orgid);
|
||||||
|
$this->load->library('email');
|
||||||
|
|
||||||
|
$this->email->from('noreply@framework.nl', 'Framework+ MonPas');
|
||||||
|
$this->email->to($user->email);
|
||||||
|
$this->email->subject('Inloggegevens MonPas');
|
||||||
|
$this->email->message($this->load->view('emails/newuser_mail', $data, TRUE));
|
||||||
|
$this->email->bcc("rfranke@framework-ed.nl");
|
||||||
|
if ($org->randomname)
|
||||||
|
$this->email->attach('./../docs/'.$org->randomname,'attachment', $org->bijlagefile);
|
||||||
|
$this->email->send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateuser2(){
|
||||||
|
// TODO sanitize input
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) > 0 ) {
|
||||||
|
$ok = true;
|
||||||
|
$errortekst = '';
|
||||||
|
$user = null;
|
||||||
|
$fullname ='';
|
||||||
|
$userid = $this->input->post("id");
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$gnaam = trim($this->input->post('gnaam'));
|
||||||
|
// controleer gebruikersnaam
|
||||||
|
if ($this->Users_model->check_username($gnaam, $userid) > 0){
|
||||||
|
$errortekst =" Gebruikersnaam is niet toegestaan. Gebruik een andere naam.";
|
||||||
|
$ok = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ($ok) {
|
||||||
|
$data = array("voornaam" =>$this->input->post('voornaam'),
|
||||||
|
"tussenvoegsel" =>$this->input->post('tussenvoegsel'),
|
||||||
|
"achternaam" =>$this->input->post('achternaam'),
|
||||||
|
"email" =>$this->input->post('email'),
|
||||||
|
"gnaam" =>$gnaam);
|
||||||
|
$this->Users_model->update_record($data, $userid);
|
||||||
|
|
||||||
|
//update autorisatie
|
||||||
|
$where = array('user_id' =>$userid, 'organisatie_id'=>$orgid);
|
||||||
|
$orguserid = $this->Orgusers_model->get_records_where($where, true);
|
||||||
|
$orguserid = $orguserid->id;
|
||||||
|
$data = array( "nivo_id" =>$this->input->post('autorisatienivoid'));
|
||||||
|
$where = array('orguser_id' => $orguserid);
|
||||||
|
$this->Autorisaties_model->update_record_where($data, $where);
|
||||||
|
//get user gegevens om op te nemen in de view
|
||||||
|
$user=$this->Users_model->getorggebruikers($orgid, $userid);
|
||||||
|
// als de veranderde user = glob user : pas fullname onder menu aan
|
||||||
|
if ($userid == $this->userid){
|
||||||
|
$fullname = $this->Users_model->get_fullname($userid);
|
||||||
|
}
|
||||||
|
if ($this->input->post("status") == 3){
|
||||||
|
//stuur email aan de gebruiker
|
||||||
|
$zout = random_string('alnum', 15);
|
||||||
|
$ww = random_string('alnum', 8);
|
||||||
|
$saltedww = md5($zout.$ww);
|
||||||
|
$data=array('zout' => $zout, "wachtwoord" =>$saltedww);
|
||||||
|
$this->Users_model->update_record($data, $userid);
|
||||||
|
$this->sendmail($userid,$ww,$orgid);
|
||||||
|
}
|
||||||
|
} // if ok
|
||||||
|
|
||||||
|
//get user gegevens om op te nemen in de view
|
||||||
|
$user=$this->Users_model->getorggebruikers($orgid, $userid);
|
||||||
|
}
|
||||||
|
else {$ok = false;
|
||||||
|
$errortekst = "U bent niet geautoriseerd voor deze handeling." ;
|
||||||
|
$user = '';
|
||||||
|
$fullname = '';
|
||||||
|
}; // geen write rechten
|
||||||
|
echo json_encode(array('ok' => $ok,
|
||||||
|
'errortekst' => $errortekst,
|
||||||
|
'user' => $user,
|
||||||
|
'fullname' => $fullname));
|
||||||
|
}
|
||||||
|
function deleteuser(){
|
||||||
|
//TODO sanitize input
|
||||||
|
$user=FALSE;
|
||||||
|
$userid= $this->uri->segment(4);
|
||||||
|
$orgid= $this->uri->segment(5);
|
||||||
|
$orguser = $this->Orgusers_model->get_records_where(array("user_id"=>$userid, "organisatie_id"=>$orgid),true);
|
||||||
|
$ok = true;
|
||||||
|
$errortekst = '';
|
||||||
|
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, WRITER) <=0 ) {
|
||||||
|
$ok = false;
|
||||||
|
$errortekst = "U bent niet geautoriseerd tot verwijderen.";
|
||||||
|
}
|
||||||
|
elseif ($userid == $this->userid){
|
||||||
|
$ok = false;
|
||||||
|
$errortekst .=" U mag de huidige gebruiker niet verwijderen.";
|
||||||
|
}
|
||||||
|
elseif ($this->Filledversions_model->check_for_record(array("user_id"=>$userid , "organisatie_id"=>$orgid)) ||
|
||||||
|
$this->Groepenxusers_model->check_for_record(array("orguser_id"=>$orguser->id)) ){
|
||||||
|
$errortekst .="Er zijn invulgegevens van deze gebruiker; en/of groepen gekoppeld aan deze gebruiker. Gebruiker is gearchiveerd";
|
||||||
|
$this->Autorisaties_model->update_record_where(array("nivo_id"=>100),array("orguser_id"=>$orguser->id));
|
||||||
|
$user = $this->Users_model->getorggebruikers($orgid,$userid);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$orguser = $this->Orgusers_model->get_records_where(array("user_id" => $userid, "organisatie_id"=>$orgid), true);
|
||||||
|
$this->Autorisaties_model->delete_record_where(array("orguser_id"=>$orguser->id));
|
||||||
|
$this->Orgusers_model->delete_record($orguser->id);
|
||||||
|
|
||||||
|
// wordt de user nog bij een andere organisatie gebruikt?
|
||||||
|
$orguser=$this->Orgusers_model->get_records_where(array("user_id"=>$userid));
|
||||||
|
if (!$orguser){
|
||||||
|
$this->Users_model->delete_record($userid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo json_encode(array('ok'=>$ok, 'errortekst'=>$errortekst,'user'=>$user));
|
||||||
|
}
|
||||||
|
public function savestatus(){
|
||||||
|
// TODO sanitize input
|
||||||
|
if ($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER) > 0){
|
||||||
|
$userid =$this->clean_input('userid');
|
||||||
|
$status =$this->clean_input('status');
|
||||||
|
$this->Users_model->update_record(array("actief"=>$status), $userid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function SendNewWW(){
|
||||||
|
//TODO sanitize input
|
||||||
|
$userid = $this->uri->segment(4);
|
||||||
|
$ok = true;
|
||||||
|
$errortekst = '';
|
||||||
|
|
||||||
|
$user = $this->Users_model->get_record_by_id($userid);
|
||||||
|
$ww = random_string('alnum', 8);
|
||||||
|
$saltedww = md5($user->zout.$ww);
|
||||||
|
// update user
|
||||||
|
$this->Users_model->update_record(array('wachtwoord'=>$saltedww),$userid);
|
||||||
|
$data = array('username'=>$user->gnaam, 'password'=>$ww, 'fullname'=>$this->Users_model->get_fullname($userid));
|
||||||
|
|
||||||
|
$this->load->library('email');
|
||||||
|
|
||||||
|
$this->email->from('noreply@framework.nl', 'Framework+ MonPas');
|
||||||
|
$this->email->to($user->email);
|
||||||
|
$this->email->subject('Inloggegevens MonPas');
|
||||||
|
$this->email->message($this->load->view('emails/newpassword_mail', $data, TRUE));
|
||||||
|
$this->email->bcc("rfranke@framework-ed.nl");
|
||||||
|
$this->email->send();
|
||||||
|
|
||||||
|
echo json_encode(array('ok'=>$ok, 'errortekst'=>$errortekst));
|
||||||
|
}
|
||||||
|
|
||||||
|
function geteigenorgs($valtonderid){
|
||||||
|
|
||||||
|
}
|
||||||
|
private function getswv($orgid){
|
||||||
|
$organisatie =$this->Organisaties_model->get_record_by_id($orgid);
|
||||||
|
if ($organisatie) {
|
||||||
|
if ($organisatie->soort ==1 ) {
|
||||||
|
return $organisatie->id;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$orgid = $this->getswv($organisatie->valtonder_id);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return $orgid= null;
|
||||||
|
}
|
||||||
|
return $orgid;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getorglist($orgid,$orglist){
|
||||||
|
|
||||||
|
$orgs = $this->Organisaties_model->getorgsvanaf($orgid);
|
||||||
|
if ($orgs){
|
||||||
|
|
||||||
|
foreach($orgs as $org){
|
||||||
|
if ($org->soort < 4 && $org->soort != 1){
|
||||||
|
$orglist .=$org->id.',';
|
||||||
|
$orglist=$this->getorglist($org->id,$orglist);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$orglist.= $org->id.',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $orglist;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getotherusers(){
|
||||||
|
//TODO clean input
|
||||||
|
// haal de gebruikers op van andere organisaties onder het SWV
|
||||||
|
$orgid= $this->uri->segment(4);
|
||||||
|
$swvid = $this->getswv($orgid);
|
||||||
|
$orgids='';
|
||||||
|
|
||||||
|
$orgids = $this->getorglist($swvid, $swvid.',');
|
||||||
|
|
||||||
|
$orgids=substr($orgids, 0, strlen($orgids) - 1);
|
||||||
|
$ousers= $this->Users_model->otherusers($orgid,$orgids);
|
||||||
|
echo json_encode($ousers);
|
||||||
|
}
|
||||||
|
function savecopyuser(){
|
||||||
|
//TODO clean input
|
||||||
|
$userid = $this->input->post("userid");
|
||||||
|
$orgid = $this->input->post("orgid");
|
||||||
|
$data = array( "user_id" => $userid,
|
||||||
|
"organisatie_id" => $orgid);
|
||||||
|
$orguserid = $this->Orgusers_model->insert_record($data);
|
||||||
|
//maak autorisatie
|
||||||
|
$data = array( "nivo_id" =>$this->input->post('autorisatie'),
|
||||||
|
"orguser_id" =>$orguserid);
|
||||||
|
$this->Autorisaties_model->insert_record($data);
|
||||||
|
//get user gegevens om op te nemen in de view
|
||||||
|
$user=$this->Users_model->getorggebruikers($orgid, $userid);
|
||||||
|
echo json_encode($user);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of MY_Controller
|
||||||
|
* Algemene controller functies
|
||||||
|
*
|
||||||
|
* @author Theo Weijmer
|
||||||
|
* @date 12-07-2011
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class MY_Controller extends CI_Controller{
|
||||||
|
// public $version = '1.5'; // 14 november 2017
|
||||||
|
// public $version = '1.9'; //13 feb 2018
|
||||||
|
// public $version = '1.14'; //21 maart 2018
|
||||||
|
// public $version = '1.17.20'; //21dec 2018
|
||||||
|
// public $version = '1.17.25'; //maart 2019 ijkpuntengrafiek
|
||||||
|
// public $version = '1.17.26';//ijkpuntengrafiek meetfout
|
||||||
|
// public $version = '1.17.27';//ijkpuntengrafiek gemiddeld in sop + laatste dingen
|
||||||
|
|
||||||
|
// public $version = '1.17.28';//optellen diversiteitsoverzicht, wisselen van org en schooljaar
|
||||||
|
// public $version = '1.17.29';//kopieren groepen divmeter po
|
||||||
|
// public $version = '1.17.30'; //nog iets vergeten
|
||||||
|
// public $version = '1.17.31'; //ophalen naam voor ijkpunten (bug) + onv, vold, goed, ook in grafiek
|
||||||
|
// public $version = '1.17.32'; //nieuwe html voor toelichting onderdelen + verwijzing hoofdstukkeuze nieuwe clusters
|
||||||
|
//public $version = '1.17.33'; //fout in verwijzing naar labels ijkpunten
|
||||||
|
// public $version = '1.17.34'; //fout in diversiteitsmeter/schoolgegevens en in SOP oud ondersteuning1.php
|
||||||
|
// public $version = '1.17.35'; //'weggooien' gebruiker als aut = 10 (medewerker) dan mag de aut =100 (geen toegang) gezet worden
|
||||||
|
// public $version = '1.17.36'; //ophalen gegevens + query inspectiemeters ontwikkelagenda
|
||||||
|
// public $version = '1.17.37'; //divmeter opslaan leerkracht en ondersteuningaantallen bij groepen
|
||||||
|
// public $version = '1.17.38'; //optellen aantal lln divmonitor
|
||||||
|
// public $version = '1.17.39'; //dq divmonitor
|
||||||
|
// public $version = '1.17.40'; //16 okt 2017 terugzetten functies in groepenmodel.js
|
||||||
|
// public $version = '1.17.44'; //laatste aspecten van sop compact
|
||||||
|
// public $version = '1.17.46'; //nov 3 html opgeschoond
|
||||||
|
// public $version = '1.17.47'; //foutend qs divmeter so, alttekst logo sop, slashes uit orgnaam pdf
|
||||||
|
// public $version = '1.17.48'; //mededeling als er geen budgetversie is.
|
||||||
|
// public $version = '1.17.49'; //schooljaar fout + inspectiemeter kleiner
|
||||||
|
// public $version = '1.17.51'; //datum in bestandsnaam compact sop + streepje
|
||||||
|
// public $version = '1.17.52'; //geen melding meer in flexibel sop als lijst buiten de sopperiode valt
|
||||||
|
// public $version = '1.17.53'; //divoverzicht po: organisaties zonder licentie worden niet getoond
|
||||||
|
// public $version = '1.17.54';//extra scoretype: included/involved/present/absent
|
||||||
|
// public $version = '1.17.55'; // flexibel sop
|
||||||
|
// public $version = '1.17.56'; // omvang extra ondersteuning: instrument + in compactsop
|
||||||
|
// public $version = '1.17.57'; // ophalen van kalenderjaren bij overzicht (monfinoverzicht2.js)
|
||||||
|
// public $version = '1.17.60'; // verbeteringen omvang extra ondersteuning: instrument + in compactsop
|
||||||
|
// public $version = '1.17.61'; // documenten genummerd
|
||||||
|
// public $version = '1.17.62'; // bijlage bij inlogmail
|
||||||
|
// public $version = '1.17.63'; // mogelijkheid tot toevoegen omschrijvingen bij scores
|
||||||
|
// public $version = '1.17.64'; // fout in ophalen scores ++ + - -- in matrix, individuele en schoolgemiddelden,
|
||||||
|
// public $version = '1.17.66'; // instrument diversiteit po 2203
|
||||||
|
public $version = '1.17.67'; // logo en foto koko
|
||||||
|
public $partituurid;
|
||||||
|
public $globProfielVersieID = 1;
|
||||||
|
public $userid; //id of the user that is logged in
|
||||||
|
public $orgid; //orgid of the user logged in
|
||||||
|
public $globorgid; //orgid which has been chosen by user (only BG and SUPERUSER)
|
||||||
|
public $userbg; // TRUE or FALSE for orgid if this org is BG
|
||||||
|
public $globisbg; // TRUE or FALSE for globorgid if this org is BG
|
||||||
|
public $userrole; //role of the user logged in dwz autorisatienivo van de eigen organisatie
|
||||||
|
// dus echt het nivo en niet het id van autorisatienivos
|
||||||
|
public $roleid;
|
||||||
|
public $super; //TRUE or FALSE for user SUPERUSER
|
||||||
|
public $writer; //TRUE or FALSE sets the write permission
|
||||||
|
public $ontwikkel=TRUE;
|
||||||
|
public $module;
|
||||||
|
public $selectedschool;
|
||||||
|
public $schooljaar;
|
||||||
|
public $rootpath;
|
||||||
|
public $dossierpath;
|
||||||
|
public $pdfpath;
|
||||||
|
public $beanstalkPipe;
|
||||||
|
public $compactsoppath;
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
//$this->session->sess_destroy();
|
||||||
|
$this->userid = $this->session->userdata('userid');
|
||||||
|
$this->orgid = $this->session->userdata('orgid');
|
||||||
|
$this->userrole = $this->session->userdata('role');
|
||||||
|
$this->module = $this->session->userdata('module');
|
||||||
|
$this->selectedschool = $this->session->userdata('selectedschool');
|
||||||
|
$this->schooljaar = $this->session->userdata('schooljaar');
|
||||||
|
$this->nologin = FALSE;
|
||||||
|
$this->rootpath = str_replace('/public', '', $_SERVER['DOCUMENT_ROOT']);
|
||||||
|
$this->setApplicationPaths();
|
||||||
|
|
||||||
|
$this->lang->load('partituur',$this->config->item('language'));
|
||||||
|
$this->beanstalkPipe = 'monpas';
|
||||||
|
|
||||||
|
log_message('error', $this->userid ? $this->userid : 'GEEN USR BEKEND');
|
||||||
|
if($this->userid){
|
||||||
|
// if there is a user but no org or role user gets nologin_view
|
||||||
|
if(!$this->orgid || !$this->userrole || $this->userrole==''){
|
||||||
|
$this->session->sess_destroy();
|
||||||
|
redirect(base_url().'index.php/toner');
|
||||||
|
$this->nologin = TRUE;
|
||||||
|
}else{
|
||||||
|
$this->super = FALSE;
|
||||||
|
if($this->Autorisaties_model->check_autorisatie($this->userrole, SUPERUSER)) $this->super=TRUE;
|
||||||
|
if(!$this->session->userdata('globorgid')) $this->Session_model->set_globorgid($this->orgid);
|
||||||
|
|
||||||
|
$this->globorgid= $this->session->userdata('globorgid');
|
||||||
|
$this->writer = $this->Autorisaties_model->check_write();
|
||||||
|
$this->roleid = $this->Autorisatienivos_model->get_fieldvalue(array('nivo'=>$this->userrole), 'id');
|
||||||
|
$this->userbg = $this->Organisaties_model->is_bg($this->orgid);
|
||||||
|
$this->globisbg = $this->Organisaties_model->is_bg($this->globorgid);
|
||||||
|
|
||||||
|
$where = array('partituur_organisatie_id'=>$this->globorgid, 'partituur_actief'=>1);
|
||||||
|
$this->load->model('ijkpartituur/Partituurs_model');
|
||||||
|
$partituur = $this->Partituurs_model->get_single_details($where);
|
||||||
|
if ($partituur) {$this->partituurid = $partituur->id; }
|
||||||
|
else $this->partituurid = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function clean_input($post){
|
||||||
|
return str_replace('null', '', $this->db->escape_str($this->input->post($post), TRUE));
|
||||||
|
}
|
||||||
|
function check_online_status() {
|
||||||
|
if ( ! $this->uri->segment( 2 ) || $this->uri->segment( 1 ) == 'login' ) return TRUE;
|
||||||
|
if ( $this->uri->segment( 2 ) == 'reports' ) return TRUE;
|
||||||
|
if ( $this->session->userdata( 'userid' ) ) return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
private function setApplicationPaths() {
|
||||||
|
// $this->base_path = MYROOTPATH;
|
||||||
|
// $this->dossierpath = $_ENV['DOSSIER']['DOSSIER_DOCUMENTS'];
|
||||||
|
// $this->pdfpath = $_ENV['DOSSIER']['PDF_DOCUMENTS'];
|
||||||
|
$this->dossierpath = '../dossier/';
|
||||||
|
$this->pdfpath='../pdfdossier/';
|
||||||
|
$this->partituurUpload='../tmp_uploads/';
|
||||||
|
$this->partituurSchatkist='../schatkist/';
|
||||||
|
$this->compactsoppath = MYROOTPATH.'documents/compactsops/';
|
||||||
|
}
|
||||||
|
|
||||||
|
function json($wat){
|
||||||
|
echo json_encode($wat);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of MY_Model
|
||||||
|
* Algemene database functies
|
||||||
|
*
|
||||||
|
* @author Theo Weijmer
|
||||||
|
* @date 12-07-2011
|
||||||
|
*
|
||||||
|
* my_model VHM versie 2.1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class MY_Model extends CI_Model{
|
||||||
|
|
||||||
|
function __construct(){
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_record_by_id($id, $fieldname=FALSE, $row=TRUE){
|
||||||
|
$query = $this->db->get_where($this->tablename, array('id' => $id));
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}elseif($row){
|
||||||
|
$row = $query->row();
|
||||||
|
if($fieldname){
|
||||||
|
return $row->$fieldname;
|
||||||
|
}else{
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_fieldvalue($where, $fieldname){
|
||||||
|
$query = $this->db->get_where($this->tablename, $where);
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
$row = $query->row();
|
||||||
|
return $row->$fieldname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_records_where($where=FALSE, $row=FALSE, $order=FALSE, $sort='asc'){
|
||||||
|
if($order) $this->db->order_by($order, $sort);
|
||||||
|
if($where){
|
||||||
|
$query = $this->db->get_where($this->tablename, $where);
|
||||||
|
}else{
|
||||||
|
$query = $this->db->get($this->tablename);
|
||||||
|
}
|
||||||
|
// echo $this->db->last_query();
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
if($row){
|
||||||
|
return $query->row();
|
||||||
|
}else{
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_for_record($where){
|
||||||
|
$query = $this->db->get_where($this->tablename, $where);
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_query_result(){
|
||||||
|
$query = $this->db->query($this->sql);
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_query_record(){
|
||||||
|
$query = $this->db->query($this->sql);
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_query_row($fieldname=FALSE){
|
||||||
|
$query = $this->db->query($this->sql);
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
if($fieldname){
|
||||||
|
$row = $query->row();
|
||||||
|
return $row->$fieldname;
|
||||||
|
}else{
|
||||||
|
return $query->row();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_result_count($where){
|
||||||
|
$this->db->where($where);
|
||||||
|
$this->db->from($this->tablename);
|
||||||
|
return $this->db->count_all_results();
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_record($data, $id){
|
||||||
|
$data['update_date']=date('Y-m-d G:i:s');
|
||||||
|
$data['updated_by']=$this->Users_model->gID;
|
||||||
|
$this->db->update($this->tablename, $data, 'id = '.$id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_record_where($data, $where){
|
||||||
|
$data['update_date']=date('Y-m-d G:i:s');
|
||||||
|
$data['updated_by']=$this->Users_model->gID;
|
||||||
|
$this->db->update($this->tablename, $data, $where);
|
||||||
|
}
|
||||||
|
|
||||||
|
function insert_record($data){
|
||||||
|
$data['creation_date']=date('Y-m-d G:i:s');
|
||||||
|
$data['created_by']=$this->Users_model->gID;
|
||||||
|
$data['update_date']=date('Y-m-d G:i:s');
|
||||||
|
$data['updated_by']=$this->Users_model->gID;
|
||||||
|
$this->db->insert($this->tablename, $data);
|
||||||
|
return $this->db->insert_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_record($id){
|
||||||
|
$this->db->delete($this->tablename, array('id'=>$id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_record_where($where){
|
||||||
|
$this->db->delete($this->tablename, $where);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sanitise_postinput($post, $notinclude){
|
||||||
|
foreach($post as $key=>$value){
|
||||||
|
if(!in_array($key, $notinclude))$data[] = array($key=>$value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_record($data, $id){
|
||||||
|
if(!$id){
|
||||||
|
$id = $this->insert_record($data);
|
||||||
|
}else{
|
||||||
|
$this->update_record($data, $id);
|
||||||
|
}
|
||||||
|
return $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_ar_query(){
|
||||||
|
$query = $this->db->get();
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
return FALSE;
|
||||||
|
}else{
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get($where = FALSE, $fieldname = FALSE, $row = FALSE) {
|
||||||
|
if( $fieldname ) $row = TRUE;
|
||||||
|
|
||||||
|
if ( ! is_array( $where ) && $where ) {
|
||||||
|
$this->db->where( array('T1.id' => $where) );
|
||||||
|
$row = TRUE;
|
||||||
|
} elseif ( $where ) {
|
||||||
|
$this->db->where( $where );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $fieldname ) $this->db->select( $fieldname );
|
||||||
|
$query = $this->db->get( $this->tablename . ' AS T1' );
|
||||||
|
if ( $query->num_rows() == 0 ) return FALSE;
|
||||||
|
|
||||||
|
if ( $row ){
|
||||||
|
$row = $query->row();
|
||||||
|
if ( $fieldname ) { return $row->$fieldname; }
|
||||||
|
else { return $row; }
|
||||||
|
}
|
||||||
|
else { return $query->result(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function mysql2text($message){
|
||||||
|
$regeleinden = array('\r\n', '\r', '\n');
|
||||||
|
$message = str_replace($regeleinden, chr(13), $message);
|
||||||
|
$message = stripslashes($message);
|
||||||
|
return ($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
function mysql2html($message){
|
||||||
|
$regeleinden = array('\r\n', '\r', '\n');
|
||||||
|
$message = str_replace($regeleinden, "<br />", $message);
|
||||||
|
$message = stripslashes($message);
|
||||||
|
return ($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
function date2mysql($date){
|
||||||
|
return date('Y-m-d', strtotime($date));
|
||||||
|
}
|
||||||
|
|
||||||
|
function mysql2date($date){
|
||||||
|
return date('d-m-Y', strtotime($date));
|
||||||
|
}
|
||||||
|
function mysql2bedrag($bedrag){
|
||||||
|
$bedrag2=number_format($bedrag,2,",",".");
|
||||||
|
return $bedrag2;
|
||||||
|
}
|
||||||
|
|
||||||
|
function textarea2html($message){
|
||||||
|
$regeleinden = array(chr(13));
|
||||||
|
$message = str_replace($regeleinden, "<br />", $message);
|
||||||
|
$message = stripslashes($message);
|
||||||
|
return ($message);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['cal_su'] = "Zo";
|
||||||
|
$lang['cal_mo'] = "Ma";
|
||||||
|
$lang['cal_tu'] = "Di";
|
||||||
|
$lang['cal_we'] = "Wo";
|
||||||
|
$lang['cal_th'] = "Do";
|
||||||
|
$lang['cal_fr'] = "Vr";
|
||||||
|
$lang['cal_sa'] = "Za";
|
||||||
|
$lang['cal_sun'] = "Zo";
|
||||||
|
$lang['cal_mon'] = "Ma";
|
||||||
|
$lang['cal_tue'] = "Di";
|
||||||
|
$lang['cal_wed'] = "Wo";
|
||||||
|
$lang['cal_thu'] = "Do";
|
||||||
|
$lang['cal_fri'] = "Vr";
|
||||||
|
$lang['cal_sat'] = "Za";
|
||||||
|
$lang['cal_sunday'] = "Zondag";
|
||||||
|
$lang['cal_monday'] = "Maandag";
|
||||||
|
$lang['cal_tuesday'] = "Dinsdag";
|
||||||
|
$lang['cal_wednesday'] = "Woensdag";
|
||||||
|
$lang['cal_thursday'] = "Donderdag";
|
||||||
|
$lang['cal_friday'] = "Vrijdag";
|
||||||
|
$lang['cal_saturday'] = "Zaterdag";
|
||||||
|
$lang['cal_jan'] = "Jan";
|
||||||
|
$lang['cal_feb'] = "Feb";
|
||||||
|
$lang['cal_mar'] = "Mrt";
|
||||||
|
$lang['cal_apr'] = "Apr";
|
||||||
|
$lang['cal_may'] = "Mei";
|
||||||
|
$lang['cal_jun'] = "Jun";
|
||||||
|
$lang['cal_jul'] = "Jul";
|
||||||
|
$lang['cal_aug'] = "Aug";
|
||||||
|
$lang['cal_sep'] = "Sep";
|
||||||
|
$lang['cal_oct'] = "Oct";
|
||||||
|
$lang['cal_nov'] = "Nov";
|
||||||
|
$lang['cal_dec'] = "Dec";
|
||||||
|
$lang['cal_january'] = "Januari";
|
||||||
|
$lang['cal_february'] = "Februari";
|
||||||
|
$lang['cal_march'] = "Maart";
|
||||||
|
$lang['cal_april'] = "April";
|
||||||
|
$lang['cal_mayl'] = "Mei";
|
||||||
|
$lang['cal_june'] = "Juni";
|
||||||
|
$lang['cal_july'] = "Juli";
|
||||||
|
$lang['cal_august'] = "Augustus";
|
||||||
|
$lang['cal_september'] = "September";
|
||||||
|
$lang['cal_october'] = "October";
|
||||||
|
$lang['cal_november'] = "November";
|
||||||
|
$lang['cal_december'] = "December";
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file calendar_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/calendar_lang.php */
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['date_year'] = "Jaar";
|
||||||
|
$lang['date_years'] = "Jaren";
|
||||||
|
$lang['date_month'] = "Maand";
|
||||||
|
$lang['date_months'] = "Maanden";
|
||||||
|
$lang['date_week'] = "Week";
|
||||||
|
$lang['date_weeks'] = "Weken";
|
||||||
|
$lang['date_day'] = "Dag";
|
||||||
|
$lang['date_days'] = "Dagen";
|
||||||
|
$lang['date_hour'] = "Uur";
|
||||||
|
$lang['date_hours'] = "Uren";
|
||||||
|
$lang['date_minute'] = "Minuut";
|
||||||
|
$lang['date_minutes'] = "Minuten";
|
||||||
|
$lang['date_second'] = "Seconde";
|
||||||
|
$lang['date_seconds'] = "Seconden";
|
||||||
|
|
||||||
|
$lang['UM12'] = '(UTC -12:00) Baker/Howland Island';
|
||||||
|
$lang['UM11'] = '(UTC -11:00) Samoa Time Zone, Niue';
|
||||||
|
$lang['UM10'] = '(UTC -10:00) Hawaii-Aleutian Standard Time, Cook Islands, Tahiti';
|
||||||
|
$lang['UM95'] = '(UTC -9:30) Marquesas Islands';
|
||||||
|
$lang['UM9'] = '(UTC -9:00) Alaska Standard Time, Gambier Islands';
|
||||||
|
$lang['UM8'] = '(UTC -8:00) Pacific Standard Time, Clipperton Island';
|
||||||
|
$lang['UM7'] = '(UTC -7:00) Mountain Standard Time';
|
||||||
|
$lang['UM6'] = '(UTC -6:00) Central Standard Time';
|
||||||
|
$lang['UM5'] = '(UTC -5:00) Eastern Standard Time, Western Caribbean Standard Time';
|
||||||
|
$lang['UM45'] = '(UTC -4:30) Venezuelan Standard Time';
|
||||||
|
$lang['UM4'] = '(UTC -4:00) Atlantic Standard Time, Eastern Caribbean Standard Time';
|
||||||
|
$lang['UM35'] = '(UTC -3:30) Newfoundland Standard Time';
|
||||||
|
$lang['UM3'] = '(UTC -3:00) Argentina, Brazil, French Guiana, Uruguay';
|
||||||
|
$lang['UM2'] = '(UTC -2:00) South Georgia/South Sandwich Islands';
|
||||||
|
$lang['UM1'] = '(UTC -1:00) Azores, Cape Verde Islands';
|
||||||
|
$lang['UTC'] = '(UTC) Greenwich Mean Time, Western European Time';
|
||||||
|
$lang['UP1'] = '(UTC +1:00) Central European Time, West Africa Time';
|
||||||
|
$lang['UP2'] = '(UTC +2:00) Central Africa Time, Eastern European Time, Kaliningrad Time';
|
||||||
|
$lang['UP3'] = '(UTC +3:00) Moscow Time, East Africa Time';
|
||||||
|
$lang['UP35'] = '(UTC +3:30) Iran Standard Time';
|
||||||
|
$lang['UP4'] = '(UTC +4:00) Azerbaijan Standard Time, Samara Time';
|
||||||
|
$lang['UP45'] = '(UTC +4:30) Afghanistan';
|
||||||
|
$lang['UP5'] = '(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time';
|
||||||
|
$lang['UP55'] = '(UTC +5:30) Indian Standard Time, Sri Lanka Time';
|
||||||
|
$lang['UP575'] = '(UTC +5:45) Nepal Time';
|
||||||
|
$lang['UP6'] = '(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time';
|
||||||
|
$lang['UP65'] = '(UTC +6:30) Cocos Islands, Myanmar';
|
||||||
|
$lang['UP7'] = '(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam';
|
||||||
|
$lang['UP8'] = '(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time';
|
||||||
|
$lang['UP875'] = '(UTC +8:45) Australian Central Western Standard Time';
|
||||||
|
$lang['UP9'] = '(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time';
|
||||||
|
$lang['UP95'] = '(UTC +9:30) Australian Central Standard Time';
|
||||||
|
$lang['UP10'] = '(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time';
|
||||||
|
$lang['UP105'] = '(UTC +10:30) Lord Howe Island';
|
||||||
|
$lang['UP11'] = '(UTC +11:00) Magadan Time, Solomon Islands, Vanuatu';
|
||||||
|
$lang['UP115'] = '(UTC +11:30) Norfolk Island';
|
||||||
|
$lang['UP12'] = '(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time';
|
||||||
|
$lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time';
|
||||||
|
$lang['UP13'] = '(UTC +13:00) Phoenix Islands Time, Tonga';
|
||||||
|
$lang['UP14'] = '(UTC +14:00) Line Islands';
|
||||||
|
|
||||||
|
/* End of file date_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/date_lang.php */
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['db_invalid_connection_str'] = 'Kan de database instellingen niet bepalen aan de hand van de "connection string" die u heeft opgegeven.';
|
||||||
|
$lang['db_unable_to_connect'] = 'Kan niet verbinden met de database server met de huidige instellingen die u heeft opgegeven.';
|
||||||
|
$lang['db_unable_to_select'] = 'Kan de volgende database niet selecteren: %s';
|
||||||
|
$lang['db_unable_to_create'] = 'Kan de volgende database niet creëren: %s';
|
||||||
|
$lang['db_invalid_query'] = 'De query die u heeft ingegeven is niet correct.';
|
||||||
|
$lang['db_must_set_table'] = 'U moet de database tabel vaststellen die uw wilt gebruiken.';
|
||||||
|
$lang['db_must_set_database'] = 'U moet de database naam instellen in uw database configuratie bestand.';
|
||||||
|
$lang['db_must_use_set'] = 'U moet de "SET" methode gebruiken om een entry te updaten.';
|
||||||
|
$lang['db_must_use_where'] = 'Update queries zijn niet toegestaan tenzij ze een "WHERE" clausule bevatten.';
|
||||||
|
$lang['db_del_must_use_where'] = 'Delete queries zijn niet toegestaan tenzij ze een "WHERE" clausule bevatten.';
|
||||||
|
$lang['db_field_param_missing'] = 'Om velden op te halen moet u de naam van de tabel opgeven.';
|
||||||
|
$lang['db_unsupported_function'] = 'Deze functie wordt niet ondersteund door de databaseversie die u gebruikt.';
|
||||||
|
$lang['db_transaction_failure'] = 'Transactie mislukt: Rollback uitgevoerd.';
|
||||||
|
$lang['db_unable_to_drop'] = 'Kan de opgegeven database niet verwijderen.';
|
||||||
|
$lang['db_unsuported_feature'] = 'Niet ondersteunde functie in het gebruikte databaseplatform.';
|
||||||
|
$lang['db_unsuported_compression'] = 'Het bestandscompressieformaat dat u heeft gekozen word niet ondersteund door de server.';
|
||||||
|
$lang['db_filepath_error'] = 'Niet mogelijk om de data te schrijven naar het bestandspad dat u heeft opgegeven.';
|
||||||
|
$lang['db_invalid_cache_path'] = 'Het cache pad wat u heeft opgegeven is niet geldig of niet schrijfbaar.';
|
||||||
|
$lang['db_table_name_required'] = 'Een tabel naam is nodig voor die handeling.';
|
||||||
|
$lang['db_column_name_required'] = 'Een kolom naam is nodig voor die handeling.';
|
||||||
|
$lang['db_column_definition_required'] = 'Een kolom definitie is nodig voor die handeling.';
|
||||||
|
$lang['db_unable_to_set_charset'] = 'Kan de volgende karakterset niet instellen voor de connectie: %s';
|
||||||
|
$lang['db_error_heading'] = 'Er is een database fout opgetreden.';
|
||||||
|
|
||||||
|
/* End of file db_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/db_lang.php */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['email_must_be_array'] = 'De email validatie methode moet een array als argument krijgen.';
|
||||||
|
$lang['email_invalid_address'] = 'Ongeldig emailadres: %s';
|
||||||
|
$lang['email_attachment_missing'] = 'De volgende bijlage kon niet worden gevonden: %s';
|
||||||
|
$lang['email_attachment_unredable'] = 'De volgende bijlage kon niet worden geopend: %s';
|
||||||
|
$lang['email_no_recipients'] = 'U moet ontvangers specificeren in: To, Cc, of Bcc';
|
||||||
|
$lang['email_send_failure_phpmail'] = 'Kan geen email verzenden met PHP mail(). Uw server is vermoedelijk niet ingesteld om deze methode te kunnen gebruiken.';
|
||||||
|
$lang['email_send_failure_sendmail'] = 'Kan geen email verzenden met PHP sendmail(). Uw server is vermoedelijk niet ingesteld om deze methode te kunnen gebruiken.';
|
||||||
|
$lang['email_send_failure_smtp'] = 'Kan geen email verzenden met PHP SMTP. Uw server is vermoedelijk niet ingesteld om deze methode te kunnen gebruiken.';
|
||||||
|
$lang['email_sent'] = 'Uw bericht is succesvol verstuurd met behulp van het: %s protocol';
|
||||||
|
$lang['email_no_socket'] = 'Kon geen socket openen voor Sendmail. Kijkt u alstublieft uw instellingen na.';
|
||||||
|
$lang['email_no_hostname'] = 'U heeft geen SMTP hostnaam opgegeven.';
|
||||||
|
$lang['email_smtp_error'] = 'De volgende SMTP fout is opgetreden: %s';
|
||||||
|
$lang['email_no_smtp_unpw'] = 'U moet een SMTP gebruikersnaam en wachtwoord opgeven.';
|
||||||
|
$lang['email_failed_smtp_login'] = 'Het versturen van het AUTH LOGIN commando is mislukt. Foutmelding: %s';
|
||||||
|
$lang['email_smtp_auth_un'] = 'Gebruikersnaam niet gevonden. Foutmelding: %s';
|
||||||
|
$lang['email_smtp_auth_pw'] = 'Wachtwoord niet gevonden. Foutmelding: %s';
|
||||||
|
$lang['email_smtp_data_failure'] = 'Kon data niet versturen: %s';
|
||||||
|
$lang['email_exit_status'] = "Afsluit status code: %s";
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file email_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/email_lang.php */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['required'] = 'Het "%s" veld mag niet leeg zijn.';
|
||||||
|
$lang['isset'] = 'Het "%s" veld moet een waarde hebben.';
|
||||||
|
$lang['valid_email'] = 'Het "%s" veld moet een geldig e-mail adres bevatten.';
|
||||||
|
$lang['valid_emails'] = 'Het "%s" veld moet geldige e-mail adressen bevatten.';
|
||||||
|
$lang['valid_url'] = 'Het "%s" veld moet een correcte URL bevatten.';
|
||||||
|
$lang['valid_ip'] = 'Het "%s" veld moet een correct IP adres bevatten.';
|
||||||
|
$lang['min_length'] = 'Het "%s" veld moet tenminste %s tekens bevatten.';
|
||||||
|
$lang['max_length'] = 'Het "%s" veld mag niet meer dan %s tekens bevatten.';
|
||||||
|
$lang['exact_length'] = 'Het "%s" veld moet precies %s tekens bevatten.';
|
||||||
|
$lang['alpha'] = 'Het "%s" veld mag alleen letters bevatten.';
|
||||||
|
$lang['alpha_numeric'] = 'Het "%s" veld mag alleen letters en cijfers bevatten.';
|
||||||
|
$lang['alpha_dash'] = 'Het "%s" veld mag alleen letters, cijfers, underscores(_) en strepen(-) bevatten.';
|
||||||
|
$lang['numeric'] = 'Het "%s" veld mag alleen een getal bevatten.';
|
||||||
|
$lang['is_numeric'] = 'Het "%s" veld mag alleen een getal bevatten.';
|
||||||
|
$lang['integer'] = 'Het "%s" veld moet een geheel getal bevatten.';
|
||||||
|
$lang['matches'] = 'De waarde van het "%s" veld is niet gelijk aan de waarde van het "%s" veld.';
|
||||||
|
$lang['is_natural'] = 'Het "%s" veld mag alleen een getal bevatten dat niet kleiner is dan nul.';
|
||||||
|
$lang['is_natural_no_zero'] = 'Het "%s" veld moet een getal bevatten dat groter is dan nul.';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file validation_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/form_validation_lang.php */
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['ftp_no_connection'] = 'Kan geen geldig connectie ID vinden. Zorg dat je verbonden bent voordat je bestandshandelingen gaat uitvoeren.';
|
||||||
|
$lang['ftp_unable_to_connect'] = 'Kan geen verbinding maken met de FTP server op de opgegeven hostname.';
|
||||||
|
$lang['ftp_unable_to_login'] = 'Aanmelden op de FTP server is mislukt. Controleer de gebruikersnaam en het wachtwoord.';
|
||||||
|
$lang['ftp_unable_to_makdir'] = 'Kan de opgegeven map niet creëren.';
|
||||||
|
$lang['ftp_unable_to_changedir'] = 'Kan niet van pad veranderen.';
|
||||||
|
$lang['ftp_unable_to_chmod'] = 'Kan de bestandspermissies niet instellen. Controleer het pad. Opmerking: Deze functionaliteit is enkel beschikbaar in PHP 5 en hoger.';
|
||||||
|
$lang['ftp_unable_to_upload'] = 'Kan het opgegeven bestand niet uploaden. Controleer het pad.';
|
||||||
|
$lang['ftp_no_source_file'] = 'Kan het bronbestand niet vinden. Controleer het pad.';
|
||||||
|
$lang['ftp_unable_to_rename'] = 'Kan de naam van het bestand niet wijzigen.';
|
||||||
|
$lang['ftp_unable_to_delete'] = 'Kan het bestand niet verwijderen.';
|
||||||
|
$lang['ftp_unable_to_move'] = 'Kan het bestand niet verplaatsen. Controleer of het doelpad wel bestaat.';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file ftp_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/ftp_lang.php */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['imglib_source_image_required'] = 'U moet een bron bestand opgeven in uw instellingen.';
|
||||||
|
$lang['imglib_gd_required'] = 'De GD image library is benodigd voor deze functie.';
|
||||||
|
$lang['imglib_gd_required_for_props'] = 'Uw server moet de GD library ondersteunen om de eigenschappen van de afbeelding te kunnen bepalen.';
|
||||||
|
$lang['imglib_unsupported_imagecreate'] = 'Uw server ondersteunt de benodigde GD functie voor dit type afbeelding niet.';
|
||||||
|
$lang['imglib_gif_not_supported'] = 'GIF afbeeldingen worden vaak niet ondersteund door licentie beperkingen. U zou JPG of PNG afbeeldingen kunnen proberen.';
|
||||||
|
$lang['imglib_jpg_not_supported'] = 'JPG afbeeldingen worden niet ondersteund.';
|
||||||
|
$lang['imglib_png_not_supported'] = 'PNG afbeeldingen worden niet ondersteund.';
|
||||||
|
$lang['imglib_jpg_or_png_required'] = 'Het veranderen van de grootte van afbeeldingen werkt alleen voor JPEG of PNG afbeeldingen.';
|
||||||
|
$lang['imglib_copy_error'] = 'Er is een fout opgetreden bij het vervangen van de afbeelding. Zorg ervoor dat het pad schrijfbaar is.';
|
||||||
|
$lang['imglib_rotate_unsupported'] = 'Afbeeldingen roteren met behulp van PHP wordt niet ondersteund op uw server.';
|
||||||
|
$lang['imglib_libpath_invalid'] = 'Het pad dat u heeft opgegeven van de image library is niet correct. Verander dit in uw instellingen van de afbeelding.';
|
||||||
|
$lang['imglib_image_process_failed'] = 'Afbeeldingsverwerking mislukt. Gaat na of het pad naar uw image libray correct is ingesteld en of uw server het gekozen protocol ondersteunt.';
|
||||||
|
$lang['imglib_rotation_angle_required'] = 'Een draaihoek moet worden opgegeven om een afbeelding te kunnen roteren.';
|
||||||
|
$lang['imglib_writing_failed_gif'] = 'GIF afbeelding ';
|
||||||
|
$lang['imglib_invalid_path'] = 'Het opgegeven pad van het afbeelding is niet correct.';
|
||||||
|
$lang['imglib_copy_failed'] = 'De afbeeldings kopiëer handeling is mislukt.';
|
||||||
|
$lang['imglib_missing_font'] = 'Kon geen lettertype vinden om te gebruiken.';
|
||||||
|
$lang['imglib_save_failed'] = "Kon e afbeelding niet opslaan. Zorg ervoor dat het pad en de afbeelding (over)schrijfbaar zijn.";
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file imglib_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/imglib_lang.php */
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['terabyte_abbr'] = "TB";
|
||||||
|
$lang['gigabyte_abbr'] = "GB";
|
||||||
|
$lang['megabyte_abbr'] = "MB";
|
||||||
|
$lang['kilobyte_abbr'] = "KB";
|
||||||
|
$lang['bytes'] = "Bytes";
|
||||||
|
|
||||||
|
/* End of file number_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/number_lang.php */
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
$lang=array(
|
||||||
|
|
||||||
|
'lbl-acceptatie' => 'Acceptatie ',
|
||||||
|
'lbl-activiteiten' => 'Activiteiten',
|
||||||
|
'lbl-adaptiefonderwijzen' => 'Adaptief onderwijzen',
|
||||||
|
|
||||||
|
'lbl-afgestemdematerialen' => 'Afgestemde materialen',
|
||||||
|
'lbl-afsprakenvastleggen' => 'Afspraken vastleggen ',
|
||||||
|
'lbl-analyserenevaluatie' => 'Analyseren van de evaluatie',
|
||||||
|
'lbl-analyserensituatie' => 'Analyseren van de huidige situatie',
|
||||||
|
'lbl-annuleren' => 'annuleren',
|
||||||
|
'lbl-beheer' => 'Beheer',
|
||||||
|
'lbl-beleid' => 'Beleid',
|
||||||
|
'lbl-borging' => 'Borging',
|
||||||
|
'lbl-bron' => 'Bron',
|
||||||
|
'lbl-communicatie' => 'Communicatie',
|
||||||
|
'lbl-doelgroep' => 'doelgroep',
|
||||||
|
'lbl-doelgroepen' => 'doelgroepen',
|
||||||
|
'lbl-download' => 'download',
|
||||||
|
'lbl-downloadhandleiding' => 'download handleiding',
|
||||||
|
'lbl-duur' => 'Duur (dagen)',
|
||||||
|
'lbl-einddatum' => 'Einddatum',
|
||||||
|
'lbl-engspace' => '',
|
||||||
|
'lbl-evaluatie' => 'Evaluatie',
|
||||||
|
'lbl-evalueren' => 'Evalueren',
|
||||||
|
'lbl-extrainformatie' => 'Extra informatie',
|
||||||
|
'lbl-fase' => 'Fase',
|
||||||
|
'lbl-fcurriculum' => 'Flexibel curriculum',
|
||||||
|
'lbl-gedifferentieerdleren' => 'Gedifferentieerd leren',
|
||||||
|
'lbl-gedragsmanagement' => 'Gedragsmanagement',
|
||||||
|
'lbl-gemiddeldgereed' => 'gemiddeld gereed',
|
||||||
|
'lbl-gewenstesituatie' => 'gewenste situatie',
|
||||||
|
'lbl-handleiding' => 'handleiding',
|
||||||
|
'lbl-huidigesituatie' => 'huidige situatie',
|
||||||
|
'lbl-inhoud' => 'inhoud',
|
||||||
|
'lbl-inhouden' => 'Inhouden',
|
||||||
|
'lbl-inventariseren' => 'Inventariseren van mogelijkheden',
|
||||||
|
'lbl-invoeren' => 'Invoeren van mogelijkheden',
|
||||||
|
'lbl-invoering' => 'Invoering',
|
||||||
|
'lbl-ja' => 'ja',
|
||||||
|
'lbl-kosten' => 'Kosten',
|
||||||
|
'lbl-leerlingbegeleiding' => 'Leerlingbegeleiding',
|
||||||
|
'lbl-mensen' => 'Mensen',
|
||||||
|
'lbl-mensenactief' => 'Mensen actief',
|
||||||
|
'lbl-nee' => 'nee',
|
||||||
|
'lbl-nieuwe' => 'nieuw',
|
||||||
|
'lbl-nieuwepartituur' => 'nieuwe partituur',
|
||||||
|
'lbl-omschrijving' => 'Omschrijving',
|
||||||
|
'lbl-opbrengsten' => 'Opbrengsten',
|
||||||
|
'lbl-opmerkingen' => 'Opmerkingen / suggesties',
|
||||||
|
'lbl-opslaan' => 'opslaan',
|
||||||
|
'lbl-opstellenkader' => 'Opstellen van een kader',
|
||||||
|
'lbl-ouderbetrokkenheid' => 'Ouderbetrokkenheid',
|
||||||
|
'lbl-overzichten' => 'Overzichten',
|
||||||
|
'lbl-opdeschoolmeter' => 'op de monitor basisondersteuning',
|
||||||
|
'lbl-partituur'=>"partituur",
|
||||||
|
'lbl-partituurcolofon' => 'partituur colofon',
|
||||||
|
'lbl-partituurnaam' => 'partituurnaam',
|
||||||
|
'lbl-percentagegereed' => 'Percentage gereed',
|
||||||
|
'lbl-periode' => 'periode',
|
||||||
|
'lbl-pijler' => 'ijkpunt',
|
||||||
|
'lbl-Pijler' =>'IJkpunt',
|
||||||
|
'lbl-pijlers' => 'ijkpunten',
|
||||||
|
'lbl-Pijlers' => 'IJkpunten',
|
||||||
|
'lbl-planmatigwerken' => 'Planmatig werken',
|
||||||
|
'lbl-planning' => 'Planning',
|
||||||
|
'lbl-portfolio' => 'Portfolio',
|
||||||
|
'lbl-professionalisering' => 'Professionalisering',
|
||||||
|
'lbl-profiel' => 'profiel',
|
||||||
|
'lbl-projectleider' => 'projectleider',
|
||||||
|
'lbl-reset' => 'reset',
|
||||||
|
'lbl-samenwerken' => 'Samenwerken',
|
||||||
|
'lbl-schoolbeeldbereiken' => 'schoolbeeld dat u wilt bereiken',
|
||||||
|
'lbl-schoolmeterscores' =>'monitor scores',
|
||||||
|
'lbl-score' => 'score',
|
||||||
|
'lbl-scores' => 'score',
|
||||||
|
'lbl-scorevoor' => 'score voor',
|
||||||
|
'lbl-selecteerpartituur' => 'selecteer partituur',
|
||||||
|
'lbl-selecteerprojectleider' => 'selecteer een projectleider',
|
||||||
|
'lbl-specificatie' => 'Specificatie',
|
||||||
|
'lbl-startdatum' => 'Startdatum',
|
||||||
|
'lbl-stuuremail' => 'Stuur een e-mail',
|
||||||
|
'lbl-stuuremailsnaar' => 'stuur e-mails naar',
|
||||||
|
'lbl-tijdsplanning' => 'Tijdsplanning',
|
||||||
|
'lbl-tm' => 't/m',
|
||||||
|
'lbl-toegankelijkeruimten' => 'Toegankelijke ruimten',
|
||||||
|
'lbl-toevoegen' => 'toevoegen',
|
||||||
|
'lbl-totalekosten' => 'totale kosten',
|
||||||
|
'lbl-totaalscoreenbeeld' => 'totaal score & beeld',
|
||||||
|
'lbl-uitvoerenden' => 'Uitvoerenden',
|
||||||
|
'lbl-uwschoolmeterscore' => 'uw score op de monitor basisondersteuning',
|
||||||
|
'lbl-van' => 'van',
|
||||||
|
'lbl-verantwoordelijke' => 'Verantwoordelijke',
|
||||||
|
'lbl-verwijder' => 'verwijder',
|
||||||
|
'lbl-voegeenuitvoerendetoe' => 'Voeg nog een uitvoerende toe',
|
||||||
|
'lbl-voorbereiding' => 'Voorbereiding en vaststelling',
|
||||||
|
'lbl-wijzignaam' => 'wijzig naam',
|
||||||
|
'lbl-gewenst' => 'gewenst',
|
||||||
|
'lbl-advies' => 'advies',
|
||||||
|
'lbl-huidig' => 'huidig',
|
||||||
|
|
||||||
|
'mes-einddatumaanpassen' => 'einddatum aanpassen',
|
||||||
|
'mes-einddatuminvullen' => 'einddatum moet worden ingevuld.',
|
||||||
|
'mes-emailvervangen' => 'Wilt u het e-mailadres vervangen met het e-mailadres van ',
|
||||||
|
'mes-geenactievepartituur' => 'geen actieve partituur',
|
||||||
|
'mes-geenrechten' => 'U heeft geen rechten om een nieuwe partituur aan te maken <br/> het programma wordt afgesloten',
|
||||||
|
'mes-geentoegang' => 'U heeft geen toegang tot deze partituur.',
|
||||||
|
'mes-geengegevenswijzigen' => 'U mag geeen gegevens wijzigen.',
|
||||||
|
'mes-gegevensinvullen' => 'De volgende gegevens moeten nog worden ingevuld:',
|
||||||
|
'mes-heelgetalinvullen' => 'U moet hele getallen invullen.',
|
||||||
|
'mes-nieuwenaam' => 'Nieuwe naam: ',
|
||||||
|
'mes-startdatumaanpassen' => 'startdatum aanpassen',
|
||||||
|
'mes-startdatuminvullen' => 'startdatum moet worden ingevuld.',
|
||||||
|
'mes-startdatumvooreinddatum' => 'De startdatum moet voor de einddatum liggen.',
|
||||||
|
'mes-ukuntnietverder' => 'U kunt niet verder zonder actieve partituur. Maak een partituur aan met behulp van de Monitor Basisondersteuning.',
|
||||||
|
'mes-weetuzekerpartituur' => 'Weet u zeker dat u een nieuwe partituur wilt aanmaken?',
|
||||||
|
'mes-weetuzekerpartituurverwijderen' => 'Weet u zeker dat u deze partituur wilt verwijderen? ',
|
||||||
|
);
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['profiler_database'] = 'DATABASE';
|
||||||
|
$lang['profiler_controller_info'] = 'CLASS/METHOD';
|
||||||
|
$lang['profiler_benchmarks'] = 'BENCHMARKS';
|
||||||
|
$lang['profiler_queries'] = 'QUERIES';
|
||||||
|
$lang['profiler_get_data'] = 'GET DATA';
|
||||||
|
$lang['profiler_post_data'] = 'POST DATA';
|
||||||
|
$lang['profiler_uri_string'] = 'URI STRING';
|
||||||
|
$lang['profiler_memory_usage'] = 'GEHEUGEN GEBRUIK';
|
||||||
|
$lang['profiler_no_db'] = 'Database driver is momenteel niet geladen';
|
||||||
|
$lang['profiler_no_queries'] = 'Er zijn geen queries uitgevoerd';
|
||||||
|
$lang['profiler_no_post'] = 'Er is geen POST data';
|
||||||
|
$lang['profiler_no_get'] = 'Er is geen GET data';
|
||||||
|
$lang['profiler_no_uri'] = 'Er is geen URI data';
|
||||||
|
$lang['profiler_no_memory'] = 'Geheugen gebruik niet beschikbaar';
|
||||||
|
|
||||||
|
/* End of file profiler_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/profiler_lang.php */
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['scaff_view_records'] = 'Bekijk Records';
|
||||||
|
$lang['scaff_create_record'] = 'Creëer Nieuw Record';
|
||||||
|
$lang['scaff_add'] = 'Data Toevoegen';
|
||||||
|
$lang['scaff_view'] = 'Data Bekijken';
|
||||||
|
$lang['scaff_edit'] = 'Bewerk';
|
||||||
|
$lang['scaff_delete'] = 'Verwijder';
|
||||||
|
$lang['scaff_view_all'] = 'Bekijk alle';
|
||||||
|
$lang['scaff_yes'] = 'Ja';
|
||||||
|
$lang['scaff_no'] = 'Nee';
|
||||||
|
$lang['scaff_no_data'] = 'Er is nog geen data in deze tabel ingevoerd.';
|
||||||
|
$lang['scaff_del_confirm'] = 'Weet u zeker dat u de volgende row wilt verwijderen:';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file scaffolding_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/scaffolding_lang.php */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['ut_test_name'] = 'Test Naam';
|
||||||
|
$lang['ut_test_datatype'] = 'Test Datatype ';
|
||||||
|
$lang['ut_res_datatype'] = 'Verwachte Datatype';
|
||||||
|
$lang['ut_result'] = 'Resultaat';
|
||||||
|
$lang['ut_undefined'] = 'Ongedefinieerde Test Naam';
|
||||||
|
$lang['ut_file'] = 'Bestandsnaam';
|
||||||
|
$lang['ut_line'] = 'Regelnummer';
|
||||||
|
$lang['ut_passed'] = 'Succesvol';
|
||||||
|
$lang['ut_failed'] = 'Mislukt';
|
||||||
|
$lang['ut_boolean'] = 'Boolean';
|
||||||
|
$lang['ut_integer'] = 'Integer';
|
||||||
|
$lang['ut_float'] = 'Float';
|
||||||
|
$lang['ut_double'] = 'Double';
|
||||||
|
$lang['ut_string'] = 'String';
|
||||||
|
$lang['ut_array'] = 'Array';
|
||||||
|
$lang['ut_object'] = 'Object';
|
||||||
|
$lang['ut_resource'] = 'Resource';
|
||||||
|
$lang['ut_null'] = 'Null'
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file unit_test_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/unit_test_lang.php */
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['upload_userfile_not_set'] = 'Kon de POST variabele "userfile" niet vinden.';
|
||||||
|
$lang['upload_file_exceeds_limit'] = 'Het geuploade bestand overschrijdt de maximum grootte. Deze maximum grootte is gespecificeerd in uw PHP configuratie bestand.';
|
||||||
|
$lang['upload_file_exceeds_form_limit'] = "Het geuploade bestand overschrijdt de maximum grootte die in het formulier is aangegeven";
|
||||||
|
$lang['upload_file_partial'] = 'Het bestand is maar gedeeltelijk geupload.';
|
||||||
|
$lang['upload_no_temp_directory'] = 'De tijdelijke map bestaat niet.';
|
||||||
|
$lang['upload_unable_to_write_file'] = 'Het bestand kon niet naar de schijf geschreven worden.';
|
||||||
|
$lang['upload_stopped_by_extension'] = 'Het uploaden is gestopt door uitbreiding.';
|
||||||
|
$lang['upload_no_file_selected'] = 'U heeft geen bestand geselecteerd om te uploaden.';
|
||||||
|
$lang['upload_invalid_filetype'] = 'Het bestandstype van het bestand dat u probeert te uploaden is niet toegestaan.';
|
||||||
|
$lang['upload_invalid_filesize'] = 'De bestandsgrootte van het bestand dat u probeert te uploaden is te groot.';
|
||||||
|
$lang['upload_invalid_dimensions'] = 'De afbeelding die u probeert te uploaden is breder of hoger dan toegestaan.';
|
||||||
|
$lang['upload_destination_error'] = 'Er is een probleem opgetreden bij het verplaatsen van het bestand naar de doellocatie.';
|
||||||
|
$lang['upload_no_filepath'] = 'Het uploadpad is niet correct.';
|
||||||
|
$lang['upload_no_file_types'] = 'U heeft geen toegestane bestandstypen gespecificeerd.';
|
||||||
|
$lang['upload_bad_filename'] = 'De bestandsnaam die u heeft opgegeven komt al voor op de server.';
|
||||||
|
$lang['upload_not_writable'] = 'De doellocatie op de server is niet schijfbaar';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file upload_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/upload_lang.php */
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['required'] = 'Het "%s" veld moet verplicht worden ingevuld.';
|
||||||
|
$lang['isset'] = 'Het "%s" veld moet een waarde hebben.';
|
||||||
|
$lang['valid_email'] = 'Het "%s" veld moet een geldig emailadres bevatten.';
|
||||||
|
$lang['valid_emails'] = 'Het "%s" veld moet geldige emailadressen bevatten.';
|
||||||
|
$lang['valid_url'] = 'Het "%s" veld moet een correcte URL bevatten.';
|
||||||
|
$lang['valid_ip'] = 'Het "%s" veld moet een correct IP adres bevatten.';
|
||||||
|
$lang['min_length'] = 'Het "%s" veld moet tenminste %s tekens bevatten.';
|
||||||
|
$lang['max_length'] = 'Het "%s" veld mag niet meer dan %s tekens bevatten.';
|
||||||
|
$lang['exact_length'] = 'Het "%s" veld moet exact %s tekens bevatten.';
|
||||||
|
$lang['alpha'] = 'Het "%s" veld mag alleen letters bevatten.';
|
||||||
|
$lang['alpha_numeric'] = 'Het "%s" veld mag alleen letters en cijfers bevatten.';
|
||||||
|
$lang['alpha_dash'] = 'Het "%s" veld mag alleen letters, cijfers, underscores(_) en strepen(-) bevatten.';
|
||||||
|
$lang['numeric'] = 'Het "%s" veld mag alleen nummers bevatten.';
|
||||||
|
$lang['is_numeric'] = 'Het "%s" veld moet een nummer bevatten.';
|
||||||
|
$lang['integer'] = 'Het "%s" veld moet een heel getal bevatten.';
|
||||||
|
$lang['matches'] = 'De waarde van het "%s" veld is niet gelijk aan de waarde van het "%s" veld.';
|
||||||
|
$lang['is_natural'] = 'Het "%s" veld moet een positief nummer bevatten.';
|
||||||
|
$lang['is_natural_no_zero'] = 'Het "%s" veld moet een nummer bevatten dat groter is als nul.';
|
||||||
|
|
||||||
|
|
||||||
|
/* End of file validation_lang.php */
|
||||||
|
/* Location: ./system/language/dutch/validation_lang.php */
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user